/* ===== Polices auto-hébergées (CSP font-src 'self') ===== */
@font-face { font-family: "Big Shoulders Display"; src: url("../fonts/bsd-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Big Shoulders Display"; src: url("../fonts/bsd-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plexsans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plexsans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plexsans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plexmono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plexmono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* ===== Jetons ===== */
:root {
  /* Thème clair : par défaut */
    --bg: #f3f1ea; --bg-2: #eae7de; --bg-3: #e1ddd1; --line: #d8d3c6; --line-2: #bfb9aa;
    --text: #15171b; --muted: #545a62;
    --accent: #c2ec2c; --accent-hover: #b3dc1c; --accent-ink: #4a6800; --accent-line: #7a9f00;
    --accent-dim: rgba(122, 159, 0, 0.12); --on-accent: #15171b;
    --nav-bg: rgba(243, 241, 234, 0.85); --danger: #b3261e; --grain-opacity: 0.06;


  --f-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --f-sans: "IBM Plex Sans", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 1320px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}
/* Thème sombre : sur choix du visiteur (bouton en haut à droite) */
:root[data-theme="dark"] {
  --bg: #0d0f12; --bg-2: #13161b; --bg-3: #1a1e25; --line: #262b33; --line-2: #353b45;
  --text: #ece9e2; --muted: #9ba1aa;
  --accent: #c8f03c; --accent-hover: #d8ff55; --accent-ink: #c8f03c; --accent-line: #c8f03c;
  --accent-dim: rgba(200, 240, 60, 0.14); --on-accent: #0d0f12;
  --nav-bg: rgba(13, 15, 18, 0.82); --danger: #ff8a7a; --grain-opacity: 0.05;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html, body { overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--on-accent); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

/* ===== Boutons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.4rem;
  font: 500 0.95rem/1 var(--f-sans);
  text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, color .2s;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ===== Navigation ===== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__brand { font: 800 1.35rem/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; text-decoration: none; }
.nav__links { display: flex; align-items: center; gap: 1.75rem; }
.nav__links a { font-size: .92rem; color: var(--muted); text-decoration: none; transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__links .nav__cta { color: var(--accent-ink); }
@media (max-width: 820px) {
  .nav__links a:not(.nav__cta) { display: none; }
}

/* ===== Hero ===== */
.hero {
  min-height: 100dvh;
  max-width: var(--max); margin: 0 auto;
  padding: calc(var(--nav-h) + 3rem) var(--gutter) 4rem;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hero__title {
  font: 800 clamp(4.5rem, 11vw, 10.5rem)/0.86 var(--f-display);
  text-transform: uppercase; letter-spacing: -0.01em;
  display: flex; flex-direction: column;
}
.hero__line { display: block; overflow: hidden; padding-top: .14em; margin-top: -.14em; padding-bottom: .04em; }
.hero__line .ch { display: inline-block; will-change: transform; }
.hero__line:last-child { color: var(--accent-ink); }
.hero__lead { margin-top: 1.75rem; max-width: 34ch; font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); }
.hero__actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: .75rem; }

/* Trajet mesuré */
.route {
  margin: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 1.5rem 1.5rem 1.25rem;
}
.route__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.route__title { font-size: .95rem; color: var(--muted); }
.route__total { font: 500 1.6rem/1 var(--f-mono); color: var(--accent-ink); white-space: nowrap; }
.route__hops { position: relative; padding: 1.25rem 0 .25rem; }
.route__hops::before {
  content: ""; position: absolute; left: 7px; top: 2rem; bottom: 1.4rem;
  width: 2px; background: var(--line-2);
}
.route__hops::after {
  content: ""; position: absolute; left: 7px; top: 2rem;
  width: 2px; height: calc(100% - 3.4rem);
  background: var(--accent-line);
  transform-origin: top; transform: scaleY(var(--progress, 0));
}
.hop {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 1rem;
  padding: .8rem 0;
}
.hop__dot { width: 16px; height: 16px; border-radius: 50%; background: var(--bg-2); border: 2px solid var(--line-2); transition: border-color .3s, background-color .3s, box-shadow .3s; }
.hop__name { font-size: 1rem; color: var(--muted); transition: color .3s; }
.hop__value { font: 400 .95rem/1 var(--f-mono); color: var(--muted); white-space: nowrap; }
.hop.is-on .hop__dot { border-color: var(--accent-line); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-dim); }
.hop.is-on .hop__name { color: var(--text); }
.hop.is-on .hop__value { color: var(--text); }
.route__note { margin-top: .75rem; padding-top: .9rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: calc(var(--nav-h) + 2.5rem); }
}

/* ===== Trajet : rail + chapitres ===== */
.journey {
  max-width: var(--max); margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid; grid-template-columns: 180px 1fr; gap: clamp(2rem, 5vw, 5rem);
}
.rail { position: relative; }
.rail__track, .rail__steps { position: sticky; top: calc(var(--nav-h) + 3rem); }
.rail__track { float: left; width: 2px; height: 260px; background: var(--line-2); margin-right: 1.25rem; }
.rail__fill { width: 100%; height: 100%; background: var(--accent-line); transform-origin: top; transform: scaleY(0); }
.rail__steps { display: flex; flex-direction: column; justify-content: space-between; height: 260px; }
.rail__steps li { font: 500 .85rem/1 var(--f-mono); color: var(--muted); transition: color .3s; }
.rail__steps li.is-active { color: var(--accent-ink); }

.chapter { padding: clamp(4.5rem, 9vw, 7.5rem) 0; border-top: 1px solid var(--line); }
.chapter__hop { font: 400 .9rem/1.5 var(--f-mono); color: var(--accent-ink); margin-bottom: 1.1rem; }
.chapter__title {
  font: 800 clamp(2.4rem, 5.2vw, 4.4rem)/0.98 var(--f-display);
  text-transform: uppercase; letter-spacing: -0.005em;
  max-width: 18ch;
}

/* 1. Profil : déclaration + trois groupes */
.profil { margin-top: 2.5rem; display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; }
.profil__lead { font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.45; }
.profil__body { color: var(--muted); }
.skills { margin-top: 3.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.skills__group { background: var(--bg); padding: 1.75rem 1.5rem; }
.skills__group:nth-child(2) { background: var(--bg-2); }
.skills__group h3 { font: 800 1.6rem/1 var(--f-display); text-transform: uppercase; color: var(--accent-ink); margin-bottom: 1rem; }
.skills__group li { padding: .3rem 0; color: var(--text); }

/* 2. Infra : texte + état du serveur */
.infra { margin-top: 2.5rem; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.infra__text > p { font-size: 1.15rem; max-width: 55ch; }
.infra__list { margin-top: 2rem; display: grid; gap: 1.1rem; }
.infra__list li { padding-left: 1.4rem; position: relative; color: var(--muted); }
.infra__list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 2px; background: var(--accent-line); }
.infra__list strong { color: var(--text); font-weight: 600; }

.status { background: var(--bg-2); border: 1px solid var(--line); padding: 1.5rem; }
.status__title { font-size: .95rem; color: var(--muted); margin-bottom: 1.25rem; }
.status__grid { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--bg-2); padding: 1.1rem 1rem 1.25rem; }
.stat dt { font-size: .82rem; color: var(--muted); line-height: 1.35; min-height: 2.7em; }
.stat dd { margin: .5rem 0 0; font: 500 1.05rem/1 var(--f-mono); color: var(--muted); }
.stat dd span { font-size: 2.1rem; color: var(--text); margin-right: .15em; }
.status__meta { margin-top: 1rem; font-size: .8rem; color: var(--muted); }

/* 3. Parcours : frise */
.timeline { margin-top: 3rem; }
.timeline__item {
  display: grid; grid-template-columns: 170px 1fr; gap: 2rem;
  padding: 1.75rem 0;
}
.timeline__item + .timeline__item { border-top: 1px solid var(--line); }
.timeline__date { font: 400 .9rem/1.6 var(--f-mono); color: var(--muted); padding-top: .2rem; }
.timeline__item h3 { font-size: 1.2rem; font-weight: 600; line-height: 1.35; }
.timeline__item p:not(.timeline__date) { margin-top: .5rem; color: var(--muted); max-width: 62ch; }
.timeline__item--key h3 { font: 800 clamp(1.7rem, 3vw, 2.3rem)/1.05 var(--f-display); text-transform: uppercase; }
.timeline__item--key .timeline__date { color: var(--accent-ink); }

/* 4. Formation : bloc principal + côté + certifs */
.formation { margin-top: 3rem; display: grid; grid-template-columns: 1.4fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.formation > * { background: var(--bg); padding: clamp(1.5rem, 3vw, 2.5rem); }
.formation__main { grid-row: span 2; background: var(--bg-3); }
.formation__years { font: 400 .88rem/1 var(--f-mono); color: var(--accent-ink); margin-bottom: .9rem; }
.formation h3 { font-size: 1.35rem; line-height: 1.3; margin-bottom: .6rem; }
.formation__main h3 { font: 800 clamp(2rem, 3.4vw, 2.8rem)/1 var(--f-display); text-transform: uppercase; margin-bottom: 1rem; }
.formation p { color: var(--muted); }
.formation__search { margin-top: 1.75rem; padding: 1rem 1.1rem; border-left: 2px solid var(--accent-line); background: var(--accent-dim); color: var(--text) !important; }
.certs h3 { font-size: 1rem; color: var(--muted); font-weight: 500; }
.certs ul { margin-top: .9rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.certs li { font-size: .88rem; padding: .35rem .7rem; border: 1px solid var(--line-2); }

/* 5. Contact */
.contact { margin-top: 2.5rem; display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contact__intro { font-size: 1.15rem; color: var(--muted); max-width: 38ch; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form__row { display: flex; flex-direction: column; gap: .45rem; }
.form__row--full, .form__actions { grid-column: 1 / -1; }
.form label { font-size: .9rem; color: var(--text); }
.form input, .form textarea {
  font: inherit; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line-2);
  padding: .85rem 1rem; border-radius: 0;
  transition: border-color .2s, background-color .2s;
}
.form textarea { resize: vertical; min-height: 150px; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent-line); background: var(--bg-3); }
.form__honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__actions { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.form__status { font-size: .95rem; }
.form__status.is-error { color: var(--danger); }
.form__status.is-success { color: var(--accent-ink); }
.contact__fallback { grid-column: 2; font-size: .9rem; color: var(--muted); }
.contact__fallback a { color: var(--text); }

/* ===== Pied de page ===== */
.footer {
  max-width: var(--max); margin: 0 auto;
  padding: 2.5rem var(--gutter) 3rem;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem;
  font-size: .88rem; color: var(--muted);
}
.footer__links { display: flex; gap: 1.5rem; }
.footer__links a { color: var(--muted); }
.footer__links a:hover { color: var(--text); }
.footer__meta { flex-basis: 100%; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .journey { grid-template-columns: 1fr; }
  .rail { display: none; }
}
@media (max-width: 860px) {
  .profil, .infra, .contact { grid-template-columns: 1fr; }
  .status { position: static; }
  .formation { grid-template-columns: 1fr; }
  .formation__main { grid-row: auto; }
  .contact__fallback { grid-column: 1; }
}
@media (max-width: 640px) {
  .skills { grid-template-columns: 1fr; }
  .timeline__item { grid-template-columns: 1fr; gap: .5rem; }
  .form { grid-template-columns: 1fr; }
  .status__grid { grid-template-columns: 1fr 1fr; }
  .stat dd span { font-size: 1.7rem; }
  .hop { gap: .75rem; }
  .hop__name { font-size: .95rem; }
}

/* ===== Mouvement réduit ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ===== Ajouts : rail cliquable, voyant, schéma, projet ===== */
.rail__steps a { color: inherit; text-decoration: none; }
.rail__steps a:hover { color: var(--text); }

.live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: .6rem; vertical-align: middle; position: relative; top: -1px; }
.live.is-up { background: var(--accent); }
.live.is-up::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--accent-line); opacity: 0; animation: live 2.4s var(--ease) infinite; }
@keyframes live { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }

.chapter__title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-top: .12em; margin-top: -.12em; }
.chapter__title .w > span { display: inline-block; }

