/* TonTCF — design system. Mobile-first, léger (polices en variable woff2 hébergées ici, ~50 Ko au total, mises en
   cache par le service worker : un seul coût, jamais répété), clair/sombre automatique. */
@font-face {
  font-family: 'Sora'; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url('../fonts/sora-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  /* Réservée aux documents CE de type « annonce manuscrite » (imite un mot écrit à la main sur papier). */
  font-family: 'Caveat'; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url('../fonts/caveat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
:root {
  --bg: #f4f6fb; --surface: #ffffff; --surface-2: #eef2f8; --ink: #0e1a2e; --muted: #56657c; --line: #dfe5ee;
  --brand: #0b3d91; --brand-2: #1655c7; --brand-ink: #ffffff; --brand-soft: #e4ecfb; --teal: #0e7c86; --accent: #f0a30a; --accent-soft: #fff4d6;
  --ok: #117a55; --ok-soft: #dff5ec; --warn: #a15c07; --warn-soft: #fff1d9; --bad: #b3261e; --bad-soft: #fde8e6;
  --co: #2563eb; --ce: #0e7c86; --ee: #7c3aed; --eo: #d9480f; --gv: #64748b;
  --radius: 16px; --radius-sm: 10px; --shadow: 0 1px 2px rgba(15,27,45,.06), 0 6px 18px rgba(15,27,45,.06);
  --shadow-hover: 0 4px 10px rgba(15,27,45,.09), 0 16px 34px rgba(15,27,45,.12);
  /* Anneau de focus : distinct de --accent, qui n'a que 1,95:1 de contraste sur ce fond clair (WCAG exige 3:1 pour les indicateurs d'interface). */
  --focus: #a15c07;
  --font: 'Manrope', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: 'Sora', var(--font);
  --max: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --surface: #121b2e; --surface-2: #18243b; --ink: #e8eefb; --muted: #97a6c0; --line: #24324d;
    --brand: #6ea0ff; --brand-ink: #071122; --brand-soft: #16254a; --teal: #4cc4cf; --accent: #ffc247; --accent-soft: #3a2d0c;
    --ok: #4fd4a0; --ok-soft: #10332a; --warn: #f5b04a; --warn-soft: #3a290c; --bad: #ff8a80; --bad-soft: #3b1714;
    --co: #7aa5ff; --ce: #4cc4cf; --ee: #b79bff; --eo: #ff9160; --gv: #9fb0c9;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --shadow-hover: 0 2px 6px rgba(0,0,0,.45), 0 18px 40px rgba(0,0,0,.5);
    --focus: #ffc247;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.grow { flex: 1; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 16px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(1.9rem, 5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.3rem, 3.2vw, 1.7rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-underline-offset: 2px; }
img, svg { max-width: 100%; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 620px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0; } .mt1 { margin-top: 1rem; } .mt2 { margin-top: 2rem; } .mb0 { margin-bottom: 0; } .mb1 { margin-bottom: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { vertical-align: -4px; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

/* ---------- En-tête */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.bar-nav { display: flex; align-items: center; gap: 12px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--teal)); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .95rem; }
.brand small { font-weight: 600; color: var(--muted); font-size: .7rem; display: none; }
.nav-toggle { margin-left: auto; }
.nav-links { display: flex; flex-direction: column; gap: 2px; width: 100%; max-height: 0; opacity: 0; overflow: hidden;
  padding: 0 0 0; transition: max-height .28s ease, opacity .2s ease, padding .28s ease; }
.nav-links.open { max-height: 480px; opacity: 1; padding: 8px 0 14px; }
.nav-links a, .nav-links button.linklike { padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; text-align: left; background: none; border: 0; font: inherit; cursor: pointer; transition: background .15s ease, color .15s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.bar-nav-wrap { flex-wrap: wrap; }
@media (min-width: 900px) {
  .brand small { display: inline; }
  .btn.nav-toggle { display: none; }
  .nav-links { flex-direction: row; width: auto; max-height: none; opacity: 1; overflow: visible; padding: 0 !important; margin-left: auto; align-items: center; gap: 0; }
  .nav-links a, .nav-links button.linklike { padding: 9px 9px; font-size: .94rem; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-links { transition: none; }
}

/* ---------- Boutons, champs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 11px; border: 1.5px solid transparent; font-family: var(--font-display); font-size: .96rem; font-weight: 700; letter-spacing: -.005em; text-decoration: none; cursor: pointer; min-height: 44px; transition: transform .12s ease, filter .15s, background .15s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 8px 18px rgba(11,61,145,.22); }
.btn-accent { background: var(--accent); color: #2a1c00; }
.btn-accent:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-secondary { background: var(--surface); color: var(--brand); border-color: var(--brand); }
.btn-secondary:hover { background: var(--brand-soft); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }
.btn-danger { background: var(--bad); color: #fff; }
.btn-sm { padding: 7px 12px; min-height: 36px; font-size: .9rem; border-radius: 9px; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; }
label { display: block; font-weight: 650; margin: 0 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; min-height: 44px;
}
textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 3px solid var(--brand-soft); }
.field { margin-bottom: 14px; }
.field .err { color: var(--bad); font-size: .875rem; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.inline-form { display: inline; }

/* ---------- Cartes, grilles, alertes */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); transition: box-shadow .2s ease, border-color .2s ease; }
.card h2, .card h3 { margin-top: 0; }
.card.flat { box-shadow: none; }
.card.flat:hover { box-shadow: none; }
.card.accent { border-color: var(--accent); background: var(--accent-soft); }
.card:hover { box-shadow: var(--shadow-hover); }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: 1fr; } .grid.three { grid-template-columns: 1fr; } .grid.four { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .grid.two { grid-template-columns: repeat(2, 1fr); } .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.four { grid-template-columns: repeat(4, 1fr); } }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
@keyframes alertIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.alert { padding: 12px 14px; border-radius: 12px; border: 1px solid; margin: 0 0 14px; animation: alertIn .3s ease-out; }
.alert.info { background: var(--brand-soft); border-color: var(--brand); }
.alert.success { background: var(--ok-soft); border-color: var(--ok); }
.alert.warn { background: var(--warn-soft); border-color: var(--warn); }
.alert.error { background: var(--bad-soft); border-color: var(--bad); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.ai { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.lv { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 2px 10px; border-radius: 8px; font-weight: 800; font-size: .95rem; color: #fff; background: var(--gv); }
.lv-pre-A1, .lv-A1 { background: #7c8aa3; } .lv-A2 { background: #5b8dd6; } .lv-B1 { background: #1f9d8a; } .lv-B2 { background: #2f8f4e; } .lv-C1 { background: #c27a0e; } .lv-C2 { background: #b3261e; }
.sk { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.sk-CO { background: var(--co); } .sk-CE { background: var(--ce); } .sk-EE { background: var(--ee); } .sk-EO { background: var(--eo); } .sk-GV { background: var(--gv); }
.big-num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
progress.bar { width: 100%; height: 10px; border: 0; border-radius: 99px; overflow: hidden; background: var(--surface-2); appearance: none; -webkit-appearance: none; display: block; }
progress.bar::-webkit-progress-bar { background: var(--surface-2); border-radius: 99px; }
progress.bar::-webkit-progress-value { background: var(--brand); border-radius: 99px; transition: width .3s; }
progress.bar::-moz-progress-bar { background: var(--brand); border-radius: 99px; }
progress.bar.ok::-webkit-progress-value { background: var(--ok); } progress.bar.ok::-moz-progress-bar { background: var(--ok); }
progress.bar.warn::-webkit-progress-value { background: var(--accent); } progress.bar.warn::-moz-progress-bar { background: var(--accent); }
progress.bar.bad::-webkit-progress-value { background: var(--bad); } progress.bar.bad::-moz-progress-bar { background: var(--bad); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 650; font-size: .85rem; }
.table-wrap { overflow-x: auto; }
details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
details > summary { cursor: pointer; padding: 12px 14px; font-weight: 700; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "▸"; display: inline-block; margin-right: 8px; transition: transform .15s; color: var(--muted); }
details[open] > summary::before { transform: rotate(90deg); }
details > .inner { padding: 0 14px 14px; }
ul.clean { list-style: none; padding: 0; margin: 0; } ul.clean li { padding: 6px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Accueil */
.hero { padding: 44px 0 34px; background:
    radial-gradient(900px 460px at 88% -12%, var(--brand-soft), transparent 60%),
    radial-gradient(700px 420px at -6% 105%, var(--accent-soft), transparent 55%),
    var(--bg); overflow: clip; }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.1fr .9fr; } }
.hero-visual { display: flex; justify-content: center; }
.hero-art { width: 100%; max-width: 440px; height: auto; }
.hero-orbit circle { animation: spin-slow 40s linear infinite; transform-origin: 255px 255px; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero-orbit circle { animation: none; } }
.steps { counter-reset: s; display: grid; gap: 14px; } @media (min-width: 720px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding-top: 44px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; top: 14px; left: 18px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; }
.feature .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 10px; }
.section { padding: 34px 0; }
.faq details + details { margin-top: 8px; }

/* ---------- Tableau de bord */
.level-card { display: flex; flex-direction: column; gap: 8px; }
.level-card .head { display: flex; justify-content: space-between; align-items: center; }
.level-card .head strong { display: flex; align-items: center; gap: 8px; }
.level-card .head .sk { margin-right: 0; flex: none; }
.action { display: grid; gap: 6px; }
.action .why summary { font-size: .85rem; padding: 6px 10px; font-weight: 600; color: var(--muted); }
.rule-id { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; }
.chart { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--line); stroke-width: 1; } .chart .lbl { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .l-CO { stroke: var(--co); } .chart .l-CE { stroke: var(--ce); } .chart .l-EE { stroke: var(--ee); } .chart .l-EO { stroke: var(--eo); }
.chart .d-CO { fill: var(--co); } .chart .d-CE { fill: var(--ce); } .chart .d-EE { fill: var(--ee); } .chart .d-EO { fill: var(--eo); }
.chart .line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: var(--muted); }

/* ---------- Épreuve (mode examen) */
.exam-mode .site-header { position: static; }
.exam-top { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); }
.exam-top .inner { display: flex; align-items: center; gap: 12px; padding: 10px 0; flex-wrap: wrap; }
.exam-top .title { font-weight: 800; }
.timer { margin-left: auto; text-align: right; min-width: 92px; }
.timer .t { font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.timer.low .t { color: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .timer.low .t { animation: none; } * { transition: none !important; } }
.qbox { margin-top: 18px; }
.passage { background: var(--surface-2); border-radius: 12px; padding: 16px; font-size: 1.08rem; line-height: 1.7; margin-bottom: 14px; white-space: pre-line; }

/* ---------- Documents CE mis en scène (SMS, messagerie, affiche, petite annonce, encart d'actualité) :
   même esprit que les documents authentiques du vrai TCF, jamais de simple paragraphe brut. */
.ce-doc { border-radius: 14px; margin-bottom: 14px; overflow: hidden; }
.ce-doc__body { white-space: pre-line; }

.ce-doc--sms { background: var(--surface-2); padding: 18px 14px 14px; }
.ce-doc--sms .ce-doc__phone-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .75rem; font-weight: 700; color: var(--muted); padding: 0 4px 10px; }
.ce-doc__status-icons { display: inline-flex; gap: 5px; align-items: center; color: var(--muted); }
.ce-doc__icon { width: 17px; height: 11px; }
.ce-doc--sms .ce-doc__bubble { background: var(--brand); color: var(--brand-ink); border-radius: 18px 18px 4px 18px; padding: 14px 16px; font-size: 1.05rem; line-height: 1.55; max-width: 92%; margin-left: auto; box-shadow: var(--shadow); }

.ce-doc--messenger { background: var(--surface-2); padding: 16px; display: flex; gap: 12px; align-items: flex-start; }
.ce-doc__avatar-wrap, .ce-doc__avatar-svg { flex: none; width: 46px; height: 46px; display: block; }
.ce-doc--messenger .ce-doc__col { flex: 1; min-width: 0; }
.ce-doc--messenger .ce-doc__from { font-weight: 800; font-family: var(--font-display); margin-bottom: 6px; }
.ce-doc--messenger .ce-doc__bubble { background: var(--surface); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 14px 16px; font-size: 1.05rem; line-height: 1.55; }

.ce-doc--poster { background: var(--brand-soft); border: 2px dotted var(--brand); padding: 30px 18px 22px; text-align: center; position: relative; }
.ce-doc__pin { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 30px; height: 30px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.2)); }
.ce-doc--poster .ce-doc__title { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--brand); margin: 0 0 10px; letter-spacing: -.01em; }
.ce-doc--poster .ce-doc__body { font-size: 1.05rem; line-height: 1.6; }

.ce-doc--classified { background: var(--surface-2); padding: 26px 20px 22px; position: relative; }
.ce-doc--classified::before { content: ''; position: absolute; inset: 8px; border: 1px dashed var(--muted); opacity: .4; border-radius: 8px; pointer-events: none; }
.ce-doc__tape { position: absolute; top: -8px; width: 60px; height: 24px; }
.ce-doc__tape--l { left: 18px; } .ce-doc__tape--r { right: 18px; }
.ce-doc--classified .ce-doc__body { font-family: 'Caveat', cursive; font-size: 1.55rem; line-height: 1.35; font-weight: 600; color: var(--ink); }

.ce-doc--news { background: var(--surface); border-left: 5px solid var(--teal); padding: 16px 18px; box-shadow: var(--shadow); }
.ce-doc__newshead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ce-doc__icon-lg { width: 22px; height: 22px; flex: none; }
.ce-doc--news .ce-doc__kicker { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--teal); margin: 0; }
.ce-doc--news .ce-doc__title { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; margin: 0 0 8px; }
.ce-doc--news .ce-doc__body { font-size: 1.03rem; line-height: 1.6; }
.qtext { font-size: 1.15rem; font-weight: 700; margin-bottom: 12px; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 13px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; min-height: 52px; }
.opt:hover:not([disabled]) { border-color: var(--brand); background: var(--brand-soft); }
.opt .k { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.opt[aria-checked="true"] { border-color: var(--brand); background: var(--brand-soft); }
.opt[aria-checked="true"] .k { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.opt[disabled] { cursor: default; opacity: .75; }
.opt.good { border-color: var(--ok); background: var(--ok-soft); } .opt.good .k { background: var(--ok); color: #fff; border-color: var(--ok); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); } .opt.wrong .k { background: var(--bad); color: #fff; border-color: var(--bad); }
/* La carte audio reste seule, pleine largeur, en haut (comme sur le vrai TCF). En dessous : avec image, elle est
   côte à côte avec les propositions à partir d'un écran ordinateur (720px), empilée avant ; sans image (la majorité
   des questions CO), .single centre les propositions dans une colonne plus étroite plutôt que sur toute la largeur. */
.co-body { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
.co-body.single { max-width: 640px; margin-left: auto; margin-right: auto; }
@media (min-width: 720px) {
  .co-body:not(.single) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
  .co-body:not(.single) .co-scene { height: 100%; }
}
.co-scene-card { padding: 0; overflow: hidden; }
.co-scene { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center; }
.audio-card { text-align: center; padding: 28px 16px; }
.wave { display: inline-flex; gap: 4px; align-items: flex-end; height: 40px; margin: 8px 0; }
.wave i { width: 6px; background: var(--brand); border-radius: 3px; height: 12px; }
.wave.on i { animation: wave 1s ease-in-out infinite; } .wave.on i:nth-child(2) { animation-delay: .15s; } .wave.on i:nth-child(3) { animation-delay: .3s; } .wave.on i:nth-child(4) { animation-delay: .45s; } .wave.on i:nth-child(5) { animation-delay: .6s; }
@keyframes wave { 0%, 100% { height: 10px; } 50% { height: 38px; } }
.exam-actions { display: flex; gap: 10px; margin-top: 16px; align-items: center; flex-wrap: wrap; }
.offline-banner { background: var(--warn-soft); border-bottom: 2px solid var(--warn); padding: 8px 16px; text-align: center; font-weight: 600; }
.feedback { border: 2px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 14px; background: var(--surface); }
.feedback.good { border-color: var(--ok); } .feedback.bad { border-color: var(--bad); }

/* ---------- Correction (bloc structuré) */
.corr { border-left: 5px solid var(--line); }
.corr.ok { border-left-color: var(--ok); } .corr.ko { border-left-color: var(--bad); } .corr.to { border-left-color: var(--warn); }
.corr dl { margin: 0; display: grid; gap: 10px; }
.corr dt { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.corr dd { margin: 2px 0 0; }
.verdict { font-weight: 800; }
.verdict.ok { color: var(--ok); } .verdict.ko { color: var(--bad); }
blockquote.ctx { margin: 6px 0; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; white-space: pre-line; }

/* ---------- Relevé de résultat (examen final, style attestation) */
@keyframes attestationIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes sealPop { from { opacity: 0; transform: scale(.4) rotate(-12deg); } to { opacity: 1; transform: none; } }
.attestation { position: relative; overflow: hidden; border: 1.5px solid var(--brand); border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow); padding: 0; animation: attestationIn .5s ease-out; }
.attestation:hover { box-shadow: var(--shadow-hover); }
.attestation .seal { animation: sealPop .6s .15s cubic-bezier(.34,1.56,.64,1) both; }
.attestation .band { background: linear-gradient(120deg, var(--brand), var(--teal)); color: var(--brand-ink); padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.attestation .band .eyebrow { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; opacity: .85; margin: 0 0 2px; }
.attestation .band h2 { margin: 0; color: inherit; }
.attestation .seal { width: 46px; height: 46px; border-radius: 999px; border: 2px solid rgba(255,255,255,.75); display: grid; place-items: center; font-weight: 800; font-size: .8rem; flex: none; }
.attestation .body { padding: 20px 22px 22px; }
.attestation .who { font-size: .9rem; color: var(--muted); margin: 0 0 14px; }
.attestation .who strong { color: var(--ink); }
.attestation .figures { display: grid; gap: 16px; grid-template-columns: 1fr; text-align: center; }
@media (min-width: 640px) { .attestation .figures { grid-template-columns: repeat(3, 1fr); text-align: left; } }
.attestation .figures .num { font-size: 2.4rem; font-weight: 800; line-height: 1; color: var(--brand); }
.attestation .figures .lbl { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; margin: 4px 0 0; }
.attestation .foot { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: .82rem; color: var(--muted); }
@media print { .site-header, .site-footer, .btn, .disclaimer, .no-print { display: none !important; } .attestation { box-shadow: none; } }

/* ---------- Écrit */
.wc { font-weight: 700; font-variant-numeric: tabular-nums; }
.wc.ok { color: var(--ok); } .wc.low { color: var(--warn); } .wc.over { color: var(--bad); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.tab { padding: 9px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-weight: 700; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.opinion { border-left: 4px solid var(--brand); padding: 8px 12px; background: var(--surface-2); border-radius: 0 10px 10px 0; margin: 8px 0; }
.opinion.contre { border-left-color: var(--bad); }
.saved { font-size: .85rem; color: var(--muted); }
.crit { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.crit .top { display: flex; justify-content: space-between; gap: 8px; font-weight: 650; }
.corr-item { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); margin-bottom: 8px; }
.corr-item del { color: var(--bad); } .corr-item ins { color: var(--ok); text-decoration: none; font-weight: 700; }
.userText { white-space: pre-wrap; background: var(--surface-2); padding: 12px; border-radius: 10px; }

/* ---------- Oral */
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; padding: 4px; }
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 16px; }
.bubble.examiner { background: var(--surface-2); border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble.candidate { background: var(--brand-soft); border-bottom-right-radius: 4px; align-self: flex-end; }
.bubble .who { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mic { width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.mic.rec { background: var(--bad); animation: pulse 1.2s infinite; }
.mic[disabled] { opacity: .45; cursor: not-allowed; }
.interim { min-height: 1.6em; color: var(--muted); font-style: italic; }
.scenario { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 12px; padding: 14px; font-weight: 600; }

/* ---------- Divers */
.site-footer { margin-top: 48px; padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; background: var(--surface); }
.site-footer a { color: var(--muted); }
.disclaimer { font-size: .85rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 14px; }
dialog { border: 0; border-radius: 16px; padding: 22px; max-width: 460px; width: calc(100% - 32px); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(8,15,30,.55); }
.kbd { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; font-size: .85em; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-page { text-align: center; padding: 70px 0; } .error-page .code { font-size: 4.5rem; font-weight: 800; color: var(--brand); line-height: 1; }
/* Apparition au défilement : classe posée uniquement par le JS (progressive enhancement — sans JS, tout reste visible). */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
.check-list label { font-weight: 500; }
.done-line { text-decoration: line-through; color: var(--muted); }
@media print { .site-header, .site-footer, .btn, .nav-links { display: none !important; } body { background: #fff; } }
