/* ════════════════════════════════════════════════════
   immersive.css — Version sombre · GSAP · parallax
   ════════════════════════════════════════════════════ */

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

:root {
  --bg:      #090909;
  --surface: #111111;
  --card:    #161616;
  --text:    #f1e8d6;
  --sub:     rgba(241,232,214,0.55);
  --muted:   rgba(241,232,214,0.28);
  --border:  rgba(241,232,214,0.09);
  --gold:    #c9a45a;
  --font:    'Inter', system-ui, -apple-system, sans-serif;
}

/* ── THÈME CLAIR ─────────────────────────────────────── */
html.light {
  --bg:      #f5f1e8;
  --surface: #ffffff;
  --card:    #ffffff;
  --text:    #1c1813;
  --sub:     rgba(28,24,19,0.62);
  --muted:   rgba(28,24,19,0.42);
  --border:  rgba(28,24,19,0.12);
  --gold:    #997324;
}
html.light body { background: var(--bg); }
html.light .m-panel.s-dark { background: #ece5d6; }
html.light .m-page { background: #ece5d6; }

/* HERO en thème clair : fond clair, vidéo en texture discrète, texte sombre */
html.light #s-hero { background: var(--bg); }
html.light #s-hero .hero-video { opacity: 0.12; }
html.light #s-hero .hero-gradient {
  background: linear-gradient(to bottom,
    rgba(245,241,232,0.25) 0%,
    rgba(245,241,232,0.10) 40%,
    rgba(245,241,232,0.75) 80%,
    var(--bg) 100%);
}
html.light #s-hero .hero-overlay { background: rgba(245,241,232,0.5); }
html.light #s-hero .mbtn {
  background: rgba(28,24,19,0.05);
  border-color: var(--border);
  color: var(--text);
}
html.light #s-hero .mbtn.primary { background: var(--gold); border-color: var(--gold); color: #fff; }
html.light #s-hero .bg-num { color: rgba(28,24,19,0.04); }

/* surfaces translucides → opaques lisibles en clair */
html.light .xp-role,
html.light .gallery-card,
html.light .feat-hero,
html.light .cgi-card,
html.light .badge,
html.light .nav-ctrl,
html.light .skill-tags span,
html.light .mchip,
html.light .mchip.dark {
  background: #ffffff;
  border-color: rgba(28,24,19,0.12);
  color: var(--sub);
}
html.light .m-nav {
  background: rgba(245,241,232,0.82);
  border-bottom-color: rgba(28,24,19,0.1);
}
html.light .proj-modal { background: #ffffff; }
html.light .proj-modal-backdrop { background: rgba(40,34,24,0.5); }
html.light .proj-modal-close { background: rgba(28,24,19,0.05); border-color: rgba(28,24,19,0.14); }
html.light .xp-line { background: rgba(28,24,19,0.1); }
html.light .rail-line { background: rgba(28,24,19,0.14); }
html.light .rail-dot { background: rgba(28,24,19,0.22); }
html.light .bg-num { color: rgba(28,24,19,0.045); }

/* contact en clair : dégradé doux + voile clair */
html.light .contact-panel .hero-gradient {
  background: radial-gradient(ellipse at 30% 60%, rgba(153,115,36,0.12) 0%, transparent 65%);
}
html.light .contact-panel .hero-overlay { background: rgba(245,241,232,0.4); }

html {
  height: 100%;
  scroll-snap-type: y proximity;
  scroll-behavior: smooth;
  overscroll-behavior: none;
  overflow-y: scroll;
  scrollbar-width: none;
}
html::-webkit-scrollbar { display: none; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden; /* html scrolls, not body */
}

/* ── NAV ─────────────────────────────────────────────── */
.m-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  background: rgba(9,9,9,0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 500;
  transition: background .3s;
}
.m-nav.scrolled { background: rgba(9,9,9,0.92); }

.m-brand {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text);
  cursor: default;
}
.m-brand .dot { color: var(--gold); }

.m-nav-links {
  display: flex;
  gap: 28px;
}
.m-nav-links a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--sub);
  text-decoration: none;
  transition: color .2s;
  position: relative;
}
.m-nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .25s ease;
}
.m-nav-links a:hover { color: var(--text); }
.m-nav-links a.active { color: var(--text); }
.m-nav-links a.active::after { transform: scaleX(1); }

.m-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.m-switch-btn {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--sub);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  transition: color .2s, border-color .2s;
}
.m-switch-btn:hover { color: var(--text); border-color: rgba(241,232,214,0.3); }

