:root {
  --ink: #0e0f0d;
  --ink-2: #161814;
  --ink-3: #1f221d;
  --bone: #ede9e0;
  --bone-2: #d9d4c8;
  --muted: #8d8a80;
  --signal: #ff5a1f;
  --line: rgba(237, 233, 224, 0.12);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg, canvas { display: block; }
::selection { background: var(--signal); color: var(--ink); }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.eyebrow { color: var(--muted); margin-bottom: 20px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.18); animation: blink 2.4s infinite; vertical-align: 1px; }
@keyframes blink { 50% { opacity: 0.35; } }

.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 26px; border-radius: 999px; font-weight: 600; font-size: 16px;
  transition: transform 0.4s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
}
.btn span { transition: transform 0.4s var(--ease); }
.btn:hover span { transform: translate(3px, -3px); }
.btn--signal { background: var(--signal); color: var(--ink); }
.btn--signal:hover { background: var(--bone); }
.btn--ghost { border-color: var(--line); color: var(--bone); }
.btn--ghost:hover { border-color: var(--bone); }
.btn--full { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 32px;
  padding: 18px var(--gutter);
  transition: transform 0.5s var(--ease), background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(14, 15, 13, 0.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.logo b { color: var(--signal); font-weight: 800; }
.logo__hub { fill: var(--signal); }
.nav__links { display: flex; align-items: center; gap: 28px; margin-left: auto; font-size: 15px; }
.nav__links a:not(.nav__cta) { position: relative; }
.nav__links a:not(.nav__cta)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease); }
.nav__links a:not(.nav__cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { padding: 10px 18px; border-radius: 999px; background: var(--bone); color: var(--ink); font-weight: 600; transition: background 0.3s; }
.nav__cta:hover { background: var(--signal); }
.nav__clock { color: var(--muted); display: flex; gap: 8px; align-items: center; }
.nav__burger { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--gutter) 40px; overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__inner { position: relative; z-index: 2; pointer-events: none; }
.hero__inner a { pointer-events: auto; }
.hero__title {
  font-size: clamp(3.4rem, 10.5vw, 10.5rem); line-height: 0.9; font-weight: 700;
  letter-spacing: -0.045em; font-variation-settings: "opsz" 96;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__title .line > span { display: inline-block; }
.hero__title em { font-style: normal; color: var(--signal); }
.hero__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-top: 40px; flex-wrap: wrap; }
.hero__lead { max-width: 440px; font-size: 18px; color: var(--bone-2); }
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__status {
  position: absolute; z-index: 2; top: 104px; right: var(--gutter);
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(14, 15, 13, 0.55);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--bone-2);
}
.hero__status b { color: var(--bone); font-weight: 500; }
.hero__scroll { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); color: var(--muted); z-index: 2; }
.hero__scroll span { display: inline-block; animation: bob 1.8s var(--ease) infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 22px 0; background: var(--ink-2); }
.marquee__track { display: flex; gap: 36px; width: max-content; animation: marquee 38s linear infinite; font-size: clamp(22px, 3vw, 38px); font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; }
.marquee__track i { color: var(--signal); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(90px, 13vw, 180px) var(--gutter); }
.section__head { margin-bottom: clamp(48px, 7vw, 96px); }
.h2 { font-size: clamp(2.2rem, 5.6vw, 5rem); line-height: 0.98; letter-spacing: -0.04em; font-weight: 650; }

