/* ============================================================
   Florian Dalmolin — Site vitrine
   Design system : éditorial premium, 3 ambiances basculables
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { min-height: 100vh; text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ---------- Theme tokens ---------- */
:root {
  --accent: #243f8f;          /* set/overridden by Tweaks */
  --accent-ink: #ffffff;      /* readable text on accent */
  --font-display: "Instrument Serif", Georgia, serif;
  --font-sans: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --maxw: 70%;
  --gut: clamp(20px, 5vw, 80px);
  --mq-h: 40px; /* hauteur fixe du bandeau défilant */
  --hero-gap: clamp(36px, 12vh, 127px); /* espace hero → bandeau, rétrécit sur petits écrans */
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* Sombre premium (défaut) */
:root, :root[data-theme="dark"] {
  --bg:        #0b0c10;
  --bg-2:      #0f1116;
  --surface:   #14161d;
  --surface-2: #191c24;
  --text:      #ece8e1;
  --text-soft: #b9b7b1;
  --muted:     #7d7f8a;
  --line:      rgba(255,255,255,.10);
  --line-2:    rgba(255,255,255,.16);
  --glow:      .55;
  --shadow:    0 30px 80px -30px rgba(0,0,0,.8);
  color-scheme: dark;
}

/* Clair minimal */
:root[data-theme="light"] {
  --bg:        #fbfbf8;
  --bg-2:      #f4f3ee;
  --surface:   #ffffff;
  --surface-2: #f6f5f1;
  --text:      #16171c;
  --text-soft: #3f4048;
  --muted:     #84858d;
  --line:      rgba(15,16,20,.12);
  --line-2:    rgba(15,16,20,.2);
  --glow:      .22;
  --shadow:    0 30px 70px -34px rgba(20,22,30,.3);
  color-scheme: light;
}

/* Éditorial chaleureux */
:root[data-theme="warm"] {
  --bg:        #f3efe6;
  --bg-2:      #ece6d8;
  --surface:   #fbf8f1;
  --surface-2: #f2ede2;
  --text:      #2a2620;
  --text-soft: #5a5247;
  --muted:     #908676;
  --line:      rgba(42,38,32,.14);
  --line-2:    rgba(42,38,32,.24);
  --glow:      .3;
  --shadow:    0 30px 70px -34px rgba(60,48,32,.32);
  color-scheme: light;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  transition: background .5s var(--ease), color .5s var(--ease);
  overflow-x: hidden;
}

/* ---------- Type system ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -0.015em;
}
/* Sans-serif heading mode (Tweak) */
:root[data-type="sans"] .display {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.serif-em { font-style: italic; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: var(--gut); }
section { position: relative; }
.section-pad { padding-block: clamp(80px, 12vh, 160px); }
/* Ajustements d'espacement entre sections */
#services { padding-bottom: clamp(40px, 6vh, 80px); }   /* ÷2 avant Méthode */
#method   { padding-top:    clamp(40px, 6vh, 80px);
            padding-bottom: clamp(56px, 8.4vh, 112px); } /* -30% avant Réalisations */
#work     { padding-top:    clamp(56px, 8.4vh, 112px); }
.divider { border: 0; border-top: 1px solid var(--line); }

.sect-meta {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 30px;
}
.sect-meta .num {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .1em;
  color: var(--accent);
}
.sect-meta .lbl {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--muted);
}
.sect-meta .rule { flex: 1; height: 1px; background: var(--line); }