/* Schéma d'infrastructure */
.archi { margin: clamp(3.5rem, 7vw, 5.5rem) 0 0; padding: clamp(1.5rem, 3vw, 2.25rem); border: 1px solid var(--line); background: var(--bg-2); }
.archi__cap { font-size: .95rem; color: var(--muted); margin-bottom: 1.75rem; }
.archi__flow { display: grid; grid-template-columns: auto minmax(24px, .6fr) auto minmax(24px, .6fr) auto minmax(24px, .6fr) 3.4fr; align-items: center; }
.archi__node { font: 500 .9rem/1.2 var(--f-mono); padding: .8rem 1rem; border: 1px solid var(--line-2); background: var(--bg); white-space: nowrap; }
.archi__link { height: 2px; background: var(--accent-line); transform-origin: left; }
.archi__zone { border: 1px dashed var(--line-2); padding: 1rem; display: grid; grid-template-columns: 1.4fr 1fr; gap: .75rem; }
.archi__zone-name { grid-column: 1 / -1; font: 400 .8rem/1 var(--f-mono); color: var(--muted); }
.archi__vm { border: 1px solid var(--line-2); background: var(--bg); padding: .9rem 1rem; }
.archi__vm--main { border-color: var(--accent-line); }
.archi__vm-name { font-weight: 600; font-size: .95rem; margin-bottom: .6rem; }
.archi__vm ul { display: flex; flex-wrap: wrap; gap: .35rem; }
.archi__vm li { font: 400 .78rem/1 var(--f-mono); color: var(--muted); padding: .35rem .5rem; background: var(--bg-3); }

