/* =========================================================
   FLUX — authentification (connexion / inscription / reset)
   ========================================================= */

.auth-body {
  min-height: 100vh;
  background: var(--bg);
  overflow-x: hidden;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  min-height: 100vh;
}

/* ---------------- Panneau gauche ---------------- */
.auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding: 38px 48px 30px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(1000px 560px at 15% -10%, rgba(201, 247, 91, 0.09), transparent 62%),
    radial-gradient(800px 520px at 100% 100%, rgba(94, 234, 212, 0.055), transparent 60%),
    linear-gradient(160deg, #0b0e13 0%, #090b0f 55%, #07080b 100%);
}

.auth-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(720px 620px at 30% 34%, #000 25%, transparent 78%);
  pointer-events: none;
}

.auth-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.auth-glow-a { width: 320px; height: 320px; top: -120px; right: -60px; background: rgba(201, 247, 91, 0.10); }
.auth-glow-b { width: 300px; height: 300px; bottom: -140px; left: 8%; background: rgba(94, 234, 212, 0.07); }

.auth-brand,
.auth-mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  width: fit-content;
}

.auth-brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--accent-ink);
  background: linear-gradient(150deg, #dcff7d, var(--accent) 55%, #a8d938);
  box-shadow: 0 10px 30px -10px rgba(201, 247, 91, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.auth-brand-mark svg { width: 23px; height: 23px; }

.auth-brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.auth-brand-text strong {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.auth-brand-text small {
  margin-top: 4px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.34em;
  color: var(--dim);
}

.auth-hero { position: relative; z-index: 1; margin-top: auto; max-width: 560px; }

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.auth-eyebrow i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 247, 91, 0.12);
  animation: authPulse 2.8s ease-in-out infinite;
}
@keyframes authPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}

