/* Layout: one reading column; a slate band carries the brand, a sticky instrument bar carries time and progress during the test. */
:root {
  --paper: #F4F5F6;
  --card: #FFFFFF;
  --ink: #2E383E;
  --slate: #4A555C;
  --mute: #6E777C;
  --line: #DADEE0;
  --band: #2E383E;
  --band-fg: #FFFFFF;
  --band-mute: #AEB6BA;
  --accent: #DE0045;
  --accent-soft: #FCE6EC;
  --sand: #A4967F;
  --sand-soft: #F2EEE6;
  --ok: #2E7F76;
  --ok-soft: #E3F1EF;
  --bad: #C4003D;
  --bad-soft: #FBE7ED;
  --focus: #6BB2D5;
  --f-display: "Jost", "Futura", "Century Gothic", "Segoe UI", sans-serif;
  --f-body: "Jost", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #182024; --card: #222B30; --ink: #E7EBED; --slate: #C2CACE; --mute: #8D979C; --line: #35424A;
    --band: #10171A; --band-fg: #F2F4F5; --band-mute: #8D979C;
    --accent: #FF3F72; --accent-soft: #3A1E28; --sand: #CCBB9C; --sand-soft: #2E2A22;
    --ok: #74C4B9; --ok-soft: #1C3431; --bad: #FF5C86; --bad-soft: #3B1C26; --focus: #6BB2D5;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #182024; --card: #222B30; --ink: #E7EBED; --slate: #C2CACE; --mute: #8D979C; --line: #35424A;
  --band: #10171A; --band-fg: #F2F4F5; --band-mute: #8D979C;
  --accent: #FF3F72; --accent-soft: #3A1E28; --sand: #CCBB9C; --sand-soft: #2E2A22;
  --ok: #74C4B9; --ok-soft: #1C3431; --bad: #FF5C86; --bad-soft: #3B1C26; --focus: #6BB2D5;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.55; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--band); }
.wrap { max-width: 780px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }

/* Brand band */
.band { background: var(--band); color: var(--band-fg); }
.band .wrap { padding-block: 28px 30px; display: grid; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 600; letter-spacing: .22em; font-size: 14px; }
.brand i { display: inline-block; width: 10px; height: 10px; background: var(--accent); }
.brand span { color: var(--band-mute); letter-spacing: .08em; font-weight: 400; font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; }
.band h1 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: clamp(26px, 5vw, 36px); line-height: 1.15; text-wrap: balance; }
.band p { margin: 0; color: var(--band-mute); max-width: 60ch; }

/* Tabs (owner only) */
.tabs { display: flex; gap: 4px; padding-top: 6px; }
.tab { background: transparent; color: var(--band-mute); border: 0; border-bottom: 2px solid transparent; padding: 8px 4px; margin-right: 16px; font-weight: 500; }
.tab[aria-selected="true"] { color: var(--band-fg); border-bottom-color: var(--accent); }

main { padding-block: 28px 80px; }
.notice { border-left: 3px solid var(--sand); background: var(--sand-soft); padding: 12px 14px; border-radius: 2px; font-size: 14px; color: var(--ink); margin-bottom: 20px; }
.notice.warn { border-left-color: var(--accent); background: var(--accent-soft); }

