/* Connexion à la console partenaire : le design approuvé du site (client/web/public/css/base.css et auth.css,
   maquette Figma « Connexion & demande d'accès »), copié ici pour que la console reste indépendante,
   plus les étapes de la double authentification. */
:root {
  --brand: #2F275D; --brand-hover: #3B3175; --brand-soft: #ECEBF4;
  --surface: #FFFFFF; --surface-muted: #F6F5FA;
  --text: #1C1838; --text-secondary: #5F5B78; --placeholder: #8E8AA6; --border: #DEDCE8;
  --success: #0E7A4B; --success-soft: #E3F4EC; --warning: #8A5A00; --warning-soft: #FFF3DB;
  --danger: #B3261E; --danger-soft: #FBEAE8;
  --night: #14112B; --night-2: #1C1838; --night-line: #2E2850; --on-dark: #FFFFFF; --on-dark-secondary: #C9C6DB;
  --accent: #7C6CF2; --accent-text: #6A59E6; --accent-on-dark: #A99FF7;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body { margin: 0; font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif; font-size: 16px; line-height: 1.5;
       color: var(--text); background: var(--surface); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
svg { flex: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 10; background: var(--brand); color: var(--on-dark); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 16px; }
.mono { font-family: var(--mono); }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
/* Marque, boutons, liens */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; color: var(--text); }
.brand img { height: 26px; width: auto; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 24px; border-radius: 12px;
       font-size: 15px; font-weight: 600; white-space: nowrap; border: 0; cursor: pointer; transition: background .15s, border-color .15s; }
.btn-sm { height: 42px; padding: 0 18px; font-size: 14px; }
.btn-primary { background: var(--brand); color: var(--on-dark); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-ghost { background: var(--surface); color: var(--brand); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-muted); }
.btn-white { background: var(--surface); color: var(--brand); height: 54px; }
.btn-white:hover { background: var(--brand-soft); }
.btn-line { border: 1px solid rgba(255,255,255,.35); color: var(--on-dark); height: 54px; }
.btn-line:hover { background: rgba(255,255,255,.08); }
.btn-full { width: 100%; height: 52px; }
.link { color: var(--brand); font-weight: 600; }
.link:hover { text-decoration: underline; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill-ok { background: var(--success-soft); color: var(--success); }
.pill-warn { background: var(--warning-soft); color: var(--warning); }
.ico { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; flex: none; }
.ring { position: absolute; border-radius: 50%; border: 1px solid rgba(169,159,247,.26); pointer-events: none; }
h1 { font-size: 36px; line-height: 44px; font-weight: 700; letter-spacing: -0.02em; }
h1 em { font-style: normal; color: var(--accent-text); }
.lead { font-size: 17px; line-height: 27px; color: var(--text-secondary); }
h2 { font-size: 30px; line-height: 38px; font-weight: 700; letter-spacing: -0.02em; }
.sub { font-size: 16px; line-height: 25px; color: var(--text-secondary); }
.num { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--on-dark); font-weight: 700; font-size: 16px;
       display: flex; align-items: center; justify-content: center; flex: none; }
@keyframes voice-pulse { 50% { box-shadow: 0 0 0 6px rgba(124,108,242,.18); } }
/* ───────────── Animations ─────────────
   Entrée du hero et des formulaires au chargement ; blocs [data-reveal] de l'accueil au défilement
   (site.js ajoute .is-in). Rien ne bouge si la personne a demandé moins d'animations. */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.96); } }
