/* ==========================================================
   Renzo Cosentino — CV landing
   Palette : papier statistique + échelle viridis
   Type    : Newsreader (display) · Public Sans (texte) · IBM Plex Mono (données)
   ========================================================== */

:root {
  /* Sombre de bout en bout : le viridis n'a jamais aussi bien brillé */
  --paper: #05070a;
  --paper-translucent: rgba(5, 7, 10, 0.78);
  --surface: #0d1117;       /* cartes et panneaux */
  --tint: #0a0e15;          /* bandes de respiration entre sections */
  --ink: #f1f4f6;
  --muted: rgba(241, 244, 246, 0.72);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.55);
  --accent: #4ac16d;        /* viridis vert, lisible sur le noir */
  --accent-deep: #a0da39;   /* viridis vert-jaune */
  --accent-soft: rgba(74, 193, 109, 0.12);
  --serif: "Newsreader", "Georgia", serif;
  --sans: "Public Sans", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", monospace;
  --container: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--paper); }

.mono { font-family: var(--mono); }

/* retiré de l'écran, pas de l'accessibilité */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

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

:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Colorbar de progression de lecture ---------- */

.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 60;
  pointer-events: none;
}
.progress-fill {
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 0;
  background: linear-gradient(90deg, #440154, #365c8d, #277f8e, #1fa187, #4ac16d, #a0da39);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper-translucent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.85rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.brand-dots { display: inline-flex; gap: 4px; }
.brand-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-deep);
}
.brand-dots i:nth-child(2) { background: #277f8e; }
.brand-dots i:nth-child(3) { background: #4ac16d; }

.site-nav {
  display: flex;
  gap: 1.35rem;
  margin-left: auto;
}
.site-nav a {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0% 1.5px;
  background-position: 0 100%;
  transition: background-size 0.3s ease, color 0.2s ease;
}
.site-nav a:hover { color: var(--ink); background-size: 100% 1.5px; }
.site-nav a.is-current {
  color: var(--accent);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 100% 1.5px;
}

.header-right { display: flex; align-items: center; gap: 1rem; }

/* ---------- Sélecteur de langue : déroulant, drapeau + code ---------- */

.lang-switch { position: relative; }

.lang-current {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.34rem 0.6rem 0.34rem 0.5rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.lang-current:hover { border-color: var(--accent); background: var(--accent-soft); }

.lang-caret {
  width: 9px;
  height: 6px;
  opacity: 0.65;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.lang-current[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 5;
  list-style: none;
  min-width: 100%;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  /* fermé : escamoté vers le haut, sans clic possible */
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition:
    opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.lang-switch.open .lang-menu {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.lang-menu li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.36rem 0.7rem 0.36rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}
.lang-menu li:hover,
.lang-menu li:focus-visible { color: var(--ink); background: rgba(255, 255, 255, 0.07); }
.lang-menu li[aria-selected="true"] { color: var(--accent); }

/* --- drapeaux : dessinés en SVG, lisibles à 16 px --- */

.lang-flag,
.hero-sub-row .flag {
  flex: none;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.lang-flag {
  display: inline-block;
  width: 16px;
  height: 11px;
  background-size: cover;
  background-position: center;
}
.lang-flag[data-flag="fr"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 3 2'%3E%3Crect width='1' height='2' fill='%230055A4'/%3E%3Crect x='1' width='1' height='2' fill='%23fff'/%3E%3Crect x='2' width='1' height='2' fill='%23EF4135'/%3E%3C/svg%3E");
}
.lang-flag[data-flag="es"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 6'%3E%3Crect width='9' height='6' fill='%2375AADB'/%3E%3Crect y='2' width='9' height='2' fill='%23fff'/%3E%3Ccircle cx='4.5' cy='3' r='0.75' fill='%23F6B40E'/%3E%3C/svg%3E");
}
.lang-flag[data-flag="en"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 19 10'%3E%3Crect width='19' height='10' fill='%23fff'/%3E%3Cg fill='%23B22234'%3E%3Crect width='19' height='1'/%3E%3Crect y='2' width='19' height='1'/%3E%3Crect y='4' width='19' height='1'/%3E%3Crect y='6' width='19' height='1'/%3E%3Crect y='8' width='19' height='1'/%3E%3C/g%3E%3Crect width='8.5' height='5.5' fill='%233C3B6E'/%3E%3C/svg%3E");
}

.header-cta {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1px;
}

/* ---------- Hero : composition verrouillée sur la hauteur d'écran ----------
   Bandeau de métadonnées en haut, champ de points respirant au milieu,
   titre monumental ancré en bas. Fond sombre : le viridis n'y brille
   jamais aussi bien que sur du noir.
   ------------------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  /* plus de hauteur imposée : le bloc épouse son contenu, sans vide mort */
  /* le hero remonte sous l'en-tête collant, qui flotte alors dessus */
  margin-top: calc(-1 * var(--header-h, 60px));
  display: flex;
  align-items: stretch;
  background: transparent;
  color: #fff;
  /* on redéfinit les jetons pour toute la sous-arborescence du hero */
  --hero-bg: #05070a;
  --muted: rgba(255, 255, 255, 0.74);
  --line: rgba(255, 255, 255, 0.16);
  --ink: #ffffff;
}
/* mode capture : hauteur indépendante du viewport */
.shot .hero { min-height: 700px; }

/* le champ de points vit derrière toute la page, pas seulement le hero */
#dotField {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
/* à l'ouverture, le champ se lève lentement au lieu d'être là d'un coup */
.js #dotField { opacity: 0; transition: opacity 2.2s ease; }
.js.hero-ready #dotField { opacity: 1; }

/* --- entrée en scène du hero : même grammaire que les reveals au scroll --- */

.js .hero-intro {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(8px);
  transition:
    opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1) var(--id, 0ms),
    transform 1.5s cubic-bezier(0.16, 1, 0.3, 1) var(--id, 0ms),
    filter 1.2s cubic-bezier(0.16, 1, 0.3, 1) var(--id, 0ms);
}
.hero-ready .hero-intro {
  opacity: 1;
  transform: none;
  filter: blur(0);
}
/* les trois pastilles arrivent l'une après l'autre */
.js .hero-actions .btn {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--bd, 0ms),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--bd, 0ms),
    background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.hero-ready .hero-actions .btn { opacity: 1; transform: none; }
.hero .hero-actions .btn:nth-child(1) { --bd: 480ms; }
.hero .hero-actions .btn:nth-child(2) { --bd: 590ms; }
.hero .hero-actions .btn:nth-child(3) { --bd: 700ms; }
/* hors du hero, les boutons ne jouent pas l'intro */
.contact .hero-actions .btn { opacity: 1; transform: none; }
/* tout le reste passe devant */
.site-header, .progress, .skip-link, #main, .site-footer { position: relative; z-index: 1; }
.site-header { z-index: 50; }
.progress { z-index: 60; }

/* voile : lisibilité à gauche et en bas, points laissés nus à droite */
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(102deg,
      rgba(5, 7, 10, 0.92) 0%,
      rgba(5, 7, 10, 0.74) 42%,
      rgba(5, 7, 10, 0.26) 68%,
      rgba(5, 7, 10, 0) 88%),
    linear-gradient(to top,
      rgba(5, 7, 10, 0.88) 0%,
      rgba(5, 7, 10, 0.35) 26%,
      rgba(5, 7, 10, 0) 52%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--header-h, 60px) + clamp(1.75rem, 6vh, 4rem));
  padding-bottom: clamp(2rem, 7vh, 4.5rem);
}

/* --- bloc bas --- */

.hero-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
  padding-top: clamp(1.25rem, 3vh, 2rem);
  position: relative;
}
.hero-bottom::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1) 120ms;
}
.hero-ready .hero-bottom::before { transform: scaleX(1); }

