/* ============================================================
   Joachim Lefevre - site de candidature
   Direction : corporate moderne, papier bleute + pervenche
   d'atmosphere, bleu profond pour les accents.
   Deux fonds seulement (papier / lavis) + une inversion encre.
   ============================================================ */

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/SpaceGrotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* -------------------- Tokens -------------------- */
:root {
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Fonds : papier et lavis pervenche. Rien d'autre. */
  --paper: #f8f9fc;
  --wash: #e9edf7;
  --chip: #e9edf7;

  --ink: #131826;
  --muted: #535d75;
  --line: #d8dfee;
  --line-strong: #c3ccE2;

  --accent: #3b4e86;
  --accent-hover: #2f4272;
  --accent-ink: #ffffff;
  --peri: #8b9cc5;

  /* Bloc contact : encre bleutée, identique en clair et en sombre. */
  --deep: #141a2b;
  --on-deep: #edf1f9;
  --on-deep-muted: #a9b4cf;
  --deep-line: rgba(233, 237, 247, 0.16);
  --deep-link: #bcc9e7;

  --measure: 62ch;
  --container: 1120px;
  --rail: 210px;

  /* Rayons : un seul système. Contrôles et médias = --r-1, conteneurs = --r-2,
     pastille de statut = pilule (seule exception assumée). */
  --r-1: 6px;
  --r-2: 10px;
  --r-pill: 999px;

  /* Ombre unique, réservée au survol du bouton primaire (affordance, pas décor). */
  --lift: 0 6px 18px -6px color-mix(in srgb, var(--accent) 55%, transparent);

  --step: clamp(3.5rem, 8vw, 6.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

/* Thème sombre : UNIQUEMENT si le visiteur l'active (bouton). La préférence
   système n'est pas suivie : tout le monde voit la version claire par défaut. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f131c;
  --wash: #161c29;
  --chip: #1d2432;
  --ink: #e9edf6;
  --muted: #9aa5bf;
  --line: #232b3c;
  --line-strong: #313b51;
  --accent: #a8bae6;
  --accent-hover: #c3d0ee;
  --accent-ink: #0f131c;
  --peri: #5a6a94;
  --deep: #0b0f18;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.2; }
p { margin: 0; }
img { display: block; max-width: 100%; }
sup { font-size: 0.6em; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }

::selection { background: var(--peri); color: var(--ink); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.skip-link {
  position: fixed;
  left: 0.75rem;
  top: -6rem;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.7rem 1.1rem;
  border-radius: var(--r-1);
  text-decoration: none;
  transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 0.75rem; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-1);
}

/* -------------------- Boutons -------------------- */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  --btn-fill: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.3rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
              color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.12s var(--ease);
}
/* Remplissage depuis le point d'entrée du curseur (clip-path, sans reflow) */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-fill);
  clip-path: circle(0% at var(--bx, 50%) var(--by, 50%));
  transition: clip-path 0.55s var(--ease-expo);
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { border-color: var(--ink); color: var(--paper); }
  .btn:hover::before { clip-path: circle(150% at var(--bx, 50%) var(--by, 50%)); }
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  --btn-fill: var(--accent-hover);
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent-hover);
  color: var(--accent-ink);
  transform: translateY(-1px);
  box-shadow: var(--lift);
}
.btn--primary:active { transform: translateY(0); box-shadow: none; }

.btn--small { min-height: 38px; padding: 0.4rem 0.9rem; font-size: 0.9rem; }
.btn--lg { min-height: 52px; padding: 0.85rem 1.7rem; font-size: 1.02rem; }

.btn--light {
  --btn-fill: var(--deep-link);
  background: var(--on-deep);
  border-color: var(--on-deep);
  color: var(--deep);
}
.btn--light:hover { background: var(--on-deep); border-color: var(--deep-link); color: var(--deep); }

/* -------------------- Navigation -------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav.is-stuck {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--paper) 95%, transparent);
}
.nav__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0.55rem clamp(1.25rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 62px;
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.nav__monogram {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-1);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.nav__links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  font-size: 0.93rem;
}
.nav__links a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  padding-block: 0.35rem;
  transition: color 0.15s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after { transform: scaleX(1); }

/* Menu mobile : <details> natif, aucun JS requis */
.menu { display: none; margin-left: auto; position: relative; }
.menu__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.menu__toggle::-webkit-details-marker { display: none; }
.menu__bars { display: grid; gap: 3.5px; }
.menu__bars i { display: block; width: 16px; height: 1.5px; background: currentColor; }
.menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 12.5rem;
  display: grid;
  padding: 0.35rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  box-shadow: 0 18px 40px -18px rgba(19, 24, 38, 0.35);
}
.menu__panel a {
  padding: 0.7rem 0.8rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--r-1);
  font-size: 0.98rem;
}
.menu__panel a:hover { background: var(--chip); }

