/* ==========================================================================
   luuc.fr — thème noir, esprit Vercel
   Superposition : canvas WebGL (fixe, z -1) → décor CSS (fixe, z -1) → contenu.
   Le fond noir est porté par <html> pour que le canvas reste visible.
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg: #000;
  --surface: rgba(12, 12, 12, 0.66);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --fg: #ededed;
  --fg-strong: #fff;
  --muted: #a1a1a1;
  --subtle: #8a8a8a;

  --blue: #0070f3;
  --cyan: #00dfd8;
  --violet: #7928ca;
  --pink: #ff0080;
  --teal: #50e3c2;
  --ok: #45d483;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --radius: 12px;
  --radius-lg: 16px;
  --container: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, canvas { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
strong { color: var(--fg-strong); font-weight: 600; }
::selection { background: rgba(0, 112, 243, 0.5); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
html.menu-open { overflow: hidden; }

.i {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  stroke-width: 1.75;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--fg-strong);
  color: #000;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- Scène 3D et décor ---------- */
#scene {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.6s var(--ease);
}
.scene-ready #scene { opacity: 1; }
.no-webgl #scene { display: none; }

.decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.7) 100%);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 2px;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--violet), var(--pink));
  box-shadow: 0 0 12px rgba(0, 223, 216, 0.6);
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
}

/* ---------- Mise en page ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { position: relative; padding-block: clamp(96px, 14vh, 160px); }

.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subtle);
}
.eyebrow span {
  padding: 4px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--fg);
  letter-spacing: 0.06em;
}

.section-title {
  padding-bottom: 0.06em;
  font-size: clamp(2.3rem, 5.4vw, 4.2rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.045em;
  background: linear-gradient(180deg, #fff 30%, rgba(255, 255, 255, 0.55));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-sub { margin-top: 20px; font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--muted); }
.section-sub + .section-sub { margin-top: 10px; }

/* ---------- Boutons, puces, touches ---------- */
.btn {
  --h: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--h);
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn .i { font-size: 16px; }
.btn:disabled { opacity: 0.7; cursor: progress; }
.btn-primary { background: var(--fg-strong); color: #000; }
.btn-primary:hover { background: #d9d9d9; }
.btn-ghost {
  border-color: var(--border-strong);
  background: rgba(0, 0, 0, 0.4);
  color: var(--fg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.08); }
.btn-sm { --h: 34px; padding: 0 13px; font-size: 13px; }
.btn-icon { width: var(--h); padding: 0; }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font: 500 12.5px/1 var(--font-mono);
  color: var(--fg);
}
.chip .i { font-size: 14px; color: var(--muted); }

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  font: 500 11px/1 var(--font-mono);
  color: var(--muted);
}

.link {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.3s var(--ease);
}
.link:hover { background-size: 100% 1px; }

/* ---------- Cartes en verre + spotlight ---------- */
.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 30px 80px -40px rgba(0, 0, 0, 0.8);
}
.card::before,
.card::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.card::before {
  inset: 0;
  z-index: -1;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.06), transparent 45%);
}
.card::after {
  inset: -1px;
  padding: 1px;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.4), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.card:hover::before,
.card:hover::after { opacity: 1; }

.tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s var(--ease);
}
.tilt.is-tilting { transition: transform 0.1s linear; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}
.nav.is-scrolled,
.menu-open .nav {
  border-bottom-color: var(--border);
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 100%; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg-strong);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--fg-strong);
  color: #000;
  font: 600 12px/1 var(--font-mono);
  letter-spacing: -0.04em;
}

.nav-links { position: relative; display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links a {
  position: relative;
  z-index: 1;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a[aria-current] { color: var(--fg-strong); }
.nav-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s var(--ease), width 0.25s var(--ease), opacity 0.2s;
}

.nav-actions { display: flex; align-items: center; gap: 10px; }
.cmdk-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 6px 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.cmdk-trigger:hover { border-color: rgba(255, 255, 255, 0.28); color: var(--fg); }

.nav-toggle {
  display: none;
  place-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--fg);
  transition: transform 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--nav-h) 0 0;
  z-index: 49;
  display: flex;
  flex-direction: column;
  padding: 16px var(--gutter) 40px;
  background: rgba(0, 0, 0, 0.94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.mobile-menu.is-open { opacity: 1; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu a {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  translate: 0 8px;
  transition: translate 0.4s var(--ease), color 0.2s;
}
.mobile-menu.is-open a { translate: none; }
.mobile-menu .btn { margin-top: 28px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 40px) var(--gutter) 22vh;
  overflow: hidden;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-position: 50% 0;
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, #000 20%, transparent 75%);
}
.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -30vh;
  z-index: -1;
  width: 150vw;
  max-width: 2000px;
  height: 70vh;
  translate: -50% 0;
  background: radial-gradient(ellipse 50% 50% at 50% 60%, rgba(0, 112, 243, 0.3), rgba(121, 40, 202, 0.12) 45%, transparent 72%);
  filter: blur(10px);
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-inner { display: flex; flex-direction: column; align-items: center; max-width: 980px; }

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  margin-bottom: 28px;
  padding: 0 6px 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.hero-pill:hover { border-color: rgba(255, 255, 255, 0.3); color: var(--fg); }
.hero-pill .i { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); }
.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 10px var(--cyan);
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  font: 500 13px/1 var(--font-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--subtle);
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: "";
  width: 36px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35));
}
.hero-eyebrow::after { transform: scaleX(-1); }

