/* Hallmark v2.0.0 | theme: blueprint (cyanotype sheet) | posture: drenched | modes: single | sections: 7 (hero, work, method, about, statement, contact, footer)
   Compositions: Ledge hero with title block, Register, Grid, Steps, Split with figure, Statement band, Form.
   Critique: philosophy 4, hierarchy 4, execution 4, specificity 5, restraint 4, variety 4.
   Waivers: gate 64 mono kept for figures, sheet numbers and clock only (theme material: measurements and drawing numbers).
            gate 80 drawn beam and flow diagram kept because they are technical drawings of the owner's trade, not decoration. */

/* ---------- Jetons ---------- */
:root {
  color-scheme: dark;
  --paper: oklch(35% 0.105 256);
  --paper-up: oklch(39% 0.1 256);
  --paper-2: oklch(31% 0.1 257);
  --paper-3: oklch(26.5% 0.095 258);
  --ink: oklch(97% 0.012 240);
  --ink-2: oklch(90% 0.025 242);
  --muted: oklch(80% 0.045 244);
  --rule: oklch(93% 0.02 240 / 0.85);
  --rule-2: oklch(93% 0.02 240 / 0.32);
  --grid: oklch(97% 0.01 240 / 0.09);
  --grid-2: oklch(97% 0.01 240 / 0.2);
  --accent: oklch(97% 0.012 240);
  --accent-ink: oklch(33% 0.105 256);
  --focus: oklch(97% 0.012 240);
  --scrim: oklch(20% 0.08 258 / 0.72);
  /* feuille tirée en blanc (whiteprint) */
  --wp-paper: oklch(97.5% 0.006 240);
  --wp-ink: oklch(35% 0.105 256);
  --wp-muted: oklch(52% 0.07 255);
  --wp-rule: oklch(35% 0.105 256 / 0.28);
  --err: oklch(45% 0.19 28);

  --f-display: "Chakra Petch", "Arial Narrow", sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", Consolas, monospace;

  --s-2: 2px; --s-4: 4px; --s-8: 8px; --s-12: 12px; --s-16: 16px; --s-24: 24px;
  --s-40: 40px; --s-64: 64px; --s-96: 96px; --s-144: 144px;

  --rule-hair: 1px;
  --rule-heavy: 2px;
  --sheet-inset: 20px;

  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-in: cubic-bezier(.5, 0, .8, .3);
  --ease-in-out: cubic-bezier(.6, 0, .3, 1);
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-long: 420ms;

  --z-raised: 10; --z-sticky-nav: 300; --z-modal: 400; --z-toast: 500;

  --wrap: 1312px;
  --gut: clamp(16px, 4.5vw, 64px);
  --nav-h: 60px;
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + var(--s-12));
  overflow-x: clip;
}
body {
  margin: 0; overflow-x: clip;
  background: var(--paper); color: var(--ink);
  font: 400 16px/1.6 var(--f-body);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
body.lock { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
.mono { font-family: var(--f-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
::selection { background: var(--ink); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
svg { overflow: visible; }

.wrap {
  width: 100%; max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto;
  padding-left: calc(var(--gut) + var(--safe-l));
  padding-right: calc(var(--gut) + var(--safe-r));
}
.skip-link { position: absolute; left: -999px; top: var(--s-8); z-index: var(--z-toast); background: var(--ink); color: var(--accent-ink); padding: var(--s-8) var(--s-12); }
.skip-link:focus { left: var(--s-8); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 var(--s-24);
  border: var(--rule-hair) solid var(--ink); border-radius: 0;
  font: 500 16px/1 var(--f-body); text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--ink); color: var(--accent-ink); }
.btn-primary:hover { background: var(--ink-2); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--paper-2); }
.btn-sm { min-height: 40px; padding: 0 var(--s-16); font-size: 14px; }
.text-link {
  display: inline-flex; align-items: center; gap: var(--s-8); padding: var(--s-8) 0; min-height: 44px;
  background: none; border: 0; color: var(--ink-2); font-size: 15px;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.text-link:hover { color: var(--ink); }
.text-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: var(--rule-hair) solid var(--rule-2); border-radius: 0; }
.icon-btn:hover { background: var(--paper-2); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
kbd { font: 500 12px var(--f-mono); padding: var(--s-2) var(--s-4); border: var(--rule-hair) solid var(--rule-2); color: var(--muted); white-space: nowrap; }

/* ---------- Navigation ---------- */
.nav { position: sticky; top: 0; z-index: var(--z-sticky-nav); background: var(--paper); border-bottom: var(--rule-hair) solid var(--rule-2); }
.nav-in { display: flex; align-items: center; gap: var(--s-16); height: var(--nav-h); }
.wordmark { display: inline-flex; align-items: center; gap: var(--s-12); min-width: 0; text-decoration: none; font: 600 18px/1 var(--f-display); letter-spacing: -.012em; white-space: nowrap; }
.wordmark span { overflow: hidden; text-overflow: ellipsis; }
.wordmark svg { width: 26px; height: 17px; flex: none; fill: none; stroke: var(--ink); stroke-width: 2.4; }
.nav-links { display: none; gap: var(--s-4); margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--ink-2); padding: var(--s-8) var(--s-12); font-size: 15px; white-space: nowrap; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); text-decoration: underline; }
.nav-tools { display: flex; align-items: center; gap: var(--s-8); margin-left: auto; flex: none; }
.search-btn { display: inline-flex; align-items: center; gap: var(--s-8); height: 40px; padding: 0 var(--s-12); background: none; border: var(--rule-hair) solid var(--rule-2); border-radius: 0; color: var(--ink-2); font-size: 14px; }
.search-btn:hover { background: var(--paper-2); }
.search-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.search-label, .search-btn kbd { display: none; }
.lang { display: inline-flex; border: var(--rule-hair) solid var(--rule-2); }
.lang button { background: none; border: 0; padding: 0 var(--s-12); height: 38px; font: 500 13px var(--f-body); color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--accent-ink); }
.burger { width: 44px; height: 40px; border: var(--rule-hair) solid var(--rule-2); background: none; border-radius: 0; display: grid; place-content: center; gap: 6px; }
.burger span { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform var(--dur-short) var(--ease-in-out); }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.mobile-menu { border-top: var(--rule-hair) solid var(--rule-2); padding: var(--s-8) calc(var(--gut) + var(--safe-r)) var(--s-16) calc(var(--gut) + var(--safe-l)); display: grid; }
.mobile-menu[hidden] { display: none; }
.mobile-menu a { text-decoration: none; padding: var(--s-16) 0; border-bottom: var(--rule-hair) solid var(--rule-2); font: 600 22px var(--f-display); }

/* ---------- Accueil ---------- */
.hero { padding-top: var(--s-40); }
.hero-grid { display: grid; gap: var(--s-40); align-items: end; }
.status { margin: 0 0 var(--s-24); color: var(--muted); font-size: 15px; }
.hero-title {
  margin: 0; font: 600 clamp(40px, 10.5vw, 84px)/1.02 var(--f-display);
  letter-spacing: -.012em; text-transform: uppercase; max-width: 12ch;
}
.dim-string { margin: var(--s-24) 0 var(--s-8); max-width: 520px; }
.dim-string svg { display: block; width: 100%; height: 20px; transform-origin: left center; animation: draw var(--dur-long) var(--ease-out) both .15s; }
.dim-string path { fill: none; stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dim-string span { display: block; text-align: center; margin-top: var(--s-4); font: 500 14px var(--f-mono); color: var(--ink-2); }
@keyframes draw { from { transform: scaleX(0); } }
.hero-lead { color: var(--ink-2); margin: var(--s-24) 0 var(--s-40); max-width: 52ch; font-size: clamp(17px, 2.2vw, 21px); line-height: 1.5; }
.hero-ctas { display: grid; gap: var(--s-12); margin-bottom: var(--s-8); }

/* Cartouche */
.titleblock { border: var(--rule-heavy) solid var(--rule); }
.tb-rows { margin: 0; }
.tb-rows div { display: grid; grid-template-columns: 112px minmax(0, 1fr); border-bottom: var(--rule-hair) solid var(--rule-2); }
.tb-rows dt { padding: var(--s-12); color: var(--muted); font-size: 14px; border-right: var(--rule-hair) solid var(--rule-2); }
.tb-rows dd { margin: 0; padding: var(--s-12); font-size: 15px; }
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: var(--rule-hair) solid var(--rule-2); }
.figures div { padding: var(--s-16) var(--s-12); border-right: var(--rule-hair) solid var(--rule-2); }
.figures div:last-child { border-right: 0; }
.figures b { display: block; font: 600 clamp(30px, 8vw, 40px)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.figures span { display: block; margin-top: var(--s-8); font-size: 14px; line-height: 1.35; color: var(--ink-2); }
.tb-foot { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-12); padding: var(--s-8) var(--s-12); font-size: 14px; color: var(--muted); }
.tb-foot > span:nth-child(2) { text-align: center; }

/* Registre d’outils */
.register { margin-top: var(--s-64); border-top: var(--rule-heavy) solid var(--rule); display: grid; }
.register > div { padding: var(--s-16) 0; border-bottom: var(--rule-hair) solid var(--rule-2); display: grid; gap: var(--s-4); }
.register h2 { margin: 0; font: 500 14px var(--f-body); color: var(--muted); }
.register ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-16); font-size: 16px; }

