/* ─── La Pévèle Augmentée — Design Tokens ─────────────────────────────── */
:root {
  /* Base sombre */
  --bg: #0A0A0B;
  --bg-2: #06060a;
  --surface: #141416;
  --surface-elevated: #1C1C1F;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #FFFFFF;
  --text-muted: #A1A1AA;
  --text-soft: rgba(255, 255, 255, 0.6);

  /* Signature aurore */
  --violet: #7C5CFF;
  --cyan: #22D3EE;
  --gold: #F5B544;
  --aurora: linear-gradient(135deg, #7C5CFF 0%, #22D3EE 100%);
  --aurora-soft: linear-gradient(135deg, rgba(124,92,255,.6) 0%, rgba(34,211,238,.6) 100%);
  --aurora-radial: radial-gradient(circle at 50% 50%, rgba(124,92,255,.45), rgba(34,211,238,.18) 40%, transparent 70%);

  /* 10 univers */
  --u-habitat: #F59E0B;
  --u-mobilite: #22D3EE;
  --u-sante: #34D399;
  --u-education: #60A5FA;
  --u-economie: #A78BFA;
  --u-culture: #F472B6;
  --u-sport: #FB7185;
  --u-citoyen: #4ADE80;
  --u-env: #10B981;
  --u-famille: #FBBF24;

  /* Type */
  --f-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Inter", ui-sans-serif, system-ui, sans-serif;

  /* Radii */
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-2xl: 28px;
  --r-3xl: 36px;
  --r-pill: 999px;

  /* Easings */
  --ease-apple: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  /* Grain subtil */
  background-image:
    radial-gradient(ellipse 1200px 800px at 50% -200px, rgba(124,92,255,.18), transparent 60%),
    radial-gradient(ellipse 800px 600px at 80% 30%, rgba(34,211,238,.08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 1   0 0 0 0 1   0 0 0 0 1   0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: .35;
  mix-blend-mode: overlay;
}

::selection {
  background: rgba(124, 92, 255, .35);
  color: #fff;
}

/* ─── Typography ───────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

.display {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.eyebrow {
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.gradient-text {
  background: var(--aurora);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gold-text { color: var(--gold); }

/* ─── Layout ───────────────────────────────────────────────────────────── */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

section {
  position: relative;
  z-index: 2;
}

/* ─── Nav ──────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex; align-items: center; gap: 24px;
  padding: 10px 10px 10px 22px;
  background: rgba(20, 20, 22, 0.55);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 500;
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-brand-mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--aurora);
  box-shadow: 0 0 16px rgba(124,92,255,.5);
  position: relative;
}

.nav-brand-mark::after {
  content: ""; position: absolute; inset: 4px;
  border-radius: 3px;
  background: var(--bg);
}

.nav-brand-mark::before {
  content: ""; position: absolute;
  inset: 7px;
  border-radius: 2px;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.nav-links {
  display: flex; gap: 22px;
  color: var(--text-soft);
}

.nav-links a {
  color: inherit;
  text-decoration: none;
  transition: color .2s;
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
  transition: transform .2s var(--ease-apple);
}

.nav-cta:hover { transform: scale(1.04); }

@media (max-width: 800px) {
  .nav-links { display: none; }
  .nav { padding: 8px 8px 8px 18px; gap: 14px; }
}

/* ─── Magnetic button ──────────────────────────────────────────────────── */
.btn-magnetic {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 18px 32px;
  font-family: var(--f-body);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #0A0A0B;
  background: linear-gradient(180deg, #ffffff 0%, #e8e8ee 100%);
  border: none;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: transform .25s var(--ease-spring), box-shadow .3s;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.2) inset,
    0 8px 24px rgba(124, 92, 255, 0.25),
    0 0 32px rgba(34, 211, 238, 0.15);
  z-index: 1;
  isolation: isolate;
}

.btn-magnetic::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--aurora);
  z-index: -1;
  opacity: 0;
  filter: blur(16px);
  transition: opacity .35s;
}

.btn-magnetic:hover::before { opacity: 1; }

.btn-magnetic.ghost {
  color: var(--text);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(20px);
  box-shadow: none;
}

.btn-magnetic.ghost:hover {
  background: rgba(255,255,255,.1);
}

.btn-magnetic .arrow {
  display: inline-block;
  transition: transform .3s var(--ease-apple);
}

.btn-magnetic:hover .arrow { transform: translateX(4px); }

/* ─── Reveal on scroll ─────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease-apple), transform .9s var(--ease-apple);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: .06s; }
.reveal-delay-2 { transition-delay: .12s; }
.reveal-delay-3 { transition-delay: .18s; }
.reveal-delay-4 { transition-delay: .24s; }
.reveal-delay-5 { transition-delay: .30s; }
.reveal-delay-6 { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ─── Glass card ───────────────────────────────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-radius: var(--r-2xl);
}

/* ─── Pill ─────────────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
}

.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: pulse 2s infinite var(--ease-apple);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.85); }
}

/* ─── Footer ───────────────────────────────────────────────────────────── */
footer {
  margin-top: 80px;
  padding: 80px 0 60px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.4));
  position: relative;
  z-index: 2;
}

