/* ==========================================================================
   CEROCODING — feuille de style
   Direction : « observatoire éditorial » (lavis pêche, blanc pur, encre graphite,
   angles à 0 px, aucune ombre), rouge #DE0635 réservé au logo.
   ========================================================================== */

:root {
  --canvas: #ffffff;
  --ink: #3a3a3e;
  --ink-soft: #6b6a70;
  --carbon: #090b11;
  --ash: #b5b0b0;
  --apricot: #ffcf9e;
  --iris: #babfff;
  --fuchsia: #e3a2ef;
  --polar: #bfe0f7;
  --red: #de0635;
  --line-soft: rgba(58, 58, 62, .18);

  --font: 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --fs-body: clamp(18px, 1.55vw, 24px);
  --fs-heading: clamp(32px, 3.7vw, 56px);
  --fs-display: clamp(44px, 5.8vw, 92px);
  --fs-mega: clamp(56px, 11vw, 184px);

  --pad: clamp(16px, 3.4vw, 48px);
  --max: 1320px;
  --section: clamp(72px, 9vw, 140px);
  --header-h: 72px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.76, 0, .24, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -.01em;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
em { font-style: italic; }
p, h1, h2, h3, ul, ol, dl, dd, figure { margin: 0; }

::selection { background: var(--apricot); color: var(--carbon); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 1200;
  padding: 10px 14px; background: var(--ink); color: var(--canvas);
  transform: translateY(-200%);
  transition: transform .4s var(--ease);
}
.skip:focus { transform: none; }

/* ---------- Typographie ---------- */
.caption { font-size: 12px; line-height: 1.5; letter-spacing: -.03em; }
.body { font-size: var(--fs-body); line-height: 1.5; letter-spacing: -.01em; }
.heading { font-size: var(--fs-heading); line-height: 1.08; letter-spacing: -.035em; font-weight: 400; }
.display { font-size: var(--fs-display); line-height: 1; letter-spacing: -.04em; font-weight: 400; }

/* masques SplitText : on élargit un peu la zone de rognage (accents, italiques) */
.w-mask, .word-mask { padding: .08em .06em .1em; margin: -.08em -.06em -.1em; }

/* ---------- Mise en page ---------- */
.container {
  width: 100%;
  max-width: calc(var(--max) + var(--pad) * 2);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { position: relative; padding-block: var(--section); }

.section__head {
  position: relative;
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 12px;
  margin-bottom: clamp(36px, 5vw, 72px);
}
.rule {
  position: absolute; left: 0; right: 0; top: 0;
  height: 1px; background: var(--ink);
  transform-origin: 0 50%;
}

/* ---------- Liens & boutons ---------- */
.link { position: relative; display: inline-block; }
.link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: currentColor;
  transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform .6s var(--ease);
}
.link:hover::after, .link:focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }

.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: space-between; gap: 28px;
  min-width: 232px; padding: 13px 16px;
  border: 1px solid var(--ink); border-radius: 0;
  background: var(--canvas); color: var(--ink);
  font-size: 14px; font-weight: 500; letter-spacing: -.02em; line-height: 1.2;
  cursor: pointer;
  transition: color .5s var(--ease);
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform .6s var(--ease);
}
.btn:hover, .btn:focus-visible { color: var(--canvas); }
.btn:hover::before, .btn:focus-visible::before { transform: none; }
.btn__arrow { width: 14px; height: 14px; flex: none; transition: transform .6s var(--ease); }
.btn:hover .btn__arrow, .btn:focus-visible .btn__arrow { transform: rotate(-45deg); }
.btn--small { min-width: 0; }

.link-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 0 0 5px; border: 0; background: none;
  font-size: 14px; font-weight: 500; letter-spacing: -.02em;
  color: var(--ink); cursor: pointer;
}
.link-btn::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform-origin: 0 50%;
}
.link-btn:hover::after, .link-btn:focus-visible::after { animation: underline-swap .9s var(--ease); }
.link-btn svg { width: 14px; height: 14px; transition: transform .6s var(--ease); }
.link-btn:hover svg, .link-btn:focus-visible svg { transform: translateX(5px); }

@keyframes underline-swap {
  0%   { transform: scaleX(1); transform-origin: 100% 50%; }
  45%  { transform: scaleX(0); transform-origin: 100% 50%; }
  46%  { transform: scaleX(0); transform-origin: 0 50%; }
  100% { transform: scaleX(1); transform-origin: 0 50%; }
}

.tags { display: flex; flex-wrap: wrap; gap: 5px; list-style: none; margin: 16px 0 0; padding: 0; }
.tags li {
  padding: 6px 8px;
  border: 1px solid var(--ink); background: var(--canvas);
  font-size: 12px; line-height: 1; letter-spacing: -.02em;
  transition: background-color .45s var(--ease);
}

/* ---------- Préchargement ---------- */
.loader {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: var(--canvas);
  clip-path: inset(0% 0% 0% 0%);
  animation: loader-failsafe .6s ease 7s forwards;
}
.no-js .loader { display: none; }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }

.loader__inner { display: grid; justify-items: center; gap: 26px; }
.loader__mark { position: relative; width: clamp(92px, 11vw, 140px); aspect-ratio: 340.4 / 323.7; }
.loader__mark svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.loader__ghost {
  fill: none; stroke: var(--ink); stroke-width: 2.4;
  stroke-dasharray: 1; stroke-dashoffset: var(--draw, 0);
  opacity: .4;
}
.loader__fill { fill: var(--red); clip-path: inset(calc(100% - var(--p, 0%)) 0 0 0); }
.loader__row {
  display: flex; justify-content: space-between; gap: 40px;
  min-width: 210px; font-weight: 500;
}
.loader__count { font-variant-numeric: tabular-nums; }

/* ---------- Barre de progression ---------- */
.progress { position: fixed; inset: 0 0 auto 0; z-index: 90; height: 2px; pointer-events: none; }
.progress i {
  display: block; height: 100%;
  background: var(--red);
  transform: scaleX(0); transform-origin: 0 50%;
}

/* ---------- Curseur ---------- */
.cursor { display: none; }
.has-cursor .cursor { display: block; }
.has-cursor body, .has-cursor a, .has-cursor button, .has-cursor [data-open], .has-cursor .tile { cursor: none; }

.cursor__dot, .cursor__ring { position: fixed; left: 0; top: 0; z-index: 999; pointer-events: none; }
.cursor__dot {
  width: 6px; height: 6px; margin: -3px 0 0 -3px;
  background: var(--carbon);
  transition: opacity .3s;
}
.cursor__ring {
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  display: grid; place-items: center;
}
.cursor__shape {
  position: absolute; inset: 0;
  border: 1px solid var(--carbon);
  transition: transform .55s var(--ease), background-color .35s, opacity .3s;
}
.cursor__label {
  position: relative;
  color: var(--canvas); font-size: 12px; font-weight: 500; letter-spacing: -.03em;
  opacity: 0; transform: scale(.6);
  transition: opacity .3s, transform .5s var(--ease);
}
.cursor.is-link .cursor__shape { transform: rotate(45deg) scale(.78); }
.cursor.is-view .cursor__shape { transform: scale(2.1); background: var(--carbon); }
.cursor.is-view .cursor__label { opacity: 1; transform: none; }
.cursor.is-view .cursor__dot { opacity: 0; }
.cursor.is-down .cursor__shape { transform: scale(.7); }
.cursor.is-hidden .cursor__dot, .cursor.is-hidden .cursor__shape { opacity: 0; }

/* ---------- En-tête ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 70;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: var(--pad);
  border-bottom: 1px solid transparent;
  transition: transform .7s var(--ease), background-color .5s var(--ease), border-color .5s var(--ease);
}
.header.is-solid { background: var(--canvas); border-bottom-color: var(--line-soft); }
.header.is-hidden { transform: translateY(-100%); }
.menu-open .header { background: transparent; border-bottom-color: transparent; transform: none; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { width: 28px; height: 27px; fill: var(--red); transition: transform 1s var(--ease); }
.brand:hover .brand__mark, .brand:focus-visible .brand__mark { transform: rotate(180deg); }
.brand__word {
  display: grid;
  font-size: 12px; line-height: 1; font-weight: 500; letter-spacing: -.03em;
  text-transform: uppercase;
}

.header__status { display: inline-flex; align-items: center; gap: 8px; }
.status-dot { width: 6px; height: 6px; background: var(--red); animation: status 2.4s ease-in-out infinite; }
@keyframes status { 50% { opacity: .25; transform: scale(.6); } }

.burger {
  position: relative;
  width: 40px; height: 40px; padding: 0;
  display: grid; place-content: center; gap: 4px;
  border: 1px solid var(--ink); border-radius: 0; background: var(--canvas);
  cursor: pointer;
}
.burger span {
  display: block; width: 16px; height: 1px; background: var(--ink);
  transition: transform .6s var(--ease), opacity .3s, width .5s var(--ease);
}
.burger span:nth-child(2) { width: 10px; justify-self: end; }
.burger:hover span:nth-child(1) { width: 10px; }
.burger:hover span:nth-child(2) { width: 16px; }
.menu-open .burger span:nth-child(1) { width: 16px; transform: translateY(5px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Menu plein écran ---------- */
.menu {
  position: fixed; inset: 0; z-index: 60;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 320px);
  align-items: end; gap: 40px;
  padding: calc(var(--header-h) + 24px) var(--pad) clamp(24px, 5vh, 48px);
  background: var(--canvas);
  overflow: hidden;
  visibility: hidden;
  clip-path: inset(0% 0% 100% 0%);
}
.no-anim .menu-open .menu, .menu-open.no-anim .menu { visibility: visible; clip-path: none; }
.menu__wash {
  position: absolute; left: -10%; right: -10%; bottom: -55%; height: 95%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 207, 158, .95), rgba(255, 207, 158, 0) 70%);
  pointer-events: none;
}
.menu__list { position: relative; list-style: none; margin: 0; padding: 0; }
.menu__item { overflow: clip; }
.menu__link {
  display: flex; align-items: flex-start; gap: clamp(12px, 2vw, 28px);
  padding-block: .02em;
  font-size: clamp(38px, min(7.6vw, 11.5vh), 116px); line-height: 1; letter-spacing: -.045em;
}
.menu__idx { margin-top: clamp(6px, 1.2vw, 18px); transition: transform .6s var(--ease); }
.menu__arrow {
  width: .42em; height: .42em; align-self: center;
  opacity: 0; transform: translateX(-.3em);
  transition: opacity .4s, transform .7s var(--ease);
}
.menu__link:hover .menu__arrow, .menu__link:focus-visible .menu__arrow { opacity: 1; transform: rotate(-45deg); }
.menu__link:hover .menu__idx { transform: translateX(8px); }
.menu__side { position: relative; display: grid; gap: 28px; align-content: end; font-size: 16px; }
.menu__label { margin-bottom: 6px; color: var(--ink-soft); }
.menu__mark { width: 64px; height: 61px; fill: var(--red); }

