/* ============================================================
   PORTFOLIO V5 · la carte du réseau
   Trois.js scroll-driven · graphe sémantique · Version rapide
   ============================================================ */
:root {
  --bg:      #0a0a0d;
  --bg-2:    #101014;
  --surface: rgba(19, 19, 26, .78);
  --ink:     #f2eee4;
  --ink-2:   #a49e93;
  --ink-3:   #837d70;
  --line:    rgba(242, 238, 228, .09);
  --line-h:  rgba(242, 238, 228, .2);
  --gold:    #e8c56a;
  --gold-deep: #b8944a;
  --pulse:   #5ef0b0;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Syne', var(--font-sans);
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --w: 1040px;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: #171410; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.mono { font-family: var(--font-mono); }
.accent { color: var(--gold); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.04; letter-spacing: -.01em; }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Skip-link : navigation clavier ── */
.skip-link {
  position: fixed;
  top: -60px; left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--gold);
  color: #171410;
  font-weight: 600;
  border-radius: 8px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* ============================================================
   CANVAS 3D · fixe derrière tout, n'apparaît qu'une fois prêt
   ============================================================ */
#gl-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
  opacity: 0;
  transition: opacity .8s;
}
body.scene-on #gl-canvas { opacity: 1; }
body.no3d #gl-canvas { display: none; }
body.no3d {
  background:
    radial-gradient(ellipse 60% 45% at 68% 40%, rgba(232, 197, 106, .07), transparent),
    var(--bg);
}

/* ── Étiquette des nœuds au survol ── */
#net-label {
  position: fixed;
  z-index: 40;
  transform: translate(-50%, -100%);
  padding: 5px 12px;
  background: rgba(10, 10, 13, .88);
  border: 1px solid var(--line-h);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--ink);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  text-shadow: 0 1px 8px rgba(10, 10, 13, .9);
}
#net-label.on { opacity: 1; }

/* ============================================================
   NAV
   ============================================================ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(24px, calc((100vw - var(--w)) / 2));
  background: rgba(10, 10, 13, .78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-logo { font-size: 19px; font-weight: 500; color: var(--ink); }
.nav-logo:hover { text-decoration: none; }

#nav-links { display: flex; gap: 26px; }
#nav-links a { color: var(--ink-2); font-size: 14px; font-weight: 500; text-shadow: 0 1px 8px rgba(10,10,13,.8); }
#nav-links a:hover { color: var(--ink); text-decoration: none; }

.nav-right { display: flex; align-items: center; gap: 10px; }

.btn-fast {
  padding: 7px 14px;
  border: 1px solid rgba(232, 197, 106, .45);
  border-radius: 100px;
  background: rgba(232, 197, 106, .12);
  color: var(--gold);
  font-size: 12.5px;
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .1s;
}
.btn-fast:hover { background: rgba(232, 197, 106, .22); border-color: var(--gold); }
.btn-fast:active { transform: scale(.97); }
.btn-fast[aria-pressed="true"] { background: var(--gold); color: #171410; }

.btn-terminal {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 13.5px;
  background: rgba(10, 10, 13, .5);
  transition: all .18s;
}
.btn-terminal:hover { color: var(--pulse); border-color: var(--pulse); text-decoration: none; }

#nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: rgba(10, 10, 13, .5);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  padding: 0 8px;
}
#nav-burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s; }
#nav-burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
#nav-burger[aria-expanded="true"] span:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

/* ── Dots de progression ── */
#dots {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
#dots a {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-3);
  opacity: .55;
  transition: all .25s;
}
#dots a:hover { opacity: 1; }
#dots a.active {
  background: var(--gold);
  opacity: 1;
  box-shadow: 0 0 10px rgba(232, 197, 106, .6);
  transform: scale(1.25);
}

/* ============================================================
   STATIONS
   ============================================================ */
main { position: relative; z-index: 1; }

.station {
  min-height: 100vh;
  min-height: 100svh; /* gagne sur vh partout où svh existe */
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 100px 24px 70px;
}

.st-inner {
  width: 100%;
  max-width: var(--w);
  margin: 0 auto;
}
.st-wide { max-width: var(--w); }
.st-center { text-align: center; }