/* Bascule de thème clair / sombre */
.theme-toggle {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-1);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--ink); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle svg {
  grid-area: 1 / 1;
  transition: transform 0.55s var(--ease-expo), opacity 0.3s var(--ease);
}
.theme-toggle__moon { opacity: 0; transform: rotate(-80deg) scale(0.4); }
:root[data-theme="dark"] .theme-toggle__sun { opacity: 0; transform: rotate(80deg) scale(0.4); }
:root[data-theme="dark"] .theme-toggle__moon { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .nav__links { display: none; }
  .menu { display: block; }
  .nav__cv { display: none; }
  .theme-toggle { margin-left: auto; }
}

/* -------------------- Hero -------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 7vw, 5rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(60% 55% at 88% 8%, color-mix(in srgb, var(--peri) 40%, transparent) 0%, transparent 70%),
    radial-gradient(50% 45% at 4% 100%, color-mix(in srgb, var(--accent) 12%, transparent) 0%, transparent 70%),
    var(--wash);
}
/* Fine trame de points */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(color-mix(in srgb, var(--accent) 22%, transparent) 1px, transparent 1.6px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 62%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 62%);
  opacity: 0.5;
  pointer-events: none;
}
/* Halos flous */
.hero__orbs { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero__orbs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}
.hero__orbs span:first-child {
  width: 42vw; height: 42vw; max-width: 460px; max-height: 460px;
  right: -6%; top: -14%;
  background: radial-gradient(circle, color-mix(in srgb, var(--peri) 75%, #fff) 0%, transparent 70%);
}
.hero__orbs span:last-child {
  width: 34vw; height: 34vw; max-width: 380px; max-height: 380px;
  left: -10%; bottom: -20%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 40%, transparent) 0%, transparent 70%);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}
.hero__kicker {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6.8vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 12ch;
  text-wrap: balance;
}
.hero__title .hm { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.06em; }
.hero__title .hw { display: inline-block; will-change: transform; }
.hero__lead {
  margin-top: 1.6rem;
  max-width: 44ch;
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  color: var(--muted);
  text-wrap: pretty;
}
.hero__actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__aside { display: flex; justify-content: flex-end; }
.portrait {
  position: relative;
  margin: 0;
  width: min(100%, 330px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--r-2);
  background: color-mix(in srgb, var(--peri) 35%, var(--wash));
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(19, 24, 38, 0.08);
  pointer-events: none;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait__name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 1.6rem 0.9rem 0.85rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-align: center;
  color: #fff;
  background: linear-gradient(to top, rgba(11, 15, 24, 0.78), rgba(11, 15, 24, 0));
}
.portrait__fallback {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  padding: 1.5rem;
  color: var(--accent);
}
.portrait__fallback span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.4rem;
  letter-spacing: 0.02em;
}
.portrait__fallback p { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.portrait__fallback code { font-size: 0.95em; }
.portrait--empty .portrait__fallback { display: flex; }

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .hero__aside { justify-content: flex-start; }
  .portrait { width: min(58%, 220px); }
  .hero__title { max-width: 22ch; }
}

/* -------------------- Sections -------------------- */
.section {
  padding-block: var(--step);
  border-bottom: 1px solid var(--line);
}
.section--wash { background: var(--wash); }