/* Intro */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--card); border-radius: 4px; overflow: hidden; }
.fact { padding: 16px; border-right: 1px solid var(--line); display: grid; gap: 2px; align-content: start; }
.fact:last-child { border-right: 0; }
.fact b { font-family: var(--f-mono); font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; }
.fact span { font-size: 13px; color: var(--mute); }
@media (max-width: 560px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fact:nth-child(2) { border-right: 0; } .fact:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
.rules { margin: 26px 0; display: grid; gap: 10px; padding: 0; list-style: none; }
.rules li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.rules li::before { content: "—"; color: var(--sand); }
.scope { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { font-size: 13px; border: 1px solid var(--line); background: var(--card); padding: 4px 10px; border-radius: 99px; color: var(--slate); }
.btn { border: 0; border-radius: 3px; padding: 13px 22px; font-weight: 600; letter-spacing: .02em; background: var(--accent); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 8px 14px; font-size: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.status { font-size: 13px; color: var(--mute); }

/* Sticky instrument bar */
.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--card); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 18px; padding-block: 10px; }
.clock { font-family: var(--f-mono); font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; min-width: 4.5ch; }
.clock.low { color: var(--accent); }
.prog { flex: 1; min-width: 0; display: grid; gap: 4px; }
.prog small { font-family: var(--f-mono); font-size: 12px; color: var(--mute); }
.track { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.track i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }
@media (prefers-reduced-motion: reduce) { .track i { transition: none; } }

/* Questions */
.theme-h { margin: 40px 0 14px; display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.theme-h:first-child { margin-top: 8px; }
.theme-h h2 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 20px; }
.theme-h span { font-family: var(--f-mono); font-size: 12px; color: var(--mute); margin-left: auto; white-space: nowrap; }
.q { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 18px 18px 14px; margin-bottom: 14px; scroll-margin-top: 90px; }
.q-n { font-family: var(--f-mono); font-size: 12px; color: var(--mute); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.q-multi { color: var(--accent); }
.q-t { margin: 4px 0 12px; font-weight: 500; font-size: 17px; line-height: 1.45; }
.opts { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.opt { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 9px 10px; border: 1px solid transparent; border-radius: 3px; cursor: pointer; }
.opt:hover { background: var(--paper); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .k { width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-family: var(--f-mono); font-size: 12px; color: var(--slate); margin-top: 1px; }
.opts.multi .opt .k { border-radius: 3px; }
.opt input:checked + .k { background: var(--ink); color: var(--card); border-color: var(--ink); }
.opt:has(input:checked) { border-color: var(--line); background: var(--paper); }
.opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }

.submit-box { margin-top: 36px; border-top: 2px solid var(--ink); padding-top: 20px; display: grid; gap: 14px; }
.submit-box h2 { margin: 0; font-family: var(--f-display); font-size: 22px; font-weight: 600; }
.gaps { display: flex; flex-wrap: wrap; gap: 6px; }
.gap { font-family: var(--f-mono); font-size: 12px; border: 1px solid var(--accent); color: var(--accent); background: transparent; border-radius: 2px; padding: 3px 7px; }
.confirm { border: 1px solid var(--accent); background: var(--accent-soft); padding: 14px; border-radius: 4px; display: grid; gap: 12px; }

/* Results */
.score { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 22px; }
.score-big { font-family: var(--f-mono); font-size: 52px; line-height: 1; font-weight: 500; font-variant-numeric: tabular-nums; }
.score-big small { font-size: 22px; color: var(--mute); }
.verdict { display: inline-block; font-weight: 600; padding: 3px 10px; border-radius: 2px; font-size: 14px; }
.verdict.pass { background: var(--ok-soft); color: var(--ok); }
.verdict.fail { background: var(--bad-soft); color: var(--bad); }
.score .meta { display: grid; gap: 6px; font-size: 14px; color: var(--slate); }
@media (max-width: 520px) { .score { grid-template-columns: 1fr; } }
.themes { margin: 22px 0 8px; display: grid; gap: 10px; }
.th-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 56px; gap: 12px; align-items: center; font-size: 14px; }
.th-row .mono { text-align: right; font-size: 13px; }
.meter { height: 8px; background: var(--line); border-radius: 1px; position: relative; overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--ok); }
.meter i.weak { background: var(--accent); }
.meter::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--pass, 75%); width: 1px; background: var(--ink); opacity: .5; }
@media (max-width: 520px) { .th-row { grid-template-columns: minmax(0, 1fr) 80px 50px; } }
.legend { font-size: 12px; color: var(--mute); }
.corr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 34px 0 12px; }
.corr-head h2 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 22px; }
.toggle { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--slate); margin-left: auto; cursor: pointer; }
.c-item { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--ok); border-radius: 3px; padding: 14px 16px; margin-bottom: 10px; }
.c-item.wrong { border-left-color: var(--bad); }
.c-item.none { border-left-color: var(--sand); }
.c-opts { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; font-size: 15px; }
.c-opts li { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; padding: 4px 6px; border-radius: 2px; }
.c-opts li.good { background: var(--ok-soft); color: var(--ok); font-weight: 500; }
.c-opts li.picked-bad { background: var(--bad-soft); color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1px; }
.c-opts li .k { font-family: var(--f-mono); font-size: 12px; padding-top: 2px; }
.c-opts li .mine { font-family: var(--f-mono); font-size: 11px; padding-top: 3px; white-space: nowrap; text-decoration: none; display: inline-block; }
.c-exp { font-size: 14px; color: var(--slate); margin: 6px 0 0; }
.c-src { font-family: var(--f-mono); font-size: 11.5px; color: var(--sand); margin-top: 6px; }

