/* ════════════════════════════════════════════
   Portfolio v2 — Martin Prevot
   Design: fond animé unifié, glassmorphism, responsive
════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  /* Fond global — une seule couleur de base */
  --bg:       #F2F1EE;

  /* Cartes et surfaces en verre */
  --glass:         rgba(255, 255, 255, 0.72);
  --glass-dark:    rgba(14, 14, 22, 0.78);
  --glass-border:  rgba(255, 255, 255, 0.55);
  --glass-border-dark: rgba(255, 255, 255, 0.1);

  /* Textes */
  --text-dark:   #0E0E18;
  --text-body:   #42424F;
  --text-muted:  #8A8AA0;
  --text-light:  #F0F0F8;
  --text-light-muted: rgba(240, 240, 248, 0.6);

  /* Accents — violet comme la v1 */
  --indigo:        #7C3AED;
  --indigo-mid:    #9F67F7;
  --indigo-light:  #C4B5FD;
  --indigo-pale:   rgba(124, 58, 237, 0.1);
  --indigo-glow:   rgba(124, 58, 237, 0.25);
  --amber:         #D97706;
  --amber-pale:    rgba(217, 119, 6, 0.1);
  --green:         #059669;

  /* Ombres cohérentes */
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
  --shadow:    0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-indigo: 0 8px 24px rgba(124,58,237,0.3);

  /* Divers */
  --radius:    14px;
  --radius-sm: 8px;
  --tr:        0.22s cubic-bezier(0.4, 0, 0.2, 1);

  --f-display: 'Space Grotesk', system-ui, sans-serif;
  --f-body:    'Inter', system-ui, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, monospace;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  overflow: hidden;
  height: 100%;
}
body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  height: 100%;
  width: 100%;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ════════════════════════════════
   FOND ANIMÉ — visible sur toute la page
   position: fixed = toujours derrière, quel que soit le scroll
════════════════════════════════ */

/* Canvas Three.js */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: auto;
}

/* Orbes CSS — animation de fond immédiate */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
  will-change: transform;
}
.bg-orb-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.28) 0%, transparent 70%);
  top: -200px; left: -150px;
  animation: orbDrift1 16s ease-in-out infinite alternate;
}
.bg-orb-2 {
  width: 550px; height: 550px;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.18) 0%, transparent 70%);
  bottom: -100px; right: -100px;
  animation: orbDrift2 20s ease-in-out infinite alternate;
}
.bg-orb-3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
  top: 40%; right: 10%;
  animation: orbDrift3 13s ease-in-out infinite alternate;
}
@keyframes orbDrift1 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(60px, 40px) scale(1.1); }
}
@keyframes orbDrift2 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-50px, -30px) scale(0.92); }
}
@keyframes orbDrift3 {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-30px, 50px) scale(1.08); }
}

/* ════════════════════════════════
   LAYOUT — toutes les sections z-index: 1
   Pas de background solide sur les sections → le fond fixe transparaît
════════════════════════════════ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
  position: relative;
  z-index: 1;
}

/* Les sections n'ont PAS de background solide */
.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
  position: relative;
  z-index: 1;
}

/* Séparateur léger entre sections */
.section + .section::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,0.15), transparent);
  margin-bottom: clamp(4rem, 8vw, 7rem);
  margin-top: -1px;
}

.section-label {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.1;
  margin-bottom: 1.75rem;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

/* ════════════════════════════════
   NAVIGATION
════════════════════════════════ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 clamp(1rem, 4vw, 2rem);
  /* Verre clair cohérent avec le fond */
  background: rgba(242, 241, 238, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(124,58,237,0.1);
  transition: box-shadow var(--tr);
}
#navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.07); }

.nav-inner {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  font-family: var(--f-mono);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dark);
  white-space: nowrap;
}
.nav-logo .accent { color: var(--indigo); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav-link {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  transition: color var(--tr), background var(--tr);
  white-space: nowrap;
}
.nav-link:hover { color: var(--text-dark); background: rgba(124,58,237,0.06); }
.nav-link.nav-cta {
  background: var(--indigo);
  color: #fff;
  margin-left: 0.4rem;
  box-shadow: var(--shadow-indigo);
}
.nav-link.nav-cta:hover { background: #6D28D9; }

/* Hamburger mobile */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 6px;
  border-radius: 6px;
  transition: background var(--tr);
}
.menu-btn:hover { background: rgba(0,0,0,0.05); }
.menu-btn span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-body);
  border-radius: 2px;
  transition: var(--tr);
}
.menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ════════════════════════════════
   HERO
