/* ============================================================
   Tom Giles — portfolio
   Noir intégral, mise en scène au scroll. Un accent teal, un accent
   indigo pour les dégradés, ambre/rouge réservés aux incidents.
   ============================================================ */

:root {
  color-scheme: dark;

  --bg:          #000000;
  --bg-2:        #050506;
  --surface:     #0A0A0B;
  --surface-2:   #111113;
  --ink:         #F5F5F7;
  --ink-2:       #A1A1A6;
  --ink-3:       #6E6E73;
  --line:        rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --accent:      #34D3C2;
  --accent-ink:  #7FE8DC;
  --accent-soft: rgba(52, 211, 194, .10);
  --accent-2:    #8A9BFF;
  --warn:        #FFB547;
  --danger:      #FF5D6C;
  --glow:        rgba(52, 211, 194, .14);
  --grad:        linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);

  --display: "Bricolage Grotesque", "Geist", system-ui, sans-serif;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 56px);
  --radius: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --boot: 0s;
}
html.booting { --boot: 1.5s; }

/* ---------- reset ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .05;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
code, kbd { font-family: var(--mono); font-size: .88em; }
code { padding: .1em .4em; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); }
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: .05em .45em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  font-size: .75em;
  text-align: center;
  color: var(--ink-2);
}
::selection { background: var(--accent); color: #000; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 300;
  padding: .6rem 1rem;
  background: var(--accent);
  color: #000;
  border-radius: 10px;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); }
.dim { color: var(--ink-3); }

em { font-style: normal; }
.section__title em, .contact__title em, .num__value {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- écran de démarrage ---------- */

.boot {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-content: center;
  gap: 1.5rem;
  background: #000;
  font-family: var(--mono);
  font-size: .85rem;
  color: var(--ink-3);
  animation: bootOut .6s var(--ease) 1.3s forwards;
}
.boot__lines p { margin: 0; opacity: 0; animation: bootLine .01s linear forwards; animation-delay: calc(var(--i) * 230ms + 100ms); }
.boot__lines p::first-letter { color: var(--accent); }
.boot__bar { width: 260px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.boot__bar i { display: block; height: 100%; width: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); animation: bootBar 1.1s var(--ease) forwards; }
@keyframes bootLine { to { opacity: 1; } }
@keyframes bootBar { to { transform: none; } }
@keyframes bootOut { to { opacity: 0; visibility: hidden; } }

/* ---------- curseur ---------- */

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 240;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: difference;
  opacity: 0;
  transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), opacity .3s, background .3s, border-color .3s;
}
.cursor i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: #fff;
}
.cursor.on { opacity: 1; }
.cursor.hover { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: #fff; border-color: #fff; }
.cursor.hover i { opacity: 0; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- progression ---------- */

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 90;
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  background: var(--grad);
}

/* ---------- barre du haut ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, transform .45s var(--ease);
}
.topbar.scrolled {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-bottom-color: var(--line);
}
.topbar.hide { transform: translateY(-100%); }
.topbar__inner { display: flex; align-items: center; gap: 1rem; height: 4.25rem; }
.logo { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--mono); font-size: .9rem; font-weight: 500; white-space: nowrap; }
.logo__mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--accent);
  font-weight: 700;
  font-size: .85rem;
}
.nav { display: flex; gap: .25rem; margin-left: auto; }
.nav a {
  position: relative;
  padding: .45rem .8rem;
  border-radius: 999px;
  font-size: .9rem;
  color: var(--ink-2);
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.nav a[aria-current="true"] { color: var(--ink); }
.nav a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: .15rem;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
}
.tools { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.nav + .tools { margin-left: .5rem; }
.chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  height: 2.25rem;
  padding: 0 .75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .03);
  transition: color .2s, border-color .2s;
}
.chip-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.chip-btn[aria-current="true"] { color: var(--accent); border-color: rgba(52, 211, 194, .4); }
.chip-btn svg { width: 15px; height: 15px; }
.chip-btn svg[fill="currentColor"] { width: 13px; height: 13px; }
.chip-btn--icon { width: 2.25rem; padding: 0; }
.chip-btn--icon .mono { color: var(--accent); font-size: .72rem; }
.menu-btn { display: none; }

@media (max-width: 900px) {
  .nav {
    position: fixed;
    inset: 4.25rem 0 auto 0;
    flex-direction: column;
    gap: 0;
    padding: .75rem var(--gutter) 1.25rem;
    background: #000;
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%);
    transition: transform .4s var(--ease);
  }
  .nav.open { transform: none; }
  .topbar:has(.nav.open) { background: #000; border-bottom-color: var(--line); }
  .nav a { padding: .9rem 0; font-family: var(--display); font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav a:hover { background: none; }
  .nav a[aria-current="true"]::after { display: none; }
  .tools, .nav + .tools { margin-left: auto; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 520px) { .logo__text { display: none; } }

/* ---------- boutons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  height: 3.1rem;
  padding: 0 1.45rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  white-space: nowrap;
  transition: transform .3s var(--ease), background .2s, border-color .2s, box-shadow .3s;
  will-change: transform;
}
.btn svg { width: 17px; height: 17px; transition: transform .25s var(--ease); }
.btn svg[fill="currentColor"] { width: 15px; height: 15px; }
.btn:hover svg:not([fill="currentColor"]) { transform: translateX(3px); }
.btn--primary { background: var(--ink); color: #000; }
.btn--primary:hover { background: var(--accent); box-shadow: 0 0 60px -10px var(--accent); }
.btn--ghost { border: 1px solid var(--line-strong); color: var(--ink); background: rgba(255, 255, 255, .03); backdrop-filter: blur(8px); }
.btn--ghost:hover { border-color: var(--ink-3); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 640px;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 10%, transparent 75%);
}
.hero::after {
  /* vignette : le texte reste lisible par-dessus le cluster */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 42% 38% at 50% 50%, rgba(0, 0, 0, .8), transparent 72%),
    linear-gradient(transparent 70%, #000);
}
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5rem var(--gutter) 3rem;
  text-align: center;
  pointer-events: none;
  transform: translateY(calc(var(--hp, 0) * -80px)) scale(calc(1 - var(--hp, 0) * .12));
  opacity: calc(1 - var(--hp, 0) * 1.6);
  will-change: transform, opacity;
}
.hero__inner a, .hero__inner button { pointer-events: auto; }

