/* =========================================================
   VIRTUS — Agence de marketing digital
   DA : monochrome noir / blanc issue du logo,
   monogramme en trois V, typo à chasse fixe espacée.
   ========================================================= */

:root {
  /* Couleurs (logo) */
  --ink: #0b0b0b;        /* noir VIRTUS : fonds sombres, texte */
  --white: #ffffff;
  --paper: #f3f3f1;      /* gris papier : surfaces secondaires */
  --grey: #8a8a8a;       /* texte secondaire, unités */
  --line: #e3e3e3;       /* filets sur fond clair */
  --line-dark: #2b2b2b;  /* filets sur fond sombre */

  /* Typo */
  --font-body: 'Inter Tight', 'Söhne', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Roboto Mono', 'Orator Std', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --text-body: 16px;
  --text-sub: 22px;
  --text-h-sm: 28px;
  --text-h: clamp(30px, 4.2vw, 42px);
  --text-h-lg: clamp(34px, 5vw, 52px);

  /* Formes */
  --r-tag: 12px;
  --r-card: 16px;
  --r-pill: 30px;

  /* Layout */
  --max: 1200px;
  --narrow: 720px;
  --section: clamp(96px, 14vw, 160px);

  /* Mouvement */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.76, 0, .24, 1);
}

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.5;
  letter-spacing: -0.006em;
  color: var(--ink);
  background: var(--white);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }

img, svg { display: block; }
ul { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--ink); color: var(--white); }

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

/* ---------- Helpers ---------- */
.section { padding: var(--section) 24px; text-align: center; position: relative; }
.container { max-width: var(--max); margin: 0 auto; }
.narrow { max-width: var(--narrow); margin: 0 auto; }

.h-xl { font-size: clamp(44px, 8vw, 96px); line-height: 1.02; font-weight: 400; letter-spacing: -0.035em; }
.h-lg { font-size: var(--text-h-lg); line-height: 1.18; font-weight: 400; letter-spacing: -0.025em; }
.h-md { font-size: var(--text-h); line-height: 1.25; font-weight: 400; letter-spacing: -0.02em; }

/* Étiquette : typo du logo, capitales espacées */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .28em;
  text-transform: uppercase;
  padding: 9px 12px 9px 15px;
  border: 1px solid currentColor;
  border-radius: var(--r-tag);
  margin-bottom: 32px;
}

/* ---------- Lien souligné (remplace les boutons) ---------- */
.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  padding-bottom: 2px;
  font-size: var(--text-body);
  line-height: 1.4;
  transition: opacity .4s var(--ease);
}
.link::before,
.link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transition: transform .7s var(--ease);
}
.link::before { transform-origin: right; }
.link::after { transform: scaleX(0); transform-origin: left; }
.link:hover::before { transform: scaleX(0); }
.link:hover::after { transform: scaleX(1); transition-delay: .2s; }
.link--lg { font-size: var(--text-sub); }

.link svg,
.arrow-right,
.arrow-down {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.arrow-right { width: 24px; height: 14px; transition: transform .6s var(--ease); }
.link:hover .arrow-right { transform: translateX(6px); }
.magnetic { will-change: transform; }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0;
  z-index: 2000;
  background: var(--ink);
  color: var(--white);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 28px;
  transition: transform 1.1s var(--ease-in-out);
}
.loader__mono { width: clamp(70px, 9vw, 110px); height: auto; aspect-ratio: 1336 / 1452; }
.loader__ghost { fill: none; stroke: rgba(255, 255, 255, .35); stroke-width: 8; }
.loader__fill { fill: var(--white); }
.loader__count {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: .3em;
}
body.is-loaded .loader { transform: translateY(-100%); }
body.no-loader .loader { display: none; }

/* ---------- Curseur (s'inverse selon le fond) ---------- */
.cursor { display: none; }
body.has-cursor .cursor { display: block; }
body.has-cursor,
body.has-cursor a,
body.has-cursor button,
body.has-cursor [data-cursor] { cursor: none; }

