:root {
  --bg: #f7f3ec;
  --paper: #fffdf8;
  --ink: #17312e;
  --ink-soft: #4f625e;
  --teal: #1f6f6b;
  --teal-dark: #14504d;
  --coral: #d97757;
  --line: #e6dccd;
  --shadow: 0 12px 32px rgba(23, 49, 46, 0.07);
  --radius: 22px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.08; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }

p { margin: 0; }

.lede {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 52ch;
}

/* ---------- Marque ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-family: ui-serif, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand-name {
  font-family: ui-serif, Georgia, serif;
  font-size: 1.1rem;
  color: var(--ink);
}

.brand-small .brand-mark { width: 2.2rem; height: 2.2rem; font-size: 0.85rem; }
.brand-small .brand-name { font-size: 0.98rem; }

/* ---------- Connexion ---------- */

.page-login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(1100px 600px at 15% -10%, #e9f0e9 0%, transparent 55%),
    radial-gradient(900px 500px at 95% 110%, #f4e3d8 0%, transparent 55%),
    var(--bg);
}

.login-shell {
  width: min(440px, 100%);
  display: grid;
  gap: 1.4rem;
  justify-items: center;
}

.login-card {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(1.6rem, 5vw, 2.4rem);
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  margin: 1.3rem 0 0.6rem;
}

.login-form {
  margin-top: 1.8rem;
  display: grid;
  gap: 0.6rem;
}

.login-form label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.login-form input {
  width: 100%;
  padding: 0.95rem 1rem;
  font-size: 1.05rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-form input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(31, 111, 107, 0.12);
}

.form-error {
  color: #a2452e;
  font-size: 0.92rem;
  padding: 0.5rem 0.2rem 0;
}

.privacy-note {
  margin-top: 1.4rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

.login-foot {
  color: var(--ink-soft);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

/* ---------- Boutons ---------- */

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.4rem;
  font-size: 0.98rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, opacity 0.15s;
}

.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal); color: #fff; width: 100%; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}
.btn-ghost:hover { background: #fff; color: var(--ink); }

/* ---------- Tableau de bord ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 2.4rem);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 243, 236, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.dash-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(1.4rem, 4vw, 3rem) clamp(1rem, 4vw, 2rem) 4rem;
  display: grid;
  gap: 1.2rem;
}

.hello { padding: 0.6rem 0 0.4rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--coral);
  margin-bottom: 0.7rem;
}

.hello .lede { margin-top: 0.9rem; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 1.8rem);
  box-shadow: 0 1px 0 rgba(23, 49, 46, 0.02);
}

.card-kicker {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

.card-hero {
  background: linear-gradient(135deg, #fffdf8 0%, #f2f7f2 100%);
}

.hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.hero-score {
  font-family: ui-serif, Georgia, serif;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  line-height: 1;
  color: var(--teal);
}

.hero-score span { color: var(--ink-soft); font-size: 0.45em; }

.bar {
  margin-top: 1.2rem;
  height: 10px;
  background: #e8e2d6;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #3f918b);
  border-radius: 999px;
  transition: width 0.6s ease;
}

.hero-note { margin-top: 0.9rem; color: var(--ink-soft); font-size: 0.95rem; }

.card-next { display: grid; gap: 0.6rem; }
.card-next .btn { width: auto; justify-self: start; margin-top: 0.4rem; padding-inline: 1.5rem; }
.micro { color: var(--ink-soft); font-size: 0.8rem; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.card-mini { display: grid; gap: 0.45rem; align-content: start; }
.card-mini p:not(.card-kicker) { color: var(--ink-soft); font-size: 0.94rem; }

.pill {
  justify-self: start;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: #f1ece1;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
}

.pill-soft { background: #e6f0e9; color: var(--teal-dark); }

.dash-foot {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.78rem;
  margin-top: 1rem;
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .topbar { padding: 0.8rem 1rem; }
  .dash-shell { padding-bottom: 2.5rem; }
  .card { border-radius: 18px; }
  .login-card { border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