.section__grid {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: clamp(1.75rem, 5vw, 4rem);
  align-items: start;
}
.section__head { position: sticky; top: 6rem; }
.section__title {
  font-size: 1.08rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
@media (max-width: 900px) {
  .section__grid { grid-template-columns: 1fr; gap: 1rem; }
  .section__head { position: static; }
}

/* -------------------- Faits (recherche) -------------------- */
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 4vw, 3rem);
  margin: 0;
}
.facts__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
  padding-block: 0.95rem;
  border-top: 1px solid var(--line);
}
.facts__item dt {
  flex: 0 0 6.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts__item dd {
  flex: 1 1 10rem;
  margin: 0;
  font-weight: 500;
  font-size: 1.02rem;
}
@media (max-width: 620px) { .facts { grid-template-columns: 1fr; } }

/* -------------------- Parcours -------------------- */
.timeline {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.85rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0.5rem;
  bottom: 0.9rem;
  width: 1px;
  background: var(--line-strong);
}
.timeline__item { position: relative; padding-bottom: 2.35rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -1.85rem;
  top: 0.4rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--peri);
}
.section--wash .timeline__item::before { background: var(--wash); }
.timeline__item:first-child::before { background: var(--accent); border-color: var(--accent); }
.timeline__date {
  display: block;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.timeline__body h3 {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  letter-spacing: -0.015em;
}
.timeline__org { color: var(--ink); margin-top: 0.35rem; font-size: 0.98rem; }

/* -------------------- Parcours : rail horizontal -------------------- */
.parcours {
  background:
    radial-gradient(50% 60% at 100% 0%, color-mix(in srgb, var(--peri) 28%, transparent) 0%, transparent 70%),
    var(--wash);
  border-bottom: 1px solid var(--line);
}
.parcours__pin {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  padding-block: clamp(3rem, 8vw, 5rem);
  overflow: hidden;
}
.parcours__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.parcours__hint {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--peri);
}
.parcours__track {
  display: flex;
  gap: clamp(1.5rem, 5vw, 4rem);
  list-style: none;
  margin: 0;
  padding: 0 max(18vw, 3rem) 0 clamp(1.25rem, 5vw, 3rem);
  will-change: transform;
}
.milestone {
  flex: 0 0 min(86vw, 540px);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: clamp(1.75rem, 4.5vw, 3rem);
  box-shadow: 0 24px 60px -32px rgba(19, 24, 38, 0.32);
}
.milestone__date {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--accent);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.milestone h3 {
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  letter-spacing: -0.02em;
}
.milestone__org { color: var(--ink); margin-top: 0.2rem; font-size: 0.98rem; }
.milestone__note { color: var(--muted); margin-top: 0.15rem; }

/* Repli : mobile / mouvement réduit / pas de GSAP -> pile verticale simple */
@media (max-width: 780px), (prefers-reduced-motion: reduce) {
  .parcours__pin { min-height: 0; display: block; overflow: visible; padding-block: var(--step); }
  .parcours__head { max-width: var(--container); margin: 0 auto 1.75rem; padding-inline: clamp(1.25rem, 5vw, 3rem); }
  .parcours__hint { display: none; }
  .parcours__track {
    flex-direction: column;
    gap: 1rem;
    max-width: var(--container);
    margin-inline: auto;
    will-change: auto;
  }
  .milestone { flex-basis: auto; box-shadow: none; }
}
html:not(.gsap-on) .parcours__pin {
  min-height: 0;
  display: block;
  overflow: visible;
}
html:not(.gsap-on) .parcours__track { flex-wrap: wrap; }

/* Logos d'établissements / d'entreprises : détourés, couleurs d'origine. */
.org-logo {
  display: block;
  height: 30px;
  width: auto;
  max-width: 190px;
  margin-bottom: 0.6rem;
}
/* En thème sombre : fine pastille claire pour que les logos à texte foncé
   restent lisibles. */
:root[data-theme="dark"] .org-logo {
  box-sizing: content-box;
  padding: 4px 7px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--r-1);
}
.timeline__note { color: var(--muted); margin-top: 0.3rem; max-width: var(--measure); }
.timeline__tag {
  display: inline-block;
  vertical-align: 0.18em;
  margin-left: 0.55rem;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
}

/* -------------------- Expériences -------------------- */
.xp-feature { padding-bottom: clamp(2rem, 4vw, 2.75rem); }
.xp-feature__img {
  width: 100%;
  height: auto;
  aspect-ratio: 20 / 9;
  object-fit: cover;
  object-position: center 42%;
  border-radius: var(--r-2);
  border: 1px solid var(--line);
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
}
.xp-feature .tags { margin-top: 1.25rem; }
.xp-feature h3 { font-size: clamp(1.15rem, 2.1vw, 1.35rem); letter-spacing: -0.015em; }
.xp-org { color: var(--muted); font-size: 0.9rem; margin-top: 0.4rem; }
.xp-feature__text { margin-top: 1rem; max-width: var(--measure); color: var(--ink); }

.xp-list { list-style: none; margin: 0; padding: 0; }
.xp-list li {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(0.35rem, 3vw, 2.25rem);
  padding-block: 1.35rem;
  border-top: 1px solid var(--line);
}
.xp-list h3 { font-size: 1.05rem; }
.xp-list p { color: var(--muted); max-width: var(--measure); }
.xp-photo {
  width: 100%;
  height: auto;
  max-height: 300px;
  margin-top: 0.9rem;
  object-fit: cover;
  object-position: center 42%;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  display: block;
}
/* Bouton "Regarder la vidéo" */
.video-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.9rem;
  padding: 0.35rem 0.9rem 0.35rem 0.4rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}
