/* =========================================================
   FOXOTOM · Feuille de style
   Mobile d'abord. Thème piloté par variables (--bg-rgb, --fg-rgb…)
   mises à jour par script.js selon la progression du scroll.
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --orange: #F04E0F;
  --orange-hi: #FF6326;
  --black: #0E0F11;
  --anthracite: #1C1D20;
  --paper: #F5F3EF;
  --steel: #8A8F94;

  /* Thème dynamique : valeurs de départ = sombre */
  --bg-rgb: 14 15 17;
  --fg-rgb: 245 243 239;
  --muted-rgb: 157 162 167;
  --bg: rgb(var(--bg-rgb));
  --fg: rgb(var(--fg-rgb));
  --muted: rgb(var(--muted-rgb));
  --line: rgb(var(--fg-rgb) / .13);
  --line-strong: rgb(var(--fg-rgb) / .3);

  --f-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --f-text: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-cubic: cubic-bezier(.33, 1, .68, 1);

  --gutter: 16px;
  --max: 1320px;
  --header-h: 64px;

  /* Croix de repérage (masque) */
  --cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 13'%3E%3Cpath d='M6.5 0v13M0 6.5h13' stroke='black' stroke-width='1'/%3E%3C/svg%3E");
  --cross-mask:
    var(--cross) left top / 13px 13px no-repeat,
    var(--cross) right top / 13px 13px no-repeat,
    var(--cross) left bottom / 13px 13px no-repeat,
    var(--cross) right bottom / 13px 13px no-repeat;
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --header-h: 72px; }
}
@media (min-width: 1200px) {
  :root { --gutter: 48px; }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

/* Défilement fluide (Lenis, vendor/lenis.min.js) */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.6 var(--f-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; }

::selection { background: var(--orange); color: var(--black); }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.container {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  left: 16px; top: -80px;
  z-index: 200;
  padding: .75rem 1rem;
  background: var(--orange);
  color: var(--black);
  font: 600 .875rem/1 var(--f-mono);
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* Étiquettes techniques (repères de schéma) */
.mono-tag {
  font: 500 .75rem/1.5 var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.dot { color: var(--orange); }

/* Croix de repérage aux 4 coins d'un bloc */
.crosses { position: relative; }
.crosses::before {
  content: "";
  position: absolute;
  inset: -6px;
  pointer-events: none;
  background: var(--line-strong);
  -webkit-mask: var(--cross-mask);
  mask: var(--cross-mask);
}

/* ---------- 2 bis. Écran « Lecture de l'automate » (à chaque chargement) ---------- */
.plc-loader { display: none; }
html.plc-boot { overflow: hidden; }
html.plc-boot .plc-loader {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  font-family: var(--f-mono);
}
.plc-cols { position: absolute; inset: 0; display: flex; }
.plc-cols span {
  flex: 1;
  background: var(--black);
  border-right: 1px solid rgb(245 243 239 / .05);
  transition: transform .6s cubic-bezier(.76, 0, .24, 1) calc(var(--c) * 70ms);
}
.plc-cols span:nth-child(1) { --c: 0; }
.plc-cols span:nth-child(2) { --c: 1; }
.plc-cols span:nth-child(3) { --c: 2; }
.plc-cols span:nth-child(4) { --c: 3; }
.plc-loader.is-leaving .plc-cols span { transform: translateY(-101%); }

.plc-inner {
  position: relative;
  display: grid;
  gap: 1.5rem;
  width: min(100% - 2 * var(--gutter), 860px);
  transition: opacity .25s ease;
}
.plc-loader.is-leaving .plc-inner { opacity: 0; }
.plc-top { display: flex; align-items: center; justify-content: space-between; }
.plc-brand { font: 800 1.6rem/1 var(--f-display); letter-spacing: .01em; }
.plc-skip {
  padding: .55rem .8rem;
  border: 1px solid rgb(245 243 239 / .25);
  background: none;
  color: var(--paper);
  font: 500 .75rem/1 var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.plc-skip:hover { border-color: var(--orange); color: var(--orange); }
.plc-tag { font-size: .75rem; letter-spacing: .1em; color: #9DA2A7; }

.plc-scene { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: clamp(.75rem, 3vw, 2rem); }
.plc-scene svg { display: block; overflow: visible; fill: none; stroke: rgb(245 243 239 / .7); stroke-width: 1.4; }
.plc-scene svg .acc { stroke: var(--orange); }
.plc-scene svg .acc-soft { stroke: rgb(245 243 239 / .3); }
.plc-scene svg text { fill: rgb(245 243 239 / .7); stroke: none; font: 500 7px var(--f-mono); letter-spacing: .08em; }
.plc-pc { width: clamp(96px, 18vw, 170px); }
.plc-cpu { width: clamp(70px, 12vw, 118px); }
.plc-scene .led { stroke: none; fill: rgb(245 243 239 / .14); }
.plc-loader.is-stop .led-stop,
.plc-loader.is-transfer .led-stop { fill: var(--orange); }
.plc-loader.is-transfer .led-run { animation: plc-blink .4s steps(1) infinite; }
.plc-loader.is-run .led-run { fill: var(--orange); }
.plc-loader.is-run .led-stop { fill: rgb(245 243 239 / .14); }
.plc-loader .plc-state { font-size: 11px; fill: var(--orange); }
@keyframes plc-blink { 50% { fill: var(--orange); } }

.plc-link { position: relative; height: 44px; }
.plc-proto {
  position: absolute; left: 0; right: 0; top: 0;
  text-align: center;
  font-size: .625rem;
  letter-spacing: .14em;
  color: #9DA2A7;
}
.plc-cable { position: absolute; left: 0; right: 0; top: 28px; height: 1px; background: rgb(245 243 239 / .35); }
.plc-link i {
  position: absolute;
  top: 25px;
  right: 0;
  width: 7px; height: 7px;
  background: var(--orange);
  opacity: 0;
  animation: plc-packet 1.05s linear infinite calc(var(--p) * .26s);
  animation-play-state: paused;
}
.plc-loader.is-transfer .plc-link i { animation-play-state: running; }
@keyframes plc-packet {
  0% { right: 0; opacity: 0; }
  12%, 88% { opacity: 1; }
  100% { right: calc(100% - 7px); opacity: 0; }
}

.plc-log {
  display: grid;
  align-content: start;
  gap: .4rem;
  min-height: 9.5em;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .8125rem;
  color: rgb(245 243 239 / .8);
}
.plc-log li::before { content: "> "; color: var(--orange); }
.plc-log .ok { margin-left: .6em; color: var(--orange); }
.plc-progress { display: flex; align-items: center; gap: 1rem; }
.plc-bar { flex: 1; height: 8px; padding: 1px; border: 1px solid rgb(245 243 239 / .3); }
.plc-bar span { display: block; height: 100%; background: var(--orange); transform-origin: left; transform: scaleX(var(--p, 0)); }
.plc-pct { width: 5ch; text-align: right; font-size: .8125rem; }
@media (max-width: 599px) {
  .plc-log { font-size: .6875rem; min-height: 11em; }
  .plc-brand { font-size: 1.35rem; }
}

/* ---------- 3. Fond animé ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Tout contenu de section passe au-dessus du canvas */
.section > .container,
.hero-inner,
.marquee > .container,
.marquee-band,
.journey .container,
.journey-viewport { position: relative; z-index: 1; }

/* ---------- 3 bis. Pointeur flèche orange et noir (souris uniquement) ----------
   Le pointeur du système est remplacé par une flèche FOXOTOM : instantanée et
   précise au clic. Sur un élément cliquable, elle s'inverse (noire bordée d'orange). */
:root {
  --cur-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M4 4 11 26.5 15.6 15.6 26.5 11z' fill='%23F04E0F' stroke='%230E0F11' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") 4 4, auto;
  --cur-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M4 4 11 26.5 15.6 15.6 26.5 11z' fill='%230E0F11' stroke='%23F04E0F' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") 4 4, pointer;
}
@media (hover: hover) and (pointer: fine) {
  html, body { cursor: var(--cur-arrow); }
  a, button, label, select, summary, [role="button"],
  .btn, .filter, .fiche-toggle, .burger, .plc-skip { cursor: var(--cur-link) !important; }
  input, textarea { cursor: text !important; }
}

/* Étiquette qui accompagne la flèche sur les éléments cliquables (script.js) */
.reticle {
  position: fixed;
  left: 0; top: 0;
  z-index: 700;
  width: 0; height: 0;
  pointer-events: none;
}
.reticle-label {
  position: absolute;
  left: 24px; top: 30px;
  padding: .25rem .4rem;
  background: var(--orange);
  color: var(--black);
  font: 500 .625rem/1 var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s ease, transform .25s var(--ease-out);
}
.reticle.has-label .reticle-label { opacity: 1; transform: none; }
.reticle.is-text .reticle-label { opacity: 0; }

/* Titres qui penchent au défilement (script.js) */
.sec-title, .service-title { transform-origin: 0 60%; }

/* ---------- 4. Boutons ---------- */
.btn {
  --h: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  height: var(--h);
  padding: 0 1.5rem;
  border: 1px solid transparent;
  font: 600 1.0625rem/1 var(--f-display);
  letter-spacing: .09em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn-sm { --h: 40px; padding: 0 1rem; font-size: .9375rem; }

.btn-primary {
  background: var(--orange);
  color: var(--black);
  /* coin chanfreiné façon plaque signalétique */
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
.btn-primary:hover { background: var(--orange-hi); }
.btn-primary:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--black), inset 0 0 0 4px var(--paper); }

.btn-ghost {
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--fg); background: rgb(var(--fg-rgb) / .06); }

.btn-arrow {
  width: 16px; height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  transition: transform .35s var(--ease-out);
}
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ---------- 5. Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  color: var(--fg);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(var(--bg-rgb) / .94);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity .35s ease;
}
.site-header.is-scrolled::before { opacity: 1; }

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: 100%;
}

.brand {
  margin-right: auto;
  font: 800 1.5rem/1 var(--f-display);
  letter-spacing: .01em;
  text-decoration: none;
  transition: opacity .35s ease, transform .45s var(--ease-out), visibility 0s;
}
.brand-fox { color: var(--orange); }
.brand-otom { color: inherit; }

/* Le petit logo n'apparaît qu'une fois le logo du hero dépassé */
.js .site-header .brand { opacity: 0; transform: translateY(6px); visibility: hidden; transition: opacity .35s ease, transform .45s var(--ease-out), visibility 0s linear .45s; }
.js .site-header.show-brand .brand,
.js.menu-open .site-header .brand { opacity: 1; transform: none; visibility: visible; transition: opacity .35s ease, transform .45s var(--ease-out), visibility 0s; }

.nav { display: none; }
.nav ul { display: flex; gap: 2.25rem; margin: 0; padding: 0; list-style: none; }
.nav a {
  position: relative;
  display: block;
  padding: .5rem 0;
  font: 600 1rem/1 var(--f-display);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: .78;
  transition: opacity .2s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease-out);
}
.nav a:hover { opacity: 1; }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.header-cta { display: none; }

.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  width: 44px; height: 44px;
  margin-right: -10px;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 24px; height: 1.5px;
  background: currentColor;
  transition: transform .4s var(--ease-out);
}
.menu-open .burger span:first-child { transform: translateY(4.25px) rotate(45deg); }
.menu-open .burger span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

