/* ---------------------------------------------------------
   Design system — noir / rose / blanc, esprit terminal 1992.
   Charte typo (3 rôles, appliqués partout) :
   - Titres      → VT323, majuscules, pas d'italique
   - Labels/UI   → Courier New, style prompt / bouton entre crochets
   - Texte courant → Times New Roman, légèrement flouté
--------------------------------------------------------- */
:root {
  --bg: #050506;
  --bg-soft: #0d0c0e;
  --text: #f4eef1;
  --text-muted: #948c92;
  --border: #201d20;
  --accent: #ef6fa1;
  --accent-soft: rgba(239, 111, 161, 0.13);
  --accent-2: #ffc2da;
  --family-bg: #170a11;
  --family-accent: #ffb0cc;

  --font-title: "VT323", "Courier New", monospace;
  --font-label: "Courier New", Courier, monospace;
  --font-body: "Times New Roman", Times, serif;

  --container: 720px;
  --container-wide: 960px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --blur: 0.7px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  position: relative;
}

/* Léger grain — texture plutôt que polish plastique */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
i, em { font-style: normal; } /* charte : jamais d'italique */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------------------------------
   Nav
--------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  background: rgba(5, 5, 6, 0.7);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.nav__brand {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav__icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}
.nav__link:hover .nav__icon { color: var(--accent); }

.nav__back {
  font-family: var(--font-label);
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
}
.nav__back:hover { color: var(--text); }

/* ---------------------------------------------------------
   Hero + word cloud
--------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 45% at 50% 32%, rgba(239, 111, 161, 0.09) 0%, rgba(239, 111, 161, 0) 70%),
    var(--bg);
}

.cloud-scene {
  position: absolute;
  inset: 0;
  perspective: 1000px;
  pointer-events: none;
}

.cloud {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.cloud__word {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  font-family: var(--font-title);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text);
  opacity: 0.3;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s var(--ease);
  user-select: none;
}

.cloud__word--featured {
  color: var(--accent);
  text-shadow: 0 0 18px rgba(239, 111, 161, 0.5);
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 640px;
  padding: 0 24px;
}

.hero__content::before {
  content: "";
  position: absolute;
  inset: -20% -30%;
  z-index: -1;
  background: radial-gradient(
    ellipse at center,
    rgba(5, 5, 6, 0.98) 0%,
    rgba(5, 5, 6, 0.92) 40%,
    rgba(5, 5, 6, 0.6) 65%,
    rgba(5, 5, 6, 0) 100%
  );
  filter: blur(6px);
}

.hero__headline {
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin: 0;
  text-shadow: 0 0 18px rgba(239, 111, 161, 0.3);
}

.hero__scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-label);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  z-index: 2;
  animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

/* ---------------------------------------------------------
   Sections
--------------------------------------------------------- */
section {
  padding: 120px 0;
}