════════════════════════════════ */
#hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  position: relative;
  z-index: 1;
  /* Grille de points légère sur le fond clair */
  background-image: radial-gradient(rgba(124,58,237,0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  background-attachment: fixed;
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 4vw, 2rem) clamp(5rem, 8vw, 8rem);
  width: 100%;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  border: 1px solid rgba(5,150,105,0.25);
  background: rgba(5,150,105,0.08);
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--green);
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: pulseGreen 2s ease-in-out infinite;
}
@keyframes pulseGreen {
  0%,100% { box-shadow: 0 0 0 0 rgba(5,150,105,0.5); }
  50%      { box-shadow: 0 0 0 5px rgba(5,150,105,0); }
}

/* Nom */
.hero-name {
  font-family: var(--f-display);
  font-size: clamp(3.5rem, 11vw, 9rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--text-dark);
  margin-bottom: 1.75rem;
}
.hero-name-accent {
  background: linear-gradient(135deg, var(--indigo) 0%, #7C3AED 45%, var(--indigo-light) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradShift 6s ease infinite;
}
@keyframes gradShift {
  0%   { background-position: 0% center; }
  50%  { background-position: 100% center; }
  100% { background-position: 0% center; }
}

.hero-sub {
  font-family: var(--f-mono);
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.accent-soft { color: var(--indigo); }
.cursor {
  display: inline-block;
  color: var(--indigo);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

.hero-desc {
  max-width: 540px;
  color: var(--text-body);
  line-height: 1.75;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}
.scroll-line {
  width: 1px; height: 3rem;
  background: linear-gradient(to bottom, transparent, var(--indigo-mid));
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse { 0%,100% { opacity:0.3; } 50% { opacity:1; } }

/* ════════════════════════════════
   BOUTONS — couleurs cohérentes
════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.72rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--tr);
  white-space: nowrap;
}
.btn-primary {
  background: var(--indigo);
  color: #fff;
  box-shadow: var(--shadow-indigo);
}
.btn-primary:hover {
  background: #6D28D9;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(124,58,237,0.38);
}
.btn-ghost {
  border: 1.5px solid rgba(124,58,237,0.2);
  color: var(--indigo);
  background: rgba(124,58,237,0.05);
}
.btn-ghost:hover {
  background: rgba(124,58,237,0.1);
  border-color: rgba(124,58,237,0.4);
  transform: translateY(-2px);
}
.btn-full { width: 100%; justify-content: center; }
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: color var(--tr);
}
.btn-link:hover { color: var(--text-dark); }

/* ════════════════════════════════
   CARTES VERRE — composant réutilisé partout
════════════════════════════════ */
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ════════════════════════════════
   À PROPOS
════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.75rem;
}
.tag {
  padding: 0.32rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(124,58,237,0.15);
  background: rgba(124,58,237,0.06);
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--indigo);
}

/* Bloc de code — verre clair */
.code-block {
  border-radius: var(--radius);
  border: 1px solid rgba(124,58,237,0.15);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.code-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid rgba(124,58,237,0.1);
  background: rgba(124,58,237,0.04);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red    { background: #FC6058; }
.dot-yellow { background: #FEC02F; }
.dot-green  { background: #2ACC4F; }
.code-filename {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-left: 0.4rem;
}
.code-body {
  padding: 1.25rem 1.4rem 1.5rem;
  font-family: var(--f-mono);
  font-size: 0.77rem;
  line-height: 1.9;
  color: var(--text-body);
  white-space: pre;
  overflow-x: auto;
}
.code-body .kw  { color: var(--indigo); font-weight: 500; }
.code-body .cl  { color: #B45309; }
.code-body .fn  { color: #0369A1; }
.code-body .str { color: #059669; }

/* ════════════════════════════════
   PROJETS
════════════════════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.1rem;
}

.project-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
  cursor: pointer;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.project-card:has(.accent-indigo):hover { border-color: rgba(124,58,237,0.3); }
.project-card:has(.accent-amber):hover  { border-color: rgba(217,119,6,0.25); }

.card-accent { height: 3px; flex-shrink: 0; }
.accent-indigo { background: linear-gradient(90deg, var(--indigo), var(--indigo-light), transparent); }
.accent-amber  { background: linear-gradient(90deg, var(--amber), #FCD34D, transparent); }

.card-body {
  padding: 1.4rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-icon { font-size: 1.35rem; }

.card-badge {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  padding: 0.18rem 0.6rem;
  border-radius: 4px;
  border: 1px solid;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.badge-indigo {
  color: var(--indigo);
  border-color: rgba(124,58,237,0.22);
  background: rgba(124,58,237,0.08);
}
.badge-amber {
  color: var(--amber);
  border-color: rgba(217,119,6,0.22);
  background: rgba(217,119,6,0.07);
}

.card-title {
  font-family: var(--f-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}
.card-desc {
  font-size: 0.84rem;
  color: var(--text-body);
  line-height: 1.65;
  flex: 1;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}
.pill {
  padding: 0.17rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(124,58,237,0.12);
  background: rgba(124,58,237,0.05);
  font-family: var(--f-mono);
  font-size: 0.63rem;
  color: var(--text-muted);
  transition: color var(--tr), border-color var(--tr), background var(--tr);
}
.pill:hover {
  color: var(--indigo);
  border-color: rgba(124,58,237,0.25);
  background: rgba(124,58,237,0.09);
}

.card-footer {
  padding: 0.8rem 1.5rem;
  border-top: 1px solid rgba(124,58,237,0.08);
  background: rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--indigo);
  font-weight: 500;
  transition: opacity var(--tr);
}
.card-link:hover { opacity: 0.7; }
.card-link.muted { color: var(--text-muted); pointer-events: none; }
.card-detail-btn {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  transition: color var(--tr);
}
.card-detail-btn:hover { color: var(--indigo); }

/* Filtres */
.filters { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.filter {
  padding: 0.33rem 0.85rem;
  border-radius: 100px;
  border: 1.5px solid rgba(124,58,237,0.15);
  background: var(--glass);
  backdrop-filter: blur(8px);
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  transition: var(--tr);
}
.filter:hover { border-color: rgba(124,58,237,0.35); color: var(--indigo); }
.filter.active {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
  box-shadow: var(--shadow-indigo);
}
.filter .count { opacity: 0.6; margin-left: 0.2rem; }
.project-card.hidden { display: none; }

/* ════════════════════════════════
   SKILLS
════════════════════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
}
.skill-card {
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
}
.skill-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(124,58,237,0.25);
}
.skill-cat {
  font-family: var(--f-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
}
.skill-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* ════════════════════════════════
   EXPÉRIENCES
════════════════════════════════ */
.timeline {
  position: relative;
  padding-left: clamp(1.5rem, 4vw, 2.5rem);
  max-width: 720px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0.6rem; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--indigo), rgba(124,58,237,0.08));
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  padding-bottom: clamp(2rem, 4vw, 3rem);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: clamp(-1.5rem, -4vw, -2.5rem);
  top: 0.45rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--indigo);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15), 0 0 0 6px rgba(124,58,237,0.05);
  transform: translateX(-4px);
}
.timeline-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 3vw, 1.6rem) clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--tr), box-shadow var(--tr);
}
.timeline-card:hover {
  border-color: rgba(124,58,237,0.25);
  box-shadow: var(--shadow);
}
.timeline-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.45rem;
  flex-wrap: wrap;
}
.timeline-period {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--indigo);
  font-weight: 500;
}
.timeline-location {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}
.timeline-role {
  font-family: var(--f-display);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}
.timeline-company {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--f-mono);
  margin-bottom: 0.9rem;
}
.timeline-items { display: flex; flex-direction: column; gap: 0.4rem; }
.timeline-items li {
  font-size: 0.845rem;
  color: var(--text-body);
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.55;
}
.timeline-items li::before {
  content: '→';
  position: absolute; left: 0;
  color: var(--indigo);
  font-size: 0.68rem;
  top: 0.17rem;
}