@media (min-width: 600px) {
  .header-cta { display: inline-flex; }
}
@media (min-width: 1024px) {
  .nav { display: block; }
  .nav ul { gap: 1.75rem; }
  .burger { display: none; }
  .brand { font-size: 1.75rem; }
  .header-inner { gap: 2.25rem; }
}
@media (min-width: 1280px) {
  .nav ul { gap: 2.25rem; }
}
.nav a.is-active { opacity: 1; }
.nav a.is-active::after { transform: scaleX(1); }

/* Menu plein écran (mobile) */
html.menu-open { overflow: hidden; }
.menu-open .site-header { color: var(--paper); }
.menu-open .site-header::before { opacity: 0; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  color: var(--paper);
  visibility: hidden;
  transition: visibility 0s linear .9s;
}
.menu-open .mobile-menu { visibility: visible; transition: none; }

/* Rideaux : 4 colonnes noires qui descendent l'une après l'autre,
   puis continuent vers le bas à la fermeture */
.mm-cols { position: absolute; inset: 0; display: flex; pointer-events: none; }
.mm-cols span {
  flex: 1;
  background: var(--black);
  border-right: 1px solid rgb(245 243 239 / .06);
  transform: translateY(-101%);
  transition: transform .55s cubic-bezier(.76, 0, .24, 1) calc(var(--c) * 65ms);
}
.mm-cols span:nth-child(1) { --c: 0; }
.mm-cols span:nth-child(2) { --c: 1; }
.mm-cols span:nth-child(3) { --c: 2; }
.mm-cols span:nth-child(4) { --c: 3; }
.menu-open .mm-cols span { transform: none; }
html.menu-closing .mm-cols span { transform: translateY(101%); }
html.menu-reset .mm-cols span { transition: none; }