footer .wrap {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

@media (max-width: 800px) {
  footer .wrap { grid-template-columns: 1fr 1fr; gap: 36px; }
}

footer h4 {
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

footer a {
  display: block;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 0;
  transition: color .2s;
}

footer a:hover { color: var(--text); }

footer .small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
  margin-top: 12px;
  max-width: 340px;
}

/* ─── Hero core ────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 120px 0 80px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 28px;
  padding: 8px 16px 8px 8px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border-strong);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.hero-eyebrow .badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: rgba(245,181,68,.15);
  color: var(--gold);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.hero-actions {
  display: flex; gap: 12px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.hero-counter {
  display: inline-flex; align-items: baseline; gap: 10px;
  margin-top: 40px;
  padding: 14px 20px;
  border-radius: var(--r-xl);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hero-counter .num {
  font-family: var(--f-display);
  font-size: 28px;
  font-weight: 600;
  background: var(--aurora);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.hero-counter .lbl {
  font-size: 13px;
  color: var(--text-muted);
}

.hero-counter .ping {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
  margin-right: 6px;
  animation: ping 2s infinite var(--ease-apple);
}

@keyframes ping {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.7); }
}

/* ─── Sections ─────────────────────────────────────────────────────────── */
.section {
  padding: 140px 0;
  position: relative;
}

.section-eyebrow {
  margin-bottom: 24px;
}

.section h2 {
  font-size: clamp(40px, 6vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin-bottom: 24px;
  max-width: 900px;
}

.section .lede {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.55;
  margin-bottom: 64px;
}

/* ─── Univers tiles ────────────────────────────────────────────────────── */
.univers-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

@media (max-width: 900px) {
  .univers-grid { grid-template-columns: repeat(2, 1fr); }
}

.univers-tile {
  position: relative;
  aspect-ratio: 1 / 1.05;
  border-radius: var(--r-2xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: transform .35s var(--ease-apple);
  isolation: isolate;
}

.univers-tile:hover {
  transform: translateY(-4px);
}

.univers-tile::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 30%, var(--u-color) 0%, transparent 65%);
  opacity: 0.25;
  z-index: -1;
  transition: opacity .35s;
}

.univers-tile:hover::before { opacity: 0.5; }

.univers-tile::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 1px var(--u-color);
  opacity: 0;
  transition: opacity .35s;
}

.univers-tile:hover::after { opacity: .4; }

.univers-tile .u-emoji {
  font-size: 32px;
  filter: grayscale(0);
}

.univers-tile .u-name {
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.univers-tile .u-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* ─── Steps ────────────────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 60px;
}

@media (max-width: 800px) {
  .steps { grid-template-columns: 1fr; }
}