/* l'accroche, en fonte terminal, juste sous le nom : elle s'écrit à la
   machine (voir app.js). Le curseur clignote tant que la frappe n'est pas finie. */
.hero-lede {
  position: relative;
  font-size: clamp(0.88rem, 1.32vw, 1.18rem);
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.86);
  margin-top: clamp(1rem, 2.6vh, 1.9rem);
  max-width: 56ch;
}
/* le fantôme occupe la place du texte final, le texte frappé se pose dessus */
.hero-lede-ghost { visibility: hidden; }
.hero-lede-out { position: absolute; inset: 0; }
.hero-lede-out::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 0.12em;
  vertical-align: -0.18em;
  background: #4ac16d;
  animation: caret 1.05s steps(1, end) infinite;
}
/* frappe terminée : le curseur s'efface */
.hero-lede.typed .hero-lede-out::after { display: none; }

@keyframes caret {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0; }
}

/* le nom : l'élément le plus grand de la page, sans discussion */
.hero-name {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(3rem, 11.5vw, 9rem);
  line-height: 0.86;
  letter-spacing: -0.035em;
}
.hero-name span {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: #4ac16d;
  margin-left: 0.04em;
}

/* le drapeau tient lieu de localisation : plus besoin de l'écrire */
.hero-sub-row {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.hero-sub-row .flag { margin: 0; flex: none; align-self: center; }

.hero-subtitle {
  font-size: clamp(0.76rem, 1.15vw, 0.92rem);
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.78);
  max-width: 46ch;
}

/* --- pied de hero : localisation + invite à défiler, tout en bas --- */