.mobile-menu-inner {
  position: relative;
  opacity: 0;
  transition: opacity .2s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.25rem;
  min-height: 100%;
  padding: calc(var(--header-h) + 1rem) 0 2rem;
}
.mobile-menu .mono-tag { color: var(--steel); }
.mm-links { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgb(245 243 239 / .12); }
.mm-links li { border-bottom: 1px solid rgb(245 243 239 / .12); }
.mm-links li:nth-child(1) { --i: 0; }
.mm-links li:nth-child(2) { --i: 1; }
.mm-links li:nth-child(3) { --i: 2; }
.mm-links li:nth-child(4) { --i: 3; }
.mm-links li:nth-child(5) { --i: 4; }
.mm-links a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .85rem 0;
  font: 800 clamp(2.5rem, 12vw, 3.75rem)/1 var(--f-display);
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity .4s ease, transform .5s var(--ease-out), color .2s ease;
}
.menu-open .mobile-menu-inner { opacity: 1; transition: opacity .3s ease .35s; }
.menu-open .mm-links a { opacity: 1; transform: none; transition-delay: calc(.4s + var(--i) * .05s); }
.mm-links a:hover { color: var(--orange); }
.mm-num { flex: none; width: 4.5rem; font: 500 .75rem/1 var(--f-mono); letter-spacing: .1em; color: var(--orange); }
.mm-contact { display: flex; flex-direction: column; gap: .5rem; font: 500 1rem/1.4 var(--f-mono); }
.mm-contact a { text-decoration: none; }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 2rem) 0 6.5rem;
  overflow: hidden;
}

/* Photo en duotone noir / orange, fondue dans le réseau */
.hero-photo {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: var(--orange);
  opacity: 0;
  transition: opacity 1.6s ease-out;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgb(0 0 0 / .6) 45%, transparent 85%);
  mask-image: linear-gradient(to bottom, #000 0%, rgb(0 0 0 / .6) 45%, transparent 85%);
}
.hero-photo.is-loaded { opacity: .28; }
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.2) brightness(.8);
  mix-blend-mode: multiply;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(14 15 17 / .5) 0%, rgb(14 15 17 / .2) 45%, var(--black) 100%);
}
@media (min-width: 900px) {
  .hero-photo {
    inset: 0 0 0 auto;
    width: 56%;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 50%);
    mask-image: linear-gradient(to right, transparent 0%, #000 50%);
  }
  .hero-photo.is-loaded { opacity: .55; }
}

/* Engrenages 3D : dessinés par background.js sur .gears-canvas.
   .hero-gears ne sert qu'à fixer la position et la taille du grand engrenage. */
.hero-gears {
  --gw: 150vw;
  position: absolute;
  width: var(--gw);
  aspect-ratio: 1;
  left: calc(80% - var(--gw) / 2);
  top: calc(28% - var(--gw) / 2);
  visibility: hidden;
  pointer-events: none;
}
@media (min-width: 768px) {
  .hero-gears { --gw: min(105vw, 980px); left: calc(76% - var(--gw) / 2); top: calc(46% - var(--gw) / 2); }
}
@media (min-width: 1100px) {
  .hero-gears { --gw: min(118vh, 1100px, 82vw); left: calc(71% - var(--gw) / 2); top: calc(52% - var(--gw) / 2); }
}
.gears-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Cadre et croix de repérage du hero */
.hero-frame { display: none; }
@media (min-width: 900px) {
  .hero-frame {
    display: block;
    position: absolute;
    z-index: 0;
    inset: calc(var(--header-h) + 16px) var(--gutter) 22px;
    pointer-events: none;
  }
  .hero-frame::before {
    content: "";
    position: absolute;
    inset: -6px;
    background: var(--line-strong);
    -webkit-mask: var(--cross-mask);
    mask: var(--cross-mask);
  }
}

/* Contenu */
.hero-tag {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  max-width: 44rem;
}
.tag-dot {
  flex: none;
  width: 7px; height: 7px;
  margin-top: .42em;
  background: var(--orange);
  animation: led 2.4s ease-in-out infinite;
}
@keyframes led { 50% { opacity: .3; } }

.hero-logo {
  margin: 1.5rem 0 .9rem;
  font: 800 clamp(2.5rem, min(6vw, 9vh), 4.75rem)/.9 var(--f-display);
  letter-spacing: .005em;
}
.hero-logo-letters { display: inline-flex; }
.hero-logo .l { display: inline-block; }
.hero-logo .fox { color: var(--orange); }

.hero-title {
  font: 800 clamp(2.75rem, min(11vw, 12vh), 7.5rem)/.9 var(--f-display);
  letter-spacing: -.005em;
  text-transform: uppercase;
}
@media (min-width: 768px) {
  .hero-title { font-size: clamp(4rem, min(8.2vw, 12.5vh), 7.5rem); }
}

/* Lignes masquées (titres révélés ligne par ligne) */
.line {
  display: block;
  overflow: hidden;
  padding-top: .1em;
  margin-top: -.1em;
}
.line > span { display: block; }

.hero-title .line:nth-child(1) { --i: 0; }
.hero-title .line:nth-child(2) { --i: 1; }
.hero-title .line:nth-child(3) { --i: 2; }

.hero-sub {
  max-width: 36rem;
  margin-top: 1.75rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.5;
}
.hero-sub span {
  display: block;
  margin-top: .4rem;
  font-size: .86em;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2.25rem;
}
@media (max-width: 479px) {
  .hero-actions .btn { flex: 1 1 100%; }
}

