/* Airthems : planche d'ingénieur. Papier, encre, un orange de signal. Hairlines, pas de boîtes.
   Règles tenues : espacements sur une grille de 4 px, trois graisses (400, 500, 600), deux petites tailles (12 et 13 px),
   une seule courbe (--ease) et trois durées (--t1 retour immédiat, --t2 état, --t3 déplacement).
   Les capitales espacées sont réservées à ce qui appartient au dessin : le cartouche et le ruban. */

@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(../fonts/archivo-normal-latin-ext-c422bf.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url(../fonts/archivo-normal-latin-b92029.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: 'Geist Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../fonts/geist-mono-normal-latin-ext-d09800.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(../fonts/geist-mono-normal-latin-b291d8.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; }

:root {
  --paper: #F2EEE5; --paper-hi: #FBF9F4;
  --ink: #151821; --ink-2: #454A57;
  --night: #0F1218; --chalk: #E8E3D7; --chalk-2: #A9AEBB;
  --signal: #F2531B; --signal-ink: #B5390B;
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --meta: 500 .75rem/1.35 var(--mono);        /* 12 px : cartouche, cote, pied de page */
  --label: 500 .8125rem/1.35 var(--mono);     /* 13 px : sur-titres, navigation, nomenclature */
  --gut: clamp(1rem, 4.2vw, 3.75rem);
  --hud-h: 44px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --t1: 160ms; --t2: 220ms; --t3: 400ms;
  --fg: var(--ink); --bgc: var(--paper); --mute: var(--ink-2); --rule: rgb(21 24 33 / .2);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 0; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.55 var(--sans); font-stretch: 100%; overflow-x: clip;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: var(--signal); color: var(--ink); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: var(--gut); top: -5rem; z-index: 50; background: var(--ink); color: var(--paper); padding: .75rem 1rem; font-weight: 500; }
.skip:focus { top: .75rem; }
.lvh { position: fixed; top: 0; left: 0; width: 0; height: 100lvh; visibility: hidden; pointer-events: none; }

#machine { position: fixed; inset: 0 auto auto 0; width: 100vw; height: 100lvh; z-index: 0; display: block; pointer-events: none; background: var(--paper); }
main, .nav, .hud { position: relative; z-index: 1; }

/* thèmes : le canvas peint les fonds ; ces règles ne servent qu'au texte (et au repli sans script) */
[data-theme="night"] { --fg: var(--chalk); --bgc: var(--night); --mute: var(--chalk-2); --rule: rgb(232 227 215 / .24); color: var(--chalk); }
[data-theme="signal"] { --fg: var(--ink); --bgc: var(--signal); --mute: var(--ink); --rule: rgb(21 24 33 / .4); }
html:not(.live) [data-theme="night"] { background: var(--night); }
html:not(.live) [data-theme="signal"] { background: var(--signal); }
html:not(.live) #machine { visibility: hidden; }

/* ------------------------------------------------------------------ éléments */
.eyebrow { font: var(--label); letter-spacing: .02em; color: var(--mute); }
.eyebrow span { opacity: .75; }
.lead { font-size: clamp(1.125rem, 1rem + .5vw, 1.375rem); line-height: 1.45; color: var(--mute); max-width: 38ch; text-wrap: pretty; }
.title { font-weight: 600; font-stretch: 106%; font-size: clamp(2.25rem, min(5.3vw, 9.4svh), 5.5rem); line-height: .97; letter-spacing: -.035em; }

.btn { display: inline-flex; align-items: center; gap: .75rem; min-height: 3.25rem; padding: 0 1.5rem; background: var(--fg); color: var(--bgc);
  font: 500 1rem/1 var(--sans); text-decoration: none; border-radius: 2px;
  transition: background-color var(--t1) var(--ease), color var(--t1) var(--ease), transform var(--t1) var(--ease); }
.btn svg { transition: transform var(--t2) var(--ease); }
.btn:hover { background: var(--signal); color: var(--ink); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: scale(.97); }
.btn--sm { min-height: 2.75rem; padding: 0 1.25rem; font-size: .875rem; }
[data-nav="signal"] .btn--sm:hover { background: var(--paper-hi); }

/* ------------------------------------------------------------------ navigation */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 20; height: 4.25rem; padding: 0 var(--gut); display: flex; align-items: center; gap: 2rem; color: var(--fg);
  transition: color var(--t3) var(--ease); }
html[data-nav="night"] .nav { --fg: var(--chalk); --bgc: var(--night); }
html[data-nav="signal"] .nav { --fg: var(--ink); --bgc: var(--signal); }
.brand { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; text-decoration: none; margin-right: auto; }
.brand__sign { overflow: visible; }
.brand__sign path { fill: var(--bgc); stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; transition: transform var(--t3) var(--ease), fill var(--t3) var(--ease); }
.brand__sign .s2 { fill: var(--signal); }
html[data-nav="signal"] .brand__sign .s2 { fill: var(--ink); }
.brand:hover .s1 { transform: translateY(-4px); }
.brand:hover .s3 { transform: translateY(4px); }
.brand__word { font-weight: 600; font-stretch: 112%; font-size: 1.25rem; letter-spacing: -.02em; }
.nav__links { display: flex; gap: 1.75rem; }
.nav__links a { display: inline-flex; align-items: center; min-height: 2.75rem; font: var(--label); letter-spacing: .02em; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 calc(50% + .75em) / 0 1px no-repeat; transition: background-size var(--t2) var(--ease); }
.nav__links a:hover { background-size: 100% 1px; }

/* ------------------------------------------------------------------ héros */
.hero { min-height: 100svh; display: grid; align-content: center; padding: 6.5rem var(--gut) calc(var(--hud-h) + 2.5rem); }
.hero__copy { max-width: min(47rem, 55vw); }
.hero__head { width: fit-content; max-width: 100%; margin-top: 1.5rem; }
.hero__title { font-weight: 600; font-stretch: 108%; font-size: clamp(2.75rem, min(7.1vw, 11.3svh), 7.5rem); line-height: .93; letter-spacing: -.04em; }
.hero__title .l { display: block; overflow: clip; overflow-clip-margin: .06em; padding-bottom: .09em; margin-bottom: -.09em; }
.hero__title .l > span { display: block; }
.dot { color: var(--signal); font-weight: inherit; }
.cote { display: flex; align-items: center; gap: .75rem; margin-top: 1.5rem; font: var(--meta); letter-spacing: .02em; color: var(--ink-2); white-space: nowrap; }
.cote i { position: relative; flex: 1; height: 1px; background: currentColor; }
.cote i:first-child { transform-origin: right center; }
.cote i:last-child { transform-origin: left center; }
.cote i::before { content: ""; position: absolute; top: -6px; width: 1px; height: 13px; background: currentColor; }   /* 13 = 6 + 1 + 6 : centré sur le trait */
.cote i::after { content: ""; position: absolute; top: -3.5px; border: 4px solid transparent; }
.cote i:first-child::before { left: 0; }
.cote i:first-child::after { left: -3px; border-right-color: currentColor; }
.cote i:last-child::before { right: 0; }
.cote i:last-child::after { right: -3px; border-left-color: currentColor; }
.hero .lead { margin-top: 1.75rem; }
.hero__cta { margin-top: 2.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.down { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; font: var(--label); letter-spacing: .02em; text-decoration: none; color: var(--ink-2); }
.down svg { animation: nudge 1.8s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }
.js:not(.live) .hero__copy, .js:not(.live) .nav, .js:not(.live) .hud { visibility: hidden; }

/* ------------------------------------------------------------------ scènes épinglées */
.pin { position: relative; height: calc(100svh * (1 + var(--len, 1))); }
.stage { position: sticky; top: 0; height: 100svh; overflow: clip; display: grid; }
.stage > * { grid-area: 1 / 1; min-width: 0; }
.copy { align-self: center; padding: 5.5rem var(--gut) calc(var(--hud-h) + 1.5rem); max-width: min(46rem, 50vw); position: relative; }
.copy .title { margin-top: 1.25rem; }
.copy .lead { margin-top: 1.5rem; }
/* voile : le dessin s'efface derrière le texte au lieu de passer dessous */
.stage::before { content: ""; grid-area: 1 / 1; pointer-events: none;
  background: linear-gradient(90deg, var(--bgc) 0, var(--bgc) 30%, color-mix(in srgb, var(--bgc) 82%, transparent) 43%, transparent 60%); }
.chaine .stage::before, .conf .stage::before { display: none; }

/* éclatement */
.eclate .stage { place-items: center; text-align: center; --veil: 1; }
.eclate .stage::before { place-self: center; width: min(96vw, 84rem); height: min(70svh, 38rem); opacity: var(--veil);
  background: radial-gradient(closest-side, var(--paper) 34%, rgb(242 238 229 / .8) 64%, transparent); }
.shout { font-weight: 600; font-stretch: 104%; font-size: clamp(2.5rem, 8.6vw, 9rem); line-height: .9; letter-spacing: -.045em; max-width: 11.5ch; text-wrap: balance; padding: 0 var(--gut); }
.shout > div, .shout div > div { will-change: transform; }
.eclate__note { align-self: end; margin-bottom: calc(var(--hud-h) + 2.25rem); padding: 0 var(--gut); max-width: 46ch; font: var(--label); line-height: 1.5; letter-spacing: .02em; color: var(--ink-2); }

/* étages */
.etage { align-self: center; padding: 5.5rem var(--gut) calc(var(--hud-h) + 1.5rem); max-width: min(46rem, 52vw); position: relative; }
.live:not(.static) .etage { visibility: hidden; }
.etage__title { margin-top: 1rem; margin-left: -.04em; font-weight: 600; font-stretch: calc(var(--w, 100) * 1%); font-size: clamp(3rem, min(8.4vw, 15svh), 8.75rem); line-height: .92; letter-spacing: -.045em; white-space: nowrap; }
.etage__lead { margin-top: 1rem; font-size: clamp(1.25rem, 1rem + .9vw, 1.75rem); font-weight: 500; letter-spacing: -.015em; line-height: 1.2; }
.etage__body { margin-top: .75rem; max-width: 42ch; color: var(--ink-2); text-wrap: pretty; }
.nomen { margin-top: 1.75rem; max-width: 33rem; border-top: 1px solid var(--rule); }
.nomen li { display: grid; grid-template-columns: 2.25rem 10rem 1fr; align-items: center; gap: .25rem .75rem; min-height: 3rem; padding: .5rem 0; border-bottom: 1px solid var(--rule); cursor: default; }
.nomen li > * { transition: transform var(--t2) var(--ease); }
.nomen li:hover > *, .nomen li.is-on > * { transform: translateX(.5rem); }
.nomen .rep { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border: 1px solid currentColor; border-radius: 50%; font: 500 .75rem/1 var(--mono); transition: background-color var(--t1) var(--ease), transform var(--t2) var(--ease); }
.nomen li:hover .rep, .nomen li.is-on .rep { background: var(--signal); }
.nomen__name { font-weight: 500; }
.nomen__tech { font: 400 .8125rem/1.4 var(--mono); color: var(--ink-2); }

/* ruban : objet du dessin, il garde ses capitales */
.tape { position: relative; height: clamp(17rem, 50svh, 28rem); overflow: clip; }
.tape__band { position: absolute; left: -12vw; width: 124vw; top: 50%; height: clamp(3.25rem, 6vw, 4.5rem); display: flex; align-items: center; overflow: clip;
  font-weight: 600; font-stretch: 118%; font-size: clamp(1.125rem, 2.3vw, 1.75rem); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.tape__band--a { background: var(--ink); color: var(--paper); transform: translateY(-50%) rotate(-5deg); }
.tape__band--b { background: var(--signal); color: var(--ink); transform: translateY(-50%) rotate(4deg); }
.tape__track { will-change: transform; padding-left: 1rem; }

/* chaîne */
.pipe { position: relative; margin-top: 2rem; padding-left: 1.5rem; display: grid; max-width: 22rem; --p: 0; }
.pipe::before, .pipe::after { content: ""; position: absolute; left: .25rem; top: 1rem; bottom: 1rem; width: 1px; background: var(--rule); }
.pipe::after { background: var(--signal); transform: scaleY(var(--p)); transform-origin: top; }
.pipe li { position: relative; padding: .5rem 0; font: var(--label); letter-spacing: .02em; color: var(--chalk-2); transition: color var(--t2) var(--ease), transform var(--t2) var(--ease); }
.pipe li::before { content: ""; position: absolute; left: -1.5rem; top: 50%; width: .5rem; height: .5rem; margin-top: -.25rem; border: 1px solid currentColor; border-radius: 50%; background: var(--night);
  transition: background-color var(--t2) var(--ease), border-color var(--t2) var(--ease); }
.pipe li.on { color: var(--chalk); }
.pipe li.on::before { background: var(--signal); border-color: var(--signal); }
.pipe li.now { transform: translateX(.25rem); }

/* références */
.nb { white-space: nowrap; }
.noir { display: inline-block; width: calc(var(--n) * .55em); height: .72em; background: currentColor; vertical-align: -.03em; border-radius: 1px; transform-origin: left center; }
.noir:hover { animation: refus var(--t3) var(--ease); }
@keyframes refus { 25% { transform: translateX(-4px); } 60% { transform: translateX(4px); } }
.conf__note { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); max-width: 38ch; }

/* contact */
.contact { position: relative; min-height: 100svh; display: grid; grid-template-rows: 1fr auto; padding: 7rem var(--gut) 0; }
.contact__copy { align-self: center; max-width: min(56rem, 62vw); padding-bottom: 2rem; }
.contact__title { margin-top: 1.25rem; font-weight: 600; font-stretch: 106%; font-size: clamp(2.5rem, min(8.2vw, 14svh), 8.75rem); line-height: .92; letter-spacing: -.045em; max-width: 9.5ch; }
.contact .lead { margin-top: 1.5rem; color: var(--ink); max-width: 32ch; }
.mail { display: inline-flex; align-items: center; gap: 1rem; margin-top: 2.25rem; min-height: 3.5rem; font-weight: 600; font-stretch: 104%; font-size: clamp(1.25rem, 3.1vw, 2.75rem); letter-spacing: -.025em;
  text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: .15em; }
.mail svg { flex: none; width: .8em; height: .8em; transition: transform var(--t2) var(--ease); }
.mail:hover svg { transform: translateX(8px); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding: 1rem 0 calc(var(--hud-h) + 1rem); border-top: 1px solid var(--rule);
  font: var(--meta); line-height: 1.5; letter-spacing: .02em; }
.foot a { display: inline-flex; align-items: center; min-height: 2.75rem; margin: -.75rem 0; }

/* cartouche : la signature de la planche, seul texte d'interface en capitales */
.hud { position: fixed; inset: auto 0 0 0; z-index: 15; height: var(--hud-h); padding: 0 var(--gut); display: flex; align-items: center; gap: 1rem; pointer-events: none;
  font: var(--meta); line-height: 1; letter-spacing: .08em; text-transform: uppercase; font-variant-numeric: tabular-nums; color: var(--fg); transition: color var(--t3) var(--ease); }
html[data-hud="night"] .hud { --fg: var(--chalk); }
.hud__fig span { margin-left: .75rem; }
.hud__bar { flex: 1; height: 1px; background: color-mix(in srgb, currentColor 26%, transparent); }
.hud__bar i { display: block; height: 100%; background: currentColor; transform: scaleX(0); transform-origin: left; }

/* ------------------------------------------------------------------ écrans larges mais bas (portables) */
@media (min-width: 860px) and (max-height: 780px) {
  .hero { padding-top: 5rem; padding-bottom: calc(var(--hud-h) + 1rem); }
  .hero__head { margin-top: 1rem; }
  .cote { margin-top: 1rem; }
  .hero .lead { margin-top: 1rem; font-size: 1.125rem; }
  .hero__cta { margin-top: 1.5rem; }
  .copy, .etage { padding-top: 4.5rem; }
  .copy .lead { margin-top: 1rem; font-size: 1.125rem; }
  .nomen { margin-top: 1.25rem; }
  .nomen li { min-height: 2.75rem; padding: .25rem 0; }
  .pipe { margin-top: 1.25rem; }
  .pipe li { padding: .25rem 0; }
  .contact { padding-top: 5.5rem; }
  .mail { margin-top: 1.5rem; }
}

/* ------------------------------------------------------------------ petits écrans */
@media (max-width: 859px) {
  .nav { height: 3.75rem; }
  .nav__links { display: none; }
  .hero { align-content: start; padding-top: 5.5rem; }
  .hero__copy { max-width: none; }
  .hero__head { margin-top: 1rem; }
  .hero__title { font-size: clamp(2.75rem, 11.6vw, 4rem); }
  .down { display: none; }
  .hero .lead { margin-top: 1rem; font-size: 1rem; }
  .hero__cta { margin-top: 1rem; }
  .cote { margin-top: 1rem; }
  .copy, .etage { align-self: end; max-width: none; padding-top: 0; padding-bottom: calc(var(--hud-h) + 1rem); }
  .stage::before { background: linear-gradient(0deg, var(--bgc) 0, var(--bgc) 44%, transparent 60%); }
  .eclate .stage::before { background: radial-gradient(closest-side, var(--paper) 40%, rgb(242 238 229 / .84) 66%, transparent); height: min(52svh, 24rem); }
  .etage__title { font-size: clamp(2.5rem, 13.6vw, 5rem); margin-top: .5rem; }
  .etage__lead { margin-top: .5rem; }
  .etage__body { display: none; }
  .nomen { margin-top: 1rem; }
  .nomen li { grid-template-columns: 2rem 1fr; min-height: 0; padding: .5rem 0; }
  .nomen__tech { grid-column: 2; font-size: .75rem; }
  .copy .title { margin-top: .75rem; }
  .copy .lead { margin-top: 1rem; font-size: 1rem; }
  .pipe { margin-top: 1.25rem; grid-template-rows: repeat(3, auto); grid-auto-flow: column; column-gap: 2.5rem; max-width: none; padding-left: 0; }
  .pipe::before, .pipe::after { display: none; }
  .pipe li { padding-left: 1.5rem; }
  .pipe li::before { left: 0; }
  .conf__note { margin-top: 1.25rem; }
  .contact { padding-top: 46svh; }
  .contact__copy { max-width: none; align-self: end; }
  .contact .lead { margin-top: 1rem; }
  .mail { margin-top: 1.5rem; }
}

/* ------------------------------------------------------------------ sans mouvement (prefers-reduced-motion ou ?static) */
html.static { scroll-behavior: auto; }
html.static .pin { height: auto; }
html.static .stage { position: relative; height: auto; min-height: 100svh; overflow: visible; align-content: center; padding: 4rem 0; isolation: isolate; }
html.static .stage > * { grid-area: auto; }
html.static .stage::before { position: absolute; inset: 0; z-index: -1; }
html.static .eclate .stage::before { display: none; }
html.static .eclate .stage { row-gap: 1.5rem; }
html.static .eclate__note { align-self: auto; margin-bottom: 0; }
html.static .etage { padding-top: 2.5rem; padding-bottom: 2.5rem; }
html.static .down svg { animation: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .down svg, .noir:hover { animation: none; } }

/* ------------------------------------------------------------------ page de texte (mentions légales) */
.page { max-width: 46rem; margin: 0 auto; padding: 8rem var(--gut) 6rem; }
.page h1 { font-weight: 600; font-stretch: 106%; font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1; letter-spacing: -.035em; }
.page h2 { margin-top: 2.5rem; font-size: 1.25rem; font-weight: 600; }
.page p, .page li { margin-top: .75rem; color: var(--ink-2); max-width: 62ch; }
.page a { color: var(--signal-ink); }
.page .back { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 500; }
.page .todo { background: rgb(242 83 27 / .16); padding: 0 .25em; color: var(--ink); }