/* ---------- Sections ---------- */
.section { padding: var(--s-96) 0; }
.band { background: var(--paper-2); }
.band-deep { background: var(--paper-3); }
.sec-head { display: grid; gap: var(--s-16); margin-bottom: var(--s-40); }
.h2 { margin: 0; font: 600 clamp(32px, 7vw, 52px)/1.02 var(--f-display); letter-spacing: -.012em; text-transform: uppercase; max-width: 18ch; }
.h3 { margin: 0 0 var(--s-24); font: 600 25px/1.15 var(--f-display); letter-spacing: -.012em; }
.lead { color: var(--ink-2); max-width: 58ch; margin: 0; font-size: 18px; line-height: 1.5; }
.body { color: var(--ink-2); max-width: 62ch; margin: var(--s-24) 0; }

/* ---------- Réalisations ---------- */
.filters { display: flex; flex-direction: column; gap: var(--s-12); margin-bottom: var(--s-24); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-8); }
.chip {
  display: inline-flex; align-items: center; gap: var(--s-8); min-height: 40px; padding: 0 var(--s-16);
  border: var(--rule-hair) solid var(--rule-2); border-radius: 0; background: transparent; color: var(--ink-2); font-size: 15px; white-space: nowrap;
  transition: background-color var(--dur-micro) var(--ease-out);
}
.chip:hover { background: var(--paper-2); }
.chip small { font: 500 13px var(--f-mono); color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--accent-ink); border-color: var(--ink); }
.chip[aria-pressed="true"] small { color: var(--accent-ink); }
.search-field { display: flex; align-items: center; gap: var(--s-8); height: 44px; padding: 0 var(--s-12); border: var(--rule-hair) solid var(--rule-2); }
.search-field:focus-within { border-color: var(--rule); }
.search-field svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search-field input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: 16px var(--f-body); }
.search-field input::placeholder { color: var(--muted); }