/* Indicateur de scroll */
.scroll-cue {
  position: absolute;
  z-index: 1;
  left: 0; right: 0;
  bottom: 1.25rem;
  width: max-content;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  color: var(--muted);
  font: 500 .625rem/1 var(--f-mono);
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
}
.scroll-cue-line {
  position: relative;
  width: 1px; height: 48px;
  background: var(--line-strong);
  overflow: hidden;
}
.scroll-cue-line::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 1px; height: 45%;
  background: var(--orange);
  transform: translateY(-100%);
  animation: cue 1.9s cubic-bezier(.65, 0, .35, 1) infinite;
}
@keyframes cue {
  0% { transform: translateY(-100%); }
  70%, 100% { transform: translateY(225%); }
}
@media (max-height: 560px) { .scroll-cue { display: none; } }

/* ---------- 7. Séquence d'intro ---------- */
.hero-sub { --i: 0; }
.hero-actions { --i: 1; }
.scroll-cue { --i: 2; }

.hero-logo .l:nth-child(1) { --i: 0; }
.hero-logo .l:nth-child(2) { --i: 1; }
.hero-logo .l:nth-child(3) { --i: 2; }
.hero-logo .l:nth-child(4) { --i: 3; }
.hero-logo .l:nth-child(5) { --i: 4; }
.hero-logo .l:nth-child(6) { --i: 5; }
.hero-logo .l:nth-child(7) { --i: 6; }

/* États initiaux (uniquement si JS actif) */
.js .hero-tag { opacity: 0; }
.js .hero-tag.is-on { opacity: 1; }
.js .hero-logo .l { opacity: 0; transform: translate3d(0, .32em, 0); }
.js .hero-title .line > span { transform: translate3d(0, 110%, 0); }
.js .hero-fade { opacity: 0; transform: translate3d(0, 14px, 0); }

/* 1. Les engrenages se dessinent d'eux-mêmes (background.js) */

/* 2. Logo lettre par lettre */
.js.intro-play .hero-logo .l {
  opacity: 1;
  transform: none;
  transition: opacity .45s ease-out, transform .6s var(--ease-out);
  transition-delay: calc(.32s + var(--i) * 65ms);
}
/* 3. Titre ligne par ligne, puis sous-titre et boutons */
.js.intro-play .hero-title .line > span {
  transform: none;
  transition: transform .8s var(--ease-out) calc(.78s + var(--i) * .12s);
}
.js.intro-play .hero-fade {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease-out, transform .7s var(--ease-out);
  transition-delay: calc(1.32s + var(--i) * .11s);
}
/* Clic / scroll pendant l'intro : tout arrive immédiatement */
.js.intro-skip .hero-logo .l,
.js.intro-skip .hero-title .line > span,
.js.intro-skip .hero-fade {
  transition-duration: .2s !important;
  transition-delay: 0s !important;
}

/* Effet "saisie terminal" */
.type-box { position: relative; display: inline-block; }
.type-ghost { visibility: hidden; }
.type-live { position: absolute; inset: 0; }
.type-live::after {
  content: "";
  display: inline-block;
  width: .55em; height: 1em;
  margin-left: .2em;
  vertical-align: -.15em;
  background: var(--orange);
  opacity: 0;
}
.is-typing .type-live::after { opacity: 1; }
.type-done .type-live::after { animation: caret-out 1s steps(1, end) forwards; }
@keyframes caret-out {
  0% { opacity: 1; } 25% { opacity: 0; } 50% { opacity: 1; } 75%, 100% { opacity: 0; }
}

/* ---------- 8. Sections : structure commune ---------- */
.section {
  position: relative;
  padding: clamp(5.5rem, 13vh, 9.5rem) 0;
}

.sec-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}
.sec-head > .mono-tag:first-child { color: var(--fg); }
.sec-rule {
  flex: 1;
  height: 1px;
  background: var(--line-strong);
  transform-origin: left;
}
.sec-folio { flex: none; }

.sec-title {
  font: 800 clamp(2.75rem, 7.5vw, 6.25rem)/.92 var(--f-display);
  letter-spacing: -.005em;
  text-transform: uppercase;
}
.sec-lead {
  max-width: 30rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.125rem);
}

/* Titre + chapeau côte à côte */
.split-head {
  display: grid;
  gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 6vh, 4.5rem);
}
@media (min-width: 900px) {
  .split-head { grid-template-columns: 1.3fr 1fr; align-items: end; gap: 3rem; }
  .split-head .sec-lead { justify-self: end; padding-bottom: .5rem; }
}

/* Étiquettes techniques (badges) */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: .38rem .6rem;
  border: 1px solid var(--line-strong);
  font: 500 .8125rem/1 var(--f-mono);
  letter-spacing: .02em;
  white-space: nowrap;
  transition: border-color .2s ease, color .2s ease;
}

/* Révélation par volet : un cache de la couleur du fond, bordé d'une ligne orange,
   glisse et découvre le bloc (data-wipe="down" : de haut en bas, "right" : de gauche à droite).
   Le bloc lui-même n'est jamais masqué, pour rester détectable au scroll. */
.js [data-wipe] { position: relative; }
.js [data-wipe="down"]::after,
.js [data-wipe="right"]::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 3;
  pointer-events: none;
  background: var(--bg);
  transition: transform .95s cubic-bezier(.65, 0, .35, 1) var(--d, 0s);
}
.js [data-wipe="down"]::after { transform-origin: bottom; border-top: 2px solid var(--orange); }
.js [data-wipe="right"]::before { transform-origin: right; border-left: 2px solid var(--orange); }
.js [data-wipe="down"].is-in::after { transform: scaleY(0); }
.js [data-wipe="right"].is-in::before { transform: scaleX(0); }
.js [data-wipe].wipe-done::after,
.js [data-wipe].wipe-done::before { display: none; }

/* Apparitions au scroll */
.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity .6s ease-out, transform .7s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js .sec-head .sec-rule { transform: scaleX(0); transition: transform .9s var(--ease-out) calc(var(--d, 0s) + .15s); }
.js .sec-head.is-in .sec-rule { transform: scaleX(1); }