.hero-foot {
  margin-top: clamp(2rem, 6vh, 3.5rem);
  padding-top: clamp(1rem, 2.6vh, 1.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  flex: none;
  transition: color 0.25s ease;
}
.scroll-cue svg {
  width: 13px;
  height: 13px;
  animation: scrollCueBob 2.1s ease-in-out infinite;
}
.scroll-cue:hover { color: #a0da39; }
@keyframes scrollCueBob {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(4px); opacity: 1; }
}

/* --- aurore : nappes de couleur floues, dérive continue derrière le voile --- */

.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(min(90px, 9vw));
  mix-blend-mode: screen;
  opacity: 0.55;
  will-change: transform;
}
.aurora-blob--a {
  top: -12%;
  right: 6%;
  width: 42vw;
  height: 42vw;
  background: radial-gradient(circle, rgba(160, 218, 57, 0.55) 0%, rgba(160, 218, 57, 0) 70%);
  animation: auroraDriftA 32s ease-in-out infinite alternate;
}
.aurora-blob--b {
  bottom: -18%;
  right: 22%;
  width: 34vw;
  height: 34vw;
  background: radial-gradient(circle, rgba(39, 127, 142, 0.55) 0%, rgba(39, 127, 142, 0) 70%);
  animation: auroraDriftB 26s ease-in-out infinite alternate;
}
.aurora-blob--c {
  top: 20%;
  right: -8%;
  width: 26vw;
  height: 26vw;
  background: radial-gradient(circle, rgba(74, 193, 109, 0.5) 0%, rgba(74, 193, 109, 0) 70%);
  animation: auroraDriftC 38s ease-in-out infinite alternate;
}
@keyframes auroraDriftA {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-6%, 8%) scale(1.12); }
}
@keyframes auroraDriftB {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(8%, -6%) scale(0.92); }
}
@keyframes auroraDriftC {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-10%, 10%) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .aurora-blob { animation: none; }
  .scroll-cue svg { animation: none; }
}

/* colonne d'actions, calée à droite et en bas, alignée sur le nom */
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  min-width: 12.5rem;
}

/* pastilles en fonte terminal : plus sèches, plus proches du reste du hero */
.hero .btn,
.contact .btn {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.78rem 1.15rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.62rem;
}
/* icônes de boutons : marques (simple-icons / devicon) et pictos d'interface
   (lucide), toutes en currentColor — elles suivent la couleur du bouton, y
   compris sur le fond vert de l'appel principal */
.btn-icon {
  width: 15px;
  height: 15px;
  flex: none;
  display: block;
}

