/* Pages d'authentification Signal (chantier 1573) : connexion, inscription, mot de passe oublié et réinitialisé,
   double authentification, vérification du mail. Cadre : auth/_signal_debut.php + layouts/footer.php.
   Les vues gardent leurs classes (hs-auth, card, field, lbl, btn…), seul l'habillage change. Tokens : signal-panel.css. */
/* Mise en page retenue par Mathis (#1758 A, 12/10 05:20) : colonne centrée, logo au-dessus du titre, sans cadre ni visuel. */
.s-auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--s-page); color: var(--s-encre-2); }
.s-auth-col { display: flex; flex-direction: column; min-width: 0; padding: 20px clamp(20px, 4vw, 56px) 22px; }
.s-auth-haut { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.s-auth-haut .s-logo .sg-logo-svg { height: 21px; }
.s-auth-outils { display: flex; align-items: center; gap: 10px; }
.s-langues { display: flex; align-items: center; }
.s-langues a { padding: 8px 6px; font: 500 11px/1 var(--f-mono); font-stretch: 87.5%; letter-spacing: .04em; color: var(--s-muet-2); text-decoration: none; transition: color .15s ease; }
.s-langues a:hover { color: var(--s-encre); }
.s-langues a[aria-current] { color: var(--s-encre); box-shadow: inset 0 -1px 0 var(--s-rose); }
/* Drapeau devant le code de langue (n°1575), même source que le reste du panel ($languageFlags) */
.s-langues a { display: inline-flex; align-items: center; gap: 5px; }
.s-langues .s-drapeau { font: 14px/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; letter-spacing: 0; }
.s-theme { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; background: none; color: var(--s-muet); cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--s-ligne-2); transition: color .15s ease, box-shadow .15s ease; }
.s-theme:hover { color: var(--s-encre); box-shadow: inset 0 0 0 1px var(--s-ligne-3); }
[data-theme=light] .light-icon, [data-theme=dark] .dark-icon { display: inline-block !important; }
[data-theme=light] .dark-icon, [data-theme=dark] .light-icon { display: none !important; }
.s-auth-corps { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 7vh, 72px) 0; }
.s-auth-bas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; font-size: 12.5px; color: var(--s-muet-2); }
.s-auth-bas a { color: var(--s-muet); text-decoration: none; }
.s-auth-bas a:hover { color: var(--s-encre); }

/* Formulaire */
.s-auth .hs-auth { width: 100%; }
.s-auth .hs-auth-in { width: 100%; max-width: 400px; margin: 0 auto; }
.s-auth .hs-auth-in.wide { max-width: 880px; }
.s-auth .head { margin-bottom: 30px; }
.s-auth .head .logo { display: none; }
.s-auth .head h1 { margin: 0 0 10px; font: 700 clamp(26px, 2.4vw, 32px)/1.12 var(--f-display); font-stretch: 108%; letter-spacing: -.02em; color: var(--s-encre); text-wrap: balance; }
.s-auth .head .sub { margin: 0; font-size: 15px; line-height: 1.5; color: var(--s-muet); }
.s-auth .card { padding: 0; background: none; border: 0; box-shadow: none; }
.s-auth .stack { display: flex; flex-direction: column; gap: 18px; }
.s-auth .lbl { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--s-encre-2); }
.s-auth .lbl-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.s-auth .lbl-row a, .s-auth .after a, .s-auth .note a, .s-auth .check a { color: var(--s-encre); text-decoration: underline; text-decoration-color: var(--s-rose); text-underline-offset: 3px; }
.s-auth .lbl-row a { margin-bottom: 7px; font-size: 13px; font-weight: 500; }
.s-auth :is(.lbl-row, .after, .note, .check) a:hover { text-decoration-thickness: 2px; }
.s-auth .field { display: block; width: 100%; height: 44px; padding: 0 14px; margin: 0; background: var(--s-champ); border: 1px solid var(--s-champ-bord); border-radius: 0;
  color: var(--s-encre); font: 400 15px/1.2 var(--f-text); transition: border-color .15s ease, box-shadow .15s ease; }
.s-auth .field::placeholder { color: var(--s-muet-2); opacity: 1; }
.s-auth .field:hover { border-color: var(--s-muet); }
.s-auth .field:focus { outline: none; border-color: var(--s-encre-2); box-shadow: 0 0 0 1px var(--s-encre-2); }
.s-auth .field.code { height: 56px; text-align: center; font: 600 24px/1 var(--f-mono); font-stretch: 87.5%; letter-spacing: .5em; padding-left: calc(14px + .5em); }
.s-auth select.field { appearance: auto; }
.s-auth .pw { position: relative; }
.s-auth .pw .field { padding-right: 46px; }
.s-auth .reveal { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--s-muet); cursor: pointer; }
.s-auth .reveal:hover { color: var(--s-encre); }
.s-auth .check { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--s-encre-2); cursor: pointer; }
.s-auth .check.start { align-items: flex-start; }
.s-auth .check input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--s-rose); }
.s-auth .check.start input { margin-top: 2px; }
.s-auth .btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 46px; padding: 0 20px; border: 0; border-radius: 0; cursor: pointer;
  font: 700 15px/1 var(--f-text); font-stretch: 112%; letter-spacing: .01em; text-decoration: none; transition: background-color .15s ease, box-shadow .15s ease, transform .1s ease; }
