/* =================================================================
   Rémi Hogge — Index
   Direction : « viseur / chambre noire »
   Monochrome chaud, hairlines nettes, grain argentique.
   ================================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Couleurs */
  --ink: #070707;          /* fond noir profond */
  --ink-2: #0d0d0c;
  --paper: #e9e5dc;        /* off-white chaud */
  --paper-dim: #8b877d;    /* texte secondaire */
  --paper-faint: #4c4a44;  /* texte tertiaire / hairlines visibles */
  --line: rgba(233, 229, 220, 0.12);
  --line-strong: rgba(233, 229, 220, 0.30);
  --electric: #1f4bff;     /* accent bleu électrique */

  /* Marge du cadre (distance au bord d'écran) */
  --frame: clamp(14px, 3vw, 36px);

  /* Typo */
  --sans: "Archivo", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  /* Méta : petites capitales mono */
  --meta-size: clamp(10px, 0.74vw, 12px);
  --meta-track: 0.14em;

  /* Easing */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* html en 100% pour les pages courtes ; body en min-height seulement
   (un height:100% figerait le bloc du menu sticky à un seul écran) */
html { height: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* clip (et non hidden) : empêche le débordement horizontal sans casser position:sticky du menu */
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }

/* Curseur : flèche standard, bleu électrique */
body {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M5 3 L5 22 L10 17 L13.5 24 L16.5 22.5 L13 16 L20 16 Z' fill='%231f4bff' stroke='%23dfe6ff' stroke-width='1.1' stroke-linejoin='round'/%3E%3C/svg%3E") 5 3, auto;
}
a { cursor: inherit; }

/* ---------- Atmosphère ---------- */

/* Grain argentique (SVG inline, animé très lentement) */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 80;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 6s steps(6) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}

/* Vignette : enfonce les bords, soulève légèrement le centre */
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(
    120% 120% at 50% 42%,
    rgba(255, 255, 255, 0.018) 0%,
    rgba(0, 0, 0, 0) 38%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

/* ---------- Grille discrète ---------- */
.grid {
  position: fixed;
  inset: 0;
  z-index: 0;                  /* tout derrière, sous la vignette */
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(233, 229, 220, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(233, 229, 220, 0.04) 1px, transparent 1px);
  background-size: 84px 84px;
}
@media (max-width: 760px) {
  .grid { background-size: 52px 52px; }
}

/* ---------- Étoiles ---------- */
.stars {
  position: fixed;
  inset: 0;
  z-index: 6;                  /* au-dessus de la vignette, sous le contenu/cadre */
  pointer-events: none;
  overflow: hidden;
}
.star {
  position: absolute;
  pointer-events: none;
  will-change: transform;
  transform: translate(-50%, -50%) rotate(0deg);
}
.star svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 5px rgba(31, 75, 255, 0.45));
}

/* ---------- Bandeau informatif 4 cases (fond bleu électrique grainé) ---------- */
.quad {
  position: relative;
  z-index: 10;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: clamp(110px, 16vh, 170px);
  background: var(--electric);
  overflow: hidden;
}
/* grain dense sur le bleu */
.quad::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='qn'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23qn)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.7;
  mix-blend-mode: overlay;
  pointer-events: none;
}
/* 2e couche de grain pour densifier */
.quad::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='qn2'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23qn2)'/%3E%3C/svg%3E");
  background-size: 110px 110px;
  opacity: 0.35;
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.quad__item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.4rem;
  text-align: center;
  color: #fff;
  border-right: 1px solid rgba(0, 0, 0, 0.16);
}
.quad__item:last-of-type { border-right: none; }

/* Flèches du sélecteur (mobile uniquement) */
.quad__nav { display: none; }

.quad__no {
  position: absolute;
  top: clamp(0.8rem, 1.4vw, 1.2rem);
  left: clamp(0.8rem, 1.4vw, 1.2rem);
  font-family: var(--mono);
  font-size: var(--meta-size);
  letter-spacing: var(--meta-track);
  color: rgba(255, 255, 255, 0.55);
}

.quad__label {
  /* typo du menu : JetBrains Mono, capitales */
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(0.95rem, 1.6vw, 1.3rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* En mobile : un seul mot à la fois, en grand (typo mono du menu), avec flèches */
@media (max-width: 760px) {
  .quad {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: clamp(118px, 30vw, 150px);
    padding: clamp(1.2rem, 5vw, 1.8rem) clamp(0.6rem, 3vw, 1rem);
    grid-template-columns: none;
  }
  /* grain plus léger → texte plus net */
  .quad::before { opacity: 0.42; }
  .quad::after { opacity: 0.2; }

  .quad__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    z-index: 1;
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    font-family: var(--mono);
    font-size: 1.1rem;
    line-height: 1;
    cursor: inherit;
    transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
  }
  .quad__nav:active { background: rgba(255, 255, 255, 0.14); }

  /* un seul item visible (le mot actif) */
  .quad__item {
    display: none;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 0;
    padding: 0;
    border: none;
  }
  .quad__item.is-active { display: flex; }

  .quad__no {
    position: static;
    color: rgba(255, 255, 255, 0.7);
  }
  .quad__label {
    /* typo du menu : mono, capitales */
    font-family: var(--mono);
    font-weight: 500;
    font-size: clamp(1.5rem, 8vw, 2.2rem);
    letter-spacing: 0.01em;
    line-height: 1.05;
    text-transform: uppercase;
    white-space: nowrap;
  }

  /* animation d'entrée du mot (selon la flèche) */
  .quad__item.is-active.q-from-right { animation: quad-in-right 0.4s var(--ease); }
  .quad__item.is-active.q-from-left { animation: quad-in-left 0.4s var(--ease); }
}
@keyframes quad-in-right {
  from { opacity: 0; transform: translateX(26px); }
  to { opacity: 1; transform: none; }
}
@keyframes quad-in-left {
  from { opacity: 0; transform: translateX(-26px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .quad__item.is-active.q-from-right,
  .quad__item.is-active.q-from-left { animation: none; }
}

/* ---------- Accroche sous le bandeau bleu ---------- */
.quad-note {
  position: relative;
  z-index: 10;
  max-width: 30ch;
  margin: 0 auto;
  padding: clamp(2.6rem, 7vh, 4.5rem) var(--frame);
  text-align: center;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.45rem, 2.8vw, 2.2rem);
  line-height: 1.28;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--paper);
}
.quad-note b { color: var(--electric); font-weight: 600; }

@media (max-width: 760px) {
  .quad-note { font-size: clamp(1.3rem, 6vw, 1.7rem); padding: clamp(2.2rem, 7vh, 3.2rem) var(--frame); }
}

/* ---------- Projets ---------- */
.work {
  position: relative;
  z-index: 10;
  padding: calc(var(--frame) + 5rem) var(--frame) calc(var(--frame) + 6rem);
}
.work__title {
  margin: 0.9rem 0 0;
  max-width: 22ch;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--paper);
}