/* la flèche glisse d'un cheveu au survol */
.btn-arrow {
  margin-left: auto;
  padding-left: 0.9rem;
  font-size: 0.95em;
  opacity: 0.7;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.btn-ghost:hover .btn-arrow {
  transform: translate(2px, -2px);
  opacity: 1;
}
/* l'appel principal n'a pas de flèche : icône et libellé restent groupés */
.hero .btn-primary { justify-content: center; }

.hero .btn-primary {
  background: #4ac16d;
  color: #05070a;
  border-color: #4ac16d;
}
.hero .btn-primary:hover {
  background: #a0da39;
  border-color: #a0da39;
  color: #05070a;
}
.hero .btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.hero .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
/* bouton partagé : envoi mailto + copie rapide */
.btn-split {
  display: flex;
  align-items: stretch;
  gap: 0.38rem;
}
.btn-split .btn-primary {
  flex: 1;
}
.btn-copy {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  border-radius: 10px;
  border: 1px solid rgba(74, 193, 109, 0.42);
  background: rgba(74, 193, 109, 0.12);
  color: #4ac16d;
  cursor: pointer;
  position: relative;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-copy:hover {
  background: rgba(74, 193, 109, 0.24);
  border-color: #a0da39;
  color: #a0da39;
  transform: translateY(-1px);
}
.btn-copy:active { transform: scale(0.96); }
.btn-copy .btn-icon {
  transition: opacity 0.2s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-copy .icon-check {
  position: absolute;
  opacity: 0;
  transform: scale(0.5);
}
.btn-copy.is-copied {
  background: #4ac16d;
  border-color: #4ac16d;
  color: #05070a;
}
.btn-copy.is-copied .icon-copy { opacity: 0; transform: scale(0.5); }
.btn-copy.is-copied .icon-check { opacity: 1; transform: scale(1); }

/* le violet viridis disparaît sur le noir */
.hero :focus-visible { outline-color: #4ac16d; }

/* --- en-tête posé sur le hero sombre, tant qu'on n'a pas quitté celui-ci --- */

.site-header:not(.scrolled) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.site-header:not(.scrolled) .brand,
.site-header:not(.scrolled) .header-cta { color: #fff; }
.site-header:not(.scrolled) .header-cta { border-bottom-color: #4ac16d; }
.site-header:not(.scrolled) .site-nav a { color: rgba(255, 255, 255, 0.7); }
.site-header:not(.scrolled) .site-nav a:hover { color: #fff; }
.site-header:not(.scrolled) .site-nav a.is-current { color: #4ac16d; }
.site-header:not(.scrolled) .lang-current {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

/* ---------- Drapeaux & logos institutionnels ---------- */

.flag {
  width: 15px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
  vertical-align: baseline;
  margin-left: 0.4rem;
  box-shadow: 0 0 0 1px var(--line);
}

/* Logos sans cartouche blanche : variantes transparentes adaptées au fond sombre,
   placées sous les dates dans la colonne méta du parcours */
.org-logo-wrap {
  display: flex;
  align-items: center;
  min-height: 2.2rem;
}
.org-logo {
  display: block;
  max-height: 76px;
  width: auto;
  max-width: 176px;
  object-fit: contain;
  background: transparent;
  padding: 0;
  border-radius: 0;
  opacity: 0.88;
  transition: opacity 0.35s ease, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
}
.org-logo--wide { max-height: 76px; max-width: 198px; }
.org-logo--round { max-height: 74px; max-width: 74px; }
.job:hover .org-logo,
.job.is-active .org-logo {
  opacity: 1;
  transform: translateY(-2px) scale(1.03);
  filter: drop-shadow(0 6px 18px rgba(74, 193, 109, 0.16));
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  /* --mx / --my : attraction magnétique pilotée en JS */
  transform: translate(var(--mx, 0px), var(--my, 0px));
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding: clamp(4rem, 9vw, 6.5rem) 0;
}
/* de la place pour l'axe gradué qui ouvre la section */
.section + .section { padding-top: clamp(2.4rem, 4.5vw, 3.4rem); }

/* bandes teintées : rythme entre les sections */
.section.tint { background: rgba(255, 255, 255, 0.022); }
.section.tint, .tint + .section { padding-top: clamp(4rem, 9vw, 6.5rem); }

/* marginalia éditoriale — visible seulement quand la marge existe */
.section[data-margin]::after {
  content: attr(data-margin);
  position: absolute;
  top: clamp(1.5rem, 4vw, 3rem);
  right: clamp(0.6rem, 1.6vw, 1.4rem);
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.55;
  pointer-events: none;
}
@media (max-width: 1249px) {
  .section[data-margin]::after { display: none; }
}

.caption {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 2.6rem;
}

/* ---------- Stats (booktabs) ---------- */

.stats-table {
  border-top: 2.5px solid var(--line-strong);
  border-bottom: 2.5px solid var(--line-strong);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.stat {
  padding: 1.9rem 1.4rem 1.9rem 0;
  border-left: 1px solid var(--line);
  padding-left: 1.4rem;
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-n {
  display: block;
  font-size: clamp(2rem, 3.6vw, 2.7rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.7rem;
  font-variant-numeric: tabular-nums;
}
.stat-n sup { font-size: 55%; color: var(--accent); }
.stat:nth-child(1) .stat-n { color: var(--accent-deep); }
.stat:nth-child(2) .stat-n { color: #1f9e89; }
.stat:nth-child(3) .stat-n { color: #35b779; }
.stat:nth-child(4) .stat-n { color: #6ece58; }
.stat:nth-child(5) .stat-n { color: #2fb47c; }
.stat-label {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Systèmes ---------- */

.section-lede {
  max-width: 36rem;
  color: rgba(241, 244, 246, 0.82);
  margin: -1.6rem 0 2.6rem;
}

.systems-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
}
.system-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.7rem 1.8rem 1.5rem;
  background: var(--surface);
  overflow: hidden;
  position: relative;
  transition: border-color 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.32s ease;
}
.system-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(74, 193, 109, 0.14);
}
/* éclairage viridis piloté par le curseur sur les cartes interactives */
[data-spotlight] {
  position: relative;
}
[data-spotlight]::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 3;
  background: radial-gradient(360px circle at var(--sx, 50%) var(--sy, 50%), rgba(74, 193, 109, 0.12), transparent 62%);
  opacity: var(--so, 0);
  transition: opacity 0.3s ease;
}
/* mini-légende viridis en tête de carte — remplaçable plus tard par une capture */
.system-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, #440154, #46327e, #365c8d, #277f8e, #1fa187, #4ac16d, #a0da39, #4ac16d, #1fa187, #277f8e);
  background-size: 250% 100%;
  background-position: 0% 0;
  transition: background-position 0.9s ease;
}
.system-card:hover .system-bar { background-position: 100% 0; }

/* cartes avec capture d'écran */
.system-shot {
  position: relative;
  margin: -1.7rem -1.8rem 1.3rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  aspect-ratio: 880 / 400;
  background: var(--accent-soft);
  cursor: zoom-in;
}
.system-shot:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.system-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.system-card:hover .system-shot img { transform: scale(1.035); }
.shot-zoom {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 10, 0.78);
  border: 1px solid rgba(74, 193, 109, 0.35);
  color: #eef2f6;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(6px) scale(0.92);
  transition: opacity 0.25s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, color 0.2s ease;
}
.shot-zoom svg { width: 15px; height: 15px; display: block; }
.system-card:hover .shot-zoom,
.system-shot:focus-visible .shot-zoom {
  opacity: 1;
  transform: none;
}
.system-shot:hover .shot-zoom { border-color: var(--accent); color: var(--accent-deep); }

/* l'étiquette se pose sur la capture, et seulement au survol : elle descend
   depuis le haut de la carte. Hors flux, elle ne décale donc aucun texte. */
.system-shot .tag {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  margin: 0;
  background: rgba(5, 7, 10, 0.82);
  border-color: rgba(74, 193, 109, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(-14px);
  pointer-events: none;
  transition:
    opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.system-card:hover .system-shot .tag,
.system-card:focus-within .system-shot .tag {
  opacity: 1;
  transform: none;
}
.system-card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}
.system-card p {
  font-size: 0.95rem;
  color: rgba(241, 244, 246, 0.82);
}
/* la pile technique : les marques parlent d'elles-mêmes, le nom vit dans
   l'attribut alt (lecteurs d'écran) et dans l'infobulle au survol */
.system-tech {
  margin-top: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 20px;
}
.tech-logo {
  width: 17px;
  height: 17px;
  display: block;
  opacity: 0.72;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.system-card:hover .tech-logo { opacity: 1; }
.tech-logo:hover { transform: translateY(-2px); }
.tech-logo--invert { filter: invert(1) grayscale(1) brightness(1.85); }

/* la carte qui porte un domaine garde son texte, précédé d'un maillon */
.system-tech--url {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-transform: uppercase;
}

.systems-note {
  margin-top: 2rem;
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 44rem;
}
.systems-note-mark { color: var(--accent-deep); margin-right: 0.3rem; }

/* --- Catalogue filtrable des autres systèmes déployés --- */

.systems-extra {
  margin-top: 3rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--line);
}
.systems-extra-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}
.systems-extra-title .tools-label {
  display: block;
  margin-bottom: 0.35rem;
}
.systems-extra-title h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  line-height: 1.2;
}
.sys-filters {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.28rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
}
.filter-pill {
  position: absolute;
  top: 0.28rem;
  left: 0.28rem;
  height: calc(100% - 0.56rem);
  border-radius: 8px;
  background: rgba(74, 193, 109, 0.16);
  border: 1px solid rgba(74, 193, 109, 0.38);
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), width 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
  opacity: 0;
}
.sys-filter {
  position: relative;
  z-index: 1;
  background: none;
  border: 0;
  padding: 0.42rem 0.85rem;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease;
}
.sys-filter:hover { color: var(--ink); }
.sys-filter.is-active { color: var(--accent-deep); }

.extra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 1.15rem;
}
.extra-card {
  display: flex;
  flex-direction: column;
  padding: 1.3rem 1.35rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13, 17, 23, 0.82);
  transition:
    border-color 0.25s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.26s ease,
    box-shadow 0.28s ease;
}
.extra-card:hover {
  border-color: rgba(74, 193, 109, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.extra-card.is-hiding {
  opacity: 0;
  transform: scale(0.96) translateY(6px);
}
.extra-card.is-hidden {
  display: none;
}
.extra-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.extra-idx {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.extra-tag {
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
}
.extra-card h4 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.28;
  margin-bottom: 0.5rem;
}
.extra-card p {
  font-size: 0.88rem;
  color: rgba(241, 244, 246, 0.78);
  line-height: 1.55;
  flex: 1;
}
.extra-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--line);
}
.extra-meta span {
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.18rem 0.48rem;
}

/* ---------- Timeline ---------- */

.xp-layout { display: block; }
.xp-panel { display: none; }

.timeline {
  list-style: none;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}
/* la ligne « se dessine » au fil du scroll (--tlp piloté en JS) */
.timeline::after {
  content: "";
  position: absolute;
  left: -0.5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, #a0da39, #4ac16d, #1fa187, #277f8e, #365c8d, #440154);
  transform: scaleY(var(--tlp, 0));
  transform-origin: top;
}

.job {
  position: relative;
  display: grid;
  grid-template-columns: 212px 1fr;
  gap: 2.2rem;
  padding: 0 0 3rem 2rem;
  transition: opacity 0.25s ease;
}
.job:last-child { padding-bottom: 0.5rem; }
.job::before {
  content: "";
  position: absolute;
  left: -5.5px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dot, var(--accent));
  box-shadow: 0 0 0 4px var(--paper);
  transform: scale(0.55);
  opacity: 0.45;
  transition: transform 0.95s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.95s ease;
}
.job.lit::before {
  transform: scale(1);
  opacity: 1;
}

.job-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
}
.job-dates {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  transition: color 0.25s ease;
}
.job.is-active .job-dates { color: var(--accent); }
.job.is-active::before {
  box-shadow: 0 0 0 5px var(--paper), 0 0 0 7px rgba(74, 193, 109, 0.35), 0 0 18px var(--dot, var(--accent));
}

.job-body { position: relative; padding-right: 0; }
.job-body .job-title { transition: color 0.22s ease; }
.job:hover .job-title,
.job.is-active .job-title { color: #ffffff; }

.job-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.25;
  margin-bottom: 0.35rem;
}
.job-org {
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
.job-body ul {
  list-style: none;
}
.job-body li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.55rem;
  font-size: 0.98rem;
  color: rgba(241, 244, 246, 0.82);
}
.job-body li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.job-body strong { color: var(--ink); font-weight: 600; }

/* ---------- Panneau sticky « point de données » ---------- */

@media (min-width: 1001px) {
  .xp-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: stretch;
  }
  .xp-panel { display: block; }
  .xp-panel-inner {
    position: sticky;
    top: 120px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    padding: 1.4rem 1.6rem 1.4rem;
  }
  .xp-slides { position: relative; min-height: 276px; }
  /* chaque diapositive est une figure : le graphique d'abord, le chiffre
     ensuite. Les tracés héritent de --c, donc chacun garde sa teinte viridis. */
  .xp-plot {
    display: block;
    width: 100%;
    height: 70px;
    margin-bottom: 1rem;
    color: var(--c, var(--accent));
    overflow: visible;
  }
  /* les quinze délégations, en drapeaux plutôt qu'en barres abstraites */
  .xp-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-bottom: 1rem;
    min-height: 70px;
    align-content: center;
  }
  .xp-flags img {
    width: 20px;
    height: 15px;
    display: block;
    border-radius: 1.5px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.4s ease var(--fd, 0ms), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) var(--fd, 0ms);
  }
  .xp-slide.is-active .xp-flags img { opacity: 0.92; transform: none; }
  .xp-flags img:hover { opacity: 1; transform: translateY(-2px); }

  /* les barres se déploient à l'entrée de la diapositive : l'ancienne mesure
     s'étale, la nouvelle s'arrête bien avant — la baisse se voit se produire */
  .xp-bar { width: 0; }
  .xp-slide.is-active .xp-bar {
    width: var(--w, 0);
    transition: width 1.15s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .xp-slide.is-active .xp-bar--from { transition-delay: 120ms; }
  .xp-slide.is-active .xp-bar--to { transition-delay: 620ms; }
  .xp-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
  }
  .xp-slide.is-active { opacity: 1; transform: none; }
  .xp-big {
    font-size: 2.6rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--c, var(--accent));
    margin-bottom: 0.7rem;
    font-variant-numeric: tabular-nums;
  }
  .xp-big sup { font-size: 55%; }
  .xp-big.serif-big {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 500;
    letter-spacing: -0.01em;
  }
  .xp-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
  .xp-years {
    margin-top: 0.9rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--c, var(--accent));
  }
}