/* ---------- Buttons ---------- */
.btn {
  --b-bg: color-mix(in oklab, var(--accent) 58%, #000); --b-fg: var(--accent-ink);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14.5px; font-weight: 600; letter-spacing: .01em;
  background: var(--b-bg); color: var(--b-fg); cursor: pointer;
  position: relative; overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px color-mix(in oklab, var(--accent) 70%, transparent); }

/* Envoi verrouillé + info-bulle curseur */
.btn-lock { display: inline-flex; position: relative; cursor: not-allowed; }
.btn-lock .btn { pointer-events: none; opacity: .55; filter: saturate(.4); box-shadow: none; }
.cursor-tip {
  position: fixed; top: 0; left: 0; z-index: 999;
  width: min(280px, 72vw);
  background: #ffffff; color: #26272e;
  border-radius: 14px; padding: 15px 17px 16px;
  font-size: 13.5px; line-height: 1.5;
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.5);
  opacity: 0; visibility: hidden;
  transition: opacity .25s var(--ease), visibility .25s;
  pointer-events: none;
  will-change: transform;
}
.cursor-tip.on { opacity: 1; visibility: visible; }
.cursor-tip strong {
  display: block; margin-bottom: 6px;
  font-family: var(--font-display); font-weight: 400; font-style: italic;
  font-size: 17px; letter-spacing: .01em;
}
.btn:active { transform: translateY(0); }
.btn .arr { transition: transform .35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn.ghost {
  --b-bg: transparent; --b-fg: var(--text);
  border-color: var(--line-2);
}
.btn.ghost:hover { background: var(--surface); box-shadow: none; border-color: var(--accent); }

/* link with sweep underline */
.lk { position: relative; display: inline-flex; align-items: center; gap: 8px;
  color: var(--text); font-weight: 500; }
.lk::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -3px;
  height: 1.5px; background: var(--accent); transition: right .4s var(--ease); }
.lk:hover::after { right: 0; }
.lk .arr { transition: transform .35s var(--ease); color: var(--accent); }
.lk:hover .arr { transform: translate(3px,-3px); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 100;
  width: calc(80% + 10px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0;
  will-change: width;
}
.nav::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -90px; right: -90px;
  z-index: -1; pointer-events: none;
  /* White fill + bottom border fade in over 1.5s the moment the page is scrolled (--nav-bg flips via .scrolled) */
  background-color: rgb(from var(--bg) r g b / calc(var(--nav-tint, 1) * var(--nav-bg, 0)));
  border-bottom: 1px solid rgb(214 214 209 / var(--nav-bg, 0));
  transition: background-color 0.9s ease-in-out, border-color 0.9s ease-in-out, backdrop-filter .6s;
  /* Solid across the whole bar (over the text), fading to transparent only in
     the 90px tails that extend BEYOND the bar's left/right edges. */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 90px, #000 calc(100% - 90px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 90px, #000 calc(100% - 90px), transparent 100%);
}
.nav.scrolled { --nav-bg: 1; }
.nav.scrolled::before {
  backdrop-filter: blur(2.5px) saturate(115%);
  -webkit-backdrop-filter: blur(2.5px) saturate(115%);
}
/* Scroll progress: a crisp blue fill along the bottom edge of the bar */
.nav-progress { position: absolute; left: calc((100% - 100vw) / 2); right: 0; bottom: -1px; height: 1px;
  z-index: 3; pointer-events: none; overflow: hidden;
  opacity: 0; transition: opacity .45s var(--ease); }
.nav-progress.show { opacity: 1; }
.nav-progress-fill { display: block; height: 100%; width: var(--scroll-progress, 0%);
  background: #0B1941; }
.nav-left { display: flex; align-items: center; gap: 0; }
.info-btn { position: relative; display: flex; align-items: center;
  flex-shrink: 0; margin-right: 13px;
  transition: margin-right .35s var(--ease); }
.info-dot {
  width: 18px; height: 18px; flex-shrink: 0;
  display: grid; place-items: center; overflow: hidden;
  border-radius: 50%; border: 1px solid var(--line-2);
  color: var(--muted); background: transparent;
  font-family: var(--font-display); font-style: italic;
  font-size: 11px; line-height: 1;
  transition: color .25s, border-color .25s, background .3s,
    width .35s var(--ease), opacity .25s var(--ease);
}
.info-btn:hover .info-dot {
  color: var(--accent); border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 9%, transparent);
}
/* Fades out ~one scroll step down — keeps its space so the brand never shifts */
.nav.info-gone .info-btn { pointer-events: none; }
.nav.info-gone .info-dot { opacity: 0; }