/* ───────────── Tablette ───────────── */
@media (min-width: 640px) {
  h1 { font-size: 46px; line-height: 54px; }
}
/* ───────────── Ordinateur ───────────── */
@media (min-width: 1024px) {
  h1 { font-size: 58px; line-height: 66px; letter-spacing: -0.025em; }
  .lead { font-size: 19px; line-height: 30px; }
  h2 { font-size: 44px; line-height: 52px; }
  .sub { font-size: 18px; line-height: 28px; }
}
/* ───────────── Connexion et demande d'accès ───────────── */
.split { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.split-main { flex: 1; display: flex; flex-direction: column; gap: 28px; padding: 14px 20px 24px; }
.bar { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.bar-link { display: flex; gap: 6px; font-size: 14px; color: var(--text-secondary); }
.bar-link .long { display: none; }
.split-center { flex: 1; display: flex; justify-content: center; }
.form { width: 100%; display: flex; flex-direction: column; gap: 28px; }
.form-head { display: flex; flex-direction: column; gap: 10px; }
.form-head h1 { font-size: 28px; line-height: 36px; }
.fields { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; }
.label-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.lbl { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text); padding: 0; }
.req { color: var(--danger); margin-left: 2px; }
.input { width: 100%; height: 50px; border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; font-size: 15px; background: var(--surface); color: var(--text); }
.input::placeholder { color: var(--placeholder); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124,108,242,.16); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(179,38,30,.12); }
select.input { appearance: none; padding-right: 42px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235F5B78' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
select.input:invalid { color: var(--placeholder); }
textarea.input { height: 104px; padding: 14px; resize: vertical; line-height: 22px; }
.with-action { position: relative; }
.with-action .input { padding-right: 48px; }
.input-action { position: absolute; right: 6px; top: 6px; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
                display: flex; align-items: center; justify-content: center; }
.input-action:hover { background: var(--surface-muted); }
.helper { font-size: 13px; line-height: 18px; color: var(--text-secondary); }
.error { font-size: 13px; line-height: 18px; color: var(--danger); font-weight: 500; }
.text-btn { border: 0; background: none; padding: 0; cursor: pointer; font-size: 13px; }
.choice-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.cb { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border); background: var(--surface); display: flex; align-items: center; justify-content: center; flex: none; }
.cb svg { opacity: 0; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 20px; cursor: pointer; }
.check .cb { margin-top: 0; }
:has(> .choice-input:checked) > .cb { background: var(--brand); border-color: var(--brand); }
:has(> .choice-input:checked) > .cb svg { opacity: 1; }
:has(> .choice-input:focus-visible) > .cb { outline: 3px solid var(--accent); outline-offset: 2px; }
.consent { color: var(--text-secondary); font-size: 13px; }
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-muted); border-radius: 14px; padding: 14px 16px; font-size: 13px; line-height: 20px; color: var(--text-secondary); }
.notice svg { margin-top: 1px; }
.notice.info { background: var(--brand-soft); color: var(--text); }
.notice.warn { background: var(--warning-soft); color: var(--warning); }
.notice.danger { background: var(--danger-soft); color: var(--danger); }
.switch { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; font-size: 14px; color: var(--text-secondary); }
.auth-foot { display: flex; justify-content: center; gap: 20px; font-size: 13px; color: var(--text-secondary); }
.auth-foot a:hover { color: var(--brand); }
.group { display: flex; flex-direction: column; gap: 18px; margin: 0; padding: 0; border: 0; min-width: 0; }
.group > legend { width: 100%; padding: 0 0 10px; margin-bottom: 18px; border-bottom: 1px solid var(--brand-soft);
                  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-secondary); }
.grid2 { display: flex; flex-direction: column; gap: 18px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; }
.seg label { position: relative; height: 42px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600;
             color: var(--text-secondary); white-space: nowrap; cursor: pointer; }
.seg label:hover { color: var(--brand); }
.seg label:has(.choice-input:checked) { background: var(--brand-soft); color: var(--brand); }
.seg label:has(.choice-input:focus-visible) { outline: 3px solid var(--accent); outline-offset: -1px; }
.seg[aria-invalid="true"] { border-color: var(--danger); }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { position: relative; display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px; border: 1px solid var(--border); border-radius: 12px;
       font-size: 14px; font-weight: 600; cursor: pointer; }