.sec-num {
  font-size: 12.5px;
  color: var(--gold-deep);
  letter-spacing: .1em;
  margin-bottom: 16px;
  text-shadow: 0 1px 8px rgba(10, 10, 13, .9);
}

h2 {
  font-size: clamp(2.2rem, 6.5vw, 4.4rem);
  font-weight: 800;
  margin-bottom: 36px;
  text-wrap: balance;
  text-shadow: 0 2px 28px rgba(10, 10, 13, .95);
}

.lede {
  max-width: 65ch;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--ink-2);
  margin-bottom: 30px;
  text-wrap: pretty;
  text-shadow: 0 1px 12px rgba(10, 10, 13, .9);
}

.st-hint { font-size: 13px; color: var(--ink-3); margin-top: 34px; }
.st-center.st-hint { text-align: center; }
.st-hint a { color: var(--ink-2); }
.st-hint a:hover { color: var(--pulse); }

/* ============================================================
   STATION 0 · HERO
   ============================================================ */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--pulse);
  background: rgba(10, 10, 13, .6);
  border: 1px solid rgba(94, 240, 176, .28);
  border-radius: 100px;
  padding: 7px 15px;
  margin-bottom: 34px;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pulse);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(94, 240, 176, .4); }
  50%      { box-shadow: 0 0 0 6px rgba(94, 240, 176, 0); }
}

#kinetic-name {
  font-size: clamp(3.4rem, 12vw, 8rem);
  font-weight: 800;
  margin-bottom: 26px;
  text-shadow: 0 2px 30px rgba(10, 10, 13, .9);
  cursor: default;
}
#kinetic-name .kl {
  display: inline-block;
  transition: transform .3s cubic-bezier(.22, .68, 0, 1.4), color .3s;
  will-change: transform;
}

.hero-lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink-2);
  margin-bottom: 40px;
  max-width: 34ch;
  text-wrap: balance;
  text-shadow: 0 1px 14px rgba(10, 10, 13, .9);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 100px;
  border: 1px solid var(--line-h);
  background: rgba(19, 19, 26, .72);
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
  transition: border-color .18s, background .18s, color .18s;
}
.btn:hover { border-color: var(--gold); text-decoration: none; }
.btn-primary { background: var(--gold); border-color: var(--gold); color: #171410; }
.btn-primary:hover { background: #f0d284; border-color: #f0d284; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { color: var(--pulse); border-color: transparent; }
.magnetic { transition: border-color .18s, background .18s, color .18s, transform .25s cubic-bezier(.22, .68, 0, 1.2); }

.scroll-cue {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11.5px;
  color: var(--ink-3);
  animation: cue 2.4s ease-in-out infinite;
  white-space: nowrap;
}
@keyframes cue {
  0%, 100% { transform: translate(-50%, 0); opacity: .7; }
  50%      { transform: translate(-50%, 6px); opacity: 1; }
}

/* Le hero s'efface pendant qu'on le quitte */
@supports (animation-timeline: view()) {
  #hero .st-inner {
    animation: heroOut linear both;
    animation-timeline: view();
    animation-range: exit 0% exit 80%;
  }
  @keyframes heroOut {
    to { opacity: 0; transform: translateY(-60px) scale(.96); }
  }
}

/* ============================================================
   STATION 1 · PROFIL
   ============================================================ */
.punch-list { list-style: none; max-width: 680px; }
.punch-list li {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  text-shadow: 0 1px 12px rgba(10, 10, 13, .9);
}
.punch-list li:first-child { border-top: 1px solid var(--line); }
.punch-k {
  flex-shrink: 0;
  width: 64px;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: .06em;
}

/* ============================================================
   STATION 2 · LE RÉSEAU (dédiée : aucun texte par-dessus)
   ============================================================ */
.station-net { pointer-events: none; }
.net-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11.5px;
  color: var(--ink-3);
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(10, 10, 13, .9);
}

/* ============================================================
   STATION 3 · COMPÉTENCES (cinq familles, aucune barre)
   ============================================================ */