/* Projet Moyspisok */
.project { margin-top: 1px; display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(1.5rem, 4vw, 4rem); padding: clamp(2rem, 4vw, 3rem) 0 0; }
.project__title { font: 800 clamp(1.9rem, 3.4vw, 2.8rem)/1 var(--f-display); text-transform: uppercase; max-width: 14ch; }
.project__body p + p { margin-top: 1rem; }
.project__body p { color: var(--muted); max-width: 60ch; }
.project__body p:first-child { color: var(--text); font-size: 1.1rem; }
.project__tags { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.project__tags li { font-size: .85rem; padding: .35rem .7rem; border: 1px solid var(--line-2); }

.skills__group { position: relative; transition: background-color .3s; }
.skills__group::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: var(--accent-line); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.skills__group:hover::before { transform: scaleX(1); }

@media (max-width: 960px) {
  .archi__flow { grid-template-columns: 1fr; justify-items: start; }
  .archi__link { width: 2px; height: 22px; margin-left: 1.25rem; transform-origin: top; }
  .archi__zone { width: 100%; grid-template-columns: 1fr; }
  .project { grid-template-columns: 1fr; }
}

/* ===== Pages légales ===== */
.legal { max-width: 760px; margin: 0 auto; padding: calc(var(--nav-h) + 4rem) var(--gutter) 5rem; }
.legal h1 { font: 800 clamp(2.6rem, 6vw, 4.2rem)/1 var(--f-display); text-transform: uppercase; }
.legal__date { margin-top: 1rem; font: 400 .88rem/1 var(--f-mono); color: var(--muted); }
.legal h2 { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font: 800 1.6rem/1.1 var(--f-display); text-transform: uppercase; color: var(--accent-ink); }
.legal h3 { margin-top: 1.75rem; font-size: 1.1rem; }
.legal p, .legal li { color: var(--muted); }
.legal p { margin-top: .9rem; }
.legal strong { color: var(--text); font-weight: 600; }
.legal ul { margin-top: .9rem; display: grid; gap: .6rem; }
.legal ul li { padding-left: 1.3rem; position: relative; }
.legal ul li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 2px; background: var(--accent-line); }
.legal a { color: var(--text); }
.legal__intro { font-size: 1.15rem; color: var(--text) !important; margin-top: 2rem !important; }

