/* =========================================================================
   KAGU — Planche de coupe
   Tokens issus de design-dna.json
   ========================================================================= */
:root {
  --paper: #ECE9DF;
  --paper-2: #F6F4EC;
  --ink: #12171A;
  --graphite: #566064;
  --rule: #B7B3A3;
  --rule-soft: #D3CFC0;
  --yellow: #F4C20D;
  --orange: #E5421B;
  --orange-ink: #B3290A;

  --font-display: 'Big Shoulders Display', 'Arial Narrow', 'Roboto Condensed', Impact, sans-serif;
  --font-body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Spline Sans Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-micro: 90ms;
  --t-normal: 180ms;
  --t-macro: 420ms;

  --cart-h: 62px;
  --gut: 14px;
  --figw: 132px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--font-body);
  padding: 6px 6px 0;
  min-height: 100vh;
}
/* grain de papier */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .06; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.2 0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
}
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
b, strong { font-weight: 700; }
h1, h2 { margin: 0; }
p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 6px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
[hidden] { display: none !important; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- cadre de planche ---------- */
.app {
  position: relative; z-index: 1;
  max-width: 1120px; margin: 0 auto;
  border: 2px solid var(--ink);
  background: var(--paper);
  min-height: calc(100vh - 6px);
}
.top {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 8px var(--gut);
  border-bottom: 1.5px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 26px; height: 26px; display: block; }
.brand-word { font: 900 28px/1 var(--font-display); letter-spacing: .08em; }
.tagline { display: none; font: 500 13px/1.3 var(--font-mono); color: var(--graphite); }
.scale-badge {
  justify-self: end;
  display: flex; align-items: baseline; gap: 6px;
  font: 600 13px var(--font-mono); border: 1.5px solid var(--ink); padding: 3px 8px; background: var(--paper-2);
}
.scale-badge-lbl { font-size: 11.5px; letter-spacing: .12em; color: var(--graphite); }
.zones { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--rule); }
.zones span { text-align: center; font: 500 11px/16px var(--font-mono); color: var(--graphite); border-right: 1px solid var(--rule); }
.zones span:last-child { border-right: 0; }