.hero-title {
  padding: 0 0.04em 0.08em;
  font-size: clamp(3.4rem, 12.5vw, 9.5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.06em;
  white-space: nowrap;
  background: linear-gradient(180deg, #fff 25%, rgba(255, 255, 255, 0.62));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Effet « déchiffrement » : la vraie lettre (invisible) garde la mise en page */
.hero-title .scr { position: relative; visibility: hidden; }
.hero-title .scr::after {
  content: attr(data-g);
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% 0;
  visibility: visible;
  color: var(--cyan);
  opacity: 0.85;
  text-shadow: 0 0 18px rgba(0, 223, 216, 0.5);
}

.hero-role { margin-top: 22px; font-size: clamp(1.05rem, 2vw, 1.35rem); letter-spacing: -0.01em; color: var(--muted); }

.hero-words {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.1em 0.35em;
  margin-top: 26px;
  font-size: clamp(1.6rem, 4.4vw, 3.1rem);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.045em;
}
.word { position: relative; display: inline-block; color: var(--fg-strong); }
.word::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  background-image: var(--g);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  animation: word-glow 7.5s var(--ease) infinite;
  animation-delay: var(--delay);
}
.w1 { --g: linear-gradient(90deg, #007cf0, #00dfd8); --delay: 0s; }
.w2 { --g: linear-gradient(90deg, #7928ca, #ff0080); --delay: 2.5s; }
.w3 { --g: linear-gradient(90deg, #ff4d4d, #f9cb28); --delay: 5s; }

.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  translate: -50% 0;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--subtle);
}
.scroll-hint i {
  position: relative;
  width: 1px;
  height: 44px;
  overflow: hidden;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), transparent);
}
.scroll-hint i::after {
  content: "";
  position: absolute;
  top: -40%;
  left: 0;
  width: 100%;
  height: 40%;
  background: #fff;
  animation: scroll-drop 2s var(--ease) infinite;
}

/* ---------- Bandeau des outils ---------- */
.stack { padding-block: 28px 8px; }
.stack-label {
  margin-bottom: 22px;
  text-align: center;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--subtle);
}
.marquee {
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  flex: none;
  gap: 44px;
  padding-right: 44px;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--muted);
  transition: color 0.2s;
}
.marquee-track li:hover { color: var(--fg-strong); }
.marquee-track .i { font-size: 22px; }

/* ---------- Moi ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(40px, 7vw, 96px);
}
.about-text .lead { margin-top: 28px; font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.6; color: var(--fg); }
.about-text > p:not(.eyebrow):not(.lead) { margin-top: 16px; color: var(--muted); }

.meta-list { display: grid; gap: 10px; margin-top: 28px; }
.meta-list > div { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.meta-list dt {
  width: 64px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
}
.meta-list dd { display: flex; flex: 1 1 0; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; font-weight: 500; color: var(--fg); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 40px; }
.stat { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(10, 10, 10, 0.6); }
.stat .i { font-size: 18px; color: var(--subtle); }
.stat-num {
  display: block;
  margin-top: 14px;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--fg-strong);
}
.stat-label {
  display: block;
  margin-top: 8px;
  font: 500 11px/1.35 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

/* Le terminal occupe la gauche de la colonne : la baie serveur 3D se dresse à sa droite */
.about-visual { position: relative; justify-self: end; width: 100%; max-width: 480px; }

.terminal {
  position: relative;
  width: min(380px, 88%);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: rgba(8, 8, 8, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.terminal-bar i:nth-child(2) { background: #febc2e; }
.terminal-bar i:nth-child(3) { background: #28c840; }
.terminal-bar span { margin-inline: auto; translate: -20px 0; font: 500 11.5px/1 var(--font-mono); color: var(--subtle); }
.terminal-body {
  min-height: 13.2em;
  padding: 14px 16px 16px;
  font: 400 12.5px/1.7 var(--font-mono);
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
}
.t-prompt { color: var(--cyan); }
.t-cmd { color: var(--fg-strong); }
.t-line.is-hidden { visibility: hidden; }
.t-caret {
  display: inline-block;
  width: 0.55em;
  height: 1.15em;
  margin-left: 2px;
  vertical-align: -0.2em;
  background: var(--fg);
  animation: blink 1.1s steps(1) infinite;
}

/* ---------- Compétences (scrollytelling) ---------- */
.skills .section-head { margin-bottom: 4vh; }
.steps { position: relative; display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 1fr); column-gap: 40px; }
.step { grid-column: 1; display: flex; align-items: center; min-height: 88vh; padding-block: 6vh; }
.step-card {
  width: 100%;
  padding: 28px;
  opacity: 0.28;
  translate: -10px 0;
  filter: saturate(0.4);
  transition: opacity 0.6s var(--ease), translate 0.6s var(--ease), filter 0.6s var(--ease), border-color 0.6s;
}
.step.is-active .step-card,
.no-js .step-card {
  opacity: 1;
  translate: none;
  filter: none;
  border-color: color-mix(in srgb, var(--c1) 30%, transparent);
}
.step-index { font: 500 12px/1 var(--font-mono); letter-spacing: 0.12em; color: var(--subtle); }
.step-index b { font-weight: 500; color: var(--fg); }
.step-title {
  margin-top: 18px;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--fg-strong);
}
.step-score {
  margin-top: 10px;
  font-size: clamp(3.8rem, 7vw, 5.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, var(--c1), var(--c2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.step-score small { margin-left: 2px; font-size: 0.45em; letter-spacing: -0.03em; }
.step-desc { margin-top: 14px; font-size: 15px; color: var(--muted); }

.bars { display: grid; gap: 14px; margin-top: 22px; }
.bar-head { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--fg); }
.bar-head span:last-child { font: 500 13px/1.6 var(--font-mono); color: var(--muted); }
.bar { height: 4px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.08); }
.bar i {
  display: block;
  width: var(--v);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--c2), var(--c1));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1.3s var(--ease) 0.15s;
}
.step.is-active .bar i,
.no-js .bar i { transform: none; }
.step .chips { margin-top: 22px; }

.steps-hud {
  position: sticky;
  top: calc(100vh - 88px);
  grid-column: 2;
  grid-row: 1 / span 7;
  align-self: start;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font: 500 12px/1 var(--font-mono);
  color: var(--muted);
}
.steps-hud ol { display: flex; gap: 6px; }
.steps-hud button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: background-color 0.3s, transform 0.3s;
}
.steps-hud button:hover { background: rgba(255, 255, 255, 0.5); }
.steps-hud button[aria-current="true"] { background: var(--fg-strong); transform: scale(1.3); }
.steps-hud-index { color: var(--fg); }
.steps-hud-label { min-width: 12ch; }

/* ---------- Diplômes ---------- */
.diploma-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 16px; }
.diploma { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.diploma-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.diploma-level {
  font: 500 11.5px/1.3 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}
.diploma-level b { font-weight: 500; color: var(--fg); }
.badge-ok {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(69, 212, 131, 0.3);
  border-radius: 999px;
  background: rgba(69, 212, 131, 0.1);
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ok);
}
.level-meter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.level-meter i { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); }
.level-meter i.on { background: linear-gradient(90deg, var(--teal), var(--cyan)); box-shadow: 0 0 10px rgba(80, 227, 194, 0.5); }
.diploma-title { font-size: 1.2rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.025em; color: var(--fg-strong); }
.diploma-abbr {
  align-self: flex-start;
  padding: 5px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--fg);
}
.diploma-blocks { display: grid; gap: 8px; margin-top: 4px; }
.diploma-blocks details {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s, background-color 0.2s;
}
.diploma-blocks details[open] { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.02); }
.diploma-blocks summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--fg);
  cursor: pointer;
  list-style: none;
}
.diploma-blocks summary::-webkit-details-marker { display: none; }
.diploma-blocks summary .i { margin-top: 2px; font-size: 15px; color: var(--subtle); transition: transform 0.3s var(--ease); }
.diploma-blocks details[open] summary .i { transform: rotate(180deg); }
.diploma-blocks ul { display: grid; gap: 7px; padding: 0 14px 14px; }
.diploma-blocks li { position: relative; padding-left: 16px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.diploma-blocks li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px rgba(80, 227, 194, 0.6);
}