/* Services */
.svc-list { border-top: 1px solid var(--line); }
.svc {
  position: relative; display: grid; grid-template-columns: 70px 1.1fr 1fr 48px; gap: 24px; align-items: start;
  padding: 34px 0; border-bottom: 1px solid var(--line); isolation: isolate; cursor: default;
  transition: color 0.4s var(--ease), padding 0.5s var(--ease);
}
.svc::before {
  content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1); z-index: -1; background: var(--signal);
  transform: scaleY(0); transform-origin: bottom; transition: transform 0.55s var(--ease);
}
.svc__num { color: var(--muted); padding-top: 12px; transition: color 0.4s; }
.svc__title { font-size: clamp(1.7rem, 3.4vw, 3rem); line-height: 1.02; letter-spacing: -0.035em; font-weight: 600; }
.svc__body p { color: var(--bone-2); max-width: 460px; transition: color 0.4s; }
.svc__arrow { font-size: 28px; justify-self: end; transition: transform 0.5s var(--ease); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tags li { border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; color: var(--muted); transition: border-color 0.4s, color 0.4s; }
@media (hover: hover) {
  .svc:hover { color: var(--ink); padding-left: 16px; }
  .svc:hover::before { transform: scaleY(1); }
  .svc:hover .svc__num, .svc:hover .svc__body p, .svc:hover .tags li { color: var(--ink); }
  .svc:hover .tags li { border-color: rgba(14, 15, 13, 0.3); }
  .svc:hover .svc__arrow { transform: rotate(45deg); }
}

/* Statement */
.statement { background: var(--bone); color: var(--ink); padding: clamp(100px, 14vw, 200px) var(--gutter); }
.statement .eyebrow { color: #6f6b62; }
.statement__text { font-size: clamp(2rem, 5.2vw, 4.8rem); line-height: 1.04; letter-spacing: -0.035em; font-weight: 600; max-width: 1300px; }
.statement__text .w { opacity: 0.14; transition: none; }

/* Process */
.process { position: relative; background: var(--ink); }
.process__pin { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 110px 0 60px; overflow: hidden; }
.process__head { padding: 0 var(--gutter); margin-bottom: 56px; }
.process__bar { height: 2px; background: var(--line); margin-top: 36px; max-width: 420px; }
.process__bar span { display: block; height: 100%; width: 0; background: var(--signal); }
.process__track { display: flex; gap: 20px; padding: 0 var(--gutter); width: max-content; }
.step {
  width: min(460px, 78vw); min-height: 340px; padding: 32px; border-radius: 18px;
  background: var(--ink-2); border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  transition: border-color 0.4s;
}
.step:hover { border-color: rgba(255, 90, 31, 0.6); }
.step__num { font-size: 96px; line-height: 0.8; font-weight: 300; letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1px var(--muted); }
.step h3 { font-size: 34px; letter-spacing: -0.03em; font-weight: 600; margin-bottom: 10px; }
.step p { color: var(--bone-2); }

/* Who */
.who__grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.who__grid li {
  display: flex; flex-direction: column; gap: 46px; padding: 28px; font-size: clamp(20px, 2.1vw, 28px); font-weight: 550; letter-spacing: -0.02em;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background 0.4s;
}
.who__grid li span { color: var(--signal); }
.who__grid li:hover { background: var(--ink-2); }

/* Contact */
.contact {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 100px);
  padding: clamp(90px, 13vw, 180px) var(--gutter); border-top: 1px solid var(--line);
  background: radial-gradient(120% 80% at 0% 100%, rgba(255, 90, 31, 0.1), transparent 60%);
}
.contact__title { font-size: clamp(3rem, 7.5vw, 7rem); line-height: 0.92; letter-spacing: -0.045em; font-weight: 700; }
.contact__title em { font-style: normal; color: var(--signal); }
.contact__lead { margin-top: 24px; color: var(--bone-2); max-width: 400px; }
.contact__info { margin-top: 48px; border-top: 1px solid var(--line); }
.contact__info li { display: flex; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); text-transform: none; font-size: 14px; }
.contact__info span { color: var(--muted); width: 60px; text-transform: uppercase; font-size: 12px; }
.contact__info a:hover { color: var(--signal); }

