/* =========================================================
   PORTFOLIO — thème Univers
   ========================================================= */
:root {
  --bg: #04050d;
  --bg-2: #080a1a;
  --ink: #eef0ff;
  --muted: #a3a8cc;
  --dim: #626891;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --glass: rgba(13, 15, 34, .55);
  --a1: #8b5cf6;
  --a2: #22d3ee;
  --a3: #f472b6;
  --a1-rgb: 139, 92, 246;
  --a2-rgb: 34, 211, 238;
  --a3-rgb: 244, 114, 182;
  --planet-1: #c4b5fd;
  --planet-2: #7c3aed;
  --planet-3: #3b1d8f;
  --grad: linear-gradient(115deg, var(--a2) 0%, var(--a1) 50%, var(--a3) 100%);
  --radius: 22px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --sans: "Space Grotesk", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --pad: clamp(16px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--a1); color: #fff; }
.mono { font-family: var(--mono); }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ---------- Univers en fond ---------- */
#cosmos { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.nebula { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.nebula span {
  /* dégradés radiaux très doux au lieu d'un filtre flou : même rendu, beaucoup moins coûteux */
  position: absolute; border-radius: 50%; opacity: .3; will-change: transform;
  animation: drift 26s ease-in-out infinite alternate;
}
.nebula span:nth-child(1) { width: 60vmax; height: 60vmax; left: -18vmax; top: -22vmax; background: radial-gradient(circle, rgba(var(--a1-rgb), .9), rgba(var(--a1-rgb), .35) 35%, transparent 70%); }
.nebula span:nth-child(2) { width: 50vmax; height: 50vmax; right: -20vmax; top: 22vh; background: radial-gradient(circle, rgba(var(--a2-rgb), .8), rgba(var(--a2-rgb), .25) 35%, transparent 70%); opacity: .2; animation-duration: 32s; animation-delay: -8s; }
.nebula span:nth-child(3) { width: 46vmax; height: 46vmax; left: 18vw; bottom: -28vmax; background: radial-gradient(circle, rgba(var(--a3-rgb), .8), rgba(var(--a3-rgb), .25) 35%, transparent 70%); opacity: .16; animation-duration: 38s; animation-delay: -14s; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6vw, 4vh, 0) scale(1.12); }
  100% { transform: translate3d(-4vw, 8vh, 0) scale(.95); }
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .04;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .footer, .nav { position: relative; z-index: 2; }

/* ---------- Curseur ---------- */
.cursor { position: fixed; inset: 0; pointer-events: none; z-index: 9999; }
.cursor-dot, .cursor-ring { position: fixed; left: 0; top: 0; transform: translate3d(-100px, -100px, 0); will-change: transform; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px #fff; }
.cursor-ring { width: 0; height: 0; }
.cursor-ring::before {
  content: ""; position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  transition: transform .45s var(--ease), background-color .35s, border-color .35s;
}
.cursor.hover .cursor-ring::before { transform: scale(1.8); background-color: rgba(var(--a1-rgb), .12); border-color: rgba(var(--a1-rgb), .6); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
@media (hover: hover) and (pointer: fine) { body, a, button { cursor: none; } input, textarea, select { cursor: auto; } }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 60; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Intro ---------- */
#intro {
  position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 22px;
  transition: opacity .9s var(--ease), visibility .9s;
}
#intro.done { opacity: 0; visibility: hidden; }
.intro-name { font-size: clamp(32px, 7vw, 80px); font-weight: 600; letter-spacing: -.03em; display: flex; overflow: hidden; }
.intro-name span { display: inline-block; transform: translateY(110%); animation: up .9s var(--ease) forwards; }
.intro-bar { width: min(260px, 60vw); height: 1px; background: var(--line-2); overflow: hidden; }
.intro-bar span { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; animation: bar 1.5s var(--ease) forwards; }
.intro-sub { font-family: var(--mono); font-size: 12px; letter-spacing: .25em; text-transform: uppercase; color: var(--dim); }
@keyframes up { to { transform: translateY(0); } }
@keyframes bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 18px; left: 50%; transform: translate(-50%, -140%); z-index: 50;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 20px;
  background: rgba(10, 12, 28, .86);
  border: 1px solid var(--line); border-radius: 999px;
  transition: transform 1s var(--ease) .2s;
  width: max-content; max-width: calc(100vw - 32px);
}
body.ready .nav { transform: translate(-50%, 0); }
.logo { font-weight: 700; letter-spacing: -.02em; margin-right: 8px; font-size: 18px; }
.logo b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { position: relative; display: flex; gap: 2px; }
.nav-links a { position: relative; z-index: 1; padding: 8px 14px; font-size: 14px; color: var(--muted); border-radius: 999px; transition: color .3s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-indicator {
  position: absolute; top: 0; left: 0; height: 100%; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line-2);
  transition: transform .6s var(--ease), width .6s var(--ease), opacity .3s; opacity: 0;
}
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .06); position: relative; }
.menu-btn span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--ink); transition: transform .4s var(--ease); }
.menu-btn span:first-child { top: 17px; } .menu-btn span:last-child { top: 24px; }
.nav.open .menu-btn span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav.open .menu-btn span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav { width: calc(100vw - 32px); justify-content: space-between; border-radius: 26px; flex-wrap: wrap; }
  .menu-btn { display: block; order: 2; }
  .nav-links { order: 3; flex-direction: column; width: 100%; max-height: 0; overflow: hidden; transition: max-height .6s var(--ease); }
  .nav.open .nav-links { max-height: 420px; padding-bottom: 8px; }
  .nav-links a { font-size: 22px; padding: 10px 12px; }
  .nav-indicator { display: none; }
}