/* Admin */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
th { font-family: var(--f-mono); font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: var(--paper); }
tbody tr[aria-selected="true"] td { background: var(--paper); }
.pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; font-weight: 500; }
.pill.run { background: var(--sand-soft); color: var(--sand); }
.pill.pass { background: var(--ok-soft); color: var(--ok); }
.pill.fail { background: var(--bad-soft); color: var(--bad); }
.detail { margin-top: 26px; }
.detail-h { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.detail-h h2 { margin: 0; font-family: var(--f-display); font-size: 22px; font-weight: 600; }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: 4px; padding: 26px; text-align: center; color: var(--mute); }

/* Hub: catalogue of tests */
.back { justify-self: start; background: transparent; border: 0; padding: 0; color: var(--band-mute); font-size: 14px; }
.back:hover { color: var(--band-fg); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.tcard { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 20px; display: grid; gap: 12px; grid-template-rows: auto auto 1fr auto auto; min-width: 0; }
.tcard h2 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 21px; line-height: 1.25; text-wrap: balance; }
.tcard p { margin: 0; color: var(--slate); font-size: 14.5px; }
.specs { display: flex; flex-wrap: wrap; gap: 4px 16px; font-family: var(--f-mono); font-size: 12.5px; color: var(--mute); padding-top: 12px; border-top: 1px solid var(--line); }
.specs b { color: var(--ink); font-weight: 500; }
.lang { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--mute); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 5px 12px; font-family: var(--f-mono); font-size: 12px; color: var(--slate); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--card); }
.tfoot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.pill.todo { background: var(--paper); color: var(--slate); }
.hub-note { margin-top: 22px; }

.field { display: grid; gap: 6px; max-width: 380px; margin-bottom: 24px; }
.field label { font-weight: 500; }
.field input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--card); color: var(--ink); }
.field small { color: var(--mute); font-size: 13px; }

/* Admin */
.adm-h { font-family: var(--f-display); font-weight: 600; font-size: 20px; margin: 30px 0 12px; }
.adm-h:first-child { margin-top: 0; }
td.num, th.num { text-align: right; }
.matrix tbody tr { cursor: default; }
.matrix tbody tr:hover td { background: transparent; }
.cellbtn { border: 1px solid transparent; background: transparent; padding: 3px; border-radius: 99px; }
.cellbtn[aria-pressed="true"] { border-color: var(--ink); }
.cellbtn .pill { white-space: nowrap; }
.dash { color: var(--mute); }

/* Page autonome : reset que le lecteur d'artifacts ajoutait */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }

/* Message plein écran (lien invalide, connexion) */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 24px; display: grid; gap: 14px; max-width: 520px; }
.panel h2 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 22px; }
.panel p { margin: 0; color: var(--slate); }
.err { color: var(--bad); font-size: 14px; min-height: 1.4em; }

