/* =========================================================
   Pages d'accès (connexion, code, mot de passe) — repris de Golfami v2.
   Tout est rangé sous .auth-grid pour ne pas déborder sur le reste de l'application.
   ========================================================= */

.auth-grid {
  /* Brand */
  --accent:        #14a44d;
  --accent-strong: #0c8a3e;
  --accent-soft:   #e4f6ea;

  /* Neutrals */
  --ink:      #10211a;
  --ink-2:    #41544b;
  --ink-3:    #6f8278;
  --line:     #e4e9e5;
  --bg:       #f4f6f3;
  --surface:  #ffffff;
  --surface-2:#fafbf9;

  /* Statuts */
  --st-red-bg:    #fdecec;  --st-red-ink:    #a31218;
  --st-green-bg:  #e3f6e8;  --st-green-ink:  #0c6b32;

  --radius-sm: 10px;

  /* Typographie */
  --font-disp: 'Archivo', sans-serif;
  --font:      'Hanken Grotesk', sans-serif;

  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  background: var(--bg);
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.auth-grid * { box-sizing: border-box; margin: 0; padding: 0; }
:where(.auth-grid) a { color: inherit; }

/* ── Panneau gauche (marque) ── */
.auth-brand { display: block; }

.auth-brand-inner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, #0e211a 0%, #123a26 55%, #0b8a3e 140%);
  color: #eaf3ee;
  padding: 46px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}

.auth-brand-deco {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .5;
  pointer-events: none;
}

.auth-brand-logo { position: relative; }

.auth-brand-body { position: relative; max-width: 340px; }

.auth-brand-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #9be15d;
  margin-bottom: 16px;
}

.auth-brand-h1 {
  font-family: var(--font-disp);
  font-size: 36px;
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #fff;
  margin-bottom: 14px;
}

.auth-brand-sub {
  font-size: 15.5px;
  line-height: 1.55;
  color: #bfe0cd;
}

.auth-brand-footer {
  position: relative;
  display: flex;
  gap: 18px;
  font-size: 13px;
  color: #9db8aa;
  font-weight: 600;
}

.auth-brand-sep { opacity: .4; }

/* ── Panneau droit (formulaire) ── */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-form-inner { width: 100%; max-width: 380px; }

.auth-mobilelogo { display: none; margin-bottom: 26px; }

.auth-form-title {
  font-family: var(--font-disp);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 6px;
  color: var(--ink);
}

.auth-form-sub {
  color: var(--ink-3);
  font-size: 15px;
  margin-bottom: 26px;
}

.auth-form-sub strong { color: var(--ink-2); }

/* ── Responsive ── */
@media (max-width: 820px) {
  .auth-grid             { grid-template-columns: 1fr; }
  .auth-brand            { display: none; }
  .auth-mobilelogo       { display: block; }
}

/* ── Boutons ── */
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 0 rgba(0,0,0,.04), 0 8px 18px -10px var(--accent);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s, background .15s, border-color .15s;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
}
.auth-btn:hover { background: var(--accent-strong); }
.auth-btn:active { transform: translateY(1px); }

.auth-btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--line);
  box-shadow: none;
}
.auth-btn-ghost:hover { background: var(--surface-2); }

/* ── Inputs ── */
.text-input {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.text-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.text-input-icon { padding-left: 40px; }

.input-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 13px;
  top: 13px;
  color: var(--ink-3);
  pointer-events: none;
}

/* ── Field ── */
.field { display: flex; flex-direction: column; }
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.fields-stack { display: flex; flex-direction: column; gap: 15px; margin-bottom: 18px; }

/* ── Alertes ── */
.alert-error {
  background: var(--st-red-bg);
  color: var(--st-red-ink);
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 16px;
}
.alert-ok {
  background: var(--st-green-bg);
  color: var(--st-green-ink);
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
}

/* ── Liens ── */
.forgot-wrap { text-align: right; margin: -6px 0 22px; }
.forgot-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent-strong);
  text-decoration: none;
}
.forgot-link:hover { text-decoration: underline; }

.link-accent {
  color: var(--accent-strong);
  font-weight: 600;
  font-size: inherit;
  font-family: var(--font);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
}
.link-accent:hover { text-decoration: underline; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: none;
  margin-bottom: 18px;
}
.back-link:hover { color: var(--ink-2); }

/* ── Sécurité note sous le bouton ── */
.auth-security-note {
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  color: var(--ink-3);
  font-size: 12.5px;
  margin-top: 18px;
}

/* ── Code à 6 chiffres ── */
.otp-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.otp-code {
  width: 100%;
  height: 58px;
  margin-bottom: 12px;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-disp);
  letter-spacing: .5em;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.otp-code:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Six cases à la place du champ unique, posées par CodeConnexion.razor.js. */
.otp-inputs {
  display: flex;
  gap: 9px;
  margin-bottom: 12px;
}

.otp-digit {
  width: 100%;
  min-width: 0;
  height: 58px;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-disp);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.otp-digit:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.otp-remember {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
}
.otp-remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.otp-resend-text {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 14px;
}
.otp-resend-ok { color: var(--st-green-ink); font-weight: 600; }
.otp-resend-wait { font-style: italic; }

.auth-confidentialite {
  margin-top: 28px;
  text-align: center;
}
.auth-confidentialite a {
  font-size: 12.5px;
  color: var(--ink-3);
  text-decoration: none;
}
.auth-confidentialite a:hover { color: var(--ink-2); }