.js [data-lines] .line > span {
  transform: translate3d(0, 110%, 0);
  transition: transform .7s var(--ease-out);
  transition-delay: calc(var(--d, 0s) + var(--i, 0) * .1s);
}
.js [data-lines].is-in .line > span { transform: none; }

/* ---------- 8 bis. « En bref » : phrase qui s'éclaire mot par mot ---------- */
.manifesto { position: relative; height: 170vh; }
@media (min-width: 768px) { .manifesto { height: 210vh; } }
.manifesto-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
}
.manifesto .container { position: relative; z-index: 1; }
.manifesto-tag { margin-bottom: 1.75rem; }
/* même police que le titre du hero (Barlow Condensed, très grasse, en capitales) */
.manifesto-text {
  max-width: 14em;
  font: 800 clamp(2.25rem, min(5.4vw, 9vh), 5rem)/.95 var(--f-display);
  letter-spacing: -.005em;
  text-transform: uppercase;
}
.manifesto-text em { font-style: normal; color: var(--orange); }
.mw { opacity: .16; transition: opacity .25s linear; }
.mw.is-accent { color: var(--orange); }

/* ---------- 9. Compétences : "configuration matérielle" ---------- */
.rack {
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.rack-legend { display: none; }

.rack-row {
  position: relative;
  display: grid;
  gap: .9rem 2rem;
  padding: 1.6rem 0;
  transition: background-color .3s ease;
}
.rack-row + .rack-row { border-top: 1px solid var(--line); }
.rack-row:hover { background: rgb(var(--fg-rgb) / .03); }

.rack-slot { display: flex; align-items: center; gap: .65rem; }
.led {
  flex: none;
  width: 8px; height: 8px;
  background: var(--orange);
}
/* Mise sous tension en cascade, comme un rack qui démarre */
.js .led { background: var(--line-strong); }
.js .rack-row.is-in .led { animation: led-on .8s steps(1, end) forwards; animation-delay: calc(var(--d, 0s) + .35s); }
@keyframes led-on {
  0% { background: var(--orange); }
  20% { background: var(--line-strong); }
  40%, 100% { background: var(--orange); }
}

.rack-name {
  font: 700 clamp(1.5rem, 2.6vw, 2.125rem)/1 var(--f-display);
  letter-spacing: .03em;
  text-transform: uppercase;
}
.rack-items { display: grid; gap: .9rem; }
.rack-group { display: grid; gap: .5rem; }
.rack-brand { color: var(--muted); }
.rack-row .chips li:hover { border-color: var(--orange); }

@media (min-width: 600px) {
  .rack-group { grid-template-columns: 7.5rem 1fr; align-items: baseline; }
}
@media (min-width: 960px) {
  .rack-legend {
    display: grid;
    grid-template-columns: 8rem 15rem 1fr;
    gap: 2rem;
    padding: .8rem 0;
    border-bottom: 1px solid var(--line);
    font-size: .6875rem;
  }
  .rack-row { grid-template-columns: 8rem 15rem 1fr; align-items: start; padding: 1.75rem 0; }
  .rack-slot, .rack-name { padding-top: .2rem; }
}

.rack-group.no-brand { grid-template-columns: 1fr; }

/* Message si contenu.txt n'a pas pu être chargé */
.content-note {
  padding: 1.25rem 0;
  font: 500 .8125rem/1.6 var(--f-mono);
  color: var(--muted);
  list-style: none;
}
.content-note b { color: var(--orange); font-weight: 500; }
.noscript-note { position: relative; z-index: 1; padding: 6rem 1rem 0; text-align: center; font-family: var(--f-mono); }

/* ---------- 10. Prestations : liste éditoriale ---------- */
.services-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line-strong);
}
.service {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0 1rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line-strong);
  outline-offset: -2px;
}
.service::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .55s var(--ease-out);
}
.service-num {
  padding-top: .55rem;
  font: 500 .875rem/1 var(--f-mono);
  color: var(--muted);
  transition: color .3s ease;
}
.service-main { min-width: 0; transition: transform .5s var(--ease-out); }
.service-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem 2rem;
}
.service-title {
  font: 800 clamp(2.5rem, 8vw, 6.25rem)/.9 var(--f-display);
  letter-spacing: -.005em;
  text-transform: uppercase;
}
.service-short {
  font: 500 .75rem/1.4 var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.service-more { display: grid; grid-template-rows: 1fr; }
.service-more > div { overflow: hidden; }
.service-desc {
  max-width: 46rem;
  padding-top: 1.1rem;
  font-size: 1.0625rem;
}
.service .chips { margin-top: 1rem; padding-bottom: .25rem; }
.service-arrow { display: none; }

/* Survol (souris) : la ligne se décale, se souligne et se déplie */
@media (hover: hover) and (min-width: 900px) {
  .service { grid-template-columns: 6rem 1fr 3rem; padding: 2rem 0; }
  .service-num { padding-top: 1.1rem; }
  .service-more { grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease-out); }
  .service-more > div { visibility: hidden; transition: visibility 0s linear .5s; }
  .service:hover .service-more,
  .service:focus-within .service-more { grid-template-rows: 1fr; }
  .service:hover .service-more > div,
  .service:focus-within .service-more > div { visibility: visible; transition-delay: 0s; }
  .service:hover .service-main,
  .service:focus-within .service-main { transform: translateX(1.25rem); }
  .service:hover::after,
  .service:focus-within::after { transform: scaleX(1); }
  .service:hover .service-num,
  .service:focus-within .service-num { color: var(--orange); }
  .service-arrow {
    display: block;
    justify-self: end;
    width: 28px; height: 28px;
    margin-top: 1.1rem;
    fill: none;
    stroke: var(--fg);
    stroke-width: 1.5;
    transition: transform .45s var(--ease-out), stroke .3s ease;
  }
  .service:hover .service-arrow,
  .service:focus-within .service-arrow { transform: rotate(45deg); stroke: var(--orange); }
}