/* Espace manager */
.band .actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }
.band .btn.ghost { color: var(--band-fg); border-color: var(--band-mute); text-decoration: none; display: inline-block; }
.invite { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 20px; display: grid; gap: 14px; }
.invite .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px 16px; }
.invite .field { margin: 0; max-width: none; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; border: 0; padding: 0; margin: 0; min-width: 0; }
.checks legend { font-weight: 500; padding: 0; margin-bottom: 6px; }
.checks label { display: inline-flex; gap: 8px; align-items: center; font-size: 15px; cursor: pointer; }
.linkbox { display: grid; gap: 8px; border-left: 3px solid var(--ok); background: var(--ok-soft); padding: 12px 14px; border-radius: 2px; }
.linkbox code { font-family: var(--f-mono); font-size: 13px; overflow-wrap: anywhere; color: var(--ink); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 30px 0 12px; }
.toolbar .adm-h { margin: 0; }
.search { font: inherit; font-size: 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--card); color: var(--ink); min-width: 0; width: 240px; max-width: 100%; }
.who { display: grid; gap: 1px; }
.who button { background: transparent; border: 0; padding: 0; text-align: left; font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.who button:hover { text-decoration-color: var(--ink); }
.who small { color: var(--mute); font-size: 12.5px; }
.todo-txt { font-size: 12.5px; color: var(--mute); }
.linkbtn { background: transparent; border: 1px solid var(--line); border-radius: 3px; padding: 4px 10px; font-size: 13px; color: var(--slate); white-space: nowrap; }
.linkbtn:hover { border-color: var(--ink); color: var(--ink); }
.copied { font-size: 12px; color: var(--ok); margin-left: 6px; }
.danger { border-color: var(--bad) !important; color: var(--bad) !important; }

/* Évolution sur plusieurs tentatives */
.hchart { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px 4px; }
.hchart svg { display: block; width: 100%; height: auto; }
.hchart .grid { stroke: var(--line); stroke-width: 1; }
.hchart .axis text { fill: var(--mute); font-family: var(--f-mono); font-size: 11px; }
.hchart .passline { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 4 4; }
.hchart .passlbl { fill: var(--accent); font-family: var(--f-mono); font-size: 11px; }
.hchart .line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.hchart circle { stroke: var(--card); stroke-width: 2; }
.hchart circle.pass { fill: var(--ok); }
.hchart circle.fail { fill: var(--bad); }
.hchart .val { fill: var(--ink); font-family: var(--f-mono); font-size: 12px; font-weight: 500; }
.evo { min-width: 420px; }
.evo td.ok { color: var(--ok); }
.evo td.weak { color: var(--bad); }
.evo td.up { color: var(--ok); font-weight: 500; }
.evo td.down { color: var(--bad); font-weight: 500; }
.evo tbody tr { cursor: default; }
.evo tbody tr:hover td { background: transparent; }
.evo tr.total td { font-weight: 500; border-top: 1px solid var(--ink); }
.hist { min-width: 560px; }
.hist tbody tr { cursor: default; }
.hist tbody tr[aria-selected="true"] td { background: var(--paper); }
.hist .acts { display: flex; gap: 6px; justify-content: flex-end; }
.sect-h { font-family: var(--f-display); font-weight: 600; font-size: 18px; margin: 28px 0 10px; }
.count { font-family: var(--f-mono); font-size: 11px; color: var(--mute); margin-left: 6px; white-space: nowrap; }
.pill.reopen { background: var(--sand-soft); color: var(--sand); }
.prev { font-size: 13px; color: var(--mute); }

/* Référentiel des questions (espace manager) */
.qb { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 16px 18px; margin-bottom: 12px; scroll-margin-top: 16px; }
.qb.target { outline: 2px solid var(--focus); outline-offset: 2px; }
.qb-h { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 4px; }
.qb-ref { font-family: var(--f-mono); font-weight: 600; font-size: 14px; color: var(--ink); letter-spacing: .02em; }
.qb-theme { font-size: 13px; color: var(--mute); }
.qb-acts { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qb-multi { font-family: var(--f-mono); font-size: 12px; margin: -6px 0 8px; }
.qb-opts li { grid-template-columns: 24px minmax(0, 1fr) 110px; align-items: center; }
.qb-pick { position: relative; display: block; height: 20px; background: var(--paper); border-radius: 2px; overflow: hidden; }
.qb-pick i { position: absolute; inset: 0 auto 0 0; background: var(--line); }
.qb-pick b { position: relative; display: block; text-align: right; padding-right: 6px; line-height: 20px; font-family: var(--f-mono); font-size: 11.5px; font-weight: 500; color: var(--slate); }
.c-opts li.good .qb-pick { background: var(--card); }
.c-opts li.good .qb-pick i { background: var(--ok); opacity: .3; }
a.linkbtn { text-decoration: none; display: inline-block; }
select.search { width: auto; }
@media (max-width: 520px) { .qb-opts li { grid-template-columns: 24px minmax(0, 1fr) 64px; } .qb-acts { margin-left: 0; } }
.qb.off { opacity: .62; border-style: dashed; }
.qb.off:hover, .qb.off.target { opacity: 1; }
.settings { margin-bottom: 8px; }
.num-in { font: inherit; width: 6.5em; padding: 8px 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--card); color: var(--ink); font-variant-numeric: tabular-nums; }
.num-in:disabled { opacity: .5; }

/* Éditeur de question (espace manager) */
.editor { border-color: var(--focus); margin: 0 0 14px; }
.ed-wide { max-width: none; margin: 0; }
.ed-lbl { font-weight: 500; }
.ed-area, .ed-line { font: inherit; width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 3px; background: var(--card); color: var(--ink); }
.ed-area { resize: vertical; line-height: 1.5; }
.ed-fmt { display: grid; gap: 6px; }
.ed-opts { display: grid; gap: 6px; }
.ed-opt { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 3px; }
.ed-opt.good { background: var(--ok-soft); }
.ed-opt .k { font-family: var(--f-mono); font-size: 12px; color: var(--slate); text-align: center; }
.ed-opt .toggle { font-size: 13px; white-space: nowrap; }
.ed-warn:not(:empty) { border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--ink); padding: 10px 12px; border-radius: 2px; }
.err ul { margin: 6px 0 0; padding-left: 18px; }
.linkbtn:disabled { opacity: .4; cursor: not-allowed; }
.missing { border-left: 3px solid var(--sand); }
.missing-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.missing-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.missing-q { color: var(--slate); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) {
  .ed-opt { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .ed-opt .toggle { grid-column: 2; }
  .missing-list li { grid-template-columns: 1fr; }
}
.ed-ans { min-height: 2.6em; resize: vertical; }

/* Liens de navigation dans le bandeau (accueil, espace manager) */
.brand { flex-wrap: wrap; }
.band-link { margin-left: auto; font-family: var(--f-body); font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--band-mute); text-decoration: none; border-bottom: 1px solid transparent; }
.band-link:hover { color: var(--band-fg); border-bottom-color: var(--band-mute); }
.band .btn.ghost[href] { text-decoration: none; }