.status {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0;
  padding: .45rem 1rem .45rem .75rem;
  border: 1px solid rgba(52, 211, 194, .3);
  border-radius: 999px;
  background: rgba(52, 211, 194, .06);
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--accent-ink);
}
.status__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.status__dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: ping 2s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }
@media (max-width: 480px) { .status { font-size: .66rem; } }

.hero__name {
  margin: 1.75rem 0 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(5rem, 22vw, 15rem);
  line-height: .82;
  letter-spacing: -.055em;
}
.hero__name .line { display: block; overflow: hidden; padding: 0 .04em .07em; }
.hero__name .ch {
  display: inline-block;
  transform: translateY(115%) rotate(6deg);
  animation: rise 1.1s var(--ease) forwards;
  animation-delay: calc(var(--boot) + var(--i) * 55ms + 150ms);
}
/* contour : le trait est peint sous un remplissage noir, ce qui masque les contours
   internes qui se chevauchent dans les glyphes de la police variable */
.hero__name .line:last-child { color: #000; -webkit-text-stroke: 3px rgba(255, 255, 255, .85); paint-order: stroke fill; letter-spacing: -.01em; }
@keyframes rise { to { transform: none; } }

.hero__role { margin: 1.75rem 0 0; font-family: var(--mono); font-size: clamp(.95rem, 2.2vw, 1.2rem); color: var(--ink-2); min-height: 1.7em; }
.hero__role .prompt { color: var(--accent); }
.typer::after {
  content: "";
  display: inline-block;
  width: .55em;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -.18em;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 2.25rem; }

.fade-up { opacity: 0; transform: translateY(18px); animation: fadeUp 1s var(--ease) forwards; animation-delay: calc(var(--boot) + .3s); }
.d1 { animation-delay: calc(var(--boot) + .7s); }
.d2 { animation-delay: calc(var(--boot) + .85s); }
.d3 { animation-delay: calc(var(--boot) + 1s); }
.d4 { animation-delay: calc(var(--boot) + 1.2s); }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

.feed {
  position: absolute;
  right: var(--gutter);
  bottom: 2rem;
  width: 22rem;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 10, 11, .7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--mono);
  font-size: .68rem;
  line-height: 1.7;
  color: var(--ink-3);
}
.feed__head { display: flex; justify-content: space-between; margin-bottom: .4rem; color: var(--ink-2); }
.feed__head b { color: var(--accent); font-weight: 500; }
.feed ol { list-style: none; margin: 0; padding: 0; height: 7.1em; overflow: hidden; }
.feed li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: feedIn .4s var(--ease); }
.feed .ok { color: var(--accent); }
.feed .warn { color: var(--warn); }
.feed .err { color: var(--danger); }
@keyframes feedIn { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 1100px) { .feed { display: none; } }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.scroll-cue.fade-up { transform: translateX(-50%) translateY(18px); animation-name: fadeUpX; }
@keyframes fadeUpX { to { opacity: 1; transform: translateX(-50%); } }
.scroll-cue i { position: relative; width: 1px; height: 44px; background: var(--line-strong); overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; inset: 0; background: var(--accent); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }

/* ---------- manifeste ---------- */

.statement { position: relative; height: 260vh; }
.statement__sticky { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; }
.statement__text {
  margin: 0;
  max-width: 22ch;
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(2.1rem, 6vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -.035em;
}
.statement__text .w { color: rgba(255, 255, 255, .12); transition: color .35s; }
.statement__text .w.lit { color: var(--ink); }
.statement__text .w.lit:nth-last-child(-n+6) { color: var(--accent); }

/* ---------- chiffres ---------- */

.numbers { position: relative; height: calc(var(--n) * 90vh + 100vh); }
.numbers__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.numbers__sticky::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1100px, 150vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(52, 211, 194, .12), rgba(138, 155, 255, .06) 35%, transparent 65%);
  pointer-events: none;
}
.numbers__fluid { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.num {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 var(--gutter);
  text-align: center;
  opacity: 0;
  transform: scale(.86) translateY(40px);
  filter: blur(12px);
  transition: opacity .7s var(--ease), transform .9s var(--ease), filter .7s var(--ease);
}
.num.on { opacity: 1; transform: none; filter: none; }
.num.past { transform: scale(1.12) translateY(-40px); }
.num__value {
  /* le tracking négatif fait déborder le dernier glyphe hors de la boîte :
     sans ce padding, background-clip: text le coupe à droite */
  margin: -.1em 0;
  padding: .1em .12em;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(8rem, 30vw, 24rem);
  line-height: .85;
  letter-spacing: -.07em;
  font-variant-numeric: tabular-nums;
  /* détache le chiffre de l'encre du fluide */
  filter: drop-shadow(0 0 40px rgba(0, 0, 0, .7));
}
.num__pre, .num__post { font-size: .45em; letter-spacing: -.03em; }
.num__label { margin: 1rem 0 0; font-family: var(--display); font-size: clamp(1.6rem, 4vw, 3rem); font-weight: 600; letter-spacing: -.03em; }
.num__sub { margin: .75rem 0 0; max-width: 32rem; font-size: 1.05rem; color: var(--ink-2); }
.num__label, .num__sub { text-shadow: 0 0 14px #000, 0 0 28px #000, 0 0 2px #000; }
.numbers__dots { position: absolute; right: var(--gutter); top: 50%; display: grid; gap: .6rem; transform: translateY(-50%); }
.numbers__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); transition: background .3s, transform .3s; }
.numbers__dots i.on { background: var(--accent); transform: scale(1.6); }

/* ---------- bandeau ---------- */

.band { padding: clamp(3rem, 8vw, 6rem) 0; overflow: hidden; border-block: 1px solid var(--line); }
.band__row {
  margin: 0;
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.5rem, 11vw, 10rem);
  line-height: 1;
  letter-spacing: -.045em;
  color: var(--ink);
  will-change: transform;
}
.band__row--outline { color: #000; -webkit-text-stroke: 3px rgba(255, 255, 255, .35); paint-order: stroke fill; letter-spacing: -.005em; }

/* ---------- sections ---------- */

main { position: relative; z-index: 1; }
.section { position: relative; padding: clamp(6rem, 13vw, 11rem) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1.5rem 3rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 1.75rem; height: 1px; background: currentColor; }
.eyebrow--danger { color: var(--danger); }
.section__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.8rem, 8vw, 6.5rem);
  line-height: .92;
  letter-spacing: -.045em;
}
.section__lede { max-width: 30rem; margin: 0; color: var(--ink-2); font-size: 1.08rem; }
@media (max-width: 800px) { .section__head { grid-template-columns: 1fr; } }

.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- projets ---------- */