/* En-tête : titre à gauche, flèches du carrousel à droite */
.work__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.work__nav {
  display: inline-flex;
  gap: 0.6rem;
}
.work__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(2.4rem, 4vw, 3rem);
  height: clamp(2.4rem, 4vw, 3rem);
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--paper);
  font-family: var(--mono);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  line-height: 1;
  cursor: inherit;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
    background-color 0.25s var(--ease), transform 0.15s var(--ease);
}
.work__btn:hover {
  color: var(--electric);
  border-color: var(--electric);
  background: rgba(31, 75, 255, 0.08);
}
.work__btn:active { transform: scale(0.94); }
.work__btn:focus-visible {
  outline: none;
  border-color: var(--electric);
  box-shadow: 0 0 0 2px rgba(31, 75, 255, 0.4);
}
/* Pas de débordement : on masque les flèches */
.work.is-static .work__nav { display: none; }

/* Piste défilante (scroll-snap horizontal) */
.work__viewport {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/Edge legacy */
}
.work__viewport::-webkit-scrollbar { display: none; }
.work__viewport:focus-visible {
  outline: 1px solid var(--line-strong);
  outline-offset: 4px;
}

.work__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(0.8rem, 1.6vw, 1.4rem);
}
/* Largeur pilotée par le JS (--card-w) pour afficher 4 cartes ; valeur de repli sans JS */
.work__item {
  flex: 0 0 var(--card-w, clamp(240px, 78vw, 320px));
  scroll-snap-align: start;
  border: 1px solid var(--line);
}

/* Points de pagination : visibles sur mobile uniquement (indiquent le swipe) */
.work__dots { display: none; }
@media (max-width: 760px) {
  .work__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: clamp(1.1rem, 4vw, 1.6rem);
  }
}
.work__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  background: var(--line-strong);
  cursor: inherit;
  transition: width 0.3s var(--ease), background-color 0.3s var(--ease);
}
.work__dot.is-active {
  width: 22px;
  background: var(--electric);
}

.work__link {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "media media"
    "info  arrow";
  align-items: start;
  gap: 0.6rem clamp(0.8rem, 1.5vw, 1.2rem);
  height: 100%;
  padding: clamp(0.8rem, 1.4vw, 1.2rem);
  transition: color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.work__link:hover {
  color: var(--electric);
  background-color: rgba(31, 75, 255, 0.06);
}

.work__media {
  grid-area: media;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
}
.work__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.4s var(--ease), transform 0.6s var(--ease);
}
.work__link:hover .work__media img {
  filter: grayscale(0) contrast(1.05);
  transform: scale(1.05);
}

/* Vignette de projet pas encore renseignée */
.work__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: dashed;
}
.work__media-label {
  font-family: var(--mono);
  font-size: var(--meta-size);
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  color: var(--paper-faint);
}

.work__info {
  grid-area: info;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}
.work__name {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  letter-spacing: -0.01em;
  color: var(--paper);
}
.work__link:hover .work__name { color: var(--electric); }
.work__meta {
  font-family: var(--mono);
  font-size: var(--meta-size);
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  color: var(--paper-dim);
}

.work__arrow {
  grid-area: arrow;
  align-self: center;
  font-family: var(--mono);
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  color: var(--paper-faint);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}
.work__link:hover .work__arrow {
  color: var(--electric);
  transform: translateX(4px);
}

/* Carte « à venir » : non cliquable, discrète */
.work__link--soon { cursor: default; }
.work__link--soon:hover { color: inherit; background: transparent; }
.work__link--soon .work__name,
.work__link--soon:hover .work__name { color: var(--paper-dim); }
.work__link--soon:hover .work__arrow { color: var(--paper-faint); transform: none; }

@media (max-width: 760px) {
  .work { padding: calc(var(--frame) + 3.5rem) var(--frame) calc(var(--frame) + 4rem); }
}

/* ---------- À propos ---------- */
.about {
  position: relative;
  z-index: 10;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
  padding: calc(var(--frame) + 2rem) var(--frame) 0;
}
@media (min-width: 760px) {
  .about { grid-template-columns: minmax(220px, 360px) 1fr; }
}