/* Hover tooltip — same card as the menu links, but on a black ground */
.info-btn .navtip {
  position: absolute; top: calc(100% + 13px); left: 0;
  transform: translateY(-6px);
  width: auto; white-space: nowrap;
  background: #0e0f13; color: #ffffff;
  font-family: var(--font-display); font-size: 16px; font-weight: 400;
  letter-spacing: .01em; text-transform: none; line-height: 1;
  padding: 9px 14px; border-radius: 9px;
  border: 1px solid rgba(255,255,255,.09);
  opacity: 0; pointer-events: none; z-index: 7;
  box-shadow: 0 14px 34px rgba(0,0,0,.4);
  transition: opacity .22s var(--ease), transform .32s var(--ease);
}
.info-btn .navtip::before {
  content: ""; position: absolute; bottom: 100%; left: 12px;
  border: 7px solid transparent; border-bottom-color: #0e0f13;
}
.info-btn:hover .navtip { opacity: 1; transform: translateY(0); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 400;
  letter-spacing: -0.01em; }
.brand .mark {
  width: var(--mark-size, 38px); height: var(--mark-size, 38px); border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-family: var(--font-display); font-size: 19px;
  color: var(--accent); letter-spacing: -.04em;
}
.brand .mark img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.brand .bname-wrap { display: flex; flex-direction: column; justify-content: center; }
.brand .bname { font-size: 15px; line-height: 1.1; }
.brand .brole { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); display: block; margin-top: 3px;
  overflow: hidden; }
.nav-links { display: flex; align-items: center; gap: 26px; flex-shrink: 0; }
.nav-links a { font-family: var(--font-mono); font-size: var(--menu-size, 16.5px);
  font-weight: var(--menu-weight, 400); letter-spacing: .17em; white-space: nowrap; flex-shrink: 0;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--muted) 58%, var(--text-soft)); position: relative; transition: color .25s, transform .35s var(--ease); }
.nav-links a:has(~ a:hover) { transform: translateX(-8px); }
.nav-links a[data-num]::before {
  content: attr(data-num);
  position: absolute; right: calc(100% + .35em); bottom: calc(var(--menu-size, 22px) * 0.14);
  font-family: var(--font-mono); color: var(--accent);
  font-size: max(9.5px, .48em); font-weight: 500; letter-spacing: .04em;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transform: translateX(-5px);
  transition: opacity .3s var(--ease), transform .35s var(--ease);
}
.nav-links a:hover[data-num]::before {
  opacity: 1; transform: translateX(0);
}
/* At the very top (scroll 0), numbers sit 2px lower than before */
.nav:not(.scrolled) .nav-links a[data-num]::before {
  bottom: calc(var(--menu-size, 22px) * 0.14);
}
.nav-links a::after { content:""; position:absolute; left:0; bottom:-4px; width:0; height:1.5px;
  background: var(--accent); transition: width .3s var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
/* Hover tooltip card under each menu link */
.nav-links a .navtip {
  position: absolute; top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: 300px; max-width: 78vw;
  background: #ffffff; color: #1c1d22;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 400;
  letter-spacing: 0; text-transform: none; white-space: normal;
  text-align: left; line-height: 1.5;
  padding: 16px 18px; border-radius: 12px;
  border: 1px solid rgba(0,0,0,.06);
  opacity: 0; pointer-events: none; z-index: 6;
  box-shadow: 0 18px 44px rgba(0,0,0,.20);
  transition: opacity .25s var(--ease), transform .3s var(--ease);
  transition-delay: 0s;
}
.nav-links a .navtip strong {
  display: block; margin-bottom: 7px;
  font-family: var(--font-display); font-weight: 400;
  font-size: 17px; line-height: 1.2; color: var(--accent);
}
.nav-links a .navtip::before {
  content: ""; position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent; border-bottom-color: #ffffff;
}
.nav-links a:hover .navtip {
  opacity: 1; transform: translateX(-50%) translateY(0);
  transition: opacity 0.7s cubic-bezier(.62, .02, .34, 1), transform 0.7s cubic-bezier(.62, .02, .34, 1);
  transition-delay: 0s;
}
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-cta { padding: var(--cta-py, 10px) var(--cta-px, 18px); font-size: var(--cta-fs, 13.5px); }
.menu-btn { display: none; background: none; border: 0; cursor: pointer; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding-top: 150px; padding-bottom: 24px;
  display: flex; flex-direction: column; justify-content: center;
  /* hero + gap + bandeau = 100vh : image plein écran ET bandeau visible.
     Le centrage flex absorbe le surplus ; max-content empêche l'écrasement. */
  height: calc(100vh - var(--hero-gap) - var(--mq-h));
  height: calc(100svh - var(--hero-gap) - var(--mq-h));
  min-height: max-content; }
@media (max-height: 780px) {
  .hero { padding-top: 104px; }
}
.hero-bg {
  position: absolute; top: 0; bottom: calc(-1 * var(--hero-gap)); left: 50%; transform: translateX(-50%);
  width: 100vw; z-index: 0; pointer-events: none;
  background:
    linear-gradient(100deg,
      var(--bg) 0%,
      var(--bg) 24%,
      color-mix(in oklab, var(--bg) 70%, transparent) 42%,
      color-mix(in oklab, var(--bg) 20%, transparent) 56%,
      transparent 68%),
    url("assets/fond.png") center / cover no-repeat;
}

.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr; gap: clamp(30px, 5vw, 72px);
  align-items: center;
}
.hero-copy { max-width: 640px; }
.hero-aside { display: none; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
  position: relative; top: -24px; }
