/* ═══ 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: 28px 20px calc(20px + 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: 1.25rem;
  font-weight: 720;
  gap: 8px;
  margin-bottom: 32px;
  text-decoration: none;
}

.auth__icon {
  align-items: center;
  background: var(--color-accent-soft);
  border-radius: var(--radius-full);
  color: var(--color-accent);
  display: flex;
  height: 56px;
  justify-content: center;
  margin-bottom: 18px;
  width: 56px;
}

.auth__icon .material-icons {
  font-size: 28px;
}

.auth__icon--danger {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.auth__title {
  color: var(--color-text);
  font-size: 1.625rem;
  font-weight: 720;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0 0 8px;
}

.auth__lead {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
  margin: 0 0 26px;
}

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

.auth__alert {
  align-items: flex-start;
  background: var(--color-danger-soft);
  border-radius: var(--radius-md);
  color: var(--color-text);
  display: flex;
  font-size: var(--text-sm);
  gap: 8px;
  line-height: 1.5;
  margin-bottom: 20px;
  padding: 12px 14px;
}

.auth__alert p {
  margin: 0;
}

.auth__alert .material-icons {
  color: var(--color-danger);
  font-size: 19px;
}

.auth__social {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.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: 0.9375rem;
  font-weight: 620;
  gap: 10px;
  justify-content: center;
  min-height: 48px;
  text-decoration: none;
  transition: background 0.15s ease;
}

.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(--text-xs);
  gap: 12px;
  margin: 22px 0;
}

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

.auth__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

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

.auth__submit {
  align-items: center;
  background: var(--color-accent);
  border: 0;
  border-radius: var(--radius-full);
  color: var(--color-on-accent);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 1rem;
  font-weight: 680;
  justify-content: center;
  margin-top: 4px;
  min-height: 50px;
  text-decoration: none;
  width: 100%;
}

.auth__submit:hover {
  color: var(--color-on-accent);
  filter: brightness(1.08);
}

.auth__submit:disabled {
  cursor: progress;
  opacity: 0.6;
}

.auth__submit--quiet {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.auth__submit--quiet:hover {
  background: var(--color-surface-soft);
  color: var(--color-text);
  filter: none;
}

.auth__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

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

.auth__note {
  color: var(--color-text-subtle);
  font-size: var(--text-xs);
  line-height: 1.55;
  margin: 18px 0 0;
  text-align: center;
}

.auth__footer {
  color: var(--color-text-subtle);
  display: flex;
  flex-wrap: wrap;
  font-size: var(--text-xs);
  gap: 6px 14px;
  justify-content: center;
  margin-top: auto;
  padding-top: 32px;
}

.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;
  border: 3px solid var(--color-border);
  border-radius: var(--radius-full);
  border-top-color: var(--color-accent);
  height: 36px;
  margin: 8px 0 22px;
  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: 48px 24px 24px;
  }

  .auth__panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    margin-top: auto;
    max-width: 440px;
    padding: 36px 36px 32px;
  }

  .auth__footer {
    padding-top: 28px;
  }
}

.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;
}
