/* ============================================================
   MAMOUSSO V20 — Pages Connexion / Inscription / Mot de passe oublié
   Palette « Claude » : crème chaud, brun foncé, accent terracotta.
   Chargé uniquement par templates/_auth_layout.html (body.authBody).
   ============================================================ */

:root {
  --au-bg: #f5f4ed;
  --au-surface: #fffdf8;
  --au-surface-2: #faf9f5;
  --au-surface-3: #f0eee6;
  --au-text: #141413;
  --au-text-2: #3d3929;
  --au-muted: #73726c;
  --au-faint: #9b998f;
  --au-line: #e8e6dc;
  --au-line-strong: #d6d3c7;
  --au-accent: #c96442;
  --au-accent-hover: #b0573a;
  --au-accent-soft: #f9ece4;
  --au-grad-from: #dd805f;
  --au-grad-to: #bf5a36;
  --au-ring: 0 0 0 4px rgba(201, 100, 66, .16);
  --au-danger: #b42318;
  --au-danger-soft: #fef1ef;
  --au-danger-line: #f6cfc9;
  --au-ok: #157f3c;
  --au-ok-soft: #edf8f0;
  --au-ok-line: #c3e6cd;
  --au-info: #4f6480;
  --au-info-soft: #eff2f6;
  --au-info-line: #d5dde8;
  --au-card-shadow: 0 1px 2px rgba(20, 20, 19, .04), 0 8px 24px rgba(60, 45, 30, .06), 0 32px 64px -24px rgba(60, 45, 30, .14);
  --au-btn-shadow: 0 1px 2px rgba(20, 20, 19, .06), 0 1px 0 rgba(255, 255, 255, .5) inset;
  --au-glow-1: rgba(217, 119, 87, .18);
  --au-glow-2: rgba(232, 180, 140, .22);
  --au-dots: rgba(20, 20, 19, .06);
  --au-serif: "Tiempos Headline", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, ui-serif, serif;
  --au-sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --au-bg: #1c1b19;
    --au-surface: #262624;
    --au-surface-2: #2b2b29;
    --au-surface-3: #33322f;
    --au-text: #f3f1ea;
    --au-text-2: #dedad0;
    --au-muted: #a6a39a;
    --au-faint: #7f7c74;
    --au-line: #393835;
    --au-line-strong: #4a4844;
    --au-accent: #e08563;
    --au-accent-hover: #ea9676;
    --au-accent-soft: rgba(217, 119, 87, .14);
    --au-ring: 0 0 0 4px rgba(224, 133, 99, .22);
    --au-danger: #ff9b8f;
    --au-danger-soft: rgba(239, 68, 68, .1);
    --au-danger-line: rgba(239, 68, 68, .3);
    --au-ok: #7dd89b;
    --au-ok-soft: rgba(34, 197, 94, .1);
    --au-ok-line: rgba(34, 197, 94, .28);
    --au-info: #a9bcd6;
    --au-info-soft: rgba(120, 150, 190, .12);
    --au-info-line: rgba(120, 150, 190, .28);
    --au-card-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 24px 64px -20px rgba(0, 0, 0, .55);
    --au-btn-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --au-glow-1: rgba(217, 119, 87, .14);
    --au-glow-2: rgba(160, 110, 80, .12);
    --au-dots: rgba(255, 255, 255, .05);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --au-bg: #1c1b19;
  --au-surface: #262624;
  --au-surface-2: #2b2b29;
  --au-surface-3: #33322f;
  --au-text: #f3f1ea;
  --au-text-2: #dedad0;
  --au-muted: #a6a39a;
  --au-faint: #7f7c74;
  --au-line: #393835;
  --au-line-strong: #4a4844;
  --au-accent: #e08563;
  --au-accent-hover: #ea9676;
  --au-accent-soft: rgba(217, 119, 87, .14);
  --au-ring: 0 0 0 4px rgba(224, 133, 99, .22);
  --au-danger: #ff9b8f;
  --au-danger-soft: rgba(239, 68, 68, .1);
  --au-danger-line: rgba(239, 68, 68, .3);
  --au-ok: #7dd89b;
  --au-ok-soft: rgba(34, 197, 94, .1);
  --au-ok-line: rgba(34, 197, 94, .28);
  --au-info: #a9bcd6;
  --au-info-soft: rgba(120, 150, 190, .12);
  --au-info-line: rgba(120, 150, 190, .28);
  --au-card-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 24px 64px -20px rgba(0, 0, 0, .55);
  --au-btn-shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --au-glow-1: rgba(217, 119, 87, .14);
  --au-glow-2: rgba(160, 110, 80, .12);
  --au-dots: rgba(255, 255, 255, .05);
  color-scheme: dark;
}

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