/* texte « rouleau » : chaque lettre glisse et laisse place à son double */
.roll { display: inline-flex; overflow: clip; line-height: 1.18; }
.roll .rc {
  display: inline-block; white-space: pre;
  text-shadow: 0 1.18em 0 currentColor;
  transition: transform .75s var(--ease);
  transition-delay: calc(var(--i, 0) * 16ms);
}
a:hover .roll .rc, a:focus-visible .roll .rc { transform: translateY(-1.18em); }

/* ---------- Héro ---------- */
.hero {
  position: relative; isolation: isolate; overflow: clip;
  height: 100vh; height: 100svh; min-height: 640px;
  background: var(--canvas);
}
.hero__wash {
  position: absolute; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(60% 64% at 50% 110%, rgba(255, 207, 158, 1) 0%, rgba(255, 207, 158, .7) 36%, rgba(255, 207, 158, 0) 74%),
    radial-gradient(34% 46% at 6% 102%, rgba(186, 191, 255, .5) 0%, rgba(186, 191, 255, 0) 70%),
    radial-gradient(30% 42% at 95% 98%, rgba(227, 162, 239, .36) 0%, rgba(227, 162, 239, 0) 70%);
  transform-origin: 50% 100%;
  animation: wash 12s ease-in-out infinite alternate;
}
@keyframes wash { to { transform: scale(1.08) translateY(-2%); } }

.hero__canvas {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%;
  opacity: 0; transition: opacity 1.4s var(--ease);
}
.webgl-ready .hero__canvas { opacity: 1; }
.hero__fallback {
  display: none;
  position: absolute; z-index: -2; left: 50%; bottom: 0;
  width: min(66vh, 88vw); height: auto; aspect-ratio: 340.4 / 323.7;
  fill: var(--red);
  transform: translate(-50%, 40%);
}
.no-webgl .hero__canvas { display: none; }
.no-webgl .hero__fallback { display: block; animation: floaty 7s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translate(-50%, 37%) rotate(-3deg); } }

.hero__content { position: relative; padding: clamp(112px, 20vh, 200px) var(--pad) 0; text-align: center; }
.hero__kicker { display: inline-flex; align-items: center; gap: 12px; margin-bottom: clamp(18px, 3vh, 28px); }
.hero__kicker-sep { width: 28px; height: 1px; background: var(--ink); }
.hero__title { margin-inline: auto; }
.hero__line { display: block; }
.br-m { display: none; }

.hero__foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  padding: 0 var(--pad) clamp(20px, 4vh, 36px);
}
.hero__lead-wrap { display: grid; gap: 18px; max-width: 320px; }
.hero__lead { font-size: clamp(15px, 1.15vw, 17px); line-height: 1.45; }
.hero__ctas { display: grid; gap: 5px; }

.scroll-cue { display: inline-flex; align-items: center; gap: 10px; }
.scroll-cue i { position: relative; width: 44px; height: 1px; background: rgba(58, 58, 62, .22); overflow: hidden; }
.scroll-cue i::after {
  content: ''; position: absolute; inset: 0; background: var(--ink);
  animation: cue 2.2s var(--ease-in-out) infinite;
}
@keyframes cue { 0% { transform: translateX(-100%); } 65%, 100% { transform: translateX(100%); } }

/* ---------- Bandeau défilant ---------- */
.marquee {
  position: relative; overflow: clip;
  padding-block: clamp(14px, 2vw, 22px);
  border-block: 1px solid var(--ink);
  background: var(--canvas);
}
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group {
  flex: none;
  display: flex; align-items: center;
  gap: clamp(18px, 2.4vw, 36px); padding-right: clamp(18px, 2.4vw, 36px);
  list-style: none; margin: 0;
  font-size: clamp(34px, 5.2vw, 80px); line-height: 1.05; letter-spacing: -.045em;
  white-space: nowrap;
}
.marquee__item {
  -webkit-text-stroke: 1px transparent;
  transition: color .45s var(--ease), -webkit-text-stroke-color .45s var(--ease);
}
.marquee__item:hover { color: transparent; -webkit-text-stroke-color: var(--ink); }
.marquee__sep svg {
  width: .38em; height: .36em; fill: var(--red);
  transform: rotate(var(--r, 0deg));
}