.video-cue:hover { border-color: var(--accent); background: var(--wash); }
.video-cue__play {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
}
.video-cue__play::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5.5px 0 5.5px 9px;
  border-color: transparent transparent transparent var(--accent-ink);
  margin-left: 2px;
}
.video-cue__ext { color: var(--muted); font-size: 0.9em; }
@media (max-width: 760px) { .xp-list li { grid-template-columns: 1fr; } }

/* -------------------- Compétences -------------------- */
.skills { display: grid; gap: clamp(1.75rem, 4vw, 2.5rem); }
.skills__group h3 {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.tags li {
  background: var(--chip);
  border: 1px solid transparent;
  border-radius: var(--r-1);
  padding: 0.4rem 0.75rem;
  font-size: 0.92rem;
}
.section--wash .tags li { background: var(--paper); border-color: var(--line); }

/* -------------------- Qui je suis -------------------- */
.about__lead {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  line-height: 1.32;
  letter-spacing: -0.02em;
  max-width: 34ch;
  text-wrap: pretty;
}
.facets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-top: clamp(2rem, 5vw, 3rem);
}
.about__note {
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
  padding-top: clamp(1.25rem, 3vw, 1.75rem);
  border-top: 1px solid var(--line);
}
.about__note p { color: var(--muted); max-width: 60ch; }
.about__note-k {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.about__photo {
  width: 100%;
  height: auto;
  max-height: 260px;
  margin-top: 1rem;
  object-fit: cover;
  object-position: center 38%;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  display: block;
}
.facet { margin: 0; }
.facet img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  filter: saturate(0.9);
}
.facet figcaption { padding: 0.9rem 1.05rem 1.1rem; border-top: 1px solid var(--line); }
.facet h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.facet p { color: var(--muted); }

/* Mini-lecteur audio (une prod) */
.track {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.95rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
.track__btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease);
}
.track__btn:hover { transform: scale(1.06); background: var(--accent-hover); }
.track__btn:active { transform: scale(0.96); }
.track__glyph {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
  margin-left: 3px;
}
.track.is-playing .track__glyph {
  border: 0;
  width: 10px;
  height: 12px;
  margin-left: 0;
  background: linear-gradient(90deg,
    currentColor 0 3px, transparent 3px 7px, currentColor 7px 10px);
}
.track__body { flex: 1 1 auto; min-width: 0; }
.track__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
}
.track__title { font-family: var(--font-display); font-weight: 500; color: var(--ink); }
.track__time { color: var(--muted); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.track__bar {
  position: relative;
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--line);
  cursor: pointer;
}
.track__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: var(--r-pill);
  background: var(--accent);
}
.track__bar:hover .track__fill { background: var(--accent-hover); }
@media (max-width: 680px) { .facets { grid-template-columns: 1fr; } }

/* -------------------- Contact (inversion encre) -------------------- */
.contact {
  position: relative;
  isolation: isolate;
  background: var(--deep);
  color: var(--on-deep);
  padding-block: clamp(4rem, 9vw, 7rem);
  overflow: hidden;
}
.contact__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  opacity: 0.2;
  filter: grayscale(0.7) brightness(0.55);
}
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 80% at 15% 0%, color-mix(in srgb, var(--accent) 22%, transparent) 0%, transparent 60%),
    linear-gradient(180deg,
      color-mix(in srgb, var(--deep) 90%, transparent) 0%,
      color-mix(in srgb, var(--deep) 82%, transparent) 45%,
      var(--deep) 100%);
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.contact__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 20ch;
  text-wrap: balance;
}
.contact__lead {
  margin-top: 1.1rem;
  max-width: 42ch;
  color: var(--on-deep-muted);
  font-size: 1.05rem;
}
.contact__list {
  list-style: none;
  margin: clamp(2rem, 4vw, 2.75rem) 0 0;
  padding: 0;
  max-width: 34rem;
  font-variant-numeric: tabular-nums;
}
.contact__list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-items: baseline;
  padding-block: 0.9rem;
  border-top: 1px solid var(--deep-line);
}
.contact__list li:last-child { border-bottom: 1px solid var(--deep-line); }
.contact__list span {
  flex: 0 0 7rem;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-deep-muted);
}
.contact__list a { color: var(--deep-link); text-decoration: none; }
.contact__list a:hover { color: var(--on-deep); text-decoration: underline; }
.contact .btn--lg { margin-top: clamp(2rem, 4vw, 2.5rem); }
.contact :where(a, .btn):focus-visible { outline-color: var(--deep-link); }
@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; gap: 1.25rem; }
}
@media (max-width: 560px) {
  .contact__list li { display: grid; gap: 0.15rem; }
  .contact__list span { flex: none; }
  .contact__list a { word-break: break-word; }
}