.grid { display: grid; gap: var(--s-24); }
.card {
  display: grid; grid-template-rows: auto 1fr; text-align: left; padding: 0; min-width: 0;
  background: transparent; border: var(--rule-hair) solid var(--rule-2); border-radius: 0;
  transition: background-color var(--dur-short) var(--ease-out);
}
.card:hover { background: var(--paper-2); }
.card-visual {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; display: flex; justify-content: center; gap: var(--s-16);
  padding: var(--s-24) var(--s-24) 0; border-bottom: var(--rule-hair) solid var(--rule-2);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}
.figure-shot { flex: 0 1 42%; align-self: flex-start; padding: 4px; border: var(--rule-hair) solid var(--rule); background: var(--paper-2); }
.figure-shot img { outline: var(--rule-hair) solid var(--rule-2); }
.figure-shot.doc { flex-basis: 60%; }
.calc-draw { flex: 0 1 38%; align-self: flex-start; }
.calc-draw svg { width: 100%; height: auto; }
.calc-draw rect { fill: none; stroke: var(--ink); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.calc-draw .k { stroke: var(--rule-2); }
.calc-draw text { fill: var(--ink); font: 500 16px var(--f-mono); }
.card-body { padding: var(--s-16) var(--s-24) var(--s-24); display: grid; gap: var(--s-8); align-content: start; }
.card-tag { font-size: 14px; color: var(--muted); }
.card h3 { margin: 0; font: 600 25px/1.15 var(--f-display); letter-spacing: -.012em; }
.card p { margin: 0; color: var(--ink-2); font-size: 16px; }
.card-open { margin-top: var(--s-8); font-size: 15px; text-decoration: underline; text-underline-offset: 4px; }
.empty { color: var(--muted); }

/* ---------- Méthode ---------- */
.process { display: grid; gap: var(--s-24); }
.steps { list-style: none; margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut); display: flex; gap: var(--s-8); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
.steps::-webkit-scrollbar { display: none; }
.steps li { scroll-snap-align: start; flex: none; }
.steps button {
  display: flex; gap: var(--s-12); align-items: baseline; width: 100%; white-space: nowrap;
  padding: var(--s-12) var(--s-16); background: transparent; border: var(--rule-hair) solid var(--rule-2); border-radius: 0; text-align: left;
  font: 500 16px var(--f-body); color: var(--ink-2);
  transition: background-color var(--dur-micro) var(--ease-out);
}
.steps button:hover { background: var(--paper-3); }
.steps button span { font: 500 14px var(--f-mono); color: var(--muted); }
.steps button[aria-pressed="true"] { background: var(--ink); color: var(--accent-ink); border-color: var(--ink); }
.steps button[aria-pressed="true"] span { color: var(--accent-ink); }
.step-panel { border-top: var(--rule-heavy) solid var(--rule); padding-top: var(--s-24); }
.step-num { font: 600 clamp(64px, 16vw, 120px)/.9 var(--f-display); color: var(--rule-2); font-variant-numeric: tabular-nums; }
.step-panel h3 { margin: var(--s-8) 0 var(--s-12); font: 600 32px/1.1 var(--f-display); letter-spacing: -.012em; }
.step-panel p { color: var(--ink-2); margin: 0 0 var(--s-24); max-width: 60ch; }
.step-cols { display: grid; gap: var(--s-24); margin-bottom: var(--s-24); }
.step-cols h4 { margin: 0 0 var(--s-8); font: 500 14px var(--f-body); color: var(--muted); }
.step-cols ul { list-style: none; padding: 0; margin: 0; border-top: var(--rule-hair) solid var(--rule-2); }
.step-cols li { padding: var(--s-8) 0; border-bottom: var(--rule-hair) solid var(--rule-2); }
.step-body { animation: settle var(--dur-short) var(--ease-out); }
@keyframes settle { from { opacity: 0; transform: translateY(8px); } }

/* ---------- À propos ---------- */
.about-grid { display: grid; gap: var(--s-64); }
.toggle { display: inline-flex; border: var(--rule-hair) solid var(--rule-2); margin-bottom: var(--s-16); max-width: 100%; }
.toggle button { border: 0; background: none; padding: 0 var(--s-16); min-height: 44px; font: 500 15px var(--f-body); color: var(--ink-2); white-space: nowrap; }
.toggle button[aria-selected="true"] { background: var(--ink); color: var(--accent-ink); }
.drawing { margin: 0; }
.sheet {
  position: relative; border: var(--rule-hair) solid var(--rule); padding: var(--sheet-inset) var(--s-12);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px), linear-gradient(var(--grid-2) 1px, transparent 1px), linear-gradient(90deg, var(--grid-2) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 120px 120px, 120px 120px;
  outline: var(--rule-hair) solid var(--rule-2); outline-offset: -6px;
}
.sheet svg { display: block; width: 100%; height: auto; transition: opacity var(--dur-short) var(--ease-in-out); }
.sheet .draw-dig { position: absolute; top: var(--sheet-inset); left: var(--s-12); width: calc(100% - 2 * var(--s-12)); opacity: 0; }
.drawing[data-mode="dig"] .draw-eng { opacity: 0; }
.drawing[data-mode="dig"] .draw-dig { opacity: 1; }
.ln * { fill: none; stroke: var(--ink); stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.ln .soft { stroke: var(--rule-2); }
.ln .bar { stroke-width: 2.4; }
.ln .bar.thin { stroke-width: 1.6; }
.ln .dim { stroke-width: 1; stroke: var(--ink-2); }
.ln .dot { fill: var(--ink); stroke: none; }
.ln .heavy { stroke-width: 2.4; }
.ln .dash { stroke-dasharray: 5 4; }
.lbl { fill: var(--ink); font: 500 15px var(--f-mono); text-anchor: middle; }
.node { fill: var(--ink); font: 500 15px var(--f-body); text-anchor: middle; dominant-baseline: middle; }
.drawing figcaption { margin-top: var(--s-12); color: var(--muted); font-size: 14px; }

.timeline { list-style: none; margin: 0; padding: 0; border-top: var(--rule-heavy) solid var(--rule); }
.timeline li { padding: var(--s-24) 0; border-bottom: var(--rule-hair) solid var(--rule-2); display: grid; gap: var(--s-8); }
.tl-when { font-size: 14px; color: var(--muted); }
.timeline h4 { margin: 0; font: 600 22px/1.2 var(--f-display); letter-spacing: -.012em; }
.timeline p { margin: 0; color: var(--ink-2); }
.timeline .links { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-16); margin-top: var(--s-4); }
.timeline .links button { background: none; border: 0; padding: var(--s-4) 0; min-height: 32px; color: var(--ink); font-size: 15px; text-decoration: underline; text-underline-offset: 4px; }
.timeline .links button:hover { color: var(--ink-2); }

/* ---------- Énoncé ---------- */
.quote-sec { padding: var(--s-96) 0; }
.quote { margin: 0; max-width: 980px; }
.quote blockquote { margin: 0; font: 600 clamp(26px, 5vw, 44px)/1.12 var(--f-display); letter-spacing: -.012em; }
.quote figcaption { margin-top: var(--s-24); padding-top: var(--s-12); border-top: var(--rule-hair) solid var(--rule-2); max-width: 320px; color: var(--muted); font-size: 15px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: var(--s-40); }
.contact-grid .lead { margin-top: var(--s-16); }
.facts { margin: var(--s-40) 0 0; border-top: var(--rule-heavy) solid var(--rule); }
.facts div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--s-12); padding: var(--s-12) 0; border-bottom: var(--rule-hair) solid var(--rule-2); }
.facts dt { font-size: 14px; color: var(--muted); padding-top: 1px; }
.facts dd { margin: 0; }
.mail-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-12); margin-top: var(--s-24); }
.mail-row[hidden] { display: none; }
.mail-row a { font-size: 18px; overflow-wrap: anywhere; }
.socials { display: flex; gap: var(--s-8); margin-top: var(--s-16); flex-wrap: wrap; }