/* ---------- Mobilier de graphique : des axes gradués en guise de séparateurs
   Repris du vocabulaire de ggplot : un filet, des graduations, jamais centré.
   Purement décoratif, donc invisible aux lecteurs d'écran.
   ------------------------------------------------------------------------ */

.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(1.25rem, 4vw, 2.5rem);
  width: min(38%, 22rem);
  height: 13px;
  pointer-events: none;
  /* le filet, puis les graduations qui en descendent */
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.22)) top left / 100% 1px no-repeat,
    repeating-linear-gradient(to right,
      rgba(255, 255, 255, 0.22) 0 1px,
      transparent 1px 34px) top left / 100% 7px no-repeat;
}
/* une section sur deux bascule à droite : l'œil ne s'installe pas */
.section:nth-of-type(even) + .section::before {
  left: auto;
  right: clamp(1.25rem, 4vw, 2.5rem);
}
/* la graduation majeure, en viridis, marque le début de la section */
.section + .section::after {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(1.25rem, 4vw, 2.5rem);
  width: 2px;
  height: 18px;
  background: var(--accent);
  opacity: 0.75;
  pointer-events: none;
}
.section:nth-of-type(even) + .section::after {
  left: auto;
  right: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Méthodes ---------- */

.methods-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2.6rem;
  align-items: start;
}
/* escalier descendant — clin d'œil au scree plot */
@media (min-width: 901px) {
  .method:nth-child(2) { margin-top: 1.4rem; }
  .method:nth-child(3) { margin-top: 2.8rem; }
  .method:nth-child(4) { margin-top: 4.2rem; }
}
.method {
  border-top: 1px solid var(--line-strong);
  padding-top: 1.1rem;
}
.method h3 {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.method p {
  font-size: 0.93rem;
  color: rgba(241, 244, 246, 0.82);
}

/* le libellé reste dans la marge, le contenu défile à droite : deux paires */
.tools {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 1.6rem;
  row-gap: 2.2rem;
  align-items: start;
}
.tools > .tools-label { padding-top: 0.5rem; }
.tools-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.chips li {
  font-size: 0.78rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.chips li:hover { border-color: var(--accent); transform: translateY(-1px); }

/* --- mur de logos : marque officielle + nom composé dans la fonte du site --- */

.stack-grid {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.stack-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.95rem 0.4rem 0.6rem;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.stack-chip-plain { padding-left: 0.95rem; }
/* Microsoft a fait retirer ses marques des jeux d'icônes libres : plutôt qu'un
   faux logo, un picto neutre qui dit la nature de l'outil */
.stack-glyph {
  width: 17px;
  height: 17px;
  flex: none;
  display: block;
  color: var(--muted);
}
.stack-chip img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}
.stack-chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}
/* marques officiellement noires : invisibles sur fond sombre, on les blanchit */
.stack-chip--invert img { filter: invert(1) grayscale(1) brightness(1.85); }

/* les hexagones portent déjà leur nom écrit : on les laisse en couleur */
.hex-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
}
.hex-row img {
  width: 82px;
  height: auto;
  display: block;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.55));
  transition: transform 0.25s ease;
}
.hex-row li:hover img { transform: translateY(-4px) rotate(-3deg); }