/* -------------------- Footer -------------------- */
.footer {
  background: var(--deep);
  color: var(--on-deep-muted);
  padding-block: 1.6rem;
  font-size: 0.88rem;
  border-top: 1px solid var(--deep-line);
}
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; }
.footer a { color: var(--on-deep-muted); text-decoration: none; }
.footer a:hover { color: var(--on-deep); }
.footer a:focus-visible { outline-color: var(--deep-link); }

/* -------------------- Apparitions -------------------- */
/* Le contenu est visible par défaut. Le JS ajoute .js-anim sur <html>
   avant la peinture : sans JS (ou en cas d'erreur), rien n'est masqué. */
.js-anim .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-expo), transform 1s var(--ease-expo);
  transition-delay: var(--d, 0ms);
}
.js-anim .reveal.is-in { opacity: 1; transform: none; }

/* .facet est aussi un .reveal : garder la transition de survol
   (transform / bordure) en plus du fondu d'apparition. */
.js-anim .facet {
  transition: opacity 0.8s var(--ease-expo), transform 1s var(--ease-expo),
              border-color 0.25s var(--ease);
}

.timeline__item:nth-child(2) { --d: 70ms; }
.timeline__item:nth-child(3) { --d: 140ms; }
.facet:nth-child(2) { --d: 80ms; }
.xp-list li:nth-child(2) { --d: 80ms; }
.skills__group:nth-child(2) { --d: 90ms; }
.skills__group:nth-child(3) { --d: 180ms; }

/* -------------------- Micro-animations -------------------- */

/* Barre de progression de lecture (fine, en haut) */
.scroll-bar {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--accent);
  z-index: 100;
  pointer-events: none;
}

/* Survols : ressenti, pas spectacle */
.btn { will-change: transform; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }

.nav__monogram { transition: transform 0.2s var(--ease); }
.nav__logo:hover .nav__monogram { transform: scale(1.06) rotate(-3deg); }

.tags li { transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), background-color 0.18s var(--ease); }
.tags li:hover { transform: translateY(-2px); border-color: var(--line-strong); }

.facet {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.facet:hover { border-color: var(--line-strong); }

/* Le bloc "Stage Eurobedding" n'est pas une carte (fond transparent) :
   aucun effet de survol dessus, ça n'a pas de sens. */

.video-cue__play, .video-cue__ext { transition: transform 0.2s var(--ease); }
.video-cue:hover .video-cue__play { transform: scale(1.1); }
.video-cue:hover .video-cue__ext { transform: translate(2px, -2px); }

/* -------------------- Déco & finition avancée -------------------- */

/* Grain : voile de bruit fixe, imperceptible mais "fini". */
.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.035;
  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.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .grain { opacity: 0.06; }

/* Bandeau "En bref" */
.stats {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.stats__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  padding-block: 0;
  background: var(--line);
  border-inline: 1px solid var(--line);
}
.stat {
  background: var(--paper);
  padding: clamp(1.4rem, 4vw, 2.1rem) clamp(1rem, 3vw, 1.6rem);
  text-align: center;
}
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stat__label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-wrap: balance;
}
@media (max-width: 720px) {
  .stats__row { grid-template-columns: repeat(2, 1fr); }
}

/* Marquee des outils (déco, contenu déjà listé au-dessus) */
.skills-wrap { min-width: 0; }
.marquee {
  min-width: 0;
  width: 100%;
  margin-top: clamp(2rem, 5vw, 3rem);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: inline-flex;
  gap: 0.7rem;
  white-space: nowrap;
  will-change: transform;
}
.marquee__track span {
  flex: 0 0 auto;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--paper);
}
.section--wash .marquee__track span { background: var(--wash); }

/* Cartes 3D (léger) */
.facet[data-tilt] { transform-style: preserve-3d; }
.facet[data-tilt].is-tilting { transition: border-color 0.3s var(--ease); }