.sheet { padding: 16px var(--gut) calc(var(--cart-h) + 28px + var(--safe-b)); }
.sheet.in { animation: sheetIn var(--t-normal) var(--ease); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.over { font: 600 12px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--graphite); }
.display {
  font: 800 clamp(40px, 11vw, 72px)/.9 var(--font-display);
  text-transform: uppercase; letter-spacing: .005em;
  margin-top: 8px;
}
.display:focus { outline: none; }
.display em { font-style: normal; background: var(--yellow); padding: 0 .12em; margin: 0 -.04em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.lede { margin-top: 12px; max-width: 46ch; color: var(--ink); font-size: 16px; }
.h2 { font: 800 28px/1 var(--font-display); text-transform: uppercase; letter-spacing: .01em; margin: 28px 0 10px; }
.h2 em { font-style: normal; background: var(--yellow); padding: 0 .12em; }
.hint { margin-top: 10px; font-size: 14px; color: var(--graphite); max-width: 52ch; }
.hint b { color: var(--ink); }

/* ---------- planche 1 ---------- */
.sheet-grid { display: block; }
.plan { margin: 16px 0 0; border: 1.5px solid var(--ink); background: var(--paper-2); position: relative; touch-action: pan-y; }
.plan svg { display: block; width: 100%; user-select: none; -webkit-user-select: none; }

.cotes-head {
  display: grid; grid-template-columns: 40px 1fr 1fr; margin-top: 22px;
  font: 600 11.5px/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--graphite);
  padding-bottom: 6px;
}
.cotes-head span:not(:first-child) { padding-left: 10px; }
.axis {
  display: grid; grid-template-columns: 40px 1fr 1fr; align-items: stretch;
  border-top: 1.5px solid var(--ink);
}
.axis:last-child { border-bottom: 1.5px solid var(--ink); }
.axis-id { display: grid; place-items: center; font: 900 40px/1 var(--font-display); }
.cell {
  display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 0;
  border-left: 1px solid var(--rule); padding: 8px 0;
}
.step {
  width: 42px; height: 42px; border: 1.5px solid var(--ink); background: var(--paper-2);
  font: 700 26px/1 var(--font-display); display: grid; place-items: center; padding: 0; touch-action: manipulation;
  transition: background var(--t-micro) var(--ease), color var(--t-micro) var(--ease);
}
.step:hover { background: var(--ink); color: var(--paper); }
.step:active { background: var(--yellow); color: var(--ink); }
.cell > .step:first-child { margin-left: 6px; }
.cell > .step:last-child { margin-right: 6px; }
.numbox {
  display: grid; justify-items: center; margin: 0 4px; padding: 2px 0 1px; cursor: text;
  transition: background var(--t-micro) var(--ease);
}
.numbox input {
  width: 100%; min-width: 0; text-align: center; border: 0; background: transparent; padding: 0;
  font: 800 40px/1 var(--font-display); letter-spacing: .01em; color: var(--ink);
  -moz-appearance: textfield; appearance: textfield; border-radius: 0;
}
.numbox input:focus { outline: none; }
.numbox:focus-within { outline: 3px solid var(--orange); outline-offset: 1px; }
.numbox .unit { font: 500 11.5px/1 var(--font-mono); color: var(--graphite); letter-spacing: .06em; }
.cell.sel .numbox { background: var(--yellow); }
.cell.sel .numbox .unit { color: var(--ink); }
.cell[data-kind="jeu"] .numbox { box-shadow: inset 0 -3px 0 var(--orange); }
.range {
  grid-column: 2 / 4; border-top: 1px solid var(--rule-soft); padding: 5px 0 8px 10px;
  font: 500 12.5px/1.3 var(--font-mono); color: var(--graphite);
}
.range b { color: var(--ink); font-weight: 600; }

