:root {
  --bg: #1D1E24;
  --panel: #1F1E25;
  --panel-2: #23222A;
  --line: rgba(255, 255, 255, .06);
  --line-2: #323138;
  --text: #EBECE7;
  --muted: #8F8E96;
  --orange: #EE622D;
  --blue: #5477EF;
  --teal: #21B3A6;
  --purple: #8766E8;
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(20px, 4vw, 56px);
  /* gouttière : pleine largeur, contenu ramené vers le centre seulement au-delà de 1600 px */
  --gut: max(var(--pad), calc((100% - 1600px) / 2));
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scrollbar-color: #3A3940 var(--bg); }
body { position: relative; background: var(--bg); color: var(--text); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
/* fond de plan technique : quadrillage discret qui s'éteint vers les bords de l'écran */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px; background-position: center top;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 20%, #000 25%, transparent 85%); mask-image: radial-gradient(120% 90% at 50% 20%, #000 25%, transparent 85%); }
::selection { background: var(--orange); color: #fff; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
.ic { width: 14px; height: 14px; display: inline-block; flex: none; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.025em; text-wrap: balance; }
h2 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.1; }
h3 { font-size: 19px; line-height: 1.3; letter-spacing: -0.01em; }
.label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .08em; margin-bottom: 18px; }
.label::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--orange); }
.sec__sub { color: var(--muted); max-width: 54ch; margin-top: 14px; }

.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); margin-right: 8px; vertical-align: 1px; }
.dot--blue { background: var(--blue); } .dot--teal { background: var(--teal); } .dot--orange { background: var(--orange); }
.dot--live { background: var(--teal); box-shadow: 0 0 0 3px rgba(33, 179, 166, .18); }