/* contrôles nav : langue + thème */
.m-nav-ctrls { display: flex; align-items: center; gap: 8px; }
.nav-ctrl {
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--sub);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .2s, border-color .2s, background .2s;
}
.nav-ctrl:hover { color: var(--text); border-color: rgba(201,164,90,.45); }
.nav-ctrl-icon { padding: 0; }
/* bascule d'icône thème */
.ico-sun  { display: none; }
html.light .ico-sun  { display: block; }
html.light .ico-moon { display: none; }

/* ── PANEL — full-viewport scroll-snap ───────────────── */
.m-panel {
  height: 100dvh;
  scroll-snap-align: start;
  position: relative;
  overflow: clip; /* clip ≠ hidden : ne bloque pas l'IntersectionObserver */
  display: flex;
  align-items: center;
  background: var(--bg);
}
.m-panel.s-dark { background: #050505; }

.panel-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 72px 7vw 36px;
}

/* ── PAGE — section à scroll libre (projets) ─────────── */
.m-page {
  min-height: 100dvh;
  position: relative;
  background: #050505;
  scroll-snap-align: start;
}
.page-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 96px 7vw 80px;
}

.section-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

/* ── PARALLAX BG ─────────────────────────────────────── */
.parallax-bg {
  position: absolute;
  inset: -30%;
  z-index: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(201,164,90,0.06) 0%, transparent 65%);
  pointer-events: none;
}

/* ── HERO ─────────────────────────────────────────────── */
#s-hero {
  overflow: clip; /* uniformise avec .m-panel */
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}
.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(9,9,9,0.3) 0%,
    rgba(9,9,9,0.15) 40%,
    rgba(9,9,9,0.7) 80%,
    rgba(9,9,9,1) 100%
  );
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9,9,9,0.45);
}

/* orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  filter: blur(90px);
}
.orb-1 {
  width: 520px; height: 520px;
  top: -120px; right: -80px;
  background: radial-gradient(circle, rgba(201,164,90,0.18) 0%, transparent 70%);
}
.orb-2 {
  width: 360px; height: 360px;
  bottom: 60px; left: 10%;
  background: radial-gradient(circle, rgba(120,100,200,0.12) 0%, transparent 70%);
}
.orb-3 {
  width: 260px; height: 260px;
  top: 40%; left: 55%;
  background: radial-gradient(circle, rgba(201,164,90,0.08) 0%, transparent 70%);
}

/* hero content */
.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 7vw;
}
.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.hero-name {
  font-size: clamp(64px, 9vw, 120px);
  font-weight: 200;
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin-bottom: 22px;
  overflow: hidden;
}
.word-wrap {
  display: block;
  overflow: hidden;
}
.word {
  display: block;
  /* transform géré uniquement par GSAP (gsap.set yPercent:110 → heroTl yPercent:0) */
}
.hero-sub {
  font-size: clamp(14px, 1.4vw, 17px);
  color: var(--sub);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 520px;
  opacity: 0;
  transform: translateY(20px);
}
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  opacity: 0;
  transform: translateY(20px);
}

/* btns */
.mbtn {
  padding: 11px 22px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 4px;
  text-decoration: none;
  border: 1px solid rgba(241,232,214,0.25);
  color: var(--text);
  background: rgba(241,232,214,0.06);
  backdrop-filter: blur(8px);
  transition: border-color .2s, background .2s;
}
.mbtn:hover { border-color: rgba(241,232,214,0.5); background: rgba(241,232,214,0.12); }
.mbtn.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #090909;
  font-weight: 600;
}
.mbtn.primary:hover { opacity: 0.85; }

/* hero badges — rangée sous les CTAs */
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  z-index: 3;
}
.badge {
  padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(241,232,214,0.1);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  backdrop-filter: blur(12px);
  line-height: 1.4;
  opacity: 0;
  transform: translateX(30px);
  cursor: default;
}
.badge span {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--sub);
  text-transform: none;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

@keyframes scrollPulse {
  0%   { transform: scaleY(0) translateY(0); }
  50%  { transform: scaleY(1) translateY(0); }
  100% { transform: scaleY(1) translateY(100%); }
}

/* ── 01 · PARCOURS ───────────────────────────────────── */
.parcours-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.school-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.school-name {
  font-size: clamp(36px, 4.5vw, 60px);
  font-weight: 200;
  letter-spacing: -0.035em;
  line-height: 0.92;
  margin-bottom: 8px;
  color: var(--text);
}
.school-years {
  font-size: 12.5px;
  color: var(--sub);
  font-weight: 500;
  margin-bottom: 12px;
}
.school-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--sub);
  max-width: 400px;
  margin-bottom: 12px;
}

/* chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.mchip {
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--sub);
  background: rgba(241,232,214,0.04);
}
.mchip.dark {
  border-color: rgba(241,232,214,0.12);
  background: rgba(241,232,214,0.06);
  color: rgba(241,232,214,0.7);
}

/* CGI card */
.cgi-card {
  margin-top: 14px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 380px;
}
.cgi-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.cgi-title {
  font-size: 26px;
  font-weight: 200;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.cgi-date {
  font-size: 12px;
  color: var(--sub);
  margin-bottom: 10px;
}
.cgi-card p {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.65;
}

/* timeline */
.timeline-block {
  display: flex;
  flex-direction: column;
  padding-top: 8px;
}
.tl-item {
  display: grid;
  grid-template-columns: 48px 24px 1fr;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.tl-item:last-child { border-bottom: none; }
.tl-year {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.tl-node {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  border: 1.5px solid transparent;
  justify-self: center;
  transition: background .3s;
}
.tl-node.active {
  background: var(--gold);
  box-shadow: 0 0 10px rgba(201,164,90,0.5);
}
.tl-ev {
  font-size: 14px;
  padding-left: 12px;
  color: var(--text);
  line-height: 1.45;
}

/* ── Numéro de section (bg-num) ─────────────────────── */
.bg-num {
  position: absolute;
  right: 3vw;
  bottom: 2vh;
  font-size: clamp(90px, 12vw, 180px);
  font-weight: 900;
  color: rgba(241,232,214,0.022);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.05em;
  z-index: 0;
}
#s-hero .bg-num { color: rgba(255,255,255,0.014); }
/* À propos : le numéro passe au-dessus de la galerie photo */
#s-about .bg-num { z-index: 2; color: rgba(241,232,214,0.16); mix-blend-mode: overlay; }
html.light #s-about .bg-num { color: rgba(28,24,19,0.18); mix-blend-mode: multiply; }

/* ── 02 · EXPÉRIENCE — frise pilotée au scroll ─────── */
.xp-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.xp-head .section-label { margin-bottom: 0; }
.xp-progress {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 22px;
  font-weight: 200;
  color: var(--text);
  letter-spacing: -0.02em;
}
.xp-progress #xp-counter { color: var(--gold); font-weight: 400; }
.xp-counter-sep { color: var(--muted); margin: 0 2px; }
.xp-progress #xp-total { font-size: 13px; color: var(--muted); align-self: center; }
.xp-hint {
  margin-left: 14px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  align-self: center;
  animation: nudge-r 2.4s ease-in-out infinite;
}
@keyframes nudge-r {
  0%,100% { opacity: .35; }
  50%     { opacity: .8; }
}

/* viewport masque le débordement de la frise */
.xp-viewport {
  position: relative;
  overflow: hidden;
  padding-top: 28px;
}
/* baseline + progression */
.xp-line {
  position: absolute;
  top: 28px; left: 0; right: 0;
  height: 2px;
  background: rgba(241,232,214,0.08);
  border-radius: 2px;
  z-index: 1;
}
.xp-line-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), rgba(201,164,90,0.5));
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
}
/* fondu sur le bord droit : indique « il y a plus → » */
.xp-viewport::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 80px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(to left, var(--bg), transparent);
}

.xp-track {
  display: flex;
  align-items: flex-start;
  will-change: transform;
  transition: transform 0.55s cubic-bezier(.4,0,.2,1);
}

.xp-item {
  flex: 0 0 330px;
  max-width: 330px;
  padding-right: 22px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
}

/* pastille sur la baseline (couleur via currentColor en inline) */
.xp-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--bg);
  border: 2px solid currentColor;
  margin-top: -6px;          /* centre sur la baseline (top:28px) */
  margin-bottom: 22px;
  transition: transform .3s, box-shadow .3s, background .3s;
}
.xp-item.is-active .xp-dot {
  background: currentColor;
  transform: scale(1.2);
  box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 18%, transparent);
}

.xp-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 16px 18px;
  flex: 1;
  opacity: 0.42;
  transition: border-color .3s, background .3s, opacity .3s, transform .3s;
}
.xp-item.is-active .xp-card {
  opacity: 1;
  border-color: rgba(201,164,90,0.28);
  background: rgba(201,164,90,0.05);
  transform: translateY(-2px);
}
.xp-card-org {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.xp-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 4px;
}
.xp-card-date {
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 10px;
}
.xp-card-desc {
  font-size: 12.5px;
  color: var(--sub);
  line-height: 1.6;
}