.hero-eyebrow .eyebrow { font-family: var(--font-sans); text-transform: none;
  letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--text-soft); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #46d17e;
  box-shadow: 0 0 0 0 rgba(70,209,126,.55); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(70,209,126,.5);}
  70%{box-shadow:0 0 0 9px rgba(70,209,126,0);} 100%{box-shadow:0 0 0 0 rgba(70,209,126,0);} }
.hero h1 { font-size: clamp(44px, 6.2vw, 80px); margin-bottom: 28px; }
.hero h1 .l2 { color: var(--accent); }
.hero p.lede { font-family: var(--font-display); font-style: italic;
  font-size: clamp(21px,2.1vw,28px); line-height: 1.3; color: var(--text-soft);
  max-width: 30ch; margin-bottom: 38px; }
.hero p.lede::before { content: ""; display: block; width: 40px; height: 1px;
  background: var(--accent); opacity: .55; margin-bottom: 20px; }
.hero p.lede .lede-em { color: var(--accent); font-style: italic;
  white-space: nowrap; }
.hero-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

/* hero aside (info column, replaces portrait) */
.hero-aside {
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow);
  padding: 8px 26px 30px;
}
.ha-row { display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.ha-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); }
.ha-v { font-size: 14.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 9px;
  text-align: right; }
.ha-v .av { width: 8px; height: 8px; border-radius: 50%; background: #46d17e;
  box-shadow: 0 0 0 0 rgba(70,209,126,.55); animation: pulse 2.4s infinite; flex-shrink: 0; }
.ha-stat { padding-top: 26px; }
.ha-num { display: block; font-size: clamp(46px, 6vw, 72px); color: var(--accent);
  line-height: 1; margin-bottom: 12px; }
.ha-lbl { font-size: 14.5px; color: var(--text-soft); line-height: 1.4; }

/* marquee strip */
.marquee { border-block: 1px solid var(--line); overflow: hidden;
  height: var(--mq-h); display: flex; align-items: center;
  background: var(--bg-2); margin-top: var(--hero-gap); }
.marquee-track { display: flex; gap: 34px; white-space: nowrap; width: max-content;
  will-change: transform; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee span { font-family: var(--font-display); font-size: 15.3px;
  font-style: normal; font-weight: 400; letter-spacing: 0; color: var(--text-soft);
  display: inline-flex; align-items: center; gap: 34px; }
.marquee span::after { content: "✦"; font-size: 10px; color: var(--accent);
  font-style: normal; }
.marquee .mq-link { pointer-events: auto; }
.marquee .mq-link a { color: inherit; text-decoration: none; border: 0; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px,5vw,80px);
  align-items: start; }