/* Égaliseur du lecteur audio */
.track__eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  margin-left: 0.5rem;
  vertical-align: -1px;
}
.track.is-playing .track__eq { display: inline-flex; }
.track__eq i {
  width: 3px;
  height: 40%;
  border-radius: 1px;
  background: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  /* Entrée du hero, en cascade */
  @keyframes rise-in {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
  }
  .hero__kicker, .hero__title, .hero__lead, .hero__actions, .hero__aside {
    animation: rise-in 0.6s var(--ease) backwards;
  }
  .hero__kicker  { animation-delay: 0.05s; }
  .hero__aside   { animation-delay: 0.12s; }
  .hero__title   { animation-delay: 0.14s; }
  .hero__lead    { animation-delay: 0.24s; }
  .hero__actions { animation-delay: 0.34s; }
  /* Quand GSAP pilote l'intro, on coupe la cascade CSS */
  .gsap-on .hero__kicker, .gsap-on .hero__title,
  .gsap-on .hero__lead, .gsap-on .hero__actions, .gsap-on .hero__aside {
    animation: none;
  }

  /* Panneau "Ce que je recherche" : les faits apparaissent un à un */
  .js-anim .facts.is-in .facts__item {
    animation: rise-in 0.45s var(--ease) backwards;
  }
  .js-anim .facts.is-in .facts__item:nth-child(1) { animation-delay: 0.03s; }
  .js-anim .facts.is-in .facts__item:nth-child(2) { animation-delay: 0.09s; }
  .js-anim .facts.is-in .facts__item:nth-child(3) { animation-delay: 0.15s; }
  .js-anim .facts.is-in .facts__item:nth-child(4) { animation-delay: 0.21s; }
  .js-anim .facts.is-in .facts__item:nth-child(5) { animation-delay: 0.27s; }
  .js-anim .facts.is-in .facts__item:nth-child(6) { animation-delay: 0.33s; }

  /* Barre de progression + trait de la frise : pilotés par le scroll,
     sans écouteur JS. Navigateurs non compatibles : simplement absents. */
  @supports (animation-timeline: scroll()) {
    .scroll-bar {
      animation: bar-grow linear both;
      animation-timeline: scroll(root);
      animation-duration: auto;
    }
    @keyframes bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  }
  @supports (animation-timeline: view()) {
    .timeline::before {
      transform: scaleY(0);
      transform-origin: top;
      animation: line-draw linear both;
      animation-timeline: view();
      animation-range: entry 8% cover 45%;
      animation-duration: auto;
    }
    @keyframes line-draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  }

  /* Halos du hero : dérive très lente */
  @keyframes orb-drift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(-4%, 5%, 0) scale(1.08); }
    100% { transform: translate3d(0, 0, 0) scale(1); }
  }
  .hero__orbs span { animation: orb-drift 18s ease-in-out infinite; }
  .hero__orbs span:last-child { animation-duration: 24s; animation-direction: reverse; }

  /* Marquee outils */
  @keyframes marquee-scroll { to { transform: translateX(-50%); } }
  .marquee__track { animation: marquee-scroll 32s linear infinite; }
  .marquee:hover .marquee__track { animation-play-state: paused; }

  /* Égaliseur audio */
  @keyframes eq-bounce { 0%, 100% { height: 25%; } 50% { height: 95%; } }
  .track.is-playing .track__eq i { animation: eq-bounce 0.9s ease-in-out infinite; }
  .track.is-playing .track__eq i:nth-child(2) { animation-duration: 0.7s; animation-delay: -0.2s; }
  .track.is-playing .track__eq i:nth-child(3) { animation-duration: 1.1s; animation-delay: -0.5s; }
  .track.is-playing .track__eq i:nth-child(4) { animation-duration: 0.8s; animation-delay: -0.1s; }
}

/* ============================================================
   Motion design - couche de finition (ajoutée, structure inchangée)
   Tout ce qui est masqué au départ dépend de .js-anim (posé par le JS
   uniquement si le mouvement n'est pas réduit) : sans JS, tout est visible.
   ============================================================ */

/* ---- Navigation : verre, indicateur glissant, menu mobile ---- */
.nav { transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.3s var(--ease); }
.nav.is-stuck {
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 14px 30px -26px rgba(19, 24, 38, 0.5);
}
.nav__links { position: relative; }
.nav__ind {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1.5px;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: translateX(var(--x, 0px)) scaleX(var(--w, 0));
  opacity: 0;
  pointer-events: none;
}
.nav__ind.is-ready { transition: transform 0.5s var(--ease-expo), opacity 0.25s var(--ease); }
.nav__links.has-ind a::after { display: none; }