/* ── 02 · ENGAGEMENTS (legacy, gardé pour compatibilité) ── */
.eng-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.eng-card {
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color .25s;
  position: relative;
  overflow: hidden;
}
.eng-card:hover { border-color: rgba(201,164,90,0.3); }
.eng-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0.6;
}
.eng-org {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
}
.eng-roles { display: flex; flex-direction: column; gap: 10px; }
.eng-role {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  flex-wrap: wrap;
}
.eng-date {
  font-size: 11px;
  color: var(--sub);
  font-weight: 400;
  white-space: nowrap;
}
.eng-desc {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.7;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.eng-kpi {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: -4px;
}
.eng-kpi span {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
}

/* ── 03 · PROJETS ────────────────────────────────────── */
.proj-featured {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 28px;
  align-items: center;
  padding: 24px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
.proj-featured::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(201,164,90,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.proj-feat-tag {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.proj-feat-title {
  font-size: clamp(18px, 2.2vw, 30px);
  font-weight: 200;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 10px;
}
.proj-feat-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--sub);
  margin-bottom: 12px;
}
/* Image de fond projet phare (overlay subtil) */
.proj-feat-img-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.1;
  border-radius: 12px;
  pointer-events: none;
}
.proj-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-left: 24px;
  border-left: 1px solid var(--border);
}
.proj-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.proj-stat span {
  font-size: 26px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.02em;
}
.proj-stat em {
  font-size: 10.5px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.proj-others {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.proj-card {
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .25s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.proj-card:hover { border-color: rgba(201,164,90,0.28); }
.proj-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.proj-card-sub {
  font-size: 12px;
  color: var(--sub);
}
/* Image en haut de la carte projet */
.proj-card-img-bg {
  width: calc(100% + 44px);
  margin: -22px -22px 16px;
  height: 120px;
  background-size: cover;
  background-position: center;
  opacity: 0.6;
  border-radius: 10px 10px 0 0;
}
.proj-card p {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.65;
  flex: 1;
}

/* ── 04 · COMPÉTENCES ────────────────────────────────── */
.comp-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 36px;
  align-items: start;
}
.skills-side {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.skill-group {}
.skill-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.skill-tags span {
  font-size: 12.5px;
  padding: 5px 12px;
  background: rgba(241,232,214,0.05);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--sub);
  transition: border-color .2s, color .2s;
}
.skill-tags span:hover {
  border-color: rgba(201,164,90,0.3);
  color: var(--text);
}

.certs-side {
  display: flex;
  flex-direction: column;
}
.cert-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cert-item:first-child { border-top: 1px solid var(--border); }
.cert-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}
.cert-meta {
  font-size: 11.5px;
  color: var(--sub);
}

/* ── 05 · CONTACT ────────────────────────────────────── */
.contact-panel { overflow: hidden; }
.contact-panel .hero-gradient {
  background: radial-gradient(ellipse at 30% 60%, rgba(201,164,90,0.12) 0%, transparent 65%);
}
.contact-inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
}
.contact-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 200;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 20px;
}
.contact-title em {
  font-style: italic;
  color: var(--gold);
}
.contact-lede {
  font-size: clamp(14px, 1.4vw, 16px);
  color: var(--sub);
  line-height: 1.7;
  margin-bottom: 28px;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}
.contact-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--sub);
  text-decoration: none;
  padding: 13px 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all .2s;
}
.contact-link:hover { color: var(--text); border-color: rgba(241,232,214,0.28); }
.contact-link.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #090909;
  font-weight: 600;
}
.contact-link.primary:hover { opacity: 0.85; }
.contact-sig {
  font-size: 28px;
  font-weight: 200;
  font-style: italic;
  color: var(--muted);
  letter-spacing: -0.02em;
}

/* ── 01 · À PROPOS — galerie plein cadre + texte centré ── */
#s-about { position: relative; overflow: clip; }
.about-gallery {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 1fr;
  grid-auto-flow: dense;
  gap: 4px;
}
.about-gallery.is-empty { background: var(--bg); }
.about-photo {
  border: none;
  margin: 0; padding: 0;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  background-color: #1a1a1a;
  grid-column: span 3;       /* normal */
  grid-row: span 2;
  filter: brightness(0.72) saturate(0.95);
  transition: filter .3s ease, transform .3s ease;
  outline: none;
}
.about-photo:hover,
.about-photo:focus-visible { filter: brightness(1) saturate(1.05); transform: scale(1.012); z-index: 3; }
.about-photo--wide { grid-column: span 6; grid-row: span 2; }
.about-photo--tall { grid-column: span 3; grid-row: span 4; }
.about-photo--big  { grid-column: span 6; grid-row: span 4; }