.about__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* L'avatar « repose » sur une plateforme lumineuse */
.about__pedestal {
  position: relative;
  display: inline-block;
}
.about__avatar {
  position: relative;
  z-index: 1;
  display: block;
  width: clamp(180px, 24vw, 320px);
  height: auto;
  image-rendering: pixelated;
}
/* Avatar « thumbs up » qui apparaît au survol du bouton Me contacter */
.about__avatar--hover {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  opacity: 0;
  pointer-events: none;
  /* bascule quasi instantanée entre les deux dessins */
  transition: opacity 0.05s linear;
}
.about:has(.about__cta:hover) .about__avatar--hover,
.about:has(.about__cta:focus-visible) .about__avatar--hover {
  opacity: 1;
}
/* le 1er plan s'efface pour éviter la superposition des deux dessins */
.about:has(.about__cta:hover) .about__avatar--base,
.about:has(.about__cta:focus-visible) .about__avatar--base {
  opacity: 0;
}
.about__avatar--base {
  transition: opacity 0.05s linear;
}
.about__pedestal::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  width: 80%;
  height: clamp(24px, 4vw, 44px);
  background: var(--electric);
  filter: blur(26px);
  opacity: 0.4;
  border-radius: 50%;
}
.about__pedestal::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 116%;
  height: 1px;
  background: var(--line-strong);
  z-index: 2;
}

.about__content {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.about__title {
  margin: 0.6rem 0 0;
  max-width: 14ch;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.about__text {
  margin: 0;
  max-width: 48ch;
  font-family: var(--sans);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.6;
  color: var(--paper-dim);
}

/* Mobile : section À propos centrée (texte + bouton) */
@media (max-width: 759.98px) {
  .about__content {
    align-items: center;
    text-align: center;
  }
}

/* Bouton de contact : « rond » mais aux coins pixelisés (8-bit) */
.about__cta,
.services__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  width: fit-content;
  margin-top: 0.6rem;
  padding: 0.95em 1.7em;
  font-family: var(--mono);
  font-size: var(--meta-size);
  font-weight: 500;
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--electric);
  clip-path: polygon(
    14px 0, calc(100% - 14px) 0,
    calc(100% - 14px) 7px, calc(100% - 7px) 7px,
    calc(100% - 7px) 14px, 100% 14px,
    100% calc(100% - 14px),
    calc(100% - 7px) calc(100% - 14px),
    calc(100% - 7px) calc(100% - 7px),
    calc(100% - 14px) calc(100% - 7px),
    calc(100% - 14px) 100%,
    14px 100%,
    14px calc(100% - 7px),
    7px calc(100% - 7px),
    7px calc(100% - 14px),
    0 calc(100% - 14px),
    0 14px,
    7px 14px,
    7px 7px,
    14px 7px
  );
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.about__cta-arrow,
.services__cta-arrow {
  transition: transform 0.25s var(--ease);
}
.about__cta:hover,
.about__cta:focus-visible,
.services__cta:hover,
.services__cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px var(--electric), 0 0 1.6em rgba(31, 75, 255, 0.5);
}
.about__cta:hover .about__cta-arrow,
.about__cta:focus-visible .about__cta-arrow,
.services__cta:hover .services__cta-arrow,
.services__cta:focus-visible .services__cta-arrow {
  transform: translateX(4px);
}
.about__cta:focus-visible,
.services__cta:focus-visible {
  outline: none;
}

/* ---------- Services ---------- */
.services {
  position: relative;
  z-index: 10;
}
.services__head {
  padding: calc(var(--frame) + 2rem) var(--frame) 0;
}
.services__title {
  margin: 0.9rem 0 0;
  max-width: 22ch;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--paper);
}