/* =====================================================================
   Couche visuelle : thème, réseau, bandeau, DNS, 200, halo, grain...
   ===================================================================== */

/* Transition douce lors du changement de thème */
body, .nav, .route, .status, .archi, .skills__group, .formation > *, .form input, .form textarea {
  transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}

/* Bouton de thème */
.nav { gap: 1.5rem; }
.nav__links { margin-left: auto; }
.theme-toggle {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  background: transparent; color: var(--text);
  border: 1px solid var(--line-2); cursor: pointer;
  transition: border-color .2s, transform .2s var(--ease);
}
.theme-toggle:hover { border-color: var(--text); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle svg { width: 18px; height: 18px; fill: currentColor; grid-area: 1 / 1; transition: transform .5s var(--ease), opacity .3s; }
.i-sun { opacity: 0; transform: rotate(90deg) scale(.5); }
:root[data-theme="dark"] .i-sun { opacity: 1; transform: none; }
:root[data-theme="dark"] .i-moon { opacity: 0; transform: rotate(-90deg) scale(.5); }

/* Navigation qui se cache en descendant, revient en remontant */
.nav { transition: transform .45s var(--ease), background-color .35s ease; }
.nav.is-hidden { transform: translateY(-100%); }
.nav__links a.is-current { color: var(--text); }

/* Grain de texture (fixe, sans interaction, très léger) */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Réseau vivant du hero */
.hero { position: relative; isolation: isolate; }
.net {
  position: absolute; z-index: -1;
  inset: 0 calc(50% - 50vw);
  width: 100vw; height: 100%;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 62% 50%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 70% at 62% 50%, #000 35%, transparent 100%);
}
.route { position: relative; z-index: 1; background: color-mix(in srgb, var(--bg-2) 88%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* Bandeau de compétences (un seul sur la page) */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 1.4rem 0; }
.marquee__track { display: flex; align-items: center; gap: 2.2rem; width: max-content; will-change: transform; }
.marquee__track span { font: 800 clamp(2.4rem, 5vw, 4.2rem)/1 var(--f-display); text-transform: uppercase; white-space: nowrap; color: var(--text); }
.marquee__track span.o { color: transparent; -webkit-text-stroke: 1.5px var(--muted); }
.marquee__track i { width: 12px; height: 12px; background: var(--accent); flex: none; }

/* Chapitre DNS : le nom devient une adresse */
.resolve { margin: .5rem 0 2.5rem; }
.resolve__text {
  font: 500 clamp(2.6rem, 8vw, 7rem)/1 var(--f-mono);
  letter-spacing: -0.03em; color: var(--accent-ink);
  white-space: nowrap; overflow: hidden;
}
.resolve__meta { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .75rem; align-items: baseline; font: 400 .9rem/1.4 var(--f-mono); color: var(--muted); }
.resolve__arrow { color: var(--accent-ink); }
.resolve__time { color: var(--text); }

/* Halo qui suit la souris sur les cartes */
.spot { position: relative; }
.spot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--accent-dim), transparent 60%);
  opacity: 0; transition: opacity .35s ease;
}
.spot:hover::after { opacity: 1; }