.cursor__dot,
.cursor__ring {
  position: fixed; top: 0; left: 0;
  z-index: 3000;
  pointer-events: none;
  border-radius: 50%;
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor__dot {
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  background: var(--white);
  transition: opacity .3s;
}
.cursor__ring {
  width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border: 1px solid var(--white);
  display: grid; place-items: center;
  transition: width .5s var(--ease), height .5s var(--ease), margin .5s var(--ease),
              background-color .4s var(--ease), opacity .3s;
}
.cursor__label {
  color: #000;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .3s, transform .5s var(--ease);
  white-space: nowrap;
}
.cursor.is-link .cursor__ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
.cursor.is-label .cursor__ring { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: var(--white); }
.cursor.is-label .cursor__label { opacity: 1; transform: none; }
.cursor.is-label .cursor__dot,
.cursor.is-link .cursor__dot { opacity: 0; }
.cursor.is-hidden .cursor__ring,
.cursor.is-hidden .cursor__dot { opacity: 0; }
.cursor.is-down .cursor__ring { width: 28px; height: 28px; margin: -14px 0 0 -14px; }

/* ---------- Progression ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 900; pointer-events: none; mix-blend-mode: difference; }
.progress span { display: block; height: 100%; background: var(--white); transform-origin: left; transform: scaleX(0); }

/* ---------- Navigation : pastille flottante ---------- */
.nav {
  position: fixed;
  top: 20px; left: 50%;
  z-index: 1000;
  transform: translate(-50%, -150%);
  transition: transform 1s var(--ease) .6s;
}
body.is-loaded .nav { transform: translate(-50%, 0); }
.nav.is-hidden { transform: translate(-50%, -150%) !important; transition-delay: 0s; }

.nav__pill {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  overflow: hidden;
  min-width: 290px;
  transition: border-radius .6s var(--ease);
}
.nav.is-open .nav__pill { border-radius: 24px; }

.nav__row { display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 8px 0 6px; gap: 4px; }
.nav__logo {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform .6s var(--ease);
}
.nav__logo svg { width: 16px; height: 17px; fill: var(--white); }
.nav__logo:hover { transform: rotate(-12deg) scale(1.08); }
.nav__toggle,
.nav__cart {
  display: inline-flex; align-items: center; gap: 10px;
  height: 34px; padding: 0 12px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  transition: background-color .3s;
}
.nav__toggle:hover,
.nav__cart:hover { background: var(--paper); }
.icon-plus { width: 11px; height: 11px; fill: none; stroke: var(--ink); stroke-width: 1.5; transition: transform .6s var(--ease); }
.nav.is-open .icon-plus { transform: rotate(135deg); }
.nav__sep { width: 1px; height: 18px; background: var(--line); }
.nav__count {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--white);
  font-size: 11px;
  letter-spacing: 0;
}
.nav__count.bump { animation: bump .6s var(--ease); }
@keyframes bump {
  35% { transform: scale(1.5); }
}

.nav__menu { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .7s var(--ease); }
.nav.is-open .nav__menu { grid-template-rows: 1fr; }
.nav__menu-inner { overflow: hidden; display: flex; flex-direction: column; align-items: center; }
.nav__menu a {
  display: block;
  font-size: var(--text-sub);
  text-decoration: none;
  padding: 6px 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .4s, transform .6s var(--ease), letter-spacing .5s var(--ease);
}
.nav__menu a:first-child { margin-top: 12px; }
.nav__menu a:last-child { margin-bottom: 22px; }
.nav__menu a:hover { letter-spacing: .04em; }
.nav.is-open .nav__menu a { opacity: 1; transform: none; }
.nav.is-open .nav__menu a:nth-child(1) { transition-delay: .10s; }
.nav.is-open .nav__menu a:nth-child(2) { transition-delay: .15s; }
.nav.is-open .nav__menu a:nth-child(3) { transition-delay: .20s; }
.nav.is-open .nav__menu a:nth-child(4) { transition-delay: .25s; }
.nav.is-open .nav__menu a:nth-child(5) { transition-delay: .30s; }

/* ---------- Wordmark VIRTUS ---------- */
.wordmark {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 14vw; /* ajusté en JS pour remplir la largeur */
  line-height: .8;
  letter-spacing: 0;
  white-space: nowrap;
  width: 100%;
  text-align: center;
  user-select: none;
}
.wordmark__inner { display: inline-block; }
.ch {
  display: inline-block;
  clip-path: inset(-60% -40% -0.04em -40%);
  will-change: transform;
}
.ch + .ch { margin-left: .26em; }
.ch.is-free { clip-path: none; }
.ch__in {
  display: inline-block;
  transform: translateY(1.1em);
  transition: transform 1.4s var(--ease);
  transition-delay: calc(var(--i) * 80ms + .45s);
}
body.is-loaded #heroMark .ch__in { transform: none; }
.footer__mark.is-in .ch__in { transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--ink);
  color: var(--white);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 110px 3vw 140px;
  text-align: center;
  overflow: hidden;
}
.hero__meta {
  position: absolute; top: 34px; left: 32px; right: 32px;
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  pointer-events: none;
}
.hero__meta span { opacity: 0; transform: translateY(-10px); transition: opacity .8s, transform 1s var(--ease); transition-delay: 1.1s; }
body.is-loaded .hero__meta span { opacity: .7; transform: none; }

