/* =========================
   FLOWMATIQUE LOGIN
   cohérent avec le dashboard
========================= */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  --bg:           #eef1f5;
  --surface:      #ffffff;
  --surface-soft: #f6f8fb;
  --surface-hover:#edf1f7;

  --text:         #0c1929;
  --text-soft:    #3a4f66;
  --text-muted:   #637487;

  --border:       #d6dde8;
  --border-strong:#b3bfcf;

  --brand:        #14305e;
  --brand-mid:    #1d4480;
  --brand-light:  #2a5ea8;
  --brand-soft:   rgba(20, 48, 94, 0.07);

  --danger:       #b91c1c;
  --danger-soft:  rgba(185, 28, 28, 0.09);

  --shadow-xs: 0 1px 3px rgba(12, 25, 41, 0.08);
  --shadow-sm: 0 2px 8px rgba(12, 25, 41, 0.09);
  --shadow-md: 0 4px 16px rgba(12, 25, 41, 0.10);

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;

  --container: 1280px;
}

/* =========================
   RESET
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(20,48,94,0.028) 0%, transparent 320px),
    var(--bg);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================
   LOGIN PAGE
========================= */

.login-page {
  flex: 1;
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto;
  padding: 56px 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 34px 34px 30px;
}

.login-brand {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 20px;
}

.login-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.login-card h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 2.4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: var(--text);
}

.login-intro {
  margin: 0 0 24px;
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.55;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-form label {
  display: block;
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: -6px;
}

.login-form input {
  width: 100%;
  height: 46px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--text);
  padding: 0 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-form input:focus {
  outline: none;
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(20, 48, 94, 0.08);
  background: #fff;
}

.login-form input::placeholder {
  color: #8fa1b3;
}

.primary-btn {
  appearance: none;
  border: 1.5px solid var(--brand);
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius-sm);
  min-height: 46px;
  padding: 0 16px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
  box-shadow: var(--shadow-xs);
}

.primary-btn:hover {
  background: var(--brand-mid);
  border-color: var(--brand-mid);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.login-btn {
  margin-top: 4px;
  width: 100%;
}

.login-error {
  margin: 2px 0 0;
  min-height: 20px;
  color: var(--danger);
  font-size: 0.88rem;
  line-height: 1.4;
}

.login-help {
  margin: 2px 0 0;
  font-size: 0.92rem;
}

.login-help a {
  color: var(--brand);
  font-weight: 600;
  transition: color 0.13s ease;
}

.login-help a:hover {
  color: var(--brand-mid);
}

/* =========================
   FOOTER
========================= */

.dashboard-footer {
  border-top: 1.5px solid var(--border);
  background: #fff;
}

.dashboard-footer-container {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto;
  padding: 22px 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-left { max-width: 480px; }

.footer-brand {
  margin: 0 0 4px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-soft);
}

.footer-subtext {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.83rem;
}

.footer-right {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 20px;
}

.footer-right a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.84rem;
  transition: color 0.13s ease;
}

.footer-right a:hover {
  color: var(--brand);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 820px) {
  .login-page,
  .dashboard-footer-container {
    width: min(calc(100% - 24px), var(--container));
  }

  .login-card {
    padding: 24px 22px 22px;
    border-radius: var(--radius-md);
  }

  .login-card h1 {
    font-size: 2rem;
  }
}

@media (max-width: 560px) {
  .login-page {
    padding: 28px 0 24px;
    align-items: flex-start;
  }

  .login-card {
    padding: 20px 18px 18px;
  }

  .login-card h1 {
    font-size: 1.65rem;
  }

  .dashboard-footer-container {
    padding: 18px 0 22px;
  }

  .footer-right {
    justify-content: flex-start;
  }
}