/* ---------- Expérience ---------- */
/* Contenu à gauche, forme 3D à droite (même règle que les compétences) */
.timeline { position: relative; max-width: 960px; padding-left: 48px; }
.timeline-rail {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 15px;
  width: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
}
.timeline-beam {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--cyan), var(--blue) 50%, var(--violet));
  transform: scaleY(var(--p, 0));
  transform-origin: 50% 0;
}
.timeline-node {
  position: absolute;
  top: 30px;
  left: 8px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 4px rgba(0, 223, 216, 0.12), 0 0 18px rgba(0, 223, 216, 0.6);
}

.xp { padding: clamp(22px, 3vw, 34px); }
.xp-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; }
.xp-logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 112, 243, 0.25), rgba(0, 223, 216, 0.08));
  font-size: 20px;
  color: var(--fg-strong);
}
.xp-company { font-size: 1.35rem; font-weight: 650; letter-spacing: -0.03em; color: var(--fg-strong); }
.xp-role { margin-top: 2px; font-size: 14.5px; color: var(--muted); }
.xp-period {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font: 500 12px/1 var(--font-mono);
  white-space: nowrap;
  color: var(--fg);
}

.xp-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.35);
}
.xp-stats > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; padding: 18px; }
.xp-stats > div + div { border-left: 1px solid var(--border); }
.xp-stats dd {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--fg-strong);
}
.xp-stats dt {
  font: 500 11px/1.35 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

.xp-list { margin-top: 10px; }
.xp-list li {
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: start;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.xp-list li:last-child { padding-bottom: 4px; border-bottom: 0; }
.xp-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 17px;
  color: var(--fg);
}
.xp-list p { padding-top: 6px; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(24px, 4vw, 48px);
  max-width: min(1040px, 80%);
}
.contact-card { padding: clamp(22px, 3vw, 32px); }
.field { display: grid; gap: 8px; }
.field + .field { margin-top: 18px; }
.field label {
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 15px;
  color: var(--fg-strong);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:hover,
.field textarea:hover { border-color: rgba(255, 255, 255, 0.24); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: rgba(0, 0, 0, 0.75);
  box-shadow: 0 0 0 4px rgba(0, 112, 243, 0.22);
}
.form .btn { width: 100%; margin-top: 24px; }

.contact-info h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 650; line-height: 1.2; letter-spacing: -0.035em; color: var(--fg-strong); }
.contact-info > p { margin-top: 14px; color: var(--muted); }
.contact-info .meta-list { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font: 500 12px/1 var(--font-mono);
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.copy-btn:hover { border-color: rgba(255, 255, 255, 0.3); color: var(--fg-strong); }
.copy-btn.is-done { border-color: rgba(69, 212, 131, 0.4); color: var(--ok); }

/* ---------- Footer ---------- */
.footer {
  margin-top: 40px;
  padding-block: 48px 28px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.footer-inner { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px; }
.footer-brand p { margin-top: 12px; font-size: 14px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font: 500 12px/1.4 var(--font-mono);
  color: var(--subtle);
}
.status { display: inline-flex; align-items: center; gap: 8px; }
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(69, 212, 131, 0.18);
  animation: pulse-ok 2.4s ease-in-out infinite;
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--fg);
  opacity: 0;
  translate: 0 12px;
  pointer-events: none;
  transition: opacity 0.3s, translate 0.3s var(--ease), border-color 0.2s;
}
.to-top.is-visible { opacity: 1; translate: none; pointer-events: auto; }
.to-top:hover { border-color: rgba(255, 255, 255, 0.35); }

/* ---------- Palette ⌘K ---------- */
.cmdk { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-start; justify-content: center; padding: 14vh 16px 16px; }
.cmdk-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fade-in 0.2s ease;
}
.cmdk-panel {
  position: relative;
  width: min(620px, 100%);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: rgba(12, 12, 12, 0.92);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9);
  animation: pop-in 0.22s var(--ease);
}
.cmdk-search { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.cmdk-search .i { font-size: 18px; color: var(--subtle); }
.cmdk-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--fg-strong);
}
.cmdk-search input::placeholder { color: var(--subtle); }
.cmdk-list { max-height: min(52vh, 420px); overflow-y: auto; padding: 8px; }
.cmdk-group {
  padding: 10px 10px 6px;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
}
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 14.5px;
  color: var(--muted);
  cursor: pointer;
}
.cmdk-item .i { font-size: 17px; }
.cmdk-item[aria-selected="true"] { background: rgba(255, 255, 255, 0.07); color: var(--fg-strong); }
.cmdk-item .cmdk-go { margin-left: auto; opacity: 0; }
.cmdk-item[aria-selected="true"] .cmdk-go { opacity: 1; }
.cmdk-empty { padding: 28px 12px; text-align: center; font-size: 14px; color: var(--subtle); }
.cmdk-foot { display: flex; justify-content: flex-end; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--subtle); }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 6px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--fg-strong);
  font-size: 14px;
  font-weight: 500;
  color: #000;
  opacity: 0;
  translate: -50% 16px;
  pointer-events: none;
  transition: opacity 0.25s, translate 0.3s var(--ease);
}
.toast.is-visible { opacity: 1; translate: -50% 0; }