/* Label / eyebrow — style prompt terminal, partout identique */
.eyebrow {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.eyebrow::before { content: "> "; }
.eyebrow::after {
  content: "_";
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

h2 {
  font-family: var(--font-title);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin: 0 0 24px;
  text-shadow: 0 0 16px rgba(239, 111, 161, 0.25);
}

.lede {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
  filter: blur(var(--blur));
}

.section--about p,
.section--family p {
  font-family: var(--font-body);
  font-size: 1.25rem;
  line-height: 1.7;
  margin: 0 0 16px;
  color: var(--text);
  filter: blur(var(--blur));
}
.section--about p:last-child,
.section--family p:last-child { margin-bottom: 0; }

/* Playlist */
.section--playlist {
  padding-top: 0;
  padding-bottom: 64px;
}
.playlist-embed {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(239, 111, 161, 0.06);
}

/* Groover stat */
.stat-card {
  text-align: center;
  padding: 24px 0 32px;
  margin-bottom: 16px;
}
.stat-card__value {
  font-family: var(--font-title);
  font-size: clamp(3.2rem, 9vw, 5.5rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--accent);
  line-height: 1;
  text-shadow: 0 0 40px rgba(239, 111, 161, 0.4);
}
.stat-card__label {
  margin-top: 12px;
  font-family: var(--font-label);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 3px;
  font-family: var(--font-label);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), color 0.2s var(--ease);
}
.btn::before { content: "[ "; }
.btn::after { content: " ]"; }
.btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn--primary {
  color: var(--accent);
  border-color: var(--accent);
}
.btn--primary:hover { color: var(--accent-2); border-color: var(--accent-2); }

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* Podcast */
.section--podcast {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.podcast-badge {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.podcast-badge::before, .podcast-badge::after { content: none; }

/* Family — plus chaleureux, plus intime, toujours sombre */
.section--family {
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(239, 111, 161, 0.08) 0%, rgba(239, 111, 161, 0) 60%),
    var(--family-bg);
}
.section--family .eyebrow { color: var(--family-accent); }
.section--family .btn--primary { color: var(--family-accent); border-color: var(--family-accent); }
.section--family .btn--primary:hover { opacity: 0.85; }

/* Work / réalisations */
.section--work {
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}
.work-category h3 {
  font-family: var(--font-label);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.work-item {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: repeating-linear-gradient(
    135deg, #0d0b0d, #0d0b0d 10px, #131013 10px, #131013 20px
  );
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-label);
  font-size: 0.8rem;
  padding: 12px;
  margin-bottom: 14px;
}

/* ---------------------------------------------------------
   Footer
--------------------------------------------------------- */
.footer {
  padding: 56px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer__links { display: flex; align-items: center; gap: 18px; }
.footer__copy {
  font-family: var(--font-label);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---------------------------------------------------------
   Scroll reveal
--------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .hero__scroll-hint, .eyebrow::after { animation: none; }
}

/* ---------------------------------------------------------
   Responsive
--------------------------------------------------------- */
@media (max-width: 720px) {
  section { padding: 88px 0; }
  .work-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------
   Family tree page
--------------------------------------------------------- */
.tree-page-header {
  padding: 140px 24px 24px;
  text-align: center;
}
.tree-page-header p {
  font-family: var(--font-body);
  color: var(--text-muted);
  max-width: 520px;
  margin: 12px auto 0;
  filter: blur(var(--blur));
}
.tree-placeholder-note {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--family-accent);
  background: var(--family-bg);
  padding: 6px 12px;
  border-radius: 999px;
}

.tree-wrap {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--nav-h));
  overflow: hidden;
  background: var(--bg-soft);
  cursor: grab;
}
.tree-wrap.is-dragging { cursor: grabbing; }

.tree-wrap svg { width: 100%; height: 100%; display: block; }

.tree-node circle {
  fill: var(--bg-soft);
  stroke: var(--accent);
  stroke-width: 2;
  transition: fill 0.2s var(--ease), stroke 0.2s var(--ease);
}
.tree-node:hover circle { fill: var(--accent-soft); }
.tree-node.is-selected circle { fill: var(--accent); stroke: var(--accent); }
.tree-node.is-selected text { fill: #17060d; }
.tree-node text {
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  fill: var(--text);
  text-anchor: middle;
  pointer-events: none;
}
.tree-edge {
  stroke: var(--border);
  stroke-width: 2;
  fill: none;
}

.tree-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  z-index: 5;
}
.tree-controls button {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font-family: var(--font-label);
  font-size: 1.1rem;
  cursor: pointer;
}
.tree-controls button:hover { border-color: var(--accent); color: var(--accent); }

.tree-panel {
  position: absolute;
  top: 20px;
  left: 20px;
  max-width: 260px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  z-index: 5;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.tree-panel.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.tree-panel__name {
  font-family: var(--font-title);
  font-size: 1.3rem;
  text-transform: uppercase;
  margin: 0 0 4px;
}
.tree-panel__meta {
  font-family: var(--font-body);
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
  filter: blur(var(--blur));
}
.tree-panel__badge {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--family-accent);
  background: var(--family-bg);
  padding: 4px 8px;
  border-radius: 999px;
}
