/* Kalexex — Styles de base du parcours « Connexion / Inscription »
   (markup et logique : js/auth-widget.js).

   Ces règles doivent tenir sur n'importe quel fond sombre du site : la carte de
   /auth comme le bloc doré de /unsubscribe. Une page qui veut autre chose
   surcharge ces classes chez elle — c'est prévu, et c'est tout l'intérêt d'avoir
   sorti le parcours de /auth : un seul comportement, plusieurs habillages. */

.authw { display: flex; flex-direction: column; gap: 8px; }

.authw-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  position: relative; width: 100%; padding: 12px;
  border-radius: 10px; border: 1px solid rgba(255, 247, 232, .10);
  background: rgba(10, 5, 6, .55); color: #fff;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .2s, border-color .2s;
}
.authw-btn:hover { background: rgba(10, 5, 6, .78); border-color: rgba(212, 165, 116, .42); }
.authw-email-toggle { background: rgba(255, 247, 232, .05); border-color: rgba(212, 165, 116, .30); }

.authw-chevron {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%); transition: transform .25s ease;
}
.authw-email-toggle[aria-expanded="true"] .authw-chevron { transform: translateY(-50%) rotate(180deg); }

/* Ouverture animée sans mesurer de hauteur (0fr → 1fr) : rien à recalculer si le
   contenu change, et `visibility` retire le formulaire replié du parcours clavier. */
.authw-drawer {
  display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden;
  transition: grid-template-rows .28s ease, opacity .2s ease, visibility 0s linear .28s;
}
.authw-drawer.is-open {
  grid-template-rows: 1fr; opacity: 1; visibility: visible;
  transition: grid-template-rows .28s ease, opacity .2s ease, visibility 0s;
}
.authw-drawer-inner { overflow: hidden; min-height: 0; }

.authw-hint {
  font-size: 12px; color: var(--text-dim); line-height: 1.45;
  text-align: center; margin: 10px 0;
}

.authw-form { display: flex; flex-direction: column; gap: 8px; }
.authw-input {
  width: 100%; box-sizing: border-box;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 247, 232, .16);
  border-radius: 9px; color: var(--text); font: inherit; font-size: 16px; padding: 11px 12px;
}
.authw-input::placeholder { color: rgba(255, 247, 232, .32); }
.authw-input:focus { outline: none; border-color: rgba(212, 165, 116, .55); background: rgba(255, 255, 255, .07); }

.authw-pw { position: relative; }
.authw-pw .authw-input { padding-right: 42px; }
.authw-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; font-size: 15px; opacity: .5; color: var(--text-dim);
}

.authw-cta {
  display: block; width: 100%; text-align: center;
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 52%, #b8804f);
  color: #190a0d; font: inherit; font-weight: 750; font-size: 15px;
  padding: 13px 18px; border: 0; border-radius: 10px; text-decoration: none; cursor: pointer;
  box-shadow: 0 8px 24px rgba(212, 165, 116, .24);
  transition: filter .2s, transform .2s;
}
.authw-cta:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.authw-cta:disabled { opacity: .6; cursor: default; }

.authw-known {
  padding: 12px 14px; margin-bottom: 6px;
  background: rgba(212, 165, 116, .08); border: 1px solid rgba(212, 165, 116, .35);
  border-radius: 9px; font-size: 13px; line-height: 1.55; text-align: center; color: var(--text);
}
.authw-known a { color: var(--gold); font-weight: 600; text-decoration: underline; }

.authw-error {
  margin-top: 10px; padding: 9px 11px; border-radius: 8px;
  font-size: 12.5px; line-height: 1.45; color: #f0a9a0;
  background: rgba(231, 76, 60, .10); border: 1px solid rgba(231, 76, 60, .35);
}
.authw-error a { color: var(--gold); font-weight: 600; }

.authw-forgot {
  display: block; text-align: center; margin-top: 11px;
  color: var(--text-dim); font-size: 12px; text-decoration: none;
}
.authw-forgot:hover { text-decoration: underline; }

.authw-btn:focus-visible,
.authw-cta:focus-visible,
.authw-input:focus-visible,
.authw-forgot:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .authw-btn, .authw-cta, .authw-drawer, .authw-chevron { transition: none; }
  .authw-cta:hover { transform: none; }
}