.menu__bars i { transition: transform 0.35s var(--ease-expo), opacity 0.2s var(--ease); transform-origin: center; }
.menu[open] .menu__bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu[open] .menu__bars i:nth-child(2) { opacity: 0; transform: scaleX(0.3); }
.menu[open] .menu__bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---- Hero : pastille de disponibilité (verre), lettres du titre ---- */
.hero__title .hc { display: inline-block; will-change: transform; }
.portrait__status {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.75rem 0.32rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: #fff;
  background: rgba(11, 15, 24, 0.38);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--r-pill);
}
@media (max-width: 880px) {
  .portrait__status { top: 0.6rem; left: 0.6rem; font-size: 0.66rem; padding: 0.26rem 0.6rem 0.26rem 0.5rem; gap: 0.4rem; }
}
.portrait__status i {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5fe0a6;
}
.portrait__status i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
}

/* ---- Titres : mots masqués qui remontent ---- */
.js-anim .split .sw {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.js-anim .split .sw__i {
  display: inline-block;
  transform: translateY(112%);
  transition: transform 1.1s var(--ease-expo);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.js-anim .split.is-in .sw__i { transform: none; }
.lw { display: inline; }

/* ---- Images : cadre masquant, révélation en rideau, zoom lent ---- */
.media { position: relative; display: block; overflow: hidden; }
.media--boxed { border: 1px solid var(--line); border-radius: var(--r-2); }
.media--feature { margin-bottom: clamp(1.25rem, 3vw, 1.75rem); }
.media--photo { margin-top: 0.9rem; }
.media--about { margin-top: 1rem; }
.media > img {
  margin: 0;
  border: 0;
  border-radius: 0;
  scale: 1.1;
  will-change: transform;
}
/* Le rideau est sur l'image, pas sur le cadre : un élément entièrement masqué
   par son propre clip-path n'est jamais "visible" pour IntersectionObserver. */
.js-anim .media--boxed { border-color: transparent; transition: border-color 0.8s var(--ease); }
.js-anim .media--boxed.is-in { border-color: var(--line); }
.js-anim .media > img {
  clip-path: inset(0 0 100% 0);
  scale: 1.28;
  transition: clip-path 1.25s var(--ease-expo), scale 1.9s var(--ease-expo);
}
.js-anim .media.is-in > img { clip-path: inset(0 0 0 0); scale: 1.1; }
@media (hover: hover) and (pointer: fine) {
  .js-anim .media.is-in:hover > img { scale: 1.15; transition-duration: 1.2s; }
}

/* ---- Filets qui se tracent ---- */
.facts__item, .xp-list li { position: relative; border-top: 0; }
.facts__item::before, .xp-list li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
  transform-origin: left;
}
.facts__item:nth-child(2) { --i: 1; } .facts__item:nth-child(3) { --i: 2; }
.facts__item:nth-child(4) { --i: 3; } .facts__item:nth-child(5) { --i: 4; }
.facts__item:nth-child(6) { --i: 5; }
.js-anim .facts__item::before, .js-anim .xp-list li::before { transform: scaleX(0); }
.js-anim .facts.is-in .facts__item::before {
  transform: none;
  transition: transform 1.3s var(--ease-expo) calc(var(--i, 0) * 80ms);
}
.js-anim .xp-list li.is-in::before { transform: none; transition: transform 1.3s var(--ease-expo) 0.1s; }

.contact__list li { position: relative; border-top: 0; }
.contact__list li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--deep-line);
  transform-origin: left;
}
.contact__list li:nth-child(2) { --i: 1; } .contact__list li:nth-child(3) { --i: 2; }
.contact__list li:nth-child(4) { --i: 3; }
.js-anim .contact__list li::before { transform: scaleX(0); }
.js-anim .contact__list.is-in li::before {
  transform: none;
  transition: transform 1.3s var(--ease-expo) calc(var(--i, 0) * 90ms);
}

.stat:nth-child(2) { --d: 70ms; } .stat:nth-child(3) { --d: 140ms; } .stat:nth-child(4) { --d: 210ms; }

/* ---- Cartes : halo qui suit le curseur ---- */
[data-spot] { position: relative; }
[data-spot]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--accent) 14%, transparent), transparent 65%);
}
[data-spot].is-spot::after { opacity: 1; }
.milestone.is-tilting { transition: none; }