/* Formulaire tiré en blanc, comme un cartouche */
.brief { background: var(--wp-paper); color: var(--wp-ink); align-self: start; border: var(--rule-heavy) solid var(--wp-ink); min-width: 0; }
.brief-head { display: flex; justify-content: space-between; gap: var(--s-12); padding: var(--s-12) var(--s-16); border-bottom: var(--rule-hair) solid var(--wp-rule); font: 600 18px var(--f-display); }
.brief-head .mono { font-size: 14px; color: var(--wp-muted); }
.brief-body { padding: var(--s-24) var(--s-16); display: grid; gap: var(--s-24); }
.brief fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.brief legend, .brief label > span { display: flex; justify-content: space-between; gap: var(--s-8); font-size: 14px; color: var(--wp-muted); margin-bottom: var(--s-8); padding: 0; }
.brief label > span b { color: var(--wp-ink); font-weight: 500; }
.brief .chip { color: var(--wp-ink); border-color: var(--wp-rule); }
.brief .chip:hover { background: oklch(93% 0.012 240); }
.brief .chip[aria-pressed="true"] { background: var(--wp-ink); color: var(--wp-paper); border-color: var(--wp-ink); }
.row2 { display: grid; gap: var(--s-24); }
.brief label { display: block; }
.brief input[type="text"], .brief input[type="email"], .brief textarea {
  width: 100%; min-height: 48px; padding: var(--s-12); background: var(--wp-paper); color: var(--wp-ink);
  border: var(--rule-hair) solid var(--wp-ink); border-radius: 0; font: 16px var(--f-body);
}
.brief textarea { resize: vertical; min-height: 140px; }
.brief textarea::placeholder { color: var(--wp-muted); }
.brief :focus-visible { outline-color: var(--wp-ink); }
.brief .invalid { outline: 2px solid var(--err); outline-offset: 1px; }
.brief input[type="range"] { width: 100%; accent-color: var(--wp-ink); height: 32px; margin: 0; }
.brief .btn-primary { background: var(--wp-ink); color: var(--wp-paper); border-color: var(--wp-ink); justify-self: start; }
.brief .btn-primary:hover { background: oklch(29% 0.1 257); }
.form-msg { margin: 0; font-size: 15px; color: var(--err); }
.form-msg:empty { display: none; }
.form-note { margin: 0; font-size: 14px; color: var(--wp-muted); }