.step {
  padding: 32px;
  border-radius: var(--r-2xl);
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

.step-num {
  font-family: var(--f-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.step h3 {
  font-family: var(--f-display);
  font-size: 28px;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 12px;
  font-weight: 500;
}

.step p {
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 15px;
  margin: 0;
}

.step-visual {
  margin-top: auto;
  padding-top: 32px;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Sponsor block ────────────────────────────────────────────────────── */
.sponsor-block {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}

@media (max-width: 900px) {
  .sponsor-block { grid-template-columns: 1fr; gap: 40px; }
}

.sponsor-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.stat {
  padding: 24px;
  border-radius: var(--r-xl);
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
}

.stat .v {
  font-family: var(--f-display);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.025em;
  background: var(--aurora);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.stat .l {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── Cofondateurs ─────────────────────────────────────────────────────── */
.cofond-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 700px) {
  .cofond-grid { grid-template-columns: 1fr; }
}

.cofond {
  padding: 40px;
  border-radius: var(--r-3xl);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid var(--border-strong);
  position: relative;
  overflow: hidden;
  transition: transform .35s var(--ease-apple);
}

.cofond:hover {
  transform: translateY(-4px);
}

.cofond::before {
  content: "";
  position: absolute;
  top: -120px; right: -80px;
  width: 320px; height: 320px;
  background: var(--aurora-radial);
  filter: blur(20px);
  opacity: 0.5;
  pointer-events: none;
}

.cofond-photo {
  width: 140px; height: 140px;
  border-radius: 50%;
  padding: 3px;
  background: var(--aurora);
  position: relative;
  margin-bottom: 24px;
}

.cofond-photo-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--surface-elevated);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display);
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--text);
  position: relative;
}

.cofond-photo-inner img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.cofond-photo-inner .placeholder-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(124,92,255,.3), rgba(34,211,238,.2));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--f-body);
  font-weight: 500;
  opacity: 0;
}

.cofond h3 {
  font-family: var(--f-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}

.cofond .role {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.cofond .bio {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-soft);
  margin-bottom: 24px;
  max-width: 380px;
}

.cofond-li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border-strong);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background .2s, transform .2s var(--ease-apple);
}

.cofond-li:hover {
  background: rgba(255,255,255,.1);
  transform: translateY(-1px);
}

.cofond-li svg {
  width: 14px; height: 14px;
}

/* ─── Constellation map ────────────────────────────────────────────────── */
.constellation-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/12;
}

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

.node-label {
  fill: rgba(255,255,255,0.55);
  font-family: var(--f-body);
  font-size: 9px;
  font-weight: 500;
  pointer-events: none;
}

/* ─── Hero variant: typographic ────────────────────────────────────────── */
.hero-type .display {
  font-size: clamp(56px, 10vw, 144px);
  line-height: 0.92;
  font-weight: 500;
  letter-spacing: -0.045em;
}

/* ─── Hero variant: immersive photo ────────────────────────────────────── */
.hero-immersive {
  background:
    radial-gradient(ellipse 800px 600px at 70% 40%, rgba(124,92,255,.25), transparent 60%),
    radial-gradient(ellipse 600px 500px at 20% 80%, rgba(34,211,238,.18), transparent 60%),
    radial-gradient(ellipse 1000px 700px at 50% 100%, rgba(245,181,68,.12), transparent 70%);
}

.hero-immersive .photo-stack {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 520px;
}

.photo-card {
  position: absolute;
  border-radius: var(--r-3xl);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
  background: var(--surface);
}

.photo-card .ph-fill {
  position: absolute; inset: 0;
}

.photo-card .ph-label {
  position: absolute;
  bottom: 16px; left: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ─── Aurora orb ───────────────────────────────────────────────────────── */
.aurora-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .55;
  pointer-events: none;
  z-index: 0;
}

/* ─── Hide tweaks panel by default ─────────────────────────────────────── */
.tweaks-hidden { display: none !important; }
