/* ═══════════════════════════════════════════════════════════════════════
   GoMySeo — Pages d'authentification (login, register, forgot, reset, verify)
   Même direction artistique que la landing index2 : fond blanc, particules
   orange derrière, en-tête identique, carte centrée. Les couleurs, rayons,
   ombres et police viennent de assets/css/chat-ds.css (thème clair forcé).
   ═══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.auth-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: #FFFFFF;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
}
.auth-main a { color: var(--accent-hover); }
.auth-body a:focus-visible,
.auth-body button:focus-visible,
.auth-body input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.au-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.auth-body svg { flex-shrink: 0; }

/* ── En-tête : copie de la landing ─────────────────────────────────────── */
.lp-container { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.lp-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 64px; display: flex; align-items: center; background: transparent; }
.lp-header .lp-container { display: flex; align-items: center; gap: 24px; }
.lp-logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text-primary); font-weight: 700; font-size: 16px; letter-spacing: -0.3px; }
.lp-logo img { height: 26px; width: auto; display: block; }
.lp-logo-text em { font-style: normal; color: var(--accent); }
.lp-header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lp-login { padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--text-secondary); text-decoration: none; border-radius: var(--radius); }
.lp-login:hover { color: var(--text-primary); background: var(--bg-hover); }
.btn-cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; background: var(--accent); color: #FFFFFF; font-size: 14px; font-weight: 600; text-decoration: none; border: 0; cursor: pointer; transition: background 0.15s ease, transform 0.15s ease; white-space: nowrap; }
.btn-cta:hover { background: var(--accent-hover); color: #FFFFFF; }
.btn-cta:active { transform: scale(0.98); }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-card); flex-shrink: 0; }
.lang-switch-opt { display: inline-flex; align-items: center; height: 100%; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1; color: var(--text-secondary); text-decoration: none; white-space: nowrap; transition: color 0.12s, background 0.12s; }
.lang-switch-opt:hover { color: var(--text-primary); }
.lang-switch-opt.active { color: var(--text-primary); background: var(--bg-hover); box-shadow: 0 1px 2px rgba(17,24,39,0.06); }

/* ── Scène : particules + carte centrée ────────────────────────────────── */
.auth-stage { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 104px 16px 40px; overflow: hidden; }
.auth-canvas { position: absolute; left: -15%; top: -18%; width: 130%; height: 136%; display: block; z-index: 0; pointer-events: none; }
.auth-veil { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 40% 46% at 50% 52%, rgba(255,255,255,0.86) 0%, rgba(255,255,255,0.45) 55%, rgba(255,255,255,0) 100%); }
.auth-main { position: relative; z-index: 2; width: 100%; display: flex; justify-content: center; }
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(17,24,39,0.05), 0 18px 50px rgba(17,24,39,0.09);
  padding: 34px 36px 30px;
  animation: au-in 0.7s cubic-bezier(0.22, 0.8, 0.24, 1) both;
}
.auth-card.is-wide { max-width: 500px; }
@keyframes au-in { from { opacity: 0; transform: translateY(14px) scale(0.985); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@media (prefers-reduced-motion: reduce) { .auth-card { animation: none; } }

/* ── Titres ────────────────────────────────────────────────────────────── */
.au-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.au-eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.au-title { margin: 0; font-size: 27px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; color: var(--text-primary); text-wrap: balance; }
.au-title.is-hero { text-align: center; font-size: 32px; font-weight: 800; letter-spacing: -0.03em; }
.au-sub { margin: 8px 0 22px; font-size: 14.5px; line-height: 1.55; color: var(--text-secondary); }
.au-sub.is-hero { text-align: center; }
.au-sub strong { color: var(--text-primary); font-weight: 600; }
.au-sub.is-tight { margin-bottom: 12px; }

/* ── Alertes ───────────────────────────────────────────────────────────── */
.af-alert { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; margin: 0 0 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-primary); font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
.af-alert svg { width: 18px; height: 18px; margin-top: 1px; }
.af-alert a { font-weight: 600; }
.af-alert.is-error { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.af-alert.is-error svg { color: var(--danger); }
.af-alert.is-success { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }
.af-alert.is-success svg { color: var(--success); }
.af-alert.is-info { background: var(--accent-subtle); border-color: rgba(234,88,12,0.25); color: var(--accent-hover); }
.af-alert.is-info svg { color: var(--accent); }

/* ── Google + séparateur ───────────────────────────────────────────────── */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 46px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); color: var(--text-primary); font-size: 14.5px; font-weight: 500; text-decoration: none; transition: background 0.12s, border-color 0.12s, box-shadow 0.12s; }
.btn-google:hover { background: var(--bg-primary); border-color: var(--border-strong); color: var(--text-primary); }
.btn-google svg { width: 18px; height: 18px; }
.af-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: 12px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.af-divider::before, .af-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Champs ────────────────────────────────────────────────────────────── */
.af-field { margin-bottom: 15px; }
.af-label { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 500; color: var(--text-primary); }
.af-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.af-label-row .af-label { margin-bottom: 6px; }
.af-link { font-size: 13px; font-weight: 500; color: var(--accent-hover); text-decoration: none; }
.af-link:hover { text-decoration: underline; }
.af-input-wrap { position: relative; }
.af-input {
  width: 100%; height: 46px; padding: 0 13px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-card); color: var(--text-primary);
  font: inherit; font-size: 15px; line-height: 1;
  transition: border-color 0.12s, box-shadow 0.12s;
  appearance: none;
}
.af-input.has-btn { padding-right: 46px; }
.af-input::placeholder { color: var(--text-faint); }
.af-input:hover { border-color: var(--border-strong); }
.af-input:focus, .af-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.af-field.is-valid .af-input { border-color: var(--success-border); }
.af-field.is-invalid .af-input { border-color: var(--danger); }
.af-field.is-invalid .af-input:focus { box-shadow: 0 0 0 3px var(--danger-bg); }
.af-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 34px; height: 34px; border: none; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.af-eye:hover { background: var(--bg-hover); color: var(--text-primary); }
.af-eye svg { width: 18px; height: 18px; }
.af-eye .ic-off { display: none; }
.af-eye.is-on .ic-on { display: none; }
.af-eye.is-on .ic-off { display: block; }
.af-msg { display: none; align-items: flex-start; gap: 6px; margin-top: 6px; font-size: 12.5px; line-height: 1.4; color: var(--danger); }
.af-msg svg { width: 14px; height: 14px; margin-top: 2px; }
.af-field.is-invalid .af-msg { display: flex; }
.af-help { margin: 8px 0 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }

/* ── Robustesse du mot de passe ────────────────────────────────────────── */
.af-strength { margin-top: 10px; }
.af-bars { display: flex; gap: 5px; margin-bottom: 8px; }
.af-bars i { flex: 1; height: 4px; border-radius: 2px; background: var(--bg-inset); transition: background 0.2s; }
.af-strength[data-level="1"] i:nth-child(-n+1) { background: var(--danger); }
.af-strength[data-level="2"] i:nth-child(-n+2) { background: var(--warning); }
.af-strength[data-level="3"] i:nth-child(-n+3) { background: var(--success); }
.af-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.af-rules li { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-muted); }
.af-rules li svg { width: 13px; height: 13px; color: var(--text-faint); }
.af-rules li.ok { color: var(--success); }
.af-rules li.ok svg { color: var(--success); }

/* ── Cases à cocher ────────────────────────────────────────────────────── */
.af-check { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; cursor: pointer; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
.af-check.is-inline { margin: 2px 0 18px; align-items: center; }
.af-check input { appearance: none; width: 18px; height: 18px; margin: 1px 0 0; flex-shrink: 0; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-card); cursor: pointer; position: relative; transition: background 0.12s, border-color 0.12s; }
.af-check.is-inline input { margin: 0; }
.af-check input::before { content: ''; position: absolute; left: 4px; top: 1px; width: 6px; height: 10px; border: solid #FFFFFF; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform 0.12s; }
.af-check input:checked { background: var(--accent); border-color: var(--accent); }
.af-check input:checked::before { transform: rotate(45deg) scale(1); }
.af-check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.af-check.is-invalid input { border-color: var(--danger); }
.af-check span a { color: var(--accent-hover); text-decoration: none; font-weight: 500; }
.af-check span a:hover { text-decoration: underline; }
.af-check small { display: block; margin-top: 2px; font-size: 12px; color: var(--text-muted); }

/* ── Bouton principal ──────────────────────────────────────────────────── */
.btn-auth {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 46px; margin-top: 6px; padding: 0 18px;
  border: none; border-radius: var(--radius);
  background: var(--accent); color: #FFFFFF;
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none;
  cursor: pointer; position: relative;
  transition: background 0.15s, transform 0.1s;
}
.btn-auth:hover { background: var(--accent-hover); color: #FFFFFF; }
.btn-auth:active { transform: translateY(1px); }
.btn-auth[disabled] { opacity: 0.6; cursor: default; }
.btn-auth svg { width: 18px; height: 18px; }
.btn-auth .au-arrow { transition: transform 0.15s; }
.btn-auth:hover .au-arrow { transform: translateX(3px); }
.btn-auth.is-ghost { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }
.btn-auth.is-ghost:hover { background: var(--bg-primary); }
.au-spin { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.45); border-top-color: #FFFFFF; border-radius: 50%; animation: au-spin 0.7s linear infinite; }
.is-ghost .au-spin { border-color: var(--border-strong); border-top-color: var(--text-primary); }
.btn-auth.is-loading { pointer-events: none; }
.btn-auth.is-loading .au-spin { display: block; }
.btn-auth.is-loading .au-arrow { display: none; }
@keyframes au-spin { to { transform: rotate(360deg); } }

/* ── Liens sous le formulaire ──────────────────────────────────────────── */
.au-switch { margin: 20px 0 0; text-align: center; font-size: 13.5px; color: var(--text-secondary); }
.au-switch a { color: var(--accent-hover); font-weight: 600; text-decoration: none; }
.au-switch a:hover { text-decoration: underline; }
.au-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 500 !important; }
.au-back svg { width: 15px; height: 15px; transition: transform 0.15s; }
.au-back:hover svg { transform: translateX(-3px); }
.au-resend { margin: 14px 0 0; text-align: center; font-size: 13.5px; color: var(--text-secondary); }
.au-resend + .au-resend { margin-top: 8px; }
.au-resend a { color: var(--accent-hover); font-weight: 600; text-decoration: none; }
.au-resend a:hover { text-decoration: underline; }
.au-resend a.is-wait { color: var(--text-muted); pointer-events: none; font-weight: 500; }

/* ── États pleine carte (email envoyé, lien invalide, succès) ──────────── */
.au-state { text-align: center; }
.au-state .au-eyebrow { justify-content: center; }
.au-state .au-title { font-size: 24px; }
.au-state .au-sub { margin-top: 10px; }
.au-state-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 14px; background: var(--success-bg); color: var(--success); display: flex; align-items: center; justify-content: center; }
.au-state-icon svg { width: 26px; height: 26px; }
.au-state-icon.is-accent { background: var(--accent-subtle); color: var(--accent); }
.au-state-icon.is-danger { background: var(--danger-bg); color: var(--danger); }
.au-chip { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-primary); font-size: 13.5px; font-weight: 500; color: var(--text-primary); }
.au-chip svg { width: 15px; height: 15px; color: var(--accent); }
.au-steps { margin: 4px 0 22px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-primary); text-align: left; }
.au-steps p { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
.au-steps p + p { margin-top: 8px; }
.au-steps svg { width: 16px; height: 16px; margin-top: 2px; color: var(--accent); }
.au-steps strong { color: var(--text-primary); font-weight: 600; }

/* ── Code de vérification (6 cases) ────────────────────────────────────── */
.otp-label { text-align: center; margin-bottom: 10px; }
.otp { display: flex; justify-content: center; gap: 8px; margin-bottom: 6px; }
.otp input { width: 46px; height: 54px; padding: 0; text-align: center; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; transition: border-color 0.12s, box-shadow 0.12s; appearance: textfield; }
.otp input::-webkit-inner-spin-button, .otp input::-webkit-outer-spin-button { -webkit-appearance: none; }
.otp input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.otp input.is-filled { border-color: var(--border-strong); background: var(--bg-primary); }
.otp.is-error input { border-color: var(--danger); }
.otp-help { text-align: center; margin-bottom: 14px; }
.otp-fallback .af-input { text-align: center; letter-spacing: 0.3em; font-weight: 600; }

/* ── Pied de page ──────────────────────────────────────────────────────── */
.auth-foot { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; margin-top: 28px; font-size: 12.5px; color: var(--text-muted); }
.auth-foot a { color: var(--text-muted); text-decoration: none; }
.auth-foot a:hover { color: var(--text-primary); }
.auth-foot .au-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-faint); }

/* ── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .lp-header { height: 56px; }
  .lp-container { width: calc(100% - 32px); }
  .lp-header .lp-login { display: none; }
  .lp-logo-text { display: none; }
  .lang-switch { height: 32px; }
  .lang-switch-opt { padding: 0 8px; }
  .lp-header-actions { gap: 6px; }
  .btn-cta { height: 34px; padding: 0 12px; font-size: 13px; }
  .auth-stage { padding: 80px 14px 28px; }
  .auth-card, .auth-card.is-wide { max-width: 100%; padding: 26px 20px 24px; border-radius: 10px; }
  .au-title { font-size: 23px; }
  .au-title.is-hero { font-size: 27px; }
  .otp { gap: 6px; }
  .otp input { width: 42px; height: 50px; font-size: 20px; }
  .auth-foot { margin-top: 22px; }
}