.form { display: flex; flex-direction: column; gap: 22px; align-self: end; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form label > span, .form legend { display: block; color: var(--muted); margin-bottom: 8px; }
.form input:not([type="radio"]), .form textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); color: var(--bone);
  font: inherit; font-size: 18px; padding: 8px 0 12px; outline: none; border-radius: 0; resize: vertical; transition: border-color 0.3s;
}
.form input:focus, .form textarea:focus { border-bottom-color: var(--signal); }
.form input.is-invalid { border-bottom-color: #ff3b3b; }
.form__chips { border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.form__chips legend { width: 100%; }
.form__chips label { position: relative; cursor: pointer; }
.form__chips input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.form__chips label span { display: inline-block; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.form__chips input:checked + span { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.form__chips input:focus-visible + span { outline: 2px solid var(--signal); outline-offset: 2px; }
.form__note { color: var(--muted); min-height: 1em; text-transform: none; }

/* Footer */
.footer { padding: 40px var(--gutter) 0; border-top: 1px solid var(--line); overflow: hidden; }
.footer__top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--muted); }
.footer__top nav { display: flex; gap: 24px; }
.footer__top a:hover { color: var(--bone); }
.footer__word { font-size: clamp(5rem, 27vw, 26rem); font-weight: 800; line-height: 0.78; letter-spacing: -0.06em; margin-top: 40px; padding-bottom: 0.05em; white-space: nowrap; }
.footer__word span { color: var(--signal); }

/* Legal page */
.legal { max-width: 820px; padding: 140px var(--gutter) 100px; }
.legal h1 { font-size: clamp(2.6rem, 7vw, 5rem); line-height: 0.95; letter-spacing: -0.045em; font-weight: 700; margin-bottom: 56px; }
.legal h2 { font-size: 24px; letter-spacing: -0.02em; font-weight: 600; margin: 48px 0 14px; padding-top: 24px; border-top: 1px solid var(--line); }
.legal p, .legal li { color: var(--bone-2); }
.legal p + p { margin-top: 10px; }
.legal a { color: var(--signal); }
.legal dl { display: grid; grid-template-columns: 200px 1fr; gap: 10px 20px; }
.legal dt { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding-top: 4px; }
.legal dd { color: var(--bone); }
@media (max-width: 600px) { .legal dl { grid-template-columns: 1fr; gap: 2px; } .legal dd { margin-bottom: 12px; } }

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav__clock { display: none; }
  .nav__burger {
    display: flex; flex-direction: column; justify-content: center; gap: 6px; margin-left: auto;
    width: 44px; height: 44px; background: none; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; align-items: center;
  }
  .nav__burger span { width: 16px; height: 1.5px; background: var(--bone); transition: transform 0.4s var(--ease); }
  .nav.is-open .nav__burger span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav.is-open .nav__burger span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav__links {
    position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; align-items: flex-start;
    padding: 0 var(--gutter); gap: 18px; background: var(--ink); font-size: 40px; font-weight: 600; letter-spacing: -0.03em;
    clip-path: inset(0 0 100% 0); transition: clip-path 0.7s var(--ease);
  }
  .nav.is-open .nav__links { clip-path: inset(0 0 0 0); }
  .nav.is-open { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: transparent; }
  .nav__cta { font-size: 18px; padding: 14px 24px; margin-top: 16px; }

  .hero { padding-top: 100px; }
  .hero__status { display: none; }
  .hero__scroll { display: none; }

  .svc { grid-template-columns: 1fr auto; gap: 14px 16px; padding: 28px 0; }
  .svc__num { grid-column: 1; padding: 0; }
  .svc__arrow { grid-column: 2; grid-row: 1; font-size: 22px; }
  .svc__title, .svc__body { grid-column: 1 / -1; }

  .process__pin { min-height: 0; padding: 90px 0; }
  .process__track { flex-direction: column; width: auto; }
  .step { width: 100%; min-height: 0; }
  .step__num { font-size: 72px; }

  .who__grid { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero__ctas, .hero__ctas .btn { width: 100%; }
  .who__grid li { padding: 20px; gap: 28px; }
  .form__row { grid-template-columns: 1fr; }
  .footer__top nav { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .statement__text .w { opacity: 1; }
}

/* ================= v3 : formulaire, honeypot, RGPD ================= */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--signal); flex: 0 0 auto; }
.consent a { color: var(--bone); text-decoration: underline; text-underline-offset: 3px; }
.cf-turnstile { min-height: 65px; }
.form__note.is-ok { color: #3ddc84; }
.form__note.is-error { color: #ff7a52; }
.form button[disabled] { opacity: 0.6; cursor: wait; }

/* ================= v3 : hypermotion ================= */

/* Barre de progression de lecture */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: var(--signal); box-shadow: 0 0 12px rgba(255, 90, 31, 0.7); }

/* Rideau de transition entre pages */
.curtain {
  position: fixed; inset: 0; z-index: 90; background: var(--signal);
  transform: scaleY(0); transform-origin: bottom; pointer-events: none;
}

/* Curseur personnalisé (souris uniquement, activé par JS) */
.cursor { position: fixed; top: 0; left: 0; z-index: 95; pointer-events: none; display: none; }
html.has-cursor .cursor { display: block; }
html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor label, html.has-cursor .svc { cursor: none; }
html.has-cursor input, html.has-cursor textarea, html.has-cursor select { cursor: text; }
.cursor__dot { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }
.cursor__ring {
  position: absolute; left: -20px; top: -20px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(237, 233, 224, 0.6); transition: width 0.35s var(--ease), height 0.35s var(--ease), left 0.35s var(--ease), top 0.35s var(--ease), background 0.35s, border-color 0.35s;
}
.cursor.is-hover .cursor__ring { left: -34px; top: -34px; width: 68px; height: 68px; background: rgba(255, 90, 31, 0.12); border-color: var(--signal); }
.cursor.is-down .cursor__ring { transform: scale(0.8); }

/* Bouton magnétique : le transform est piloté par GSAP */
.btn, .nav__cta { will-change: transform; }

/* Cartes services : légère inclinaison 3D */
.card-tilt { transform-style: preserve-3d; }
.step { transform-style: preserve-3d; }

/* Titres : mots qui apparaissent un par un */
.split-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split-word > span { display: inline-block; }

/* Pied de page : entrée au scroll */
.footer__top, .footer__word { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .curtain, .progress { display: none; }
}

/* ---------- Hypermotion : détails visuels ---------- */
.draw-rule { display: block; height: 1px; width: 100%; background: linear-gradient(90deg, var(--signal), transparent); transform-origin: left center; margin-top: 22px; }

.spot { position: relative; isolation: isolate; }
.spot::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 90, 31, 0.14), transparent 60%);
  opacity: 0; transition: opacity 0.4s;
}
.spot:hover::after { opacity: 1; }

.btn { position: relative; overflow: hidden; }
.btn::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg); transition: left 0.7s var(--ease); pointer-events: none;
}
.btn:hover::before { left: 120%; }

.form label:focus-within > span { color: var(--signal); transition: color 0.3s; }

/* Case de consentement : ne plus hériter du style des champs texte */
.form .consent { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; }
.form .consent > span { display: block; margin: 0; color: var(--muted); line-height: 1.5; }
.form .consent input[type="checkbox"] {
  width: 18px; height: 18px; min-width: 18px; margin: 3px 0 0; padding: 0;
  border: 1px solid var(--line); border-radius: 3px; background: transparent; accent-color: var(--signal);
}
