/* ═══ Pages d'authentification V2 (templates/account/_auth.html) ═══
   Une page calme avant d'entrer : logo, titre, champs, une action principale.
   Mobile : pleine page. ≥ 600px : panneau bordé au centre, sur le fond du site. */
.auth-shell {
  background: var(--color-bg);
}

.main--auth-v2 {
  margin: 0;
  max-width: none;
  padding: 0;
}

.auth {
  align-items: center;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--ds-space-7) var(--space-5) calc(var(--space-5) + env(safe-area-inset-bottom));
}

.auth__panel {
  max-width: 400px;
  width: 100%;
}

.auth__brand {
  align-items: center;
  color: var(--color-text);
  display: inline-flex;
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-semibold);
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  text-decoration: none;
}




.auth__title {
  color: var(--color-text);
  font-size: var(--ds-font-size-title);
  font-weight: var(--ds-font-weight-semibold);
  letter-spacing: var(--ds-letter-spacing-title);
  line-height: var(--ds-line-height-heading);
  margin: 0 0 var(--space-2);
}

.auth__lead {
  color: var(--color-text-muted);
  font-size: var(--ds-font-size-md);
  line-height: var(--ds-line-height-prose);
  margin: 0 0 var(--space-6);
}

.auth__lead strong {
  color: var(--color-text);
}

.auth__alert {
  margin: 0 0 var(--space-4);
}

.auth__social {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.auth-social {
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text);
  display: flex;
  font-size: var(--ds-font-size-sm);
  font-weight: var(--ds-font-weight-semibold);
  gap: var(--space-2);
  justify-content: center;
  min-height: 48px;
  text-decoration: none;
  transition: background-color var(--ds-motion-fast);
}

.auth-social:hover {
  background: var(--color-surface-soft);
  color: var(--color-text);
}

.auth__divider {
  align-items: center;
  color: var(--color-text-subtle);
  display: flex;
  font-size: var(--ds-font-size-xs);
  gap: var(--space-3);
  margin: var(--space-6) 0;
}

.auth__divider::before,
.auth__divider::after {
  background: var(--color-border);
  content: "";
  flex: 1;
  height: 1px;
}

.auth__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.field__aside {
  color: var(--color-text-muted);
  font-size: var(--ds-font-size-xs);
  text-decoration: none;
}

.field__aside:hover {
  color: var(--color-accent);
}

.auth__submit {
  margin-top: var(--space-1);
}

.auth__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.auth__switch {
  color: var(--color-text-muted);
  font-size: var(--ds-font-size-sm);
  margin: var(--space-6) 0 0;
  text-align: center;
}

.auth__switch a {
  color: var(--color-accent);
  font-weight: var(--ds-font-weight-semibold);
  text-decoration: none;
}

.auth__note {
  color: var(--color-text-subtle);
  font-size: var(--ds-font-size-xs);
  line-height: var(--ds-line-height-prose);
  margin: var(--space-4) 0 0;
  text-align: center;
}

.auth__footer {
  color: var(--color-text-subtle);
  display: flex;
  flex-wrap: wrap;
  font-size: var(--ds-font-size-xs);
  gap: var(--space-2) var(--space-3);
  justify-content: center;
  margin-top: auto;
  padding-top: var(--space-8);
}

.auth__footer a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.auth__footer a:hover {
  color: var(--color-accent);
}

/* Redirection Google / Facebook */
.auth__spinner {
  animation: auth-spin 0.8s linear infinite; /* boucle de chargement : durée hors jetons assumée */
  border: 3px solid var(--color-border);
  border-radius: var(--radius-full);
  border-top-color: var(--color-accent);
  height: 36px;
  margin: var(--space-2) 0 var(--space-6);
  width: 36px;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .auth__spinner {
    animation-duration: 2s;
  }
}

@media (min-width: 600px) {
  .auth {
    justify-content: center;
    padding: var(--space-12) var(--space-6) var(--space-6);
  }

  .auth__panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--ds-radius-lg);
    margin-top: auto;
    max-width: 440px;
    padding: var(--space-8);
  }

  .auth__footer {
    padding-top: var(--ds-space-7);
  }
}

.auth__note a {
  color: var(--color-text-muted);
}

.auth__note a:hover {
  color: var(--color-accent);
}

/* App Android : Google natif caché tant que static/js/google-app.js n'a pas trouvé le plugin */
.auth__social[hidden],
.auth__divider[hidden] {
  display: none;
}

/* ── Porte d'entrée (Google en premier, imèl + kòd ensuite) : templates/components/auth/entry_buttons.html ── */
.auth-entry {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.auth-entry__google-wrap[hidden] {
  display: none;
}

.auth-entry__google-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.auth-entry__btn {
  gap: var(--space-3); /* la pastille G de Google et le libellé */
}

.auth-entry__g {
  align-items: center;
  background: #FFFFFF; /* exception nommée : pastille blanche exigée par la marque Google (contenu, hors système) */
  border-radius: var(--radius-full);
  display: flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

/* Kòd : un seul champ, en grand chiffre (chiffres à chasse fixe, ils ne dansent pas) */
.entry-code {
  font-size: var(--ds-font-size-2xl);
  font-variant-numeric: tabular-nums;
  font-weight: var(--ds-font-weight-semibold);
  height: auto;
  min-height: var(--ds-space-16);
  text-align: center;
}

.entry-resend {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.entry-resend .auth__note {
  margin: 0;
}