/* ---------- Pied de page ---------- */
.footer { border-top: var(--rule-heavy) solid var(--rule); padding: var(--s-24) 0 calc(var(--s-24) + var(--safe-b)); font-size: 14px; color: var(--muted); }
.footer-in { display: grid; gap: var(--s-8); }
.footer a { color: var(--ink-2); }

/* ---------- Fenêtres ---------- */
dialog { padding: 0; border: 0; background: transparent; color: var(--ink); max-width: none; max-height: none; }
dialog:focus, dialog:focus-visible { outline: none; }
dialog::backdrop { background: var(--scrim); }
.case { width: 100%; height: 100%; margin: 0; }
.case[open] { display: flex; align-items: flex-end; }
.case-in {
  width: 100%; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper-up); border-top: var(--rule-heavy) solid var(--rule);
  padding-bottom: var(--safe-b);
  animation: settle var(--dur-short) var(--ease-out);
}
.case-top { position: sticky; top: 0; z-index: var(--z-raised); display: flex; align-items: center; justify-content: space-between; gap: var(--s-12); padding: var(--s-8) var(--s-8) var(--s-8) var(--s-16); background: var(--paper-up); border-bottom: var(--rule-hair) solid var(--rule-2); font-size: 14px; color: var(--muted); }
.case-hero.card-visual { aspect-ratio: 16 / 9; }
.case-content { padding: var(--s-24) var(--s-16) var(--s-40); display: grid; gap: var(--s-24); }
.case-content h2 { margin: 0; font: 600 clamp(30px, 7vw, 44px)/1.02 var(--f-display); letter-spacing: -.012em; text-transform: uppercase; }
.case-content .short { margin: var(--s-12) 0 0; color: var(--ink-2); font-size: 18px; }
.case-cols { display: grid; gap: var(--s-24); }
.case-block h3 { margin: 0 0 var(--s-8); font: 500 14px var(--f-body); color: var(--muted); }
.case-block p { margin: 0; color: var(--ink-2); }
.case-block ul { margin: 0; padding: 0; list-style: none; border-top: var(--rule-hair) solid var(--rule-2); }
.case-block li { padding: var(--s-12) 0; border-bottom: var(--rule-hair) solid var(--rule-2); color: var(--ink-2); }
.case-result { border-top: var(--rule-heavy) solid var(--rule); padding-top: var(--s-16); }
.case-result p { color: var(--ink); font-size: 18px; }
.stack { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-12); color: var(--ink); }
.case-actions { display: flex; flex-wrap: wrap; gap: var(--s-12); justify-content: space-between; align-items: center; border-top: var(--rule-hair) solid var(--rule-2); padding-top: var(--s-16); }
.case-actions .pair { display: flex; gap: var(--s-8); }