.fam-list { display: grid; gap: 0; max-width: 780px; }
.fam {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  text-shadow: 0 1px 12px rgba(10, 10, 13, .9);
}
.fam:first-child { border-top: 1px solid var(--line); }
.fam dt {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: .06em;
  padding-top: 4px;
}
.fam dd {
  color: var(--ink-2);
  font-size: clamp(.98rem, 2vw, 1.12rem);
  line-height: 1.65;
  max-width: 58ch;
  text-wrap: pretty;
}
.fam dd strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   STATION 3 · PARCOURS
   ============================================================ */
.path-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 1040px;
}
.path-head {
  font-size: 11px;
  color: var(--gold-deep);
  letter-spacing: .14em;
  text-transform: lowercase;
  margin-bottom: 10px;
}
.path-list { list-style: none; }
.path-list li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(.92rem, 1.9vw, 1.06rem);
  text-shadow: 0 1px 12px rgba(10, 10, 13, .9);
}
.path-list li:first-child { border-top: 1px solid var(--line); }
.path-y {
  flex-shrink: 0;
  width: 62px;
  font-size: 12px;
  color: var(--ink-3);
}
.path-list em { color: var(--pulse); font-style: normal; font-size: .9em; }
.path-sub {
  display: block;
  color: var(--ink-3);
  font-size: .88em;
  margin-top: 4px;
}
.path-todo {
  outline: 1px dashed rgba(232, 197, 106, .5);
  outline-offset: 3px;
}
.path-lang {
  margin-top: 30px;
  font-size: 12.5px;
  color: var(--ink-2);
}

/* ============================================================
   STATION 4 · PROJETS (grille 2 x 2)
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 0 24px;
  overflow: hidden;
  transition: border-color .2s;
  transform-style: preserve-3d;
  will-change: transform;
}
.project-card:hover { border-color: var(--line-h); }

.proj-viz {
  height: 120px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.proj-viz canvas { width: 100%; height: 100%; display: block; }

.project-card h3 { font-size: 1.2rem; margin: 0 24px 6px; text-wrap: balance; }
.proj-stack { font-size: 12px; color: var(--gold-deep); margin: 0 24px 10px; }
.project-card > p:not(.proj-stack):not(.proj-links) {
  color: var(--ink-2);
  font-size: 14.5px;
  flex: 1;
  margin: 0 24px 16px;
  text-wrap: pretty;
}
.proj-links { font-size: 14px; font-weight: 500; margin: 0 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.proj-note { font-size: 11.5px; color: var(--ink-3); font-weight: 400; }

.badge-off {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  padding: 3px 10px;
  border: 1px solid rgba(247, 106, 106, .35);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 400;
  color: #f09898;
  letter-spacing: .04em;
}

/* ============================================================
   STATION 5 · CONTACT
   ============================================================ */
.contact-tel {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 5.4vw, 2.9rem);
  color: var(--gold);
  margin-bottom: 14px;
  transition: color .2s;
  text-shadow: 0 2px 24px rgba(10, 10, 13, .95);
}
.contact-tel:hover { color: #f0d284; text-decoration: none; }

.contact-mail {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 4vw, 2rem);
  color: var(--ink);
  border-bottom: 3px solid var(--gold);
  padding-bottom: 6px;
  margin-bottom: 34px;
  word-break: break-all;
  transition: color .2s;
  text-shadow: 0 2px 24px rgba(10, 10, 13, .95);
}
.contact-mail:hover { color: var(--gold); text-decoration: none; }

.alt-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
  margin-bottom: 30px;
}
.alt-chips li {
  font-size: 12.5px;
  color: var(--ink-2);
  border: 1px solid var(--line-h);
  background: rgba(19, 19, 26, .72);
  border-radius: 100px;
  padding: 6px 14px;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 34px;
  list-style: none;
  font-size: 14px;
  color: var(--ink-2);
}
.contact-list a { color: var(--ink-2); }
.contact-list a:hover { color: var(--gold); }

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-3);
}
footer a { color: var(--ink-2); }
footer a:hover { color: var(--pulse); }

/* ============================================================
   VERSION RAPIDE · un seul écran, zéro spectacle
   ============================================================ */
#fast[hidden] { display: none; }
#fast {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  min-height: 100svh;
  padding: 110px 24px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 55% 40% at 72% 30%, rgba(232, 197, 106, .06), transparent),
    var(--bg);
}
body.fast main,
body.fast #nav,
body.fast #dots,
body.fast #gl-canvas,
body.fast .scroll-cue { display: none; }
body.fast { overflow: auto; }