.s-auth .btn:active { transform: translateY(1px); }
.s-auth .btn-primary { background: var(--s-rose); color: #fff; }
.s-auth .btn-primary:hover { background: var(--s-rose-2); }
.s-auth .btn-primary:disabled { opacity: .55; cursor: wait; }
.s-auth .btn-secondary { background: transparent; color: var(--s-encre); box-shadow: inset 0 0 0 1px var(--s-ligne-2); }
.s-auth .btn-secondary:hover { background: rgb(var(--tx-white) / .04); box-shadow: inset 0 0 0 1px var(--s-ligne-3); }
.s-auth .btn-secondary i { color: var(--s-rose); }
.s-auth .divider { display: flex; align-items: center; gap: 14px; margin: 22px 0 16px; font: 500 11px/1 var(--f-mono); font-stretch: 87.5%; letter-spacing: .08em; text-transform: uppercase; color: var(--s-muet-2); }
.s-auth .divider::before, .s-auth .divider::after { content: ""; flex: 1; height: 1px; background: var(--s-ligne); }
.s-auth .alert { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 22px; padding: 12px 14px; font-size: 14px; line-height: 1.45; color: var(--s-encre);
  background: var(--s-rose-voile); box-shadow: inset 2px 0 0 var(--s-rose); }
.s-auth .alert i { margin-top: 2px; color: var(--s-rose-txt); }
.s-auth .alert.ok { background: var(--s-ok-voile); box-shadow: inset 2px 0 0 var(--s-ok); }
.s-auth .alert.ok i { color: var(--s-ok); }
.s-auth .alert.info { background: rgb(var(--tx-white) / .05); box-shadow: inset 2px 0 0 var(--s-ligne-3); }
.s-auth .alert.info i { color: var(--s-muet); }
.s-auth .after { margin: 28px 0 0; font-size: 14px; color: var(--s-muet); }
.s-auth .after a { font-weight: 600; }
.s-auth .back-row { margin-top: 10px; }
.s-auth .back { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--s-muet); text-decoration: none; }
.s-auth .back:hover { color: var(--s-encre); }
.s-auth .hint { margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: var(--s-muet-2); }
.s-auth .txt { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--s-encre-2); }
.s-auth .txt strong { color: var(--s-encre); font-weight: 600; word-break: break-all; }
.s-auth .note { margin-top: 24px; padding: 14px 16px; font-size: 13px; line-height: 1.5; color: var(--s-muet); background: var(--s-carte); border: 1px solid var(--s-ligne); }
.s-auth .note > :first-child { margin-top: 0; }
.s-auth .note strong, .s-auth .note h3 { display: block; margin: 0 0 6px; font: 500 11px/1.2 var(--f-mono); font-stretch: 87.5%; letter-spacing: .08em; text-transform: uppercase; color: var(--s-encre-2); }
.s-auth .note ul { margin: 0; padding: 0; list-style: none; }
.s-auth .note li { position: relative; padding-left: 14px; }
.s-auth .note li + li { margin-top: 3px; }
.s-auth .note li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; background: var(--s-ligne-3); }
.s-auth .captcha { display: flex; gap: 8px; }
.s-auth .captcha .img { flex: none; display: flex; align-items: center; justify-content: center; height: 44px; padding: 0 8px; background: var(--s-champ); border: 1px solid var(--s-ligne-2); }
.s-auth .captcha .img img { display: block; height: 34px; width: auto; }
.s-auth .captcha .field { min-width: 0; text-transform: uppercase; font-family: var(--f-mono); font-stretch: 87.5%; letter-spacing: .12em; }

/* Inscription : deux panneaux puis sécurité sur une ligne (#291 A) */
.s-auth .reg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px 40px; }
.s-auth .reg-sec, .s-auth .reg-foot { grid-column: 1 / -1; }
.s-auth .reg h2 { margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--s-ligne); font: 500 11px/1.2 var(--f-mono); font-stretch: 87.5%; letter-spacing: .08em; text-transform: uppercase; color: var(--s-muet); }
.s-auth .grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.s-auth .grid.one { grid-template-columns: minmax(0, 1fr); }
.s-auth .span2 { grid-column: 1 / -1; }
.s-auth .sec-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.s-auth .one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-auth .reg-foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 6px; }
.s-auth .reg-foot .btn { flex: none; width: auto; padding: 0 30px; }
@media (max-width: 820px) {
  .s-auth .reg, .s-auth .sec-row { grid-template-columns: minmax(0, 1fr); }
  .s-auth .reg-foot { flex-direction: column; align-items: stretch; }
  .s-auth .reg-foot .btn { width: 100%; }
}
@media (max-width: 520px) {
  .s-auth .grid { grid-template-columns: minmax(0, 1fr); }
  .s-langues a { padding: 8px 3px; gap: 3px; }
  /* Le logo du haut est masqué (#1758 A) : sur mobile il ne réserve plus sa largeur, la barre des langues prend la place */
  .s-auth-haut > .s-logo { display: none; }
  .s-auth-outils { margin-left: auto; }
  .s-auth-haut .s-logo .sg-logo-svg { height: 19px; }
  .s-auth .head h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .s-logo .voyant { animation: none; } }

/* Colonne centrée (#1758 A) : logo au-dessus du titre, titre et liens centrés, formulaire étroit. */
.s-auth-logo-centre { display: flex; justify-content: center; margin: 0 auto 28px; }
.s-auth-logo-centre .sg-logo-svg { height: 24px; }
.s-auth-haut > .s-logo { visibility: hidden; }
.s-auth .head { text-align: center; }
.s-auth .head h1 { font-size: clamp(24px, 2.1vw, 28px); }
.s-auth :is(.after, .back-row) { text-align: center; }
.s-auth .hs-auth-in:not(.wide) { max-width: 380px; }
/* Mobile : champs à 16 px pour que Safari iOS ne zoome pas au focus. */
@media (max-width: 760px) { .s-auth .field { font-size: 16px; } }