.cmd { width: 100%; height: 100%; margin: 0; }
.cmd[open] { display: flex; align-items: flex-start; justify-content: center; padding: calc(var(--s-12) + env(safe-area-inset-top, 0px)) var(--s-12) var(--s-12); }
.cmd-in { width: min(640px, 100%); background: var(--paper-up); border: var(--rule-heavy) solid var(--rule); animation: settle var(--dur-short) var(--ease-out); }
.cmd-field { display: flex; align-items: center; gap: var(--s-12); padding: 0 var(--s-16); border-bottom: var(--rule-hair) solid var(--rule-2); }
.cmd-field svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.cmd-field input { flex: 1; min-width: 0; height: 56px; background: none; border: 0; outline: 0; color: var(--ink); font: 16px var(--f-body); }
.cmd-field input::placeholder { color: var(--muted); }
.cmd-list { list-style: none; margin: 0; padding: var(--s-4) 0 var(--s-8); max-height: min(60dvh, 440px); overflow-y: auto; }
.cmd-group { padding: var(--s-12) var(--s-16) var(--s-4); font-size: 14px; color: var(--muted); }
.cmd-item { display: flex; align-items: baseline; gap: var(--s-12); padding: var(--s-12) var(--s-16); cursor: pointer; }
.cmd-item small { margin-left: auto; text-align: right; font-size: 13px; color: var(--muted); }
.cmd-item[aria-selected="true"] { background: var(--ink); color: var(--accent-ink); }
.cmd-item[aria-selected="true"] small { color: var(--accent-ink); }
.cmd-none { padding: var(--s-16); color: var(--muted); }