.fast-inner { width: 100%; max-width: 880px; }
.fast-inner h2 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin-bottom: 18px;
  text-wrap: balance;
}
.fast-lede {
  max-width: 62ch;
  color: var(--ink-2);
  margin-bottom: 34px;
  text-wrap: pretty;
}
.fast-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 34px;
}
.fast-head {
  font-size: 11px;
  color: var(--gold-deep);
  letter-spacing: .14em;
  margin-bottom: 10px;
}
.fast-list { list-style: none; }
.fast-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  color: var(--ink-2);
}
.fast-list li:first-child { border-top: 1px solid var(--line); }
.fast-list strong { color: var(--ink); font-weight: 600; }

.fast-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 30px;
  align-items: center;
  padding: 22px 0;
  border-top: 1px solid var(--line-h);
  border-bottom: 1px solid var(--line-h);
  margin-bottom: 26px;
}
.fast-tel {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--gold);
}
.fast-contact a { color: var(--ink); font-size: 15px; }
.fast-contact a:hover { color: var(--gold); }
#fast-exit { margin-top: 6px; }

/* ============================================================
   BOOT · transition vers le terminal
   ============================================================ */
#boot {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #050505;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
}
#boot.on { opacity: 1; pointer-events: all; }
#boot p { font-size: 15px; color: #d6d2c8; }
#boot .p-user { color: var(--pulse); }
#boot-cursor { animation: blink .9s step-end infinite; color: var(--gold); }
@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ============================================================
   IMPRESSION · un document propre, pas une page noire
   ============================================================ */
@media print {
  :root { --bg: #ffffff; --bg-2: #ffffff; --surface: #ffffff; --ink: #171410; --ink-2: #3d3830; --ink-3: #55504a; --gold: #7a5c1e; --gold-deep: #7a5c1e; --pulse: #1a6b45; }
  body { background: #fff !important; color: #171410; font-size: 12pt; overflow: visible; }
  #gl-canvas, #net-label, #nav, #dots, #scroll-cue, .scroll-cue, #boot, .skip-link { display: none !important; }
  .station { min-height: auto; padding: 6pt 0 10pt; break-inside: avoid; }
  .st-inner { max-width: 100%; }
  h2 { text-shadow: none; font-size: 20pt; margin-bottom: 12pt; }
  .lede, .punch-list li, .fam dd, .path-list li, .project-card > p, .hero-lede, .fast-lede { text-shadow: none; }
  #kinetic-name { font-size: 30pt; text-shadow: none; }
  .status-chip { border-color: #1a6b45; color: #1a6b45; background: none; text-shadow: none; }
  .dot { animation: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .projects-grid { grid-template-columns: 1fr 1fr; gap: 8pt; }
  .project-card { border: 0.5pt solid #999; background: none; backdrop-filter: none; break-inside: avoid; }
  .proj-viz { display: none; }
  .path-cols { grid-template-columns: 1fr; gap: 8pt; }
  .punch-k, .path-y, .path-head, .fast-head, .sec-num, .proj-stack { color: #55504a; }
  .punch-k, .fam dt { color: #7a5c1e; }
  a { color: #171410; text-decoration: underline; }
  .btn { display: none; }
  footer { margin-top: 16pt; color: #55504a; }
  #fast { display: none !important; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .projects-grid { grid-template-columns: 1fr; }
  .path-cols { grid-template-columns: 1fr; gap: 28px; }
  .fast-cols { grid-template-columns: 1fr; }
  #dots { right: 12px; }
}

@media (max-width: 720px) {
  #nav-burger { display: flex; }
  .btn-fast { padding: 6px 10px; font-size: 11.5px; }
  #nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10, 10, 13, .96);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  #nav-links.open { display: flex; }
  #nav-links a { padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  #nav-links a:last-child { border-bottom: none; }

  .hero-cta .btn { width: 100%; text-align: center; }
  .scroll-cue { display: none; }
  .punch-k { width: 46px; }
  .path-y { width: 54px; }
  .fam { grid-template-columns: 62px 1fr; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  #gl-canvas { opacity: 1; }
  #hero .st-inner { animation: none; }
}