/* ---------- Apparitions au scroll ---------- */
.js .reveal {
  opacity: 0;
  translate: 0 18px;
  filter: blur(6px);
  transition: opacity 0.9s var(--ease), translate 0.9s var(--ease), filter 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js .reveal.is-in { opacity: 1; translate: none; filter: none; }

/* ---------- Animations ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes marquee { to { transform: translateX(-100%); } }
@keyframes scroll-drop { to { top: 110%; } }
@keyframes word-glow { 0%, 36%, 100% { opacity: 0; } 6%, 30% { opacity: 1; } }
@keyframes pulse-ok { 50% { box-shadow: 0 0 0 6px rgba(69, 212, 131, 0); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .diploma-grid { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; }
}

@media (max-width: 900px) {
  .nav-links,
  .cmdk-trigger,
  .nav-actions > .btn { display: none; }
  .nav-toggle { display: inline-grid; }
  .nav-actions { margin-left: auto; }

  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .contact-grid { max-width: none; }
  .about-visual { justify-self: center; max-width: 360px; margin: 16px auto 0; }
  .terminal { width: 100%; }

  .steps { display: block; }
  .steps-hud { display: none; }
  .step { align-items: flex-end; min-height: 92vh; padding-block: 44vh 6vh; }
  /* Une seule carte à l'écran : elle reste opaque pour que le verre floute les particules qui passent derrière */
  .step-card { padding: 22px; opacity: 1; translate: none; filter: none; }
}