/* panneau central : couleur du fond, photos seulement autour */
.about-text {
  position: relative; z-index: 2;
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 52px;
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(0,0,0,0.45);
}
html.light .about-text { box-shadow: 0 28px 70px rgba(40,34,24,0.18); }
.about-text .section-label { display: inline-block; margin-bottom: 18px; }
.about-title {
  font-size: clamp(28px, 4vw, 50px);
  font-weight: 200;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin-bottom: 20px;
  color: var(--text);
}
.about-lede {
  font-size: clamp(14px, 1.4vw, 16px);
  color: var(--sub);
  line-height: 1.75;
  margin-bottom: 20px;
}
.about-hint {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Lightbox photo ── */
.photo-lightbox {
  position: fixed; inset: 0; z-index: 700;
  display: none; place-items: center;
  padding: 6vh 5vw;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.photo-lightbox.open { display: grid; }
.photo-lightbox-close {
  position: absolute; top: 20px; right: 22px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #fff; cursor: pointer;
  display: grid; place-items: center;
  transition: background .2s, border-color .2s;
}
.photo-lightbox-close:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.4); }
.photo-lightbox-fig {
  margin: 0; display: flex; flex-direction: column; align-items: center; gap: 16px;
  max-width: 100%; max-height: 100%;
}
.photo-lightbox-fig img {
  max-width: min(1100px, 92vw);
  max-height: 76vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.6);
}
.photo-lightbox-fig figcaption {
  font-size: 14.5px; color: #f1e8d6; text-align: center;
  max-width: 620px; line-height: 1.55;
}

/* ── 3D TILT ─────────────────────────────────────────── */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
  will-change: transform;
}

/* ── REVEAL ANIMATIONS (JS adds .visible) ────────────── */
.reveal-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ══════════════════════════════════════════════════════
   PROJECT SLIDER
══════════════════════════════════════════════════════ */
.proj-hint {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 28px;
  margin-top: -4px;
}

/* ── 04 · PROJETS — page (featured + galerie) ────────── */

/* Projet principal mis en avant */
.proj-featured-wrap { margin: 24px 0 48px; }
.feat-hero {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  outline: none;
  transition: border-color .25s, box-shadow .3s, transform .25s;
}
.feat-hero:hover {
  border-color: rgba(201,164,90,.32);
  box-shadow: 0 18px 56px rgba(0,0,0,.45);
  transform: translateY(-3px);
}
.feat-hero:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,164,90,.35); }
.feat-hero-media {
  position: relative;
  min-height: 280px;
}
.feat-hero-badge {
  position: absolute;
  top: 16px; left: 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #090909;
  padding: 5px 12px;
  border-radius: 20px;
}
.feat-hero-body {
  padding: 32px 34px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}
.feat-hero-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.feat-hero-title {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 200;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--text);
}
.feat-hero-desc {
  font-size: 14px;
  color: var(--sub);
  line-height: 1.7;
}
.feat-hero-stats {
  display: flex;
  gap: 28px;
  margin: 6px 0 4px;
}
.feat-stat { display: flex; flex-direction: column; gap: 2px; }
.feat-stat span { font-size: 26px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.feat-stat em {
  font-size: 10px; font-style: normal; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.feat-hero-cta { font-size: 13px; font-weight: 600; margin-top: 4px; }

/* En-tête galerie */
.proj-gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.proj-gallery-title {
  font-size: 16px;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* Filtres */
.proj-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.filter-btn {
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--sub);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
  font-family: var(--font);
}
.filter-btn:hover { color: var(--text); border-color: rgba(201,164,90,.4); }
.filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #090909;
}

/* Grille galerie (dans la page à scroll libre) */
.proj-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
/* Mode groupé : la galerie devient une pile de sections */
.proj-gallery.is-grouped {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.proj-group-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Carte galerie */
.gallery-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  outline: none;
  transition: border-color .2s, transform .2s, box-shadow .25s;
}
.gallery-card:hover {
  border-color: rgba(201,164,90,.3);
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0,0,0,.45);
}
.gallery-card:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201,164,90,.35);
}
.gallery-card.hidden { display: none; }

.gallery-card-img {
  height: 132px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  position: relative;
}
.gallery-card-color-bar {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
}