.opt:has(.choice-input:checked) { border-color: var(--accent); background: #F5F3FF; }
.submit { display: flex; flex-direction: column; gap: 12px; }
.req-note { font-size: 13px; color: var(--text-secondary); text-align: center; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.side { display: none; }
.steps { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.st { position: relative; display: flex; gap: 16px; padding-bottom: 20px; }
.st:last-child { padding-bottom: 0; }
.st:not(:last-child)::after { content: ''; position: absolute; left: 15.5px; top: 36px; bottom: 4px; width: 1px; background: var(--border); }
.st-n { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); color: var(--brand); font-size: 14px; font-weight: 700;
        display: flex; align-items: center; justify-content: center; flex: none; }
.st-b { display: flex; flex-direction: column; gap: 3px; padding-top: 5px; }
.st-b b { font-size: 15px; line-height: 22px; }
.st-b p { font-size: 14px; line-height: 22px; color: var(--text-secondary); }
.next { display: flex; flex-direction: column; gap: 16px; background: var(--surface-muted); border-radius: 16px; padding: 20px; }
/* Demande envoyée */
.done { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--surface-muted); }
.done .bar { padding: 14px 20px 0; height: auto; }
.done-center { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 24px 20px; }
.done-card { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--brand-soft); border-radius: 20px; padding: 28px 20px;
             display: flex; flex-direction: column; align-items: center; gap: 24px; box-shadow: 0 30px 60px -30px rgba(28,24,56,.25); }