@media (max-width: 720px) {
  .xp-head { grid-template-columns: auto 1fr; }
  .xp-period { grid-column: 1 / -1; justify-self: start; }
  .xp-stats { grid-template-columns: repeat(2, 1fr); }
  .xp-stats > div:nth-child(3) { border-left: 0; }
  .xp-stats > div:nth-child(n + 3) { border-top: 1px solid var(--border); }
  .timeline { padding-left: 0; }
  .timeline-rail,
  .timeline-node { display: none; }
}

@media (max-width: 560px) {
  .stats { gap: 8px; }
  .stat { padding: 14px 12px; }
  .hero-cta .btn-ghost:not(.btn-icon) { order: 3; }
  .step-card { padding: 20px; }
  .footer-bottom { flex-direction: column; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; translate: none; filter: none; }
  .word::before { opacity: 1; }
  .word + .word::before { opacity: 0; }
}

/* ---------- Impression (Ctrl+P) ----------
   L'export PDF « officiel » passe par le bouton « Télécharger le CV »
   (PDF vectoriel généré par jsPDF, voir scripts/cv-pdf.js). Ces règles
   servent seulement si un visiteur imprime la page. */
@media print {
  @page { size: A4; margin: 14mm; }
  html { background: #fff !important; }
  body { color: #111; }
  #scene, .decor, .nav, .mobile-menu, .scroll-progress, .to-top, .cmdk, .toast,
  .scroll-hint, .stack, .terminal, .steps-hud, .timeline-rail, .timeline-node,
  .hero::before, .hero::after, .no-print { display: none !important; }
  .js .reveal { opacity: 1 !important; translate: none !important; filter: none !important; }
  .hero { min-height: 0; padding: 0 0 16px; }
  .section { padding-block: 16px; }
  .step { min-height: 0; padding-block: 8px; }
  .step-card { opacity: 1 !important; translate: none !important; filter: none !important; }
  .card, .step-card, .stat, .xp-stats {
    border-color: #ddd !important;
    background: #fff !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .hero-title, .section-title, .step-score { background: none; color: #111; }
  .hero-role, .section-sub, .step-desc, .xp-list p, .about-text > p, .contact-info > p,
  .diploma-blocks li, .stat-label, .xp-stats dt, .bar-head span:last-child { color: #444 !important; }
  strong, .step-title, .diploma-title, .xp-company, .stat-num, .xp-stats dd { color: #111 !important; }
  .bar i { transform: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
