/* ============================================================================
   Page stylesheet — auth_base.html (F276 lot 2): the Veyrah sign-in layout
   shared by login.html and setup_password.html.
   F346 (lot 3 · F-23): direction A of the L-Connexion / L-Invitation boards
   (canevas-lot3) — Spectral italic baseline with « fait. » in emerald 500 and
   its double rule (décision D4), Microsoft first, hollow 44 px fields, 6 px
   corners, « Langue : FR · EN » as pressed / unpressed buttons.
   Charte (TOKENS.css v1.1, décisions 2 et 10): the CTA, links and focus ring
   are emerald 700 ink; emerald 500 only carries the mark (the « Y », « fait. »
   and its rule, the ghost letter, decorative washes on charbon). No infinite
   animation; entries stay under --duree-longue and are cut under
   prefers-reduced-motion.
   Plain CSS, NOT built by Tailwind (no theme(), no @apply): colours read the
   --focus-* tokens of the :root in app/static/src/input.css. The few literal
   rgba() values are translucent washes of the charbon / emerald-500 / white
   of the charte — decorative, they carry no text and no meaning.
   Linked once, by auth_base.html in {% block head_extra %} (after the dist).
   ============================================================================ */

.auth-shell {
  display: grid;
  grid-template-columns: minmax(420px, 46%) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--focus-surface);
  color: var(--focus-text);
}

/* ---------- brand panel (left, charbon) ---------- */
.auth-brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: 56px 64px;
  color: var(--focus-surface);
  background:
    radial-gradient(110% 70% at 85% -10%, rgba(16, 185, 129, .16), transparent 55%),
    radial-gradient(80% 60% at -10% 110%, rgba(16, 185, 129, .08), transparent 60%),
    var(--focus-secondary);
}
/* discreet dot grid */
.auth-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(250, 250, 248, .05) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}
/* huge ghost « Y » — the brand signature in the background */
.auth-ghost-y {
  position: absolute;
  right: -150px;
  bottom: -170px;
  font-size: 560px;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(16, 185, 129, .22);
  user-select: none;
  pointer-events: none;
  animation: auth-ghost-in var(--duree-longue) var(--courbe) both;
}
.auth-brand-top,
.auth-brand-middle,
.auth-brand-bottom { position: relative; z-index: 1; }

.auth-lockup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  animation: auth-rise var(--duree-longue) var(--courbe) both;
}
/* The SVG wordmark carries 70/210 of padding around the glyphs: a 102 px
   image gives 34 px capitals (--t-wordmark); the negative margins cancel the
   padding so the glyphs sit on the panel's grid. */
.auth-wordmark {
  display: block;
  height: 102px;
  width: auto;
  margin: -34px -18px -34px -34px;
}
/* « par Focus » in plain letters: no bold « Focus » on its own (F-23). */
.auth-par-focus {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(250, 250, 248, .62);
}

.auth-brand-middle { max-width: 460px; }
/* Baseline — the voice: Spectral italic 500, never translated. */
.auth-baseline {
  margin: 0;
  font-family: var(--police-voix);
  font-style: italic;
  font-weight: 500;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--focus-surface);
  animation: auth-rise var(--duree-longue) .08s var(--courbe) both;
}
.auth-baseline .auth-accent {
  position: relative;
  display: inline-block;
  color: var(--focus-brand);                  /* mark on charbon: 7.5:1 */
}
/* Double rule under « fait. » (décision D4) — decoration of the mark. */
.auth-baseline .auth-trait-double {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 7px;
  border-top: 2px solid var(--focus-brand);
  border-bottom: 2px solid var(--focus-brand);
}
.auth-lead {
  margin: 22px 0 0;
  max-width: 40ch;
  font-family: var(--police-voix);
  font-style: italic;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.5;
  color: rgba(250, 250, 248, .62);
  animation: auth-rise var(--duree-longue) .11s var(--courbe) both;
}
/* setup_password.html: « Bienvenue chez Focus TDL. » (L-Invitation). */
.auth-accueil {
  margin: 0;
  font-family: var(--police-voix);
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -.005em;
  color: var(--focus-surface);
  animation: auth-rise var(--duree-longue) .08s var(--courbe) both;
}
.auth-brand-bottom {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: .04em;
  color: rgba(250, 250, 248, .62);
  animation: auth-rise var(--duree-longue) .14s var(--courbe) both;
}
.auth-brand-bottom b { font-weight: 500; }

/* ---------- form panel (right, off-white) ---------- */
.auth-form-panel {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--focus-surface);
}
/* emerald seam between the two worlds (decorative, on the brand side) */
.auth-form-panel::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, var(--focus-brand) 35%, var(--focus-brand) 65%, transparent);
}
.auth-form-card {
  width: 100%;
  max-width: 400px;
  font-size: 13px;
  line-height: 1.4;
  animation: auth-rise var(--duree-longue) .08s var(--courbe) both;
}
.auth-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--focus-text);
}
.auth-sub {
  margin: 6px 0 24px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--focus-text-muted);
}
.auth-alerte { margin-bottom: 20px; }

