/* Vompas — feuille de style.
   Mise en page : une table à dessin. L'outillage à gauche, la planche au centre,
   la règle graduée du programme en dessous. Polices auto-hébergées (licence OFL, voir assets/polices/licences). */

/* ---------- polices ---------- */
@font-face { font-family: 'Cedarville Cursive'; font-style: normal; font-weight: 400; font-display: swap; src: url('../polices/cedarville-cursive-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 500; font-display: swap; src: url('../polices/cormorant-garamond-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 600; font-display: swap; src: url('../polices/cormorant-garamond-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap; src: url('../polices/cormorant-garamond-latin-500-italic.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../polices/dm-sans-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../polices/dm-sans-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../polices/dm-sans-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'DM Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../polices/dm-mono-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url('../polices/eb-garamond-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'EB Garamond'; font-style: normal; font-weight: 400; font-display: swap; src: url('../polices/eb-garamond-greek-400.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }

/* ---------- jetons ---------- */
:root {
  --bg: #f5edd9;
  --panel: #fbf7ee;
  --table: #e7dbc0;
  --ink: #3a281e;
  --muted: #7a604e;
  --rule: #e0cfae;
  --accent: #c9a96e;
  --accent-ink: #8a6730;
  --sepia: #5c3d2e;
  --on-sepia: #f8f1e2;
  --veil: rgba(251, 247, 238, .94);
  --sheet-shadow: rgba(58, 40, 30, .30);
  --grid: rgba(92, 61, 46, .075);
  --f-display: 'Cormorant Garamond', 'Cormorant', Garamond, 'Times New Roman', serif;
  --f-ui: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'DM Mono', ui-monospace, Menlo, Consolas, monospace;
  --f-hand: 'Cedarville Cursive', 'Segoe Script', 'Bradley Hand', cursive;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1411; --panel: #231b16; --table: #110d0b; --ink: #efe3cb; --muted: #b39b84; --rule: #3b2e25;
    --accent: #d2b277; --accent-ink: #dfc38d; --sepia: #d9bd98; --on-sepia: #1a1411; --veil: rgba(35, 27, 22, .94);
    --sheet-shadow: rgba(0, 0, 0, .6); --grid: rgba(239, 227, 203, .045); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1a1411; --panel: #231b16; --table: #110d0b; --ink: #efe3cb; --muted: #b39b84; --rule: #3b2e25;
  --accent: #d2b277; --accent-ink: #dfc38d; --sepia: #d9bd98; --on-sepia: #1a1411; --veil: rgba(35, 27, 22, .94);
  --sheet-shadow: rgba(0, 0, 0, .6); --grid: rgba(239, 227, 203, .045); color-scheme: dark;
}

/* ---------- base ---------- */
html { box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); -webkit-text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: inherit; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.45 var(--f-ui);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* l'atelier occupe exactement l'écran */
html.page-atelier, html.page-atelier body { height: 100%; }
.page-atelier .app { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); }

/* ---------- en-tête ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding-block: 12px 10px; border-bottom: 1px solid var(--rule); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.brand .titre { display: block; margin: 0; font: 600 27px/1 var(--f-display); letter-spacing: .005em; color: var(--ink); white-space: nowrap; }
/* le V-compas se pose sur la ligne de base comme une lettre ; sa tête ronde descend un peu, comme le jambage du p */
.brand .titre .v { display: inline-block; width: .74em; height: .8em; vertical-align: -.14em; margin-right: -.07em; color: var(--sepia); overflow: visible; }
.brand .sous-titre { display: block; margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.nav { display: flex; gap: 4px; margin-right: auto; margin-left: 12px; }
.nav a { text-decoration: none; padding: 7px 10px; border-radius: 6px; font-weight: 500; font-size: 13.5px; color: var(--muted); }
.nav a:hover { color: var(--ink); background: var(--panel); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--sepia); border-radius: 0; }
.exports { display: flex; gap: 8px; flex: none; }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--rule); background: var(--panel); font-weight: 500; font-size: 13.5px; text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { border-color: var(--accent); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { background: var(--sepia); border-color: var(--sepia); color: var(--on-sepia); }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); }
.btn.small { min-height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.icon { width: 36px; padding: 0; }
.btn[disabled] { opacity: .45; cursor: default; }

/* ---------- plan de travail ---------- */
.work { display: grid; grid-template-columns: 304px minmax(0, 1fr); gap: 18px; min-height: 0; padding-block: 14px; }
.side { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 14px; padding: 2px 2px 4px; }
.side .panel { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 6px 6px 0; margin-right: -6px; scrollbar-width: thin; }

/* cartouche : le bloc-titre d'une planche technique */
.cartouche { display: grid; grid-template-columns: 1fr 1fr 1fr; border: 1px solid var(--sepia); border-radius: 2px; background: var(--panel); flex: none; }
.cartouche .cell { padding: 6px 9px 7px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); display: grid; gap: 1px; min-width: 0; }
.cartouche .wide { grid-column: 1 / -1; border-right: 0; }
.cartouche .last { border-right: 0; }
.cartouche .row2 { border-bottom: 0; }
.cartouche .k { font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.cartouche .v { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cartouche .v.big { font: 600 23px/1.1 var(--f-display); }
.cartouche .mono { font-family: var(--f-mono); font-size: 13px; font-variant-numeric: tabular-nums; }

.tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--rule); flex: none; }
.tabs button { border: 0; background: none; padding: 6px 0 8px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--sepia); }
.tabs .count { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); margin-left: 4px; }

