/* AeroPrep : papier de carte aéronautique, encre marine, ligne magenta du plan de vol FMS. */
:root {
  --paper: #EBF0F4;
  --surface: #FFFFFF;
  --surface-2: #F4F7F9;
  --ink: #13263B;
  --ink-2: #4B5D70;
  --line: #CAD4DD;
  --line-2: #DFE6EC;
  --magenta: #B0176F;
  --magenta-soft: #F6E1EE;
  --cyan: #0A7391;
  --cyan-soft: #DDF0F5;
  --amber: #A86A00;
  --amber-soft: #FBEFD6;
  --green: #1C7C45;
  --green-soft: #DDF2E5;
  --red: #B8352A;
  --red-soft: #F9E1DE;
  --radius: 10px;
  --radius-s: 6px;
  --shadow: 0 1px 0 rgba(19, 38, 59, .05);
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0D1823;
    --surface: #132231;
    --surface-2: #182A3B;
    --ink: #E4ECF2;
    --ink-2: #93A6B8;
    --line: #2A3E51;
    --line-2: #213445;
    --magenta: #E35AAE;
    --magenta-soft: #3A1E31;
    --cyan: #4DBAD8;
    --cyan-soft: #12323E;
    --amber: #F0B544;
    --amber-soft: #3A2D12;
    --green: #4CC27B;
    --green-soft: #143222;
    --red: #EE6B5C;
    --red-soft: #3D1C19;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.5 var(--font); font-feature-settings: "tnum" 1;
}
a { color: var(--cyan); text-underline-offset: 2px; }
a:hover { color: var(--magenta); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; margin-top: 1em; }
p { margin: 0 0 .8em; }
code { font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
code.copy { cursor: copy; }
:focus-visible { outline: 2px solid var(--magenta); outline-offset: 2px; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }
.big { font-size: 1.6rem; font-family: var(--font-head); }
.amber { color: var(--amber); }
.ok { color: var(--green); }
.ko { color: var(--red); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap, .wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain > li { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.plain > li:last-child { border-bottom: 0; }
[hidden] { display: none !important; }

/* ---------- structure ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; background: linear-gradient(90deg, var(--surface) 0 231px, var(--line) 231px 232px, transparent 232px); }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px;
}
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font: 700 1.45rem/1 var(--font-head); padding: 4px 8px 18px; letter-spacing: .01em;
}
.brand svg { color: var(--magenta); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-s); text-decoration: none; color: var(--ink); font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.on { background: var(--magenta-soft); color: var(--magenta); box-shadow: inset 3px 0 0 var(--magenta); }
.nav a.sub { padding-left: 22px; font-size: .95rem; }
.nav-group { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.nav-head { font: 600 .95rem var(--font-head); color: var(--ink-2); padding: 4px 10px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px 8px 0; border-top: 1px solid var(--line-2); }
.side-foot .me { color: var(--ink); text-decoration: none; font-weight: 600; }
.pill { background: var(--magenta); color: #fff; border-radius: 99px; font-size: .75rem; padding: 0 7px; line-height: 1.5; }
.langs { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; width: max-content; }
.langs a { padding: 3px 12px; text-decoration: none; color: var(--ink-2); font-size: .85rem; font-weight: 600; }
.langs a.on { background: var(--ink); color: var(--surface); }
.menu-btn { display: none; }
.main { min-width: 0; }
.page { padding: 32px 36px 64px; max-width: 1240px; }
.page.narrow { max-width: 640px; }
.page.narrow-wide { max-width: 860px; }
.page-head { margin-bottom: 20px; }
.page-head p { max-width: 70ch; }
.lead { font-size: 1.15rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.grid-2.wide-left { grid-template-columns: 1.15fr 1fr; }
.col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 20px; min-width: 0;
}
.col > .panel, .col > section { margin-bottom: 0; }
.panel.attention { border-color: var(--magenta); }
.empty { padding: 32px; text-align: center; color: var(--ink-2); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- boutons et champs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 600 .95rem var(--font); padding: 8px 16px; min-height: 38px;
  border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-2); color: var(--ink); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn.primary:hover { background: var(--magenta); border-color: var(--magenta); color: #fff; }
.btn.ghost { background: transparent; }
.btn.on { background: var(--magenta-soft); border-color: var(--magenta); color: var(--magenta); }
.btn.danger { color: var(--red); border-color: var(--red-soft); }
.btn.danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn.small { font-size: .85rem; padding: 4px 10px; min-height: 30px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.linklike { background: none; border: 0; padding: 0; color: var(--cyan); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: .95rem; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
input, textarea, select {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-s); padding: 8px 10px; min-height: 38px; width: 100%;
}
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--magenta); }
input[type=file] { padding: 6px; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--magenta-soft); border-color: var(--magenta); }
.row > label { flex: 1 1 160px; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
legend { font-weight: 600; font-size: .95rem; margin-bottom: 6px; padding: 0; display: flex; gap: 10px; align-items: baseline; }
fieldset:disabled { opacity: .4; }

/* boutons de choix (radios en segments) */
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg label { display: block; font-weight: 500; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block; padding: 7px 14px; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--surface); cursor: pointer; font-size: .92rem; height: 100%;
}
.seg span:hover { border-color: var(--ink-2); }
.seg input:checked + span { border-color: var(--magenta); background: var(--magenta-soft); color: var(--magenta); }
.seg input:focus-visible + span { outline: 2px solid var(--magenta); outline-offset: 1px; }
.seg.col3 { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.seg.col3 span { padding: 10px 12px; }
.seg.col3 b { display: block; font-family: var(--font-head); font-size: 1.05rem; }
.seg.col3 small { display: block; color: var(--ink-2); font-size: .8rem; line-height: 1.3; margin-top: 2px; }
.seg.col3 input:checked + span small { color: inherit; opacity: .85; }
.seg.tiny span { padding: 2px 8px; font-size: .8rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: block; font-weight: 400; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: block; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; font-size: .87rem; background: var(--surface); }
.chip span b { font-family: var(--font-head); color: var(--ink-2); margin-right: 2px; }
.chip input:checked + span { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip input:checked + span b { color: inherit; }
.chip input:focus-visible + span { outline: 2px solid var(--magenta); outline-offset: 1px; }

/* interrupteur */
.switch { display: inline-block; position: relative; width: 42px; height: 24px; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 99px; cursor: pointer; transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + span { background: var(--magenta); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--magenta); outline-offset: 2px; }

/* ---------- messages et étiquettes ---------- */
.note { padding: 10px 14px; border-radius: var(--radius-s); background: var(--cyan-soft); border-left: 3px solid var(--cyan); }
.note.ok { background: var(--green-soft); border-color: var(--green); }
.note.err { background: var(--red-soft); border-color: var(--red); }
.tag { display: inline-block; font-size: .78rem; font-weight: 600; padding: 1px 8px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.tag.ac { background: var(--ink); color: var(--surface); border-color: var(--ink); font-family: var(--font-head); letter-spacing: .02em; }
.tag.cyan { background: var(--cyan-soft); color: var(--cyan); border-color: transparent; }
.tag.amber { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.tag.new { background: var(--magenta-soft); color: var(--magenta); border-color: transparent; }
.tag.hours { color: var(--ink); }

/* ---------- accueil ---------- */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.hero h1 { font-size: 2.4rem; margin-bottom: .15em; }
.hero .num { font-family: var(--font-head); font-size: 1.6rem; color: var(--magenta); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.heat { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; margin: 6px 0 8px; max-width: 420px; }
.heat .cell { aspect-ratio: 1; border-radius: 3px; background: var(--line-2); }
.heat .l1 { background: color-mix(in srgb, var(--magenta) 25%, var(--surface)); }
.heat .l2 { background: color-mix(in srgb, var(--magenta) 50%, var(--surface)); }
.heat .l3 { background: color-mix(in srgb, var(--magenta) 75%, var(--surface)); }
.heat .l4 { background: var(--magenta); }
.jobs-teaser { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.jobs-teaser .num { color: var(--ink); margin-right: 6px; }

/* ---------- la route : matières reliées comme des points du plan de vol ---------- */
.route-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px 12px; box-shadow: var(--shadow); min-width: 0; }
.route-head { display: flex; justify-content: space-between; align-items: baseline; }
.route { list-style: none; margin: 8px 0 0; padding: 0; position: relative; }
.route::before {
  content: ""; position: absolute; left: 9px; top: 18px; bottom: 18px; width: 2px; background: var(--magenta);
}
.wp a {
  display: grid; grid-template-columns: 20px 46px 1fr 88px 64px; align-items: center; gap: 10px;
  padding: 8px 6px 8px 0; text-decoration: none; color: var(--ink); border-radius: var(--radius-s); position: relative;
}
.wp a:hover { background: var(--surface-2); }
.wp a:hover .wp-name { color: var(--magenta); }
.wp-mark { width: 20px; height: 20px; display: grid; place-items: center; position: relative; z-index: 1; }
.wp-mark svg { width: 18px; height: 18px; }
.wp-mark path { fill: var(--surface); stroke: var(--magenta); stroke-width: 2; }
.wp.active .wp-mark path { fill: var(--magenta-soft); }
.wp.done .wp-mark path { fill: var(--magenta); }
.wp-code { font: 700 1rem var(--font-head); letter-spacing: .03em; color: var(--ink-2); }
.wp.done .wp-code { color: var(--magenta); }
.wp-name { font-weight: 500; line-height: 1.25; min-width: 0; }
.wp-bar { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.wp-bar i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.wp.done .wp-bar i { background: var(--magenta); }
.wp-stat { text-align: right; font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wp-stat .due { display: inline-block; min-width: 22px; text-align: center; background: var(--amber-soft); color: var(--amber); border-radius: 4px; font-size: .78rem; padding: 0 4px; margin-left: 4px; }
.wp-stat em { font-style: normal; font-size: .8rem; }

/* ---------- séries ---------- */
.start h2 { margin-bottom: 14px; }
.hist { list-style: none; margin: 0; padding: 0; }
.hist a { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); align-items: center; }
.score { font-family: var(--font-head); font-size: 1.1rem; }
.score.pass { color: var(--green); }
.score.fail { color: var(--red); }

/* ---------- quiz ---------- */
.quiz { max-width: 860px; margin: 0 auto; }
.quiz-top { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.quiz-progress { font: 600 1.05rem var(--font-head); margin-left: auto; }
.timer { font: 700 1.2rem var(--font-head); font-variant-numeric: tabular-nums; padding: 2px 10px; border-radius: var(--radius-s); background: var(--cyan-soft); color: var(--cyan); }
.timer.low { background: var(--amber-soft); color: var(--amber); }
.track { height: 3px; background: var(--line-2); border-radius: 2px; margin-bottom: 22px; }
.track i { display: block; height: 100%; width: 0; background: var(--magenta); border-radius: 2px; transition: width .25s; }
.qcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px 20px; box-shadow: var(--shadow); }
.qmeta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.qtext { font: 500 1.25rem/1.45 var(--font); margin-bottom: 20px; max-width: 70ch; }
.opts { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.opt {
  width: 100%; display: flex; gap: 14px; align-items: flex-start; text-align: left; font: inherit; color: var(--ink);
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer;
}
.opt:hover:not(:disabled) { border-color: var(--ink-2); }
.letter { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); font: 700 .9rem var(--font-head); color: var(--ink-2); }
.otext { padding-top: 2px; }
.opt.sel { border-color: var(--magenta); background: var(--magenta-soft); }
.opt.sel .letter { background: var(--magenta); border-color: var(--magenta); color: #fff; }
.opt.good { border-color: var(--green); background: var(--green-soft); }
.opt.good .letter { background: var(--green); border-color: var(--green); color: #fff; }
.opt.bad { border-color: var(--red); background: var(--red-soft); }
.opt.bad .letter { background: var(--red); border-color: var(--red); color: #fff; }
.opt:disabled { cursor: default; }
.feedback { border-top: 1px solid var(--line-2); padding-top: 14px; margin-bottom: 14px; }
.verdict { font: 700 1.15rem var(--font-head); }
.verdict.ok { color: var(--green); }
.verdict.ko { color: var(--red); }
.expl h2 { font-size: 1rem; color: var(--ink-2); margin-bottom: 4px; }
.expl div { max-width: 72ch; white-space: pre-line; }
.qfoot { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.qnav { margin-left: auto; display: flex; gap: 8px; }
.qnav .btn { min-width: 52px; }
#flag[aria-pressed=true] { color: var(--amber); border-color: var(--amber); }
.grid-nav { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 18px; }
.grid-nav button { width: 38px; height: 34px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); font: 600 .85rem var(--font); color: var(--ink-2); cursor: pointer; }
.grid-nav button.ans { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.grid-nav button.cur { outline: 2px solid var(--magenta); outline-offset: 1px; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--surface); color: var(--ink); max-width: min(560px, 94vw); width: 100%; }
dialog::backdrop { background: rgba(13, 24, 35, .45); }

/* ---------- résultat ---------- */
.result-head { display: flex; gap: 28px; align-items: center; margin-bottom: 26px; flex-wrap: wrap; }
.score-dial { width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; border: 6px solid var(--red); flex: none; }
.score-dial.pass { border-color: var(--green); }
.score-dial b { font: 700 2.6rem var(--font-head); }
.score-dial small { font-size: 1.1rem; }
.by-subject { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.review { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.rev { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--radius); padding: 16px 20px; }
.rev.ko { border-left-color: var(--red); }
.rq { font-weight: 500; }
.ropts { margin: 0 0 8px; padding-left: 20px; }
.ropts li { padding: 2px 0; }
.ropts .good { color: var(--green); font-weight: 600; }
.ropts .bad { color: var(--red); text-decoration: line-through; }
details summary { cursor: pointer; }
.rev details p { margin: 8px 0 0; max-width: 72ch; white-space: pre-line; }

/* ---------- documents ---------- */
.searchbar { display: flex; gap: 8px; margin-bottom: 16px; max-width: 720px; }
.hits { margin: 0; padding-left: 20px; }
.hits li { margin-bottom: 10px; }
.hits p { margin: 2px 0 0; color: var(--ink-2); }
.doclist { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.doc-main { flex: 1; display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); min-width: 220px; }
.doc-main:hover b { color: var(--magenta); }
.doc-ico { flex: none; width: 42px; height: 52px; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 4px 12px 4px 4px; font: 700 .72rem var(--font-head); letter-spacing: .06em; }
.doc-admin { flex-basis: auto; }
.doc-admin[open] { flex-basis: 100%; }
.doc-admin summary { list-style: none; }
.doc-admin summary::-webkit-details-marker { display: none; }
.doc-admin-body { display: flex; flex-direction: column; gap: 14px; padding: 14px 0 4px; border-top: 1px solid var(--line-2); margin-top: 10px; }
.gen { background: var(--surface-2); border-radius: var(--radius-s); padding: 12px 14px; }
.gen h3 { margin-top: 0; }
.gen .chips { margin: 10px 0; }
.upload .drop { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center; margin-bottom: 12px; }
.upload .drop span { color: var(--ink-2); font-weight: 400; }
.upload > label { margin-bottom: 12px; }
.viewer .main { height: 100vh; }
.viewer-wrap { display: flex; flex-direction: column; height: 100vh; }
.viewer-head { display: flex; gap: 14px; align-items: center; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.viewer-head h1 { font-size: 1.2rem; margin: 0; flex: 1; min-width: 160px; }
.viewer-head label { flex-direction: row; align-items: center; gap: 6px; }
.viewer-wrap iframe { flex: 1; width: 100%; border: 0; background: #525659; }

/* ---------- assistant ---------- */
.ask { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.ask textarea { border: 0; padding: 4px; min-height: 70px; font-size: 1.05rem; }
.ask textarea:focus { outline: none; }
.ask:focus-within { border-color: var(--magenta); }
.qa-q { font-weight: 600; font-family: var(--font-head); font-size: 1.15rem; }
.answer { max-width: 75ch; }
.answer h3 { font-size: 1rem; }
.answer ul, .answer ol { padding-left: 20px; margin: 0 0 .8em; }
.answer li { margin-bottom: 4px; }
a.cite { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 4px; background: var(--magenta-soft); color: var(--magenta); font-size: .72rem; font-weight: 700; text-decoration: none; vertical-align: 2px; margin: 0 1px; }
.cites { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .87rem; border-top: 1px solid var(--line-2); padding-top: 10px; margin: 10px 0 0; }
.hist-q { border-bottom: 1px solid var(--line-2); padding: 10px 0; }
.hist-q summary { display: flex; justify-content: space-between; gap: 10px; }
.hist-q .answer { padding-top: 10px; }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .4; } }

/* ---------- offres ---------- */
.jobs-layout { display: grid; grid-template-columns: 290px 1fr; gap: 24px; align-items: start; }
.filters { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 14px; margin: 0; }
.filters fieldset { margin: 0; }
.filters .seg { width: 100%; }
.results { min-width: 0; }
.joblist { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.job { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 14px; }
.job.expired { opacity: .6; }
.job-title { font: 600 1.12rem/1.3 var(--font-head); color: var(--ink); text-decoration: none; }
.job-title:hover { color: var(--magenta); text-decoration: underline; }
.job-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .9rem; margin: 3px 0 8px; align-items: center; }
.job-tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.job-tags .src { margin-left: 4px; }
.job-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 150px; }
.job-edit { grid-column: 1 / -1; }
.job-edit summary { color: var(--cyan); }
.job:has(.job-edit[open]) { grid-template-columns: 1fr; }
.job-edit form { margin-top: 10px; }
.more-sites .links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 600; }
.srclist { padding-left: 18px; }

/* ---------- admin ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--magenta); border-color: var(--magenta); }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl th, .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl thead th { font-weight: 600; color: var(--ink-2); font-size: .85rem; }
.tbl td.num { text-align: right; }
.tbl tr.off { opacity: .55; }
.tbl.perm td { text-align: center; }
.user-edit[open] { min-width: 380px; }
.user-edit form { margin: 12px 0; }
.perm-grid { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-size: .9rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 16px; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; }
.meter { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; margin-bottom: 8px; max-width: 420px; }
.meter i { display: block; height: 100%; background: var(--magenta); }
.qadmin { list-style: none; padding: 0; }
.qadmin .ropts { margin-top: 8px; }
.src-row { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.srcfields { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }

/* ---------- connexion ---------- */
.auth-wrap { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-chart { position: relative; background: var(--ink); color: #E8EEF3; overflow: hidden; }
.auth-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-chart .grid { stroke: rgba(255,255,255,.07); stroke-width: 1; }
.auth-chart .ring { fill: none; stroke: rgba(77,186,216,.35); stroke-width: 1; stroke-dasharray: 4 5; }
.auth-chart .route { fill: none; stroke: #E35AAE; stroke-width: 3; }
.auth-chart .wpt { fill: #13263B; stroke: #E35AAE; stroke-width: 2; }
.auth-chart text { fill: rgba(232,238,243,.8); font: 600 11px var(--font-head); letter-spacing: .08em; }
.auth-tag { position: absolute; left: 32px; bottom: 32px; max-width: calc(100% - 64px); padding: 14px 18px; border-radius: 10px; background: rgba(19, 38, 59, .88); }
.auth-name { font: 700 3.4rem/1 var(--font-head); margin-bottom: 10px; }
.auth-tag p { font-size: 1.15rem; max-width: 30ch; color: rgba(232,238,243,.85); }
.auth-form { padding: 48px clamp(24px, 6vw, 80px); display: flex; flex-direction: column; justify-content: center; max-width: 520px; width: 100%; position: relative; }
.auth-form .langs { position: absolute; top: 24px; right: 24px; }
.auth-form h1 { margin-bottom: 18px; }
.auth-form .stack { margin-bottom: 18px; }

/* ---------- petits écrans ---------- */
@media (max-width: 1100px) {
  .grid-2, .grid-2.wide-left { grid-template-columns: 1fr; }
  .jobs-layout { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .side { position: fixed; z-index: 20; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; visibility: hidden; }
  body.menu-open .side { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .menu-btn { display: grid; place-items: center; position: fixed; z-index: 21; top: 10px; right: 12px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
  .page { padding: 20px 16px 48px; }
  h1, .hero h1 { font-size: 1.7rem; padding-right: 48px; }
  .seg.col3 { grid-template-columns: 1fr; }
  .wp a { grid-template-columns: 20px 48px 1fr 54px; }
  .wp-bar { display: none; }
  .qcard { padding: 18px 16px 14px; }
  .qtext { font-size: 1.1rem; }
  .kbd-hint { display: none; }
  .job { grid-template-columns: 1fr; }
  .job-actions { flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-chart { min-height: 220px; }
  .auth-tag { left: 20px; bottom: 20px; }
  .auth-name { font-size: 2.4rem; }
  .user-edit[open] { min-width: 0; }
  .quiz-top { flex-wrap: wrap; padding-right: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- tests psychotechniques ---------- */
kbd { font: 600 .75rem var(--font); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--surface-2); color: var(--ink-2); }
.t-settings { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.t-settings fieldset { margin: 0; }
.t-batteries { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 28px; }
.t-bat { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius); background: var(--ink); color: var(--surface); text-decoration: none; border-left: 4px solid var(--magenta); }
.t-bat .muted { color: color-mix(in srgb, var(--surface) 70%, transparent); }
.t-bat:hover { color: var(--surface); background: color-mix(in srgb, var(--ink) 88%, var(--magenta)); }
.t-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 26px; }
.t-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.t-card:hover { border-color: var(--magenta); color: var(--ink); }
.t-card > b { font: 600 1.08rem var(--font-head); }
.t-card-foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto; padding-top: 6px; }
.t-spark { width: 64px; height: 24px; }
.t-spark rect { fill: var(--magenta); opacity: .75; }
.t-tags { border-top: 1px solid var(--line-2); padding-top: 6px; }
.t-page { max-width: 900px; margin: 0 auto; }
.t-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; }
.t-head h1 { margin-bottom: 2px; }
.t-meters { display: flex; gap: 10px; }
.t-timer, .t-score { font: 700 1.15rem var(--font-head); font-variant-numeric: tabular-nums; padding: 3px 12px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); }
.t-timer { color: var(--cyan); }
.t-track { height: 3px; background: var(--line-2); border-radius: 2px; margin-bottom: 18px; }
.t-track i { display: block; height: 100%; width: 0; background: var(--magenta); transition: width .2s linear; }
.t-stage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; min-height: 340px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; transition: box-shadow .15s; }
.t-stage.flash-ok { box-shadow: 0 0 0 3px var(--green); }
.t-stage.flash-ko { box-shadow: 0 0 0 3px var(--red); }
.t-big { font: 600 2.1rem var(--font-head); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.t-huge { font: 700 4.2rem var(--font-head); font-variant-numeric: tabular-nums; }
.t-mid { font-size: 1.15rem; max-width: 60ch; line-height: 1.5; }
.t-flash { min-height: 220px; display: grid; place-items: center; width: 100%; }
.t-answer { display: flex; gap: 8px; align-items: center; justify-content: center; }
.t-answer input { width: 200px; font-size: 1.3rem; text-align: center; font-variant-numeric: tabular-nums; }
.t-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; width: 100%; max-width: 640px; }
.t-ch { justify-content: flex-start; gap: 10px; min-height: 48px; font-size: 1rem; text-align: left; white-space: normal; }
.t-ch .letter { width: 24px; height: 24px; font-size: .8rem; }
.t-yn { display: flex; gap: 12px; }
.t-yn .btn { min-width: 160px; min-height: 52px; font-size: 1.05rem; }
.t-fb { width: 100%; max-width: 620px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.t-table { border-collapse: collapse; font-variant-numeric: tabular-nums; margin: 0 auto; }
.t-table th, .t-table td { border: 1px solid var(--line); padding: 6px 12px; }
.t-table th { background: var(--surface-2); font-weight: 600; }
.t-switch { display: flex; gap: 18px; align-items: center; font-size: 2rem; letter-spacing: .25em; }
.t-switch b { color: var(--magenta); letter-spacing: 0; }
.t-pair { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.t-pair code { font: 600 1.9rem/1 ui-monospace, "Cascadia Mono", Consolas, monospace; padding: 12px 16px; background: var(--surface-2); letter-spacing: .12em; }
.t-dots { width: 260px; height: 260px; }
.t-dots circle { fill: var(--ink); }
.t-ring { fill: none !important; stroke: var(--line); stroke-width: 1; }
.t-two { display: flex; gap: 32px; align-items: center; justify-content: center; flex-wrap: wrap; }
.t-grid, .t-gridpick { display: grid; gap: 3px; font-size: 1.5rem; }
.t-grid span { width: 46px; height: 46px; display: grid; place-items: center; background: var(--surface-2); border-radius: 4px; }
.t-gridpick { grid-template-columns: repeat(var(--n), 46px); }
.t-gridpick button { width: 46px; height: 46px; font-size: 1.5rem; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; cursor: pointer; color: var(--ink); }
.t-gridpick button:hover { border-color: var(--magenta); }
.t-gridpick.seq { grid-template-columns: repeat(var(--n), 64px); gap: 6px; }
.t-gridpick.seq button { width: 64px; height: 64px; font: 700 1.1rem var(--font-head); }
.t-gridpick.seq button.lit { background: var(--magenta); border-color: var(--magenta); }
.t-gridpick.seq button.picked { background: var(--ink); color: var(--surface); }
.t-clr { font: 600 1.3rem/1.6 var(--font); max-width: 46ch; padding: 16px 20px; background: var(--surface-2); border-left: 3px solid var(--cyan); text-align: left; }
.t-rbi { width: 170px; height: 170px; }
.t-rbi text { font: 700 8px var(--font-head); fill: var(--ink-2); }
.t-rbi .t-needle { stroke: var(--magenta); stroke-width: 3; stroke-linecap: round; }
.t-rbi circle:not(.t-ring) { fill: var(--ink); }
.t-shape { width: 140px; height: 140px; }
.t-shape rect { fill: var(--ink); }
.t-shape.b rect { fill: var(--cyan); }
.t-shape .t-mark { fill: var(--magenta); }
.t-d2 { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; width: 100%; max-width: 620px; }
.t-d2 button { display: flex; flex-direction: column; align-items: center; padding: 2px 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: 4px; cursor: pointer; color: var(--ink); line-height: 1; }
.t-d2 button b { font: 600 1.35rem var(--font); }
.t-d2 .mk { font-size: .7rem; letter-spacing: 1px; height: 11px; color: var(--ink-2); }
.t-d2 button.on { background: var(--magenta-soft); border-color: var(--magenta); }
.t-react { width: 100%; min-height: 240px; display: grid; place-items: center; border-radius: var(--radius); font: 700 1.6rem var(--font-head); cursor: pointer; user-select: none; background: var(--surface-2); }
.t-react.wait { background: var(--surface-2); }
.t-react.go { background: var(--green); color: #fff; }
.t-react.nogo { background: var(--red); color: #fff; }
.t-react.bad { background: var(--amber-soft); color: var(--amber); }
.t-gauges { display: flex; gap: 26px; justify-content: center; }
.t-gauge { position: relative; width: 56px; height: 240px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); cursor: pointer; padding: 0; }
.t-gauge .red { position: absolute; left: 0; right: 0; top: 0; height: 20%; background: var(--red-soft); border-bottom: 2px solid var(--red); border-radius: 8px 8px 0 0; }
.t-gauge .needle { position: absolute; left: 6px; right: 6px; height: 4px; margin-bottom: -2px; background: var(--ink); border-radius: 2px; }
.t-gauge b { position: absolute; bottom: -26px; left: 0; right: 0; font-family: var(--font-head); }
.t-gauge.alarm .needle { background: var(--red); }
.t-trk { width: 100%; max-width: 640px; touch-action: none; cursor: crosshair; border-radius: var(--radius); }
.t-trk .bg { fill: var(--surface-2); }
.t-trk .tgt { fill: color-mix(in srgb, var(--cyan) 25%, transparent); stroke: var(--cyan); stroke-width: .6; }
.t-trk .tgt.in { fill: color-mix(in srgb, var(--green) 30%, transparent); stroke: var(--green); }
.t-trk .cur { fill: var(--magenta); }
.t-mt { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 640px; }
.t-mt-box { background: var(--surface-2); border-radius: var(--radius-s); padding: 10px; }
.t-sum { gap: 22px; }
.t-sum .tbl { max-width: 620px; }
@media (max-width: 820px) {
  .t-stage { padding: 18px 12px; }
  .t-huge { font-size: 3.2rem; }
  .t-gridpick.seq { grid-template-columns: repeat(var(--n), 54px); }
  .t-gridpick.seq button { width: 54px; height: 54px; }
  .t-d2 { grid-template-columns: repeat(6, 1fr); }
  .t-mt { grid-template-columns: 1fr; }
  .t-yn .btn { min-width: 0; flex: 1; }
}
#trk { width: 100%; display: flex; justify-content: center; }

/* ---------- entretiens compagnies ---------- */
.iv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 28px; }
.iv-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); overflow: hidden; min-height: 132px; }
.iv-card:hover { border-color: var(--magenta); color: var(--ink); }
.iv-card > b { font: 700 1.45rem var(--font-head); }
.iv-tail { position: absolute; right: 12px; bottom: 10px; font: 700 1.3rem/1 var(--font-head); color: var(--line); letter-spacing: .04em; pointer-events: none; }
.iv-card-foot { margin-top: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.iv-head h1 { font-size: 2.4rem; margin-bottom: 4px; }
.iv-tabs { margin-top: 10px; }
.iv-pitch p { font-size: 1.08rem; line-height: 1.65; max-width: 72ch; }
.iv-pitch.en { border-left: 3px solid var(--cyan); }
.iv-timeline { list-style: none; margin: 0; padding: 0 0 0 4px; border-left: 2px solid var(--magenta); }
.iv-timeline li { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 5px 0 5px 14px; position: relative; }
.iv-timeline li::before { content: ""; position: absolute; left: -6px; top: 12px; width: 10px; height: 10px; transform: rotate(45deg); background: var(--surface); border: 2px solid var(--magenta); }
.iv-timeline b { font-family: var(--font-head); color: var(--magenta); }
.iv-steps { margin: 0; padding-left: 22px; }
.iv-steps li { margin-bottom: 12px; }
.iv-steps li::marker { font: 700 1rem var(--font-head); color: var(--magenta); }
.iv-steps p { margin: 2px 0 0; }
.iv-tips li { margin-bottom: 6px; }
.iv-qs { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.iv-q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 14px; }
.iv-q summary { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-weight: 500; }
.iv-q textarea { margin-top: 8px; }
.iv-hint { margin: 8px 0 0; padding-left: 10px; border-left: 2px solid var(--cyan); }
.iv-note { white-space: pre-line; background: var(--surface-2); padding: 10px 12px; border-radius: var(--radius-s); }
.iv-quiz { max-width: 720px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.iv-quiz .t-ch.good { border-color: var(--green); background: var(--green-soft); }
.iv-quiz .t-ch.bad { border-color: var(--red); background: var(--red-soft); }
.iv-chat { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; }
.iv-msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; white-space: pre-line; line-height: 1.5; }
.iv-msg.panel { background: var(--surface-2); border-top-left-radius: 2px; align-self: flex-start; }
.iv-msg.me { background: var(--ink); color: var(--surface); border-top-right-radius: 2px; align-self: flex-end; }
.iv-msg.err { background: var(--red-soft); color: var(--red); }
.iv-fb .score-dial { width: 96px; height: 96px; }
.iv-fb .score-dial b { font-size: 1.9rem; }
.iv-fb .row { gap: 18px; margin-bottom: 14px; }
.iv-dots { color: var(--magenta); letter-spacing: 2px; white-space: nowrap; }
.iv-updates { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.iv-updates li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 16px; }
.iv-updates p { margin: 6px 0 4px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .82rem; }