/* badge « démo dispo » sur les cartes/projet phare */
.card-demo-badge {
  position: absolute;
  top: 10px; right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f1e8d6;
  padding: 4px 9px 4px 8px;
  border-radius: 20px;
  background: rgba(9,9,9,0.62);
  border: 1px solid rgba(241,232,214,0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.card-demo-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #43d17a;
  box-shadow: 0 0 0 0 rgba(67,209,122,0.6);
  animation: demoPulse 1.8s ease-out infinite;
}
@keyframes demoPulse {
  0%   { box-shadow: 0 0 0 0 rgba(67,209,122,0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(67,209,122,0); }
  100% { box-shadow: 0 0 0 0 rgba(67,209,122,0); }
}
html.light .card-demo-badge { background: rgba(255,255,255,0.85); color: #1c1813; border-color: rgba(28,24,19,0.14); }
.gallery-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.gallery-card-eyebrow {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--gold);
}
.gallery-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.gallery-card-desc {
  font-size: 11.5px;
  color: var(--sub);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

/* ── Modal projet centré ─────────────────────────────── */
.proj-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.86);
  z-index: 600;
  display: none;
  place-items: center;
  padding: 24px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.proj-modal-backdrop.open { display: grid; }

.proj-modal {
  background: #111;
  border: 1px solid rgba(241,232,214,.08);
  border-radius: 16px;
  width: min(760px, 95vw);
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.proj-modal-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 2;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(241,232,214,.14);
  background: rgba(255,255,255,.04);
  color: var(--sub);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color .2s, color .2s, background .2s;
}
.proj-modal-close:hover {
  border-color: rgba(201,164,90,.4);
  color: var(--text);
  background: rgba(201,164,90,.07);
}

.proj-modal-body {
  overflow-y: auto;
  padding: 36px 40px 48px;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(201,164,90,.18) transparent;
}
.proj-modal-body::-webkit-scrollbar { width: 4px; }
.proj-modal-body::-webkit-scrollbar-thumb { background: rgba(201,164,90,.18); border-radius: 2px; }

/* Contenu modal */
.mitem { /* stagger target */ }
.modal-accent { height: 3px; width: 48px; border-radius: 2px; margin-bottom: 20px; }
.modal-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 10px;
}
.modal-title {
  font-size: clamp(22px, 3vw, 36px); font-weight: 200;
  letter-spacing: -0.025em; line-height: 1.1; margin-bottom: 14px;
}
.modal-stats {
  display: flex; gap: 28px; margin: 16px 0;
  padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.modal-stat { display: flex; flex-direction: column; gap: 3px; }
.modal-stat-val { font-size: 28px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.modal-stat-lbl {
  font-size: 10px; font-style: normal; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.modal-desc {
  font-size: 14px; color: var(--sub); line-height: 1.8;
  margin: 18px 0; max-width: 600px;
}
.modal-section { margin: 18px 0; }
.modal-section-title {
  font-size: 10px; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.modal-role {
  font-size: 14px; font-weight: 500; color: var(--text);
  border-left: 3px solid; padding-left: 14px; line-height: 1.5;
}
.modal-challenges {
  display: flex; flex-direction: column; gap: 7px;
  list-style: none; padding: 0; margin: 0;
}
.modal-challenges li {
  font-size: 13.5px; color: var(--sub); padding-left: 18px; position: relative; line-height: 1.5;
}
.modal-challenges li::before {
  content: '→'; position: absolute; left: 0; color: var(--gold); font-size: 11px;
}
.modal-links { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.modal-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; border-radius: 6px;
  border: 1px solid rgba(201,164,90,.3);
  background: rgba(201,164,90,.06);
  color: var(--gold); font-size: 13px; font-weight: 500;
  text-decoration: none; transition: background .2s, border-color .2s;
}
.modal-link:hover { background: rgba(201,164,90,.14); border-color: rgba(201,164,90,.55); }

/* ── Aperçu projet : maquettes laptop / mobile / widget ── */
.modal-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 22px 0 8px;
}
.mock-open {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--gold);
  text-decoration: none;
  transition: opacity .2s;
}
.mock-open:hover { opacity: .7; }

/* Laptop */
.mock-laptop { width: 100%; max-width: 100%; }
.mock-laptop-screen {
  background: #000;
  border: 10px solid #1c1c1e;
  border-radius: 14px 14px 0 0;
  border-bottom: none;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
}
.mock-laptop-screen iframe {
  position: absolute;
  top: 0; left: 0;
  transform-origin: top left;
  border: 0; display: block;
  background: #fff;
}
.mock-laptop-base {
  height: 14px;
  background: linear-gradient(#2a2a2c, #1c1c1e);
  border-radius: 0 0 10px 10px;
  position: relative;
  box-shadow: 0 12px 30px rgba(0,0,0,.5);
}
.mock-laptop-base span {
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 90px; height: 5px;
  background: #0d0d0e;
  border-radius: 0 0 6px 6px;
}

/* Téléphone */
.mock-phone {
  width: 260px;
  background: #1c1c1e;
  border-radius: 34px;
  padding: 12px;
  box-shadow: 0 18px 44px rgba(0,0,0,.5);
  position: relative;
}
.mock-phone-notch {
  position: absolute;
  top: 12px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 22px;
  background: #1c1c1e;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}
.mock-phone-screen {
  background: #000;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 9 / 19;
}
.mock-phone-screen iframe {
  position: absolute;
  top: 0; left: 0;
  transform-origin: top left;
  border: 0; display: block;
  background: #fff;
}

/* Widget lien */
.modal-widget {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 22px 0 8px;
  padding: 18px 20px;
  border: 1px solid;
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  text-decoration: none;
  transition: background .2s, transform .2s;
}
.modal-widget:hover { background: rgba(255,255,255,.045); transform: translateY(-2px); }
.modal-widget-ico {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.modal-widget-txt { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.modal-widget-title { font-size: 14px; font-weight: 600; color: var(--text); }
.modal-widget-url { font-size: 12px; color: var(--sub); }
.modal-widget-arrow { font-size: 18px; color: var(--gold); }

/* ── legacy slider wrapper ── */

.proj-slider-wrap { position: relative; }

.proj-slider {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 8px 4px 8px;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}
.proj-slider::-webkit-scrollbar { display: none; }
.proj-slider.grabbing { cursor: grabbing; user-select: none; }

/* ── Slide card ── */
.pslide-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, box-shadow 0.3s ease, transform 0.25s ease;
  outline: none;
}

/* Colored top accent bar overlay on .pslide-top */
.pslide-top-bar {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  opacity: 0.8;
  transition: opacity 0.25s ease;
}
.pslide-card:hover .pslide-top-bar { opacity: 1; }
.pslide-card:hover {
  border-color: rgba(201,164,90,0.3);
  box-shadow: 0 16px 52px rgba(0,0,0,0.4);
  transform: translateY(-4px);
}
.pslide-card:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201,164,90,0.4);
}
.pslide-card.is-featured { flex: 0 0 400px; }

/* Top gradient area */
.pslide-top {
  height: 126px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.pslide-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
}
.pslide-badge {
  position: absolute;
  top: 12px;
  left: 14px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid;
  background: rgba(0,0,0,0.45);
}

/* Card body */
.pslide-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.pslide-title {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.pslide-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.pslide-desc {
  font-size: 13px;
  color: var(--sub);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pslide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}
.pslide-cta {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.pslide-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.pslide-card:hover .pslide-arrow { transform: translateX(5px); }

/* ── Slider nav ── */
.proj-slider-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
}
.slider-arrow {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--sub);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.slider-arrow:hover {
  background: rgba(201,164,90,0.12);
  border-color: rgba(201,164,90,0.4);
  color: var(--gold);
}
.slider-dots { display: flex; gap: 7px; align-items: center; }
.sdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, transform 0.25s;
}
.sdot.active { background: var(--gold); transform: scale(1.5); }


/* ══════════════════════════════════════════════════════
   PROJECT DETAIL PANEL
══════════════════════════════════════════════════════ */
.proj-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.proj-panel-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.proj-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(580px, 100vw);
  background: #0e0e0e;
  border-left: 1px solid rgba(255,255,255,0.08);
  z-index: 901;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -20px 0 60px rgba(0,0,0,0.5);
}

/* Sticky close bar */
.proj-panel-topbar {
  display: flex;
  justify-content: flex-end;
  padding: 18px 22px 10px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.proj-panel-close-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--sub);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.proj-panel-close-btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
}

/* Scrollable content */
.proj-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 36px 64px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

/* Panel content blocks (all stagger-animated) */
.ppanel-item { margin-bottom: 26px; }

.ppanel-accent {
  height: 3px;
  width: 44px;
  border-radius: 2px;
}

.ppanel-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.ppanel-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 300;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.03em;
}

.ppanel-tags { gap: 7px; }

.ppanel-stats {
  display: flex;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  overflow: hidden;
}
.ppanel-stat {
  flex: 1;
  padding: 18px 12px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.ppanel-stat:last-child { border-right: none; }
.ppanel-stat-val {
  display: block;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 5px;
  font-variant-numeric: tabular-nums;
}
.ppanel-stat-lbl {
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.ppanel-desc {
  font-size: 14.5px;
  color: var(--sub);
  line-height: 1.8;
}

.ppanel-stitle {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.ppanel-role {
  font-size: 15px;
  color: var(--text);
  padding: 10px 16px;
  border-left: 2px solid;
  line-height: 1.5;
  background: rgba(255,255,255,0.02);
  border-radius: 0 6px 6px 0;
}

.ppanel-challenges {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ppanel-challenges li {
  font-size: 13.5px;
  color: var(--sub);
  padding-left: 22px;
  position: relative;
  line-height: 1.55;
}
.ppanel-challenges li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 600;
}

.ppanel-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ppanel-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.ppanel-link:hover {
  background: rgba(201,164,90,0.07);
  border-color: rgba(201,164,90,0.25);
}
.ppanel-link svg { flex-shrink: 0; opacity: 0.6; }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 900px) {
  .m-nav-links { display: none; }
  .panel-inner { padding: 90px 24px 64px; }
  .hero-content { padding: 0 24px; }
  .hero-badges { display: none; }
  .hero-name { font-size: clamp(56px, 14vw, 88px); }
  .parcours-grid { grid-template-columns: 1fr; gap: 36px; }
  .timeline-block { display: none; }
  .eng-grid { grid-template-columns: 1fr; gap: 14px; }
  .proj-featured { grid-template-columns: 1fr; }
  .proj-feat-right { display: none; }
  .proj-others { grid-template-columns: 1fr; }
  .comp-layout { grid-template-columns: 1fr; gap: 40px; }
  .pslide-card { flex: 0 0 80vw; }
  .pslide-card.is-featured { flex: 0 0 88vw; }
  .proj-panel-content { padding: 0 22px 56px; }
  .ppanel-title { font-size: 26px; }
}
/* ── SECTION RAIL — indicateur vertical de position ─── */
.section-rail {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ligne continue derrière les dots */
.rail-line {
  position: absolute;
  top: 8px;          /* centre du premier dot */
  bottom: 8px;       /* centre du dernier dot */
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  background: rgba(241,232,214,0.12);
  pointer-events: none;
}

.rail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(241,232,214,0.2);
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  /* espace entre dots = hauteur de section / nb de sections
     on simule avec margin */
  margin: 14px 0;
}
.rail-dot:hover {
  background: rgba(201,164,90,0.55);
  transform: scale(1.4);
}
.rail-dot.active {
  background: var(--gold);
  transform: scale(1.2);
  box-shadow: 0 0 8px rgba(201,164,90,0.55);
}

/* tooltip au hover */
.rail-dot::before {
  content: attr(aria-label);
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.rail-dot:hover::before { opacity: 1; }

@media (max-width: 820px) {
  .feat-hero { grid-template-columns: 1fr; }
  .feat-hero-media { min-height: 180px; }
  .xp-item { flex: 0 0 86vw; max-width: 86vw; }
  .proj-gallery, .proj-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .mock-laptop { max-width: 100%; }
  .proj-modal { width: 96vw; }
  .panel-inner { padding: 84px 6vw 32px; }
  .page-inner  { padding: 88px 6vw 64px; }
  .hero-content { padding: 0 6vw; }
  .xp-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  /* Compétences : 1 colonne, contenu compact pour tenir dans la slide */
  .comp-layout { grid-template-columns: 1fr; gap: 22px; }
  .skills-side { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
  .skill-cat { margin-bottom: 5px; }
  .skill-tags { gap: 5px; }
  .skill-tags span { font-size: 10.5px; padding: 3px 8px; }
  .cert-item { padding: 7px 0; }
  .cert-label { font-size: 12px; }
  .cert-meta  { font-size: 10px; }
}

@media (max-width: 560px) {
  .skills-side { grid-template-columns: 1fr; gap: 12px; }
  .section-label { margin-bottom: 14px; }
  .comp-layout { gap: 16px; }
}

@media (max-width: 768px) {
  .section-rail { display: none; }
  .m-nav-links { display: none; }
  .m-nav { padding: 0 18px; }

  /* Vidéo du hero masquée sur mobile (évite l'overlay « play ») */
  .hero-video { display: none; }

  /* À propos : texte en haut puis galerie en flux normal */
  /* À propos : hauteur naturelle (pas de 100dvh forcé → pas de grand vide) */
  #s-about {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    height: auto;
    padding: 100px 16px 48px;
  }
  #s-about .bg-num { display: none; }
  .about-text {
    order: -1;
    align-self: center;
    max-width: 560px;
    width: 100%;
    padding: 26px 22px;
    margin: 0 0 20px;
    box-shadow: none;
  }
  .about-gallery {
    position: static;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 44vw;
    grid-auto-flow: dense;
    gap: 6px;
  }
  .about-gallery.is-empty { display: none; }   /* aucune photo → on n'affiche rien */
  .about-photo { filter: none; border-radius: 10px; }
  .about-photo, .about-photo--wide, .about-photo--tall, .about-photo--big {
    grid-column: span 1; grid-row: span 1;
  }
  .about-photo--wide { grid-column: span 2; }
  .about-photo--big  { grid-column: span 2; grid-row: span 2; }
  .about-photo--tall { grid-row: span 2; }

  /* Mobile : scroll vertical normal (pas de scroll-jacking) */
  html { scroll-snap-type: none; }
  .m-panel { height: auto; min-height: 100dvh; scroll-snap-align: none; }

  /* Expérience : frise empilée verticalement, tout visible */
  .xp-viewport { overflow: visible; padding-top: 0; }
  .xp-line { display: none; }
  .xp-track { transform: none !important; flex-direction: column; gap: 14px; }
  .xp-item { flex: 0 0 auto; width: 100%; max-width: 100%; padding-right: 0; }
  .xp-dot { display: none; }
  .xp-card { opacity: 1 !important; transform: none !important; }
  .xp-progress { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-snap-type: none; scroll-behavior: auto; }
  .xp-track { transition: none; }
  .pslide-card, .slider-arrow, .ppanel-link { transition: none; }
  .scroll-fill { animation: none; }
  .rail-dot { transition: none; }
  .card-demo-dot { animation: none; }
}
