/* ============================================================
   PAGES D'AUTHENTIFICATION — piste C « Atelier clair » (25/10/2026)
   Inscription, connexion, mot de passe oublié / nouveau, code de la
   double authentification. Sobres : le formulaire seul, sans photo.
   Elles gardent base.html.twig (le JS de l'app
   pose le jeton anti-CSRF) : app.css arrive APRÈS cette feuille, d'où
   les sélecteurs préfixés par .auth-page. Sans-serif uniquement.
   ============================================================ */

body:has(.auth-page) { padding-top: 0 !important; background: #fff; }

.auth-page {
  --a-onyx: #1B1816; --a-or: #C9A063; --a-or-pale: #F6EBDA; --a-papier: #F6F3EE;
  --a-filet: #E7E2DA; --a-filet-2: #D8D1C6; --a-texte-2: #4A443E; --a-gris: #6B645B;
  --a-ok: #2F7A4E; --a-ok-bg: #E7F3EA; --a-danger: #B0392E; --a-danger-bg: #FBE9E5;
  --a-ombre-forte: 0 22px 44px -18px rgba(0,0,0,.30);
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: #fff; color: var(--a-onyx);
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
.auth-page a { color: inherit; text-decoration: none; }

/* Barre du haut */
.auth-page .auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; padding: 0 40px; flex: none; }
.auth-page .auth-top .auth-logo { display: inline-flex; align-items: center; min-height: 44px; }
.auth-page .auth-top .auth-logo img { height: 24px; width: auto; }
.auth-page .auth-top-link { font-size: 15px; color: var(--a-gris); }
.auth-page .auth-top-link a { color: var(--a-onyx); font-weight: 600; text-decoration: underline; text-decoration-color: var(--a-or); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Le formulaire seul, centré */
.auth-page .auth-main { flex: 1; display: flex; justify-content: center; align-items: center; padding: 16px 24px 64px; }
.auth-page .auth-box { width: 100%; max-width: 440px; }

.auth-page .auth-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; color: var(--a-gris); }
.auth-page .auth-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--a-or); }
.auth-page h1 { font-family: 'Geist', 'Instrument Sans', sans-serif; font-weight: 600; font-size: 44px; line-height: 1.04; letter-spacing: -0.035em; margin: 16px 0 0; color: var(--a-onyx); text-wrap: balance; }
.auth-page .auth-lead { margin: 14px 0 0; font-size: 17px; color: var(--a-texte-2); text-wrap: pretty; }
.auth-page .auth-lead b { color: var(--a-onyx); font-weight: 600; }
.auth-page .auth-form { margin-top: 28px; }

/* Champs */
.auth-page .auth-field { margin-bottom: 16px; }
.auth-page .auth-field label, .auth-page .auth-field .form-label { display: block; margin: 0 0 6px; font-size: 14.5px; font-weight: 600; color: var(--a-onyx); }
.auth-page .auth-field-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth-page .auth-field-row a { font-size: 14px; color: var(--a-gris); text-decoration: underline; text-decoration-color: var(--a-filet-2); text-underline-offset: 3px; }
.auth-page .auth-field-row a:hover { color: var(--a-onyx); text-decoration-color: var(--a-or); }
.auth-page .auth-field input[type=text], .auth-page .auth-field input[type=email], .auth-page .auth-field input[type=password], .auth-page .auth-input {
  display: block; width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--a-filet-2); border-radius: 10px; background: #fff;
  font: inherit; font-size: 16px; color: var(--a-onyx); box-shadow: none; transition: border-color .2s, box-shadow .2s;
}
.auth-page .auth-field input::placeholder { color: #A39B90; }
.auth-page .auth-field input:focus { outline: none; border-color: var(--a-onyx); box-shadow: 0 0 0 3px rgba(27,24,22,.08); }
.auth-page .auth-field input.is-invalid { border-color: var(--a-danger); }
.auth-page .auth-field-hint { margin: 6px 0 0; font-size: 13.5px; color: var(--a-gris); }
.auth-page .auth-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-page .invalid-feedback { display: block; margin-top: 6px; font-size: 13.5px; color: var(--a-danger); }

/* Code de la double authentification */
.auth-page .auth-field input.auth-code { font-family: 'Geist', sans-serif; font-size: 28px; font-weight: 600; letter-spacing: .45em; text-align: center; padding: 10px 8px 10px 20px; font-variant-numeric: tabular-nums; }
.auth-page .auth-field input.auth-code--backup { letter-spacing: .12em; font-size: 21px; }

/* Cases à cocher */
.auth-page .auth-checkbox, .auth-page .auth-consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 18px; font-size: 15px; color: var(--a-texte-2); }
.auth-page .auth-checkbox input, .auth-page .auth-consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--a-onyx); }
.auth-page .auth-checkbox label, .auth-page .auth-consent label { margin: 0; flex: 1 1 0; min-width: 0; }
.auth-page .auth-consent a { color: var(--a-onyx); text-decoration: underline; text-decoration-color: var(--a-or); text-underline-offset: 3px; }
.auth-page .auth-consent .invalid-feedback { flex-basis: 100%; }
.auth-page .auth-consent { flex-wrap: wrap; }