.projects { position: relative; padding-top: clamp(6rem, 13vw, 11rem); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.filter {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  height: 2.5rem;
  padding: 0 1.05rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .88rem;
  color: var(--ink-2);
  transition: all .25s var(--ease);
}
.filter:hover { border-color: var(--line-strong); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #000; }
.filter__count { font-family: var(--mono); font-size: .72rem; opacity: .55; }

.hscroll { position: relative; }
.hscroll__sticky { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding-top: 3rem; }
.hscroll__track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  padding: 0 max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  will-change: transform;
}
.hscroll__bar { width: min(var(--wrap), 100%); margin: 2.25rem auto 0; padding: 0 var(--gutter); }
.hscroll__bar::before { content: ""; display: block; height: 2px; background: var(--line); border-radius: 2px; }
.hscroll__bar i { display: block; height: 2px; margin-top: -2px; background: var(--grad); border-radius: 2px; transform-origin: left; transform: scaleX(var(--hx, 0)); }

.card {
  --mx: 50%;
  --my: 0%;
  --c: var(--accent);
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  width: min(440px, 34vw);
  min-height: min(620px, 72svh);
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--c) 14%, transparent), transparent 60%),
    var(--surface);
  overflow: hidden;
  isolation: isolate;
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: border-color .3s, transform .6s var(--ease);
}
.card:hover { transition: border-color .3s, transform .15s ease-out; }
.card--xl { width: min(700px, 54vw); }
.card[data-cat="sre"] { --c: var(--warn); }
.card[data-cat="software"] { --c: var(--accent-2); }
.card[data-cat="consulting"] { --c: #C084FC; }
.card[data-cat="product"] { --c: #F472B6; }
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(500px circle at var(--mx) var(--my), color-mix(in srgb, var(--c) 18%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity .35s;
}
.card:hover { border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.card:hover::before, .card:focus-within::before { opacity: 1; }
.card.is-hidden { display: none; }

.card__top { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: .72rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.card__cat { display: inline-flex; align-items: center; gap: .5rem; color: var(--c); }
.card__cat::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--c); box-shadow: 0 0 10px var(--c); }
.card__num {
  position: absolute;
  right: -.02em;
  bottom: -.22em;
  z-index: -1;
  font-family: var(--display);
  font-size: clamp(8rem, 14vw, 13rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.06em;
  color: var(--surface);
  -webkit-text-stroke: 2px rgba(255, 255, 255, .08);
  paint-order: stroke fill;
  transition: -webkit-text-stroke-color .4s;
}
.card:hover .card__num { -webkit-text-stroke-color: color-mix(in srgb, var(--c) 45%, transparent); }
.card__title { margin: 1.5rem 0 .6rem; font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 2.3vw, 2.1rem); line-height: 1.02; letter-spacing: -.03em; }
.card--xl .card__title { font-size: clamp(2rem, 3.4vw, 3rem); }
.card__title a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.card__tag { margin: 0; font-size: .92rem; color: var(--ink-2); }
.card__desc { margin: 1.1rem 0 0; font-size: .95rem; line-height: 1.6; color: var(--ink-2); }

.todo-desc {
  position: relative;
  margin: 1.25rem 0 0;
  padding: .9rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  font-size: .86rem;
  line-height: 1.5;
  color: var(--ink-3);
}
.todo-desc::before {
  content: attr(data-label);
  position: absolute;
  top: -.6rem;
  left: .75rem;
  padding: 0 .4rem;
  background: var(--surface);
  font-family: var(--mono);
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--warn);
}
.todo-desc .skel { display: block; height: .5rem; margin-top: .55rem; border-radius: 4px; background: linear-gradient(90deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.12) 50%, rgba(255,255,255,.05) 100%); background-size: 200% 100%; animation: shimmer 2.4s linear infinite; }
.todo-desc .skel:nth-of-type(2) { width: 82%; }
.todo-desc .skel:nth-of-type(3) { width: 58%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.card__stack { display: flex; flex-wrap: wrap; gap: .35rem; margin: auto 0 0; padding: 1.25rem 0 0; list-style: none; }
.card__stack li { padding: .22rem .55rem; border: 1px solid var(--line); border-radius: 6px; font-family: var(--mono); font-size: .68rem; color: var(--ink-2); background: rgba(0, 0, 0, .5); }
.card__go { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.25rem; font-size: .88rem; font-weight: 600; color: var(--ink); }
.card__go svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.card:hover .card__go { color: var(--c); }
.card:hover .card__go svg { transform: translateX(4px); }

.card__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.25rem; }
/* écrans peu hauts : les chiffres sont déjà dans la section « chiffres » */
@media (min-width: 901px) and (max-height: 800px) { .card__stats { display: none; } .card { padding: 1.5rem; } .card__title { margin-top: 1.1rem; } }
.card__stats div { border-left: 1px solid var(--line-strong); padding-left: .85rem; }
.card__stats b { display: block; font-family: var(--display); font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.card__stats span { font-size: .75rem; color: var(--ink-3); }

.nodes { display: grid; grid-template-columns: repeat(6, 1fr); gap: .45rem; margin-top: 1.25rem; }
.node { padding: .55rem .45rem .5rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, .4); font-family: var(--mono); font-size: .58rem; color: var(--ink-3); }
.node__pods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-top: .4rem; }
.node__pods i { aspect-ratio: 1; border-radius: 2px; background: var(--accent); opacity: .85; transition: background .4s, opacity .4s; }
.node__pods i.off { opacity: .1; }
.node__pods i.bad { background: var(--danger); opacity: 1; box-shadow: 0 0 8px var(--danger); }
.node__pods i.pend { background: var(--warn); opacity: 1; }