/* Pile de panneaux : par défaut (sans JS / reduced-motion), liste statique */
.services__scroller { position: relative; }
.services__pin {
  padding: clamp(0.5rem, 1.5vw, 1rem) var(--frame) calc(var(--frame) + 4rem);
}
.services__stage {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.services__track { display: none; }
/* Bandeau de progression (compteur + barre + invite à défiler) : visible en mode scrollytelling */
.services__foot { display: none; }

.services__item {
  display: grid;
  grid-template-columns: clamp(2.5rem, 6vw, 4.5rem) 1fr;
  gap: 0 clamp(1rem, 3vw, 2.5rem);
  align-items: start;
  padding: clamp(1.6rem, 3.5vw, 2.6rem) 0;
  border-bottom: 1px solid var(--line);
}

.services__no {
  font-family: var(--mono);
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  font-weight: 400;
  line-height: 1;
  color: var(--paper-faint);
  transition: color 0.4s var(--ease);
}
.services__item.is-active .services__no {
  color: var(--electric);
}

.services__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.services__name {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.services__bar {
  display: block;
  width: 2.5rem;
  height: 2px;
  margin: 0.9rem 0 1rem;
  background: var(--line-strong);
  transition: width 0.45s var(--ease), background-color 0.45s var(--ease);
}
.services__item.is-active .services__bar {
  width: 5rem;
  background: var(--electric);
}
.services__desc {
  margin: 0;
  max-width: 52ch;
  font-family: var(--sans);
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  line-height: 1.6;
  color: var(--paper-dim);
}
.services__tags {
  margin: 0.9rem 0 0;
  font-family: var(--mono);
  font-size: var(--meta-size);
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  color: var(--paper-faint);
}
.services__cta {
  margin-top: 1.6rem;
}

/* ----- Mode "scrollytelling" : un panneau épinglé, défilement = changement ----- */
.has-services-scroll .services__scroller {
  height: calc(100svh * var(--service-count, 3));
}
.has-services-scroll .services__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: var(--frame);
}
.has-services-scroll .services__stage {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  border-top: none;
}

/* ----- Grosse étoile bleue : section scroll, pilotable à la souris (ordinateur) ----- */
.services__star {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: clamp(-3rem, -1vw, 1rem);
  width: clamp(120px, 16vw, 240px);
  height: clamp(120px, 16vw, 240px);
  transform: translateY(-50%) rotate(0deg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s var(--ease);
  will-change: transform;
}
.services__star svg {
  display: block;
  width: 100%;
  height: 100%;
}
.services__star path {
  fill: var(--electric);
}
.has-services-scroll .services__scroller.is-in-view .services__star {
  opacity: 0.85;
}
@media (max-width: 760px), (hover: none), (pointer: coarse) {
  .services__star {
    display: none;
  }
}
.has-services-scroll .services__item {
  position: absolute;
  inset: 0;
  align-content: center;
  border-bottom: none;
  padding: 0;
  opacity: 0;
  transform: translateY(2.5rem);
  /* Les panneaux sont empilés : un panneau invisible ne doit pas capter les clics (CTA Studio IA) */
  pointer-events: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.has-services-scroll .services__item.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.has-services-scroll .services__name {
  font-size: clamp(2rem, 6vw, 4.5rem);
}
.has-services-scroll .services__no {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12em;
  font-size: clamp(1.6rem, 4vw, 3rem);
}
/* Flèche sous le numéro : invite à descendre (uniquement en mode scrollytelling) */
.services__no-arrow { display: none; }
.has-services-scroll .services__no-arrow {
  display: block;
  font-size: 0.42em;
  line-height: 1;
  color: var(--paper-faint);
  animation: svc-cue 1.5s var(--ease) infinite;
}
.has-services-scroll .services__item.is-active .services__no-arrow {
  color: var(--electric);
}
@media (prefers-reduced-motion: reduce) {
  .has-services-scroll .services__no-arrow { animation: none; }
}
.has-services-scroll .services__desc {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  max-width: 56ch;
}

/* Bandeau de progression : compteur · barre · invite « Défilez ↓ » */
.has-services-scroll .services__foot {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.4rem);
  width: 100%;
  max-width: 560px;
  margin-top: clamp(1.5rem, 4vh, 3rem);
  /* on remonte le bandeau pour ne pas chevaucher le cadre méta fixe (horloge / index) */
  margin-bottom: clamp(2rem, 6vh, 4rem);
}
.services__count {
  flex: none;
  font-family: var(--mono);
  font-size: var(--meta-size);
  letter-spacing: var(--meta-track);
  color: var(--paper-faint);
  white-space: nowrap;
}
.services__count-cur { color: var(--electric); }

.has-services-scroll .services__track {
  display: block;
  position: relative;
  flex: 1 1 auto;
  height: 2px;
  background: var(--line);
}
.has-services-scroll .services__fill {
  display: block;
  position: absolute;
  inset: 0;
  transform-origin: left;
  transform: scaleX(0);
  background: var(--electric);
}

/* Invite à défiler : flèche qui rebondit, s'efface dès qu'on a commencé */
.services__cue {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-size: var(--meta-size);
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  color: var(--paper-dim);
  white-space: nowrap;
  transition: opacity 0.45s var(--ease);
}
.services__cue-arrow {
  display: inline-block;
  animation: svc-cue 1.5s var(--ease) infinite;
}
@keyframes svc-cue {
  0%, 100% { transform: translateY(-2px); opacity: 0.45; }
  50%      { transform: translateY(4px);  opacity: 1; }
}
.services__scroller.is-scrolled .services__cue { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .services__cue-arrow { animation: none; }
}

@media (max-width: 760px) {
  .services__pin { padding: clamp(2.5rem, 6vw, 4rem) var(--frame) calc(var(--frame) + 3rem); }
  .has-services-scroll .services__pin { padding: var(--frame); }
}

/* ----- Badge "New" : Studio IA ----- */
.services__new {
  display: inline-block;
  vertical-align: super;
  margin-left: 0.6rem;
  padding: 0.2em 0.55em;
  font-family: var(--mono);
  font-size: var(--meta-size);
  font-weight: 500;
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  color: var(--electric);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-shadow: 0 0 0.5em rgba(31, 75, 255, 0.7);
  box-shadow: 0 0 0.6em rgba(31, 75, 255, 0.25);
}

/* ---------- Repères d'angle (viseur) ---------- */
.bracket {
  position: fixed;
  z-index: 20;
  width: 13px;
  height: 13px;
  border: 0 solid var(--line-strong);
}
.bracket--tl { top: var(--frame);    left: var(--frame);  border-top-width: 1px;    border-left-width: 1px; }
.bracket--tr { top: var(--frame);    right: var(--frame); border-top-width: 1px;    border-right-width: 1px; }
.bracket--bl { bottom: var(--frame); left: var(--frame);  border-bottom-width: 1px; border-left-width: 1px; }
.bracket--br { bottom: var(--frame); right: var(--frame); border-bottom-width: 1px; border-right-width: 1px; }

/* ---------- Cadre méta (haut / bas) ---------- */
.frame {
  position: fixed;
  left: var(--frame);
  right: var(--frame);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.frame--top    { top: var(--frame); }
.frame--bottom { bottom: var(--frame); }

/* Style méta commun */
.role,
.clock,
.index,
.wordmark {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--meta-size);
  font-weight: 400;
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
}

/* Wordmark — discret, jamais en grand */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  color: var(--paper);
}
.wordmark__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 0 rgba(233, 229, 220, 0.5);
  animation: pulse 3.6s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(233, 229, 220, 0.45); opacity: 1; }
  50%      { box-shadow: 0 0 0 5px rgba(233, 229, 220, 0); opacity: 0.55; }
}
.wordmark__name { white-space: nowrap; }