/* ════════════════════════════════
   CONTACT — même fond que le reste
════════════════════════════════ */
.contact-intro {
  color: var(--text-body);
  max-width: 480px;
  margin-bottom: 3rem;
  font-size: clamp(0.95rem, 2vw, 1.05rem);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 0.6rem; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--tr), box-shadow var(--tr);
}
.contact-item:hover {
  border-color: rgba(124,58,237,0.25);
  box-shadow: var(--shadow);
}
.contact-item.availability { cursor: default; }
.contact-icon {
  font-size: 1rem;
  color: var(--indigo);
  width: 28px;
  text-align: center;
  flex-shrink: 0;
  font-family: var(--f-mono);
  font-weight: 600;
}
.contact-label {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}
.contact-value {
  font-size: 0.82rem;
  color: var(--text-body);
  transition: color var(--tr);
}
.contact-item:hover .contact-value { color: var(--text-dark); }
.contact-value.accent-text { color: var(--amber); font-weight: 500; }
.contact-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--f-mono);
  margin-top: 0.1rem;
}

/* Formulaire — même verre */
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-label {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.required { color: var(--indigo); }
.form-input {
  padding: 0.72rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(124,58,237,0.15);
  background: rgba(255,255,255,0.65);
  color: var(--text-dark);
  font-family: var(--f-body);
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--tr), box-shadow var(--tr);
  resize: none;
  backdrop-filter: blur(4px);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: rgba(124,58,237,0.45);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
  background: rgba(255,255,255,0.85);
}

