/* ============================================================
   CRM CAFA Formations — Écran Connexion (login plein écran)
   Styles spécifiques .cafa-login__* (spec 10-login §3).
   Les tokens (--primary, --danger, etc.) viennent de tokens.css ;
   les primitives .field/.input/.btn viennent de components.css.
   ============================================================ */

html, body { height: 100%; }

.cafa-login {
  display: flex;
  width: 100%;
  min-height: 100vh;
  background: var(--surface);
  color: var(--text);
}

/* ---- Panneau bleu signature (hero) ---- */
.cafa-login__hero {
  flex: 1.05;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  color: #fff;
  background: linear-gradient(150deg, #2403d6 0%, #1F00C9 50%, #16008f 100%);
}

.cafa-login__hero-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.cafa-login__hero-ring--1 { top: -120px; right: -120px; width: 420px; height: 420px; border: 1px solid rgba(255, 255, 255, .12); }
.cafa-login__hero-ring--2 { top: -60px;  right: -60px;  width: 300px; height: 300px; border: 1px solid rgba(255, 255, 255, .10); }
.cafa-login__hero-ring--3 { bottom: -100px; left: -80px; width: 360px; height: 360px; background: rgba(255, 255, 255, .04); }

.cafa-login__brand {
  display: flex;
  align-items: center;
  gap: 13px;
  position: relative;
}
.cafa-login__logo {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cafa-blue);
}
.cafa-login__wordmark { line-height: 1.1; }
.cafa-login__wordmark-main { font-weight: 800; font-size: 22px; letter-spacing: .02em; }
.cafa-login__wordmark-sub  { font-weight: 600; font-size: 11.5px; color: rgba(255, 255, 255, .75); letter-spacing: .2em; }

.cafa-login__baseline { position: relative; max-width: 420px; }
.cafa-login__title { font-size: 34px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; color: #fff; }
.cafa-login__lede  { font-size: 15.5px; color: rgba(255, 255, 255, .82); margin-top: 16px; line-height: 1.55; }

.cafa-login__hero-foot { position: relative; font-size: 12.5px; color: rgba(255, 255, 255, .6); }

/* ---- Panneau formulaire ---- */
.cafa-login__panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.cafa-login__form { width: 100%; max-width: 380px; }
.cafa-login__heading { font-size: 24px; font-weight: 700; }
.cafa-login__sub { margin-top: 6px; margin-bottom: 26px; font-size: 14px; }

/* Bandeau d'erreur serveur / saisie */
.cafa-login__error {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  margin-bottom: 16px;
  border-radius: 9px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}
.cafa-login__error .ic { width: 16px; height: 16px; flex: none; }

/* Champs */
.cafa-login__field-email { margin-bottom: 16px; }
.cafa-login__field-pwd   { margin-bottom: 14px; }
.cafa-login__field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cafa-login__forgot { font-size: 12.5px; font-weight: 600; color: var(--primary); text-decoration: none; }
.cafa-login__forgot:hover { text-decoration: underline; }

/* Case « se souvenir de moi » */
.cafa-login__remember {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.cafa-login__remember input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }

/* Bouton submit pleine largeur (override hauteur par défaut 38px) */
.cafa-login__submit { width: 100%; height: 44px; font-size: 13.5px; }
.cafa-login__submit .ic { width: 16px; height: 16px; }
.cafa-login__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 99px;
  animation: cafa-spin .7s linear infinite;
}

.cafa-login__notice { font-size: 12px; text-align: center; margin-top: 22px; }

/* ---- Responsive : sous 768px on masque le hero bleu ---- */
@media (max-width: 768px) {
  .cafa-login__hero { display: none; }
  .cafa-login__panel { flex: 1; padding: 24px; }
}