/* ---------- 11. Réalisations : fiches d'intervention ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
}
.filter {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  height: 42px;
  padding: 0 .95rem;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg);
  font: 600 .9375rem/1 var(--f-display);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.filter:hover { border-color: var(--fg); }
.filter-count { font: 500 .6875rem/1 var(--f-mono); color: var(--muted); }
.filter[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.filter[aria-pressed="true"] .filter-count { color: var(--orange); }

/* Deux colonnes indépendantes (réparties par script.js) */
.fiches {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.fiches-col {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  gap: 1.25rem;
  align-content: start;
}
.fiches-col:empty { display: none; }
@media (min-width: 900px) {
  .fiches { flex-direction: row; align-items: flex-start; gap: 1.5rem; }
  .fiches-col { gap: 1.5rem; }
}

/* Animation du filtre (sur l'enveloppe, pour ne pas gêner le survol) */
.fiche-item {
  transition: opacity .35s ease, transform .45s var(--ease-out);
  transition-delay: calc(var(--k, 0) * 60ms);
}
.fiche-item[hidden] { display: none; }
.fiches.is-switching .fiche-item {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition-duration: .18s;
  transition-delay: 0s;
}

.fiche {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  transition: transform .35s var(--ease-out), border-color .3s ease, box-shadow .35s var(--ease-out);
}
.fiche:hover {
  transform: translate3d(0, -4px, 0);
  border-color: var(--fg);
  box-shadow: 0 4px 0 0 var(--orange);
}
/* Inclinaison 3D au survol (souris uniquement, pilotée par script.js) */
@media (hover: hover) and (pointer: fine) {
  .fiche-item { perspective: 1100px; }
  .fiche.is-tilting {
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(0, -4px, 0);
    transition: transform .15s ease-out, border-color .3s ease, box-shadow .35s var(--ease-out);
  }
}

.fiche-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 1.25rem;
  border-bottom: 1px solid var(--line);
  font: 500 .6875rem/1.3 var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.fiche-bar span:first-child { color: var(--fg); }
.fiche-bar span:last-child { text-align: right; }

.fiche-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  padding: 1.5rem 1.25rem 1.4rem;
}
.fiche-title {
  font: 700 clamp(1.5rem, 2.4vw, 2rem)/1.02 var(--f-display);
  letter-spacing: .01em;
  text-transform: uppercase;
}
.fiche-context { color: var(--muted); font-size: .96875rem; }
.fiche-client { margin-top: -.4rem; color: var(--fg); }
.fiche .chips { margin-top: auto; }
.fiche .chips li { padding: .32rem .5rem; font-size: .75rem; }

.fiche-figures {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.75rem;
  margin: 0;
}
.fiche-figures dt {
  font: 500 .625rem/1.2 var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.fiche-figures dd {
  margin: .25rem 0 0;
  font: 500 clamp(1.25rem, 2.2vw, 1.625rem)/1 var(--f-mono);
  letter-spacing: -.03em;
  white-space: nowrap;
}

.fiche-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.25rem;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  font: 600 .9375rem/1 var(--f-display);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: color .2s ease;
}
.fiche-toggle:hover { color: var(--orange); }
.fiche-toggle:focus-visible { outline-offset: -3px; }

.plus-icon { position: relative; flex: none; width: 14px; height: 14px; }
.plus-icon::before,
.plus-icon::after {
  content: "";
  position: absolute;
  left: 0; top: 6.5px;
  width: 14px; height: 1px;
  background: currentColor;
  transition: transform .35s var(--ease-out);
}
.plus-icon::after { transform: rotate(90deg); }
.fiche.is-open .plus-icon::after { transform: rotate(0deg); }

.fiche-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease-out); }
.fiche-detail > div { overflow: hidden; visibility: hidden; transition: visibility 0s linear .5s; }
.fiche.is-open .fiche-detail { grid-template-rows: 1fr; }
.fiche.is-open .fiche-detail > div { visibility: visible; transition-delay: 0s; }

.fiche-detail-inner { padding: .25rem 1.25rem 1.4rem; }
.fiche-detail-inner h4 { margin: 1rem 0 .7rem; color: var(--fg); }
.fiche-list {
  display: grid;
  gap: .5rem;
  margin: 0 0 .5rem;
  padding: 0;
  list-style: none;
  font-size: .9375rem;
}
.fiche-list li { position: relative; padding-left: 1.25rem; }
.fiche-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .55em;
  width: 6px; height: 6px;
  border: 1px solid var(--orange);
}
.fiche-value {
  margin-top: 1.1rem;
  padding: .9rem 1rem;
  border-left: 2px solid var(--orange);
  background: rgb(var(--fg-rgb) / .05);
  font-size: .9375rem;
}
.fiche-value .mono-tag { display: block; margin-bottom: .3rem; font-size: .6875rem; }

/* ---------- 12. Technologies : bande défilante ---------- */
.marquee { position: relative; padding: clamp(3rem, 8vh, 5rem) 0; }
.marquee-band {
  display: grid;
  gap: .6rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-row { overflow: hidden; }
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 70s linear infinite;
}
.marquee-row.is-reverse .marquee-track { animation-direction: reverse; animation-duration: 80s; }
.marquee-list {
  display: flex;
  flex: none;
  margin: 0;
  padding: 0;
  list-style: none;
}
.marquee-list li {
  font: 500 clamp(1.5rem, 3.6vw, 3rem)/1.2 var(--f-mono);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.marquee-list li::after { content: "/"; margin: 0 .55em; color: var(--orange); opacity: .8; }
.marquee-row.is-reverse .marquee-list li { color: var(--muted); }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }

/* ---------- 13. Parcours : frise chronologique ---------- */
.journey { position: relative; padding: clamp(5.5rem, 13vh, 9.5rem) 0; }
.journey-viewport { margin-top: .5rem; }