/* Champ piège de l'inscription : hors écran plutôt que display:none, que
   certains robots savent repérer */
.auth-page .auth-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Bouton : rectangle arrondi, jamais de pilule */
.auth-page .auth-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 20px; border: 0; border-radius: 10px;
  background: var(--a-onyx); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; transition: background .2s, translate .2s; }
.auth-page .auth-btn:hover { background: #000; }
@media (prefers-reduced-motion: no-preference) {
  .auth-page .auth-btn:hover { translate: 0 -1px; }
  .auth-page .auth-btn:hover .bi-arrow-right { translate: 3px 0; }
  .auth-page .auth-btn .bi { transition: translate .25s; }
}

/* Messages */
.auth-page .auth-alert { padding: 12px 16px; border-radius: 10px; background: var(--a-danger-bg); color: var(--a-danger); font-size: 15px; font-weight: 500; margin: 22px 0 0; }
.auth-page .auth-success { padding: 16px 18px; border-radius: 12px; background: var(--a-ok-bg); color: var(--a-ok); font-size: 15px; margin: 24px 0 0; }
.auth-page .auth-success strong { display: block; margin-bottom: 4px; }
.auth-page .auth-success code { color: inherit; font-weight: 600; }
.auth-page .auth-dev { margin: 18px 0 0; padding: 10px 14px; border: 1px dashed var(--a-filet-2); border-radius: 10px; font-size: 14px; color: var(--a-gris); }
.auth-page .auth-dev b { font-family: ui-monospace, Menlo, monospace; color: var(--a-onyx); letter-spacing: .12em; }
.auth-page .auth-account { display: flex; align-items: center; gap: 10px; margin: 22px 0 0; padding: 12px 14px; border-radius: 10px; background: var(--a-papier); font-size: 15px; color: var(--a-texte-2); }
.auth-page .auth-account b { color: var(--a-onyx); }

/* Formule choisie (inscription) */
.auth-page .auth-plan { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px 0 0; padding: 16px 18px; border-radius: 14px; background: var(--a-onyx); color: #fff; }
.auth-page .auth-plan small { display: block; font-size: 13px; color: #B9B0A4; }
.auth-page .auth-plan b { display: block; font-family: 'Geist', sans-serif; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin-top: 2px; }
.auth-page .auth-plan .prix { display: block; font-size: 14px; color: #CFC7BC; margin-top: 2px; }
.auth-page .auth-plan a { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid #5A524C; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: #fff; }
.auth-page .auth-plan a:hover { border-color: #fff; }

/* Bas de formulaire */
.auth-page .auth-switch { margin: 20px 0 0; font-size: 15px; color: var(--a-gris); text-align: center; }
.auth-page .auth-switch a, .auth-page .auth-link { background: none; border: 0; padding: 0; font: inherit; color: var(--a-onyx); font-weight: 600; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--a-or); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.auth-page .auth-help { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--a-filet); font-size: 14.5px; color: var(--a-gris); line-height: 1.6; }
.auth-page .auth-help p, .auth-page .auth-help-line { margin: 0 0 6px; }
.auth-page .auth-help form { display: inline; }
.auth-page .auth-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 24px 0 0; font-size: 13.5px; color: var(--a-gris); }
.auth-page .auth-trust span { display: inline-flex; align-items: center; gap: 6px; }
.auth-page .auth-trust .bi { color: var(--a-or); }

/* Tablette et téléphone */
@media (max-width: 960px) {
  .auth-page .auth-main { align-items: flex-start; padding: 8px 16px 40px; }
  .auth-page .auth-top { height: 64px; padding: 0 16px; }
  .auth-page .auth-top .auth-logo img { height: 21px; }
}
@media (max-width: 520px) {
  .auth-page h1 { font-size: 34px; }
  .auth-page .auth-lead { font-size: 16px; }
  .auth-page .auth-duo { grid-template-columns: 1fr; gap: 0; }
  .auth-page .auth-top-link { font-size: 14px; text-align: right; }
  .auth-page .auth-top-prefix { display: none; }
}