/* ---------- Boutons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px;
  border-radius: 999px; font-weight: 500; font-size: 15px; overflow: hidden; isolation: isolate;
  transition: transform .4s var(--ease), box-shadow .4s, border-color .3s;
}
.btn i { font-style: normal; transition: transform .4s var(--ease); }
.btn:hover i { transform: translateX(4px); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--grad);
  transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn.primary:hover { color: #fff; box-shadow: 0 10px 40px -10px var(--a1); }
.btn.primary:hover::before { transform: translateY(0); }
.btn.ghost { border: 1px solid var(--line-2); background: rgba(10, 12, 28, .55); }
.btn.ghost:hover { border-color: rgba(255, 255, 255, .4); }
.btn.small { padding: 10px 18px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: center;
  padding: 120px var(--pad) 90px; overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; max-width: 780px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 28px; padding: 7px 16px 7px 12px;
  font-size: 13px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, .03);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.hero-title { margin: 0; font-size: clamp(56px, 13vw, 168px); line-height: .9; letter-spacing: -.05em; font-weight: 600; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; }
.hero-title .serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; }
.hero-title .serif > span {
  background: var(--grad); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .1em; transform: translateY(110%);
}
body.ready .hero-title .serif > span { animation: slideUp 1.3s var(--ease) var(--nd, .5s) forwards; }
.hero-title .serif:hover > span { animation: none; transform: none; background-position: 100% 0; transition: background-position 1.2s var(--ease); }
@keyframes slideUp { to { transform: none; } }
@keyframes shine { to { background-position: 200% 0; } }
.char { display: inline-block; transform: translateY(105%) rotate(6deg); opacity: 0; }
body.ready .char { animation: charIn 1.1s var(--ease) forwards; }
@keyframes charIn { to { transform: none; opacity: 1; } }
.hero-role { margin: 26px 0 0; font-size: clamp(18px, 2.4vw, 24px); color: var(--ink); min-height: 1.6em; }
.hero-role .mono { color: var(--a2); }
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -2px; background: var(--a2); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-accroche { margin: 18px 0 0; max-width: 560px; color: var(--muted); font-size: 18px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.hero-loc { margin-top: 40px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.hero .fade-in { opacity: 0; transform: translateY(20px); }
body.ready .hero .fade-in { animation: fadeUp 1.2s var(--ease) forwards; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* Planète */
.planet-wrap {
  position: absolute; right: -6vw; top: 50%; width: min(58vw, 720px); aspect-ratio: 1; transform: translateY(-50%);
  z-index: 1; opacity: 0; transition: opacity 2s var(--ease) .6s;
}
body.ready .planet-wrap { opacity: 1; }
.planet-wrap > * { will-change: transform; }
.planet {
  position: absolute; inset: 22%; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 30% 28%, var(--planet-1) 0%, var(--planet-2) 22%, var(--planet-3) 48%, #120a33 72%, #05030f 100%);
  box-shadow: 0 0 120px -10px rgba(var(--a1-rgb), .55), 0 0 260px -40px rgba(var(--a2-rgb), .35);
}
/* ombre et atmosphère par-dessus les bandes : relief 3D */
.planet::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .22), transparent 28%),
    radial-gradient(circle at 34% 30%, transparent 38%, rgba(8, 4, 24, .55) 62%, rgba(3, 2, 10, .92) 80%);
  box-shadow: inset 0 0 22px rgba(var(--a1-rgb), .35), inset -18px -24px 60px rgba(0, 0, 0, .6);
}
.planet-surface {
  position: absolute; inset: 0; width: 200%; opacity: .5;
  /* bandes de gaz floues, sans arêtes dures */
  background: repeating-linear-gradient(6deg,
    rgba(255, 255, 255, 0) 0%, rgba(var(--a1-rgb), .16) 3%, rgba(255, 255, 255, 0) 6.5%,
    rgba(var(--a2-rgb), .1) 9%, rgba(255, 255, 255, 0) 12%, rgba(var(--a3-rgb), .09) 15%, rgba(255, 255, 255, 0) 19%);
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: translateX(-50%); } }
.ring {
  position: absolute; inset: 6%; border-radius: 50%;
  border: 10px double rgba(var(--a2-rgb), .5);
  border-left-color: rgba(var(--a3-rgb), .55); border-right-color: rgba(var(--a1-rgb), .6);
  box-shadow: 0 0 40px rgba(var(--a1-rgb), .55), inset 0 0 40px rgba(var(--a2-rgb), .35);
  transform: rotate(-18deg) scaleY(.22);
  z-index: 0;
}
.planet { z-index: 1; }
.ring-front { clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%); z-index: 2; }
.orbit-line { position: absolute; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .09); animation: rot 30s linear infinite; }
.orbit-line.o1 { inset: 2%; }
.orbit-line.o2 { inset: -12%; animation-duration: 55s; animation-direction: reverse; border-style: solid; border-color: rgba(255, 255, 255, .05); }
.sat { position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--a2); box-shadow: 0 0 18px 4px rgba(var(--a2-rgb), .7); }
.o2 .sat { background: var(--a3); box-shadow: 0 0 18px 4px rgba(var(--a3-rgb), .7); width: 7px; height: 7px; }
@keyframes rot { to { transform: rotate(360deg); } }

.scroll-hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--dim);
}
.mouse { width: 22px; height: 34px; border: 1.5px solid var(--dim); border-radius: 12px; display: flex; justify-content: center; padding-top: 6px; }
.mouse i { width: 3px; height: 7px; border-radius: 3px; background: var(--ink); animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }

@media (max-width: 860px) {
  .planet-wrap { right: -35vw; top: 20%; width: 95vw; opacity: 0; }
  body.ready .planet-wrap { opacity: .5; }
  .scroll-hint { display: none; }
}

/* ---------- Marquee ---------- */
.marquee {
  position: relative; z-index: 2; overflow: hidden; padding: 22px 0; border-block: 1px solid var(--line);
  background: rgba(8, 10, 26, .82); transform: rotate(-1.5deg) scale(1.03);
}
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-track span { display: inline-flex; align-items: center; gap: 36px; padding-right: 36px; font-size: clamp(22px, 3vw, 36px); font-weight: 500; white-space: nowrap; }
.marquee-track span:nth-child(even) { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--muted); }
.marquee-track b { color: var(--a1); font-weight: 400; font-size: .7em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(100px, 14vw, 170px) var(--pad) 0; max-width: 1320px; margin: 0 auto; }
.section-head { display: flex; align-items: baseline; gap: 20px; margin-bottom: clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.section-num { font-size: 13px; color: var(--a2); letter-spacing: .1em; }
.section-num::before { content: "// "; color: var(--dim); }
.section-head h2 { margin: 0; font-size: clamp(48px, 9vw, 120px); line-height: .95; letter-spacing: -.05em; font-weight: 600; }
.section-head h2 em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .08em; letter-spacing: -.02em; }

.reveal { opacity: 0; transform: translateY(50px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- À propos ---------- */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
.about-text h3 { margin: 0 0 24px; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.15; letter-spacing: -.03em; font-weight: 500; }
.about-text p { color: var(--muted); margin: 0 0 18px; font-size: 18px; }
.chips { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.chips li { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .02); transition: border-color .3s, background .3s; }
.chips li:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .04); }
.chips small { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.about-card {
  position: relative; padding: 34px; border-radius: 28px; overflow: hidden; text-align: center;
  background: linear-gradient(160deg, rgba(var(--a1-rgb), .14), rgba(8, 10, 26, .6) 60%); border: 1px solid var(--line-2);
  transform-style: preserve-3d;
}
.avatar {
  width: min(220px, 60%); aspect-ratio: 1; margin: 0 auto 24px; border-radius: 50%; position: relative;
  display: grid; place-items: center; font-size: 64px; font-weight: 600; letter-spacing: -.04em;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .25), transparent 40%), var(--grad);
  box-shadow: 0 20px 60px -20px var(--a1); overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .25); animation: rot 20s linear infinite; }
.about-card-name { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.about-card-loc { font-size: 12px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.about-card-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .1), transparent 50%); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: clamp(50px, 7vw, 90px); background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { padding: clamp(24px, 3vw, 40px); background: var(--bg); position: relative; }
.stat strong { display: block; font-size: clamp(44px, 6vw, 76px); line-height: 1; font-weight: 600; letter-spacing: -.05em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .chips { grid-template-columns: 1fr; }
}

/* ---------- Compétences ---------- */
.skills-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
@media (min-width: 861px) { .orbit-system { position: sticky; top: 110px; } }
.orbit-system { position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; margin: 0 auto; }
.orbit-core {
  position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  display: grid; place-items: center; text-align: center; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  background: radial-gradient(circle at 35% 30%, #fff, var(--a2) 20%, var(--a1) 55%, #0b0620);
  box-shadow: 0 0 60px var(--a1), 0 0 140px -10px var(--a2);
  animation: corePulse 4s ease-in-out infinite;
}
@keyframes corePulse { 50% { transform: translate(-50%, -50%) scale(1.07); } }
.orbit-ring { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .08); transform: translate(-50%, -50%); }
.orbit-spin { position: absolute; inset: 0; animation: rot var(--dur) linear infinite; }
.orbit-planet { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.orbit-planet > span {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: rgba(10, 12, 30, .92); border: 1px solid var(--line-2);
  animation: rotSelf var(--dur) linear infinite reverse;
  transition: border-color .3s, box-shadow .3s;
}
@keyframes rotSelf { from { rotate: 0deg; } to { rotate: 360deg; } }
.orbit-planet > span:hover { border-color: var(--a2); box-shadow: 0 0 24px -4px var(--a2); }
.orbit-system:hover .orbit-spin, .orbit-system:hover .orbit-planet > span { animation-play-state: paused; }
.orbit-planet > span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: var(--c, var(--a2)); box-shadow: 0 0 8px var(--c, var(--a2)); }