/* Paquets qui circulent sur les liaisons du schéma */
.archi__link { position: relative; overflow: hidden; background: var(--line-2); }
.archi__link::after {
  content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
  transform: translateX(-100%); opacity: 0;
}
.archi.is-live .archi__link::after { opacity: 1; animation: flow-x 1.6s linear infinite; }
.archi.is-live .archi__link:nth-of-type(2)::after { animation-delay: .35s; }
.archi.is-live .archi__link:nth-of-type(3)::after { animation-delay: .7s; }
@keyframes flow-x { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.archi__vm--main { box-shadow: 0 0 0 0 var(--accent-dim); }
.archi.is-live .archi__vm--main { animation: vm-pulse 1.6s ease-out infinite 1s; }
@keyframes vm-pulse { 0% { box-shadow: 0 0 0 0 var(--accent-dim); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 960px) {
  .archi__link::after { width: 100%; height: 40%; background: linear-gradient(180deg, transparent, var(--accent-line), transparent); transform: translateY(-100%); }
  .archi.is-live .archi__link::after { animation-name: flow-y; }
  @keyframes flow-y { from { transform: translateY(-100%); } to { transform: translateY(250%); } }
}

/* Mini-courbe du trafic */
.spark { margin-top: 1.1rem; }
.spark__label { font-size: .8rem; color: var(--muted); margin-bottom: .5rem; }
.spark__svg { display: block; width: 100%; height: 56px; }
.spark__svg rect { fill: var(--line-2); }
.spark__svg rect.is-last { fill: var(--accent-line); }

/* Parcours : ligne qui se trace et étapes qui s'allument */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 2.2rem; bottom: 2.2rem; width: 2px; background: var(--line-2); }
.timeline__progress { position: absolute; left: 5px; top: 2.2rem; bottom: 2.2rem; width: 2px; list-style: none; padding: 0 !important; border: 0 !important; }
.timeline__progress span { display: block; width: 100%; height: 100%; background: var(--accent-line); transform-origin: top; transform: scaleY(0); }
.timeline__item { position: relative; }
.timeline__item::before {
  content: ""; position: absolute; left: calc(-2rem + 0px); top: 2.05rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-2);
  transition: background-color .4s, border-color .4s, box-shadow .4s;
}
.timeline__item.is-reached::before { background: var(--accent); border-color: var(--accent-line); box-shadow: 0 0 0 5px var(--accent-dim); }
.timeline__item.is-reached .timeline__date { color: var(--accent-ink); }
.timeline__progress + .timeline__item { border-top: 0; }