/* ---------- Formation & langues ---------- */

.edu-langs {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
}

.edu {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 1.45rem;
  position: relative;
}
.edu--has-logo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.4rem;
  align-items: center;
}
.edu-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: transparent;
  padding: 0;
  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), filter 0.3s ease;
}
.edu-logo--seal { width: 68px; height: 68px; }
.edu:hover .edu-logo {
  opacity: 1;
  transform: scale(1.04) translateY(-2px);
  filter: drop-shadow(0 6px 16px rgba(74, 193, 109, 0.14));
}
.edu:first-child { border-top: 1px solid var(--line-strong); }
.edu h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}
.edu-org {
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.03em;
}
.edu-note {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.edu--certs {
  padding-bottom: 0.4rem;
}
.edu--certs .tools-label {
  display: block;
  margin-bottom: 0.9rem;
}
.edu-certs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.edu-certs li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.92rem;
  color: rgba(241, 244, 246, 0.86);
}
.edu-cert-meta {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.langs-col .tools-label { display: block; margin-bottom: 1.4rem; }
.langs { list-style: none; }
.lang { margin-bottom: 1.5rem; }
.lang-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.lang-level {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-align: right;
}
.bar {
  position: relative;
  height: 5px;
  background: var(--accent-soft);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-deep), #277f8e 60%, #1fa187);
  transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.on .bar-fill, .bar.on .bar-fill { width: var(--w); }
html:not(.js) .bar-fill { width: var(--w); transition: none; }
html:not(.js) .bar-target { opacity: 0.85; transition: none; }
.bar-target {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  border-right: 2px solid var(--accent);
  opacity: 0;
  transition: opacity 0.6s ease 0.9s;
}
.on .bar-target { opacity: 0.85; }

/* ---------- Recherche ---------- */

.research-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
}
.research-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.8rem 1.9rem;
  background: var(--surface);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.research-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(21, 33, 46, 0.06);
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.66rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(74, 193, 109, 0.28);
  border-radius: 7px;
  padding: 0.3rem 0.65rem 0.3rem 0.5rem;
  margin-bottom: 1rem;
}
.tag-icon {
  width: 13px;
  height: 13px;
  flex: none;
  display: block;
}
/* le travail en cours tourne doucement — le seul symbole qui bouge */
.research-card .tag-icon { animation: tag-spin 4.5s linear infinite; }
.research-card:nth-child(2) .tag-icon { animation: none; }