/* Mise en avant "10+ ans d'automatisme" */
.journey-intro { display: grid; gap: .4rem; max-width: 30rem; }
@media (min-width: 900px) {
  .split-head .journey-intro { justify-self: end; padding-bottom: .5rem; }
}
.journey-figure {
  font: 500 clamp(3.25rem, min(7vw, 10vh), 5.5rem)/.9 var(--f-mono);
  letter-spacing: -.05em;
}
.journey-caption {
  font: 700 clamp(1.125rem, 1.6vw, 1.375rem)/1.1 var(--f-display);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.journey-intro .sec-lead { margin-top: .5rem; }

/* Vertical (mobile, tablette, animations réduites) */
.journey-track {
  position: relative;
  width: min(100% - 2 * var(--gutter), var(--max));
  margin: 0 auto;
  padding: 0 0 0 2.25rem;
  list-style: none;
}
.journey-rail {
  position: absolute;
  left: 5px; top: .4rem; bottom: 1rem;
  width: 1px;
  background: var(--line-strong);
}
.journey-fill {
  position: absolute;
  left: -.5px; top: 0;
  width: 2px; height: 100%;
  background: var(--orange);
  transform: scaleY(0);
  transform-origin: top;
}

.step {
  position: relative;
  padding-bottom: 2.75rem;
}
/* on atténue les textes des étapes pas encore atteintes, jamais le symbole :
   il doit rester opaque pour masquer le trait qui passe derrière */
.js .step > :not(.step-node) { opacity: .38; transition: opacity .5s ease; }
.js .step.is-active > :not(.step-node) { opacity: 1; }
.step:last-child { padding-bottom: 0; }

.step-node {
  position: absolute;
  left: calc(-2.25rem - .5px);
  top: .3rem;
  width: 11px; height: 11px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.step.is-current .step-node { box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--orange); }

.step-when { font: 500 .9375rem/1.2 var(--f-mono); letter-spacing: .02em; }
.step-phase {
  margin-top: .45rem;
  font: 500 .6875rem/1 var(--f-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.step-title {
  margin-top: .6rem;
  font: 700 clamp(1.625rem, 2.4vw, 2rem)/1 var(--f-display);
  letter-spacing: .01em;
  text-transform: uppercase;
}
.step-text {
  max-width: 36ch;
  margin-top: .55rem;
  color: var(--muted);
  font-size: .9375rem;
}
.step-now .step-when { color: var(--orange); }

/* Horizontal épinglé (grand écran) : la frise défile avec le scroll */
.journey.is-horizontal { padding: 0; }
.journey.is-horizontal .journey-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 1rem) 0 1.5rem;
  overflow: hidden;
}
.journey.is-horizontal .split-head { margin-bottom: clamp(1.5rem, 5vh, 3.5rem); }
.journey.is-horizontal .journey-title { font-size: clamp(2.75rem, min(6vw, 10vh), 5.75rem); }
.journey.is-horizontal .journey-track {
  display: flex;
  width: max-content;
  margin: 0;
  padding: 4.25rem 12vw 0 max(var(--gutter), calc((100vw - var(--max)) / 2));
  will-change: transform;
}
.journey.is-horizontal .journey-rail {
  left: 0; right: 0;
  top: 2.75rem; bottom: auto;
  width: auto; height: 1px;
}
.journey.is-horizontal .journey-rail::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 5px;
  height: 5px;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 28px);
}
.journey.is-horizontal .journey-fill {
  left: 0; top: -.5px;
  width: 100%; height: 2px;
  transform: scaleX(0);
  transform-origin: left;
}
.journey.is-horizontal .step { flex: none; width: 21rem; padding: 0 2.5rem 0 0; }
.journey.is-horizontal .step-node { left: 0; top: calc(-1.5rem - 6px); }
.journey.is-horizontal .step-when { position: absolute; left: 0; top: -4.25rem; font-size: 1rem; }

/* Frise en échelon ladder : rails d'alimentation, un contact | | par période,
   la bobine ( ) pour FOXOTOM. Le trait orange est le courant : chaque contact
   atteint se ferme, puis la bobine s'excite. (Positions des rails : script.js) */
.journey-rail { background: rgb(var(--fg-rgb) / .3); }
.journey-rail::before,
.journey-rail::after {
  content: "";
  position: absolute;
  background: var(--fg);
}
.journey-fill { left: 0; }
.step.is-current .step-node { box-shadow: none; }

/* — Vertical (mobile) : rails en haut et en bas, contacts « = », bobine en bas — */
.journey-rail { left: 5px; width: 2px; }
.journey-rail::before { left: -14px; top: -3px; width: 30px; height: 3px; }
.journey-rail::after { left: -14px; bottom: -3px; width: 30px; height: 3px; }
.step-node {
  left: calc(-2.25rem - 5px);
  top: .3rem;
  width: 22px; height: 14px;
  border: 0;
  background: var(--bg);
}
.step-node::before,
.step-node::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: rgb(var(--fg-rgb) / .55);
  transition: background-color .3s ease;
}
.step-node::before { top: 0; }
.step-node::after { bottom: 0; }
.step.is-active .step-node { background: var(--bg); }
.step.is-active .step-node::before,
.step.is-active .step-node::after { background: var(--orange); }

/* bobine : deux arcs (vertical : en haut et en bas) */
.step-now .step-node {
  left: calc(-2.25rem - 6px);
  top: .15rem;
  width: 24px; height: 24px;
  border: 2.5px solid rgb(var(--fg-rgb) / .55);
  border-left-color: transparent;
  border-right-color: transparent;
  border-radius: 50%;
  background: var(--bg);
}
.step-now .step-node::before,
.step-now .step-node::after { display: none; }
.step-now.is-active .step-node {
  border-left-color: transparent;     /* verticale : seuls les arcs du haut et du bas s'allument */
  border-right-color: transparent;
  border-top-color: var(--orange);
  border-bottom-color: var(--orange);
  background: var(--bg);
}

/* — Horizontal (grand écran) : rails à gauche et à droite, contacts « | | » — */
.journey.is-horizontal .journey-rail { right: auto; height: 2px; width: auto; }
.journey.is-horizontal .journey-rail::before { left: -3px; top: -21px; width: 3px; height: 44px; }
.journey.is-horizontal .journey-rail::after {
  left: auto; right: -3px; top: -21px; bottom: auto;
  width: 3px; height: 44px;
  background: var(--fg);
}
.journey.is-horizontal .journey-fill { top: 0; height: 2px; }
.journey.is-horizontal .step-node {
  left: -3px;
  top: calc(-1.5rem - 15px);
  width: 18px; height: 30px;
}
.journey.is-horizontal .step-node::before,
.journey.is-horizontal .step-node::after { top: 0; bottom: 0; left: auto; right: auto; width: 3px; height: auto; }
.journey.is-horizontal .step-node::before { left: 0; }
.journey.is-horizontal .step-node::after { right: 0; }
.journey.is-horizontal .step.is-active .step-node { background: var(--bg); }
.journey.is-horizontal .step-now .step-node {
  left: -6px;
  top: calc(-1.5rem - 16px);
  width: 32px; height: 32px;
  border-color: rgb(var(--fg-rgb) / .55);
  border-top-color: transparent;
  border-bottom-color: transparent;
}
.journey.is-horizontal .step-now.is-active .step-node {
  border-left-color: var(--orange);
  border-right-color: var(--orange);
  border-top-color: transparent;
  border-bottom-color: transparent;
}