.authBody {
  margin: 0;
  min-height: 100vh;
  background: var(--au-bg);
  color: var(--au-text);
  font-family: var(--au-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .3s ease, color .3s ease;
}
.authBody a { color: inherit; }
.authBody svg { flex: none; }

.authPage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  min-height: 100vh;
}

/* ---------- Panneau vitrine (gauche) ---------- */
.authAside {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(201, 100, 66, .32), transparent 55%),
    radial-gradient(90% 70% at 100% 100%, rgba(224, 160, 110, .18), transparent 60%),
    linear-gradient(160deg, #26201b 0%, #1a1714 55%, #14120f 100%);
  color: #f6f1e7;
  border-right: 1px solid rgba(255, 255, 255, .06);
  isolation: isolate;
}
.authAside::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .9), transparent 85%);
  z-index: -1;
}
.authAsideGlow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  z-index: -1;
  animation: authDrift 18s ease-in-out infinite alternate;
}
.authAsideGlow--a { width: 380px; height: 380px; left: -120px; top: 18%; background: rgba(217, 119, 87, .35); }
.authAsideGlow--b { width: 300px; height: 300px; right: -90px; bottom: 6%; background: rgba(240, 190, 140, .18); animation-delay: -9s; }
@keyframes authDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(40px, -30px, 0) scale(1.12); }
}

.authAsideInner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 44px clamp(32px, 5vw, 72px);
  max-width: 640px;
  margin-left: auto;
}

.authLogo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-family: var(--au-serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: .06em;
  color: var(--au-text);
}
.authLogo--light { color: #fbf7ef; }
.authLogoMark { border-radius: 11px; box-shadow: 0 6px 18px rgba(201, 100, 66, .35); }

.authPitch { margin-top: auto; }
.authEyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05);
  color: #f0c7b4;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}
.authEyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #e08563; box-shadow: 0 0 0 3px rgba(224, 133, 99, .25); }
.authPitch h2 {
  margin: 18px 0 14px;
  font-family: var(--au-serif);
  font-weight: 500;
  font-size: clamp(30px, 3.1vw, 42px);
  line-height: 1.12;
  letter-spacing: -.015em;
  color: #fbf7ef;
}
.authPitch h2 em {
  font-style: italic;
  background: linear-gradient(100deg, #f1a582, #e07a55);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.authPitch p { margin: 0; max-width: 460px; color: rgba(246, 241, 231, .68); font-size: 15.5px; line-height: 1.65; }

.authPreview {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .03));
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .06) inset;
  padding: 18px 20px 14px;
  max-width: 480px;
  animation: authRise .9s .15s cubic-bezier(.2, .8, .2, 1) both;
}
.authPreviewHead { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(246, 241, 231, .85); }
.authPreviewHead strong { font-weight: 600; }
.authPreviewDot { width: 8px; height: 8px; border-radius: 50%; background: #e08563; box-shadow: 0 0 0 0 rgba(224, 133, 99, .6); animation: authPulse 2s infinite; }
.authPreviewTime { margin-left: auto; font-variant-numeric: tabular-nums; color: rgba(246, 241, 231, .5); font-size: 12px; }
@keyframes authPulse { 70% { box-shadow: 0 0 0 8px rgba(224, 133, 99, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 133, 99, 0); } }

.authWave { display: flex; align-items: center; gap: 3px; height: 42px; margin: 14px 0 12px; }
.authWave i {
  flex: 1;
  height: var(--h);
  border-radius: 2px;
  min-width: 2px;
  background: linear-gradient(180deg, #f0a07f, #c96442);
  opacity: .85;
  transform-origin: center;
  animation: authBar 1.6s var(--d) ease-in-out infinite alternate;
}
.authWave i:nth-child(n+23) { background: rgba(255, 255, 255, .18); }
@keyframes authBar { from { transform: scaleY(.45); } to { transform: scaleY(1); } }

.authPreviewLines p { margin: 0; padding: 7px 10px; border-radius: 9px; font-size: 13.5px; line-height: 1.5; color: rgba(246, 241, 231, .55); display: flex; gap: 12px; transition: background .3s; }
.authPreviewLines p span { font-variant-numeric: tabular-nums; font-size: 11.5px; color: rgba(246, 241, 231, .35); padding-top: 2px; }
.authPreviewLines p.isActive { background: rgba(224, 133, 99, .16); color: #fbf7ef; }
.authPreviewLines p.isActive span { color: #f0b49a; }

.authBenefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.authBenefits li { display: flex; align-items: center; gap: 11px; color: rgba(246, 241, 231, .82); font-size: 14.5px; }
.authBenefits svg, .authAsideSteps svg { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: rgba(224, 133, 99, .2); fill: none; stroke: #f0a07f; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.authAsideSteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 440px; }
.authAsideSteps li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .03); color: rgba(246, 241, 231, .55); transition: all .3s; }
.authAsideSteps b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); font-size: 13px; font-weight: 600; }
.authAsideSteps strong { display: block; color: rgba(246, 241, 231, .85); font-size: 14.5px; font-weight: 600; }
.authAsideSteps span { font-size: 12.5px; }
.authAsideSteps li.isActive { border-color: rgba(224, 133, 99, .45); background: rgba(224, 133, 99, .12); }
.authAsideSteps li.isActive b { background: #d97757; border-color: transparent; color: #fff; }
.authAsideSteps li.isDone b { background: rgba(224, 133, 99, .25); border-color: transparent; color: #f6c3ad; }

.authTrust { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 12.5px; color: rgba(246, 241, 231, .5); }
.authTrust span { display: inline-flex; align-items: center; gap: 7px; }
.authTrust svg { width: 14px; height: 14px; fill: rgba(240, 160, 127, .75); }

/* ---------- Zone formulaire (droite) ---------- */
.authMain {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 24px clamp(20px, 4vw, 48px);
  overflow: hidden;
  isolation: isolate;
}
.authMain::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 85% -5%, var(--au-glow-1), transparent 70%),
    radial-gradient(500px 360px at 0% 110%, var(--au-glow-2), transparent 70%);
}
.authMain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--au-dots) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}

.authTopbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.authTopbar .authLogo { visibility: hidden; }

.authThemeToggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--au-line);
  background: var(--au-surface);
  color: var(--au-muted);
  cursor: pointer;
  box-shadow: var(--au-btn-shadow);
  transition: color .2s, border-color .2s, transform .2s, background .2s;
}
.authThemeToggle:hover { color: var(--au-text); border-color: var(--au-line-strong); transform: rotate(-12deg); }
.authThemeToggle:focus-visible { outline: none; box-shadow: var(--au-ring); }
.authThemeToggle svg { width: 18px; height: 18px; }
.authSun { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.authSun circle { fill: currentColor; stroke: none; }
.authMoon { fill: currentColor; }
.authThemeToggle[data-mode="dark"] .authMoon, .authThemeToggle:not([data-mode="dark"]) .authSun { display: none; }

.authCardWrap { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 28px 0; }

.authCard {
  position: relative;
  width: min(440px, 100%);
  padding: 30px 34px 24px;
  border-radius: 22px;
  background: var(--au-surface);
  border: 1px solid var(--au-line);
  box-shadow: var(--au-card-shadow);
  animation: authRise .7s cubic-bezier(.2, .8, .2, 1) both;
}
.authCard::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(217, 119, 87, .45), transparent 32%, transparent 70%, rgba(217, 119, 87, .18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
@keyframes authRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Onglets Connexion / Inscription */
.authTabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  margin-bottom: 24px;
  border-radius: 13px;
  background: var(--au-surface-3);
  border: 1px solid var(--au-line);
}
.authTabs a {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--au-muted);
  transition: color .25s;
}
.authTabs a:hover { color: var(--au-text); }
.authTabs a[aria-current="page"] { color: var(--au-text); }
.authTabs a:focus-visible { outline: none; box-shadow: var(--au-ring); }
.authTabsPill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 10px;
  background: var(--au-surface);
  box-shadow: 0 1px 2px rgba(20, 20, 19, .08), 0 2px 8px rgba(20, 20, 19, .05);
  transition: transform .35s cubic-bezier(.3, .9, .3, 1);
}
.authTabs[data-active="register"] .authTabsPill { transform: translateX(100%); }