.meter { margin-top: 1.5rem; }
.meter__row { display: grid; grid-template-columns: 3.5rem 1fr auto; align-items: center; gap: .75rem; font-family: var(--mono); font-size: .72rem; color: var(--ink-3); }
.meter__row + .meter__row { margin-top: .6rem; }
.meter__bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.meter__bar i { display: block; height: 100%; width: 0; border-radius: inherit; transition: width 1.6s var(--ease); }
.meter.in .meter__bar i { width: var(--w); }
.meter__bar .v1 { background: var(--danger); box-shadow: 0 0 12px var(--danger); }
.meter__bar .v2 { background: var(--accent); box-shadow: 0 0 12px var(--accent); }

/* tactile / petit écran : carrousel natif au lieu de l'épinglage */
@media (max-width: 900px) {
  .hscroll { height: auto !important; }
  .hscroll__sticky { position: static; height: auto; overflow: visible; padding-top: 1rem; }
  .hscroll__track {
    width: auto;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: .5rem var(--gutter) 1rem;
    scroll-padding: 0 var(--gutter);
    transform: none !important;
  }
  .hscroll__track::-webkit-scrollbar { display: none; }
  .card, .card--xl { width: 84vw; height: auto; min-height: 30rem; scroll-snap-align: start; }
  .hscroll__bar { margin-top: 1rem; }
  .nodes { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- produit ---------- */

.pipeline { margin: 0 0 2.5rem; padding: 1.25rem 1.5rem 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pipeline__head { display: flex; align-items: center; gap: .6rem; margin: 0 0 1.4rem; font-size: .78rem; color: var(--ink-3); }
.pipeline__head b { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 4px rgba(255, 181, 71, .15); animation: pulse 1.6s ease-in-out infinite; }
.pipeline.done .pipeline__head { color: var(--accent-ink); }
.pipeline.done .pipeline__head b { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: none; }
@keyframes pulse { 50% { opacity: .35; } }
.pipeline__stages { position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); margin: 0; padding: 0; list-style: none; }
.pipeline__stages::before, .pipeline__stages::after {
  /* rail + remplissage : le remplissage suit le nombre d'étapes validées */
  content: "";
  position: absolute;
  top: 7px;
  left: calc(50% / var(--n));
  right: calc(50% / var(--n));
  height: 2px;
  border-radius: 2px;
  background: var(--line-strong);
}
.pipeline__stages::after { background: var(--grad); transform-origin: left; transform: scaleX(var(--fill, 0)); transition: transform .8s var(--ease); }
.pipeline__stages li { position: relative; z-index: 1; display: flex; justify-content: center; }
.pipeline__stages a { display: flex; flex-direction: column; align-items: center; gap: .7rem; padding: 0 .25rem .25rem; border-radius: 10px; font-family: var(--mono); font-size: .74rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; transition: color .4s; -webkit-tap-highlight-color: transparent; }
.pipeline__stages a:hover, .pipeline__stages a:focus-visible { color: var(--ink); }
.pipeline__stages i { width: 16px; height: 16px; border: 2px solid var(--line-strong); border-radius: 50%; background: var(--bg); transition: border-color .4s, background .4s, box-shadow .4s, transform .4s var(--ease); }
.pipeline__stages li.lit a { color: var(--ink); }
.pipeline__stages li.lit i { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft), 0 0 18px var(--glow); }
.pipeline__stages li.cur a { color: var(--accent-ink); }
.pipeline__stages li.cur i { transform: scale(1.35); }

.pm-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.pm {
  --mx: 50%;
  --my: 0%;
  position: relative;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  isolation: isolate;
  transition: border-color .3s;
}
.pm:nth-child(n+4) { grid-column: span 3; }
.pm::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx) var(--my), var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity .35s;
}
.pm:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.pm:hover::before { opacity: 1; }
.pm { scroll-margin-top: 2rem; }
.pm__stage { margin: 0; font-family: var(--mono); font-size: .72rem; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .06em; }
.pm__stage span { color: var(--ink-3); }
.pm__title { margin: 1rem 0 .8rem; font-family: var(--display); font-size: clamp(1.35rem, 2vw, 1.7rem); font-weight: 700; line-height: 1.1; letter-spacing: -.025em; }
.pm__proof { margin: 0 0 1.4rem; font-size: .95rem; line-height: 1.6; color: var(--ink-2); }
.pm__link { display: inline-flex; align-items: center; gap: .5rem; margin-top: auto; font-size: .88rem; font-weight: 600; color: var(--ink); }
.pm__link svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.pm__link::after { content: ""; position: absolute; inset: 0; }
.pm:hover .pm__link { color: var(--accent); }
.pm:hover .pm__link svg { transform: translateX(4px); }
@media (max-width: 900px) {
  .pm-grid { grid-template-columns: 1fr 1fr; }
  .pm, .pm:nth-child(n+4) { grid-column: span 1; }
  .pm:last-child { grid-column: span 2; }
}
@media (max-width: 900px) {
  /* mobile : le pipeline reste en haut de l'écran pendant qu'on parcourt les étapes,
     et se décale sous la barre du haut quand celle-ci réapparaît (--tb posé en JS) */
  .pipeline {
    position: sticky;
    top: calc(var(--tb, 0px) + .5rem);
    z-index: 5;
    background: rgba(10, 10, 11, .97);
    box-shadow: 0 12px 32px -12px #000;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    transition: top .45s var(--ease), opacity 1s var(--ease), transform 1s var(--ease);
  }
  .pm { scroll-margin-top: calc(var(--tb, 0px) + 9rem); }
}
@media (max-width: 600px) {
  .pm-grid { grid-template-columns: 1fr; }
  .pm, .pm:nth-child(n+4), .pm:last-child { grid-column: auto; }
  .pm { padding: 1.4rem; }
  .pipeline { margin-bottom: 1.5rem; padding: .85rem .5rem 1rem; border-radius: 18px; }
  .pipeline__head { margin: 0 0 1rem .5rem; font-size: .7rem; }
  .pipeline__stages a { gap: .55rem; min-width: 44px; padding-top: .35rem; font-size: .56rem; letter-spacing: .01em; }
  .pipeline__stages::before, .pipeline__stages::after { top: calc(7px + .35rem); }
}