/* Rôle (haut droite) */
.role {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  color: var(--paper-dim);
  text-align: right;
}
.role__sep { color: var(--paper-faint); }

/* Horloge (bas gauche) */
.clock {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55em;
  color: var(--paper-dim);
}
.clock__time { color: var(--paper); font-variant-numeric: tabular-nums; }
.clock__zone { color: var(--paper-faint); }

/* Index (bas droite) */
.index {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55em;
  color: var(--paper-dim);
}
.index__year { color: var(--paper); }

/* Groupe droite du header (rôle + switch négatif) */
.frame__end {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.8rem);
}

/* Switch « mode négatif » */
.neg {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  cursor: inherit;
  color: var(--paper-dim);
  font-family: var(--mono);
  font-size: var(--meta-size);
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
}
.neg__txt { white-space: nowrap; }
.neg__track {
  position: relative;
  flex: none;
  width: 32px;
  height: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.neg__knob {
  position: absolute;
  top: 50%;
  left: 2px;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--paper);
  transition: left 0.3s var(--ease);
}
html.is-negative .neg__knob { left: 19px; }

/* ---------- Menu principal : barre blanche sticky, ombre bleue dure ---------- */
.menu {
  --menu-shadow: clamp(4px, 0.9vw, 7px);
  position: sticky;
  top: var(--frame);
  z-index: 60;
  margin: var(--frame) var(--frame) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.6rem, 2vw, 1.5rem);
  padding: 0.55rem 0.7rem 0.55rem 1rem;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--ink);
  /* « deuxième menu » bleu décalé = ombre dure, sans flou */
  box-shadow: var(--menu-shadow) var(--menu-shadow) 0 0 var(--electric);
}

.menu__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  flex: none;
  font-family: var(--mono);
  font-size: clamp(0.76rem, 1vw, 0.9rem);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.menu__dot {
  width: 9px;
  height: 9px;
  flex: none;
  background: var(--electric);
}

.menu__links {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.9rem);
}
.menu__link {
  position: relative;
  font-family: var(--mono);
  font-size: var(--meta-size);
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.menu__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--electric);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.menu__link:hover { color: var(--electric); }
.menu__link:hover::after { transform: scaleX(1); }

.menu__actions {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.6rem, 1.5vw, 1rem);
  flex: none;
}
/* Switch négatif recoloré pour fond blanc */
.menu .neg { color: var(--ink); }
.menu .neg__track { border-color: var(--ink); }
.menu .neg__knob { background: var(--electric); }

/* Bouton hamburger (mobile) */
.menu__toggle {
  display: none;
  width: 2.2rem;
  height: 2.2rem;
  flex: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--ink);
  cursor: inherit;
}
.menu__bars,
.menu__bars::before,
.menu__bars::after {
  display: block;
  width: 17px;
  height: 2px;
  background: var(--ink);
}
.menu__bars { position: relative; transition: background-color 0.2s var(--ease); }
.menu__bars::before,
.menu__bars::after {
  content: "";
  position: absolute;
  left: 0;
  transition: transform 0.25s var(--ease);
}
.menu__bars::before { transform: translateY(-6px); }
.menu__bars::after  { transform: translateY(6px); }
.menu.is-open .menu__bars { background-color: transparent; }
.menu.is-open .menu__bars::before { transform: rotate(45deg); }
.menu.is-open .menu__bars::after  { transform: rotate(-45deg); }