.authHeading { margin-bottom: 22px; }
.authHeading h1 {
  margin: 0 0 8px;
  font-family: var(--au-serif);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -.015em;
  color: var(--au-text);
}
.authHeading p { margin: 0; color: var(--au-muted); font-size: 14.5px; line-height: 1.55; }

/* Alertes */
.authAlert {
  display: flex;
  gap: 11px;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: 13px;
  border: 1px solid;
  font-size: 13.5px;
  line-height: 1.5;
  animation: authAlertIn .45s cubic-bezier(.2, .8, .2, 1) both;
}
.authAlert--error { background: var(--au-danger-soft); border-color: var(--au-danger-line); color: var(--au-danger); animation-name: authAlertIn, authShake; animation-duration: .45s, .4s; animation-delay: 0s, .15s; }
.authAlert--success { background: var(--au-ok-soft); border-color: var(--au-ok-line); color: var(--au-ok); }
.authAlert--info { background: var(--au-info-soft); border-color: var(--au-info-line); color: var(--au-info); }
.authAlertIcon svg { width: 20px; height: 20px; margin-top: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.authAlertIcon svg circle { fill: currentColor; fill-opacity: .12; }
.authAlertBody { display: grid; gap: 2px; min-width: 0; }
.authAlertBody strong { font-weight: 650; font-size: 13.5px; }
.authAlertBody span { color: var(--au-text-2); opacity: .9; overflow-wrap: anywhere; }
@keyframes authAlertIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes authShake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* Google */
.authGoogleBtn,
.authBody .googleSignInBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--au-line-strong);
  background: var(--au-surface);
  color: var(--au-text);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--au-btn-shadow);
  transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.authGoogleBtn:hover { background: var(--au-surface-2); border-color: var(--au-faint); transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(60, 45, 30, .2); }
.authGoogleBtn:active { transform: none; }
.authGoogleBtn:focus-visible { outline: none; box-shadow: var(--au-ring); }
.authBody .googleG { width: 20px; height: 20px; }
.authBody .googleSignInBtn.loading { pointer-events: none; opacity: .75; }
.authBody .googleSignInBtn.loading .googleG { animation: authSpin 1s linear infinite; }

.authDivider { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: var(--au-faint); font-size: 12.5px; }
.authDivider::before, .authDivider::after { content: ""; flex: 1; height: 1px; background: var(--au-line); }

/* Formulaire */
.authForm { display: grid; gap: 16px; }
.authField { display: grid; gap: 7px; }
.authField label, .authLabelRow label { font-size: 13.5px; font-weight: 600; color: var(--au-text-2); }
.authLabelRow { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.authOptional { margin-left: 6px; padding: 2px 7px; border-radius: 999px; background: var(--au-surface-3); color: var(--au-muted); font-size: 11px; font-weight: 600; vertical-align: 1px; }
.authLink { color: var(--au-accent); font-size: 13px; font-weight: 600; text-decoration: none; }
.authLink:hover { text-decoration: underline; text-underline-offset: 3px; }

.authInput { position: relative; display: flex; align-items: center; }
.authInputIcon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--au-faint);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: stroke .2s;
}
.authInput input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 43px;
  border-radius: 12px;
  border: 1px solid var(--au-line-strong);
  background: var(--au-surface-2);
  color: var(--au-text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none;
  appearance: none;
}
.authInput input::placeholder { color: var(--au-faint); opacity: 1; }
.authInput input:hover { border-color: var(--au-faint); }
.authInput input:focus { border-color: var(--au-accent); background: var(--au-surface); box-shadow: var(--au-ring); }
.authInput:focus-within .authInputIcon { stroke: var(--au-accent); }
.authInput:has(.authReveal) input { padding-right: 48px; }
.authInput--code input { font-size: 22px; letter-spacing: .5em; font-variant-numeric: tabular-nums; font-weight: 600; }
.authInput--code input::placeholder { letter-spacing: .5em; }

.authReveal {
  position: absolute;
  right: 6px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--au-faint);
  cursor: pointer;
  transition: color .2s, background .2s;
}
.authReveal:hover { color: var(--au-text); background: var(--au-surface-3); }
.authReveal:focus-visible { outline: none; box-shadow: var(--au-ring); }
.authReveal svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.authReveal .authEyeClosed, .authReveal.isShown .authEyeOpen { display: none; }
.authReveal.isShown .authEyeClosed { display: block; }