.cta {
  margin-top: 22px; width: 100%; text-align: left;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  background: var(--ink); color: var(--paper); border: 0; padding: 12px 16px;
  box-shadow: 5px 5px 0 var(--yellow);
  transition: transform var(--t-micro) var(--ease), box-shadow var(--t-micro) var(--ease);
}
.cta:hover { transform: translate(-1px, -1px); box-shadow: 7px 7px 0 var(--yellow); }
.cta:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--yellow); }
.cta-n { font: 900 64px/.9 var(--font-display); color: var(--yellow); min-width: 1.1ch; font-variant-numeric: tabular-nums; }
.cta-t { display: grid; }
.cta-t b { font: 800 26px/1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.cta-t small { font: 500 13px/1.3 var(--font-mono); color: var(--rule-soft); }
.cta-arrow { color: var(--yellow); }
.alt {
  margin-top: 16px; width: 100%; background: transparent; border: 0; border-top: 1px dashed var(--ink);
  padding: 12px 0 0; text-align: left; display: grid; gap: 2px; font-size: 14px; color: var(--graphite);
}
.alt b { color: var(--ink); font-size: 16px; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.alt:hover b { background: var(--yellow); }

/* ---------- ruban ---------- */
.tape {
  margin: -1.5px 0 0;
  display: grid; grid-template-columns: 68px 1fr; height: 72px;
  background: var(--yellow); border: 2px solid var(--ink);
}
.tape-lbl { display: grid; align-content: center; justify-items: center; border-right: 2px solid var(--ink); background: var(--ink); color: var(--yellow); }
.tape-lbl-axis { font: 900 34px/1 var(--font-display); }
.tape-lbl-kind { font: 600 11.5px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--paper); margin-top: 2px; }
.tape-track { position: relative; overflow: hidden; touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.tape-track:focus-visible { outline-offset: -4px; }
.tape-track canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tape-needle { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: var(--orange); pointer-events: none; }
.tape-needle::before { content: ''; position: absolute; top: 0; left: -6px; border: 7.5px solid transparent; border-top: 11px solid var(--orange); border-bottom: 0; }

/* ---------- planche 2 ---------- */
.narrow { max-width: 860px; margin: 0 auto; }
.recap { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.recap button {
  display: inline-flex; align-items: baseline; gap: 8px; background: var(--paper-2);
  border: 1.5px solid var(--ink); padding: 8px 10px; font: 500 13px/1 var(--font-mono);
  transition: background var(--t-micro) var(--ease);
}
.recap button:hover { background: var(--yellow); }
.recap .k { font: 900 22px/1 var(--font-display); }
.recap .v { font: 800 22px/1 var(--font-display); }
.recap .j { color: var(--orange-ink); font-weight: 600; }
.tools { margin-top: 20px; display: grid; gap: 12px; }
.seg { display: inline-flex; border: 1.5px solid var(--ink); background: var(--paper-2); max-width: 100%; }
.seg button { border: 0; border-right: 1.5px solid var(--ink); background: transparent; padding: 10px 14px; font: 600 13px/1.1 var(--font-mono); letter-spacing: .04em; flex: 1 1 auto; min-height: 44px; }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--rule-soft); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { border: 1px solid var(--ink); background: transparent; padding: 7px 10px; font: 500 13px/1 var(--font-mono); min-height: 34px; }
.chips button:hover { background: var(--rule-soft); }
.chips button[aria-pressed="true"] { background: var(--yellow); font-weight: 600; }
.chips button .c { color: var(--graphite); margin-left: 4px; }
.scale-note { margin-top: 22px; font: 500 12.5px/1.45 var(--font-mono); color: var(--graphite); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.scale-note .sbar { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.scale-note .swatch { display: inline-block; width: 22px; height: 10px; border: 1px solid var(--ink); background: repeating-linear-gradient(-45deg, var(--orange) 0 1.5px, var(--paper-2) 1.5px 4.5px); }

.reg { margin-top: 10px; border-bottom: 1.5px solid var(--ink); }
.res { border-top: 1.5px solid var(--ink); }
.res-main {
  display: grid; grid-template-columns: var(--figw) 1fr; gap: 14px; width: 100%; text-align: left;
  background: transparent; border: 0; padding: 14px 0; align-items: start;
  transition: background var(--t-micro) var(--ease);
}
.res-main:hover { background: rgba(244, 194, 13, .16); }
.res-fig { display: block; }
.res-info { display: grid; gap: 4px; min-width: 0; }
.res-top { display: flex; align-items: baseline; gap: 8px; }
.res-idx { font: 600 12.5px var(--font-mono); color: var(--graphite); }
.badge { font: 600 11.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; background: var(--ink); color: var(--yellow); padding: 3px 6px; }
.badge--pile { background: var(--yellow); color: var(--ink); }
.res-price { margin-left: auto; font: 800 24px/1 var(--font-display); letter-spacing: .02em; white-space: nowrap; }
.res-name { font: 800 27px/.98 var(--font-display); text-transform: uppercase; letter-spacing: .01em; }
.res-meta { font: 500 12.5px/1.35 var(--font-mono); color: var(--graphite); }
.res-dims { font: 600 14px/1.3 var(--font-mono); }
.gauges { display: grid; gap: 4px; margin-top: 6px; }
.g { display: grid; grid-template-columns: 14px 1fr 62px; align-items: center; gap: 8px; font: 500 12.5px/1 var(--font-mono); }
.g-l { font-weight: 700; }
.g-bar { height: 10px; border: 1px solid var(--ink); background: var(--paper-2); position: relative; }
.g-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: repeating-linear-gradient(-45deg, var(--orange) 0 1.5px, var(--paper-2) 1.5px 4px); border-right: 2px solid var(--orange); }
.g-bar i.z { border-right: 0; }
.g-v { text-align: right; }
.res-more { padding: 0 0 18px; animation: sheetIn var(--t-normal) var(--ease); }
.res-more-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.res-more svg { display: block; border: 1px solid var(--rule); background: var(--paper-2); max-width: 100%; }
.spec { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; align-content: start; }
.spec dt { font: 600 11.5px/1.7 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--graphite); }
.spec dd { margin: 0; }
.sw { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--ink); vertical-align: -1px; margin-right: 6px; }

.empty { border: 1.5px dashed var(--ink); padding: 18px 16px; margin-top: 18px; background: var(--paper-2); }
.empty h2 { font: 800 30px/1 var(--font-display); text-transform: uppercase; }
.empty p { margin-top: 8px; max-width: 48ch; }
.near { margin-top: 28px; }
.near h2 { font: 800 24px/1 var(--font-display); text-transform: uppercase; }
.near p.sub { font-size: 14px; color: var(--graphite); margin-top: 4px; }
.near li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }
.near li:first-of-type { margin-top: 10px; }
.near .nm { font: 700 15px var(--font-body); }
.near .why { font: 500 13px var(--font-mono); color: var(--orange-ink); }
.near button { margin-left: auto; border: 1.5px solid var(--ink); background: var(--paper-2); padding: 7px 10px; font: 600 12.5px var(--font-mono); min-height: 36px; }
.near button:hover { background: var(--yellow); }