.auth-hero h1 {
  font-family: var(--display);
  font-size: clamp(34px, 3.5vw, 52px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.auth-hero h1 em {
  font-style: normal;
  color: var(--accent);
  text-shadow: 0 0 46px rgba(201, 247, 91, 0.22);
}

.auth-lead {
  margin-top: 18px;
  max-width: 460px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
}

.auth-points {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.auth-points li { display: flex; align-items: flex-start; gap: 12px; }
.auth-point-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--accent);
}
.auth-point-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.auth-points li > span:last-child { display: flex; flex-direction: column; gap: 2px; padding-top: 1px; }
.auth-points strong { font-size: 12.5px; font-weight: 600; }
.auth-points small { font-size: 11.5px; color: var(--dim); }

/* Aperçu dashboard */
.auth-preview {
  position: relative;
  z-index: 1;
  width: min(100%, 410px);
  margin-top: 6px;
  padding: 16px 17px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(220px 100px at 100% 0%, rgba(201, 247, 91, 0.10), transparent 70%),
    rgba(13, 16, 22, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.auth-preview-top { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.auth-preview-top > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.auth-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(201, 247, 91, 0.12); }
.auth-preview-pill {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(134, 239, 172, 0.10);
  color: var(--green);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}
.auth-preview-value {
  margin-top: 6px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.05;
}
.auth-preview-value small { font-size: 17px; color: var(--muted); }
.auth-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 54px;
  margin-top: 12px;
}
.auth-bars span {
  flex: 1;
  height: var(--h);
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, rgba(201, 247, 91, 0.85), rgba(201, 247, 91, 0.16));
  animation: authBarIn 900ms cubic-bezier(.2,.8,.2,1) both;
}
.auth-bars span:nth-child(2n) { background: linear-gradient(180deg, rgba(94, 234, 212, 0.55), rgba(94, 234, 212, 0.10)); }
@keyframes authBarIn { from { transform: scaleY(0.15); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
.auth-preview-foot { display: flex; justify-content: space-between; margin-top: 10px; font-size: 10px; color: var(--dim); }

.auth-aside-foot { position: relative; z-index: 1; margin-top: auto; font-size: 10px; color: #4c5361; letter-spacing: 0.02em; }

/* ---------------- Panneau droit ---------------- */
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background:
    radial-gradient(700px 420px at 100% 0%, rgba(201, 247, 91, 0.045), transparent 65%),
    var(--bg);
}
.auth-main-inner { width: 100%; max-width: 430px; display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
.auth-mobile-brand { display: none; }

.auth-card {
  position: relative;
  padding: 30px 30px 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(201, 247, 91, 0.045), transparent 70%),
    linear-gradient(180deg, rgba(20, 24, 32, 0.92), rgba(14, 17, 23, 0.96));
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(10px);
}

.auth-head { margin-bottom: 20px; }
.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px 9px;
  border: 1px solid rgba(201, 247, 91, 0.22);
  border-radius: 999px;
  background: rgba(201, 247, 91, 0.07);
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.auth-head h2 {
  font-family: var(--display);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.auth-head p { margin-top: 6px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }

/* Onglets */
.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin: 0 0 20px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
}
.auth-tab {
  position: relative;
  z-index: 1;
  padding: 8px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 180ms ease;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.is-active { color: var(--accent-ink); }
.auth-tab-glider {
  position: absolute;
  z-index: 0;
  top: 3px;
  left: 3px;
  width: calc(50% - 4px);
  height: calc(100% - 6px);
  border-radius: 8px;
  background: var(--accent);
  box-shadow: 0 6px 18px -8px rgba(201, 247, 91, 0.65);
  transition: transform 260ms cubic-bezier(.2,.8,.2,1);
}
.auth-tabs.is-signup .auth-tab-glider { transform: translateX(calc(100% + 2px)); }

/* Messages */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 16px;
  padding: 11px 12px;
  border: 1px solid rgba(251, 113, 133, 0.28);
  border-radius: 10px;
  background: rgba(251, 113, 133, 0.08);
  color: #ffc4ce;
  font-size: 12px;
  line-height: 1.5;
}
.auth-alert svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; fill: none; stroke: var(--red); stroke-width: 1.7; stroke-linecap: round; }
.auth-alert.is-info { border-color: rgba(94, 234, 212, 0.24); background: rgba(94, 234, 212, 0.07); color: #bdf7ee; }
.auth-alert.is-info svg { stroke: var(--cyan); }
.auth-alert.is-success { border-color: rgba(134, 239, 172, 0.26); background: rgba(134, 239, 172, 0.08); color: #cdf7da; }
.auth-alert.is-success svg { stroke: var(--green); }

.auth-success {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(134, 239, 172, 0.24);
  border-radius: 12px;
  background: rgba(134, 239, 172, 0.07);
}
.auth-success-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(134, 239, 172, 0.14);
}
.auth-success-icon svg { width: 15px; height: 15px; fill: none; stroke: var(--green); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.auth-success strong { display: block; font-size: 12.5px; }
.auth-success p { margin-top: 2px; font-size: 11.5px; line-height: 1.5; color: var(--muted); }

/* Champs */
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label { font-size: 11px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); }
.auth-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.auth-hint { font-size: 10.5px; color: var(--dim); }

.auth-input-wrap { position: relative; display: flex; align-items: center; }
.auth-input-icon {
  position: absolute;
  left: 13px;
  width: 16px; height: 16px;
  fill: none;
  stroke: var(--dim);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: stroke 180ms ease;
}
.auth-input {
  width: 100%;
  height: 46px;
  padding: 0 42px 0 39px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.26);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.auth-input::placeholder { color: #4f5664; }
.auth-input:hover { border-color: rgba(255, 255, 255, 0.19); }
.auth-input:focus {
  border-color: rgba(201, 247, 91, 0.55);
  background: rgba(0, 0, 0, 0.34);
  box-shadow: 0 0 0 3px rgba(201, 247, 91, 0.10);
}
.auth-input-wrap:focus-within .auth-input-icon { stroke: var(--accent); }

.auth-reveal {
  position: absolute;
  right: 7px;
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}
.auth-reveal:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.auth-reveal svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.auth-reveal.is-on { color: var(--accent); }

/* Bouton principal */
.auth-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #d6ff77, var(--accent) 60%, #b9e84d);
  color: var(--accent-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 14px 30px -14px rgba(201, 247, 91, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 18px 36px -14px rgba(201, 247, 91, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.auth-submit:active { transform: translateY(0); }
.auth-submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.auth-submit[disabled] { cursor: progress; filter: saturate(0.7) brightness(0.9); transform: none; }
.auth-submit-arrow { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 160ms ease; }
.auth-submit:hover .auth-submit-arrow { transform: translateX(2px); }

.auth-spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(16, 20, 8, 0.25);
  border-top-color: var(--accent-ink);
  border-radius: 50%;
  animation: authSpin 700ms linear infinite;
}
@keyframes authSpin { to { transform: rotate(360deg); } }

/* Liens */
.auth-text-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 160ms ease;
}
.auth-text-link:hover { color: var(--accent); }
.auth-strong { color: var(--accent); }
.auth-strong:hover { color: #e0ff8f; }

.auth-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 11px;
  color: var(--dim);
}
.auth-links-sep { width: 1px; height: 11px; margin: 0 3px; background: var(--line-strong); }
.auth-links-note { color: var(--dim); }
.auth-back { display: block; margin: 14px auto 0; font-size: 11.5px; }
.auth-links .auth-back { margin: 0; }

.auth-legal {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.65;
  color: #5b6371;
}

/* Vérification e-mail */
.auth-verify { display: flex; flex-direction: column; gap: 10px; }
.auth-verify p { font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.auth-verify p strong { color: var(--text); }
.auth-verify .auth-verify-hint { font-size: 11.5px; color: var(--dim); }
.auth-secondary {
  margin-top: 6px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}
.auth-secondary:hover { border-color: rgba(201, 247, 91, 0.4); background: rgba(201, 247, 91, 0.06); }

/* Non configuré */
.auth-setup { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.auth-setup-icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--amber);
}
.auth-setup-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.auth-setup h3 { font-size: 14px; font-weight: 600; }
.auth-setup p { font-size: 12px; line-height: 1.6; color: var(--muted); }
.auth-setup code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent);
}
.auth-submit-link { margin-top: 8px; }

.auth-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 10px;
  color: #4c5361;
}
.auth-foot-dot { width: 3px; height: 3px; border-radius: 50%; background: #3b414d; }

[hidden] { display: none !important; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1080px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); }
  .auth-aside { padding: 32px 34px 26px; }
  .auth-hero h1 { font-size: clamp(30px, 3.4vw, 42px); }
}

@media (max-width: 900px) {
  .auth-shell { display: block; min-height: 100vh; }
  .auth-aside { display: none; }
  .auth-main {
    min-height: 100vh;
    padding: 26px 20px 40px;
    background:
      radial-gradient(720px 420px at 50% -10%, rgba(201, 247, 91, 0.08), transparent 62%),
      radial-gradient(600px 380px at 100% 100%, rgba(94, 234, 212, 0.05), transparent 60%),
      var(--bg);
  }
  .auth-main-inner { max-width: 430px; }
  .auth-mobile-brand { display: inline-flex; margin: 4px auto 8px; }
  .auth-card { padding: 26px 22px 22px; border-radius: 18px; }
  .auth-foot { margin-top: 4px; }
}

@media (max-width: 420px) {
  .auth-main { padding: 18px 14px 30px; }
  .auth-card { padding: 22px 17px 18px; }
  .auth-head h2 { font-size: 24px; }
  .auth-tab { font-size: 11.5px; }
  .auth-links { font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-bars span, .auth-eyebrow i, .auth-spinner { animation: none; }
  .auth-tab-glider, .auth-submit, .auth-text-link, .auth-input { transition: none; }
}