.about h2 { font-size: clamp(30px,3.6vw,52px); margin-bottom: 24px; }
.about .body-lg { font-size: 18px; color: var(--text-soft); margin-bottom: 18px; }
.about .body-lg strong { color: var(--text); font-weight: 600; }
.values { list-style: none; margin-top: 36px; display: grid; gap: 2px; }
.values li { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: baseline;
  padding: 20px 0; border-top: 1px solid var(--line); }
.values li:last-child { border-bottom: 1px solid var(--line); }
.values .vk { font-family: var(--font-mono); font-size: 12px; color: var(--accent);
  letter-spacing: .08em; }
.values .vt { font-weight: 600; font-size: 16px; }
.values .vd { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.signature { font-family: var(--font-display); font-size: 30px; margin-top: 10px;
  color: var(--text); opacity: .9; transform: rotate(-3deg); display: inline-block; }
.about-sketch { display: block; margin-top: 28px; max-width: 380px; }
.about-sketch img { width: 100%; height: auto; display: block; mix-blend-mode: multiply; }
:root[data-theme="dark"] .about-sketch img { mix-blend-mode: normal; filter: invert(1) brightness(1.1); }

/* ============================================================
   SERVICES
   ============================================================ */
.services-head { display: flex; justify-content: space-between; align-items: flex-end;
  gap: 30px; flex-wrap: wrap; margin-bottom: 50px; }
.services-head h2 { font-size: clamp(32px,4.4vw,62px); }
.services-head h2 .nowrap-line { white-space: nowrap; }
#services .services-head, #method .services-head { flex-direction: column; align-items: flex-start; gap: 14px; }
.services-head p { color: var(--muted); max-width: 46ch; text-wrap: balance;
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(15px,1.5vw,19px); line-height: 1.4; letter-spacing: .005em;
  opacity: .92; }
.svc-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; width: 90%; }
.svc {
  position: relative; padding: 34px 32px 36px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); text-align: center;
  overflow: hidden; transition: transform .45s var(--ease), border-color .45s, background .45s;
}
.svc::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px;
  background: var(--accent); transform: scaleY(0); transform-origin: top;
  transition: transform .45s var(--ease); }
.svc:hover { transform: translateY(-5px); border-color: var(--line-2); background: var(--surface-2); }
.svc:hover::before { transform: scaleY(1); }
.svc .svc-n { font-family: var(--font-mono); font-size: 12px; color: var(--accent);
  letter-spacing: .12em; }
.svc h3 { font-size: 23px; font-weight: 600; margin: 14px 0 12px; letter-spacing: -.01em; }
.svc .svc-d { color: var(--text-soft); font-size: 15.5px; margin-bottom: 20px; }
.svc ul { list-style: none; display: grid; gap: 9px; }
.svc li { font-size: 14.5px; color: var(--muted); }
.svc-star { color: #cf3a2e; font-size: .75em; font-weight: 600;
  margin-left: 2px; vertical-align: super; }
.svc-note { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  font-family: var(--font-display); font-style: italic; font-size: 13px;
  line-height: 1.35; color: var(--muted); opacity: .85; }