.authFieldHint { margin: 0; font-size: 12.5px; color: var(--au-faint); }
.authFieldMsg { margin: 0; min-height: 0; font-size: 12.5px; color: var(--au-danger); display: none; align-items: center; gap: 6px; }
.authField.isInvalid .authFieldMsg:not(:empty) { display: flex; animation: authAlertIn .3s both; }
.authField.isInvalid .authFieldMsg::before { content: "!"; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--au-danger); color: var(--au-surface); font-size: 10px; font-weight: 800; }
.authField.isInvalid .authInput input { border-color: var(--au-danger); box-shadow: 0 0 0 4px var(--au-danger-soft); }
.authField.isInvalid .authInputIcon { stroke: var(--au-danger); }
.authField.isValid .authInput input { border-color: color-mix(in srgb, var(--au-ok) 55%, var(--au-line-strong)); }

/* Force du mot de passe */
.authStrength { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--au-faint); }
.authStrengthBars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 112px; flex: none; }
.authStrengthBars i { height: 4px; border-radius: 4px; background: var(--au-surface-3); transition: background .3s; }
.authStrength[data-level="1"] .authStrengthBars i:nth-child(-n+1) { background: #d9534f; }
.authStrength[data-level="2"] .authStrengthBars i:nth-child(-n+2) { background: #e3a008; }
.authStrength[data-level="3"] .authStrengthBars i:nth-child(-n+3) { background: #7cb342; }
.authStrength[data-level="4"] .authStrengthBars i { background: #2e9e5b; }
.authStrength[data-level="3"] span, .authStrength[data-level="4"] span { color: var(--au-ok); }

/* Cases à cocher */
.authCheck { position: relative; display: grid; grid-template-columns: 20px 1fr; gap: 11px; align-items: start; cursor: pointer; font-size: 13px; line-height: 1.5; color: var(--au-muted); }
.authCheck input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.authCheckBox { display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1.5px solid var(--au-line-strong); background: var(--au-surface-2); transition: all .2s; }
.authCheckBox svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; transform: scale(.4); opacity: 0; transition: all .2s cubic-bezier(.3, 1.4, .5, 1); }
.authCheck:hover .authCheckBox { border-color: var(--au-accent); }
.authCheck input:checked + .authCheckBox { background: var(--au-accent); border-color: var(--au-accent); }
.authCheck input:checked + .authCheckBox svg { transform: none; opacity: 1; }
.authCheck input:focus-visible + .authCheckBox { box-shadow: var(--au-ring); }
.authCheck.isInvalid .authCheckBox { border-color: var(--au-danger); box-shadow: 0 0 0 4px var(--au-danger-soft); }
.authCheck em { font-style: normal; color: var(--au-faint); }

/* Boutons */
.authPrimaryBtn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  padding: 13px 20px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--au-grad-from), var(--au-grad-to));
  color: #fff;
  font: inherit;
  font-size: 15.5px;
  font-weight: 650;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 1px 2px rgba(150, 60, 30, .25), 0 8px 22px -8px rgba(201, 100, 66, .65);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.authPrimaryBtn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s ease;
}
.authPrimaryBtn:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 2px 4px rgba(150, 60, 30, .25), 0 14px 28px -10px rgba(201, 100, 66, .75); }
.authPrimaryBtn:hover::after { transform: translateX(120%); }
.authPrimaryBtn:active { transform: translateY(0); }
.authPrimaryBtn:focus-visible { outline: none; box-shadow: var(--au-ring), 0 8px 22px -8px rgba(201, 100, 66, .65); }
.authArrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.authPrimaryBtn:hover .authArrow { transform: translateX(3px); }
.authPrimaryBtn.isLoading { pointer-events: none; filter: saturate(.85); }
.authPrimaryBtn.isLoading .authArrow { display: none; }
.authPrimaryBtn.isLoading::before { content: ""; width: 17px; height: 17px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: authSpin .7s linear infinite; }
@keyframes authSpin { to { transform: rotate(360deg); } }

.authSecondaryBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--au-line-strong);
  background: transparent;
  color: var(--au-text);
  font: inherit;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .15s;
}
.authSecondaryBtn:hover { background: var(--au-surface-2); border-color: var(--au-faint); }
.authSecondaryBtn:focus-visible { outline: none; box-shadow: var(--au-ring); }
.authSecondaryBtn:disabled { opacity: .55; cursor: not-allowed; }
.authBtnIcon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.authPasskeyStatus { min-height: 0; margin-top: 8px; font-size: 12.5px; line-height: 1.45; color: var(--au-muted); text-align: center; }
.authPasskeyStatus:empty { display: none; }
.authPasskeyStatus.ok { color: var(--au-ok); }
.authPasskeyStatus.error { color: var(--au-danger); }
.authPasskeyStatus.busy { color: var(--au-accent); }

/* Incitation à l'inscription */
.authCta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--au-accent-soft), transparent 90%);
  border: 1px solid color-mix(in srgb, var(--au-accent) 22%, var(--au-line));
}
.authCta div { display: grid; gap: 1px; min-width: 0; flex: 1; }
.authCta strong { font-size: 14px; font-weight: 650; color: var(--au-text); }
.authCta span { font-size: 12.5px; color: var(--au-muted); }
.authCta a {
  flex: none;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--au-text);
  color: var(--au-bg);
  font-size: 13.5px;
  font-weight: 650;
  text-decoration: none;
  transition: transform .15s, opacity .2s;
}
.authCta a:hover { transform: translateY(-1px); opacity: .9; }

.authSwitch { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--au-muted); }
.authSwitch a { display: inline-flex; align-items: center; gap: 6px; color: var(--au-accent); font-weight: 650; text-decoration: none; }
.authSwitch a:hover { text-decoration: underline; text-underline-offset: 3px; }
.authSwitch svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.authFinePrint { margin: 20px 0 0; font-size: 12px; line-height: 1.55; color: var(--au-faint); }
.authFinePrint--tight { margin-top: 10px; }
.authSecure { display: flex; gap: 8px; align-items: flex-start; padding-top: 18px; border-top: 1px solid var(--au-line); }
.authSecure svg { width: 14px; height: 14px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; }

/* Étapes (mot de passe oublié) */
.authStepper { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.authStep { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--au-faint); white-space: nowrap; }
.authStep b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--au-line-strong); font-size: 12px; transition: all .3s; }
.authStep b svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.authStep.isActive { color: var(--au-text); }
.authStep.isActive b { background: var(--au-accent); border-color: var(--au-accent); color: #fff; box-shadow: 0 0 0 4px var(--au-accent-soft); }
.authStep.isDone { color: var(--au-muted); }
.authStep.isDone b { background: var(--au-accent-soft); border-color: transparent; color: var(--au-accent); }
.authStep:not(.isActive) span { display: none; }
.authStepLine { flex: 1; height: 2px; border-radius: 2px; background: var(--au-line); }
.authStepLine.isDone { background: var(--au-accent); opacity: .5; }

.authDevCode { display: grid; gap: 4px; margin: 0 0 18px; padding: 14px 16px; border: 1.5px dashed #d58a00; border-radius: 13px; background: rgba(245, 180, 40, .1); color: #8a5a00; }
.authDevCode strong { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.authDevCode span { font-size: 24px; font-weight: 700; letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.authDevCode small { font-size: 11px; opacity: .8; }

.authFooter { text-align: center; font-size: 12px; color: var(--au-faint); padding-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .authPage { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .authPreview { display: none; }
}
@media (max-width: 880px) {
  .authPage { grid-template-columns: 1fr; }
  .authAside { display: none; }
  .authTopbar .authLogo { visibility: visible; }
  .authMain { padding: 16px 16px 20px; }
  .authMain::before {
    background:
      radial-gradient(420px 300px at 100% -10%, var(--au-glow-1), transparent 70%),
      radial-gradient(360px 280px at -10% 100%, var(--au-glow-2), transparent 70%);
  }
  .authCardWrap { justify-content: flex-start; padding: 22px 0 18px; }
}
@media (max-width: 520px) {
  .authCard { padding: 24px 20px 20px; border-radius: 20px; }
  .authHeading h1 { font-size: 26px; }
  .authCta { flex-direction: column; align-items: stretch; text-align: center; }
  .authCta a { text-align: center; }
  .authInput input { font-size: 16px; } /* évite le zoom automatique sur iOS */
}

@media (prefers-reduced-motion: reduce) {
  .authBody *, .authBody *::before, .authBody *::after { animation: none !important; transition: none !important; }
}