/* Cibles d'ancre : ne pas passer sous la barre sticky */
#top, #projets, #apropos, #services {
  scroll-margin-top: calc(var(--frame) + 4.5rem);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (max-width: 760px) {
  .menu__toggle { display: inline-flex; }
  .menu__links {
    position: absolute;
    top: calc(100% + var(--menu-shadow) + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.3rem;
    background: #fff;
    border: 1px solid var(--ink);
    box-shadow: var(--menu-shadow) var(--menu-shadow) 0 0 var(--electric);
    display: none;
  }
  .menu.is-open .menu__links { display: flex; }
  .menu__link {
    padding: 0.9rem 0.95rem;
    border-bottom: 1px solid rgba(7, 7, 7, 0.12);
    font-size: 0.8rem;
  }
  .menu__link:last-child { border-bottom: none; }
  .menu__link::after { display: none; }
}
@media (max-width: 520px) {
  .menu .neg__txt { display: none; }
}

/* Mode négatif : calque blanc en "difference" → inverse tout le rendu.
   (évite filter:invert sur la racine, qui casserait les position:fixed) */
.negative {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}
html.is-negative .negative { opacity: 1; }

/* Mode négatif : les PHOTOS gardent leurs vraies couleurs.
   On les pré-inverse (invert) pour annuler l'inversion du calque .negative
   (mix-blend-mode: difference). On reprend le filtre de base + invert(1). */
html.is-negative .work__media img {
  filter: grayscale(1) contrast(1.05) invert(1);
}
html.is-negative .work__link:hover .work__media img {
  filter: grayscale(0) contrast(1.05) invert(1);
}
html.is-negative .gallery__item img,
html.is-negative .gallery__item video {
  filter: grayscale(0.15) contrast(1.05) invert(1);
}
html.is-negative .gallery__item:hover img,
html.is-negative .gallery__item:hover video {
  filter: grayscale(0) contrast(1.05) invert(1);
}
html.is-negative .ba__img {
  filter: invert(1);
}

/* ---------- Transition étoile (changement de page) ---------- */
.warp {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: transparent;
}
.warp__star {
  width: 56px;
  height: 56px;
  fill: var(--electric);
  transform: scale(0);
}
/* pré-peinture de la page d'arrivée : couverte avant que le JS n'imple le warp */
html.is-transitioning .warp { background: var(--electric); }
html.is-transitioning .warp__star { transform: scale(22); }

/* ---------- Contenu ---------- */
.stage {
  position: relative;
  z-index: 10;
  /* on retire la hauteur de la barre sticky pour que le hero tienne dans l'écran */
  min-height: calc(100svh - var(--frame) - 3.4rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;   /* le bloc s'ancre en bas */
  align-items: flex-start;
  gap: clamp(1.4rem, 3vh, 2.4rem);
  padding: clamp(1rem, 3vh, 2rem) var(--frame) calc(var(--frame) + 3.5rem);
}

/* Eyebrow — petite ligne méta au-dessus du titre */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.8em;
  margin: 0;
  font-family: var(--mono);
  font-size: var(--meta-size);
  font-weight: 400;
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  color: var(--paper-dim);
}
.eyebrow__idx { color: var(--paper); }

/* Hero — grand, lisible, l'ancre visuelle */
.hero {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(2.75rem, 9.5vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.025em;
  color: var(--paper);
  max-width: 14ch;
}
.hero__line { display: block; }
.hero__line--muted { color: var(--paper-dim); }

/* Lede — phrase d'accroche sous le titre */
.lede {
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
  margin: 0;
  max-width: 34ch;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  line-height: 1.45;
  color: var(--paper-dim);
}
.lede__scroll {
  font-family: var(--mono);
  color: var(--paper);
  animation: nudge 2.4s var(--ease) infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%      { transform: translateY(4px); opacity: 1; }
}

/* =================================================================
   Apparition au chargement
   ================================================================= */
@media (prefers-reduced-motion: no-preference) {
  .frame, .bracket, .grain, .vignette, .grid,
  .eyebrow, .hero__line, .lede {
    opacity: 0;
  }

  body.is-ready .grid     { animation: fade-in 2s var(--ease) 0.15s forwards; }
  body.is-ready .vignette { animation: fade-in 1.6s var(--ease) 0.05s forwards; }
  body.is-ready .bracket  { animation: bracket-in 0.9s var(--ease) forwards; }
  body.is-ready .bracket--tl { animation-delay: 0.2s; }
  body.is-ready .bracket--tr { animation-delay: 0.27s; }
  body.is-ready .bracket--bl { animation-delay: 0.34s; }
  body.is-ready .bracket--br { animation-delay: 0.41s; }
  body.is-ready .frame--top    { animation: meta-in 1s var(--ease) 0.5s forwards; }
  body.is-ready .frame--bottom { animation: meta-in 1s var(--ease) 0.6s forwards; }

  body.is-ready .eyebrow    { animation: rise-in 0.9s var(--ease) 0.55s forwards; }
  body.is-ready .hero__line { animation: rise-in 1s var(--ease) forwards; }
  body.is-ready .hero__line:nth-child(1) { animation-delay: 0.65s; }
  body.is-ready .hero__line:nth-child(2) { animation-delay: 0.74s; }
  body.is-ready .hero__line:nth-child(3) { animation-delay: 0.83s; }
  body.is-ready .lede       { animation: rise-in 0.9s var(--ease) 1s forwards; }

  body.is-ready .grain    { animation: grain 6s steps(6) infinite, fade-in-grain 2s var(--ease) 0.4s forwards; }
}

@keyframes fade-in   { to { opacity: 1; } }
@keyframes fade-in-grain { to { opacity: 0.05; } }
@keyframes bracket-in {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes meta-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .role { display: none; }          /* le hero énonce déjà le rôle */
  .stage { padding-top: calc(var(--frame) + 3rem); }
  .lede { max-width: 28ch; }
}

/* =================================================================
   Page projet
   ================================================================= */

/* Lien retour (header, page projet) */
.back {
  font-family: var(--mono);
  font-size: var(--meta-size);
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  color: var(--paper-dim);
  transition: color 0.3s var(--ease);
}
.back:hover { color: var(--electric); }

.project {
  position: relative;
  z-index: 10;
  max-width: 64ch;
  /* la barre sticky occupe déjà le haut : on réduit le padding supérieur */
  padding: clamp(1.75rem, 4vh, 2.75rem) var(--frame) calc(var(--frame) + 2rem);
}
.project__title {
  margin: 0.9rem 0 1.3rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.project__lede {
  margin: 0 0 2rem;
  max-width: 56ch;
  font-family: var(--sans);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--paper-dim);
}
.project__meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.project__meta div { display: flex; flex-direction: column; gap: 0.35rem; }
.project__meta dt {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--meta-size);
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  color: var(--paper-faint);
}
.project__meta dd {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--paper);
}
.project__link {
  color: var(--electric);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: opacity 0.25s var(--ease);
}
.project__link:hover { opacity: 0.7; }