/* ---------- 14. Contact ---------- */
.contact-block {
  display: grid;
  gap: 2.75rem;
  padding: clamp(1.75rem, 5vw, 4rem);
  background: var(--anthracite);
  color: var(--paper);
}
@media (min-width: 1000px) {
  .contact-block { grid-template-columns: 1.1fr 1fr; gap: 4.5rem; }
}
.contact-block .mono-tag { color: #9DA2A7; }
.contact-title { font-size: clamp(2.5rem, 6vw, 5rem); }
.contact-text { max-width: 30rem; margin-top: 1.25rem; color: rgb(245 243 239 / .72); }

.contact-direct {
  display: grid;
  gap: 1.25rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}
.contact-direct li { display: grid; gap: .35rem; }
.contact-direct a {
  justify-self: start;
  font: 500 clamp(1.375rem, 4vw, 2.5rem)/1.15 var(--f-mono);
  letter-spacing: -.03em;
  text-decoration: none;
  overflow-wrap: anywhere;
  background: linear-gradient(var(--orange), var(--orange)) 0 100% / 0 2px no-repeat;
  transition: background-size .45s var(--ease-out), color .2s ease;
}
.contact-direct a:hover { background-size: 100% 2px; }

.contact-meta {
  display: grid;
  gap: .6rem;
  margin: 2.25rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(245 243 239 / .14);
}
.contact-meta div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; align-items: baseline; }
.contact-meta dt { font: 500 .6875rem/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: #9DA2A7; }
.contact-meta dd { margin: 0; }
.contact-meta a { text-underline-offset: .2em; }
.contact-meta a:hover { color: var(--orange); }

.contact-form { display: grid; gap: 1.4rem; align-content: start; }
.field-row { display: grid; gap: 1.4rem; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: .35rem; }
.field label {
  font: 500 .6875rem/1.4 var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #9DA2A7;
}
.field input,
.field textarea {
  width: 100%;
  padding: .7rem 0;
  border: 0;
  border-bottom: 1px solid rgb(245 243 239 / .28);
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  font: 400 1rem/1.5 var(--f-text);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--orange); box-shadow: 0 1px 0 0 var(--orange); }
.contact-form .btn { justify-self: start; margin-top: .4rem; }
.contact-form .btn-primary:focus-visible { box-shadow: inset 0 0 0 2px var(--black), inset 0 0 0 4px var(--paper); }
.form-note { font-size: .8125rem; color: rgb(245 243 239 / .55); }
.field-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font: 500 .875rem/1.5 var(--f-mono); }
.form-status:empty { display: none; }
.form-status[data-kind="ok"] { padding-left: .8rem; border-left: 2px solid var(--orange); color: var(--paper); }
.form-status[data-kind="error"] { color: var(--orange-hi); }
.contact-form .btn:disabled { opacity: .7; cursor: wait; }

/* ---------- 15. Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 9vh, 6rem) 0 2rem;
  background: var(--black);
  color: var(--paper);
}
.footer-top {
  display: grid;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgb(245 243 239 / .12);
}
@media (min-width: 900px) {
  .footer-top { grid-template-columns: auto 1fr; align-items: end; gap: 4rem; }
  .footer-side { justify-self: end; text-align: right; }
  .footer-nav { justify-content: flex-end; }
}
.footer-brand {
  font: 800 clamp(3.5rem, 13vw, 9rem)/.82 var(--f-display);
  letter-spacing: .005em;
  text-decoration: none;
}
.footer-tagline {
  font: 500 .75rem/1.6 var(--f-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9DA2A7;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.footer-nav a {
  font: 600 1rem/1 var(--f-display);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: .8;
  transition: opacity .2s ease, color .2s ease;
}
.footer-nav a:hover { opacity: 1; color: var(--orange); }

.legal { padding: 1.25rem 0; border-bottom: 1px solid rgb(245 243 239 / .12); }
.legal summary {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font: 500 .75rem/1.4 var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #9DA2A7;
  cursor: pointer;
  list-style: none;
}
.legal summary::-webkit-details-marker { display: none; }
.legal summary::before { content: "+"; color: var(--orange); }
.legal[open] summary::before { content: "−"; }
.legal-body {
  display: grid;
  gap: .6rem;
  max-width: 60rem;
  padding-top: 1rem;
  font-size: .875rem;
  color: rgb(245 243 239 / .7);
}
.legal-body b { display: inline-block; min-width: 13rem; color: var(--paper); font-weight: 500; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
  padding-top: 1.5rem;
  font: 400 .75rem/1.5 var(--f-mono);
  color: #9DA2A7;
}

/* ---------- 16. Réduction des animations ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .hero-tag,
  .js .hero-logo .l,
  .js .hero-title .line > span,
  .js .hero-fade,
  .js [data-reveal],
  .js [data-lines] .line > span,
  .js .sec-head .sec-rule {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .tag-dot, .scroll-cue-line::after, .marquee-track { animation: none !important; }
  .js .led { background: var(--orange); animation: none !important; }
  .js .step > :not(.step-node) { opacity: 1; }
  .type-live::after { display: none; }
  .mm-cols span { transition: none !important; }
  .reticle { display: none; }
  .js [data-wipe]::after, .js [data-wipe]::before { transition: none !important; transform: scale(0) !important; }
  .manifesto { height: auto; }
  .manifesto-sticky { position: static; height: auto; padding: 7rem 0; }
  .mw { opacity: 1 !important; }
  .mm-links a, .fiche-item, .service-main, .fiche { transition: none; }
}