/* ════════════════════════════════
   FOOTER — cohérent avec le reste
════════════════════════════════ */
.footer {
  padding: 2rem 0;
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(124,58,237,0.1);
  background: rgba(242,241,238,0.6);
  backdrop-filter: blur(8px);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.text-dim {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--tr);
}
.footer-links a:hover { color: var(--indigo); }

/* ════════════════════════════════
   MODAL
════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(14,14,22,0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-box {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.2), 0 0 0 1px rgba(124,58,237,0.08);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease;
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }

.modal-close {
  position: sticky;
  top: 0; float: right;
  margin: 1rem 1rem 0 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.15);
  color: var(--text-muted);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: color var(--tr), background var(--tr);
}
.modal-close:hover { color: var(--indigo); background: rgba(124,58,237,0.12); }

.modal-content { padding: 0.5rem 1.75rem 2rem; clear: both; }
.modal-head { margin-bottom: 1.5rem; }
.modal-icon { font-size: 2rem; margin-bottom: 0.7rem; }
.modal-title {
  font-family: var(--f-display);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}
.modal-section { margin-top: 1.4rem; }
.modal-section-title {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.modal-context {
  font-size: 0.875rem;
  color: var(--text-body);
  line-height: 1.7;
}
.modal-livrables, .modal-criteres { display: flex; flex-direction: column; gap: 0.4rem; }
.modal-livrables li, .modal-criteres li {
  font-size: 0.845rem;
  color: var(--text-body);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.5;
}
.modal-livrables li::before { content:'→'; position:absolute; left:0; color:var(--indigo); }
.modal-criteres li::before  { content:'✓'; position:absolute; left:0; color:var(--green); font-size:0.7rem; top:0.2rem; }
.modal-stack { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.modal-screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.7rem;
  margin-top: 0.7rem;
}
.modal-screenshots img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(124,58,237,0.12);
  cursor: zoom-in;
  transition: opacity var(--tr);
}
.modal-screenshots img:hover { opacity: 0.85; }
.modal-footer {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(124,58,237,0.1);
}

/* ════════════════════════════════
   ANIMATIONS D'ENTRÉE AU SCROLL
════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */

/* Tablette */
@media (max-width: 900px) {
  .about-grid   { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
}

/* Mobile */
@media (max-width: 640px) {
  /* Nav mobile */
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.75rem;
    background: rgba(242,241,238,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(124,58,237,0.1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 0.6rem 0.85rem; }
  .nav-link.nav-cta { margin-left: 0; margin-top: 0.3rem; text-align: center; justify-content: center; }
  .menu-btn { display: flex; }

  /* Hero */
  .hero-name { letter-spacing: -0.025em; }
  .hero-actions { gap: 0.65rem; }
  .btn { padding: 0.65rem 1.1rem; font-size: 0.84rem; }

  /* Grilles */
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid   { grid-template-columns: 1fr; }
  .form-row      { grid-template-columns: 1fr; }

  /* Timeline */
  .timeline { padding-left: 1.5rem; }

  /* Section header */
  .section-header { flex-direction: column; align-items: flex-start; }

  /* Modal */
  .modal-box { max-height: 92vh; border-radius: 14px; }
  .modal-content { padding: 0.5rem 1.25rem 1.5rem; }
}

/* ════════════════════════════════
   HOME OVERLAY — identité initiale
════════════════════════════════ */

/* Carte identité — coin bas gauche */
#home-overlay {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 10;
  text-align: left;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(124, 58, 237, 0.13);
  border-radius: 18px;
  padding: 1.25rem 1.5rem 1.1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1), 0 0 0 1px rgba(124,58,237,0.05);
  max-width: 300px;
  transition: opacity 0.45s ease, transform 0.45s ease;
}
#home-overlay.hidden {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.home-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.7rem;
  border-radius: 100px;
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.18);
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: var(--indigo);
  letter-spacing: 0.03em;
  margin-bottom: 0.9rem;
}

.home-name {
  font-family: var(--f-display);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.home-title {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  color: var(--text-body);
  margin-bottom: 1rem;
  height: 1.4em;
  white-space: nowrap;
  overflow: hidden;
}

/* Séparateur */
#home-overlay::after {
  content: '';
  display: block;
  height: 1px;
  background: rgba(124,58,237,0.1);
  margin: 0.75rem 0 0.8rem;
}

.home-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  pointer-events: auto;
}
.home-links a {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color var(--tr);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.home-links a:hover { color: var(--indigo); }

/* Hint — centre bas, élément indépendant */
#home-hint {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-family: var(--f-mono);
  font-size: 0.62rem;
  color: rgba(66, 66, 79, 0.55);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  animation: hintPulse 3s ease-in-out infinite;
  transition: opacity 0.4s ease;
}
#home-hint.hidden { opacity: 0; }

@keyframes hintPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.7; }
}


/* ════════════════════════════════
   BOUTON RETOUR
════════════════════════════════ */

#back-btn {
  position: fixed;
  top: 1.4rem;
  left: 1.4rem;
  z-index: 110;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  background: rgba(255,255,255,0.9);
  border: 1.5px solid rgba(124,58,237,0.2);
  color: var(--text-dark);
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-16px);
  transition: opacity 0.3s ease, transform 0.3s ease, background var(--tr), border-color var(--tr);
}
#back-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
#back-btn:hover {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}


/* ════════════════════════════════
   SECTION PANELS — cartes flottantes
════════════════════════════════ */

.section-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2rem);
  pointer-events: none;
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  /* fond très léger pour ne pas écraser le 3D */
  background: rgba(14, 14, 22, 0.18);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.section-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.panel-inner {
  background: rgba(248, 247, 244, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(124,58,237,0.12);
  border-radius: 20px;
  width: 100%;
  max-width: 780px;
  max-height: 82vh;
  overflow-y: auto;
  box-shadow:
    0 0 0 1px rgba(124,58,237,0.06),
    0 24px 60px rgba(14,14,22,0.2),
    0 8px 20px rgba(14,14,22,0.1);
  scrollbar-width: thin;
  scrollbar-color: rgba(124,58,237,0.25) transparent;
}
.panel-inner::-webkit-scrollbar { width: 4px; }
.panel-inner::-webkit-scrollbar-track { background: transparent; }
.panel-inner::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.25); border-radius: 2px; }

/* Panel wide (projets, stack) */
.panel-wide .panel-inner { max-width: 1020px; }

/* Panel contact : plus de hauteur + contenu compact */
#panel-contact .panel-inner { max-height: 92vh; }
#panel-contact .panel-body  { padding-top: 1rem; }
#panel-contact .contact-intro { margin-bottom: 1rem !important; font-size: 0.875rem; }
#panel-contact .contact-item  { padding: 0.6rem 0.9rem; }
#panel-contact .contact-info  { gap: 0.4rem; }
#panel-contact textarea.form-input { rows: 3; min-height: 80px; }

/* Header du panel */
.panel-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.5rem 2rem 1rem;
  border-bottom: 1px solid rgba(124,58,237,0.08);
  position: sticky;
  top: 0;
  background: rgba(248,247,244,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2;
  border-radius: 20px 20px 0 0;
}

