/* Le permis rapporteur : thème « auto-école » */
:root {
  --route: #2b2f36;
  --route-2: #3a3f48;
  --ligne: #f2d16c;
  --bleu: #196796;
  --bleu-clair: #e3f1f9;
  --cyan: #01aada;
  --rouge: #d7263d;
  --vert: #239150;
  --orange: #f28c28;
  --rose: #f6c9d4;
  --papier: #fbfaf5;
  --carte: #ffffff;
  --encre: #1d2433;
  --encre-2: #5a6478;
  --bord: #dfe3ea;
  --ombre: 0 2px 0 rgba(29, 36, 51, 0.08), 0 8px 24px rgba(29, 36, 51, 0.08);
  --rayon: 16px;
  --police: ui-rounded, 'SF Pro Rounded', 'Nunito', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--police);
  color: var(--encre);
  background: var(--papier);
  line-height: 1.5;
  font-size: 17px;
}
body.dys { font-family: 'OpenDyslexic', 'Comic Sans MS', var(--police); letter-spacing: 0.03em; word-spacing: 0.1em; }
a { color: var(--bleu); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--encre-2); }
.hidden { display: none !important; }
.center { text-align: center; }

/* ---------- En-tête ---------- */
.topbar { background: var(--route); color: #fff; position: relative; }
.topbar::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: repeating-linear-gradient(90deg, var(--ligne) 0 28px, transparent 28px 48px);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.brand img { height: 40px; width: auto; }
.brand .school { height: 44px; background: #fff; border-radius: 10px; padding: 4px 6px; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: #e9edf3; text-decoration: none; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current='page'] { background: rgba(255, 255, 255, 0.14); color: #fff; }
.nav .nav-prof { border: 1.5px solid rgba(255, 255, 255, 0.4); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 1rem;
  padding: 12px 20px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--bleu); color: #fff; text-decoration: none;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); }
.btn:focus-visible, .tool:focus-visible, input:focus-visible, .scene:focus-visible { outline: 3px solid var(--ligne); outline-offset: 2px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-jaune { background: var(--ligne); color: var(--route); }
.btn-vert { background: var(--vert); }
.btn-rouge { background: var(--rouge); }
.btn-gris { background: #e8ebf0; color: var(--encre); }
.btn-lg { font-size: 1.15rem; padding: 16px 26px; border-radius: 14px; }
.btn-sm { font-size: 0.9rem; padding: 7px 12px; border-radius: 9px; }
.btn-ms { background: #fff; color: #222; border: 1px solid #c8c8c8; box-shadow: none; }
.btn-ms svg { width: 20px; height: 20px; }

/* ---------- Accueil ---------- */
.hero { background: linear-gradient(180deg, #7fd3ef 0%, #d4f1fb 62%, #7cc46f 62%, #6bb55f 100%); position: relative; overflow: hidden; }
.hero .wrap { padding-top: 48px; padding-bottom: 130px; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 900; color: var(--route); letter-spacing: -0.02em; }
.hero h1 .tag { display: inline-block; background: var(--rose); border: 3px solid var(--route); border-radius: 12px; padding: 0 12px; transform: rotate(-2deg); }
.hero p.lead { font-size: 1.2rem; max-width: 560px; color: #243049; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.road { position: absolute; left: 0; right: 0; bottom: 0; height: 96px; background: var(--route); }
.road::before { content: ''; position: absolute; left: 0; right: 0; top: 45px; height: 6px; background: repeating-linear-gradient(90deg, #fff 0 40px, transparent 40px 80px); }
.road .car { position: absolute; bottom: 30px; left: -140px; width: 130px; animation: drive 14s linear infinite; }
@keyframes drive { to { left: 110%; } }
@media (prefers-reduced-motion: reduce) { .road .car { animation: none; left: 8%; } }
.hero-art { position: absolute; right: 4%; top: 30px; width: min(380px, 40vw); z-index: 0; opacity: 0.95; }
@media (max-width: 760px) { .hero-art { display: none; } }

.code-box { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px; margin-top: 24px; position: relative; z-index: 2; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border-top: 6px solid var(--ligne); }
.code-box h2 { font-size: 1.2rem; margin: 0; }
.code-box form { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.code-box input { flex: 1; min-width: 0; }

section.block { padding: 40px 0 8px; }
section.block > .wrap > h2 { font-size: 1.6rem; display: flex; align-items: center; gap: 10px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 8px; border: 2px solid transparent; transition: transform 0.12s, border-color 0.12s; }
a.card:hover { transform: translateY(-3px); border-color: var(--bleu); }
.card h3 { margin: 0; font-size: 1.1rem; }
.card p { margin: 0; color: var(--encre-2); font-size: 0.95rem; }
.card .stars { color: var(--orange); font-size: 1.1rem; letter-spacing: 2px; margin-top: auto; }
.sign { width: 56px; height: 56px; flex: none; }
.badge { display: inline-block; font-size: 0.78rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: var(--bleu-clair); color: var(--bleu); text-transform: uppercase; letter-spacing: 0.04em; }
.badge-vert { background: #dff3e7; color: var(--vert); }
.badge-rouge { background: #fbe3e6; color: var(--rouge); }
.badge-orange { background: #fdebd8; color: #b35d08; }

.exam-card { background: var(--route); color: #fff; border-radius: var(--rayon); padding: 28px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; box-shadow: var(--ombre); position: relative; overflow: hidden; }
.exam-card h2 { color: #fff; }
.exam-card ul { margin: 0; padding-left: 20px; color: #d7dde7; }
.exam-card::before { content: ''; position: absolute; inset: auto 0 0 0; height: 6px; background: repeating-linear-gradient(90deg, var(--ligne) 0 30px, transparent 30px 50px); }
@media (max-width: 640px) { .exam-card { grid-template-columns: 1fr; } }

footer.foot { margin-top: 56px; background: var(--route); color: #c5ccd8; font-size: 0.9rem; padding: 26px 0; }
footer.foot a { color: #fff; }

/* ---------- Formulaires ---------- */
input[type='text'], input[type='number'], select {
  font: inherit; padding: 11px 14px; border-radius: 10px; border: 2px solid var(--bord); background: #fff; color: var(--encre);
}
input.code-input { text-transform: uppercase; letter-spacing: 0.2em; font-weight: 800; }
label.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
label.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--bleu); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 700; font-size: 0.95rem; }

/* ---------- Atelier (exercice / épreuve) ---------- */
.workshop { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; padding: 18px 0; }
@media (max-width: 900px) { .workshop { grid-template-columns: 1fr; } }
.board { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 10px; }
.panel { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 18px; position: sticky; top: 12px; }
.panel h2 { font-size: 1.15rem; }
.consigne { font-size: 1.2rem; font-weight: 800; margin: 0 0 12px; }
.consigne .ang { font-family: 'Cambria Math', 'STIX Two Math', Georgia, serif; font-size: 1.35rem; font-weight: 600; }
.answer-row { display: flex; gap: 6px; align-items: stretch; margin-bottom: 12px; }
.answer-row input { width: 100%; font-size: 1.6rem; font-weight: 800; text-align: center; padding: 8px; }
.answer-row .unit { font-size: 1.6rem; font-weight: 800; align-self: center; }
.answer-row .tool { font-size: 1.3rem; }
.tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; padding: 8px 4px 2px; }
.tool { font: inherit; font-weight: 700; border: 2px solid var(--bord); background: #fff; border-radius: 10px; padding: 7px 12px; cursor: pointer; color: var(--encre); min-width: 48px; }
.tool:hover { border-color: var(--bleu); }
.help-keys { font-size: 0.85rem; color: var(--encre-2); margin: 12px 0 0; padding: 0; list-style: none; }
.help-keys li { margin: 3px 0; }
kbd { font-family: inherit; font-size: 0.8rem; font-weight: 700; background: #eef1f5; border: 1px solid #cfd5de; border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; }

.feedback { border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-weight: 600; }
.feedback.ok { background: #dff3e7; color: #135f32; }
.feedback.half { background: #fdebd8; color: #8a4505; }
.feedback.ko { background: #fbe3e6; color: #8f1425; }
.feedback strong { display: block; font-size: 1.15rem; }

/* Scène SVG */
.scene { width: 100%; height: auto; display: block; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 10px; }
.scene .paper { fill: #fff; }
.scene .ray { stroke: var(--encre); stroke-width: 2.6; stroke-linecap: round; }
.scene .ray-move { stroke: var(--orange); stroke-width: 3; }
.scene .ray-handle { fill: var(--orange); stroke: #fff; stroke-width: 3; cursor: grab; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.scene .vertex { fill: var(--encre); }
.scene .pt-cross { stroke: var(--encre); stroke-width: 2; }
.scene .pt-label { font-size: 26px; font-weight: 800; fill: var(--encre); text-anchor: middle; dominant-baseline: middle; font-style: italic; font-family: Georgia, serif; }
.scene .pt-move { fill: #b35d08; }
.scene .angle-arc { fill: rgba(255, 210, 63, 0.45); stroke: #d9a800; stroke-width: 1.5; }
.scene .angle-arc-correct { fill: rgba(35, 145, 80, 0.18); stroke: var(--vert); stroke-width: 2; }
.scene .ray-correct { stroke: var(--vert); stroke-width: 3; stroke-dasharray: 10 7; }
.scene .correct-label { font-size: 26px; font-weight: 900; fill: var(--vert); paint-order: stroke; stroke: #fff; stroke-width: 5px; }
.scene .protractor { cursor: grab; }
.scene.dragging .protractor, .scene.dragging .ray-handle { cursor: grabbing; }
.scene.locked .protractor, .scene.locked .ray-handle { cursor: default; }
.scene .pr-body { fill: rgba(150, 205, 255, 0.32); stroke: var(--bleu); stroke-width: 1.6; }
.scene .pr-inner { fill: none; stroke: var(--bleu); stroke-width: 0.8; opacity: 0.6; }
.scene .pr-base { stroke: var(--bleu); stroke-width: 1.4; }
.scene .pr-tick { stroke: #12355f; stroke-width: 0.9; }
.scene .pr-tick10 { stroke-width: 1.5; }
.scene .pr-label { font-size: 14px; font-weight: 700; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.scene .pr-outer { fill: #12355f; }
.scene .pr-innerlbl { fill: var(--rouge); font-size: 12.5px; }
.scene .pr-center { fill: #fff; stroke: var(--rouge); stroke-width: 2; }
.scene .pr-cross { stroke: var(--rouge); stroke-width: 1.4; }
.scene .on-vertex .pr-center { fill: var(--vert); stroke: var(--vert); }
.scene .pr-stem { stroke: var(--bleu); stroke-width: 2; }
.scene .pr-handle { cursor: alias; }
.scene .pr-handle circle { fill: var(--bleu); stroke: #fff; stroke-width: 3; }
.scene .pr-handle text { fill: #fff; font-size: 20px; font-weight: 900; pointer-events: none; }
.scene.no-protractor .protractor { display: none; }

/* Barre de progression « route » */
.progress-road { background: var(--route); border-radius: 999px; height: 34px; position: relative; margin: 6px 0 2px; overflow: hidden; }
.progress-road::before { content: ''; position: absolute; left: 14px; right: 14px; top: 16px; height: 3px; background: repeating-linear-gradient(90deg, #fff 0 14px, transparent 14px 26px); opacity: 0.7; }
.progress-road .car-mini { position: absolute; top: 3px; width: 44px; transition: left 0.5s; }
.progress-road .flag { position: absolute; right: 8px; top: 4px; font-size: 20px; }
.examhead { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; padding-top: 16px; }
.examhead .qnum { font-weight: 800; font-size: 1.1rem; }
.chrono { font-variant-numeric: tabular-nums; font-weight: 900; font-size: 1.3rem; background: var(--route); color: var(--ligne); padding: 4px 14px; border-radius: 10px; }
.chrono.warn { background: var(--rouge); color: #fff; }

/* Écran d'introduction / résultat */
.sheet { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 28px; max-width: 720px; margin: 28px auto; }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.rule { background: var(--bleu-clair); border-radius: 12px; padding: 12px; text-align: center; }
.rule b { display: block; font-size: 1.5rem; color: var(--bleu); }

.lights { display: inline-flex; gap: 8px; background: var(--route); padding: 8px 12px; border-radius: 30px; }
.lights i { width: 26px; height: 26px; border-radius: 50%; background: #555; display: block; }
.lights.rouge i:nth-child(1) { background: var(--rouge); box-shadow: 0 0 14px var(--rouge); }
.lights.orange i:nth-child(2) { background: var(--orange); box-shadow: 0 0 14px var(--orange); }
.lights.vert i:nth-child(3) { background: #3fd07a; box-shadow: 0 0 14px #3fd07a; }
.bigscore { font-size: 4rem; font-weight: 900; line-height: 1; margin: 12px 0; }
.bigscore small { font-size: 1.6rem; color: var(--encre-2); }

/* Le permis (carte rose) */
.licence {
  width: 100%; max-width: 560px; aspect-ratio: 85.6 / 54; margin: 20px auto; border-radius: 18px;
  background: linear-gradient(135deg, #fbd9e2 0%, #f6c3d0 55%, #f1b3c4 100%);
  border: 2px solid #e095a8; position: relative; overflow: hidden; padding: 4.2% 5%; color: #3a1d27;
  box-shadow: 0 10px 30px rgba(120, 40, 70, 0.25); display: grid; grid-template-columns: 30% 1fr; gap: 4%;
  font-size: clamp(11px, 2.6vw, 15px);
}
.licence::before { content: ''; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 80% 30%, rgba(255,255,255,.18) 0 2px, transparent 2px 9px); pointer-events: none; }
.licence .l-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; border-bottom: 2px solid rgba(58, 29, 39, 0.25); padding-bottom: 4px; }
.licence .l-head .eu { background: var(--bleu); color: var(--ligne); font-weight: 900; border-radius: 6px; padding: 2px 8px; font-size: 0.9em; }
.licence .l-head strong { font-size: 1.25em; letter-spacing: 0.03em; }
.licence .l-photo { background: rgba(255,255,255,.6); border-radius: 10px; display: grid; place-items: center; border: 2px dashed rgba(58,29,39,.3); }
.licence .l-photo svg { width: 80%; }
.licence dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-content: start; }
.licence dt { font-weight: 800; opacity: 0.7; }
.licence dd { margin: 0; font-weight: 700; }
.licence .stamp { position: absolute; right: 5%; bottom: 8%; transform: rotate(-12deg); border: 3px solid currentColor; border-radius: 10px; padding: 2px 10px; font-weight: 900; text-transform: uppercase; font-size: 1.05em; opacity: 0.85; }
.stamp.or { color: #a87800; } .stamp.argent { color: #5d6b7c; } .stamp.bronze { color: #9a5a22; } .stamp.aucune { color: var(--rouge); }

.details { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 0.95rem; }
.details th, .details td { padding: 8px; border-bottom: 1px solid var(--bord); text-align: left; }
.details td.pts { font-weight: 800; }

/* ---------- Tableaux prof ---------- */
.table-wrap { overflow-x: auto; background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.data th { background: #f2f4f8; text-align: left; padding: 10px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--encre-2); white-space: nowrap; }
table.data td { padding: 10px; border-top: 1px solid var(--bord); vertical-align: middle; }
table.data tr:hover td { background: #fafbfd; }
.pill-open { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.pill-open::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #9aa3b2; }
.pill-open.on::before { background: #3fd07a; box-shadow: 0 0 8px #3fd07a; }
.code-big { font-size: clamp(2.4rem, 8vw, 5rem); font-weight: 900; letter-spacing: 0.15em; color: var(--route); background: var(--ligne); border-radius: 16px; padding: 4px 22px; display: inline-block; border: 4px solid var(--route); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 20px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: var(--carte); border-radius: 14px; box-shadow: var(--ombre); padding: 14px; }
.stat b { display: block; font-size: 1.7rem; }
.stat span { color: var(--encre-2); font-size: 0.88rem; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--route); color: #fff; padding: 12px 20px; border-radius: 12px; z-index: 50; box-shadow: var(--ombre); font-weight: 700; }
dialog { border: 0; border-radius: var(--rayon); box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 24px; max-width: min(720px, 94vw); }
dialog::backdrop { background: rgba(20, 24, 33, 0.55); }

/* Tutoriel */
.steps { display: flex; gap: 6px; margin-bottom: 12px; }
.steps i { flex: 1; height: 8px; border-radius: 4px; background: var(--bord); }
.steps i.done { background: var(--vert); }
.steps i.cur { background: var(--ligne); }
.tip { background: #fff8db; border-left: 5px solid var(--ligne); padding: 10px 12px; border-radius: 8px; font-size: 0.95rem; }

@media print {
  body { background: #fff; }
  .topbar, footer.foot, .no-print, .nav { display: none !important; }
  .sheet { box-shadow: none; margin: 0 auto; }
  .licence { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Notation de l'angle avec un chapeau (widehat) */
.hat { position: relative; display: inline-block; padding-top: 0.32em; line-height: 1; }
.hat::before {
  content: ''; position: absolute; top: 0; left: 4%; right: 4%; height: 0.36em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath d='M2 18 L50 3 L98 18' fill='none' stroke='%231d2433' stroke-width='1.8' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
label.check.field { flex-direction: row; align-items: center; }
.licence { text-align: left; grid-template-rows: auto 1fr; }
@media (max-width: 600px) {
  body { font-size: 16px; }
  .topbar .wrap { gap: 6px; min-height: 0; }
  .nav { margin-left: 0; }
  .nav a { padding: 4px 9px; font-size: 0.85rem; }
  .tool { padding: 6px 9px; min-width: 0; }
  .sheet { padding: 20px; }
}

/* Zone de travail plus grande, zoom et plein écran */
.wrap.wide { max-width: 1500px; }
.workshop { grid-template-columns: minmax(0, 1fr) 290px; }
@media (max-width: 900px) { .workshop { grid-template-columns: 1fr; } }
.scene { max-height: calc(100vh - 150px); }
.scene.zoomed { cursor: grab; }
.scene.zoomed.dragging { cursor: grabbing; }
.tools { gap: 14px; }
.tool-group { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.workshop:fullscreen { background: var(--papier); padding: 14px; overflow: auto; align-content: start; max-width: none; }
.workshop:fullscreen .scene { max-height: calc(100vh - 90px); }
.workshop:fullscreen .panel { top: 0; }

/* ---------- Mode focus (pages d'exercice) ---------- */
.focus-zone, .focus-handle { display: none; }
body.focus .focus-zone { display: block; position: fixed; top: 0; left: 0; right: 0; height: 14px; z-index: 38; }
body.focus .focus-handle {
  display: block; position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 39;
  font: inherit; font-size: 0.78rem; font-weight: 700; color: #fff; background: var(--route);
  border: 0; border-radius: 0 0 10px 10px; padding: 2px 14px 4px; cursor: pointer; opacity: 0.75;
}
body.focus .focus-handle:hover { opacity: 1; }
body.focus #top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  transform: translateY(-105%); transition: transform 0.22s ease;
}
body.focus.show-top #top { transform: none; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); }
body.focus #bottom { display: none; }
body.focus main.wrap { max-width: none; padding: 10px 12px; }
body.focus .workshop {
  height: calc(100vh - 20px); height: calc(100dvh - 20px);
  padding: 0; gap: 12px; grid-template-columns: minmax(0, 1fr) 300px;
}
body.focus .board { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 6px; }
body.focus .scene { flex: 1; min-height: 0; height: 100%; max-height: none; }
body.focus .tools { padding-top: 6px; }
body.focus .panel { position: static; height: 100%; overflow: auto; }
.panel .examhead { padding-top: 0; }
.panel .progress-road { height: 28px; }
.panel .progress-road .car-mini { width: 36px; top: 3px; }
.panel .progress-road::before { top: 13px; }
.panel .progress-road .flag { top: 1px; font-size: 18px; }
@media (max-width: 900px) {
  body.focus .workshop { height: auto; grid-template-columns: 1fr; }
  body.focus .board { height: auto; }
  body.focus .scene { height: auto; max-height: 72vh; max-height: 72dvh; }
  body.focus main.wrap { padding: 26px 8px 8px; }
}

/* Modèles de rapporteur */
.scene .model-black .pr-body { fill: rgba(235, 238, 240, 0.38); stroke: #3a3f48; }
.scene .model-black .pr-inner, .scene .model-black .pr-base { stroke: #3a3f48; }
.scene .model-black .pr-tick { stroke: #1d2433; }
.scene .model-black .pr-outer, .scene .model-black .pr-innerlbl { fill: #1d2433; }
.scene .model-black .pr-innerlbl { font-size: 12px; }
.scene .model-black .pr-center { stroke: #1d2433; }
.scene .model-black .pr-cross { stroke: #1d2433; }
.model-wrap { position: relative; }
.model-menu {
  position: absolute; bottom: calc(100% + 8px); right: 0; z-index: 30; width: min(560px, 92vw);
  background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22); padding: 10px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
}
.model-menu.hidden { display: none; }
.model-item {
  font: inherit; font-size: 0.85rem; font-weight: 700; color: var(--encre); background: #f7f8fa;
  border: 2px solid transparent; border-radius: 10px; padding: 8px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
}
.model-item:hover { border-color: var(--bord); }
.model-item.current { border-color: var(--bleu); background: var(--bleu-clair); }
.model-item .model-preview { width: 100%; height: 70px; pointer-events: none; }
@media (max-width: 600px) {
  .model-menu { position: fixed; left: 4vw; right: 4vw; bottom: 12px; width: auto; grid-template-columns: 1fr 1fr; }
}
.scene .model-full .pr-label { font-size: 12.5px; }
.scene .model-full .pr-innerlbl { font-size: 10.5px; }
