/* ============================================================
   TESSERACT — feuille de style de la page d'accueil
   ============================================================ */

:root{
  /* Couleurs */
  --bg: #07080d;
  --bg-elevated: rgba(255,255,255,0.035);
  --bg-elevated-strong: rgba(255,255,255,0.065);
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.2);
  --text: #edEdf3;
  --text-muted: #8a8fa6;
  --accent-1: #6c4cff;
  --accent-2: #3fe8d0;
  --accent-1-soft: rgba(108,76,255,0.16);
  --accent-2-soft: rgba(63,232,208,0.14);

  /* Verre */
  --glass-bg: rgba(12,13,20,0.46);
  --glass-bg-strong: rgba(9,10,16,0.6);
  --glass-border: rgba(255,255,255,0.14);
  --glass-blur: blur(18px) saturate(150%);

  /* Typo */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Rayon / grille */
  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --container: 1200px;

  /* Espacements */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  --ease: cubic-bezier(.16,.8,.24,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1,h2,h3,p{ margin: 0; }
a{ color: inherit; text-decoration: none; }
button{ font: inherit; background: none; border: none; padding: 0; cursor: pointer; color: inherit; }
img{ max-width: 100%; display: block; }

.visually-hidden{
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link{
  position: absolute; top: -48px; left: var(--space-4);
  background: var(--accent-2); color: #07080d;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-md);
  font-weight: 600; z-index: 300; transition: top .2s var(--ease);
}
.skip-link:focus{ top: var(--space-4); }

:focus-visible{
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Filigrane de fond (tourne avec le scroll) ---------- */
.bg-watermark{
  position: fixed;
  inset: 0;
  z-index: -1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}
.bg-watermark img{
  width: min(80vw, 980px);
  opacity: .05;
  filter: blur(16px);
  transform: rotate(0deg);
  will-change: transform;
}

/* ---------- Verre réutilisable ---------- */
.glass{
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
}

/* ---------- Sections : conteneur générique ---------- */
.section-inner{
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.section-head{ max-width: 720px; margin-bottom: var(--space-7); }
.section-lead{
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
  margin-top: var(--space-4);
}
.section-cta{ margin-top: var(--space-7); }

/* ---------- Boutons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .85em 1.5em;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s, background .3s;
  white-space: nowrap;
}
.btn-primary{
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  color: #05060a;
}
.btn-primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px var(--accent-1-soft), 0 4px 14px -4px var(--accent-2-soft);
}
.btn-ghost{
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.03);
  color: var(--text);
}
.btn-ghost:hover{
  border-color: var(--accent-2);
  background: var(--bg-elevated-strong);
  transform: translateY(-2px);
}
.btn-card{
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
  padding-top: var(--space-2);
}
.btn-card span{ transition: transform .3s var(--ease); }
.btn-card:hover{ color: var(--accent-2); }
.btn-card:hover span{ transform: translateX(4px); }

/* ---------- En-tête ---------- */
.site-header{
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding-block: var(--space-4);
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
}
.site-header.is-scrolled{
  background: rgba(7,8,13,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}
.header-inner{
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}
.brand{
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.brand-mark{ width: 32px; height: auto; flex: none; }
.brand-mark--small{ width: 24px; }
.brand-name{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: .01em;
  background: linear-gradient(120deg, #ffffff, var(--accent-2) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.site-nav{
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.site-nav a{
  position: relative;
  font-size: .95rem;
  color: var(--text-muted);
  padding-block: var(--space-1);
  transition: color .25s;
}
.site-nav a:not(.nav-cta)::after{
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent-2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.site-nav a:not(.nav-cta):hover{ color: var(--text); }
.site-nav a:not(.nav-cta):hover::after{ transform: scaleX(1); }
.nav-cta{
  padding: .5em 1.1em;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text) !important;
  transition: border-color .25s, background .25s;
}
.nav-cta:hover{ border-color: var(--accent-2); background: var(--bg-elevated); }

.nav-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
}
.nav-toggle span{
  display: block;
  width: 18px; height: 1.5px;
  margin-inline: auto;
  background: var(--text);
  transition: transform .3s var(--ease), opacity .3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-6.5px) rotate(-45deg); }

.mobile-nav{
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: 110px var(--space-6) var(--space-6);
  background: #07080d;
  transform: translateY(-100%);
  transition: transform .4s var(--ease);
}
.mobile-nav.is-open{ transform: translateY(0); }
.mobile-nav a{
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-4);
}

/* ---------- Hero ---------- */
.hero{
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-media{
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(22px) brightness(.55) saturate(115%);
  transform: scale(1.15);
}
.hero-media-overlay{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 30% 40%, rgba(108,76,255,0.14), transparent 70%),
    linear-gradient(to bottom, rgba(7,8,13,0.35) 0%, rgba(7,8,13,0.55) 55%, var(--bg) 100%);
}
.hero-inner{
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin-inline: auto;
  padding: 150px var(--space-6) var(--space-9);
  width: 100%;
}
.hero-panel{
  max-width: 640px;
  padding: var(--space-8);
  border-radius: var(--radius-lg);
}
.eyebrow{
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: var(--space-4);
}
.hero-title{
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-5);
}
.hero-text{
  color: rgba(237,237,243,0.82);
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: var(--space-6);
}
.hero-actions{
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

/* ---------- Formes géométriques décoratives ---------- */
.geo-field{
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.geo-field--hero{ pointer-events: auto; } /* capte le mousemove pour le parallax */

.geo-shape{
  position: absolute;
  transform: translate(var(--px, 0px), var(--py, 0px));
  transition: transform .6s var(--ease);
}
.geo-shape i{
  display: block;
  border: 1.5px solid var(--accent-2);
  opacity: .35;
}

.geo-shape--1{ top: 16%; left: 6%; }
.geo-shape--1 i{
  width: 62px; height: 62px;
  border-radius: 16px;
  border-color: var(--accent-1);
  animation: geo-float-a 9s ease-in-out infinite;
}
.geo-shape--2{ top: 68%; left: 12%; }
.geo-shape--2 i{
  width: 32px; height: 32px;
  border-radius: 50%;
  animation: geo-float-b 7s ease-in-out infinite;
}
.geo-shape--3{ top: 22%; right: 9%; }
.geo-shape--3 i{
  width: 44px; height: 44px;
  animation: geo-float-c 11s ease-in-out infinite reverse;
}
.geo-shape--4{ top: 66%; right: 15%; }
.geo-shape--4 i{
  width: 24px; height: 24px;
  border-radius: 7px;
  border-color: var(--accent-1);
  animation: geo-float-b 8s ease-in-out infinite;
}

/* formes pleines, plus discrètes, derrière la grille de bulles */
.geo-shape--5{
  top: 10%; left: 4%;
  width: 70px; height: 70px;
  background: var(--accent-1-soft);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  animation: geo-float-a 12s ease-in-out infinite;
}
.geo-shape--6{
  bottom: 6%; right: 8%;
  width: 46px; height: 46px;
  background: var(--accent-2-soft);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  animation: geo-float-b 10s ease-in-out infinite reverse;
}

@keyframes geo-float-a{
  0%, 100%{ transform: translateY(0) rotate(0deg); }
  50%{ transform: translateY(-20px) rotate(18deg); }
}
@keyframes geo-float-b{
  0%, 100%{ transform: translateY(0) rotate(0deg); }
  50%{ transform: translateY(16px) rotate(-14deg); }
}
@keyframes geo-float-c{
  0%, 100%{ transform: translateY(0) rotate(45deg); }
  50%{ transform: translateY(-20px) rotate(63deg); }
}

/* ---------- Mini-tesseract animé (décor) ----------
   Carré intérieur relié aux 4 coins du carré extérieur ; l'intérieur grossit
   en boucle au-delà du carré extérieur puis revient, comme s'il glissait
   hors de lui-même. Animation en SMIL (SVG <animate>) : fluide nativement,
   sans JS. Le sens du mouvement réduit est géré séparément en JS
   (svg.pauseAnimations()), la media query CSS ne couvrant pas le SMIL. */
.tesseract-mini{
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
.tesseract-mini svg{ width: 100%; height: 100%; overflow: visible; display: block; }
.tess-outer{ fill: none; stroke: rgba(255,255,255,.4); stroke-width: .6; }
.tess-inner{ fill: none; stroke: var(--accent-2); stroke-width: .6; opacity: .85; }
.tess-link{ stroke: rgba(255,255,255,.28); stroke-width: .4; }

/* ---------- Fortnite : branche active ---------- */
.fortnite-section{ padding-block: var(--space-10) var(--space-9); }

.feature-map{
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-7);
  align-items: center;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-7);
}
.feature-map-media{
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.feature-map-media img{ width: 100%; height: 100%; object-fit: cover; }
.feature-map-body{ display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); }
.feature-map-body h3{
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
}
.feature-map-body p:not(.bubble-tag){
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}
.bubble-tag{
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-2);
  opacity: .85;
}

/* ---------- Mirage : projet en vitrine ---------- */
.mirage-section{ padding-block: var(--space-9); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.mirage-inner{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-9);
  align-items: center;
}
.mirage-media{
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.mirage-media img{ width: 100%; height: 100%; object-fit: cover; }
.mirage-badge{
  position: absolute;
  bottom: var(--space-5);
  right: var(--space-5);
  width: 76px; height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.6);
}
.mirage-badge img{
  width: 32px; height: auto;
  animation: spin-cw 7s linear infinite;
}
.mirage-badge-ring{
  position: absolute;
  inset: -10px;
  border: 1px dashed var(--accent-2);
  border-radius: 50%;
  opacity: .5;
  animation: spin-ccw 14s linear infinite;
}
@keyframes spin-cw{ to{ transform: rotate(360deg); } }
@keyframes spin-ccw{ to{ transform: rotate(-360deg); } }
.mirage-body{ display: flex; flex-direction: column; gap: var(--space-4); }
.mirage-body h2{
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
}
.mirage-body p{ color: var(--text-muted); font-size: 1rem; line-height: 1.65; }

.status-pill{
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  width: fit-content;
  padding: .5em 1.1em;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text);
}
.status-dot{
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-1);
  box-shadow: 0 0 0 0 var(--accent-1-soft);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot{
  0%, 100%{ box-shadow: 0 0 0 0 var(--accent-1-soft); }
  50%{ box-shadow: 0 0 0 6px transparent; }
}

/* ---------- Sous-pages : hero réduit (Mirage, Contact, Réseaux) ---------- */
.page-hero-compact{ min-height: 62vh; }

/* ---------- Page Mirage : bulle résumé ---------- */
.resume-section{ padding-block: var(--space-9) var(--space-8); }
.resume-card{
  max-width: 760px;
  margin-inline: auto;
  padding: var(--space-7);
  border-radius: var(--radius-lg);
}
.resume-card .eyebrow{ margin-bottom: var(--space-4); }
.resume-card p:not(.eyebrow){
  font-size: 1.08rem;
  line-height: 1.75;
  color: rgba(237,237,243,0.88);
}

/* ---------- Page Mirage : fiche technique ---------- */
.spec-section{ position: relative; padding-block: var(--space-6) var(--space-9); overflow: hidden; }
.spec-section .spec-grid{ position: relative; z-index: 1; }
.spec-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.spec-item{ border-top: 1px solid var(--border); padding-top: var(--space-3); }
.spec-label{
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}
.spec-value{
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

/* ---------- Page Mirage : carnet d'écriture ---------- */
.notes-section{ padding-block: var(--space-9); border-top: 1px solid var(--border); }
.notes-grid{ max-width: 760px; margin-inline: auto; }
.dev-note{ padding-top: var(--space-6); border-top: 1px solid var(--border); }
.dev-note:first-child{ border-top: none; padding-top: 0; }
.dev-note + .dev-note{ margin-top: var(--space-6); }
.dev-note .eyebrow{ color: var(--accent-1); margin-bottom: var(--space-3); }
.dev-note p:not(.eyebrow){ color: var(--text-muted); font-size: 1rem; line-height: 1.75; }

/* ---------- Page Mirage : CTA de fin ---------- */
.mirage-cta{ padding-block: var(--space-9) var(--space-10); text-align: center; }
.mirage-cta-inner{ max-width: 640px; }
.mirage-cta h2{
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: var(--space-4);
}
.mirage-cta p{ color: var(--text-muted); font-size: 1.05rem; margin-bottom: var(--space-6); }
.mirage-cta .hero-actions{ justify-content: center; }

/* ---------- Page Maps ---------- */
.maps-section{ padding-block: var(--space-8) var(--space-6); }

.map-featured{ position: relative; }
.map-featured-tag{
  display: inline-flex;
  align-items: center;
  gap: .5em;
  width: fit-content;
  padding: .4em 1em;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  color: #05060a;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
}

.maps-grid-section{ position: relative; padding-block: var(--space-6) var(--space-10); overflow: hidden; }
.maps-grid-section > .section-inner{ position: relative; z-index: 1; }
.maps-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.map-card{
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: transform .4s var(--ease), border-color .4s, background .4s;
}
.map-card:hover{
  transform: translateY(-6px);
  border-color: var(--border-strong);
  background: var(--bg-elevated-strong);
}
.map-card-media{
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.map-card-media img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.map-card-media::after{
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 60%;
  background: linear-gradient(to bottom, transparent, rgba(7,8,13,.85) 75%, rgba(7,8,13,.98));
  pointer-events: none;
}
.map-card-body{
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  margin-top: -2.5rem;
  position: relative;
  flex: 1;
}
.map-card-body h3{
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
}
.map-card-body p:not(.bubble-tag){
  color: var(--text-muted);
  font-size: .92rem;
  line-height: 1.6;
  flex: 1;
}

/* Code d'île copiable (carte vedette + grille) */
.map-code{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}
.map-code-label{
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.map-code-label span:first-child{
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.map-code-value{
  font-family: var(--font-mono);
  font-size: .88rem;
  letter-spacing: .01em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-code-copy{
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: .45em .9em;
  transition: color .25s, border-color .25s, background .25s;
  white-space: nowrap;
}
.map-code-copy:hover{ color: var(--text); border-color: var(--accent-2); background: var(--bg-elevated); }
.map-code-copy.is-copied{ color: #05060a; background: var(--accent-2); border-color: var(--accent-2); }

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

/* ---------- Pages légales (Mentions légales / Confidentialité) ---------- */
.legal-section{ position: relative; padding-block: var(--space-8) var(--space-10); overflow: hidden; }
.legal-section > .section-inner{ position: relative; z-index: 1; }
.legal-card{
  max-width: 760px;
  margin-inline: auto;
  padding: var(--space-8);
  border-radius: var(--radius-lg);
}
.legal-updated{
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}
.legal-card h2{
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-top: var(--space-8);
}
.legal-card > h2:first-of-type{ margin-top: 0; }
.legal-card h3{
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
  margin-top: var(--space-6);
}
.legal-card p{
  color: rgba(237,237,243,0.82);
  font-size: .98rem;
  line-height: 1.75;
  margin-top: var(--space-3);
}
.legal-card ul{
  margin-top: var(--space-3);
  padding-left: 1.3em;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.legal-card li{
  color: rgba(237,237,243,0.82);
  font-size: .98rem;
  line-height: 1.65;
}
.legal-card a{ color: var(--accent-2); text-underline-offset: 3px; }

/* ---------- Page Studio ---------- */
.studio-section{ position: relative; padding-block: var(--space-9) var(--space-10); overflow: hidden; }
.studio-section > .section-inner{ position: relative; z-index: 1; }
.tesseract-mini--studio{
  top: 8%;
  right: 4%;
  width: 260px;
  height: 260px;
  opacity: .55;
}
.scroll-ring{
  position: absolute;
  bottom: 6%;
  left: 5%;
  width: 90px;
  height: 90px;
  border: 1px dashed var(--accent-1);
  border-radius: 50%;
  opacity: .4;
}
.scroll-ring::before{
  content: '';
  position: absolute;
  inset: 18px;
  border: 1px solid var(--accent-2);
  border-radius: 50%;
  opacity: .6;
}
@media (max-width: 900px){
  .tesseract-mini--studio{ width: 170px; height: 170px; top: 2%; right: 2%; }
  .scroll-ring{ width: 60px; height: 60px; }
}
.studio-card{
  max-width: 760px;
  margin-inline: auto;
  padding: var(--space-8);
  border-radius: var(--radius-lg);
}
.studio-text p{
  color: rgba(237,237,243,0.88);
  font-size: 1.05rem;
  line-height: 1.8;
}
.studio-text p + p{ margin-top: var(--space-5); }

/* ---------- Page Contact ---------- */
.contact-section{ position: relative; padding-block: var(--space-9) var(--space-10); overflow: hidden; }
.contact-section > .section-inner{ position: relative; z-index: 1; }
.contact-card{
  max-width: 640px;
  margin-inline: auto;
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  text-align: center;
}
.contact-card p:not(.eyebrow){
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: var(--space-6);
}
.contact-card .hero-actions{ justify-content: center; }
.contact-email{
  font-family: var(--font-mono);
  font-size: 1.05rem;
}

/* ---------- Page Réseaux : hexagone tournant ---------- */
.social-section{ padding-block: var(--space-9) var(--space-10); }

.hex-diagram{
  position: relative;
  width: min(96vw, 900px);
  aspect-ratio: 1;
  margin-inline: auto;
}
.hex-rotate{
  position: absolute;
  inset: 0;
  animation: hex-spin 110s linear infinite;
}
.hex-lines{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.hex-edge{ fill: none; stroke: rgba(255,255,255,.55); stroke-width: .7; }
.hex-edge--inner{ stroke: rgba(255,255,255,.3); stroke-width: .5; }
.hex-spoke{ stroke: rgba(255,255,255,.3); stroke-width: .45; }

.hex-node{
  position: absolute;
  transform: translate(-50%, -50%);
}
.hex-node--1{ top: 14%; left: 50%; }
.hex-node--2{ top: 32%; left: 81.18%; }
.hex-node--3{ top: 68%; left: 81.18%; }
.hex-node--4{ top: 86%; left: 50%; }
.hex-node--5{ top: 68%; left: 18.82%; }
.hex-node--6{ top: 32%; left: 18.82%; }

.hex-node-counter{ animation: hex-counter-spin 110s linear infinite; }

@keyframes hex-spin{ to{ transform: rotate(360deg); } }
@keyframes hex-counter-spin{ to{ transform: rotate(-360deg); } }

.social-bubble{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  width: 148px;
  padding: var(--space-5) var(--space-3);
  border-radius: var(--radius-lg);
  background: #0b0c13;
  border: 1px solid var(--border-strong);
  text-align: center;
  transition: transform .3s var(--ease), border-color .3s, background .3s, box-shadow .3s;
}
.social-bubble:hover{
  transform: scale(1.08);
  border-color: var(--social, var(--accent-2));
  background: #12141e;
  box-shadow: 0 18px 34px -16px var(--social-soft, var(--accent-2-soft));
}
.social-icon{
  width: 52px; height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-elevated-strong);
  color: var(--text);
  transition: color .3s var(--ease);
}
.social-icon svg{ width: 23px; height: 23px; fill: currentColor; }
.social-bubble:hover .social-icon{ color: var(--social, var(--accent-2)); }
.social-name{ font-family: var(--font-display); font-weight: 600; font-size: .88rem; color: var(--text); }

.social-bubble--youtube{ --social: #ff0000; --social-soft: rgba(255,0,0,.2); }
.social-bubble--tiktok{ --social: #25f4ee; --social-soft: rgba(37,244,238,.18); }
.social-bubble--discord{ --social: #5865f2; --social-soft: rgba(88,101,242,.22); }
.social-bubble--fortnite{ --social: var(--accent-2); --social-soft: var(--accent-2-soft); }
.social-bubble--patreon{ --social: #ff424d; --social-soft: rgba(255,66,77,.2); }
.social-bubble--coffee{ --social: #ffdd00; --social-soft: rgba(255,221,0,.2); }

@media (max-width: 640px){
  .hex-diagram{ width: 100%; aspect-ratio: auto; }
  .hex-lines{ display: none; }
  .hex-rotate{
    position: static;
    animation: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
  }
  .hex-node{ position: static; transform: none; }
  .hex-node-counter{ animation: none; }
  .social-bubble{
    width: 100%; max-width: 280px;
    flex-direction: row;
    text-align: left;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
  }
  .social-name{ font-size: .95rem; }
}

/* ---------- Boutons réseaux discrets (footer d'accueil) ---------- */
.social-inline{ display: flex; gap: var(--space-3); margin-top: var(--space-5); }
.social-inline a{
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color .25s, border-color .25s, background .25s;
}
.social-inline svg{ width: 15px; height: 15px; fill: currentColor; }
.social-inline a:hover{ color: var(--text); border-color: var(--accent-2); background: var(--bg-elevated); }

/* ---------- Manifeste ---------- */
.manifesto{
  padding-block: var(--space-9);
  text-align: center;
}
.manifesto p{
  max-width: 880px;
  margin-inline: auto;
  padding-inline: var(--space-6);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-muted);
}
.manifesto span{ color: var(--text); }

/* ---------- Bulles ---------- */
.bubbles{
  position: relative;
  max-width: var(--container);
  margin-inline: auto;
  padding: var(--space-9) var(--space-6) var(--space-10);
  overflow: hidden;
}
.bubble-grid{
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "studio reseaux maps"
    "contact contact contact";
  gap: var(--space-5);
}
.bubble--studio{ grid-area: studio; }
.bubble--reseaux{ grid-area: reseaux; }
.bubble--maps{ grid-area: maps; }
.bubble--contact{ grid-area: contact; }

.bubble{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-7);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .4s, background .4s;
}
.bubble::before{
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), var(--accent-1-soft), transparent 70%);
  opacity: 0;
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
.bubble:hover{
  transform: translateY(-6px);
  border-color: var(--border-strong);
  background: var(--bg-elevated-strong);
}
.bubble:hover::before{ opacity: 1; }

.bubble h3{
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
}
.bubble p:not(.bubble-tag){
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.6;
  flex: 1;
}

.bubble--studio{ position: relative; z-index: 0; }
.bubble--studio .bubble-body{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  height: 100%;
}
.bubble-decor{
  position: absolute;
  top: var(--space-5); right: var(--space-5);
  width: 64px; height: 64px;
  border-radius: 50%;
  overflow: hidden;
  opacity: .55;
  filter: blur(.4px);
  border: 1px solid var(--border-strong);
  z-index: 0;
}
.bubble-decor img{ width: 100%; height: 100%; object-fit: cover; }

.bubble--contact{
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-5);
}
.bubble-contact-text{ max-width: 60ch; }
.bubble-contact-text .bubble-tag{ margin-bottom: var(--space-2); }
.bubble--contact h3{ font-size: 1.5rem; margin-bottom: var(--space-2); }

/* ---------- Pied de page ---------- */
.site-footer{
  border-top: 1px solid var(--border);
  padding-top: var(--space-9);
}
.footer-inner{
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-9);
}
.footer-brand p{
  color: var(--text-muted);
  font-size: .9rem;
  margin-top: var(--space-3);
}
.footer-disclosure{
  max-width: 34ch;
  font-size: .78rem !important;
  line-height: 1.6;
  margin-top: var(--space-4) !important;
}

/* ---------- Mention "Soutenir un créateur" ---------- */
.creator-code{
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text-muted);
}
.creator-code strong{ color: var(--text); font-weight: 600; }
.affiliate-note{
  margin-top: var(--space-6);
  max-width: 640px;
  color: var(--text-muted);
  font-size: .8rem;
  line-height: 1.6;
}
.social-code{
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--text-muted);
  opacity: .85;
}
.footer-nav{
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-9);
}
.footer-col{
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-heading{
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}
.footer-col a{
  color: var(--text-muted);
  font-size: .9rem;
  transition: color .25s;
}
.footer-col a:hover{ color: var(--text); }

.footer-bottom{
  max-width: var(--container);
  margin: var(--space-8) auto 0;
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: .8rem;
  color: var(--text-muted);
}
.footer-legal{ display: flex; gap: var(--space-5); }
.footer-legal a:hover{ color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .site-nav{ display: none; }
  .nav-toggle{ display: flex; }

  .hero-inner{ padding-top: 120px; }
  .hero-panel{ padding: var(--space-6); max-width: 100%; }

  .spec-grid{ grid-template-columns: repeat(2, 1fr); }

  .feature-map{ grid-template-columns: 1fr; }

  .mirage-inner{ grid-template-columns: 1fr; }
  .mirage-media{ order: -1; }

  .bubble-grid{
    grid-template-columns: 1fr;
    grid-template-areas:
      "studio"
      "reseaux"
      "maps"
      "contact";
  }
  .bubble--contact{ flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px){
  .header-inner{ padding-inline: var(--space-4); }
  .hero-inner, .section-inner{ padding-inline: var(--space-4); }
  .footer-inner, .footer-bottom{ padding-inline: var(--space-4); }
}

/* ---------- Accessibilité : mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
