
/* Concept : une salle de cours sobre, sombre et ambrée, avec un seul parcours linéaire : modules, examen, attestation. */
:root {
  --bg: #F2F3F6; --surface: #FFFFFF; --surface2: #E9EBF1; --fg: #1B1F2A; --muted: #5A6070; --line: #D6D9E2;
  --accent: #F5A623; --accent-ink: #1B1F2A; --accent-text: #9A5800; --ok: #1E7F5C; --ok-bg: #E2F3EC; --bad: #B83A3A; --bad-bg: #F9E6E6;
  --f-head: "Space Grotesk", system-ui, sans-serif; --f-body: "Inter", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151C; --surface: #1B1F2A; --surface2: #262B39; --fg: #ECEEF3; --muted: #A3A9B8; --line: #333948;
    --accent: #F5A623; --accent-ink: #1B1F2A; --accent-text: #F5B54A; --ok: #6FD3A5; --ok-bg: #173A2E; --bad: #F08A8A; --bad-bg: #432326; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12151C; --surface: #1B1F2A; --surface2: #262B39; --fg: #ECEEF3; --muted: #A3A9B8; --line: #333948;
  --accent: #F5A623; --accent-ink: #1B1F2A; --accent-text: #F5B54A; --ok: #6FD3A5; --ok-bg: #173A2E; --bad: #F08A8A; --bad-bg: #432326; color-scheme: dark;
}
body { background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 16px; line-height: 1.6; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 0 48px; }
* { box-sizing: border-box; }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.2; text-wrap: balance; margin: 0; }
p { margin: 0; }
.wrap { max-width: 760px; margin: 0 auto; }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-head); font-weight: 700; font-size: 18px; text-decoration: none; color: var(--fg); }
.brand .mk { width: 30px; height: 30px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 16px; }
.brand b { color: var(--accent-text); font-weight: 700; }
nav.steps { display: flex; gap: 6px; flex-wrap: wrap; }
nav.steps a { font-size: 13px; text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); }
nav.steps a.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
main { padding-top: 28px; display: flex; flex-direction: column; gap: 22px; }
.kick { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); font-weight: 600; }
h1 { font-size: clamp(28px, 6vw, 40px); }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
.lead { color: var(--muted); font-size: 17px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.btn { appearance: none; border: 0; background: var(--accent); color: var(--accent-ink); font: 600 16px var(--f-body); padding: 12px 20px; border-radius: 10px; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
input[type=text], input[type=password] { font: 16px var(--f-body); padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); width: 100%; max-width: 420px; }
.progress { height: 8px; border-radius: 999px; background: var(--surface2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); }
.mods { display: grid; gap: 12px; }
.mod { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-decoration: none; color: var(--fg); min-width: 0; }
.mod .n { width: 38px; height: 38px; flex: none; border-radius: 10px; background: var(--surface2); display: grid; place-items: center; font: 700 17px var(--f-head); }
.mod.done .n { background: var(--ok-bg); color: var(--ok); }
.mod .t { flex: 1; min-width: 0; }
.mod .t small { display: block; color: var(--muted); font-size: 13px; }
.mod .st { font-size: 13px; color: var(--muted); }
.mod.locked { opacity: .6; }
.lesson { display: flex; flex-direction: column; gap: 14px; }
.lesson p, .lesson li { max-width: 65ch; }
.lesson ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.formula { background: var(--surface2); border-radius: 10px; padding: 14px 16px; font: 600 17px var(--f-head); text-align: center; overflow-wrap: anywhere; }
.note { border-left: 4px solid var(--accent); background: var(--surface2); padding: 12px 14px; border-radius: 0 10px 10px 0; font-size: 15px; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.video { border: 1px dashed var(--line); border-radius: 12px; padding: 16px; color: var(--muted); font-size: 15px; display: flex; gap: 12px; align-items: center; }
.video .play { width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--surface2); display: grid; place-items: center; color: var(--accent-text); }
.q { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); }
.q:first-of-type { border-top: 0; }
.q .qt { font-weight: 600; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.opt input { margin-top: 5px; accent-color: var(--accent); }
.opt.good { border-color: var(--ok); background: var(--ok-bg); }
.opt.bad { border-color: var(--bad); background: var(--bad-bg); }
.expl { font-size: 14px; color: var(--muted); }
.score { font: 700 48px var(--f-head); }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.cert { background: #1B1F2A; color: #ECEEF3; border: 3px solid #F5A623; border-radius: 6px; padding: 28px 22px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.cert .ck { font-size: 12px; letter-spacing: .2em; color: #F5A623; font-weight: 600; }
.cert .cn { font: 700 clamp(26px, 6vw, 36px) var(--f-head); overflow-wrap: anywhere; }
.cert .ct { font: 700 20px var(--f-head); color: #F5A623; }
.cert small { color: #A3A9B8; }
.demo { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }
.hidden-canvas { display: none; }
@media (prefers-reduced-motion: no-preference) { .progress i { transition: width .4s ease; } }

/* ---- ajouts version serveur ---- */
input[type=email], select { font: 16px var(--f-body); padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); width: 100%; max-width: 420px; }
label { font-weight: 500; }
.field { display: flex; flex-direction: column; gap: 6px; }
.err { color: var(--bad); }
.okmsg { color: var(--ok); }
.lead { color: var(--muted); font-size: 17px; }
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
footer.foot { margin-top: 32px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; display: flex; gap: 16px; flex-wrap: wrap; }
footer.foot a { color: var(--muted); }
.wide { max-width: 1100px; }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.btn.sm { font-size: 14px; padding: 7px 12px; border-radius: 8px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.stat b { display: block; font: 700 28px var(--f-head); }
.stat span { color: var(--muted); font-size: 13px; }
td.wrap { white-space: normal; min-width: 160px; }
.card > .btn { align-self: flex-start; }