/* Accueil du site */
.home-cards { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.home-card { grid-template-rows: auto auto auto 1fr; align-content: start; }
.home-form { display: grid; gap: 6px; }
.home-form label { font-weight: 500; font-size: 14px; }
.home-form .search { width: 12em; font-family: var(--f-mono); letter-spacing: .06em; text-transform: uppercase; }
.resume-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; }
.resume-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; font-size: 14px; }

/* Certificat sur la page de résultat */
.cert-box { display: grid; grid-template-columns: 6px 1fr; gap: 16px; margin-top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 18px 20px; }
.cert-mark { background: var(--ok); border-radius: 2px; }
.cert-body { display: grid; gap: 8px; }
.cert-body h2 { margin: 0; font-family: var(--f-display); font-weight: 600; font-size: 20px; }
.cert-body p { margin: 0; color: var(--slate); }

/* Organisations (espace manager) */
.org-tag { color: var(--slate) !important; font-weight: 500; }
.warn-txt { color: var(--accent) !important; }
.who-name { font-weight: 500; }
.org-res { display: flex; flex-wrap: wrap; gap: 4px; }
.org-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 12px; margin-bottom: 10px; }
.linkbox.resp { border-left-color: var(--sand); background: var(--sand-soft); }
.big-code { font-size: 17px !important; font-weight: 600; letter-spacing: .08em; }
.org-edit { margin-top: 20px; }
.org-edit summary { cursor: pointer; font-weight: 500; margin-bottom: 10px; }
.join { max-width: 640px; margin-top: 14px; }

/* Rapport d'organisation et vérification de certificat (pages rendues par le serveur) */
.rep { margin-bottom: 26px; }
.rep-t { min-width: 520px; }
.rep-t tbody tr { cursor: default; }
.rep-t tbody tr:hover td { background: transparent; }
.rep-note { margin-top: 18px; }
.verif dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 4px 0; }
.verif dt { color: var(--mute); }
.verif dd { margin: 0; font-weight: 500; }
@media print {
  .no-print, .band-link, #printBtn { display: none !important; }
  .band { background: #fff !important; color: #000 !important; border-bottom: 2px solid #000; }
  .band p, .brand span { color: #333 !important; }
  body { background: #fff; }
  .table-wrap { overflow: visible; border-color: #999; }
  .pill { border: 1px solid #999; }
}