@keyframes tag-spin { to { transform: rotate(360deg); } }
.research-card h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.3;
  margin-bottom: 0.7rem;
}
.research-card p {
  font-size: 0.95rem;
  color: rgba(241, 244, 246, 0.82);
}
.research-link {
  display: inline-block;
  margin-top: 1.1rem;
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.research-link:hover { color: var(--accent-deep); }

/* ---------- Contact ---------- */

.contact {
  border-top: 1px solid var(--line);
  text-align: center;
}
.contact-title {
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: -0.01em;
  margin-bottom: 1.2rem;
}
.contact-lede {
  max-width: 36rem;
  margin: 0 auto 2.4rem;
  color: var(--muted);
}
/* en pied de page, les mêmes pastilles mais en ligne et centrées */
.contact .hero-actions {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  min-width: 0;
}
.contact .btn-arrow { margin-left: 0; padding-left: 0.35rem; }
.contact .btn-primary {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}
.contact .btn-primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--paper);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--muted);
}

/* ---------- Fondu au changement de langue ---------- */

main, .site-nav, .header-cta {
  transition: opacity 0.14s ease;
}
body.lang-fading main,
body.lang-fading .site-nav,
body.lang-fading .header-cta {
  opacity: 0;
}

/* ---------- Modale aperçu + Toast copie ---------- */

.shot-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  opacity: 0;
  transition: opacity 0.24s ease;
}
.shot-modal[hidden] { display: none; }
.shot-modal.is-open { opacity: 1; }
.shot-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 10, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.shot-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.72);
  transform: translateY(14px) scale(0.97);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.shot-modal.is-open .shot-modal-dialog { transform: none; }