/* ---------- 01 · Studio ---------- */
.studio__text {
  font-size: clamp(28px, 3.8vw, 60px); line-height: 1.12; letter-spacing: -.035em;
  text-indent: clamp(0px, 11vw, 170px);
}
.studio__text > * { text-indent: 0; }
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(56px, 8vw, 120px);
  border-top: 1px solid var(--ink);
}
.stat { display: grid; align-content: start; gap: 12px; padding: 14px 16px 0 0; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--line-soft); }
.stat__num {
  font-size: clamp(56px, 7.6vw, 124px); line-height: .9; letter-spacing: -.06em;
  font-variant-numeric: tabular-nums;
}
.stat dd { max-width: 22ch; }

/* ---------- 02 · Expertises ---------- */
.services .heading { margin-bottom: clamp(32px, 4vw, 56px); }
.services__list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--ink); }
.service {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 64px minmax(0, 1.05fr) minmax(0, 1fr) 32px;
  gap: clamp(16px, 2.4vw, 40px); align-items: start;
  padding: clamp(22px, 2.6vw, 36px) 12px;
  border-top: 1px solid var(--ink);
}
.service::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--tint);
  transform: scaleY(0); transform-origin: 50% 100%;
  transition: transform .8s var(--ease);
}
.service:hover::before { transform: scaleY(1); }
.service__idx { padding-top: 10px; }
.service__title {
  font-size: clamp(30px, 3.6vw, 56px); line-height: 1; letter-spacing: -.04em; font-weight: 400;
  transition: transform .8s var(--ease);
}
.service:hover .service__title { transform: translateX(14px); }
.service__desc { max-width: 44ch; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.5; }
.service__arrow { justify-self: end; width: 28px; height: 28px; margin-top: 8px; transition: transform .8s var(--ease); }
.service:hover .service__arrow { transform: rotate(-45deg); }
.service:hover .tags li { background: transparent; }

/* ---------- 03 · Stack ---------- */
.band-polar { background: var(--polar); }
.stack__intro {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.stack__intro .heading { max-width: 15ch; }
.stack__hint { margin-top: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 5px; }
.filter {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 10px 14px;
  border: 1px solid var(--ink); border-radius: 0; background: var(--canvas); color: var(--ink);
  font-size: 13px; font-weight: 500; letter-spacing: -.02em;
  cursor: pointer;
  transition: color .45s var(--ease);
}
.filter::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform .55s var(--ease);
}
.filter:hover, .filter.is-active { color: var(--canvas); }
.filter:hover::before, .filter.is-active::before { transform: none; }
.filter sup { position: relative; top: -2px; margin-left: 2px; font-size: 9px; vertical-align: top; }

.tiles {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px;
}
.tile {
  --tint: var(--apricot);
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  min-height: clamp(176px, 16vw, 236px); padding: 12px;
  background: var(--canvas);
  outline-offset: -1px;
}
.tile[data-cat="fw"] { --tint: var(--iris); }
.tile[data-cat="data"] { --tint: var(--fuchsia); }
.tile::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--tint);
  transform: translateY(101%);
  transition: transform .65s var(--ease);
}
.tile:hover::before, .tile:focus-visible::before { transform: none; }
.tile.is-hidden { display: none; }
.tile__top { display: flex; justify-content: space-between; gap: 12px; }
.tile__name {
  font-size: clamp(34px, 3.6vw, 58px); line-height: .95; letter-spacing: -.05em;
  transition: transform .65s var(--ease);
}
.tile:hover .tile__name, .tile:focus-visible .tile__name { transform: translateY(-10px); }
.tile__code {
  display: block; min-height: 1.5em;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.5; letter-spacing: 0;
  color: var(--carbon);
  white-space: nowrap; overflow: hidden;
}
.tile__code::before { content: '\203A'; margin-right: 6px; color: var(--ink-soft); }
.tile__code::after {
  content: ''; display: inline-block;
  width: 6px; height: 12px; margin-left: 2px; vertical-align: -2px;
  background: var(--carbon);
  visibility: hidden;
}
.tile.is-typing .tile__code::after { visibility: visible; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { visibility: hidden; } }

/* ---------- 04 · Réalisations ---------- */
.work { position: relative; background: var(--canvas); padding-top: var(--section); }
.work__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.work__head .section__head { margin-bottom: clamp(20px, 3vw, 40px); }
.work__progress { display: flex; align-items: center; gap: 16px; }
.work__count { font-variant-numeric: tabular-nums; }
.work__bar { position: relative; width: clamp(120px, 14vw, 220px); height: 1px; background: var(--line-soft); overflow: hidden; }
.work__bar i { position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; }

.work__viewport {
  margin-top: clamp(24px, 4vh, 48px);
  padding-bottom: var(--section);
  overflow-x: auto; scrollbar-width: none;
}
.work__viewport::-webkit-scrollbar { display: none; }
.work__track {
  display: flex; gap: clamp(24px, 3vw, 56px);
  width: max-content;
  padding-inline: var(--pad);
}

/* épinglé en horizontal (desktop, piloté par main.js) */
.work.is-pinned { padding-top: 0; }
.work.is-pinned .work__pin {
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: clip;
}
.work.is-pinned .work__viewport { overflow: visible; padding-bottom: 0; }