.svc-note .star { color: #cf3a2e; font-style: normal; font-weight: 700; margin-right: 3px; }

/* Services cards: slide in from the two sides (left column from left, right from right) */
.svc-grid[data-stagger] > * { opacity: 0; transform: translateX(-70px);
  transition: opacity 1.7s var(--ease), transform 1.7s var(--ease); }
.svc-grid[data-stagger] > *:nth-child(even) { transform: translateX(70px); }
.svc-grid[data-stagger].in > * { opacity: 1; transform: none; }
.svc-grid[data-stagger].in > *:nth-child(2) { transition-delay: .2s; }
.svc-grid[data-stagger].in > *:nth-child(3) { transition-delay: .32s; }
.svc-grid[data-stagger].in > *:nth-child(4) { transition-delay: .48s; }

/* ============================================================
   PROCESS
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 0;
  border-top: 1px solid var(--line); margin-top: 0; } /* tête → contenu : 50px partout */
.step { padding: 34px 28px 34px 0; border-right: 1px solid var(--line); position: relative; }
.step:last-child { border-right: 0; }
.step .sn { font-family: var(--font-display); font-size: 56px; color: var(--accent);
  line-height: 1; opacity: .9; }
.step h4 { font-size: 19px; font-weight: 600; margin: 20px 0 10px; }
.step p { font-size: 14.5px; color: var(--muted); padding-right: 14px; }
.step .tick { position: absolute; top: -1px; left: 0; width: 0; height: 2px;
  background: var(--accent); transition: width .8s var(--ease); }
.step.in .tick { width: 60%; }

/* ============================================================
   WORK
   ============================================================ */
.work-head { display:flex; flex-direction: column; align-items: flex-start;
  gap: 14px; flex-wrap: wrap; margin-bottom: 50px; } /* = marge du bloc 01/Services */
.work-head h2 { font-size: clamp(32px,4.4vw,62px); }
.work-head-lede { color: var(--muted); font-family: var(--font-display);
  font-style: italic; font-weight: 400; font-size: clamp(15px,1.5vw,19px);
  line-height: 1.4; letter-spacing: .005em; opacity: .92;
  max-width: 46ch; }
.project { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(26px,4vw,56px);
  align-items: center; }
a.browser { display: block; }
/* Réalisations — deux cartes côte à côte */
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px,4vw,52px);
  align-items: start; }
.work-grid .project { display: flex; flex-direction: column; gap: 22px;
  grid-template-columns: none; text-align: left; }
.browser-shot { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.project-solo { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.project-solo .meta { max-width: 60ch; }
.project-solo .chips { justify-content: center; }
.browser {
  border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2);
  background: var(--surface); box-shadow: var(--shadow);
  transition: transform .5s var(--ease);
}
.project:hover .browser { transform: translateY(-6px) scale(1.005); }
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.browser-bar .url { margin-left: 12px; font-family: var(--font-mono); font-size: 11px;
  color: var(--muted); background: var(--bg-2); padding: 4px 12px; border-radius: 6px;
  border: 1px solid var(--line); }
.browser image-slot { display:block; width: 100%; aspect-ratio: 16/9; }
.project .meta .tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); }
.project .meta h3 { font-size: clamp(26px,3vw,38px); margin: 14px 0 16px;
  font-family: var(--font-display); font-weight: 400; line-height: 1.05; }
.project .meta p { color: var(--text-soft); margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.chip { font-size: 12.5px; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(34px,5vw,72px); }
.contact h2 { font-size: clamp(36px,5vw,72px); margin-bottom: 22px; }
.contact .sub { color: var(--muted); font-family: var(--font-display);
  font-style: italic; font-weight: 400; font-size: clamp(15px,1.5vw,19px);
  line-height: 1.4; letter-spacing: .005em; opacity: .92;
  max-width: 32ch; margin-bottom: 36px; }
.contact-cards { display: grid; gap: 12px; }
.contact-sketch { margin-top: 4px; }
.contact-sketch img { width: 100%; height: auto; display: block;
  mix-blend-mode: multiply; }
:root[data-theme="dark"] .contact-sketch img { mix-blend-mode: normal; filter: invert(1) brightness(1.1); }
.cc { display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  border-radius: 13px; border: 1px solid var(--line); background: var(--surface);
  transition: border-color .3s, transform .3s var(--ease), background .3s; }
.cc:hover { border-color: var(--accent); transform: translateX(4px); background: var(--surface-2); }
.cc .ci { width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--accent); }
.cc .ck { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); }
.cc .cv { font-size: 15.5px; font-weight: 500; margin-top: 2px; }
.cc .arr { margin-left: auto; color: var(--muted); transition: transform .3s var(--ease), color .3s; }
.cc:hover .arr { transform: translateX(3px); color: var(--accent); }