/* Boutons */
.btn { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1 var(--mono); letter-spacing: .02em; padding: 12px 16px; border-radius: 6px; border: 1px solid transparent; transition: background .2s, border-color .2s, transform .2s var(--ease); }
.btn:active { transform: scale(.98); }
.btn .ic { transition: transform .3s var(--ease); }
.btn:hover .ic { transform: translateX(3px); }
.btn--primary { background: linear-gradient(180deg, #F2F2EE, #BEBEB9); color: var(--bg); border-color: #D8D8D3; box-shadow: 0 1px 0 rgba(255,255,255,.45) inset, 0 6px 18px -8px rgba(0,0,0,.7); }
.btn--primary:hover { background: linear-gradient(180deg, #FFFFFC, #D0D0CB); }
.btn--ghost { border-color: var(--line-2); color: var(--text); background: rgba(255,255,255,.025); }
.btn--ghost:hover { border-color: #4A4951; background: rgba(255,255,255,.05); }
.btn--sm { padding: 8px 12px; }

/* Navigation */
.nav { display: flex; align-items: center; gap: 32px; height: 64px; padding-inline: var(--gut); border-bottom: 1px solid var(--line-2); }
.nav__logo img { height: 20px; width: auto; }
.nav__links { display: flex; gap: 24px; margin-left: auto; color: var(--muted); }
.nav__links a { transition: color .2s; }
.nav__links a:hover { color: var(--text); }

/* Hero plein écran */
.hero { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: 24px; min-height: calc(100svh - 64px); padding: 40px var(--gut); border-bottom: 1px solid var(--line-2); }
.pill { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.pill__tag { background: var(--orange); color: #fff; padding: 3px 7px; border-radius: 3px; }
.hero h1 { font-size: clamp(40px, 4.6vw, 66px); line-height: 1.02; margin-top: 22px; max-width: 13ch; }
.hero__sub { color: var(--muted); max-width: 44ch; margin-top: 20px; font-size: 16px; }
.checks { margin-top: 26px; display: grid; gap: 10px; color: var(--text); }
.checks li { display: flex; align-items: center; gap: 10px; }
.checks .ic { color: var(--text); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.hero__viz { position: relative; width: 100%; max-width: 1020px; justify-self: center; }

/* Diagrammes isométriques (générés par app.js) */
.iso svg { width: 100%; height: auto; overflow: visible; }
.iso svg * { vector-effect: non-scaling-stroke; }
.iso text { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }
.iso .lc { letter-spacing: .04em; }
.iso .code { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; }
.iso .pt { letter-spacing: .02em; }
.iso .cl-m { font: 600 16px var(--sans); letter-spacing: -.01em; }
.iso .cl-s { letter-spacing: .03em; }
.iso .grid { stroke: rgba(255,255,255,.06); fill: none; }
.iso .plinth path { fill: none; stroke: rgba(255,255,255,.15); }
.iso .foot { fill: none; }
.iso .ghost { stroke: rgba(255,255,255,.2); stroke-dasharray: 2 3; }
.iso .ghost--o { stroke: rgba(238,98,45,.7); stroke-dasharray: 4 4; stroke-opacity: 1; }
.iso .ring { fill: none; stroke: rgba(255,255,255,.1); }
.flowline { fill: none; stroke: var(--c, rgba(235,236,231,.4)); stroke-width: 1; stroke-linejoin: round; }
.flowline--hl { stroke: var(--orange); stroke-dasharray: 4 4; }
.flowline.post, .iso .tether { fill: none; stroke: rgba(235,236,231,.42); stroke-width: 1.25; stroke-dasharray: 1 3; stroke-linecap: round; }
.iso .tether--o { stroke: var(--orange); stroke-opacity: .8; }
.js:not(.motion) .iso .drop { animation: drop .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 200ms); }
@keyframes drop { from { opacity: 0; transform: translateY(-26px); } to { opacity: 1; transform: none; } }
/* animations CSS de secours : actives seulement quand GSAP ne prend pas la main (.motion) */
.js:not(.motion) .hero__copy > * { animation: rise .8s var(--ease) both; }
.js:not(.motion) .hero__copy > :nth-child(2) { animation-delay: .08s; } .js:not(.motion) .hero__copy > :nth-child(3) { animation-delay: .16s; }
.js:not(.motion) .hero__copy > :nth-child(4) { animation-delay: .24s; } .js:not(.motion) .hero__copy > :nth-child(5) { animation-delay: .32s; }
.js:not(.motion) .iso .panel { animation: fade-soft .8s var(--ease) both; animation-delay: 1.1s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fade-soft { from { opacity: 0; } to { opacity: 1; } }

/* Logos clients */
.logos { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 32px; padding: 0 var(--gut); border-bottom: 1px solid var(--line-2); }
.logos__t { color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .06em; max-width: 18ch; padding: 24px 0; }
.logos__row { display: grid; grid-template-columns: repeat(5, 1fr); border-left: 1px solid var(--line); }
.logos__row li { display: grid; place-items: center; height: 96px; border-right: 1px solid var(--line); }
.logos__row img { width: auto; filter: grayscale(1) brightness(0) invert(1); opacity: .55; transition: opacity .3s; }
.logos__row li:hover img { opacity: .95; }

/* Sections */
.sec { padding: clamp(80px, 10vw, 128px) var(--gut); border-bottom: 1px solid var(--line-2); }
.sec__head--center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.sec__head--center h2 { max-width: 20ch; }
.sec__head--split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; }
.sec__head--split h2 { max-width: 16ch; }
.sec__head--split .sec__sub { justify-self: end; }

/* Pile de couches */
.stack { position: relative; display: grid; grid-template-columns: 1fr minmax(0, 520px) 1fr; max-width: 1360px; margin: 56px auto 0; border-top: 1px solid var(--line); }
.stack__viz { grid-column: 2; grid-row: 1; padding: 32px 24px; }
.stack__notes { display: contents; }
.stack__notes li { grid-row: 1; align-self: start; padding: 16px 18px; border: 1px solid transparent; border-radius: 8px; cursor: default; transition: border-color .3s, background .3s; max-width: 300px; position: relative; z-index: 1; }
.stack__notes li:nth-child(odd) { grid-column: 1; }
.stack__notes li:nth-child(even) { grid-column: 3; justify-self: end; }
.stack__notes li:nth-child(1) { margin-top: 10%; } .stack__notes li:nth-child(2) { margin-top: 26%; }
.stack__notes li:nth-child(3) { margin-top: 46%; } .stack__notes li:nth-child(4) { margin-top: 66%; }
.stack__notes li:nth-child(5) { margin-top: 82%; }
.stack__notes .mono { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; color: var(--text); margin-bottom: 6px; }
.stack__notes .mono b { color: var(--muted); font-weight: 400; margin-right: 6px; }
.stack__notes p:last-child { color: var(--muted); font-size: 13.5px; }
.stack__notes li.is-on { border-color: rgba(238, 98, 45, .45); background: rgba(238, 98, 45, .07); }
.stack__notes li.is-on .mono, .stack__notes li.is-on .mono b { color: var(--orange); }
.plate { transition: opacity .4s; }
.plate .slab, .plate .cells { transition: opacity .4s; }
.plate .cells { opacity: 0; }
.plate.is-on .slab { opacity: 0; }
.plate.is-on .cells { opacity: 1; }

/* Logiciels */
.apps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 56px; }
.app { display: flex; flex-direction: column; min-height: 300px; padding: 24px; border: 1px solid var(--line-2); border-radius: 10px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); transition: border-color .3s, transform .3s var(--ease); }
.app:hover { border-color: rgba(238,98,45,.55); }
.app__top { display: flex; justify-content: space-between; color: var(--muted); }
.app__top span { display: inline-flex; align-items: center; gap: 6px; }
.app:hover .app__top .ic { color: var(--orange); transform: translate(2px, -2px); }
.app__top .ic { transition: transform .3s var(--ease); }
.app__logo { height: 44px; width: auto; filter: brightness(0) invert(1); margin-top: auto; align-self: flex-start; }
.app__word { font-size: 40px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; margin-top: auto; }
.app__k { color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .06em; margin-top: 18px; }
.app p:last-child { color: var(--muted); margin-top: 6px; max-width: 46ch; font-size: 14px; }

/* Connecteurs */
.net__badge { display: flex; flex-direction: column; align-items: center; gap: 6px; width: max-content; margin: 48px auto 0; padding: 12px 22px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); }
.net__badge b { font-size: 22px; font-weight: 500; letter-spacing: 0; }
.net__badge span { color: var(--muted); font-size: 11px; }
.net { max-width: 960px; margin: 0 auto; }

/* Contact */
.cta { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 32px; padding: clamp(72px, 9vw, 112px) var(--gut); border-bottom: 1px solid var(--line-2); }
.cta h2 { max-width: 14ch; }
.cta__viz { max-width: min(420px, calc(var(--vbw, 240) * 1.75px)); justify-self: center; width: 100%; }

/* Pied de page + mot-symbole matriciel */
.foot { padding: 48px var(--gut) 28px; }
.foot__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; font-size: 11.5px; }
.foot__cols a { display: block; color: var(--text); text-transform: uppercase; letter-spacing: .04em; line-height: 2; transition: color .2s; }
.foot__cols a:hover { color: var(--orange); }
.foot__h { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.matrix { display: block; width: 100%; height: auto; margin-top: 56px; }
.foot__legal { color: var(--muted); margin-top: 24px; font-size: 11px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js:not(.motion) .iso .drop, .js:not(.motion) .hero__copy > *, .js:not(.motion) .iso .panel { animation: fade-soft .4s both; }
}

@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav .btn { margin-left: auto; }
  .hero { grid-template-columns: 1fr; min-height: calc(100svh - 64px); padding-top: 40px; }
  .hero__viz { margin-inline: -8px; width: auto; }
  .logos { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .logos__t { padding: 20px var(--pad) 12px; max-width: none; }
  .logos__row { grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 0; }
  .logos__row li { height: 76px; border-bottom: 1px solid var(--line); }
  .sec__head--split { grid-template-columns: 1fr; gap: 0; }
  .sec__head--split .sec__sub { justify-self: start; }
  .stack { grid-template-columns: 1fr; }
  .stack__viz { grid-column: 1; grid-row: 1; max-width: 340px; margin-inline: auto; width: 100%; }
  .stack__notes { display: grid; gap: 4px; }
  .stack__notes li { grid-row: auto; grid-column: 1 !important; justify-self: stretch !important; margin-top: 0 !important; max-width: none; }
  .apps, .cta { grid-template-columns: 1fr; }
  .foot__cols { grid-template-columns: 1fr 1fr; }
}

/* Métiers : récit pleine largeur, scène collante + fil rouge */
.story { border-bottom: 1px solid var(--line-2); }
.story__head { padding: clamp(80px, 10vw, 128px) var(--gut) 56px; }
.story__body { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); border-top: 1px solid var(--line-2); }
.story__stage { position: sticky; top: 0; height: 100svh; overflow: hidden;
  background: radial-gradient(55% 45% at 50% 55%, rgba(255,255,255,.025), transparent 70%); }
.story__hud { position: absolute; top: 20px; left: 24px; right: 24px; display: flex; align-items: center; gap: 10px; color: var(--muted); z-index: 2; }
.story__hud .story__idx { color: var(--orange); }
.story__hud i { flex: 1; height: 1px; background: var(--line-2); }
.scene { position: absolute; inset: 0; display: grid; place-items: center; padding: 72px 40px 40px; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility .6s; }
.scene.is-on { opacity: 1; visibility: visible; }
.scene .iso { width: min(100%, calc(var(--vbw, 700) * 1.22px)); }
.scene .iso svg { max-height: calc(100svh - 120px); }
.story__steps { position: relative; }
.step { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 64px var(--pad) 64px 72px; border-bottom: 1px solid var(--line); opacity: .35; transition: opacity .5s var(--ease); }
.step.is-on { opacity: 1; }
.step:last-child { border-bottom: 0; }
.step { position: relative; }
/* nœud du fil rouge, aligné sur le rail ; allumé quand la ligne de lecture l'a atteint */
.step__k { position: relative; }
.step__k::before { content: ""; position: absolute; left: -44px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 2px; border: 1px solid var(--line-2); background: var(--bg); transition: background .3s, border-color .3s, box-shadow .3s; }
.step.is-on .step__k::before, .step.is-past .step__k::before { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 0 4px rgba(238,98,45,.15); }
/* GSAP pilote l'opacité des scènes : pas de transition CSS concurrente */
.motion .scene { opacity: 1; visibility: visible; transition: none; }
.step__k { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step__k b { color: var(--orange); font-weight: 500; }
.step .core { border: 1px solid rgba(238,98,45,.5); color: var(--orange); padding: 2px 7px; border-radius: 3px; font-size: 10px; }
.step h3 { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.1; letter-spacing: -0.025em; margin-top: 16px; max-width: 16ch; }
.step h3 + p { color: var(--muted); margin-top: 16px; max-width: 46ch; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.tags li { padding: 5px 9px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--text); font-size: 11px; }
/* fil rouge : rail vertical rempli selon la progression du scroll */
.thread { position: absolute; top: 0; bottom: 0; left: calc(62.5% + 32px); width: 1px; background: var(--line-2); pointer-events: none; }
.thread__fill { position: absolute; top: 0; left: 0; width: 1px; height: calc(var(--p, 0) * 100%); background: var(--orange); box-shadow: 0 0 10px rgba(238,98,45,.55); }
.thread__fill::after { content: ""; position: absolute; bottom: -4px; left: -4px; width: 9px; height: 9px; border-radius: 2px; background: var(--orange); }

@media (max-width: 960px) {
  .story__body { grid-template-columns: 1fr; }
  .story__stage { position: sticky; top: 0; height: 52svh; z-index: 2; border-bottom: 1px solid var(--line-2); background: var(--bg); }
  .scene { padding: 48px 12px 12px; }
  .scene .iso svg { max-height: calc(52svh - 64px); }
  .step { min-height: 72svh; padding: 40px var(--pad) 40px 44px; }
  .thread { left: 22px; top: 52svh; }
  .step__k::before { left: -26px; }
}

/* Petits écrans : seuls les noms principaux restent imprimés sur les faces, en plus grand */
@media (max-width: 600px) {
  .iso .lbl--2, .iso .side, .iso .panel, .iso .cl-s { display: none; }
  .iso .lbl--1 { font-size: 16px; }
  .iso .code { font-size: 17px; }
  .iso .cl-m { font-size: 24px; }
  .hero__viz, .scene, .net, .cta__viz { overflow: hidden; }
}