/* Galerie : colonnes type "masonry" (gère portrait/paysage sans JS) */
.gallery {
  position: relative;
  z-index: 10;
  column-count: 1;
  column-gap: 2px;
  padding: 0 var(--frame) calc(var(--frame) + 5rem);
}
@media (min-width: 640px)  { .gallery { column-count: 2; } }
@media (min-width: 1100px) { .gallery { column-count: 3; } }
.gallery__item {
  margin: 0 0 2px;
  break-inside: avoid;
  overflow: hidden;
}
.gallery__item img,
.gallery__item video {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(0.15) contrast(1.05);
  transition: transform 0.6s var(--ease), filter 0.4s var(--ease);
}
.gallery__item:hover img,
.gallery__item:hover video {
  transform: scale(1.03);
  filter: grayscale(0) contrast(1.05);
}

/* Emplacement de photo pas encore renseigné */
.gallery__item--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: var(--meta-size);
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  color: var(--paper-faint);
}

@media (max-width: 760px) {
  .project { padding: clamp(1.25rem, 3vh, 2rem) var(--frame) calc(var(--frame) + 1rem); }
}

/* ---------- Studio IA : héros centré, langage brutaliste du site ---------- */
.studio {
  position: relative;
  z-index: 10;
  min-height: calc(100svh - var(--frame) - 3.4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(1.2rem, 3vh, 2.2rem);
  padding: clamp(4rem, 10vh, 7rem) var(--frame);
  overflow: hidden;
}

.studio__eyebrow {
  position: relative;
  z-index: 1;
  justify-content: center;
}

/* Titre : « Studio » + « IA » dans un bloc électrique à ombre blanche dure */
.studio__title {
  position: relative;
  z-index: 1;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.1em 0.3em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(2.6rem, 12vw, 8rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--paper);
}
.studio__word { display: inline-block; }
.studio__tag {
  display: inline-block;
  padding: 0.04em 0.26em 0.1em;
  line-height: 1;
  color: var(--paper);
  background: var(--electric);
  box-shadow: 0.14em 0.14em 0 0 var(--paper);
}

/* Hairline sous le titre */
.studio__rule {
  position: relative;
  z-index: 1;
  width: clamp(140px, 30vw, 300px);
  height: 2px;
  background: var(--line-strong);
}

.studio__lede {
  position: relative;
  z-index: 1;
  max-width: 36ch;
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.6;
  color: var(--paper-dim);
}

/* Étoiles plates (motif 4 branches du site), en rotation lente */
.studio__spark {
  position: absolute;
  z-index: 0;
  width: var(--s, 22px);
  height: var(--s, 22px);
  color: var(--electric);
  pointer-events: none;
}
.studio__spark svg { display: block; width: 100%; height: 100%; }
.studio__spark path { fill: currentColor; }

/* --- Animation d'arrivée : nette, mécanique (off si reduced-motion) --- */
@media (prefers-reduced-motion: no-preference) {
  .studio__eyebrow {
    opacity: 0;
    animation: studio-fade-up 0.7s var(--ease) 0.1s forwards;
  }
  /* « Studio » : balayage rectiligne gauche → droite */
  .studio__word {
    clip-path: inset(0 100% 0 0);
    animation: studio-wipe 0.6s var(--ease) 0.35s forwards;
  }
  /* « IA » : le bloc se pose sur son ombre dure */
  .studio__tag {
    opacity: 0;
    transform: translate(-0.14em, -0.14em);
    animation: studio-snap 0.45s var(--ease) 0.8s forwards;
  }
  .studio__rule {
    transform: scaleX(0);
    animation: studio-rule-in 0.55s var(--ease) 1.05s forwards;
  }
  .studio__lede {
    opacity: 0;
    animation: studio-fade-up 0.7s var(--ease) 1.2s forwards;
  }
  .studio__spark {
    opacity: 0;
    transform: rotate(45deg) scale(0);
    animation: studio-spark-in 0.4s var(--ease) var(--d, 0.6s) forwards,
               studio-spin 12s linear calc(var(--d, 0.6s) + 0.4s) infinite;
  }
}

@keyframes studio-fade-up {
  from { opacity: 0; transform: translateY(0.8rem); }
  to { opacity: 1; transform: none; }
}
@keyframes studio-wipe {
  to { clip-path: inset(0 0 0 0); }
}
@keyframes studio-snap {
  to { opacity: 1; transform: translate(0, 0); }
}
@keyframes studio-rule-in {
  to { transform: scaleX(1); }
}
@keyframes studio-spark-in {
  to { opacity: 1; transform: rotate(45deg) scale(1); }
}
@keyframes studio-spin {
  from { transform: rotate(45deg); }
  to { transform: rotate(405deg); }
}

/* ---------- Home Staging : texte + comparateur avant/après ---------- */
.staging {
  position: relative;
  z-index: 10;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vh, 5rem) var(--frame) calc(var(--frame) + 4rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
@media (min-width: 860px) {
  .staging { grid-template-columns: 0.82fr 1fr; }
  .staging__head, .staging__carousel { min-width: 0; }
}

/* Carrousel d'exemples avant/après (navigation par flèches + points) */
.staging__carousel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}
.staging__viewport { overflow: hidden; }
.staging__track {
  display: flex;
  transition: transform 0.45s var(--ease);
}
.staging__slide {
  flex: 0 0 100%;
  min-width: 0;
}
.staging__cap {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  margin: 0 0 0.8rem;
  font-family: var(--mono);
  font-size: var(--meta-size);
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  color: var(--paper-dim);
}
.staging__cap-no { color: var(--electric); }

.staging__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.8rem, 3vw, 1.3rem);
  margin-top: clamp(1rem, 3vw, 1.4rem);
}
.staging__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: clamp(2.2rem, 5vw, 2.6rem);
  height: clamp(2.2rem, 5vw, 2.6rem);
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1;
  cursor: inherit;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.staging__btn:hover {
  color: var(--electric);
  border-color: var(--electric);
  background: rgba(31, 75, 255, 0.08);
}
.staging__dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.staging__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  background: var(--line-strong);
  cursor: inherit;
  transition: width 0.3s var(--ease), background-color 0.3s var(--ease);
}
.staging__dot.is-active {
  width: 22px;
  background: var(--electric);
}
.staging__title {
  margin: 0.9rem 0 1.1rem;
  max-width: 14ch;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.staging__lede {
  margin: 0;
  max-width: 42ch;
  font-family: var(--sans);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.6;
  color: var(--paper-dim);
}

/* Comparateur avant / après — carré, bord net, séparateur électrique */
.ba {
  --pos: 50%;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--ink-2);
  user-select: none;
  cursor: ew-resize;
  /* le glissé (souris + tactile) est géré en JS via les pointer events */
  touch-action: none;
}
.ba__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  display: block;
  pointer-events: none;
}
/* L'image « avant » est rognée à droite selon la position du curseur */
.ba__before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
/* Étiquettes mono */
.ba__tag {
  position: absolute;
  bottom: clamp(0.7rem, 2.5vw, 1rem);
  z-index: 3;
  padding: 0.38em 0.7em;
  font-family: var(--mono);
  font-size: var(--meta-size);
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  pointer-events: none;
}
.ba__tag--before {
  left: clamp(0.7rem, 2.5vw, 1rem);
  color: var(--paper);
  background: rgba(7, 7, 7, 0.6);
}
.ba__tag--after {
  right: clamp(0.7rem, 2.5vw, 1rem);
  color: var(--paper);
  background: var(--electric);
}
/* Séparateur + poignée */
.ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 2;
  width: 2px;
  margin-left: -1px;
  background: var(--electric);
  pointer-events: none;
}
.ba__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(2rem, 8vw, 2.6rem);
  height: clamp(2rem, 8vw, 2.6rem);
  background: var(--electric);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 0 0 1px var(--ink);
}
/* Curseur natif transparent qui couvre toute l'image (drag + clavier) */
.ba__range {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  margin: 0;
  background: transparent;
  /* curseur natif conservé pour le clavier uniquement ; le pointeur passe au travers */
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}
.ba__range::-webkit-slider-runnable-track { background: transparent; }
.ba__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 44px;
  height: 100%;
  background: transparent;
  cursor: ew-resize;
}
.ba__range::-moz-range-track { background: transparent; }
.ba__range::-moz-range-thumb {
  width: 44px;
  height: 100%;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: ew-resize;
}
.ba__range:focus-visible { outline: none; }
.ba:focus-within .ba__grip { box-shadow: 0 0 0 1px var(--ink), 0 0 0 3px rgba(31, 75, 255, 0.5); }