.skills-groups { display: grid; gap: 22px; }
.skill-group { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(8, 10, 26, .82); }
.skill-group h3 { margin: 0 0 18px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--a2); }
.skill { margin-bottom: 14px; }
.skill:last-child { margin-bottom: 0; }
.skill-top { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 7px; }
.skill-top span:last-child { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w); border-radius: 4px; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.6s var(--ease) var(--d, 0s); box-shadow: 0 0 12px var(--a1); }
.in .bar i, .bar.in i { transform: scaleX(1); }

.langs { margin-top: clamp(50px, 7vw, 80px); }
.small-title { font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin: 0 0 18px; }
.langs-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.lang { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .02); }
.lang strong { font-weight: 500; display: block; }
.lang small { color: var(--dim); font-size: 13px; }
.dots { display: flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.dots i.on { background: var(--a2); box-shadow: 0 0 8px var(--a2); }
@media (max-width: 860px) {
  .skills-layout { grid-template-columns: 1fr; }
  .orbit-system { max-width: 420px; }
  .orbit-planet > span { font-size: 11px; padding: 5px 10px; }
}

/* ---------- Projets ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 26px; }
.project {
  position: relative; border-radius: 26px; padding: 1px; cursor: pointer; text-align: left;
  background: linear-gradient(160deg, var(--line-2), var(--line) 40%, var(--line));
  transform-style: preserve-3d; transition: transform .6s var(--ease), box-shadow .6s var(--ease), opacity 1.1s var(--ease);
  transition-delay: 0s, 0s, var(--d, 0s);
}
.project::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--grad); opacity: 0; transition: opacity .5s; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.project:hover::before { opacity: 1; }
.project:hover { box-shadow: 0 30px 80px -30px rgba(var(--a1-rgb), .6); }
.project-inner { position: relative; height: 100%; border-radius: 25px; overflow: hidden; background: rgba(8, 10, 24, .92); display: flex; flex-direction: column; }
.project-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; display: grid; place-items: center; }
.project-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.project:hover .project-cover img { transform: scale(1.06); }
.cover-art { position: absolute; inset: 0; background: radial-gradient(circle at var(--x1) var(--y1), var(--c1), transparent 55%), radial-gradient(circle at var(--x2) var(--y2), var(--c2), transparent 55%), #0b0d22; transition: transform 1s var(--ease); }
.cover-art::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .5) 1px, transparent 1px); background-size: 26px 26px; opacity: .15; }
.project:hover .cover-art { transform: scale(1.08); }
.cover-emoji { position: relative; font-size: 72px; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .5)); transition: transform .8s var(--ease); }
.project:hover .cover-emoji { transform: translateY(-6px) scale(1.08) rotate(-4deg); }
.project-glare { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .09), transparent 45%); opacity: 0; transition: opacity .4s; }
.project:hover .project-glare { opacity: 1; }
.project-body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.project-meta { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--dim); }
.project h3 { margin: 0; font-size: 28px; letter-spacing: -.03em; font-weight: 600; }
.project p { margin: 0; color: var(--muted); font-size: 15.5px; }
.project-arrow { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; transition: transform .5s var(--ease), background .3s, color .3s; }
.project:hover .project-arrow { transform: rotate(-45deg); background: var(--ink); color: var(--bg); }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 6px; }
.tags span { font-family: var(--mono); font-size: 11.5px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.empty { color: var(--dim); font-family: var(--mono); font-size: 14px; }

/* Modale */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; visibility: hidden; }
.modal.open { visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2, 3, 10, .82); opacity: 0; transition: opacity .5s var(--ease); }
.modal.open .modal-backdrop { opacity: 1; }
.modal-card {
  position: relative; width: min(760px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: 28px;
  background: #0a0c1f; border: 1px solid var(--line-2); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .8), 0 0 80px -30px var(--a1);
  opacity: 0; transform: translateY(40px) scale(.96); transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.modal.open .modal-card { opacity: 1; transform: none; }
.modal-close { position: absolute; top: 16px; right: 16px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; background: rgba(0, 0, 0, .6); border: 1px solid var(--line-2); transition: transform .4s var(--ease); }
.modal-close:hover { transform: rotate(90deg); }
.modal-cover { position: relative; aspect-ratio: 16 / 7; display: grid; place-items: center; overflow: hidden; }
.modal-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 28px clamp(22px, 4vw, 40px) 36px; }
.modal-body h3 { margin: 6px 0 14px; font-size: clamp(32px, 5vw, 48px); letter-spacing: -.04em; line-height: 1; }
.modal-year { color: var(--a2); font-size: 13px; }
.modal-details { color: var(--muted); margin: 22px 0 28px; }
.modal-details p { margin: 0 0 14px; }

/* ---------- Parcours ---------- */
.timeline { position: relative; padding-left: 44px; }
.timeline-line { position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.timeline-fill { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-origin: 50% 0; transform: scaleY(0); will-change: transform; background: linear-gradient(var(--a2), var(--a1), var(--a3)); border-radius: 2px; }
.comet { position: absolute; left: 50%; top: 0; will-change: transform; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 20px 6px var(--a2), 0 0 50px 10px var(--a1); }
.tl-item { position: relative; display: grid; grid-template-columns: 200px 1fr; gap: 30px; padding: 26px 0 44px; }
.tl-item::before { content: ""; position: absolute; left: -38px; top: 34px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--dim); transition: border-color .5s, box-shadow .5s, background .5s; }
.tl-item.lit::before { border-color: var(--a2); background: var(--a2); box-shadow: 0 0 14px var(--a2); }
.tl-period { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 6px; }
.tl-type { display: inline-block; margin-top: 10px; font-size: 11px; letter-spacing: .15em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--a2); }
.tl-type.experience { color: var(--a3); }
.tl-item h3 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -.02em; font-weight: 500; line-height: 1.2; }
.tl-place { color: var(--a1); filter: brightness(1.4); margin-top: 6px; font-size: 15px; }
.tl-desc { color: var(--muted); margin: 10px 0 0; max-width: 620px; }
@media (max-width: 700px) {
  .timeline { padding-left: 34px; }
  .timeline-line { left: 6px; }
  .tl-item { grid-template-columns: 1fr; gap: 8px; padding-bottom: 30px; }
  .tl-item::before { left: -33px; }
}

/* ---------- Terminal ---------- */
.term {
  position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2);
  background: rgba(6, 8, 18, .92); box-shadow: 0 40px 100px -40px rgba(var(--a1-rgb), .55), inset 0 1px 0 rgba(255, 255, 255, .05);
  cursor: text;
}
.term::after { /* lignes de balayage façon vieil écran */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px);
}
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; font-size: 12px; color: var(--dim); }
.term-body { height: clamp(260px, 42vh, 420px); overflow-y: auto; padding: 18px 20px 6px; font-size: 14px; line-height: 1.7; scrollbar-width: thin; overscroll-behavior: contain; }
.term-body .tl { white-space: pre-wrap; word-break: break-word; animation: tlIn .25s ease-out; }
@keyframes tlIn { from { opacity: 0; transform: translateX(-6px); } }
.term-body a { color: var(--a2); text-decoration: underline; text-underline-offset: 3px; }
.t-ps, .term-prompt { color: var(--a2); }
.t-acc { color: var(--a1); filter: brightness(1.35); }
.t-dim { color: var(--dim); }
.t-ok { color: #4ade80; }
.t-err { color: #f87171; }
.term-line { display: flex; align-items: center; gap: 8px; padding: 6px 20px 18px; font-size: 14px; }
.term-prompt { white-space: nowrap; }
.term-line input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--ink); font: inherit; caret-color: var(--a2); }
@media (max-width: 600px) { .term-body, .term-line { font-size: 12.5px; } .term-prompt { font-size: 0; } .term-prompt::before { content: "$"; font-size: 12.5px; } }

