/* Page de connexion ACADAI — seule feuille de style publique. */
:root {
  --bg: #F3F7FB; --surface: #FFFFFF; --surface-2: #EDF3F9; --ink: #0B2545; --muted: #556A84; --faint: #8A9BB1; --line: #DCE6F0;
  --brand: #004AAD; --brand-hover: #003C8F; --on-brand: #fff; --brand-soft: #E4EEFC;
  --ok: #17835A; --ok-soft: #DDF4E9; --warn: #9A6410; --warn-soft: #FCF0D9; --danger: #C23B2A; --danger-soft: #FCE5E1;
  --sup: #004AAD; --spe: #C62828;
  --shadow: 0 1px 2px rgba(11,37,69,.05), 0 12px 32px rgba(0,60,143,.08);
  --f-display: 'Poppins', 'Segoe UI', system-ui, sans-serif; --f-body: 'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #07111D; --surface: #0E1C2E; --surface-2: #14263C; --ink: #E8F0FA; --muted: #9FB2C9; --faint: #6E859F; --line: #203650;
  --brand: #6AA5FF; --brand-hover: #8DBAFF; --on-brand: #06142A; --brand-soft: #132A4C;
  --ok: #4CC792; --ok-soft: #0F3122; --warn: #EBB45A; --warn-soft: #3A2B0E; --danger: #FF8A7A; --danger-soft: #3E1A15;
  --sup: #7EB0FF; --spe: #FF8A80;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 36px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* sinon .stack / .f (display:flex) annulent l'attribut hidden */
html { -webkit-text-size-adjust: 100%; }
body.shell { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
#shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
@media (max-width: 900px) { #shell { grid-template-columns: 1fr; } }

.sh-load { grid-column: 1 / -1; display: grid; place-items: center; }
.sh-load span { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: sh-spin .8s linear infinite; }
@keyframes sh-spin { to { transform: rotate(360deg); } }

/* Panneau de marque */
.sh-brand { position: relative; overflow: hidden; color: #fff; padding: clamp(28px, 5vw, 64px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  background: radial-gradient(900px 600px at 15% 0%, #1668E3 0%, transparent 60%), linear-gradient(155deg, #0057C8 0%, #003A8C 55%, #062A63 100%); }
.sh-brand svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sh-brand > * { position: relative; }
.sh-logo { display: flex; align-items: center; gap: 14px; font-family: var(--f-display); font-weight: 700; font-size: 22px; letter-spacing: .04em; }
.sh-logo svg { width: 54px; height: 54px; flex: none; }
.sh-brand h1 { font-family: var(--f-display); font-weight: 700; font-size: clamp(30px, 4.2vw, 52px); line-height: 1.1; letter-spacing: -.01em; margin: 0 0 16px; max-width: 14ch; }
.sh-brand p { margin: 0; font-size: clamp(16px, 1.5vw, 19px); color: rgba(255,255,255,.82); max-width: 44ch; }
.sh-brand .lock { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.9); background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: 9px 14px; border-radius: 999px; width: fit-content; backdrop-filter: blur(6px); }
.sh-brand .lock svg { width: 16px; height: 16px; }
@media (max-width: 900px) { .sh-brand { padding: 22px 20px 26px; gap: 18px; } .sh-brand h1 { font-size: 26px; margin-bottom: 8px; max-width: none; } .sh-brand p { font-size: 15px; } .sh-brand .lock { display: none; } }

/* Panneau formulaire */
.sh-main { display: flex; flex-direction: column; padding: clamp(18px, 3vw, 36px); min-width: 0; }
.sh-top { display: flex; justify-content: flex-end; gap: 8px; min-height: 42px; }
.sh-center { flex: 1; display: grid; place-items: center; padding: 18px 0 30px; }
.sh-card { width: 100%; max-width: 460px; animation: sh-in .35s ease both; }
@keyframes sh-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .sh-card { animation: none; } }
.sh-card h2 { font-family: var(--f-display); font-size: 28px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -.01em; }
.sh-card .lead { color: var(--muted); margin: 0 0 22px; }
.sh-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 14px; margin-bottom: 22px; }
.sh-tabs button { border: 0; background: none; padding: 10px; border-radius: 10px; font: 600 15px var(--f-body); color: var(--muted); cursor: pointer; }
.sh-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
form.sh { display: flex; flex-direction: column; gap: 15px; }
.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f > label, .f > .lab { font-weight: 600; font-size: 14px; }
.f small { color: var(--muted); font-size: 13px; }
.f .opt { font-weight: 500; color: var(--muted); font-size: 12.5px; margin-left: 4px; }
.in { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 400 16px var(--f-body); transition: border-color .15s, box-shadow .15s; }
textarea.in { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; }
select.in { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%238396AC' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.in:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.in:disabled { opacity: .55; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr; } }
.pw { position: relative; }
.pw .in { padding-right: 48px; }
.pw button { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border: 0; background: none; color: var(--muted); border-radius: 9px; cursor: pointer; display: grid; place-items: center; }
.pw button:hover { background: var(--surface-2); color: var(--ink); }
.pw svg { width: 19px; height: 19px; }
.meter { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s, background .2s; }
.b { display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 48px; padding: 0 20px; border-radius: 12px; border: 1.5px solid transparent; background: var(--brand); color: var(--on-brand); font: 600 15.5px var(--f-body); cursor: pointer; text-decoration: none; transition: background .15s, transform .05s; }
.b:hover { background: var(--brand-hover); }
.b:active { transform: translateY(1px); }
.b:disabled { opacity: .55; cursor: not-allowed; }
.b svg { width: 19px; height: 19px; flex: none; }
.b.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.b.ghost:hover { background: var(--surface-2); }
.b.link { background: none; color: var(--brand); height: auto; padding: 4px 2px; font-size: 14.5px; }
.b.link:hover { text-decoration: underline; background: none; }
.b.wide { width: 100%; }
.icon-b { width: 42px; height: 42px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.icon-b:hover { background: var(--surface-2); }
.icon-b svg { width: 19px; height: 19px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 4px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice label { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: flex; flex-direction: column; gap: 2px; padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); height: 100%; transition: border-color .15s, background .15s; }
.choice b { font-size: 15px; }
.choice small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.choice input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.choice input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 2px; }
.choice.lv input:checked + span { color: #fff; }
.choice.lv label:first-child input:checked + span { background: var(--sup); border-color: var(--sup); }
.choice.lv label:last-child input:checked + span { background: var(--spe); border-color: var(--spe); }
.choice.lv span { align-items: center; font-weight: 700; padding: 11px; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.chk input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); }
.note { display: flex; gap: 11px; padding: 13px 15px; border-radius: 13px; background: var(--brand-soft); font-size: 14.5px; }
.note svg { width: 19px; height: 19px; flex: none; margin-top: 2px; color: var(--brand); }
.note.warn { background: var(--warn-soft); } .note.warn svg { color: var(--warn); }
.note.bad { background: var(--danger-soft); } .note.bad svg { color: var(--danger); }
.note.good { background: var(--ok-soft); } .note.good svg { color: var(--ok); }
.err { color: var(--danger); font-size: 14px; font-weight: 600; min-height: 0; }
.err:empty { display: none; }
.err .tiny { display: block; font-weight: 500; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.big-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 18px; }
.big-ic svg { width: 30px; height: 30px; }
.big-ic.warn { background: var(--warn-soft); color: var(--warn); } .big-ic.bad { background: var(--danger-soft); color: var(--danger); } .big-ic.good { background: var(--ok-soft); color: var(--ok); }
.demo { margin-top: 18px; padding: 12px 14px; border-radius: 13px; border: 1.5px dashed var(--line); font-size: 13.5px; color: var(--muted); }
.demo button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 5px 0; color: var(--brand); font: 600 13.5px var(--f-body); cursor: pointer; }
.demo button span { color: var(--muted); font-weight: 400; }
.sh-foot { text-align: center; color: var(--faint); font-size: 13px; }
#sh-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow); z-index: 10; max-width: calc(100vw - 32px); }