/* ---------- « More coming soon » ---------- */
.soon {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 1.3rem);
  padding: clamp(2.5rem, 9vh, 5.5rem) var(--frame) calc(var(--frame) + 4rem);
  text-align: center;
}
.soon__star {
  width: clamp(20px, 4vw, 32px);
  height: clamp(20px, 4vw, 32px);
  color: var(--electric);
  filter: drop-shadow(0 0 6px rgba(31, 75, 255, 0.45));
  animation: soon-spin 14s linear infinite;
}
.soon__star svg { display: block; width: 100%; height: 100%; }
.soon__star path { fill: currentColor; }
.soon__text {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  color: var(--paper-dim);
}
@keyframes soon-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .soon__star { animation: none; }
}

/* ---------- Footer bleu électrique ---------- */
.footer {
  position: relative;
  z-index: 10;
  overflow: hidden;
  background: var(--electric);
  color: var(--paper);
  padding: clamp(3rem, 7vw, 5.5rem) var(--frame) calc(var(--frame) + 4.5rem);
}
.footer__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: clamp(2rem, 5vw, 4rem);
}
.footer__name {
  margin: 0;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.footer__tag {
  margin: 1.1rem 0 0;
  font-family: var(--mono);
  font-size: var(--meta-size);
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  color: rgba(233, 229, 220, 0.72);
}
.footer__nav {
  display: flex;
  gap: clamp(2.5rem, 6vw, 5rem);
}
.footer__head {
  margin: 0 0 1.1rem;
  font-family: var(--mono);
  font-size: var(--meta-size);
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  color: rgba(233, 229, 220, 0.6);
}
.footer__link {
  display: block;
  width: fit-content;
  margin-bottom: 0.55rem;
  font-family: var(--sans);
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  color: var(--paper);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.footer__link:hover,
.footer__link:focus-visible {
  opacity: 0.7;
  transform: translateX(3px);
  outline: none;
}
.footer__base {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 2rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-top: 1.4rem;
  border-top: 1px solid rgba(233, 229, 220, 0.25);
  font-family: var(--mono);
  font-size: var(--meta-size);
  letter-spacing: var(--meta-track);
  text-transform: uppercase;
  color: rgba(233, 229, 220, 0.7);
}
/* Étoile discrète en filigrane, débordant du coin */
.footer__ghost {
  position: absolute;
  z-index: 0;
  right: clamp(-3rem, -2vw, -1rem);
  bottom: clamp(-4rem, -6vw, -2rem);
  width: clamp(160px, 26vw, 360px);
  opacity: 0.12;
  pointer-events: none;
}
.footer__ghost svg { display: block; width: 100%; height: 100%; }
.footer__ghost path { fill: var(--paper); }

@media (max-width: 620px) {
  .footer__base { flex-direction: column; gap: 0.4rem; }
}