.foot-clock { color: var(--muted); }
.foot-clock #clock { color: var(--a2); font-variant-numeric: tabular-nums; }

/* ---------- Contact ---------- */
.contact { padding-bottom: clamp(80px, 10vw, 140px); }
.contact-box { position: relative; text-align: center; padding: clamp(50px, 8vw, 100px) clamp(20px, 5vw, 60px); border-radius: 36px; border: 1px solid var(--line-2); overflow: hidden; background: radial-gradient(ellipse at 50% 120%, rgba(var(--a1-rgb), .35), transparent 60%), rgba(8, 10, 26, .6); }
.contact-box::before { content: ""; position: absolute; left: 50%; top: 100%; width: 140%; aspect-ratio: 1; transform: translate(-50%, -12%); border-radius: 50%; border-top: 1px solid rgba(var(--a1-rgb), .5); box-shadow: 0 -30px 80px -20px rgba(var(--a1-rgb), .6); pointer-events: none; }
.contact-title { margin: 0 auto; max-width: 860px; font-size: clamp(34px, 6vw, 76px); line-height: 1.02; letter-spacing: -.045em; font-weight: 600; }
.contact-title em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact-text { color: var(--muted); max-width: 520px; margin: 22px auto 0; font-size: 18px; }
.contact-mail { display: inline-block; margin-top: 40px; font-size: clamp(22px, 4.2vw, 48px); font-weight: 500; letter-spacing: -.03em; position: relative; word-break: break-all; }
.contact-mail::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.contact-mail:hover::after { transform: scaleX(1); transform-origin: left; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px; margin-top: 26px; color: var(--muted); }
.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.socials a { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; transition: background .3s, color .3s, transform .4s var(--ease); }
.socials a:hover { background: var(--ink); color: var(--bg); transform: translateY(-3px); }

/* ---------- Footer ---------- */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 30px var(--pad); border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }

/* ---------- Planète 3D ---------- */
.planet-wrap.gl .planet, .planet-wrap.gl .ring { display: none; }
.planet-wrap::before {
  content: ""; position: absolute; inset: 18%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(var(--a1-rgb), .35), transparent 70%);
}
.planet-gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; cursor: grab; touch-action: pan-y; }
.planet-wrap.grabbing .planet-gl { cursor: grabbing; }
.planet-tag {
  position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%); z-index: 2; white-space: nowrap; pointer-events: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.planet-tag span { color: var(--a2); }
.planet-tag i { font-style: normal; color: var(--dim); }
@media (max-width: 860px) { .planet-gl { pointer-events: none; } .planet-tag { display: none; } }

/* ---------- Mini-jeu ---------- */
.game {
  position: fixed; inset: 0; z-index: 90; visibility: hidden; opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(var(--a1-rgb), .16), rgba(4, 5, 13, .97) 65%), rgba(4, 5, 13, .9);
  transition: opacity .6s var(--ease), visibility .6s;
}
.game.open { visibility: visible; opacity: 1; }
body.game-open { overflow: hidden; }
body.game-open .nav { transform: translate(-50%, -160%); }
.game-gl { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.game-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; box-shadow: inset 0 0 160px 40px rgba(255, 70, 50, .55); }
.game.hit .game-flash { animation: flash .6s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
.game-hud {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 28px;
  padding: 10px 26px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(8, 10, 26, .75); pointer-events: none;
}
.game-hud small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.game-hud b { display: inline-block; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.game-hud b.bump { animation: bump .35s var(--ease); color: var(--a2); }
@keyframes bump { 40% { transform: scale(1.35); } }
.game-lives { font-size: 22px; color: #ff6b6b; letter-spacing: .15em; }
.game-quit { position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(8, 10, 26, .75); transition: transform .4s var(--ease); }
.game-quit:hover { transform: rotate(90deg); }
.game-panel {
  position: absolute; left: 50%; top: 50%; width: min(440px, calc(100vw - 32px)); padding: 34px 30px; text-align: center;
  border-radius: 28px; border: 1px solid var(--line-2); background: rgba(8, 10, 26, .86);
  box-shadow: 0 30px 100px -20px rgba(0, 0, 0, .8), 0 0 80px -30px var(--a1);
  transform: translate(-50%, -40%) scale(.96); opacity: 0; pointer-events: none;
  transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.game-panel.show { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
.game-kicker { margin: 0; font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--a2); }
.game-panel h2 { margin: 10px 0 12px; font-size: clamp(34px, 6vw, 48px); line-height: 1; letter-spacing: -.04em; }
.game-panel h2 em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.game-panel p { color: var(--muted); margin: 0 0 24px; }
@media (max-width: 600px) { .game-hud { gap: 16px; padding: 8px 18px; top: 76px; } .game-quit { top: 16px; right: 16px; } }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 300; transform: translate(-50%, 30px); opacity: 0; padding: 12px 22px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 500; transition: opacity .4s, transform .5s var(--ease); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   NOUVEAUTÉS
   ========================================================= */

/* ---------- Sélecteur de langue ---------- */
.lang-switch { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.lang-switch button { padding: 5px 9px; border-radius: 999px; font: 500 11px var(--mono); letter-spacing: .08em; color: var(--dim); transition: color .3s, background .3s; }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.on { background: var(--grad); color: #fff; }
@media (max-width: 860px) { .lang-switch { order: 1; margin-left: auto; margin-right: 6px; } }

/* ---------- Changement de planète ---------- */
.planet-gl { transition: transform .38s cubic-bezier(.7, 0, .84, 0), opacity .38s, filter .38s; }
.planet-wrap.swap .planet-gl { transform: scale(.05) rotate(40deg); opacity: 0; filter: blur(6px); transition-timing-function: cubic-bezier(.7, 0, .84, 0); }
.planet-wrap:not(.swap) .planet-gl { transition-timing-function: cubic-bezier(.16, 1, .3, 1); transition-duration: .7s; }

/* ---------- Système solaire ---------- */
#solaire { z-index: 3; pointer-events: none; }
.planet-wrap:hover #solaire, .planet-wrap:focus-within #solaire { animation-play-state: paused; }
.mini {
  position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; pointer-events: auto;
  animation: rot 55s linear infinite; /* compense la rotation de l'orbite : l'étiquette reste droite */
  transition: transform .4s var(--ease);
}
.planet-wrap:hover .mini { animation-play-state: paused; }
.mini i {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, var(--m1), var(--m2) 45%, var(--m3) 75%, #000 110%);
  box-shadow: inset -4px -5px 8px rgba(0, 0, 0, .55), 0 0 14px -2px var(--glow);
  transition: transform .4s var(--ease), box-shadow .4s;
}
.mini.ringed i::after { content: ""; position: absolute; left: -35%; right: -35%; top: 42%; height: 16%; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .55); transform: rotate(-18deg); }
.mini span {
  position: absolute; left: 50%; top: calc(100% + 8px); transform: translate(-50%, 4px); white-space: nowrap; pointer-events: none;
  font: 500 10px var(--mono); letter-spacing: .15em; text-transform: uppercase; color: var(--ink);
  padding: 4px 8px; border-radius: 999px; background: rgba(6, 8, 18, .85); border: 1px solid var(--line-2);
  opacity: 0; transition: opacity .3s, transform .3s var(--ease);
}
.mini:hover i { transform: scale(1.35); box-shadow: inset -4px -5px 8px rgba(0, 0, 0, .55), 0 0 26px 2px var(--glow); }
.mini:hover span { opacity: 1; transform: translate(-50%, 0); }
.mini.on { pointer-events: none; }
.mini.on i { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--glow), 0 0 22px var(--glow); }
.o2 { animation-duration: 55s; }
@media (max-width: 860px) { .mini { width: 20px; height: 20px; margin: -10px 0 0 -10px; } }

/* ---------- Trou noir ---------- */
.blackhole {
  /* léger : uniquement des dégradés + transform (aucun filtre, aucun masque) → animé par la carte graphique */
  position: fixed; width: 320px; height: 320px; margin: -160px 0 0 -160px; z-index: 95; pointer-events: none; border-radius: 50%;
  background:
    radial-gradient(circle, #000 0 40%, rgba(0, 0, 0, .85) 44%, transparent 47%),
    radial-gradient(circle, transparent 42%, rgba(255, 255, 255, .9) 45%, rgba(var(--a2-rgb), .75) 49%, rgba(var(--a1-rgb), .45) 56%, rgba(var(--a3-rgb), .18) 64%, transparent 71%);
  transform: scale(0); will-change: transform, opacity; backface-visibility: hidden;
}
/* ---------- Poussière d'étoiles ---------- */
#stardust { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 9990; pointer-events: none; }

/* ---------- Succès ---------- */
.trophy { color: var(--muted); font-size: 12px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); transition: border-color .3s, color .3s, transform .4s var(--ease); }
.trophy:hover { color: var(--ink); border-color: rgba(var(--a1-rgb), .6); }
.trophy.bump { animation: bump .6s var(--ease); color: var(--a2); border-color: var(--a2); }
.ach {
  position: fixed; left: 20px; bottom: 20px; z-index: 320; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 40px);
  padding: 12px 20px 12px 12px; border-radius: 18px; overflow: hidden;
  background: rgba(8, 10, 24, .94); border: 1px solid rgba(var(--a1-rgb), .5);
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .8), 0 0 40px -10px rgba(var(--a1-rgb), .6);
  transform: translateY(140%) scale(.9); opacity: 0; transition: transform .6s var(--ease), opacity .4s;
}
.ach.show { transform: none; opacity: 1; }
.ach::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .18) 50%, transparent 70%); transform: translateX(-100%); }
.ach.show::after { animation: shineSweep 1.4s .3s ease-out; }
@keyframes shineSweep { to { transform: translateX(100%); } }
.ach-ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; font-size: 22px; background: rgba(var(--a1-rgb), .18); border: 1px solid rgba(var(--a1-rgb), .4); }
.ach small { display: block; font: 500 10px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--a2); }
.ach b { font-weight: 600; }
.ach-modal { position: fixed; inset: 0; z-index: 88; display: grid; place-items: center; padding: 16px; visibility: hidden; }
.ach-modal.open { visibility: visible; }
.ach-back { position: absolute; inset: 0; background: rgba(2, 3, 10, .75); opacity: 0; transition: opacity .4s; }
.ach-modal.open .ach-back { opacity: 1; }
.ach-card { position: relative; width: min(720px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 30px clamp(18px, 4vw, 36px); border-radius: 28px; background: #0a0c1f; border: 1px solid var(--line-2); opacity: 0; transform: translateY(30px) scale(.97); transition: opacity .4s, transform .5s var(--ease); }
.ach-modal.open .ach-card { opacity: 1; transform: none; }
.ach-kick { margin: 0; color: var(--a2); font-size: 12px; letter-spacing: .2em; }
.ach-card h3 { margin: 6px 0 16px; font-size: clamp(30px, 5vw, 44px); letter-spacing: -.04em; }
.ach-card h3 em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ach-bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); overflow: hidden; margin-bottom: 22px; }
.ach-bar i { display: block; height: 100%; background: var(--grad); border-radius: 6px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ach-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); opacity: .55; }
.ach-item.ok { opacity: 1; border-color: rgba(var(--a1-rgb), .45); background: rgba(var(--a1-rgb), .06); }
.ach-item b { display: block; font-size: 14px; }
.ach-item small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.ach-x { top: 14px; right: 14px; }