form { display: grid; gap: 16px; padding: clamp(26px,3vw,40px);
  border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.field { display: grid; gap: 7px; }
.field.row2 { grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); }
.field label .opt { color: var(--line-2); text-transform: none; letter-spacing: 0; }
.input { width: 100%; padding: 13px 15px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text); font-size: 15px; transition: border-color .25s, background .25s; }
.input::placeholder { color: var(--muted); opacity: .7; }
.input:focus { outline: none; border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 6%, var(--bg-2)); }
.input:disabled { opacity: .5; cursor: not-allowed;
  background: var(--bg-2); border-color: var(--line); }
.field.is-disabled label { opacity: .5; }
textarea.input { resize: vertical; min-height: 110px; }
select.input { appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23888' d='M0 0h12L6 8z'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
form .btn { justify-content: center; margin-top: 6px; }
.form-note { font-size: 12.5px; color: var(--muted); text-align: center; }

/* Project-type checkbox group */
.checkgroup { display: grid; gap: 10px; margin-top: 1px; }
.checkrow { display: grid; gap: 10px; }
.checkrow-3 { grid-template-columns: 1fr 1fr auto; }
.checkrow-2 { grid-template-columns: repeat(2, 1fr); }
.checkopt { position: relative; display: flex; align-items: center; gap: 9px;
  padding: 11px 12px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--bg-2); cursor: pointer;
  transition: border-color .25s, background .25s, opacity .3s var(--ease); }
.checkopt:hover { border-color: var(--line-2); }
.checkopt input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.checkopt .cbox { width: 17px; height: 17px; border-radius: 6px; flex-shrink: 0;
  border: 1.5px solid var(--line-2); background: var(--surface);
  display: grid; place-items: center;
  transition: border-color .2s, background .2s; }
.checkopt .cbox::after { content: ""; width: 5px; height: 9px; margin-top: -2px;
  border: 2px solid var(--accent-ink); border-top: 0; border-left: 0;
  transform: rotate(45deg) scale(0); transition: transform .2s var(--ease); }
.checkopt input:checked ~ .cbox { background: var(--accent); border-color: var(--accent); }
.checkopt input:checked ~ .cbox::after { transform: rotate(45deg) scale(1); }
.checkopt .ctxt { font-family: var(--font-sans); font-size: 14px; font-weight: 400;
  letter-spacing: 0; text-transform: none; color: var(--text-soft); line-height: 1.25; }
.checkopt:has(input:checked) { border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 7%, var(--bg-2)); }
.checkopt:has(input:checked) .ctxt { color: var(--text); }
.checkopt.is-locked { opacity: .4; cursor: not-allowed; pointer-events: none; }
.checkopt.is-locked .cbox { border-color: var(--line); }
@media (max-width: 1680px) { .checkrow-3 { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .checkrow-2 { grid-template-columns: 1fr; } }

/* ============================================================
   FOOTER
   ============================================================ */
.foot { border: 1px solid var(--line); border-radius: 16px 16px 0 0;
  background: var(--bg-2); width: 70%; margin-inline: auto; }
.foot .wrap { max-width: 100%; }
.foot-top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 40px;
  padding-block: 64px 48px; }
@media (max-width: 1024px) {
  .foot-top { grid-template-columns: repeat(4, 1fr); }
  .foot-top > div:first-child { grid-column: 1 / -1; margin-bottom: 4px; }
}
.foot .big { font-family: var(--font-display); font-size: clamp(30px,4vw,52px);
  line-height: 1.04; max-width: 26ch; text-wrap: balance; }
.foot .big a { color: var(--accent); }
.foot-col h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.foot-col a { display: block; color: var(--text-soft); font-size: 15px; padding: 6px 0;
  transition: color .25s, padding-left .25s; }