.project {
  --ph: min(52vh, 33vw);
  flex: none;
  width: calc(var(--ph) * 1.52);
  display: grid; align-content: start; gap: 18px;
}
.project__visual {
  position: relative; display: block; overflow: hidden;
  height: var(--ph);
  container-type: size;
  cursor: pointer;
}
.project__inner { position: absolute; inset: 0; display: grid; place-items: center; }
.tint-apricot { background: var(--apricot); }
.tint-iris-line { background: var(--canvas); border: 1px solid var(--iris); }
.tint-polar { background: var(--polar); }
.tint-iris { background: var(--iris); }
.tint-fuchsia { background: var(--fuchsia); }

.project__meta { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; }
.project__title {
  margin-top: 8px;
  font-size: clamp(26px, 2.5vw, 40px); line-height: 1; letter-spacing: -.04em; font-weight: 400;
}
.project__desc { font-size: 15px; line-height: 1.5; }
.project .tags { margin: 12px 0 16px; }

/* maquette : téléphone Bougé */
.phone {
  position: relative;
  height: 86%; aspect-ratio: 9 / 18.8;
  padding: 2.4%;
  background: var(--carbon);
  border-radius: 13% / 6.3%;
  container-type: size;
  transform: rotate(-6deg) translateY(3%);
  transition: transform 1.1s var(--ease);
}
.project__visual:hover .phone { transform: rotate(-2deg) translateY(-1%) scale(1.02); }
.phone__screen {
  position: relative; height: 100%; overflow: hidden;
  display: flex; flex-direction: column;
  border-radius: 11% / 5.2%;
  background: #eaeff4;
  color: #0f2e56; font-size: 3.3cqh; line-height: 1.25; letter-spacing: -.01em;
}
.app-map { position: relative; flex: 1; overflow: hidden; background: #e7edf3; }
.app-map__roads { position: absolute; inset: 0; width: 100%; height: 100%; }
.app-map__roads path { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; }
.app-map__roads .app-map__route { stroke: #fb5d1c; stroke-width: 3.5; stroke-dasharray: 5 6; animation: route 1.2s linear infinite; }
@keyframes route { to { stroke-dashoffset: -22; } }
.app-map__rings { position: absolute; inset: 0; }
.app-map__rings i {
  position: absolute; left: 50%; top: 50%;
  width: 92%; aspect-ratio: 1;
  border: 1px solid rgba(251, 93, 28, .55); border-radius: 50%;
  transform: translate(-50%, -50%) scale(.1);
  animation: ring 3.6s linear infinite;
}
.app-map__rings i:nth-child(2) { animation-delay: 1.2s; }
.app-map__rings i:nth-child(3) { animation-delay: 2.4s; }
@keyframes ring {
  0% { transform: translate(-50%, -50%) scale(.1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.25); opacity: 0; }
}
.app-map__sweep {
  position: absolute; left: 50%; top: 50%;
  width: 150%; aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(251, 93, 28, .3), rgba(251, 93, 28, 0) 75deg, transparent);
  translate: -50% -50%;
  animation: sweep 4s linear infinite;
}
@keyframes sweep { to { rotate: 360deg; } }
.app-car {
  position: absolute; left: var(--x); top: var(--y);
  width: 9%; aspect-ratio: 1;
  background: #0f2e56; border: 2px solid #fff; border-radius: 30%;
  translate: -50% -50%;
  animation: car 4s ease-in-out var(--d) infinite;
}
@keyframes car { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.35); } 24% { transform: scale(1); } }
.app-me {
  position: absolute; left: 50%; top: 50%;
  width: 7%; aspect-ratio: 1;
  background: #fb5d1c; border: 3px solid #fff; border-radius: 50%;
  translate: -50% -50%;
  outline: 5px solid rgba(251, 93, 28, .22);
}
.app-sheet {
  display: grid; gap: .55em;
  padding: 1.1em 1.1em 1.3em;
  background: #fff;
  border-radius: 1.2em 1.2em 0 0;
}
.app-sheet__eyebrow { font-size: .8em; color: #fb5d1c; font-weight: 600; }
.app-sheet__title { font-size: 1.25em; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.app-sheet__trip {
  display: flex; align-items: center; gap: .6em;
  padding: .6em .7em; border: 1px solid #d5dae1; border-radius: .7em;
  font-size: .85em;
}
.app-sheet__trip span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-sheet__trip b { margin-left: auto; font-weight: 600; white-space: nowrap; }
.app-sheet__dot { width: .7em; height: .7em; border-radius: 50%; background: #fb5d1c; flex: none; }
.app-sheet__btn {
  display: block; padding: .75em; border-radius: .7em;
  background: #fb5d1c; color: #fff; text-align: center; font-weight: 600; font-size: .9em;
}

.chip {
  position: absolute;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--ink); background: var(--canvas);
  font-size: 12px; letter-spacing: -.02em; white-space: nowrap;
  animation: chip 6s ease-in-out infinite;
}
.chip img { width: 14px; height: 14px; }
.chip--a { left: 6%; top: 14%; }
.chip--b { right: 6%; bottom: 16%; animation-delay: -3s; }
.chip__ok { width: 8px; height: 8px; background: var(--ink); }
@keyframes chip { 50% { transform: translateY(-9px); } }

/* maquette : fenêtre de code */
.codewin {
  width: 88%; height: 82%;
  display: flex; flex-direction: column;
  background: var(--canvas); border: 1px solid var(--ink);
  font-family: var(--mono); font-size: clamp(9px, 2.6cqh, 12.5px); letter-spacing: 0;
  transition: transform 1.1s var(--ease);
}
.project__visual:hover .codewin { transform: translateY(-2%) scale(1.02); }
.codewin__bar, .browser__bar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--font); font-size: 12px; letter-spacing: -.02em;
}
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border: 1px solid var(--ink); }
.codewin__code { margin: 0; padding: 12px 14px; flex: 1; overflow: hidden; line-height: 1.55; white-space: pre; color: var(--ink); }
.t-k { color: #5a5fc8; }
.t-c { color: var(--carbon); font-weight: 500; }
.t-f { color: #b45309; }
.t-s { color: #9b3aa9; }
.t-m { color: #8a8790; font-style: italic; }
.codewin__log { display: flex; flex-direction: column; height: 40%; padding: 8px 14px 10px; border-top: 1px solid var(--ink); background: #fafaff; }
.codewin__status { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-family: var(--font); }
.codewin__status i { width: 6px; height: 6px; background: var(--ink); animation: status 1.6s ease-in-out infinite; }
.codewin__events { flex: 1; display: grid; align-content: end; gap: 3px; list-style: none; margin: 0; padding: 0; overflow: hidden; }
.codewin__events li { display: grid; grid-template-columns: 6.2em 4.6em minmax(0, 1fr); gap: 8px; white-space: nowrap; }
.codewin__events li span { overflow: hidden; text-overflow: ellipsis; }
.codewin__events li span:first-child { color: #8a8790; }
.codewin__events b { font-weight: 500; color: var(--carbon); }

/* maquette : navigateur */
.browser {
  width: 88%; height: 80%;
  display: flex; flex-direction: column;
  background: var(--canvas); border: 1px solid var(--ink);
  transition: transform 1.1s var(--ease);
}
.browser__url {
  flex: 1; max-width: 60%; margin-inline: auto; padding: 3px 10px;
  border: 1px solid var(--line-soft); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser__view { flex: 1; overflow: hidden; }
.browser__view img {
  width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%;
  transition: transform 1.4s var(--ease);
}
.project__visual:hover .browser__view img { transform: scale(1.08) translateX(-2%); }

/* maquette : FaceWap */
.swap { width: 90%; height: 86%; overflow: visible; transition: transform 1.1s var(--ease); }
.project__visual:hover .swap { transform: scale(1.03); }
.swap__frame { fill: var(--canvas); stroke: var(--ink); stroke-width: 1; }
.swap__body { fill: var(--ink); }
.swap__head ellipse { stroke: var(--ink); stroke-width: 1; }
.swap__feat { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.swap__marks { opacity: 0; animation: marks 12s infinite; }
.swap__marks circle { fill: var(--carbon); }
.swap__head--a { animation: swap-a 12s var(--ease-in-out) infinite; }
.swap__head--b { animation: swap-b 12s var(--ease-in-out) infinite; }
.swap__scan { fill: var(--red); opacity: 0; animation: scan 12s linear infinite; }
.swap__arrows { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.swap__label { font-family: var(--font); font-size: 12px; letter-spacing: -.02em; fill: var(--ink); }
@keyframes swap-a {
  0%, 18% { transform: translate(0, 0); }
  26% { transform: translate(95px, -26px); }
  34%, 68% { transform: translate(190px, 0); }
  76% { transform: translate(95px, 26px); }
  84%, 100% { transform: translate(0, 0); }
}
@keyframes swap-b {
  0%, 18% { transform: translate(0, 0); }
  26% { transform: translate(-95px, 26px); }
  34%, 68% { transform: translate(-190px, 0); }
  76% { transform: translate(-95px, -26px); }
  84%, 100% { transform: translate(0, 0); }
}
@keyframes scan {
  0% { opacity: 0; transform: translateY(0); }
  1% { opacity: .9; }
  14% { opacity: .9; transform: translateY(198px); }
  15%, 49% { opacity: 0; transform: translateY(198px); }
  50% { opacity: 0; transform: translateY(0); }
  51% { opacity: .9; }
  64% { opacity: .9; transform: translateY(198px); }
  65%, 100% { opacity: 0; transform: translateY(198px); }
}
@keyframes marks {
  0%, 3% { opacity: 0; }
  12%, 30% { opacity: 1; }
  38%, 53% { opacity: 0; }
  62%, 80% { opacity: 1; }
  88%, 100% { opacity: 0; }
}

/* carte « votre projet » */
.cta-card { place-items: center; }
.cta-card__big {
  position: relative; z-index: 1;
  font-size: 19cqh; line-height: .9; letter-spacing: -.055em; text-align: center;
  color: var(--carbon);
  transition: transform 1.1s var(--ease);
}
.project__visual:hover .cta-card__big { transform: scale(1.05); }
.cta-card__mark {
  position: absolute; width: auto; height: 78%; aspect-ratio: 340.4 / 323.7;
  fill: none; stroke: var(--carbon); stroke-width: 1.3; opacity: .45;
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 05 · Méthode (cartes empilées) ---------- */
.process__title { max-width: 16ch; margin-bottom: clamp(40px, 6vw, 80px); }
.steps { position: relative; }
.step {
  position: sticky; top: calc(88px + var(--i) * 22px);
  display: grid; grid-template-columns: minmax(110px, .55fr) minmax(0, 1.5fr) minmax(120px, .6fr);
  gap: clamp(20px, 3vw, 48px);
  min-height: clamp(300px, 46vh, 440px);
  margin-bottom: clamp(18px, 3vh, 28px);
  padding: clamp(18px, 2.4vw, 32px);
  background: var(--tint);
  transform-origin: 50% 0;
}
.step::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: var(--carbon); opacity: var(--dim, 0);
}
.step--line { border: 1px solid var(--ink); }
.step__num { font-size: clamp(72px, 11vw, 176px); line-height: .8; letter-spacing: -.07em; }
.step__title { margin-bottom: 14px; font-size: var(--fs-heading); line-height: 1.02; letter-spacing: -.035em; font-weight: 400; }
.step__text { max-width: 30ch; font-size: var(--fs-body); line-height: 1.4; }
.step__list {
  align-self: end; justify-self: end;
  display: grid; gap: 2px;
  list-style: none; margin: 0; padding: 0;
  text-align: right;
}

/* ---------- 06 · Contact ---------- */
.contact {
  position: relative; isolation: isolate; overflow: clip;
  padding-block: var(--section) calc(var(--section) * 1.1);
}
.contact__wash {
  position: absolute; left: -15%; right: -15%; bottom: -12%; height: 85%; z-index: -1;
  background:
    radial-gradient(50% 55% at 50% 100%, rgba(255, 207, 158, 1), rgba(255, 207, 158, .5) 40%, rgba(255, 207, 158, 0) 72%),
    radial-gradient(30% 40% at 12% 100%, rgba(186, 191, 255, .45), rgba(186, 191, 255, 0) 70%);
  pointer-events: none;
}
.contact__title { font-size: var(--fs-mega); line-height: .94; letter-spacing: -.055em; font-weight: 400; }
.contact__line { display: block; overflow: clip; padding-bottom: .07em; }
.contact__line > span { display: inline-block; }
.contact__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 80px); align-items: start;
  margin-top: clamp(40px, 6vw, 88px);
}
.contact__text { max-width: 28ch; }
.contact__actions { display: grid; justify-items: start; gap: 22px; }
.contact__mail {
  position: relative; display: inline-block;
  font-size: clamp(26px, 3.6vw, 56px); line-height: 1.1; letter-spacing: -.04em;
}
.contact__mail::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform-origin: 0 50%;
}
.contact__mail:hover::after, .contact__mail:focus-visible::after { animation: underline-swap .9s var(--ease); }
.contact__buttons { display: flex; flex-wrap: wrap; gap: 5px; }
.contact__facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(56px, 8vw, 110px);
  border-top: 1px solid var(--ink);
}
.contact__facts > div { padding: 12px 16px 0 0; }
.contact__facts > div + div { padding-left: 16px; border-left: 1px solid var(--line-soft); }
.contact__facts dd { margin-top: 6px; font-size: clamp(15px, 1.2vw, 18px); }

/* ---------- Pied de page ---------- */
.footer { position: relative; overflow: clip; background: var(--canvas); border-top: 1px solid var(--ink); }
.footer__big {
  display: flex; justify-content: space-between;
  padding: clamp(12px, 2vw, 24px) var(--pad) 0;
  overflow: clip;
  font-size: 15vw; line-height: .8; letter-spacing: -.06em; font-weight: 500;
  user-select: none;
}
.footer__big span { display: inline-block; transition: transform .7s var(--ease); }
.footer__big span:hover { transform: translateY(-7%) rotate(-3deg); }
.footer__bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
  margin-top: clamp(12px, 2vw, 24px);
  padding: 18px var(--pad) 22px;
  border-top: 1px solid var(--line-soft);
}
.footer__nav { display: flex; flex-wrap: wrap; gap: 18px; }

/* ---------- Étude de cas (tiroir) ---------- */
.drawer { position: fixed; inset: 0; z-index: 85; }
.drawer[hidden] { display: none; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(9, 11, 17, .32); }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(760px, 100%);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 0 clamp(20px, 4vw, 56px) 64px;
  background: var(--canvas); border-left: 1px solid var(--ink);
}
.drawer__top {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: clamp(28px, 5vw, 56px); padding: 16px 0;
  background: var(--canvas); border-bottom: 1px solid var(--line-soft);
}
.drawer__close {
  position: relative; width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--ink); border-radius: 0; background: var(--canvas);
  cursor: pointer;
  transition: transform .6s var(--ease);
}
.drawer__close span { position: absolute; left: 11px; right: 11px; top: 50%; height: 1px; background: var(--ink); }
.drawer__close span:first-child { transform: rotate(45deg); }
.drawer__close span:last-child { transform: rotate(-45deg); }
.drawer__close:hover { transform: rotate(90deg); }
.drawer__eyebrow { margin-bottom: 12px; }
.drawer__title { font-size: clamp(40px, 6vw, 84px); line-height: .95; letter-spacing: -.05em; font-weight: 400; }
.drawer__lead { margin-top: 20px; font-size: var(--fs-body); line-height: 1.45; }
.drawer__figure { margin-top: 32px; border: 1px solid var(--ink); }
.drawer__figure img { width: 100%; height: auto; }
.drawer__facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 36px; border-top: 1px solid var(--ink);
}
.drawer__facts > div { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line-soft); }
.drawer__facts dd { margin-top: 4px; font-size: 16px; }
.drawer__sub { margin: 44px 0 12px; }
.drawer__list { list-style: none; margin: 0; padding: 0; counter-reset: f; border-top: 1px solid var(--ink); }
.drawer__list li {
  counter-increment: f;
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px;
  padding: 16px 0; border-bottom: 1px solid var(--line-soft);
}
.drawer__list li::before { content: counter(f, decimal-leading-zero); grid-row: span 2; padding-top: 4px; font-size: 12px; }
.drawer__list b { font-size: 18px; font-weight: 500; letter-spacing: -.02em; }
.drawer__list span { font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.drawer__next { margin-top: 36px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
  .work__progress { display: none; }
  .work__viewport { overflow: visible; }
  .work__track { flex-direction: column; width: auto; gap: 64px; }
  .project { width: 100%; }
  .project__visual { height: auto; aspect-ratio: 4 / 3.3; }
  .project__meta { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .service { grid-template-columns: 40px minmax(0, 1fr) 24px; }
  .service__body { grid-column: 2 / 4; }
  .service__arrow { grid-row: 1; grid-column: 3; width: 22px; height: 22px; }
  .step { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .step__list { justify-self: start; display: flex; flex-wrap: wrap; gap: 4px 14px; text-align: left; }
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .header__status { display: none; }
  .br-m { display: inline; }
  .hero { height: auto; min-height: 100svh; }
  .hero__content { padding-top: 116px; }
  .hero__foot { position: relative; flex-direction: column; align-items: stretch; padding-top: 26px; padding-bottom: 46svh; }
  .hero__lead-wrap { max-width: none; }
  .hero__ctas { grid-template-columns: 1fr 1fr; }
  .hero__ctas .btn { min-width: 0; gap: 10px; }
  .hero__fallback { width: 92vw; }
  .menu { grid-template-columns: minmax(0, 1fr); align-content: end; }
  .menu__side { grid-template-columns: 1fr auto; align-items: end; }
  .menu__side > div:nth-child(2) { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n + 3) { margin-top: 28px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile__top span:last-child { display: none; }
  .contact__facts { grid-template-columns: minmax(0, 1fr); }
  .contact__facts > div + div { padding-left: 0; border-left: 0; margin-top: 16px; }
  .drawer__facts { grid-template-columns: minmax(0, 1fr); }
  .footer__bar { justify-content: flex-start; }
  .chip { font-size: 11px; padding: 6px 8px; }
  .chip--a { left: 4%; }
  .chip--b { right: 4%; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Teintes & variables (remplacent les attributs style="", interdits par la CSP) ---------- */
.tint--apricot { --tint: var(--apricot); }
.tint--iris { --tint: var(--iris); }
.tint--polar { --tint: var(--polar); }
.tint--fuchsia { --tint: var(--fuchsia); }
.tint--canvas { --tint: var(--canvas); }
.step:nth-child(1) { --i: 0; }
.step:nth-child(2) { --i: 1; }
.step:nth-child(3) { --i: 2; }
.step:nth-child(4) { --i: 3; }
.app-car--1 { --x: 28%; --y: 26%; --d: 0s; }
.app-car--2 { --x: 73%; --y: 23%; --d: .7s; }
.app-car--3 { --x: 66%; --y: 61%; --d: 1.4s; }
.app-car--4 { --x: 22%; --y: 66%; --d: 2.1s; }

/* ---------- E-mail : l'arobase est ajoutée par CSS (adresse absente du HTML) ---------- */
.at::after { content: '@'; }

/* ---------- Anti-clickjacking de secours (voir boot.js) ---------- */
.is-framed body { display: none !important; }

/* ---------- Page 404 ---------- */
.notfound {
  position: relative; isolation: isolate; overflow: clip;
  min-height: 100vh; min-height: 100svh;
  display: grid; align-content: center; justify-items: start; gap: 28px;
  padding: 96px var(--pad);
}
.notfound__wash {
  position: absolute; left: -20%; right: -20%; bottom: -40%; height: 85%; z-index: -1;
  background: radial-gradient(50% 55% at 50% 100%, rgba(255, 207, 158, 1), rgba(255, 207, 158, 0) 72%);
}
.notfound__mark { width: 72px; height: auto; }
.notfound__code { font-size: clamp(96px, 20vw, 280px); line-height: .8; letter-spacing: -.07em; }
.notfound__title { max-width: 18ch; font-size: var(--fs-heading); line-height: 1.05; letter-spacing: -.035em; font-weight: 400; }