/* ---------- Formulaires ---------- */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.form-off { color: var(--dim); font-size: 14px; margin: 18px auto 0; max-width: 460px; }
body.srv .form-off { display: none; }
body:not(.srv) .contact-form, body:not(.srv) .guest-form { display: none; }
.form-status { margin: 4px 0 0; font-size: 14px; min-height: 1.4em; color: var(--muted); }
.form-status.ok { color: #4ade80; }
.form-status.err { color: #f87171; }
.contact-form, .guest-form { display: grid; gap: 12px; }
.contact-form { max-width: 620px; margin: 46px auto 0; text-align: left; }
.contact-form .small-title { margin: 0 0 4px; text-align: center; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form input, .contact-form textarea, .guest-form input, .guest-form textarea {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03);
  color: var(--ink); font: 15px/1.5 var(--sans); outline: none; resize: vertical; transition: border-color .3s, background .3s, box-shadow .3s;
}
.contact-form input:focus, .contact-form textarea:focus, .guest-form input:focus, .guest-form textarea:focus {
  border-color: rgba(var(--a1-rgb), .7); background: rgba(var(--a1-rgb), .06); box-shadow: 0 0 0 4px rgba(var(--a1-rgb), .12);
}
.contact-form button, .guest-form button { justify-self: start; }
@media (max-width: 600px) { .cf-row { grid-template-columns: 1fr; } }

/* ---------- Livre d'or ---------- */
.guest { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: stretch; }
.guest-sky {
  position: relative; min-height: 380px; border-radius: 28px; overflow: hidden; border: 1px solid var(--line-2);
  background: radial-gradient(ellipse at 30% 20%, rgba(var(--a1-rgb), .25), transparent 60%), radial-gradient(ellipse at 80% 90%, rgba(var(--a2-rgb), .18), transparent 60%), #05060f;
}
body:not(.srv) .guest-sky { display: none; }
body:not(.srv) .guest { grid-template-columns: 1fr; }
.guest-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--dim); font-family: var(--mono); font-size: 13px; padding: 20px; text-align: center; }
.gstar { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; }
.gstar i { position: absolute; inset: 8px; border-radius: 50%; background: #fff; transform: scale(var(--s)); box-shadow: 0 0 10px 2px rgba(255, 255, 255, .8), 0 0 24px 6px rgba(var(--a2-rgb), .5); animation: twinkle 3s var(--d) ease-in-out infinite; transition: transform .3s var(--ease); }
.gstar:hover i, .gstar.on i { transform: scale(1.8); background: var(--a2); box-shadow: 0 0 14px 4px var(--a2), 0 0 40px 10px rgba(var(--a1-rgb), .6); }
@keyframes twinkle { 50% { opacity: .45; } }
.gcard { position: absolute; left: 16px; right: 16px; bottom: 16px; padding: 16px 18px; border-radius: 18px; background: rgba(6, 8, 18, .88); border: 1px solid var(--line-2); pointer-events: none; }
.gcard:empty { display: none; }
.gcard p { margin: 0 0 6px; font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.35; }
.gcard small { color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.gcard.in { animation: fadeUp .5s var(--ease); }
.guest-side { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 28px; border-radius: 28px; border: 1px solid var(--line); background: rgba(8, 10, 26, .82); }
.guest-intro { margin: 0; font-size: 20px; line-height: 1.4; letter-spacing: -.01em; }
@media (max-width: 860px) { .guest { grid-template-columns: 1fr; } .guest-sky { min-height: 320px; } }

/* ---------- QR dans le terminal ---------- */
.t-qr { width: 180px; padding: 8px; margin: 6px 0; background: #fff; border-radius: 10px; }
.t-qr svg { display: block; width: 100%; height: auto; }

/* ---------- Pseudo ---------- */
.hero-alias { margin: 14px 0 0; font-size: 14px; letter-spacing: .12em; color: var(--dim); opacity: 0; }
body.ready .hero-alias { animation: fadeUp 1.2s var(--ease) .55s forwards; }
.hero-alias b { font-weight: 500; letter-spacing: .06em; color: var(--ink); padding: 4px 10px; margin-left: 4px; border-radius: 8px; border: 1px solid rgba(var(--a2-rgb), .45); background: rgba(var(--a2-rgb), .08); text-shadow: 0 0 12px rgba(var(--a2-rgb), .6); }
.about-card-pseudo { margin-top: 4px; font-size: 13px; color: var(--a2); letter-spacing: .08em; }
.foot-pseudo { color: var(--a2); }

/* ---------- Fiche d'étoile ---------- */
.star-ring {
  position: fixed; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; z-index: 96; pointer-events: none; border-radius: 50%;
  border: 1.5px solid var(--sc); box-shadow: 0 0 18px var(--sc), inset 0 0 10px var(--sc); opacity: 0; transition: opacity .3s;
}
.star-ring::before, .star-ring::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1px dashed var(--sc); opacity: .6; animation: rot 6s linear infinite; }
.star-ring::after { inset: -18px; opacity: .25; animation-duration: 10s; animation-direction: reverse; }
.star-ring.show { opacity: 1; }
.star-card {
  position: fixed; left: 0; top: 0; z-index: 97; width: min(300px, calc(100vw - 24px)); padding: 18px 20px 14px; border-radius: 18px;
  background: rgba(6, 8, 18, .94); border: 1px solid var(--line-2); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9), 0 0 50px -20px var(--sc);
  opacity: 0; transition: opacity .35s; will-change: transform;
}
.star-card.show { opacity: 1; }
.star-card h4 { margin: 4px 0 12px; font-size: 22px; letter-spacing: -.02em; }
.sc-kick { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sc-kick i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.star-card dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; margin: 0 0 12px; font-size: 13.5px; }
.star-card dt { color: var(--dim); }
.star-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.sc-fact { margin: 0 0 10px; font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.35; color: var(--ink); }
.sc-tip { margin: 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--dim); letter-spacing: .05em; }
.sc-x { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; font-size: 12px; color: var(--muted); border: 1px solid var(--line-2); }
.sc-x:hover { color: var(--ink); }