/* ---------- incidents ---------- */

.incidents { display: grid; gap: .75rem; }
.incident { --sev: var(--danger); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: border-color .3s, box-shadow .3s; }
.incident[data-sev="2"] { --sev: var(--warn); }
.incident[open] { border-color: color-mix(in srgb, var(--sev) 45%, transparent); box-shadow: 0 0 80px -40px var(--sev); }
.incident summary { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.25rem; padding: 1.5rem 1.6rem; cursor: pointer; list-style: none; }
.incident summary::-webkit-details-marker { display: none; }
.incident__id { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .75rem; color: var(--sev); white-space: nowrap; }
.incident__id::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sev); box-shadow: 0 0 12px var(--sev); animation: sevPulse 1.6s ease-in-out infinite; }
@keyframes sevPulse { 50% { opacity: .35; } }
.incident__title { margin: 0; font-family: var(--display); font-size: clamp(1.15rem, 2.4vw, 1.6rem); font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.incident__area { display: block; margin-top: .25rem; font-family: var(--mono); font-size: .72rem; color: var(--ink-3); font-weight: 400; letter-spacing: 0; }
.incident__toggle { width: 2.1rem; height: 2.1rem; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; transition: transform .35s var(--ease); }
.incident__toggle svg { width: 14px; height: 14px; }
.incident[open] .incident__toggle { transform: rotate(45deg); }
.incident__body { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 0 1.6rem 1.6rem; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); }
.incident__body div { padding: 1.1rem 1.15rem; background: var(--surface-2); }
.incident__body dt { font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: .45rem; }
.incident__body dd { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--ink-2); }
.incident__body dd strong { color: var(--ink); }
.incident__body div:last-child dt { color: var(--accent); }
@media (max-width: 900px) { .incident__body { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .incident summary { grid-template-columns: 1fr auto; gap: .5rem 1rem; padding: 1.1rem; }
  .incident__id { grid-column: 1 / -1; }
  .incident__body { grid-template-columns: 1fr; margin: 0 1rem 1rem; }
}

/* ---------- parcours ---------- */

.timeline-wrap { position: relative; max-width: 56rem; }
.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 2.5rem; }
.timeline-wrap::before, .timeline__fill {
  content: "";
  position: absolute;
  left: .45rem;
  top: .5rem;
  bottom: .5rem;
  width: 2px;
  background: var(--line);
  border-radius: 2px;
}
.timeline__fill { z-index: 1; background: linear-gradient(var(--accent), var(--accent-2)); transform-origin: top; transform: scaleY(var(--t, 0)); box-shadow: 0 0 12px var(--accent); }
.timeline li { position: relative; padding: 0 0 3rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: -2.5rem;
  top: .35rem;
  width: 1.1rem;
  height: 1.1rem;
  margin-left: -.1rem;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: #000;
  transition: border-color .4s, box-shadow .4s;
}
.timeline li.lit::before { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft), 0 0 20px var(--accent); }
.timeline__when { font-family: var(--mono); font-size: .78rem; color: var(--accent); }
.timeline__what { margin: .35rem 0 0; font-family: var(--display); font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.timeline__desc { margin: .45rem 0 0; color: var(--ink-2); max-width: 40rem; }

/* ---------- stack ---------- */

.stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stack__group { padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stack__name { margin: 0 0 1rem; font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.stack__items { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.tech { position: relative; display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .72rem; border: 1px solid var(--line); border-radius: 9px; font-size: .88rem; background: rgba(255, 255, 255, .025); transition: border-color .2s, color .2s, background .2s, box-shadow .2s; }
.tech[data-n] { cursor: help; }
.tech[data-n]::after { content: attr(data-n); display: grid; place-items: center; min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem; border-radius: 5px; background: var(--accent-soft); color: var(--accent-ink); font-family: var(--mono); font-size: .62rem; }
.tech:hover, .tech:focus-visible { border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 24px -8px var(--accent); }
.tech-pop { position: fixed; z-index: 95; max-width: 18rem; padding: .75rem .9rem; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-2); box-shadow: 0 20px 50px -20px #000; font-size: .82rem; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .18s, transform .18s; }
.tech-pop.on { opacity: 1; transform: none; }
.tech-pop b { display: block; margin-bottom: .35rem; font-family: var(--mono); font-size: .66rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.tech-pop ul { margin: 0; padding: 0 0 0 1rem; color: var(--ink-2); }
.stack__note { margin: 1.5rem 0 0; font-size: .85rem; color: var(--ink-3); }
@media (max-width: 900px) { .stack { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .stack { grid-template-columns: 1fr; } }

/* ---------- contact ---------- */

.contact { text-align: center; overflow: hidden; padding-block: clamp(8rem, 18vw, 14rem); }
.contact::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1100px, 160vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(52, 211, 194, .14), rgba(138, 155, 255, .07) 35%, transparent 62%);
  z-index: -1;
  pointer-events: none;
}
.contact .eyebrow { justify-content: center; }
.contact__title { margin: 0 auto; max-width: 13ch; font-family: var(--display); font-weight: 800; font-size: clamp(3.2rem, 11vw, 9rem); line-height: .88; letter-spacing: -.055em; }
.contact__lede { max-width: 36rem; margin: 2rem auto 0; color: var(--ink-2); font-size: 1.1rem; }
.mail { display: inline-flex; align-items: center; gap: .9rem; max-width: 100%; margin-top: 2.5rem; padding: .6rem .6rem .6rem 1.5rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-family: var(--mono); font-size: clamp(.9rem, 2.4vw, 1.25rem); }
.mail a { overflow: hidden; text-overflow: ellipsis; }
.mail a:hover { color: var(--accent); }
.mail button { display: inline-flex; align-items: center; height: 2.6rem; padding: 0 1.1rem; border-radius: 999px; background: var(--ink); color: #000; font-family: var(--sans); font-size: .82rem; font-weight: 600; white-space: nowrap; transition: background .2s; }
.mail button.done { background: var(--accent); }
.contact .actions { justify-content: center; }
.contact__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem 2rem; margin: 3rem 0 0; padding: 0; list-style: none; font-size: .9rem; color: var(--ink-3); }
.contact__meta b { color: var(--ink); font-weight: 500; }
@media (max-width: 480px) { .mail { flex-direction: column; gap: .6rem; padding: 1rem; border-radius: 18px; } }

/* ---------- pied de page ---------- */

.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 2rem 0; font-size: .85rem; color: var(--ink-3); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer a:hover { color: var(--accent); }

/* ---------- terminal ---------- */

.term { position: fixed; inset: 0; z-index: 260; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.term.open { opacity: 1; visibility: visible; }
.term__win { display: flex; flex-direction: column; width: min(760px, 100%); height: min(520px, 80svh); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; background: #07090B; color: #D6E2E8; box-shadow: 0 40px 120px -20px #000, 0 0 0 1px rgba(52, 211, 194, .1), 0 0 80px -30px rgba(52, 211, 194, .4); overflow: hidden; transform: translateY(16px) scale(.98); transition: transform .35s var(--ease); font-family: var(--mono); font-size: .85rem; }
.term.open .term__win { transform: none; }
.term__bar { display: flex; align-items: center; gap: .45rem; padding: .75rem 1rem; border-bottom: 1px solid rgba(255, 255, 255, .07); background: #0B0E11; font-size: .75rem; color: #7C8C96; }
.term__bar i { width: 11px; height: 11px; border-radius: 50%; }
.term__bar i:nth-child(1) { background: #FF5F57; }
.term__bar i:nth-child(2) { background: #FEBC2E; }
.term__bar i:nth-child(3) { background: #28C840; }
.term__bar span { margin: 0 auto; transform: translateX(-1.5rem); }
.term__close { color: #7C8C96; font-size: 1rem; line-height: 1; padding: .1rem .3rem; border-radius: 4px; }
.term__close:hover { color: #fff; }
.term__out { flex: 1; overflow-y: auto; padding: 1rem 1.1rem .5rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.term__out .c { color: #34D3C2; }
.term__out .m { color: #8A9BFF; }
.term__out .y { color: #FFB547; }
.term__out .r { color: #FF5D6C; }
.term__out .g { color: #6E6E73; }
.term__out .b { color: #fff; font-weight: 600; }
.term__out a { color: #34D3C2; text-decoration: underline; text-underline-offset: 2px; }
.term__line { display: flex; align-items: center; gap: .6rem; padding: .6rem 1.1rem 1rem; }
.term__ps { color: #34D3C2; white-space: nowrap; }
.term__in { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; caret-color: #34D3C2; }

.term-fab { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 85; display: inline-flex; align-items: center; gap: .55rem; height: 2.9rem; padding: 0 1.1rem; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(10, 10, 11, .8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-family: var(--mono); font-size: .8rem; color: var(--ink-2); box-shadow: 0 12px 40px -16px #000; transition: transform .3s var(--ease), color .2s, border-color .2s, opacity .3s; }
.term-fab:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.term-fab b { color: var(--accent); }
@media (max-width: 520px) { .term-fab kbd, .term-open-label { display: none; } }

.toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 270; padding: .7rem 1.1rem; border-radius: 12px; background: var(--ink); color: #000; font-size: .88rem; font-weight: 500; transform: translate(-50%, calc(100% + 2rem)); opacity: 0; transition: transform .4s var(--ease), opacity .3s; }
.toast.on { transform: translate(-50%, 0); opacity: 1; }

/* ============================================================
   Pages projet (générées par _build/)
   ============================================================ */

.project { position: relative; z-index: 1; max-width: 52rem; margin: 0 auto; padding: 9rem var(--gutter) 5rem; }
.project::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(1000px, 150vw);
  height: 600px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 0%, rgba(52, 211, 194, .12), transparent 65%);
  z-index: -1;
  pointer-events: none;
}
.crumb { margin: 0 0 2rem; font-family: var(--mono); font-size: .8rem; }
.crumb a { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink-3); transition: color .2s; }
.crumb a::before { content: "←"; transition: transform .25s var(--ease); }
.crumb a:hover { color: var(--accent); }
.crumb a:hover::before { transform: translateX(-3px); }
.project__title { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(2.5rem, 7vw, 4.6rem); line-height: .95; letter-spacing: -.045em; }
.project__sub { margin: 1.6rem 0 0; font-size: 1.25rem; color: var(--ink-2); max-width: 40rem; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1px; margin: 2.75rem 0 3.5rem; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--line); }
.meta div { padding: 1rem 1.15rem; background: var(--surface); }
.meta dt { font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.meta dd { margin: .35rem 0 0; font-weight: 500; }
.project h2 { display: flex; align-items: baseline; gap: .9rem; margin: 4rem 0 1rem; font-family: var(--display); font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.project h2[data-n]::before { content: attr(data-n); font-family: var(--mono); font-size: .8rem; font-weight: 400; color: var(--accent); }
.project h3 { margin: 2.5rem 0 .75rem; font-family: var(--display); font-size: 1.35rem; font-weight: 650; letter-spacing: -.02em; }
.project p { margin: 0 0 1rem; color: var(--ink-2); }
.project p strong { color: var(--ink); }
.project ul, .project ol { color: var(--ink-2); padding-left: 1.2rem; }
.project li { margin-bottom: .4rem; }
.kv { font-family: var(--mono); font-size: .82rem; line-height: 1.8; color: var(--ink-2); }
.callout { margin: 1.75rem 0; padding: 1.3rem 1.45rem; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 14px; background: var(--surface); }
.callout > .mono { display: block; margin-bottom: .5rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.callout p:last-child { margin-bottom: 0; }
.todo { padding: .05em .4em; border: 1px dashed var(--warn); border-radius: 5px; font-family: var(--mono); font-size: .8em; color: var(--warn); white-space: nowrap; }
.project table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .9rem; }
.project th, .project td { padding: .6rem .75rem; border-bottom: 1px solid var(--line); text-align: left; }
.project th { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 500; }
.project-nav { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--line); }

/* ---------- mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero__name .ch, .fade-up { transform: none; opacity: 1; }
  .scroll-cue.fade-up { transform: translateX(-50%); }
  .reveal { opacity: 1; transform: none; }
  .hero__inner { transform: none; opacity: 1; }
  .statement { height: auto; }
  .statement__sticky { position: static; height: auto; padding: 8rem 0; }
  .statement__text .w { color: var(--ink); }
  .numbers { height: auto; }
  .numbers__sticky { position: static; height: auto; display: block; padding: 4rem 0; }
  .num { position: static; opacity: 1; transform: none; filter: none; padding-block: 3rem; }
  .numbers__dots { display: none; }
  .band__row { transform: none !important; }
}