.shot-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.shot-modal-title {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.shot-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.shot-modal-close svg { width: 16px; height: 16px; }
.shot-modal-close:hover { border-color: var(--accent); background: var(--accent-soft); }
.shot-modal-figure {
  overflow: auto;
  background: #070a0f;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0.75rem;
}
.shot-modal-figure img {
  max-width: 100%;
  max-height: calc(90vh - 5rem);
  width: auto;
  height: auto;
  border-radius: 8px;
  display: block;
}

.copy-toast {
  position: fixed;
  bottom: 1.6rem;
  left: 50%;
  z-index: 70;
  transform: translate(-50%, 16px);
  padding: 0.58rem 1.05rem;
  border-radius: 999px;
  background: rgba(13, 17, 23, 0.94);
  border: 1px solid rgba(74, 193, 109, 0.55);
  color: var(--accent-deep);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.copy-toast.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Reveal on scroll ---------- */

/* caché seulement si JS est actif — sans JS, tout reste visible */
.js .reveal {
  opacity: 0;
  transform: translateY(18px) scale(0.992);
  transition:
    opacity 0.58s cubic-bezier(0.22, 1, 0.36, 1) var(--rd, 0ms),
    transform 0.66s cubic-bezier(0.22, 1, 0.36, 1) var(--rd, 0ms);
  will-change: opacity, transform;
}
.js .reveal.on {
  opacity: 1;
  transform: none;
}
/* une fois posé, on rend la main au compositeur */
.js .reveal.settled { will-change: auto; }

/* --- cascades internes : les blocs-listes se remplissent élément par élément --- */

.js .stats-table .stat,
.js .stack-grid .stack-chip,
.js .hex-row li,
.js .chips li {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.52s cubic-bezier(0.22, 1, 0.36, 1) var(--sd, 0ms),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) var(--sd, 0ms);
}
.js .stats-table.on .stat,
.js .on .stack-grid .stack-chip,
.js .on .hex-row li,
.js .on .chips li {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .site-nav { display: none; }
  .stats-table { grid-template-columns: 1fr 1fr; }
  .stat { padding: 1.4rem 1rem 1.4rem 0; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(even) { padding-left: 1.4rem; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .methods-grid { grid-template-columns: 1fr 1fr; gap: 1.6rem; }
  .edu-langs { grid-template-columns: 1fr; }
  .research-grid { grid-template-columns: 1fr; }
  .systems-grid { grid-template-columns: 1fr; }
  .job { grid-template-columns: 1fr; gap: 0.75rem; padding-left: 1.6rem; }
  .job-meta {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.65rem 1rem;
  }
  .org-logo { max-height: 46px; max-width: 140px; }
  .org-logo--wide { max-height: 46px; max-width: 158px; }
  .org-logo--round { max-height: 48px; max-width: 48px; }
  .edu-logo { width: 52px; height: 52px; }
  .edu-logo--seal { width: 56px; height: 56px; }
  .hero-bottom { grid-template-columns: 1fr; align-items: start; gap: 1.5rem; }
  .hero-actions { flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .hero .btn { justify-content: center; gap: 0.6rem; }
  .hero-headline-rest { max-width: none; }
  .scroll-cue span { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .header-inner { gap: 0.75rem; }
  .brand-name { display: none; }
  .stats-table { grid-template-columns: 1fr; }
  .stat { border-left: 0 !important; padding-left: 0 !important; }
  .stat:nth-child(n+2) { border-top: 1px solid var(--line); }
  .methods-grid { grid-template-columns: 1fr; }
  .hero-lede { min-height: 0; }
  .extra-grid { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-intro, .hero-actions .btn {
    opacity: 1; transform: none; transition: none;
  }
  #dotField { opacity: 1; transition: none; }
  .hero-bottom::before { transform: scaleX(1); transition: none; }
  .stats-table .stat, .stack-grid .stack-chip, .hex-row li, .chips li {
    opacity: 1; transform: none; transition: none;
  }
  .bar-fill { transition: none; }
  .research-card .tag-icon { animation: none; }
  .tech-logo:hover { transform: none; }
  /* sans animation, l'étiquette reste simplement visible sur la capture */
  .system-shot .tag, .shot-zoom { opacity: 1; transform: none; transition: none; }
  .btn, .btn-copy { transform: none; transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease; }
  .chips li:hover, .research-card:hover, .system-card:hover, .extra-card:hover { transform: none; }
  .stack-chip:hover { transform: none; }
  .hex-row li:hover img { transform: none; }
  .site-nav a { transition: color 0.2s ease; }
  .timeline::after { transform: none; }
  .job::before { transform: none; opacity: 1; transition: none; }
  .xp-slide { transition: none; }
  .xp-slide.is-active .xp-bar { transition: none; }
  .xp-flags img { opacity: 0.92; transform: none; transition: none; }
  .system-bar { transition: none; }
  .system-shot img { transition: none; }
  .system-card:hover .system-shot img { transform: none; }
  .filter-pill, .extra-card, .shot-modal, .shot-modal-dialog, .copy-toast { transition: none; }
  .job:hover .org-logo, .job.is-active .org-logo, .edu:hover .edu-logo { transform: none; }
}