.panel-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.panel-title {
  font-family: var(--f-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  flex: 1;
}

.panel-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(124,58,237,0.06);
  border: 1px solid rgba(124,58,237,0.12);
  color: var(--text-muted);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--tr), background var(--tr), border-color var(--tr);
  flex-shrink: 0;
}
.panel-close:hover { color: var(--indigo); background: rgba(124,58,237,0.1); border-color: rgba(124,58,237,0.25); }

/* Corps du panel */
.panel-body { padding: 1.5rem 2rem 2rem; }


/* ════════════════════════════════
   NODES 3D — labels flottants sur les cylindres
════════════════════════════════ */

#db-labels { position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden; }

.db-node {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding-bottom: 0.5rem;
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 0.4s ease;
}
.db-node-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px solid rgba(124,58,237,0);
  transition: border-color 0.25s ease;
  pointer-events: none;
}
.db-node-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.82);
  border: 1.5px solid rgba(124,58,237,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(124,58,237,0.12);
  transition: background 0.25s, border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.db-node-label {
  font-family: var(--f-mono);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-dark);
  white-space: nowrap;
  transition: color 0.22s;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(6px);
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
}
.db-node-sub {
  font-family: var(--f-mono);
  font-size: 0.58rem;
  color: var(--text-body);
  white-space: nowrap;
  letter-spacing: 0.02em;
  font-weight: 500;
}

/* Hover */
.db-node:hover .db-node-icon,
.db-node.hovered .db-node-icon {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
  box-shadow: 0 0 24px rgba(124,58,237,0.55), 0 4px 14px rgba(124,58,237,0.3);
  transform: scale(1.12) translateY(-3px);
}
.db-node:hover .db-node-label,
.db-node.hovered .db-node-label {
  color: var(--indigo);
}
.db-node:hover .db-node-ring,
.db-node.hovered .db-node-ring {
  border-color: rgba(124,58,237,0.35);
}

/* Connecteur bas */
.db-node::after {
  content: '';
  display: block;
  width: 1.5px;
  height: 14px;
  background: linear-gradient(to bottom, rgba(124,58,237,0.45), transparent);
  margin-top: -0.1rem;
}

/* ════════════════════════════════
   LABELS 3D — flottent au-dessus des cylindres (ancien, conservé pour compat)
════════════════════════════════ */

.db-label {
  position: absolute;
  transform: translate(-50%, -100%);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.9rem 0.38rem 0.72rem;
  border-radius: 100px;
  border: 1.5px solid rgba(124, 58, 237, 0.22);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-dark);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.12), 0 1px 3px rgba(0,0,0,0.06);
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease,
              transform 0.22s ease, box-shadow 0.22s ease, opacity 0.3s ease;
  pointer-events: auto;
  /* décalage supplémentaire au-dessus du cylindre */
  margin-top: -0.5rem;
}

.db-label-icon {
  font-size: 0.72rem;
  opacity: 0.75;
  transition: opacity 0.22s ease;
}

/* Hover */
.db-label:hover {
  background: var(--indigo);
  color: #fff;
  border-color: var(--indigo);
  transform: translate(-50%, -120%);
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.45), 0 2px 6px rgba(0,0,0,0.1);
}
.db-label:hover .db-label-icon { opacity: 1; }

/* Section active */
.db-label.active {
  background: var(--indigo);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 22px rgba(124, 58, 237, 0.4);
}
.db-label.active .db-label-icon { opacity: 1; }

/* Clic — ripple */
@keyframes dbRipple {
  0%   { box-shadow: 0 0 0 0   rgba(124,58,237,0.55), 0 6px 22px rgba(124,58,237,0.4); }
  60%  { box-shadow: 0 0 0 18px rgba(124,58,237,0),   0 8px 30px rgba(124,58,237,0.3); }
  100% { box-shadow: 0 0 0 24px rgba(124,58,237,0),   0 4px 16px rgba(124,58,237,0.12); }
}
.db-label.clicking {
  animation: dbRipple 0.65s ease-out;
}

/* Connecteur vertical vers le cylindre */
.db-label::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5px;
  height: 10px;
  background: linear-gradient(to bottom, rgba(124,58,237,0.5), transparent);
  pointer-events: none;
}

/* ════════════════════════════════
   FORMULAIRE — états AJAX
════════════════════════════════ */