.panel { display: flex; flex-direction: column; gap: 16px; }
.newrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.seed { display: flex; align-items: center; gap: 4px; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); padding: 0 8px; }
.seed span { font-family: var(--f-display); font-style: italic; font-size: 16px; color: var(--muted); }
.seed input { width: 64px; border: 0; background: none; font-family: var(--f-mono); font-size: 13px; padding: 7px 0; font-variant-numeric: tabular-nums; }
.seed input:focus { outline: none; }
.seed:focus-within { border-color: var(--accent); }

.group { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.group legend { padding: 0; margin-bottom: 8px; width: 100%; display: flex; justify-content: space-between; align-items: baseline; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.group legend output { font-family: var(--f-mono); letter-spacing: 0; text-transform: none; font-size: 12px; color: var(--ink); }
.note { margin: 0; font-size: 12px; color: var(--muted); }

.ratios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ratios button { display: grid; justify-items: center; padding: 5px 4px 6px; border: 1px solid var(--rule); border-radius: 5px; background: var(--panel); }
.ratios button b { font: 600 20px/1.05 var(--f-display); }
.ratios button small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.ratios button[aria-pressed="true"] { background: var(--sepia); border-color: var(--sepia); color: var(--on-sepia); }
.ratios button[aria-pressed="true"] small { color: inherit; opacity: .8; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: var(--panel); }
.seg button { border: 0; background: none; padding: 7px 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--sepia); color: var(--on-sepia); }
.seg button[disabled] { opacity: .4; cursor: default; }

input[type="range"].dens { width: 100%; accent-color: var(--sepia); margin: 0; }

.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.swatches button { display: grid; justify-items: center; gap: 4px; padding: 6px 2px 5px; border: 1px solid var(--rule); border-radius: 5px; background: var(--panel); font-size: 10.5px; color: var(--muted); }
.swatches button i { width: 28px; height: 28px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.swatches button[aria-pressed="true"] { border-color: var(--sepia); color: var(--ink); box-shadow: inset 0 0 0 1px var(--sepia); }

.toggles { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.toggles label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.toggles input { accent-color: var(--sepia); width: 15px; height: 15px; margin: 0; }

.field { width: 100%; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel); padding: 8px 10px; font-size: 13.5px; }
.field:focus { outline: none; border-color: var(--accent); }
.codebox { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.codebox .field { font-family: var(--f-mono); font-size: 12.5px; }
#btnAdd { width: 100%; }
.inks { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.inks button { aspect-ratio: 1; border: 1px solid var(--rule); border-radius: 50%; background: var(--panel); padding: 4px; display: grid; }
.inks button i { display: block; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.inks button i.auto { background: conic-gradient(var(--ink) 0 50%, var(--panel) 0) ; }
.inks button[aria-pressed="true"] { border-color: var(--sepia); box-shadow: 0 0 0 1px var(--sepia); }
.inkbar { display: flex; flex-wrap: wrap; gap: 6px; }
.panel .note b { font-weight: 600; color: var(--ink); }

.program { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.program button { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; text-align: left; border: 0; background: none; padding: 6px; border-radius: 4px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.program button:hover { background: var(--panel); color: var(--ink); }
.program .n { font-family: var(--f-mono); font-size: 11.5px; padding-top: 1px; font-variant-numeric: tabular-nums; }
.program li.done button { color: var(--ink); }
.program li.cur button { background: var(--panel); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); }

/* ---------- la planche ---------- */
.stagewrap { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; }
.stage {
  position: relative; min-height: 0; border-radius: 6px; overflow: hidden; touch-action: none; cursor: crosshair; outline: none;
  background-color: var(--table);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}
.stage.grab { cursor: grabbing; }
.stage:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* les commandes restent au-dessus des bulles d'aide, qui ne prennent jamais les clics */
.zoom { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; gap: 4px; }
.outils { position: absolute; top: 10px; left: 10px; z-index: 2; display: grid; gap: 4px; padding: 4px; border-radius: 8px; background: var(--veil); border: 1px solid var(--rule); }
.outils button { width: 34px; height: 34px; border-radius: 6px; border: 0; background: none; display: grid; place-items: center; padding: 0; color: var(--muted); }
.outils button svg { width: 18px; height: 18px; }
.outils button:hover { color: var(--ink); background: var(--panel); }
.outils button[aria-pressed="true"] { background: var(--sepia); color: var(--on-sepia); }
.stage[data-tool="courbe"], .stage[data-tool="segment"] { cursor: crosshair; }
.stage[data-tool="gomme"] { cursor: cell; }
.zoom button { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--rule); background: var(--veil); color: var(--ink); display: grid; place-items: center; padding: 0; }
.zoom button svg { width: 16px; height: 16px; }
.zoom button:hover { border-color: var(--accent); }
.zoom .sep { height: 1px; margin: 1px 5px; background: var(--rule); }
.zoom #btnBare svg { width: 18px; height: 18px; }
.zoom #btnBare[aria-pressed="true"] { background: var(--sepia); border-color: var(--sepia); color: var(--on-sepia); }
.info { position: absolute; left: 62px; bottom: 10px; z-index: 1; max-width: min(380px, calc(100% - 114px)); background: var(--veil); border: 1px solid var(--rule); border-radius: 6px; padding: 9px 12px 10px; box-shadow: 0 6px 20px rgba(0,0,0,.12); pointer-events: none; }
.info .i-head { display: flex; align-items: baseline; gap: 10px; }
.info .i-label { font: 600 19px/1.1 var(--f-display); }
.info .i-step { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.info .i-desc { margin: 3px 0 0; font-size: 13px; }
.info .i-meas { margin: 5px 0 0; font-family: var(--f-mono); font-size: 12px; color: var(--accent-ink); }
.hint { position: absolute; right: 10px; bottom: 10px; max-width: 250px; margin: 0; font-size: 12px; color: var(--muted); background: var(--veil); border: 1px solid var(--rule); border-radius: 6px; padding: 7px 10px; pointer-events: none; }
.toast { position: absolute; z-index: 3; left: 50%; top: 12px; transform: translateX(-50%); background: var(--sepia); color: var(--on-sepia); border-radius: 20px; padding: 6px 14px; font-size: 13px; box-shadow: 0 4px 14px rgba(0,0,0,.18); pointer-events: none; white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }

/* ---------- règle graduée ---------- */
.timeline { display: grid; grid-template-columns: auto auto auto minmax(0, 1fr) auto; grid-template-areas: "play prev next ruler speed" "cap cap cap cap cap"; align-items: center; gap: 6px 8px; }
#btnPlay { grid-area: play; width: 178px; }
#btnPrev { grid-area: prev; }
#btnNext { grid-area: next; }
#btnSpeed { grid-area: speed; font-family: var(--f-mono); min-width: 46px; }
.ruler { grid-area: ruler; position: relative; height: 36px; min-width: 0; }
.ruler svg { position: absolute; top: 0; bottom: 0; left: 7px; width: calc(100% - 14px); height: 100%; overflow: visible; }
.ruler input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: ew-resize; }
.ruler input::-webkit-slider-runnable-track { background: transparent; height: 36px; }
.ruler input::-moz-range-track { background: transparent; height: 36px; }
.ruler input::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 36px; border: 0; background: linear-gradient(90deg, transparent 6px, var(--accent-ink) 6px 8px, transparent 8px), radial-gradient(circle at 50% 30px, var(--accent-ink) 4px, transparent 4.5px); }
.ruler input::-moz-range-thumb { width: 14px; height: 36px; border: 0; border-radius: 0; background: linear-gradient(90deg, transparent 6px, var(--accent-ink) 6px 8px, transparent 8px), radial-gradient(circle at 50% 30px, var(--accent-ink) 4px, transparent 4.5px); }
.ruler input:focus-visible { outline: none; }
.ruler input:focus-visible::-webkit-slider-thumb { background-color: rgba(201,169,110,.25); }
.caption { grid-area: cap; margin: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.45em; }
.caption b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; margin-right: 6px; }
/* un lien ou un fichier montre une autre version que celle du carnet */
.reprise { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 7px 10px; border: 1px solid var(--accent); border-radius: 6px; background: var(--panel); font-size: 13px; }
.reprise span { flex: 1 1 260px; }
/* un fichier glissé au-dessus de la page */
html.depot body { box-shadow: inset 0 0 0 3px var(--accent); }
html.depot .stage::after { content: 'Déposer le fichier pour rouvrir la planche'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; padding: 10px 16px; border-radius: 20px; background: var(--sepia); color: var(--on-sepia); font-size: 14px; white-space: nowrap; pointer-events: none; }

/* ---------- pages de lecture : galerie, à propos ---------- */
.contenu { max-width: 1120px; margin: 0 auto; padding-block: 34px 56px; }
.intro { max-width: 62ch; margin-bottom: 28px; }
.intro h1, .prose h1 { margin: 0 0 8px; font: 600 clamp(32px, 5vw, 46px)/1.05 var(--f-display); text-wrap: balance; }
.intro p { margin: 0; font-size: 15.5px; color: var(--muted); }
.carnet-actions, .intro .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.intro .etat { margin-top: 12px; font-size: 14px; color: var(--ink); min-height: 1.4em; }

.mur { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 22px 18px; }
.vignette { display: grid; gap: 8px; align-content: start; min-width: 0; }
.vignette .v-lien { display: block; border-radius: 6px; overflow: hidden; }
.vignette canvas {
  display: block; width: 100%; aspect-ratio: 4 / 5; border-radius: 6px;
  background-color: var(--table);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 16px 16px;
  transition: transform .2s;
}
.vignette .v-lien:hover canvas { transform: scale(1.015); }
.v-titre { margin: 0; font: 600 18px/1.15 var(--f-display); }
.v-meta { margin: 0; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.v-sig { font-family: var(--f-hand); font-size: 15px; color: var(--ink); }
.v-retirer { justify-self: start; }
.admin-barre { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 24px; padding: 10px 12px; border: 1px dashed var(--accent); border-radius: 6px; font-size: 13.5px; }
.admin-barre .field { width: auto; flex: 1 1 220px; max-width: 360px; }
.admin-erreur { flex-basis: 100%; margin: 0; color: #b23a26; }
.vide { border: 1px dashed var(--rule); border-radius: 6px; padding: 28px; text-align: center; color: var(--muted); }
.pages { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 34px; font-variant-numeric: tabular-nums; color: var(--muted); }

.prose { max-width: 66ch; }
.prose .chapo { font-size: 16.5px; color: var(--muted); margin: 0 0 30px; }
.prose h2 { margin: 34px 0 8px; font: 600 26px/1.15 var(--f-display); }
.prose p, .prose li { font-size: 15px; line-height: 1.6; }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li + li { margin-top: 6px; }
.prose dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 12px 0 0; }
.prose dt { font: italic 500 18px/1.4 var(--f-display); }
.prose dd { margin: 0; font-size: 15px; line-height: 1.55; }
.prose code { font-family: var(--f-mono); font-size: 13.5px; background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; padding: 1px 5px; }
.prose .sources { font-size: 14px; color: var(--muted); }
.prose i { font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: 1.12em; }

.pied { border-top: 1px solid var(--rule); padding-block: 18px 26px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font-size: 12.5px; color: var(--muted); }
.pied a { color: inherit; }

/* ---------- petits écrans ---------- */
@media (max-width: 1080px) { .work { grid-template-columns: 272px minmax(0, 1fr); } }
@media (max-width: 820px) {
  html.page-atelier, html.page-atelier body { height: auto; }
  .page-atelier .app { height: auto; }
  .brand .titre { font-size: 24px; }
  .nav { margin-left: 0; order: 3; width: 100%; }
  .work { grid-template-columns: minmax(0, 1fr); }
  .stagewrap { order: -1; }
  /* largeur imposée : une planche très large ne déborde plus de l'écran, elle se centre dans la scène */
  .stage { width: 100%; aspect-ratio: var(--sheet-ar, 0.76); max-height: 82vh; min-height: 300px; }
  .side { overflow: visible; padding: 0; }
  .side .panel { overflow: visible; margin-right: 0; padding-right: 0; }
  .hint { display: none; }
  #btnPlay { width: auto; }
  #btnPlay .lbl { display: none; }
  .prose dl { grid-template-columns: 1fr; gap: 2px; }
  .prose dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .program button, .vignette canvas { transition: none; }
}