/* ---------- planche 3 ---------- */
.scenes { margin-top: 16px; display: flex; }
.photo { position: relative; margin: 12px 0 0; border: 1.5px solid var(--ink); background: #222; overflow: hidden; touch-action: pan-y; }
.photo svg { display: block; width: 100%; height: auto; }
.vf, .flash { position: absolute; inset: 0; pointer-events: none; }
.vf { display: none; }
.photo.is-idle .vf { display: block; }
.vf-c { position: absolute; width: 28px; height: 28px; border: 3px solid var(--yellow); }
.vf-c.tl { left: 14px; top: 14px; border-right: 0; border-bottom: 0; }
.vf-c.tr { right: 14px; top: 14px; border-left: 0; border-bottom: 0; }
.vf-c.bl { left: 14px; bottom: 14px; border-right: 0; border-top: 0; }
.vf-c.br { right: 14px; bottom: 14px; border-left: 0; border-top: 0; }
.vf-g { position: absolute; background: rgba(255, 255, 255, .28); }
.vf-g.v1 { left: 33.3%; top: 0; bottom: 0; width: 1px; } .vf-g.v2 { left: 66.6%; top: 0; bottom: 0; width: 1px; }
.vf-g.h1 { top: 33.3%; left: 0; right: 0; height: 1px; } .vf-g.h2 { top: 66.6%; left: 0; right: 0; height: 1px; }
.vf-tag { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); background: rgba(18, 23, 26, .86); color: var(--yellow); font: 600 12px/1 var(--font-mono); letter-spacing: .1em; padding: 6px 10px; white-space: nowrap; }
.flash { background: #fff; opacity: 0; }
.flash.go { animation: flash 420ms ease-out; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
.scanline { animation: scan 1.9s cubic-bezier(.5, 0, .5, 1) forwards; }
@keyframes scan { from { transform: translateY(-20px); } to { transform: translateY(290px); } }

.shutter-row { margin-top: 12px; }
.shutter { width: 100%; display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; text-align: left; background: var(--ink); color: var(--paper); border: 0; padding: 12px 16px 12px 12px; box-shadow: 5px 5px 0 var(--yellow); }
.shutter:hover { transform: translate(-1px, -1px); box-shadow: 7px 7px 0 var(--yellow); }
.shutter:disabled { opacity: .55; cursor: progress; box-shadow: none; transform: none; }
.shutter-ring { width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--paper); display: grid; place-items: center; position: relative; }
.shutter-ring::after { content: ''; width: 28px; height: 28px; border-radius: 50%; background: var(--orange); }
.shutter-t { display: grid; }
.shutter-t b { font: 800 24px/1 var(--font-display); text-transform: uppercase; letter-spacing: .02em; }
.shutter-t small { font: 500 12.5px/1.3 var(--font-mono); color: var(--rule-soft); }

.log { margin-top: 12px; display: grid; gap: 0; }
.log li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font: 500 13px/1.35 var(--font-mono); padding: 5px 0; border-top: 1px solid var(--rule-soft); animation: sheetIn var(--t-normal) var(--ease); }
.log li .ck { width: 16px; height: 16px; border: 1.5px solid var(--ink); display: grid; place-items: center; margin-top: 1px; font-size: 11px; line-height: 1; }
.log li.done .ck { background: var(--ink); color: var(--yellow); }
.log li.run .ck { background: var(--yellow); animation: blink 600ms steps(2) infinite; }
@keyframes blink { 50% { background: transparent; } }