.success { width: 72px; height: 72px; border-radius: 50%; background: var(--success-soft); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 10px rgba(227,244,236,.55); }
.done-head { display: flex; flex-direction: column; gap: 10px; text-align: center; }
.done-head h1 { font-size: 28px; line-height: 36px; }
.done-head h1:focus { outline: none; }
.done-head strong { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.recap { width: 100%; background: var(--surface-muted); border-radius: 16px; padding: 4px 18px; margin: 0; }
.recap div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--brand-soft); font-size: 14px; line-height: 20px; }
.recap div:first-child { border-top: none; }
.recap dt { color: var(--text-secondary); }
.recap dd { margin: 0; font-weight: 600; text-align: right; }
.next-line { display: flex; gap: 12px; align-items: flex-start; width: 100%; font-size: 14px; line-height: 22px; color: var(--text-secondary); }
.next-line svg { margin-top: 1px; }
.next-line b { color: var(--text); }
.done-btns { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.done .auth-foot { padding: 0 20px 24px; }
@media (prefers-reduced-motion: no-preference) {
  .form, .done-card { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .side-in { animation: rise .8s .12s cubic-bezier(.2,.7,.2,1) both; }
}
/* ───────────── Tablette ───────────── */
@media (min-width: 640px) {
  .grid2 { flex-direction: row; gap: 16px; }
  .seg { grid-template-columns: repeat(4, 1fr); }
  .opts { flex-direction: row; }
  .opt { flex: 1; }
  .done-btns { flex-direction: row; }
  .done-btns .btn { flex: 1; }
  .done-card { padding: 48px; gap: 28px; }
}
/* ───────────── Ordinateur ───────────── */
@media (min-width: 1024px) {
  .split { flex-direction: row; min-height: 100vh; }
  .split-main { width: 50%; max-width: 760px; flex: none; padding: 36px 56px 32px; gap: 48px; }
  .bar-link .long { display: inline; }
  .split-center { align-items: center; }
  .form { width: 400px; }
  .form.wide { width: 560px; gap: 32px; }
  .form-head h1 { font-size: 36px; line-height: 44px; }
  .auth-foot { justify-content: flex-start; }
  .next { display: none; }
  /* Panneau figé : seule la colonne du formulaire défile, le panneau reste à l'écran. */
  .side { flex: 1; display: flex; align-items: center; justify-content: center; position: sticky; top: 0; align-self: flex-start;
          height: 100vh; height: 100dvh; overflow: hidden auto; padding: 72px;
          background: linear-gradient(160deg, #3A2F78 0%, var(--brand) 45%, var(--night) 100%); color: var(--on-dark); }
  .side.top { align-items: flex-start; padding-top: clamp(56px, 16vh, 168px); padding-bottom: 56px; }
  .side-in { position: relative; width: 100%; max-width: 500px; display: flex; flex-direction: column; gap: 28px; }
  .side h2 { font-size: 34px; line-height: 42px; color: var(--on-dark); }
  .side .kicker { color: var(--accent-on-dark); }
  .side-note { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--on-dark-secondary); }
  .side .st { padding-bottom: 26px; }
  .side .st:not(:last-child)::after { background: rgba(169,159,247,.32); }
  .side .st-n { background: rgba(169,159,247,.16); border-color: rgba(169,159,247,.45); color: var(--on-dark); }
  .side .st-b b { font-size: 16px; color: var(--on-dark); }
  .side .st-b p { color: var(--on-dark-secondary); }
  .privacy { display: flex; gap: 12px; align-items: flex-start; background: rgba(255,255,255,.06); border: 1px solid rgba(169,159,247,.22); border-radius: 14px; padding: 16px;
             font-size: 14px; line-height: 21px; color: var(--on-dark-secondary); }
  .console { background: var(--surface); color: var(--text); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 40px 80px -24px rgba(8,6,20,.6); }
  .console-head { display: flex; justify-content: space-between; align-items: center; }
  .console-head b { font-size: 16px; }
  .tabs { display: flex; background: var(--surface-muted); border-radius: 10px; padding: 3px; gap: 2px; }
  .tabs span { font-size: 12px; font-weight: 600; color: var(--text-secondary); padding: 5px 10px; border-radius: 8px; }
  .tabs .on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(28,24,56,.12); }
  .tiles { display: flex; gap: 12px; }
  .tile { flex: 1; background: var(--surface-muted); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
  .tile span { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
  .tile b { font-size: 26px; line-height: 32px; }
  .list { display: flex; flex-direction: column; }
  .lrow { display: flex; justify-content: space-between; align-items: center; padding: 12px 4px; border-top: 1px solid var(--brand-soft); }
  .lcol { display: flex; flex-direction: column; gap: 2px; }
  .lcol .mono { font-size: 13px; }
  .meta { font-size: 12px; color: var(--text-secondary); }
  .done .bar { padding: 36px 56px 0; }
  .done-center { align-items: center; padding: 40px 20px; }
  .done-head h1 { font-size: 36px; line-height: 44px; }
  .done .auth-foot { justify-content: center; padding: 0 56px 32px; }
}
/* ───────────── Cercles du panneau (sans style en ligne : la console les refuse) ───────────── */
.ring-1 { width: 620px; height: 620px; right: -220px; top: -240px; }
.ring-2 { width: 440px; height: 440px; right: -130px; top: -150px; }
.ring-3 { width: 260px; height: 260px; right: -40px; top: -60px; }
/* ───────────── Double authentification ───────────── */
.qr { align-self: center; width: 188px; height: 188px; border: 1px solid var(--border); border-radius: 14px; padding: 8px; background: #fff; }
.secret summary { font-size: 13px; color: var(--brand); font-weight: 600; cursor: pointer; }
.secret code { display: block; margin-top: 8px; font-family: var(--mono); font-size: 13px; padding: 10px 12px; border-radius: 10px; background: var(--surface-muted); overflow-wrap: anywhere; }
.code-input { font-family: var(--mono); font-size: 22px; letter-spacing: .3em; text-align: center; }
.steps-line { display: flex; gap: 6px; }
.steps-line i { flex: 1; height: 4px; border-radius: 999px; background: var(--brand-soft); }
.steps-line i.on { background: var(--brand); }
.notice a { font-weight: 600; }
