/* Connexion (/connexion) et demande d'accès (/demande-acces) : écran partagé, formulaires,
   panneau latéral, confirmation. Maquette : Figma « Connexion & demande d'accès ». */
/* ───────────── 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; }
}