/* ---------- Thème Soleil : éruptions ---------- */
html[data-planete="soleil"] .planet-wrap::before { background: radial-gradient(circle, rgba(255, 170, 40, .55), rgba(255, 90, 0, .15) 45%, transparent 70%); animation: sunPulse 4s ease-in-out infinite; }
html[data-planete="soleil"] .planet-wrap::after {
  content: ""; position: absolute; inset: 27%; border-radius: 50%; pointer-events: none; z-index: 0;
  border: 2px solid rgba(255, 190, 80, .7); box-shadow: 0 0 30px rgba(255, 150, 30, .6);
  animation: flare 3.6s cubic-bezier(.16, 1, .3, 1) infinite; will-change: transform, opacity;
}
html[data-planete="soleil"] .orbit-line.o1 { border-color: rgba(255, 190, 80, .18); }
@keyframes sunPulse { 50% { transform: scale(1.08); opacity: .85; } }
@keyframes flare { 0% { transform: scale(.95); opacity: .8; } 100% { transform: scale(2.1); opacity: 0; } }
.mini[data-id="soleil"] i { background: radial-gradient(circle at 40% 35%, #fff8d8, #ffc233 35%, #ff8a10 65%, #d14a00); box-shadow: 0 0 16px 2px #ffae2b; }

/* ---------- Supernova ---------- */
.nova {
  position: fixed; width: 240px; height: 240px; margin: -120px 0 0 -120px; z-index: 96; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 22%, #fff7da 32%, #ffd166 40%, rgba(255, 140, 30, .97) 45%, rgba(255, 80, 0, .55) 55%, rgba(255, 40, 0, .15) 63%, transparent 70%);
  transform: scale(0); will-change: transform, opacity;
}
.nova-ring {
  position: fixed; width: 200px; height: 200px; margin: -100px 0 0 -100px; z-index: 97; pointer-events: none; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 0 40px rgba(var(--a2-rgb), .9), inset 0 0 40px rgba(var(--a1-rgb), .7);
  will-change: transform, opacity;
}
html.nova-charge .hero { animation: novaShake .07s linear infinite; }
@keyframes novaShake { 25% { transform: translate(3px, -2px); } 50% { transform: translate(-3px, 2px); } 75% { transform: translate(2px, 3px); } }
.planet-tag.alerte em { color: #ffb020; font-style: normal; animation: blink .5s steps(1) infinite; }

/* ---------- Thème caché : pulsar (après la supernova) ---------- */
html[data-planete="pulsar"] body { background: #070311; }
html[data-planete="pulsar"] .nebula span { opacity: .42; }
html[data-planete="pulsar"] .nebula span:nth-child(2) { opacity: .3; }
html[data-planete="pulsar"] .section-head h2 em, html[data-planete="pulsar"] .hero-title .serif > span { filter: drop-shadow(0 0 22px rgba(var(--a1-rgb), .55)); }
html[data-planete="pulsar"] .planet-wrap::before { background: radial-gradient(circle, rgba(var(--a2-rgb), .45), rgba(var(--a3-rgb), .15) 45%, transparent 70%); animation: sunPulse .9s ease-in-out infinite; }

/* ---------- Optimisation ---------- */
/* Couches isolées : le navigateur ne repeint pas le reste de la page quand elles bougent */
#cosmos, #stardust, .grain, .nebula { contain: strict; }
.marquee-track, .orbit-spin, .orbit-planet > span, .orbit-line, .mini, .planet-gl { will-change: transform; }
.project, .skill-group, .stat, .tl-item, .lang, .chips li { contain: layout style; }
/* Qualité réduite (appareil lent détecté automatiquement) */
html.q-basse .grain { display: none; }
html.q-basse .nebula span { animation: none; }
html.q-basse .star-ring::before, html.q-basse .star-ring::after { animation: none; }

/* ---------- Supernova : planètes englouties, explosions, trous noirs ---------- */
html.nova-active #solaire { opacity: 0; transition: opacity .2s; }
#solaire { transition: opacity .8s; }
.nova-mini { position: fixed !important; z-index: 97; animation: none !important; pointer-events: none !important; }
.nova-mini span { display: none; }
.pop {
  position: fixed; width: 70px; height: 70px; margin: -35px 0 0 -35px; z-index: 98; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 18%, var(--pc) 34%, rgba(255, 140, 40, .6) 50%, transparent 70%);
  will-change: transform, opacity;
}

/* ---------- Mode Matrix (sur le site lui-même) ---------- */
.matrix-rain { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .7s; contain: strict; }
.matrix-rain.on { opacity: .42; }
html.matrix-mode { --ink: #dcffe3; --muted: #8fcf9f; --dim: #4f7d5c; --line: rgba(74, 222, 128, .12); --line-2: rgba(74, 222, 128, .22); }
html.matrix-mode body { background: #010a03; }
html.matrix-mode .section-head h2, html.matrix-mode .hero-title { text-shadow: 0 0 22px rgba(34, 197, 94, .45); }
html.matrix-mode .planet-gl { filter: grayscale(1) sepia(1) hue-rotate(70deg) saturate(2.6); }
html.matrix-mode .cursor-dot { background: #4ade80; box-shadow: 0 0 12px #4ade80; }
html.matrix-mode .grain { opacity: .07; }

/* ---------- Fenêtre des succès : défilement animé ---------- */
.ach-card { overflow: hidden; padding: 0; }
.ach-scroll {
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  padding: 30px calc(clamp(18px, 4vw, 36px) + 14px) 30px clamp(18px, 4vw, 36px);
  scrollbar-width: none;
}
.ach-scroll::-webkit-scrollbar { display: none; }
/* fondus haut / bas quand il reste du contenu */
.ach-card::before, .ach-card::after { content: ""; position: absolute; left: 0; right: 0; height: 60px; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .35s; }
.ach-card::before { top: 0; background: linear-gradient(#0a0c1f, rgba(10, 12, 31, 0)); }
.ach-card::after { bottom: 0; background: linear-gradient(rgba(10, 12, 31, 0), #0a0c1f); }
.ach-card.haut::before, .ach-card.bas::after { opacity: 1; }
.ach-x { z-index: 3; }
/* rail + comète */
.ach-rail { position: absolute; right: 12px; top: 70px; bottom: 22px; width: 4px; z-index: 3; border-radius: 4px; background: rgba(255, 255, 255, .06); cursor: pointer; transition: width .3s var(--ease), background .3s, opacity .3s; }
.ach-rail.off { opacity: 0; pointer-events: none; }
.ach-rail:hover, .ach-rail.actif { width: 6px; background: rgba(var(--a1-rgb), .14); }
.ach-thumb {
  position: absolute; left: 0; top: 0; width: 100%; height: 40px; border-radius: 6px; cursor: grab; will-change: transform;
  background: linear-gradient(rgba(var(--a2-rgb), .15), var(--a2) 55%, var(--a1));
  box-shadow: 0 0 12px rgba(var(--a1-rgb), .6);
}
.ach-thumb::after { /* tête de la comète */
  content: ""; position: absolute; left: 50%; bottom: -4px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 10px 3px var(--a2), 0 0 24px 6px rgba(var(--a1-rgb), .7);
  transition: transform .3s var(--ease);
}
.ach-rail.actif .ach-thumb::after, .ach-thumb:hover::after { transform: scale(1.35); }
.ach-thumb:active { cursor: grabbing; }
/* succès qui apparaissent en cascade */
.ach-modal.open .ach-item { animation: achIn .55s var(--ease) both; animation-delay: calc(var(--i) * 35ms + 150ms); }
@keyframes achIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.ach-item.ok .ach-ico { animation: achGlow 2.4s ease-in-out infinite; }
@keyframes achGlow { 50% { transform: scale(1.08); } }

/* ---------- Barre de défilement de la page, aux couleurs du thème ---------- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #04050d; }
::-webkit-scrollbar-thumb { border-radius: 11px; border: 3px solid #04050d; background: linear-gradient(var(--a2), var(--a1), var(--a3)); }
::-webkit-scrollbar-thumb:hover { border-width: 2px; }
@supports (-moz-appearance: none) { html, .term-body, .adm-body { scrollbar-width: thin; scrollbar-color: var(--a1) #04050d; } }

/* =========================================================
   EASTER EGGS VISUELS
   ========================================================= */
/* 🪩 disco */
html.disco .planet-gl { animation: discoHue 1s linear infinite; }
@keyframes discoHue { to { filter: hue-rotate(360deg) saturate(1.6); } }
.disco-scene { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .8s; }
.disco-scene.on { opacity: 1; }
.disco-fil { position: absolute; left: 50%; top: 0; width: 2px; height: 90px; margin-left: -1px; background: linear-gradient(#888, #ccc); }
.disco-boule {
  position: absolute; left: 50%; top: 86px; width: 90px; height: 90px; margin-left: -45px; border-radius: 50%;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .35) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .35) 0 1px, transparent 1px 10px),
    radial-gradient(circle at 35% 30%, #fff, #d9dde8 30%, #8a92a8 65%, #3a3f52);
  box-shadow: 0 0 40px rgba(255, 255, 255, .5), 0 0 90px rgba(var(--a1-rgb), .6);
  animation: discoTourne 3s linear infinite;
}
@keyframes discoTourne { to { transform: rotate(360deg); } }
.disco-spots i {
  position: absolute; left: 50%; top: 130px; width: 120vmax; height: 120vmax; margin: -60vmax 0 0 -60vmax; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 6%, rgba(255, 60, 172, .22) 7% 9%, transparent 10% 30%, rgba(0, 245, 212, .2) 31% 33%, transparent 34% 55%, rgba(254, 228, 64, .2) 56% 58%, transparent 59% 80%, rgba(155, 93, 229, .22) 81% 83%, transparent 84%);
  animation: discoTourne 7s linear infinite; will-change: transform;
}
.disco-spots i:nth-child(2) { animation-duration: 11s; animation-direction: reverse; opacity: .8; }
.disco-spots i:nth-child(3) { animation-duration: 5s; opacity: .6; }
.disco-spots i:nth-child(4) { animation-duration: 9s; animation-direction: reverse; opacity: .5; }
html.disco .section-head h2 em, html.disco .hero-title .serif > span { animation: discoHue 1.2s linear infinite; }

/* 🎈 gravité zéro */
html.gravite .flotte { animation: flotter var(--gd) ease-in-out var(--gl) infinite alternate; }
@keyframes flotter {
  0% { translate: 0 0; rotate: 0deg; }
  100% { translate: var(--gx) var(--gy); rotate: var(--gr); }
}

/* 👾 rétro 8-bit */
html.retro { --sans: "Press Start 2P", monospace; --serif: "Press Start 2P", monospace; --mono: "Press Start 2P", monospace; }
html.retro body { font-size: 11px; line-height: 1.9; }
html.retro *, html.retro *::before, html.retro *::after { border-radius: 0 !important; }
html.retro em { font-style: normal; }
html.retro .hero-title { font-size: clamp(26px, 6vw, 80px); line-height: 1.2; letter-spacing: 0; }
html.retro .section-head h2 { font-size: clamp(22px, 4.4vw, 56px); letter-spacing: 0; line-height: 1.2; }
html.retro .contact-title, html.retro .about-text h3 { font-size: clamp(16px, 2.6vw, 30px); letter-spacing: 0; line-height: 1.4; }
html.retro .project h3, html.retro .tl-item h3 { font-size: 15px; letter-spacing: 0; line-height: 1.5; }
html.retro .stat strong { font-size: clamp(24px, 3.4vw, 44px); letter-spacing: 0; }
html.retro .hero-accroche, html.retro .about-text p, html.retro .contact-text { font-size: 11px; }
html.retro .btn { box-shadow: 4px 4px 0 rgba(var(--a1-rgb), .8); }
html.retro #cosmos, html.retro .planet-gl { image-rendering: pixelated; }
html.retro .grain { opacity: .12; background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, .5) 0 2px, transparent 2px 4px); }

/* ⚡ hyperespace */
.hyper-jauge { position: fixed; left: 50%; bottom: 40px; z-index: 90; transform: translate(-50%, 20px); opacity: 0; transition: opacity .3s, transform .3s; text-align: center; pointer-events: none; color: #fff; }
.hyper-jauge.on { opacity: 1; transform: translate(-50%, 0); }
.hyper-jauge span { display: block; font-size: 12px; letter-spacing: .5em; margin-bottom: 8px; text-shadow: 0 0 12px var(--a2); }
.hyper-jauge i { display: block; width: 240px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.hyper-jauge b { display: block; height: 100%; background: linear-gradient(90deg, var(--a2), #fff); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 12px var(--a2); }
.hyper-jauge small { display: block; margin-top: 8px; font-size: 10px; color: var(--dim); letter-spacing: .1em; }
html { --hyper: 0; }
.nebula { opacity: calc(1 - var(--hyper) * .7); }
.hyper-flash { position: fixed; inset: 0; z-index: 95; pointer-events: none; background: radial-gradient(circle, #fff 0 30%, rgba(180, 220, 255, .9) 60%, rgba(var(--a2-rgb), .6)); opacity: 0; }

/* 🧨 écran piraté */
html.glitch main { animation: glitchShift .16s steps(2) infinite; }
@keyframes glitchShift { 0% { transform: translate(0); } 25% { transform: translate(-7px, 2px); } 50% { transform: translate(6px, -3px) skewX(4deg); } 75% { transform: translate(-3px, 0); } }
html.glitch h1, html.glitch h2, html.glitch h3 { text-shadow: 3px 0 #ff004c, -3px 0 #00e5ff; }
html.glitch .planet-gl { animation: glitchHue .3s steps(3) infinite; }
@keyframes glitchHue { 0% { filter: hue-rotate(90deg) invert(.1); } 50% { filter: hue-rotate(250deg) saturate(3); } }
.glitch-scene { position: fixed; inset: 0; z-index: 94; pointer-events: none; transition: opacity .4s; }
.glitch-scene.fin { opacity: 0; }
.glitch-bars { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 0, 76, .12) 0 3px, transparent 3px 22px, rgba(0, 229, 255, .1) 22px 25px, transparent 25px 57px); animation: glitchBars .22s steps(3) infinite; mix-blend-mode: screen; }
@keyframes glitchBars { 0% { transform: translateY(0); } 33% { transform: translateY(-17px); } 66% { transform: translateY(29px); } }
.glitch-err { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); padding: 22px 24px; background: rgba(20, 0, 6, .92); border: 2px solid #ff004c; box-shadow: 0 0 40px rgba(255, 0, 76, .6); color: #ff5c8a; animation: glitchShift .3s steps(2) infinite; }
.glitch-err b { display: block; font-size: 22px; color: #fff; text-shadow: 2px 0 #ff004c, -2px 0 #00e5ff; margin-bottom: 8px; }
.glitch-err p { margin: 0 0 12px; font-size: 13px; letter-spacing: .08em; }
.glitch-err pre { margin: 0; font-size: 11px; line-height: 1.5; color: rgba(255, 120, 150, .7); white-space: pre-wrap; }

/* 🧑‍🚀 astronaute (en arrière-plan) */
.astro { position: fixed; left: 0; z-index: 1; pointer-events: none; will-change: transform; }
.astro-corps { position: relative; animation: astroFlotte 5s ease-in-out infinite; }
.astro-emoji { display: block; font-size: 58px; animation: astroTourne 14s linear infinite; filter: drop-shadow(0 0 16px rgba(var(--a2-rgb), .5)); }
.astro.gauche .astro-emoji { animation-direction: reverse; }
.astro-bulle { position: absolute; left: 70%; bottom: 100%; white-space: nowrap; padding: 6px 12px; border-radius: 14px 14px 14px 2px; background: #fff; color: #111; font: 600 13px var(--sans); opacity: 0; animation: astroBulle 26s linear forwards; }
@keyframes astroFlotte { 50% { transform: translateY(-22px); } }
@keyframes astroTourne { to { transform: rotate(360deg); } }
@keyframes astroBulle { 0%, 30% { opacity: 0; transform: scale(.6); } 34%, 60% { opacity: 1; transform: none; } 64%, 100% { opacity: 0; } }

/* 👽 signal extraterrestre */
.signal { position: absolute; left: 50%; top: 18px; z-index: 5; display: flex; align-items: center; gap: 14px; width: min(560px, calc(100% - 32px)); padding: 14px 18px; border-radius: 18px; background: rgba(4, 14, 8, .94); border: 1px solid rgba(74, 222, 128, .5); box-shadow: 0 0 40px -10px rgba(74, 222, 128, .7); color: #b6ffc8; text-align: left; transform: translate(-50%, -12px); opacity: 0; transition: opacity .5s, transform .6s var(--ease); }
.signal.on { opacity: 1; transform: translate(-50%, 0); }
.signal-antenne { position: relative; font-size: 30px; flex: none; width: 44px; text-align: center; }
.signal-antenne i { position: absolute; left: 50%; top: 40%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 2px solid #4ade80; opacity: 0; animation: onde 1.8s ease-out infinite; }
.signal-antenne i:nth-child(2) { animation-delay: .6s; }
.signal-antenne i:nth-child(3) { animation-delay: 1.2s; }
@keyframes onde { from { transform: scale(.5); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
.signal-txt small { display: block; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #4ade80; }
.signal-morse { margin: 4px 0 2px; font-size: 16px; letter-spacing: .08em; word-break: break-all; color: #e6ffe9; min-height: 1.3em; }
.signal-trad { margin: 0; font-size: 12px; color: #8fcf9f; min-height: 1.2em; }

/* ---------- Animations en pause hors de l'écran (moins de travail pour le navigateur) ---------- */
.hors-ecran *, .hors-ecran *::before, .hors-ecran *::after { animation-play-state: paused !important; }
/* ---------- 👑 Thème secret : la galaxie L0rnix (tous les succès) ---------- */
html[data-planete="galaxie"] body { background: #070411; }
html[data-planete="galaxie"] .nebula span { opacity: .4; }
html[data-planete="galaxie"] .nebula span:nth-child(2) { opacity: .3; }
html[data-planete="galaxie"] .section-head h2 em,
html[data-planete="galaxie"] .hero-title .serif > span,
html[data-planete="galaxie"] .contact-title em {
  background: linear-gradient(115deg, #fff4d0 0%, #f5c451 30%, #fff8e6 45%, #d99a2b 60%, #a78bfa 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(245, 196, 81, .35));
}
html[data-planete="galaxie"] .planet-wrap::before { background: radial-gradient(circle, rgba(245, 196, 81, .35), rgba(167, 139, 250, .18) 45%, transparent 70%); }
html[data-planete="galaxie"] .logo::after { content: " 👑"; font-size: 13px; }
html[data-planete="galaxie"] .trophy { border-color: rgba(245, 196, 81, .7); color: #f5c451; box-shadow: 0 0 18px -4px rgba(245, 196, 81, .7); }
.mini[data-id="galaxie"] i {
  background: radial-gradient(circle, #fff6dc 0 12%, rgba(245, 196, 81, .9) 20%, transparent 32%),
    conic-gradient(from 0deg, transparent, rgba(245, 196, 81, .9) 10%, transparent 22%, rgba(167, 139, 250, .9) 43%, transparent 55%, rgba(245, 196, 81, .8) 76%, transparent 88%);
  box-shadow: 0 0 18px 2px rgba(245, 196, 81, .7);
  animation: rot 6s linear infinite;
}
.galaxie-flash { position: fixed; inset: 0; z-index: 95; pointer-events: none; opacity: 0; background: radial-gradient(circle, #fff 0 20%, rgba(255, 226, 150, .92) 45%, rgba(245, 196, 81, .7) 70%, rgba(167, 139, 250, .5)); }

/* ---------- ⚡ Bouton « Mode léger » ---------- */
.leger { color: var(--dim); font-size: 12px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); transition: color .3s, border-color .3s; }
.leger:hover { color: var(--ink); }
.leger.on { color: #fde047; border-color: rgba(253, 224, 71, .5); }

/* ---------- ⚡ Mode léger : on coupe ce qui coûte cher ---------- */
html.q-basse .orbit-spin, html.q-basse .orbit-planet > span, html.q-basse .orbit-core,
html.q-basse .orbit-line, html.q-basse .mini, html.q-basse .avatar::after, html.q-basse .gstar i,
html.q-basse .ach-item.ok .ach-ico, html.q-basse .planet-wrap::before, html.q-basse .planet-wrap::after { animation: none !important; }
html.q-basse .marquee-track { animation-duration: 70s; }
html.q-basse .disco-spots i:nth-child(n+3) { display: none; }
html.q-basse .cursor { display: none; }
html.q-basse body, html.q-basse a, html.q-basse button { cursor: auto; }
html.q-basse .about-card-glow, html.q-basse .project-glare { display: none; }
html.q-basse .nebula span:nth-child(3) { display: none; }
html.q-basse .reveal { transition-duration: .6s; }