.foot-col a:hover { color: var(--accent); padding-left: 5px; }
.foot-linkedin { display: flex !important; align-items: center; gap: 8px; }
.foot-linkedin .li-icon { flex: none; opacity: .85; }
.article-eyebrow a.tag { text-decoration: none; }
.article-eyebrow a.tag:hover { text-decoration: underline; text-underline-offset: 2px; }
.foot-bot { display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap; padding-block: 26px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted); }

/* ============================================================
   BACK TO TOP (floating arrow)
   ============================================================ */
.to-top {
  position: fixed; right: clamp(18px, 3vw, 36px); bottom: clamp(18px, 3vw, 36px);
  z-index: 90;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in oklab, var(--accent) 58%, #000);
  color: #fff; border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent);
  cursor: pointer; box-shadow: 0 16px 38px -14px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(120px); pointer-events: none;
  transition: background .3s, box-shadow .3s;
}
.to-top svg { transition: transform .3s var(--ease); }
.to-top:hover { box-shadow: 0 20px 44px -12px color-mix(in oklab, var(--accent) 60%, transparent); }
.to-top:hover svg { transform: translateY(-3px); }
.to-top:active svg { transform: translateY(-1px); }

/* ============================================================
   Reveal animations
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px);
  transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
[data-stagger] > * { opacity: 0; transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease); }
[data-stagger].in > * { opacity: 1; transform: none; }
[data-stagger].in > *:nth-child(2){ transition-delay:.08s; }
[data-stagger].in > *:nth-child(3){ transition-delay:.16s; }
[data-stagger].in > *:nth-child(4){ transition-delay:.24s; }
[data-stagger].in > *:nth-child(5){ transition-delay:.32s; }

/* Hero load reveal */
.hl { opacity: 0; transform: translateY(28px); }
.loaded .hl { animation: heroIn 1s var(--ease) forwards; }
.loaded .hl.d1 { animation-delay: .1s; }
.loaded .hl.d2 { animation-delay: .22s; }
.loaded .hl.d3 { animation-delay: .34s; }
.loaded .hl.d4 { animation-delay: .46s; }
.loaded .hl.portrait-frame { animation: heroImg 1.2s var(--ease) .2s forwards; }
@keyframes heroIn { to { opacity: 1; transform: none; } }
@keyframes heroImg { from{ opacity:0; transform: translateY(34px) scale(.97);} to{ opacity:1; transform:none;} }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal, [data-stagger] > *, .hl { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (min-width: 1920px) {
  /* Au-delà de 1080p : le bloc de contenu continue de s'élargir,
     mais deux fois moins vite (70% → 35% du surplus, 80% → 40%). */
  :root { --maxw: calc(1344px + (100vw - 1920px) * 0.35); }
  .nav { width: calc(1546px + (100vw - 1920px) * 0.4); }
  .foot { width: var(--maxw); }
}
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding-top: 130px; }
  .hero-aside { max-width: 460px; }
  .about-grid, .contact-grid, .project { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; gap: clamp(40px,7vw,72px); }
  .project .browser { order: -1; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); padding-right: 0; }
  .step:nth-child(odd){ border-right: 1px solid var(--line); padding-right: 24px; }
}
@media (max-width: 680px) {
  :root { --maxw: 90%; }
  .nav { width: 90%; }
  .foot { width: 92%; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .menu-btn { display: grid; }
  .svc-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step, .step:nth-child(odd){ border-right: 0; }
  .field.row2 { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .brand .bname-wrap { display: none; }
}

/* Mobile menu overlay */
.mobile-menu { position: fixed; inset: 0; z-index: 200; display: none;
  flex-direction: column; padding: 90px var(--gut) 40px;
  background: color-mix(in oklab, var(--bg) 96%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.mobile-menu.open { display: flex; }
.mobile-menu a { font-family: var(--font-display); font-size: 38px; padding: 16px 0;
  border-bottom: 1px solid var(--line); }
.mobile-menu .mclose { position: absolute; top: 26px; right: var(--gut);
  background: none; border: 0; cursor: pointer; }