.form-error {
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #dc2626;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

.contact-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2.5rem 1rem;
  text-align: center;
}
.contact-success-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.1);
  border: 1.5px solid rgba(5, 150, 105, 0.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: var(--green);
  margin-bottom: 0.5rem;
}
.contact-success-title {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
}
.contact-success-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ════════════════════════════════
   V2 — MODE RACK MOBILE (body.mobile-3d)
   Labels centrés sur chaque étage
════════════════════════════════ */

.mobile-3d .db-node {
  transform: translate(-50%, -50%);   /* centré sur l'étage, pas au-dessus */
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1rem;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 100px;
  border: 1px solid rgba(124, 58, 237, 0.22);
  box-shadow: 0 2px 14px rgba(124, 58, 237, 0.18);
}
.mobile-3d .db-node::after { display: none; }
.mobile-3d .db-node-ring   { display: none; }

.mobile-3d .db-node-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  font-size: 0.8rem;
  flex-shrink: 0;
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.2);
  box-shadow: none;
}
.mobile-3d .db-node-label {
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-dark);
}
.mobile-3d .db-node-sub { display: none; }

/* Hover / tap sur mobile */
.mobile-3d .db-node:hover .db-node-icon,
.mobile-3d .db-node.hovered .db-node-icon {
  background: var(--indigo);
  color: #fff;
  border-color: var(--indigo);
  transform: scale(1.1);
  box-shadow: none;
}
.mobile-3d .db-node:hover,
.mobile-3d .db-node.hovered {
  border-color: rgba(124, 58, 237, 0.5);
  background: rgba(255, 255, 255, 0.96);
}

/* ════════════════════════════════
   V2 — RESPONSIVE MOBILE
════════════════════════════════ */

@media (max-width: 768px) {
  /* Panels : pleine largeur */
  .section-panel { padding: 0.75rem; }
  .panel-wide .panel-inner { max-width: 100%; }
  .panel-inner { border-radius: 16px; max-height: 90vh; }

  /* Grilles dans les panels */
  .projects-grid { grid-template-columns: 1fr; }
  .skills-grid   { grid-template-columns: 1fr 1fr; }
  .contact-grid  { grid-template-columns: 1fr; }
  .form-row      { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  /* ── Overlay identité ── */
  #home-overlay {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    max-width: none;
    padding: 0.9rem 1.1rem 0.85rem;
    border-radius: 14px;
  }
  .home-name  { font-size: 1.25rem; }
  .home-badge { font-size: 0.58rem; margin-bottom: 0.6rem; padding: 0.22rem 0.6rem; }
  .home-title { font-size: 0.72rem; }
  .home-links { gap: 0.85rem; }

  /* Hint masqué — pas de place sur petit écran */
  #home-hint { display: none; }

  /* ── Panels ── */
  .section-panel { padding: 0.4rem; }
  .panel-inner   { border-radius: 14px; max-height: 92vh; }
  .panel-head    { padding: 0.9rem 1.1rem 0.7rem; gap: 0.6rem; }
  .panel-icon    { width: 34px; height: 34px; border-radius: 9px; font-size: 0.9rem; }
  .panel-title   { font-size: 1.05rem; }
  .panel-body    { padding: 1rem 1.1rem 1.25rem; }

  #panel-contact .panel-inner { max-height: 96vh; }

  /* ── Nodes 3D ── */
  .db-node-icon  { width: 36px; height: 36px; font-size: 0.9rem; }
  .db-node-label { font-size: 0.58rem; padding: 0.1rem 0.4rem; }
  .db-node-sub   { display: none; }

  /* ── Bouton retour ── */
  #back-btn { font-size: 0.65rem; padding: 0.4rem 0.75rem; top: 1rem; left: 1rem; }

  /* ── Grilles ── */
  .skills-grid { grid-template-columns: 1fr; }

  /* ── Modal ── */
  .modal-box { max-height: 94vh; border-radius: 14px; }
  .modal-content { padding: 0.5rem 1rem 1.25rem; }
  .modal-screenshots { grid-template-columns: 1fr 1fr; }
}

/* Réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor { animation: none; }
  .badge-dot { animation: none; }
  .hero-name-accent { animation: none; }
  .bg-orb { animation: none; }
  .scroll-line { animation: none; }
  .db-label, .db-label:hover, .db-label.active { transition: none; animation: none; }
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}