/* Chapitre formation : le 200 géant */
.ok { position: relative; display: flex; align-items: flex-end; gap: 1rem; margin: .5rem 0 2rem; line-height: .8; }
.ok__num { font: 800 clamp(7rem, 22vw, 17rem)/.8 var(--f-display); letter-spacing: -0.02em; }
.ok__num--outline { color: transparent; -webkit-text-stroke: 2px var(--line-2); }
.ok__num--fill { position: absolute; left: 0; bottom: 0; color: var(--accent-ink); clip-path: inset(0 100% 0 0); }
.ok__label { font: 500 clamp(1.4rem, 3vw, 2.4rem)/1 var(--f-mono); color: var(--accent-ink); padding-bottom: .4em; }

/* Mention RGPD du formulaire */
.form__legal { grid-column: 1 / -1; font-size: .82rem; color: var(--muted); }
.form__legal a { color: var(--text); }

/* Boutons magnétiques : le transform est piloté par JS */
[data-magnetic] { will-change: transform; }

/* 404 */
.lost { min-height: 100dvh; max-width: var(--max); margin: 0 auto; padding: calc(var(--nav-h) + 4rem) var(--gutter) 4rem; display: grid; align-content: center; gap: 2rem; }
.lost__code { font: 800 clamp(8rem, 26vw, 20rem)/.8 var(--f-display); color: transparent; -webkit-text-stroke: 2px var(--accent-line); }
.lost__title { font: 800 clamp(2rem, 5vw, 3.6rem)/1 var(--f-display); text-transform: uppercase; max-width: 20ch; }
.lost__text { color: var(--muted); max-width: 52ch; font-size: 1.1rem; }
.lost .route { max-width: 520px; }
.hop.is-lost .hop__dot { border-color: var(--danger); background: var(--danger); }
.hop.is-lost .hop__name, .hop.is-lost .hop__value { color: var(--danger); }

@media (max-width: 640px) {
  .theme-toggle { width: 36px; height: 36px; }
  .timeline { padding-left: 1.6rem; }
  .timeline__item::before { left: -1.6rem; }
}

.lost .route { padding: 1.25rem 1.5rem; }
.lost .route.route__hops::before, .lost .route.route__hops::after { display: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Lien LinkedIn (section contact) */
.contact__side { display: grid; gap: 1.75rem; align-content: start; }
.linkout {
  display: inline-flex; align-items: center; gap: .7rem; justify-self: start;
  padding: .8rem 1.1rem; border: 1px solid var(--line-2);
  color: var(--text); text-decoration: none; font-weight: 500;
  transition: border-color .2s, background-color .2s;
}
.linkout svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.linkout .linkout__arrow { width: 14px; height: 14px; color: var(--muted); transition: transform .3s var(--ease), color .2s; }
.linkout:hover { border-color: var(--text); background: var(--accent-dim); }
.linkout:hover .linkout__arrow { transform: translate(2px, -2px); color: var(--accent-ink); }