.game { width: 100%; height: 100%; margin: 0; }
.game[open] { display: flex; align-items: center; justify-content: center; padding: var(--s-12); }
.game-in { width: min(440px, 100%); height: min(680px, calc(100dvh - 24px)); display: flex; flex-direction: column; background: var(--paper); border: var(--rule-heavy) solid var(--rule); animation: settle var(--dur-short) var(--ease-out); }
.game-head { display: flex; align-items: center; gap: var(--s-12); padding: var(--s-8) var(--s-8) var(--s-8) var(--s-16); border-bottom: var(--rule-hair) solid var(--rule-2); }
.game-head h2 { margin: 0; font: 600 18px var(--f-display); white-space: nowrap; }
.game-score { margin-left: auto; font-size: 14px; color: var(--muted); white-space: nowrap; }
.game-score b { color: var(--ink); font: 500 15px var(--f-mono); }
.game-stage { position: relative; flex: 1; min-height: 0; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.game-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.game-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-16); padding: var(--s-24); text-align: center; background: var(--scrim); }
.game-overlay[hidden] { display: none; }
.game-msg { margin: 0; color: var(--ink-2); max-width: 30ch; }
.game-msg b { display: block; color: var(--ink); font: 600 40px/1 var(--f-display); margin-bottom: var(--s-8); }

.toast { position: fixed; left: 50%; bottom: calc(var(--s-24) + var(--safe-b)); z-index: var(--z-toast); transform: translate(-50%, 8px); opacity: 0; background: var(--ink); color: var(--accent-ink); padding: var(--s-12) var(--s-16); font-size: 15px; pointer-events: none; transition: opacity var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Tablette ---------- */
@media (min-width: 600px) {
  .hero-ctas { display: flex; flex-wrap: wrap; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { flex-direction: row; justify-content: space-between; align-items: center; }
  .search-field { width: 280px; }
  .row2 { grid-template-columns: 1fr 1fr; }
  .register { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .register > div { padding-right: var(--s-24); }
  .register > div + div { padding-left: var(--s-24); border-left: var(--rule-hair) solid var(--rule-2); }
  .step-cols { grid-template-columns: 1fr 1fr; }
  .footer-in { grid-template-columns: 1fr auto auto; gap: var(--s-24); align-items: center; }
  .case[open] { align-items: center; justify-content: center; padding: var(--s-24); }
  .case-in { width: min(880px, 100%); max-height: calc(100dvh - 48px); border: var(--rule-heavy) solid var(--rule); padding-bottom: 0; }
  .case-content { padding: var(--s-40); }
  .case-cols { grid-template-columns: 1.4fr 1fr; gap: var(--s-40); }
  .brief-body { padding: var(--s-24); }
}

/* ---------- Ordinateur ---------- */
@media (min-width: 960px) {
  :root { --nav-h: 68px; }
  .nav-links { display: flex; }
  .nav-tools { margin-left: var(--s-12); }
  .burger, .mobile-menu { display: none !important; }
  .search-label, .search-btn kbd { display: inline; }
  .hero { padding-top: var(--s-64); }
  .hero-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--s-64); }
  .section, .quote-sec { padding: var(--s-144) 0; }
  .sec-head { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; gap: var(--s-40); margin-bottom: var(--s-64); }
  .process { grid-template-columns: 280px minmax(0, 1fr); gap: var(--s-64); align-items: start; }
  .steps { flex-direction: column; overflow: visible; margin: 0; padding: 0; border-top: var(--rule-heavy) solid var(--rule); gap: 0; }
  .steps button { border-width: 0 0 var(--rule-hair) 0; padding: var(--s-16) var(--s-12); font-size: 17px; }
  .step-panel { border-top: 0; padding-top: 0; }
  .about-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--s-96); }
  .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s-96); }
  .grid { gap: var(--s-40) var(--s-24); }
}

/* ---------- Téléphone en paysage : hauteur réduite ---------- */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding-top: var(--s-24); }
  .hero-title { font-size: 44px; }
  .case[open] { padding: 0; }
  .case-in { width: 100%; max-height: 100dvh; border-width: 0; }
  .case-hero.card-visual { aspect-ratio: 3 / 1; }
  .case-hero .figure-shot { flex-basis: 22%; }
  .case-hero .figure-shot.doc { flex-basis: 34%; }
  .case-hero .calc-draw { flex-basis: 18%; }
  .game-in { height: calc(100dvh - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0s !important; transition-duration: 1ms !important; }
  html { scroll-behavior: auto; }
}
.tb-rows div[hidden], .brief[hidden] { display: none; }
