/* ============================================================
   A01 — Connexion · DA « Le Carnet »
   Gabarit deux volets partagé avec l'inscription (A02), qui
   importe ce fichier. Aucune couleur en dur : tokens.css seul.
   ============================================================ */

/* La page d'auth n'affiche pas le pied de page applicatif. */
body > .app-footer { display: none; }

.auth-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 45% 1fr;
}

/* ---- Volet gauche : la couverture du carnet (bleu encre) ---- */
.auth-aside {
  background: var(--accent);
  color: var(--accent-fg);
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}

.auth-aside__brand { display: flex; align-items: center; gap: 12px; }
.auth-aside__logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-weight: 600; font-size: 11px; letter-spacing: 0.04em;
}
.auth-aside__brand-name { font-weight: 600; font-size: 14px; }

.auth-aside__title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 26px;
  max-width: 16ch;
}

.auth-aside__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth-aside__list li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 15px; line-height: 1.5;
}
.auth-aside__list svg { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; }

/* ---- Souche décorative (carte détachable du carnet) ---- */
.souche {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-4);
  padding: 16px 18px;
  box-shadow: var(--shadow-3);
  max-width: 360px;
}
.souche__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.souche__label {
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3);
}
.souche__montant { font-size: 21px; font-weight: 600; }
.souche .perforation { margin: 14px 0; }
.souche .perforation::before,
.souche .perforation::after { background: var(--surface); }

/* ---- Volet droit : le papier ---- */
.auth-main {
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 32px;
}
.auth-card { width: 100%; max-width: 420px; }

.auth-eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 8px;
}
.auth-eyebrow::before {
  content: ""; width: 16px; height: 3px; border-radius: 2px;
  background: var(--numero); flex-shrink: 0;
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 700; line-height: 1.2;
  margin: 0 0 10px;
  color: var(--text);
}
.auth-lede { font-size: 15px; color: var(--text-2); margin: 0 0 26px; max-width: 46ch; }

/* ---- Messages ---- */
.auth-alert {
  margin: 0 0 18px;
  padding: 11px 14px;
  border-radius: var(--r-3);
  border: 1px solid transparent;
  font-size: 14px; line-height: 1.5;
}
.auth-alert--error   { background: var(--danger-soft); color: var(--danger-text); border-color: var(--danger); }
.auth-alert--success { background: var(--ok-soft);     color: var(--ok-text);     border-color: var(--ok); }

/* ---- Formulaire ---- */
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.auth-form .field-group { display: flex; flex-direction: column; }
.auth-form .field-label { font-size: 14px; color: var(--text); font-weight: 500; }
.auth-form .field { height: 44px; font-size: 15px; }
.auth-form .field-hint { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.auth-form .field-error { font-size: 13px; margin-top: 6px; }

.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.field-head .field-label { margin-bottom: 6px; }

.link-inline {
  font-size: 13px; font-weight: 500;
  color: var(--accent-text);
  text-decoration: underline;
  border-radius: var(--r-1);
}
.link-inline:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.password-wrap { position: relative; }
.password-wrap .field { padding-right: 48px; }
.toggle-password {
  position: absolute; top: 0; right: 0;
  height: 44px; width: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0;
  color: var(--text-3); cursor: pointer;
  border-radius: 0 var(--r-2) var(--r-2) 0;
}
.toggle-password:hover { color: var(--text); }
.toggle-password:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.toggle-password svg { width: 18px; height: 18px; }
.toggle-password .icon-hide { display: none; }
.toggle-password[aria-pressed="true"] .icon-show { display: none; }
.toggle-password[aria-pressed="true"] .icon-hide { display: inline; }

.auth-submit { width: 100%; height: 44px; margin-top: 2px; font-size: 15px; }
.auth-submit:hover { box-shadow: var(--shadow-brand); }

.auth-foot {
  text-align: center; font-size: 14px; color: var(--text-2);
  margin-top: 24px;
}
.auth-foot a {
  color: var(--accent-text); font-weight: 500;
  text-decoration: underline; border-radius: var(--r-1);
}
.auth-foot a:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ---- Responsive : le volet visuel se replie en bandeau ---- */
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-height: 100dvh; }
  .auth-aside {
    padding: 18px 22px;
    flex-direction: row; align-items: center; justify-content: space-between;
    gap: 16px;
  }
  .auth-aside__body,
  .auth-aside .souche { display: none; }
  .auth-main { padding: 32px 20px 48px; align-items: flex-start; }
}

@media (max-width: 768px) {
  .auth-card h1 { font-size: 24px; }
}

/* Sur téléphone, l'explication sous un champ doit rester lisible : c'est elle
   qui dit pourquoi on demande cette information (nœud C5). */
@media (max-width: 640px) {
  .auth-form .field-hint { font-size: 15px; line-height: 1.45; }
}