.hero__mono {
  width: auto;
  height: clamp(140px, 26vh, 280px);
  aspect-ratio: 1336 / 1452;
  overflow: visible;
  margin-bottom: clamp(32px, 6vh, 64px);
  fill: var(--white);
}
.mp, .mp__in, .mp-ghost { transform-box: fill-box; transform-origin: 50% 50%; }
.mp-ghost { will-change: transform; opacity: 0; transition: opacity 1.2s var(--ease) 1.4s; }
.mp-ghost polygon { fill: none; stroke: var(--white); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
body.is-loaded .mp-ghost { opacity: .5; }
.hero__mono { cursor: pointer; }
.mp { will-change: transform; }
.mp__in {
  opacity: 0;
  transition: transform 1.6s var(--ease), opacity .9s var(--ease);
}
.mp[data-part="top"] .mp__in { transform: translateY(-420px) rotate(-30deg); transition-delay: .05s; }
.mp[data-part="left"] .mp__in { transform: translate(-460px, 260px) rotate(-40deg); transition-delay: .18s; }
.mp[data-part="right"] .mp__in { transform: translate(460px, 260px) rotate(40deg); transition-delay: .26s; }
body.is-loaded .mp[data-part] .mp__in { opacity: 1; transform: none; }

.hero__lead {
  max-width: 560px;
  margin-top: clamp(28px, 4vw, 48px);
  font-size: var(--text-sub);
  line-height: 1.45;
  color: rgba(255, 255, 255, .82);
}
.scroll-ind {
  position: absolute; bottom: 36px; left: 50%;
  translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-decoration: none;
  font-family: var(--font-mono);
}
.scroll-ind .link { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; }
.arrow-down { width: 14px; height: 26px; animation: nudge 2.2s var(--ease) infinite; }
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
[data-hero-fade] { opacity: 0; transition: opacity 1s 1.1s; }
body.is-loaded [data-hero-fade] { opacity: 1; }

/* ---------- Marquee ---------- */
.marquee {
  background: var(--white);
  padding: 56px 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.marquee__row { display: flex; width: max-content; white-space: nowrap; will-change: transform; }
.marquee__row + .marquee__row { margin-top: 10px; }
.marquee__track { display: inline-flex; align-items: center; gap: 40px; padding-right: 40px; }
.marquee__track span {
  font-size: clamp(40px, 7vw, 92px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}
.marquee__track .is-mono {
  font-family: var(--font-mono);
  font-weight: 300;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: clamp(32px, 5.6vw, 76px);
}
/* Mots en contour : le trait est peint sous un remplissage blanc,
   ce qui masque les traits parasites à l'intérieur des lettres. */
.marquee__row--outline span {
  color: var(--white);
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
}
.sep {
  flex: 0 0 auto;
  width: clamp(28px, 3.6vw, 48px);
  height: auto;
  aspect-ratio: 1336 / 1452;
  fill: var(--ink);
  animation: spin 10s linear infinite;
}
.marquee__row--outline .sep { fill: none; stroke: var(--ink); stroke-width: 30; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Manifeste ---------- */
.manifesto__text {
  font-size: var(--text-h);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 56px;
}
.mw { opacity: .1; transition: opacity .5s var(--ease); }
.mw.on { opacity: 1; }
.mw.amp { font-family: var(--font-mono); font-weight: 300; }

/* ---------- Révélations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
  transition-delay: var(--d, 0s);
}
[data-reveal].is-in { opacity: 1; transform: none; }

.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.wi {
  display: inline-block;
  transform: translateY(105%) rotate(4deg);
  transform-origin: left bottom;
  transition: transform 1.1s var(--ease);
  transition-delay: calc(var(--i) * 45ms);
}
[data-split].is-in .wi { transform: none; }

/* ---------- Valeurs ---------- */
.values { background: var(--paper); }
.values__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 72px;
}
.value {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 40px 28px 36px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  transition: opacity 1s var(--ease), transform .9s var(--ease), color .6s var(--ease), border-color .6s var(--ease);
}
.value:nth-child(2) { --d: .08s; }
.value:nth-child(3) { --d: .16s; }
.value:nth-child(4) { --d: .24s; }
.value::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--ink);
  clip-path: polygon(0 100%, 50% 100%, 100% 100%, 100% 100%, 0 100%);
  transition: clip-path .8s var(--ease);
  z-index: -1;
}
/* le fond noir monte en forme de V */
.value:hover::before { clip-path: polygon(0 0, 50% 22%, 100% 0, 100% 100%, 0 100%); }
.value:hover { color: var(--white); border-color: var(--ink); transform: translateY(-6px); }
.value__num { position: absolute; top: 20px; left: 22px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; opacity: .5; }
.value__icon {
  width: 56px; height: auto;
  aspect-ratio: 1336 / 1452;
  margin: 8px auto 28px;
  fill: currentColor;
  overflow: visible;
  transition: transform 1s var(--ease);
}
.value:hover .value__icon { transform: rotate(-12deg) scale(1.12); }
.value h3 {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: .26em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.value p { font-size: 15px; line-height: 1.5; opacity: .8; }

/* ---------- Offres (défilement horizontal) ---------- */
.hscroll { position: relative; background: var(--white); }
.hscroll__sticky {
  position: sticky; top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 80px 0 32px;
}
.hscroll__head { text-align: center; padding: 0 24px; margin-bottom: clamp(24px, 4vh, 48px); }
.hscroll__head .tag { margin-bottom: 20px; }
.hscroll__intro { max-width: 520px; margin: 14px auto 0; font-size: 15px; line-height: 1.5; color: #555; }
.hscroll__progress { width: 160px; height: 1px; margin: 24px auto 0; background: var(--line); overflow: hidden; }
.hscroll__progress span { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }

.hscroll__track {
  display: flex;
  gap: 20px;
  width: max-content;
  padding: 0 max(24px, calc(50vw - 560px));
  will-change: transform;
}

.card {
  position: relative;
  flex: 0 0 auto;
  width: clamp(280px, 26vw, 360px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 14px 14px 26px;
  text-align: center;
  transition: border-color .5s var(--ease), transform .8s var(--ease);
}
.card:hover { border-color: var(--ink); transform: translateY(-6px); }
.card__num {
  position: absolute; top: 26px; left: 28px; z-index: 2;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em;
  transition: color .5s;
}
.card__new {
  position: absolute; top: 22px; right: 24px; z-index: 2;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase; line-height: 1;
  padding: 6px 9px;
  border-radius: var(--r-tag);
  background: var(--ink);
  color: var(--white);
}
.card:hover .card__num { color: var(--white); }
.card__new { transition: background-color .5s, color .5s; }
.card:hover .card__new { background: var(--white); color: var(--ink); }
.card__stage {
  position: relative;
  height: clamp(190px, 31vh, 300px);
  border-radius: 12px;
  background: var(--paper);
  overflow: hidden;
  display: grid; place-items: center;
  padding: 48px 22px 22px;
  isolation: isolate;
}
.card__stage::before {
  content: "";
  position: absolute;
  left: var(--mx, 50%); top: var(--my, 100%);
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--ink);
  transform: scale(0);
  transition: transform .9s var(--ease);
  z-index: -1;
}
.card:hover .card__stage::before { transform: scale(90); }

.card__info { padding: 22px 10px 0; }
.card__row { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.card__row h3 { font-size: var(--text-sub); font-weight: 500; letter-spacing: -0.015em; }
.card__price {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: .04em;
  overflow: hidden;
  height: 1.6em;
  line-height: 1.6;
  vertical-align: bottom;
  color: var(--grey);
}
.card__price span { display: block; transition: transform .6s var(--ease); }
.card:hover .card__price span { transform: translateY(-100%); color: var(--ink); }
.card__meta { font-size: 14px; color: var(--grey); margin-top: 4px; min-height: 2.9em; }
.levels { display: inline-flex; gap: 4px; padding: 4px; margin: 14px 0 18px; border: 1px solid var(--line); border-radius: 20px; position: relative; }
.level {
  position: relative; z-index: 1;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 16px;
  transition: color .4s var(--ease);
}
.level.is-active { color: var(--white); }
.levels__pill {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  border-radius: 16px;
  background: var(--ink);
  transition: transform .5s var(--ease), width .5s var(--ease);
}

/* ---------- Maquette de site (wireframe animé) ---------- */
.mock {
  width: 100%;
  max-width: 270px;
  aspect-ratio: 4 / 3;
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(var(--ty, 0)) rotate(var(--rot, 0deg));
  transition: transform .9s var(--ease);
}
.card:hover .mock { --ty: -8px; }
.mock__bar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 8px;
  border-bottom: 1px solid var(--line);
}
.mock__bar i,
.build__bar i { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--ink); }
.mock__bar span {
  flex: 1;
  margin-left: 6px;
  height: 10px;
  border-radius: 5px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 6px; line-height: 10px; letter-spacing: .1em;
  color: var(--grey);
  text-align: left; padding-left: 6px;
  overflow: hidden; white-space: nowrap;
}
.mock__view { position: relative; flex: 1; overflow: hidden; }
.mock__page {
  position: absolute; left: 0; right: 0; top: 0;
  height: 200%;
  padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
  transition: transform 3.2s var(--ease-in-out);
}
.card:hover .mock__page,
.mock.is-play .mock__page { transform: translateY(-50%); }

/* briques du wireframe */
.mk { flex: 0 0 auto; border-radius: 3px; }
.mk-nav { display: flex; align-items: center; gap: 5px; height: 10px; }
.mk-nav b { width: 14px; height: 8px; background: var(--ink); border-radius: 2px; margin-right: auto; }
.mk-nav i { width: 14px; height: 3px; background: #cfcfcf; border-radius: 2px; }
.mk-hero { flex: 0 0 34%; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.mk-hero i { display: block; height: 5px; width: 60%; background: var(--ink); border-radius: 2px; }
.mk-hero i + i { width: 42%; height: 3px; background: #bdbdbd; }
.mk-hero b { display: block; width: 26%; height: 9px; border-radius: 6px; background: var(--ink); margin-top: 3px; }
.mk-split { flex: 0 0 30%; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mk-split > div:first-child { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.mk-split > div:first-child i { height: 4px; background: var(--ink); border-radius: 2px; }
.mk-split > div:first-child i:nth-child(n+2) { height: 3px; background: #c4c4c4; width: 80%; }
.mk-split > div:last-child { background: var(--paper); border-radius: 3px; }
.mk-line { height: 4px; width: 50%; margin: 2px auto; background: var(--ink); }
.mk-line--sm { height: 3px; width: 70%; background: #d0d0d0; }
.mk-grid { flex: 0 0 18%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.mk-grid i { background: var(--paper); border-radius: 3px; position: relative; }
.mk-grid--shop { flex-basis: 40%; grid-template-rows: 1fr 1fr; }
.mk-grid--shop i::after { content: ""; position: absolute; left: 4px; right: 40%; bottom: 4px; height: 3px; background: var(--ink); border-radius: 2px; }
.mk-cta { flex: 0 0 14%; background: var(--ink); display: grid; place-items: center; }
.mk-cta i { width: 40%; height: 4px; background: var(--white); border-radius: 2px; }
.mk-foot { flex: 1 0 8%; background: var(--paper); }
.mk-banner { flex: 0 0 22%; background: var(--ink); }
.mk-chart { flex: 0 0 36%; background: var(--paper); padding: 6px; }
.mk-chart svg { width: 100%; height: 100%; overflow: visible; }
.mk-chart polyline { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 300; stroke-dashoffset: 300; transition: stroke-dashoffset 2s var(--ease); }
.card:hover .mk-chart polyline,
.mock.is-play .mk-chart polyline,
.mk-chart.is-drawn polyline { stroke-dashoffset: 0; }
.mk-bars { flex: 0 0 22%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-items: end; }
.mk-bars i { background: var(--ink); border-radius: 2px; height: 20%; transition: height 1.4s var(--ease); }
.mk-bars i:nth-child(2) { transition-delay: .1s; }
.mk-bars i:nth-child(3) { transition-delay: .2s; }
.card:hover .mk-bars i:nth-child(1), .mock.is-play .mk-bars i:nth-child(1) { height: 55%; }
.card:hover .mk-bars i:nth-child(2), .mock.is-play .mk-bars i:nth-child(2) { height: 80%; }
.card:hover .mk-bars i:nth-child(3), .mock.is-play .mk-bars i:nth-child(3) { height: 100%; }
/* refonte : "avant" brouillon qui s'efface */
.mock__before {
  position: absolute; inset: 0;
  background: #e6e6e6;
  padding: 8px;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 14px; gap: 4px;
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.6s var(--ease-in-out);
  z-index: 2;
}
.mock__before i { background: #bdbdbd; border-radius: 1px; }
.mock__before i:nth-child(3n) { grid-column: span 2; background: #a9a9a9; }
.mock__before i:nth-child(5n) { transform: rotate(-4deg); }
.mock__before::after {
  content: "Avant";
  position: absolute; left: 8px; bottom: 8px;
  font-family: var(--font-mono); font-size: 7px; letter-spacing: .2em; text-transform: uppercase;
  background: var(--white); padding: 3px 5px; border-radius: 4px;
}
.card:hover .mock__before,
.mock.is-play .mock__before { clip-path: inset(0 0 0 100%); }
/* niveau Premium : maquette plus riche */
.mock .mk-extra { display: none; }
.mock.is-premium .mk-extra { display: grid; }
.mock.is-premium .mk-hero { background: var(--ink); }
.mock.is-premium .mk-hero i { background: var(--white); }
.mock.is-premium .mk-hero i + i { background: #6d6d6d; }
.mock.is-premium .mk-hero b { background: var(--white); }

/* ---------- Méthode (le site se construit au scroll) ---------- */
.feature { position: relative; height: 420vh; background: var(--ink); color: var(--white); }
.feature__sticky {
  position: sticky; top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 0 20px;
}
.feature__bigs { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.feature__bigs span {
  grid-area: 1 / 1;
  font-family: var(--font-mono);
  font-weight: 200;
  font-size: clamp(90px, 19vw, 300px);
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: .8;
  color: var(--ink);
  -webkit-text-stroke: 2px var(--line-dark);
  paint-order: stroke fill;
  opacity: 0;
  transform: scale(.85);
  transition: opacity .8s var(--ease), transform 1.2s var(--ease);
}
.feature__bigs span.is-active { opacity: 1; transform: none; }

.feature__top { position: absolute; top: 96px; left: 0; right: 0; }
.feature__top .tag { margin-bottom: 12px; }
.feature__num { font-family: var(--font-mono); font-size: 12px; letter-spacing: .2em; color: var(--grey); }
.feature__num span { color: var(--white); }

.build {
  position: relative; z-index: 1;
  width: min(760px, 100%);
  height: min(44vh, 400px);
  background: var(--ink);
  border: 1px solid #3a3a3a;
  border-radius: 14px;
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: translateY(var(--ty, 0)) rotate(var(--rot, 0deg));
  text-align: left;
  margin-top: 40px;
}
.build__bar {
  display: flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border-bottom: 1px solid var(--line-dark);
}
.build__bar i { border-color: #6a6a6a; width: 8px; height: 8px; }
.build__bar span {
  margin: 0 auto;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  color: var(--grey);
  padding-right: 36px;
}
.build__body { flex: 1; display: grid; grid-template-columns: 1.05fr 1fr; min-height: 0; }
.build__code {
  margin: 0;
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: clamp(9px, 1vw, 12px);
  line-height: 1.55;
  color: #d9d9d9;
  border-right: 1px solid var(--line-dark);
  overflow: hidden;
  white-space: pre;
}
.build__code .ln { display: block; clip-path: inset(0 100% 0 0); }
.build__code .ln.is-typing::after { content: "▍"; animation: blink .8s steps(1) infinite; }
.build__code .t { color: var(--white); font-weight: 500; }
.build__code .a { color: #9a9a9a; }
.build__code .n { color: #5c5c5c; display: inline-block; width: 2.2em; user-select: none; }
@keyframes blink { 50% { opacity: 0; } }

.build__preview {
  background: var(--white);
  padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
  overflow: hidden;
}
.bp {
  border-radius: 4px;
  opacity: 0;
  transform: translateY(14px) scale(.96);
  transition: opacity .6s var(--ease), transform .8s var(--ease), background-color .6s, border-color .6s;
  border: 1px dashed #bdbdbd;
}
.bp.is-on { opacity: 1; transform: none; }
.build__preview.is-designed .bp { border-style: solid; border-color: transparent; }
.bp--nav { display: flex; align-items: center; gap: 6px; height: 16px; padding: 0 4px; }
.bp--nav b { width: 22px; height: 10px; border-radius: 2px; background: #d4d4d4; margin-right: auto; }
.bp--nav i { width: 18px; height: 4px; border-radius: 2px; background: #d4d4d4; }
.bp--hero { flex: 0 0 34%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: transparent; }
.bp--hero i { width: 60%; height: 7px; border-radius: 3px; background: #d4d4d4; }
.bp--hero i + i { width: 40%; height: 4px; }
.bp--hero b { width: 24%; height: 12px; border-radius: 8px; background: #d4d4d4; margin-top: 4px; }
.bp--title { height: 6px; width: 40%; margin: 4px auto 0; }
.bp--grid { flex: 0 0 18%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; border: 0; }
.bp--grid i { border-radius: 4px; border: 1px dashed #bdbdbd; }
.bp--row { flex: 0 0 14%; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; border: 0; }
.bp--row i { border-radius: 4px; border: 1px dashed #bdbdbd; }
.bp--foot { flex: 1; }
/* état "design" : les blocs prennent couleur */
.build__preview.is-designed .bp--nav b,
.build__preview.is-designed .bp--hero b { background: var(--ink); }
.build__preview.is-designed .bp--hero { background: var(--ink); }
.build__preview.is-designed .bp--hero i { background: var(--white); }
.build__preview.is-designed .bp--hero i + i { background: #777; }
.build__preview.is-designed .bp--hero b { background: var(--white); }
.build__preview.is-designed .bp--title { background: var(--ink); }
.build__preview.is-designed .bp--grid i,
.build__preview.is-designed .bp--row i { border-style: solid; border-color: transparent; background: var(--paper); }
.build__preview.is-designed .bp--foot { background: var(--paper); }
.build__progress { height: 2px; background: var(--line-dark); }
.build__progress span { display: block; height: 100%; background: var(--white); transform-origin: left; transform: scaleX(0); }
.build.is-live .build__bar span::before { content: "● "; color: var(--white); }

.feature__steps { position: absolute; bottom: 6vh; left: 0; right: 0; display: grid; justify-items: center; padding: 0 24px; z-index: 2; }
.feature__step {
  grid-area: 1 / 1;
  max-width: 540px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s var(--ease), transform .9s var(--ease);
  pointer-events: none;
}
.feature__step.is-active { opacity: 1; transform: none; }
.feature__step.is-past { transform: translateY(-30px); }
.feature__step h3 { font-size: var(--text-h-sm); font-weight: 400; letter-spacing: -0.02em; margin-bottom: 6px; }
.feature__step p { font-size: var(--text-body); line-height: 1.5; color: rgba(255, 255, 255, .7); }

/* ---------- Chiffres ---------- */
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 80px;
}
.stat { padding: 40px 12px; border-top: 1px solid var(--ink); }
.stat:nth-child(2) { --d: .1s; }
.stat:nth-child(3) { --d: .2s; }
.stat:nth-child(4) { --d: .3s; }
.stat__num {
  font-family: var(--font-mono);
  font-weight: 200;
  font-size: clamp(56px, 7vw, 100px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.stat__num em { font-style: normal; color: var(--grey); font-size: .32em; margin-left: .1em; vertical-align: top; letter-spacing: 0; }
.stat__label { margin-top: 14px; font-size: 15px; }

/* ---------- Pour qui (liste au survol) ---------- */
.usages { padding-bottom: calc(var(--section) * .6); }
.usages__list { margin-top: 72px; border-bottom: 1px solid var(--ink); }
.usage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(20px, 3vw, 34px) 24px;
  border-top: 1px solid var(--ink);
  overflow: hidden;
  isolation: isolate;
  transition: color .6s var(--ease);
}
.usage::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .7s var(--ease);
  z-index: -1;
}
.usage:hover { color: var(--white); }
.usage:hover::before { transform: scaleY(1); transform-origin: top; }
.usage__name {
  font-size: var(--text-h-lg);
  line-height: 1.15;
  letter-spacing: -0.025em;
  transition: transform .7s var(--ease), letter-spacing .7s var(--ease);
}
.usage:hover .usage__name { letter-spacing: 0; }
.usage__idx { position: absolute; left: 24px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .2em; transition: transform .7s var(--ease); }
.usage:hover .usage__idx { transform: translateX(12px); }
.usage__arrow {
  position: absolute; right: 24px;
  width: 36px; height: 20px;
  transform: rotate(-45deg);
}
.usage:hover .usage__arrow { transform: rotate(0) translateX(-8px); }

.preview {
  position: fixed; top: 0; left: 0;
  width: 280px; height: 210px;
  margin: -105px 0 0 -140px;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.preview.is-on { opacity: 1; }
.preview .mock {
  max-width: none;
  height: 100%;
  transform: scale(.4) rotate(var(--rot, 0deg));
  transition: transform .6s var(--ease);
}
.preview.is-on .mock { transform: scale(1) rotate(var(--rot, 0deg)); }

/* ---------- Engagement ---------- */
.engagement { padding-top: calc(var(--section) * .6); }
.dark-card {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r-card);
  padding: clamp(48px, 8vw, 96px) clamp(24px, 6vw, 80px) clamp(80px, 10vw, 120px);
  overflow: hidden;
}
.dark-card .h-md { max-width: 720px; margin: 0 auto; }
.dark-card__text { max-width: 520px; margin: 24px auto 36px; color: rgba(255, 255, 255, .72); }
.dark-card__zig {
  position: absolute; left: 0; right: 0; bottom: 28px;
  width: 100%; height: 40px;
  fill: none; stroke: var(--white); stroke-width: 1.5;
  pointer-events: none;
}
.dark-card__zig path { vector-effect: non-scaling-stroke; }

/* ---------- Contact ---------- */
.contact { background: var(--ink); color: var(--white); border-bottom: 1px solid var(--line-dark); }
.contact .h-xl { margin-bottom: 24px; }
.contact__text { font-size: var(--text-sub); max-width: 540px; margin: 0 auto 56px; color: rgba(255, 255, 255, .75); }
.contact__form { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.field { width: min(100%, 520px); text-align: left; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 4px;
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: var(--text-sub);
  color: var(--white);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #4a4a4a;
  padding: 10px 0;
  outline: none;
  border-radius: 0;
  resize: vertical;
  transition: border-color .4s;
  cursor: text !important;
}
.field textarea { font-size: 18px; line-height: 1.5; min-height: 110px; }
.field input::placeholder,
.field textarea::placeholder { color: #5e5e5e; }
.field input:focus,
.field textarea:focus { border-color: var(--white); }
.field.is-error input,
.field.is-error textarea { border-color: var(--white); animation: shake .5s; }
@keyframes shake {
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
.contact__form .link { margin-top: 12px; }
.contact__done { margin-top: 20px; min-height: 1.5em; }

/* ---------- Footer ---------- */
.footer { background: var(--white); padding: 96px 0 24px; text-align: center; overflow: hidden; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 40px; padding: 0 24px; margin-bottom: 72px; }
.footer__mark { padding: 0 3vw; }
.footer__copy { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; margin-top: 44px; color: var(--grey); padding: 0 24px; }

/* ---------- Tiroir devis ---------- */
.cart { position: fixed; inset: 0; z-index: 1500; pointer-events: none; }
.cart.is-open { pointer-events: auto; }
.cart__overlay { position: absolute; inset: 0; background: rgba(11, 11, 11, .4); opacity: 0; transition: opacity .6s var(--ease); }
.cart.is-open .cart__overlay { opacity: 1; }
.cart__panel {
  position: absolute; top: 12px; right: 12px; bottom: 12px;
  width: min(430px, calc(100vw - 24px));
  background: var(--white);
  border-radius: var(--r-card);
  display: flex; flex-direction: column;
  padding: 28px;
  transform: translateX(calc(100% + 24px));
  transition: transform .8s var(--ease);
}
.cart.is-open .cart__panel { transform: none; }
.cart__head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 20px; border-bottom: 1px solid var(--ink); }
.cart__head h2 { font-size: var(--text-h-sm); font-weight: 400; letter-spacing: -0.02em; }
.cart__list { flex: 1; overflow-y: auto; padding: 8px 0; }
.cart__empty { text-align: center; padding: 56px 0; color: var(--grey); }
.cart__empty svg { width: 40px; height: auto; aspect-ratio: 1336 / 1452; margin: 0 auto 20px; fill: var(--line); }
.cart__item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  animation: slideIn .6s var(--ease) both;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } }
.cart__thumb { width: 72px; }
.cart__thumb .mock { max-width: none; border-radius: 6px; }
.cart__thumb .mock__bar { height: 9px; padding: 0 4px; gap: 2px; }
.cart__thumb .mock__bar i { width: 3px; height: 3px; }
.cart__thumb .mock__bar span { display: none; }
.cart__thumb .mock__page { padding: 3px; gap: 2px; }
.cart__name { font-weight: 500; }
.cart__sub { font-size: 14px; color: var(--grey); }
.cart__remove { font-size: 13px; margin-top: 6px; }
.cart__price { font-family: var(--font-mono); font-size: 14px; text-align: right; }
.cart__foot { border-top: 1px solid var(--ink); padding-top: 20px; text-align: center; }
.cart__total { display: flex; justify-content: space-between; font-size: var(--text-sub); }
.cart__ship { font-size: 14px; line-height: 1.5; margin: 0 0 20px; color: var(--grey); }

/* point qui vole vers le devis */
.fly { position: fixed; top: 0; left: 0; z-index: 2500; pointer-events: none; }
.fly__dot { width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--ink); border: 2px solid var(--white); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px;
  z-index: 1600;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r-pill);
  padding: 12px 22px;
  font-size: 15px;
  transform: translate(-50%, 160%);
  transition: transform .7s var(--ease);
  white-space: nowrap;
}
.toast.is-on { transform: translate(-50%, 0); }
.toast b { font-weight: 500; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .values__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .hero__meta { display: none; }
  .hero__lead { font-size: 18px; }
  .usage__idx { display: none; }
  .usage__name { font-size: 28px; }
  .usage__arrow { width: 24px; right: 16px; }
  .card { width: 80vw; }
  .values__grid { grid-template-columns: 1fr; }
  .feature__top { top: 84px; }
  .build { height: 36vh; }
  .build__body { grid-template-columns: 1fr; }
  .build__preview { display: none; }
  .stats__grid { gap: 0 16px; }
  .nav__pill { min-width: 0; }
}

/* ---------- Mouvement réduit ----------
   Classe posée par le JS si le système demande moins d'animations
   (ajoutez ?motion à l'URL pour forcer la version complète). */
html.reduce-motion { scroll-behavior: auto; }
.reduce-motion .sep,
.reduce-motion .arrow-down,
.reduce-motion .build__code .ln.is-typing::after { animation: none; }
