/* kb-auth.css — connexion et Bien démarrer.
   Fichier de la famille « auth / onboarding » de la refonte « Ketchup moutarde ».
   Chargé après kb-base.css ; jetons uniquement, pas de couleurs écrites en dur.
   Les étapes d'onboarding sont dans onboarding.css. */

.kb-auth {
  display: flex; flex-direction: column; min-height: 100dvh; width: 100%; max-width: 480px; margin: 0 auto;
  padding: calc(40px + var(--safe-top, 0px)) var(--gutter) 0;
  background: var(--color-bg); color: var(--color-text);
}
.kb-auth--center { justify-content: center; padding-bottom: 40px; }
.kb-auth__form { flex: 1; display: flex; flex-direction: column; gap: 24px; }
.kb-auth__head { display: flex; flex-direction: column; gap: 14px; }
.kb-auth__brand { display: flex; align-items: center; gap: 12px; }
.kb-auth__logo { display: block; width: 56px; height: 56px; border-radius: 18px; }
.kb-auth__title { margin: 0; font: 600 32px/38px var(--font-display); letter-spacing: -.025em; color: var(--color-text); text-wrap: pretty; }
.kb-auth__lead { margin: 0; font-size: 17px; line-height: 24px; color: var(--color-muted); text-wrap: pretty; }
.kb-auth__lead strong { color: var(--color-text); font-weight: 600; overflow-wrap: anywhere; }

.kb-auth__google {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 20px;
  border: 1px solid var(--color-border); border-radius: var(--radius-btn); background: var(--color-surface);
  color: var(--color-text); font: 600 15px/20px var(--font-body); cursor: pointer;
}
.kb-auth__google:active:not(:disabled) { background: var(--color-surface-2); }
/* Apple impose un bouton noir (ou blanc en thème sombre) avec son logo. */
.kb-auth__apple { background: #000; border-color: #000; color: #fff; }
.kb-auth__apple:active:not(:disabled) { background: #1d1d1f; }
:root[data-theme="dark"] .kb-auth__apple { background: #fff; border-color: #fff; color: #000; }
:root[data-theme="dark"] .kb-auth__apple:active:not(:disabled) { background: #e8e8ed; }
.kb-auth__apple + .kb-auth__google { margin-top: -14px; }
.kb-auth__or { display: flex; align-items: center; gap: 12px; margin: -8px 0; color: var(--color-subtle); font-size: 13px; }
.kb-auth__or::before, .kb-auth__or::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }
.kb-auth__modes > button { padding: 0 6px; }

.kb-auth__fields { display: flex; flex-direction: column; gap: 12px; }
.kb-auth__fields input { min-height: 52px; font-size: 17px; }
.kb-auth__hint { margin: 0; font-size: 13px; line-height: 18px; color: var(--color-muted); }

.kb-auth__foot {
  position: sticky; bottom: 0; display: flex; flex-direction: column; gap: 4px; margin-top: auto;
  padding: 16px 0 calc(16px + var(--safe-bottom, 0px)); background: var(--color-bg);
}
.kb-auth__link {
  min-height: 44px; border: 0; background: none; padding: 0 12px;
  color: var(--color-primary); font: 600 15px/20px var(--font-body); cursor: pointer;
}
.kb-auth__privacy { margin: 4px 0 0; text-align: center; font-size: 11px; line-height: 15px; color: var(--color-subtle); }

/* Écran d'accueil (avant connexion) : emplacement visuel neutre + logo de l'app. */
.kb-auth--accueil { padding-top: calc(24px + var(--safe-top, 0px)); gap: 28px; }
.kb-auth__hero {
  flex: 1 1 auto; min-height: 220px; max-height: 400px; display: grid; place-items: center;
  border-radius: var(--radius-card); background: var(--color-surface-2);
}
.kb-auth__hero img { width: 45%; max-width: 160px; height: auto; border-radius: 36px; }
.kb-auth__wordmark { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.kb-auth__dot { width: 24px; height: 24px; border-radius: 7px; background: var(--color-primary); }
.kb-auth--accueil .kb-auth__head { gap: 12px; }
.kb-auth--accueil .kb-auth__foot { margin-top: 0; }

/* Lien envoyé. */
.kb-auth__sent { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding-bottom: 80px; }
.kb-auth__sent-ic { width: 72px; height: 72px; border-radius: 999px; display: grid; place-items: center; background: var(--color-primary-soft); color: var(--color-primary); }

/* Configuration absente. */
.kb-auth__panel { display: flex; flex-direction: column; gap: 14px; }
.kb-auth__panel .btn { margin-top: 12px; }

@media (max-width: 360px) {
  .kb-auth__title { font-size: 28px; line-height: 34px; }
  .kb-auth__modes > button { font-size: 12px; padding: 0 4px; }
}