/* Boutons magnétiques : pas de transition sur le transform pendant le suivi */
.btn.is-mag { transition-property: border-color, color, box-shadow; }

/* ---- Parcours : rail de progression et grand repère typographique ---- */
.parcours__pin { position: relative; }
.parcours__head, .parcours__track { position: relative; z-index: 1; }
.parcours__rail {
  flex: 1 1 auto;
  align-self: center;
  height: 1px;
  margin-left: clamp(1rem, 3vw, 2rem);
  background: var(--line-strong);
  overflow: hidden;
}
.parcours__rail i {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
}
.parcours__ghost {
  position: absolute;
  left: 0;
  bottom: -0.1em;
  z-index: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(8rem, 24vw, 21rem);
  line-height: 1;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--accent) 20%, transparent);
  pointer-events: none;
  user-select: none;
}
@media (max-width: 780px) { .parcours__ghost, .parcours__rail { display: none; } }

/* Marquee : quand GSAP le pilote (vitesse liée au scroll), on coupe l'animation CSS */
.gsap-on .marquee__track { animation: none; }

/* ---- Bascule de thème : révélation circulaire depuis le bouton ---- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes nav-in { from { transform: translateY(-100%); } }
  .nav { animation: nav-in 0.9s var(--ease-expo) 0.05s backwards; }

  @keyframes menu-in { from { opacity: 0; transform: translateY(-8px) scale(0.96); } }
  .menu[open] .menu__panel { transform-origin: 100% 0; animation: menu-in 0.24s var(--ease-expo); }
  .menu[open] .menu__panel a { animation: rise-in 0.4s var(--ease-expo) backwards; }
  .menu[open] .menu__panel a:nth-child(2) { animation-delay: 0.04s; }
  .menu[open] .menu__panel a:nth-child(3) { animation-delay: 0.08s; }
  .menu[open] .menu__panel a:nth-child(4) { animation-delay: 0.12s; }
  .menu[open] .menu__panel a:nth-child(5) { animation-delay: 0.16s; }
  .menu[open] .menu__panel a:nth-child(6) { animation-delay: 0.2s; }

  @keyframes status-ping { 0% { transform: scale(1); opacity: 0.7; } 80%, 100% { transform: scale(3); opacity: 0; } }
  .portrait__status i::after { animation: status-ping 2.2s var(--ease-expo) infinite; }

  @keyframes tag-in { from { opacity: 0; transform: translateY(10px) scale(0.96); } }
  .js-anim .reveal.is-in .tags li {
    animation: tag-in 0.6s var(--ease-expo) backwards;
    animation-delay: calc(var(--ti, 0) * 38ms + 180ms);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .js-anim .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav, .skip-link, .contact__bg, .hero__actions, .menu { display: none !important; }
  html { scroll-padding-top: 0; }
  body { background: #fff; color: #000; font-size: 10.5pt; line-height: 1.45; }
  .container { max-width: none; padding-inline: 0; }
  .hero, .section, .contact, .footer {
    background: #fff !important;
    color: #000 !important;
    border-color: #ccc;
    padding-block: 0.9rem;
  }
  .hero { padding-top: 0; }
  .section__grid, .contact__grid, .hero__grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .section__head { position: static; }
  .hero__title { font-size: 20pt; }
  .about__lead { font-size: 12pt; }
  .contact__title { font-size: 15pt; color: #000 !important; }
  .contact__lead, .contact__list span, .contact__list a,
  .timeline__note, .facet p, .xp-list p, .xp-org, .hero__lead { color: #222 !important; }
  a { color: #000; text-decoration: none; }
  .portrait { width: 34mm; }
  .portrait__name { display: none; }
  .xp-feature__img, .facet img { max-height: 42mm; border: 1px solid #ccc; }
  .facets { grid-template-columns: 1fr 1fr; }
  .proof, .timeline__item, .xp-list li, .facet, .skills__group { break-inside: avoid; }
  .contact__list a::after { content: " " attr(href); font-size: 8.5pt; color: #555; }
  .contact__list a[href^="mailto:"]::after,
  .contact__list a[href^="tel:"]::after { content: ""; }
  .portrait__status, .nav__ind, .parcours__ghost, .parcours__rail { display: none !important; }
  .js-anim .reveal, .js-anim .split .sw__i, .js-anim .media > img {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .media > img { scale: 1 !important; }
  .js-anim .media--boxed { border-color: #ccc !important; }
  .facts__item::before, .xp-list li::before { transform: none !important; }
}