.conf { font: 500 13px/1.4 var(--font-mono); color: var(--graphite); }
.conf b { color: var(--ink); }
.cotes--photo .axis { grid-template-columns: 40px 1fr 1fr; }
.ia { padding: 6px 0 6px 12px; display: flex; flex-wrap: wrap; align-content: center; align-items: baseline; gap: 2px 6px; border-left: 1px solid var(--rule); font: 500 12.5px/1.35 var(--font-mono); color: var(--graphite); }
.ia b { font: 800 22px/1 var(--font-display); color: var(--ink); }
.ia .dl { color: var(--orange-ink); font-weight: 600; flex-basis: 100%; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ghost { border: 1.5px solid var(--ink); background: var(--paper-2); padding: 10px 14px; font: 600 13px/1.1 var(--font-mono); min-height: 44px; }
.ghost:hover { background: var(--yellow); }
.ghost--ink { background: var(--ink); color: var(--paper); margin-left: auto; }
.ghost--ink:hover { background: var(--ink); color: var(--yellow); }

.rel { display: grid; gap: 0; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.rel > div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule-soft); font-size: 14px; }
.rel > div:first-child { border-top: 0; }
.rel dt { font: 600 11.5px/1.6 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--graphite); }
.rel dd { margin: 0; }
.pal { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.pal span { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.pal i { width: 18px; height: 18px; border: 1px solid var(--ink); display: inline-block; }
.pin { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--orange); color: #fff; font: 700 12px/1 var(--font-mono); margin-right: 6px; }
.obst li { display: flex; gap: 2px; padding: 2px 0; }
.obst .tx { font-size: 14px; }

.sug { margin-top: 10px; border-bottom: 1.5px solid var(--ink); }
.sg { border-top: 1.5px solid var(--ink); padding: 14px 0 16px; display: grid; gap: 10px; }
.sg-head { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: start; }
.sg-no { width: 34px; height: 34px; background: var(--ink); color: var(--yellow); display: grid; place-items: center; font: 800 22px/1 var(--font-display); }
.sg-name { font: 800 26px/.98 var(--font-display); text-transform: uppercase; }
.sg-meta { font: 500 12.5px/1.35 var(--font-mono); color: var(--graphite); margin-top: 3px; }
.sg-score { text-align: right; font: 900 38px/.9 var(--font-display); }
.sg-score small { display: block; font: 500 11.5px/1.2 var(--font-mono); color: var(--graphite); letter-spacing: .06em; }
.bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bar { display: grid; gap: 3px; font: 500 11.5px/1.1 var(--font-mono); }
.bar .tr { height: 8px; border: 1px solid var(--ink); background: var(--paper-2); position: relative; }
.bar .tr i { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.why-l { display: grid; gap: 5px; font-size: 14px; }
.why-l li { display: grid; grid-template-columns: 14px 1fr; gap: 6px; }
.why-l li::before { content: '+'; font: 700 14px/1.45 var(--font-mono); color: var(--ink); }
.why-l li.warn::before { content: '!'; color: var(--orange-ink); }
.try { justify-self: start; border: 1.5px solid var(--ink); background: var(--paper-2); padding: 9px 12px; font: 600 13px/1.1 var(--font-mono); min-height: 44px; }
.try:hover { background: var(--yellow); }
.try[aria-pressed="true"] { background: var(--ink); color: var(--yellow); }

/* ---------- svg : textes de cotation ---------- */
svg text { font-family: var(--font-mono); fill: var(--ink); }
.t-cote { font-size: 13px; font-weight: 600; }
.t-big { font-family: var(--font-display); font-weight: 800; font-size: 19px; }
.t-jeu { font-size: 12px; font-weight: 600; fill: var(--orange-ink); }
.pt { font-size: 7px; font-weight: 600; }
.halo { paint-order: stroke; stroke: #F6F4EC; stroke-width: 4px; stroke-linejoin: round; }
.t-ttl { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; fill: var(--graphite); }
.hd { cursor: grab; touch-action: none; }
.hd .k { fill: var(--yellow); stroke: var(--ink); stroke-width: 1.5; transition: transform var(--t-micro) var(--ease); transform-box: fill-box; transform-origin: center; }
.hd:hover .k { transform: scale(1.18); }
.hd.on .k { fill: var(--orange); }
.cb { cursor: pointer; }
.cb:hover rect.bg { fill: var(--yellow); }
.cb:focus-visible { outline: none; }
.cb:focus-visible rect.bg { stroke: var(--orange); stroke-width: 2; }
.draw .cl { stroke-dasharray: 600; stroke-dashoffset: 600; animation: dr var(--t-macro) var(--ease) forwards; }
@keyframes dr { to { stroke-dashoffset: 0; } }
.fur * { vector-effect: non-scaling-stroke; }

/* ---------- cartouche ---------- */
.cartouche {
  position: fixed; z-index: 20; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(1120px, 100vw);
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--paper-2); border-top: 2px solid var(--ink);
  height: calc(var(--cart-h) + var(--safe-b)); padding-bottom: var(--safe-b);
}
.cartouche button {
  display: grid; align-content: center; gap: 2px; text-align: left; padding: 6px 14px; border: 0;
  border-right: 1.5px solid var(--ink); background: transparent; position: relative;
  transition: background var(--t-micro) var(--ease), color var(--t-micro) var(--ease);
}
.cartouche button:last-child { border-right: 0; }
.cartouche small { font: 500 11.5px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--graphite); }
.cartouche b { font: 800 24px/1 var(--font-display); text-transform: uppercase; letter-spacing: .03em; display: flex; align-items: center; gap: 8px; }
.cartouche .n { font-style: normal; background: var(--yellow); color: var(--ink); padding: 2px 6px 1px; min-width: 24px; text-align: center; font-size: 20px; }
.cartouche button:hover { background: var(--rule-soft); }
.cartouche button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.cartouche button[aria-selected="true"] small { color: var(--rule); }
.cartouche button[aria-selected="true"]::before { content: ''; position: absolute; left: 0; right: 0; top: -2px; height: 5px; background: var(--yellow); }

/* ---------- >= 720px ---------- */
@media (min-width: 720px) {
  :root { --figw: 210px; --gut: 28px; }
  body { padding: 12px 12px 0; }
  .tagline { display: block; }
  .top { grid-template-columns: auto 1fr auto; }
  .res-more-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .res-name { font-size: 32px; }
  .res-main { gap: 22px; }
  .g { grid-template-columns: 14px 160px 62px; }
}

/* ---------- >= 980px : deux colonnes ---------- */
@media (min-width: 980px) {
  .sheet-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 40px; align-items: start; }
  .col-draw { position: sticky; top: 12px; }
  .cotes-head { margin-top: 0; }
  .sheet-grid--photo { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .sheet-grid--photo .h2:first-child { margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .scanline { display: none; }
}