/* ---------- Microsoft first (décision D4) ---------- */
.auth-ms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(15, 17, 20, .19);
  border-radius: 6px;
  background: #fff;
  color: var(--focus-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--duree);
}
.auth-ms:hover { background: var(--focus-surface-container-low); }
.auth-ms:focus-visible { outline: 2px solid var(--focus-primary); outline-offset: 1px; }
.auth-ms svg { width: 18px; height: 18px; flex: none; }
.auth-ms-mention {
  margin: 8px 0 0;
  text-align: center;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--focus-outline);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 12px;
  color: var(--focus-outline);
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(15, 17, 20, .10);
}

/* Disclosure « Se connecter avec un nom d'utilisateur » (aria-expanded). */
.auth-divulgation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--focus-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.auth-divulgation[hidden] { display: none; }
.auth-divulgation:hover { background: rgba(15, 17, 20, .04); }
.auth-divulgation:focus-visible { outline: 2px solid var(--focus-primary); outline-offset: 1px; }
.auth-chevron {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform var(--duree);
}
.auth-divulgation[aria-expanded="true"] .auth-chevron { transform: rotate(180deg); }
.auth-bloc-microsoft + .auth-formulaire { padding-top: 12px; }

/* ---------- hollow fields (44 px, no placeholder) ---------- */
.auth-formulaire { margin: 0; }
.auth-formulaire[hidden] { display: none; }
.auth-field { margin-bottom: 16px; }
.auth-label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--focus-text-muted);
}
.auth-input {
  display: block;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--focus-outline);
  border-radius: 6px;
  background: var(--focus-surface-container);
  color: var(--focus-text);
  font: inherit;
  font-size: 15px;
  transition: border-color var(--duree), background var(--duree);
}
.auth-input:focus-visible {
  background: #fff;
  border-color: var(--focus-primary);
  outline: 2px solid var(--focus-primary);
  outline-offset: 1px;
}
.auth-input[aria-invalid="true"] { border-color: var(--focus-status-error); }
.auth-input[aria-invalid="true"]:focus-visible { border-color: var(--focus-status-error); }
.auth-champ-mdp { position: relative; }
.auth-input--mdp { padding-right: 88px; }
.auth-afficher {
  position: absolute;
  top: 6px;
  right: 6px;
  height: 32px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--focus-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.auth-afficher[hidden] { display: none; }
.auth-afficher:hover { background: rgba(15, 17, 20, .04); }
.auth-afficher:focus-visible { outline: 2px solid var(--focus-primary); outline-offset: 1px; }

.auth-verification { display: flex; justify-content: center; margin-bottom: 16px; }
.auth-oubli {
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--focus-text-muted);
}

/* CTA — emerald 700 ink (white on it 5.5:1), 800 on hover, never a gradient */
.auth-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 16px;
  border: none;
  border-radius: 6px;
  background: var(--focus-primary);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--duree), box-shadow var(--duree);
}
.auth-cta:hover { background: var(--focus-primary-strong); box-shadow: var(--lueur-cta); color: #fff; }
.auth-cta:focus-visible { outline: 2px solid var(--focus-primary); outline-offset: 2px; }
.auth-cta:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; background: var(--focus-primary); }
.auth-raison-cta {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--focus-text-muted);
  font-variant-numeric: tabular-nums;
}
.auth-raison-cta[hidden] { display: none; }

.auth-link {
  color: var(--focus-primary);                /* 5.3:1 — never the 500 */
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--duree-courte);
}
.auth-link:hover { color: var(--focus-primary-strong); border-bottom-color: var(--focus-primary-strong); }
.auth-link:focus-visible { outline: 2px solid var(--focus-primary); outline-offset: 1px; }

/* ---------- « Langue : FR · EN » (two buttons, aria-pressed) ---------- */
.auth-langue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 32px 0 0;
  font-size: 12px;
  color: var(--focus-text-muted);
}
.auth-langue-choix {
  height: 24px;
  min-width: 32px;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--focus-text-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.auth-langue-choix[aria-pressed="true"] {
  background: var(--focus-secondary);
  color: var(--focus-surface);
  font-weight: 600;
}
.auth-langue-choix[aria-pressed="false"]:hover { background: rgba(15, 17, 20, .04); color: var(--focus-text); }
.auth-langue-choix:focus-visible { outline: 2px solid var(--focus-primary); outline-offset: 1px; }

@keyframes auth-rise {
  from { transform: translateY(18px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes auth-ghost-in {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ---------- below Tailwind lg: the panel stacks above the card ---------- */
@media (max-width: 1023px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .auth-brand-panel { padding: 32px 24px; }
  .auth-ghost-y,
  .auth-form-panel::before { display: none; }
  .auth-baseline { font-size: 40px; }
  .auth-form-panel { padding: 32px 16px 40px; }
}

/* Motion cut for whoever asked (décision 10). */
@media (prefers-reduced-motion: reduce) {
  .auth-ghost-y,
  .auth-lockup,
  .auth-baseline,
  .auth-lead,
  .auth-accueil,
  .auth-brand-bottom,
  .auth-form-card { animation: none; }
  .auth-input,
  .auth-cta,
  .auth-ms,
  .auth-chevron,
  .auth-link { transition: none; }
}
