/* bohec.fr — petits jeux, habillage « Arcade » (mêmes couleurs et polices que l'accueil).
   Ancien thème « nuit dorée » recoloré. Polices auto-hébergées (licence SIL OFL). */

@font-face { font-family: "Bricolage"; src: url("../fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url("../fonts/sourceserif.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url("../fonts/sourceserif-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  color-scheme: dark;

  --bg-deep: #0c0d1c;
  --bg-navy: #14162b;
  --purple-deep: #23264a;
  --purple: #7b5cff;
  --purple-bright: #ff4fa3;
  --gold-deep: #b38a00;
  --gold: #ffd23f;
  --gold-light: #ffe680;
  --cream: #e9ebf3;
  --cream-doux: rgba(233, 235, 243, .75);

  --or: linear-gradient(180deg, var(--gold-light) 10%, var(--gold) 55%, var(--gold-deep) 100%);

  --display: "Bricolage", "Arial Narrow", Arial, sans-serif;
  --texte: "Source Serif", Georgia, serif;

  --marge: clamp(1rem, 5vw, 4rem);
  --mesure: 40rem;
  --rayon: 22px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  font-family: var(--texte);
  font-size: 1.05rem;
  line-height: 1.7;
  background:
    radial-gradient(800px 500px at 15% -10%, rgba(255, 79, 163, .35), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, rgba(255, 210, 63, .18), transparent 55%),
    radial-gradient(900px 700px at 50% 110%, rgba(123, 92, 255, .30), transparent 60%),
    var(--bg-deep);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Ciel étoilé (pur CSS) */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
body::before {
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(255, 255, 255, .9), transparent),
    radial-gradient(1px 1px at 90px 120px, rgba(255, 230, 128, .9), transparent),
    radial-gradient(1px 1px at 160px 60px, rgba(255, 255, 255, .7), transparent),
    radial-gradient(1.5px 1.5px at 230px 190px, rgba(255, 255, 255, .8), transparent),
    radial-gradient(1px 1px at 300px 90px, rgba(255, 230, 128, .7), transparent);
  background-size: 340px 240px;
}
body::after {
  background-image:
    radial-gradient(2px 2px at 60px 200px, rgba(255, 230, 128, .9), transparent),
    radial-gradient(1.5px 1.5px at 400px 80px, rgba(255, 255, 255, .9), transparent),
    radial-gradient(1px 1px at 250px 320px, rgba(255, 255, 255, .8), transparent);
  background-size: 520px 420px;
}
@media (prefers-reduced-motion: no-preference) {
  body::after { animation: scintille 3.5s ease-in-out infinite alternate; }
}
@keyframes scintille { from { opacity: .25; } to { opacity: 1; } }

a { color: var(--gold-light); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--cream); }
:focus-visible { outline: 3px solid var(--purple-bright); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: var(--marge); top: -4rem; z-index: 10;
  background: var(--gold); color: var(--bg-deep); padding: .5rem 1rem; border-radius: 999px;
}
.skip:focus { top: 1rem; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Bandeau ---------- */
.bandeau {
  position: sticky; top: 0; z-index: 5;
  display: flex; flex-wrap: wrap; gap: .75rem 2rem;
  align-items: center; justify-content: space-between;
  padding: 1rem var(--marge);
  background: rgba(12, 13, 28, .78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 210, 63, .3);
}
.marque {
  display: inline-flex; align-items: center; gap: .65rem;
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--gold-light);
  text-decoration: none;
  letter-spacing: .04em; font-weight: 800;}
.marque::before {
  content: "VB";
  display: grid; place-items: center;
  width: 2.4rem; height: 2.4rem;
  border-radius: 50%;
  background: var(--or);
  color: #1a1c2c;
  font-size: .8rem;
  box-shadow: 0 0 18px rgba(255, 210, 63, .45);
}
.bandeau ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.bandeau nav a {
  font-weight: 600; font-size: .9rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--cream); text-decoration: none;
}
.bandeau nav a:hover { color: var(--gold-light); }

/* ---------- Hero : cadre à ampoules ---------- */
.hero {
  position: relative;
  margin: clamp(2rem, 6vw, 4rem) var(--marge) 0;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.25rem, 5vw, 4rem) clamp(2rem, 5vw, 3.5rem);
  border-radius: 28px;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(255, 79, 163, .18), transparent 70%),
    linear-gradient(180deg, var(--bg-navy), #0a0820);
  border: 2px solid var(--gold);
  box-shadow: 0 0 40px rgba(255, 210, 63, .25), inset 0 0 60px rgba(123, 92, 255, .25);
  text-align: center;
}
/* Rangée d'ampoules qui suit le cadre */
.hero::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 34px;
  border: 12px dotted var(--gold-light);
  filter: drop-shadow(0 0 6px rgba(255, 230, 128, .9));
  pointer-events: none;
  opacity: .9;
}
@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: ampoules 1.4s steps(2, jump-none) infinite; }
}
@keyframes ampoules { from { opacity: 1; } to { opacity: .55; } }

.surtitre {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: clamp(.75rem, 1.6vw, .95rem);
  letter-spacing: .3em;
  color: var(--gold-light); font-weight: 800;}
.surtitre::before { content: "✦  "; }
.surtitre::after { content: "  ✦"; }

h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.8rem, 10vw, 7rem);
  line-height: .95;
  letter-spacing: .01em;
  margin: 0;
  /* dégradé répété ligne par ligne : chaque ligne du titre a le même éclat doré */
  background: linear-gradient(180deg, #ffffff 8%, var(--gold-light) 30%, var(--gold) 62%, #b38a00 100%) 0 0 / 100% .95em repeat-y;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* ombre via filter : un text-shadow ternirait le dégradé doré */
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .45)) drop-shadow(0 0 22px rgba(255, 210, 63, .3));
}
.intro {
  max-width: 34rem;
  margin: 1.5rem auto 0;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--cream-doux);
}

/* La pellicule : cinq cadres 9:16, perforations dorées */
.pellicule {
  list-style: none;
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  padding: 1.15rem 1rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(6.5rem, 1fr);
  gap: .9rem;
  overflow-x: auto;
  border-radius: 14px;
  background:
    radial-gradient(circle, rgba(255, 230, 128, .55) 30%, transparent 34%) 0 .3rem / 1.4rem .6rem repeat-x,
    radial-gradient(circle, rgba(255, 230, 128, .55) 30%, transparent 34%) 0 calc(100% - .3rem) / 1.4rem .6rem repeat-x,
    #030209;
  border: 1px solid rgba(255, 210, 63, .35);
}
.cadre a {
  display: flex; align-items: flex-end; justify-content: center;
  aspect-ratio: 9 / 16;
  padding: .6rem;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--display);
  font-size: .8rem;
  letter-spacing: .05em;
  border-radius: 8px;
  outline: 1px solid rgba(255, 210, 63, .4);
  transition: transform .25s ease, box-shadow .25s ease; font-weight: 800;}
.cadre a span { background: rgba(12, 13, 28, .7); padding: .1rem .5rem; border-radius: 999px; }
.cadre a:hover, .cadre a:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 10px 26px rgba(255, 210, 63, .35);
  color: var(--gold-light);
}

@media (prefers-reduced-motion: no-preference) {
  .cadre { animation: entree .7s cubic-bezier(.2, .7, .2, 1) both; }
  .cadre:nth-child(2) { animation-delay: .08s; }
  .cadre:nth-child(3) { animation-delay: .16s; }
  .cadre:nth-child(4) { animation-delay: .24s; }
  .cadre:nth-child(5) { animation-delay: .32s; }
}
@keyframes entree {
  from { opacity: 0; transform: translateY(1.5rem); }
  to   { opacity: 1; transform: none; }
}

/* Motifs des cadres (palette nuit / or / violet), réutilisés pour les vignettes */
.cadre--quiz a, .vignette.cadre--quiz {
  background:
    radial-gradient(circle at 50% 42%, var(--gold) 0 18%, transparent 19%),
    radial-gradient(circle at 50% 42%, transparent 0 26%, rgba(255, 210, 63, .45) 27% 29%, transparent 30%),
    radial-gradient(circle at 50% 42%, transparent 0 36%, rgba(255, 210, 63, .25) 37% 39%, transparent 40%),
    var(--purple-deep);
}
.cadre--fractale a, .vignette.cadre--fractale {
  background:
    repeating-conic-gradient(from 10deg at 62% 40%, var(--purple) 0 6deg, #12082a 6deg 14deg, var(--gold-light) 14deg 16deg),
    var(--purple);
}
.cadre--angles a, .vignette.cadre--angles {
  background:
    linear-gradient(to bottom, rgba(255, 230, 128, .85) 0 38%, transparent 38%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .35) 0 1px, transparent 1px 18%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .35) 0 1px, transparent 1px 12%),
    linear-gradient(to bottom, var(--purple-bright), var(--purple-deep));
}
.cadre--ondes a, .vignette.cadre--ondes {
  background:
    repeating-linear-gradient(90deg,
      transparent 0 8%, var(--gold-light) 8% 10%, transparent 10% 16%, var(--gold-light) 16% 18%,
      transparent 18% 22%, var(--gold-light) 22% 24%, transparent 24% 30%) center / 100% 40% no-repeat,
    var(--purple);
}
.cadre--voix a, .vignette.cadre--voix {
  background: repeating-radial-gradient(circle at 30% 60%, var(--gold) 0 4px, var(--purple-deep) 4px 14px);
}

/* ---------- Sections ---------- */
main > section:not(.hero) {
  padding: clamp(4rem, 9vw, 7rem) var(--marge) 0;
  scroll-margin-top: 4rem;
}
h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.05;
  color: var(--gold-light);
  text-align: center;
  margin: 0 0 2.5rem;
}
h2::before {
  content: "✦  Côté atelier  ✦";
  display: block;
  margin-bottom: .6rem;
  font-size: .8rem;
  letter-spacing: .3em;
  color: var(--gold);
}
#titre-projets::before { content: "✦  Fait maison  ✦"; }
#titre-contact::before { content: "✦  On se parle ?  ✦"; }

h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: .02em;
  color: var(--cream);
  margin: 0 0 .6rem;
}

/* Cartes projets */
.projets { --gap: clamp(1rem, 2.5vw, 1.5rem); }
.projets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: var(--gap);
  max-width: 72rem;
  margin: 0 auto;
}
.projets h2 { grid-column: 1 / -1; margin-bottom: 1rem; }

.projet {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-radius: var(--rayon);
  background: linear-gradient(160deg, rgba(123, 92, 255, .38), rgba(38, 18, 63, .55) 60%, rgba(20, 22, 43, .8));
  border: 1px solid rgba(255, 210, 63, .35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  scroll-margin-top: 5rem;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.projet:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .45), 0 0 24px rgba(255, 210, 63, .2);
}
.vignette {
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  outline: 2px solid rgba(255, 230, 128, .55);
  outline-offset: 3px;
}
.projet p { margin: 0 0 .7rem; color: var(--cream-doux); }
.outils {
  display: inline-block;
  font-size: .75rem !important;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-light) !important;
  padding: .3rem .8rem;
  border: 1px solid rgba(255, 210, 63, .45);
  border-radius: 999px;
  background: rgba(12, 13, 28, .4);
}

/* Atelier et contact : panneaux centrés */
.atelier, .contact { text-align: center; }
.atelier p, .contact p { max-width: var(--mesure); margin: 0 auto 1rem; color: var(--cream-doux); }

/* Bouton doré, comme « Confirmer ma présence » */
.lien-fort {
  display: inline-block;
  margin-top: .75rem;
  padding: 1rem 2rem;
  border-radius: 14px;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: .05em;
  color: #1a1c2c;
  text-decoration: none;
  background: var(--or);
  box-shadow: 0 8px 22px rgba(255, 210, 63, .35), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .2s ease, box-shadow .2s ease; font-weight: 800;}
.lien-fort:hover {
  color: #1a1c2c;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 210, 63, .5), inset 0 1px 0 rgba(255, 255, 255, .5);
}

/* ---------- Pied ---------- */
.pied {
  margin-top: clamp(5rem, 10vw, 8rem);
  padding: 2rem var(--marge) 2.5rem;
  border-top: 1px solid rgba(255, 210, 63, .3);
  background: rgba(3, 2, 9, .8);
  color: rgba(233, 235, 243, .6);
  font-size: .85rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 2.5rem;
  text-align: center;
}
.pied p { margin: 0; }

/* ---------- Pages simples (mentions légales, 404) ---------- */
.page-simple {
  margin: clamp(2rem, 6vw, 4rem) auto;
  padding: clamp(1.5rem, 5vw, 3rem);
  max-width: calc(var(--mesure) + 6rem);
  border-radius: var(--rayon);
  background: linear-gradient(160deg, rgba(123, 92, 255, .3), rgba(20, 22, 43, .85));
  border: 1px solid rgba(255, 210, 63, .35);
}
.page-simple h1 { font-size: clamp(2rem, 7vw, 3.5rem); margin-bottom: 2rem; }
.page-simple h2 { font-size: 1.3rem; text-align: left; margin: 2.5rem 0 .75rem; }
.page-simple h2::before { content: none; }
.page-simple p { color: var(--cream-doux); }

@media (max-width: 34rem) {
  .bandeau { justify-content: center; }
  .bandeau ul { gap: .4rem 1rem; }
  .bandeau nav a { letter-spacing: .06em; font-size: .82rem; }
  .hero::before { border-width: 9px; inset: -5px; }
  .surtitre { letter-spacing: .14em; }
  .projet { grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; }
  h3 { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .pellicule, .skip, body::before, body::after, .hero::before { display: none; }
  body { background: #fff; color: #000; }
  h1, h2, h3 { color: #000; background: none; -webkit-text-fill-color: #000; }
}

/* =====================================================================
   Accueil « jeux » : boutons du haut, cartes de jeux
   ===================================================================== */
.boutons {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem;
  margin: 2.25rem 0 0;
}
.boutons .lien-fort { margin-top: 0; }
.bouton-contour {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 14px;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: .05em;
  color: var(--cream);
  text-decoration: none;
  background: rgba(20, 22, 43, .6);
  border: 1px solid rgba(255, 210, 63, .45);
  transition: border-color .2s ease, color .2s ease; font-weight: 800;}
.bouton-contour:hover { color: var(--gold-light); border-color: var(--gold); }

.jeux {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
  max-width: 64rem;
  margin: 0 auto;
}
.jeux h2 { grid-column: 1 / -1; margin-bottom: 1rem; }
#titre-jeux::before { content: "✦  À vous de jouer  ✦"; }

.carte-jeu {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-radius: var(--rayon);
  color: var(--cream);
  text-decoration: none;
  background: linear-gradient(160deg, rgba(123, 92, 255, .38), rgba(38, 18, 63, .55) 60%, rgba(20, 22, 43, .8));
  border: 1px solid rgba(255, 210, 63, .35);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
a.carte-jeu:hover, a.carte-jeu:focus-visible {
  color: var(--cream);
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .45), 0 0 24px rgba(255, 210, 63, .25);
}
.carte-jeu p { margin: 0 0 1rem; color: var(--cream-doux); }
.carte-jeu--bientot { opacity: .7; }

.vignette-jeu {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  outline: 2px solid rgba(255, 230, 128, .55);
  outline-offset: 3px;
}
.vignette-jeu--memoire {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .3rem;
  background: radial-gradient(circle at 50% 30%, rgba(255, 79, 163, .45), transparent 70%), var(--bg-navy);
  font-family: var(--display);
  color: var(--gold-light);
  line-height: 1; font-weight: 800;}
.vignette-jeu--memoire span:nth-child(1) { font-size: 1.1rem; opacity: .55; }
.vignette-jeu--memoire span:nth-child(2) { font-size: 1.35rem; opacity: .8; }
.vignette-jeu--memoire span:nth-child(3) { font-size: 1.6rem; }
.vignette-jeu--quiz {
  background:
    radial-gradient(circle at 50% 45%, var(--gold) 0 16%, transparent 17%),
    radial-gradient(circle at 50% 45%, transparent 0 25%, rgba(255, 210, 63, .45) 26% 28%, transparent 29%),
    radial-gradient(circle at 50% 45%, transparent 0 35%, rgba(255, 210, 63, .25) 36% 38%, transparent 39%),
    var(--purple-deep);
}

.badge {
  display: inline-block;
  padding: .45rem 1.1rem;
  border-radius: 999px;
  font-family: var(--display);
  font-size: .8rem;
  letter-spacing: .06em;
  color: #1a1c2c;
  background: var(--or); font-weight: 800;}
.badge--bientot {
  color: var(--gold-light);
  background: transparent;
  border: 1px solid rgba(255, 210, 63, .5);
}

@media (max-width: 34rem) {
  .carte-jeu { grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; }
  .vignette-jeu--memoire span:nth-child(1) { font-size: .75rem; }
  .vignette-jeu--memoire span:nth-child(2) { font-size: .9rem; }
  .vignette-jeu--memoire span:nth-child(3) { font-size: 1.05rem; }
  .boutons a { width: 100%; }
}
.vignette-jeu--quizz {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .2rem;
  background: radial-gradient(circle at 50% 70%, rgba(255, 210, 63, .35), transparent 65%), var(--purple-deep);
  font-family: var(--display); line-height: 1; font-weight: 800;}
.vignette-jeu--quizz span:first-child { font-size: 1.3rem; color: var(--cream); }
.vignette-jeu--quizz span:last-child { font-size: 2.4rem; color: var(--gold-light); }
@media (max-width: 34rem) {
  .vignette-jeu--quizz span:first-child { font-size: .9rem; }
  .vignette-jeu--quizz span:last-child { font-size: 1.6rem; }
}

/* =====================================================================
   Musique (Skyrebels)
   ===================================================================== */
#titre-musique::before { content: "✦  Skyrebels  ✦"; }
.panneau-musique {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 28px;
  text-align: center;
  background:
    radial-gradient(420px 220px at 50% 0%, rgba(255, 79, 163, .3), transparent 70%),
    linear-gradient(180deg, var(--bg-navy), #0a0820);
  border: 1px solid rgba(255, 210, 63, .45);
  box-shadow: 0 0 36px rgba(255, 210, 63, .15);
}
.panneau-musique p { margin: 0 auto 1rem; max-width: 32rem; color: var(--cream-doux); }
.panneau-musique .boutons { margin-top: 1.5rem; max-width: none; }
.nom-artiste {
  font-family: var(--display);
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1;
  color: var(--gold-light) !important;
  text-shadow: 0 0 24px rgba(255, 230, 128, .35); font-weight: 800;}
.egaliseur {
  display: flex; justify-content: center; align-items: flex-end; gap: .35rem;
  height: 3rem; margin-bottom: 1rem;
}
.egaliseur span {
  width: .55rem; height: 100%;
  border-radius: 99px;
  background: var(--or);
  transform-origin: bottom;
  transform: scaleY(.5);
}
.egaliseur span:nth-child(1) { transform: scaleY(.35); }
.egaliseur span:nth-child(2) { transform: scaleY(.8); }
.egaliseur span:nth-child(3) { transform: scaleY(.55); }
.egaliseur span:nth-child(4) { transform: scaleY(1); }
.egaliseur span:nth-child(5) { transform: scaleY(.6); }
.egaliseur span:nth-child(6) { transform: scaleY(.85); }
.egaliseur span:nth-child(7) { transform: scaleY(.4); }
@media (prefers-reduced-motion: no-preference) {
  .egaliseur span { animation: egaliseur 1.1s ease-in-out infinite alternate; }
  .egaliseur span:nth-child(2n) { animation-duration: .8s; }
  .egaliseur span:nth-child(3n) { animation-duration: 1.4s; animation-delay: -.4s; }
  .egaliseur span:nth-child(4) { animation-delay: -.7s; }
}
@keyframes egaliseur { from { transform: scaleY(.25); } to { transform: scaleY(1); } }

/* =====================================================================
   Galerie IA (pur CSS : la visionneuse fonctionne sans JavaScript)
   ===================================================================== */
#titre-galerie::before { content: "✦  Images IA  ✦"; }
.intro-section { text-align: center; color: var(--cream-doux); margin: -1.5rem auto 2rem; max-width: 36rem; }
.galerie-vide { text-align: center; color: var(--cream-doux); font-style: italic; }
.galerie-accueil .boutons { margin-top: 2rem; }

.apercu-galerie {
  list-style: none; margin: 0 auto; padding: 0;
  max-width: 64rem;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem;
}
.apercu-galerie:has(> li:nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 34rem) { .apercu-galerie, .apercu-galerie:has(> li:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.apercu-galerie a, .vignette-photo {
  display: block; overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 210, 63, .35);
  background: var(--bg-navy);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.apercu-galerie a { aspect-ratio: 1; }
.apercu-galerie img { width: 100%; height: 100%; object-fit: cover; display: block; }
.apercu-galerie a:hover, .vignette-photo:hover, .vignette-photo:focus-visible {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .45), 0 0 20px rgba(255, 210, 63, .25);
}

/* Page galerie */
.galerie { padding: clamp(2rem, 6vw, 4rem) var(--marge) 0; }
.titre-page { text-align: center; font-size: clamp(2.6rem, 9vw, 5rem); }
.intro-page { text-align: center; color: var(--cream-doux); max-width: 36rem; margin: 1rem auto 2.5rem; }
.galerie-grille {
  list-style: none; margin: 0 auto; padding: 0;
  max-width: 80rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem;
}
.galerie-grille:has(> li:nth-child(4):last-child) { max-width: 52rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vignette-photo { aspect-ratio: 1; }
.vignette-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vignette-photo { scroll-margin-top: 6rem; }

/* Visionneuse : s'ouvre quand l'adresse se termine par #photo-N */
.visionneuse {
  position: fixed; inset: 0; z-index: 30;
  display: none;
  place-items: center;
  padding: 1rem 1rem 5rem;
}
.visionneuse:target { display: grid; }
.visionneuse-fond {
  position: absolute; inset: 0;
  background: rgba(12, 13, 28, .94);
  backdrop-filter: blur(6px);
}
.visionneuse figure {
  position: relative; margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
}
.visionneuse figure img {
  max-width: min(94vw, 1600px); max-height: calc(100vh - 8rem);
  width: auto; height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 210, 63, .5);
  box-shadow: 0 0 50px rgba(255, 210, 63, .2);
}
.visionneuse figcaption { color: var(--cream); font-weight: 600; text-align: center; }
.visionneuse-nav {
  position: absolute; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
  display: flex; align-items: center; gap: .75rem;
  padding: .4rem .6rem; border-radius: 999px;
  background: rgba(20, 22, 43, .9); border: 1px solid rgba(255, 210, 63, .45);
}
.visionneuse-nav a {
  display: grid; place-items: center;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  font-size: 1.5rem; line-height: 1; text-decoration: none;
  color: #1a1c2c; background: var(--or);
}
.visionneuse-nav a.fermer { font-size: 1rem; background: transparent; color: var(--cream); border: 1px solid rgba(233, 235, 243, .35); }
.visionneuse-nav span { min-width: 4.5rem; text-align: center; font-weight: 600; font-size: .9rem; color: var(--cream-doux); }
@media (prefers-reduced-motion: no-preference) {
  .visionneuse:target figure { animation: zoom-in .25s ease-out both; }
}
@keyframes zoom-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* Vignettes des jeux Calcul mental, Paires, Simon */
.vignette-jeu--calcul {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .35rem;
  background: radial-gradient(circle at 50% 35%, rgba(45, 212, 191, .3), transparent 65%), var(--bg-navy);
  font-family: var(--display); line-height: 1; font-weight: 800;}
.vignette-jeu--calcul span:first-child { font-size: 1.5rem; color: var(--gold-light); }
.vignette-jeu--calcul span:last-child { font-size: .85rem; color: var(--cream); padding: .2rem .5rem; border: 1px solid rgba(255, 210, 63, .5); border-radius: 99px; }
.vignette-jeu--paires { position: relative; background: radial-gradient(circle at 50% 50%, rgba(255, 79, 163, .35), transparent 70%), var(--bg-navy); }
.vignette-jeu--paires span {
  position: absolute; width: 46%; aspect-ratio: 3 / 4; top: 26%; border-radius: 8px;
  border: 2px solid var(--gold);
  background: repeating-linear-gradient(45deg, rgba(255, 210, 63, .18) 0 4px, transparent 4px 8px), linear-gradient(160deg, var(--purple), var(--purple-deep));
}
.vignette-jeu--paires span:first-child { left: 10%; transform: rotate(-10deg); }
.vignette-jeu--paires span:last-child { right: 10%; transform: rotate(8deg); background: linear-gradient(160deg, #ffe680, #ffd23f 60%, #b38a00); }
.vignette-jeu--simon {
  background:
    radial-gradient(circle, var(--bg-deep) 0 17%, var(--gold) 18% 21%, transparent 22%),
    conic-gradient(from -90deg, #ffd23f 0 25%, #ff4fa3 0 50%, #2dd4bf 0 75%, #ff6b8a 0);
  -webkit-mask: radial-gradient(circle, #000 0 64%, transparent 65%);
          mask: radial-gradient(circle, #000 0 64%, transparent 65%);
  outline: none;
}
@media (max-width: 34rem) {
  .vignette-jeu--calcul span:first-child { font-size: 1rem; }
  .vignette-jeu--calcul span:last-child { font-size: .6rem; }
}

/* Vignette Trace-moi */
.vignette-jeu--trace { display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(123, 92, 255, .4), transparent 70%), var(--bg-deep); }
.vignette-jeu--trace svg { width: 85%; height: 85%; overflow: visible; }
.vignette-jeu--trace path, .vignette-jeu--trace circle { fill: none; stroke-width: 6; stroke-linecap: round; }
.vignette-jeu--trace .t1 { stroke: #ffe680; filter: drop-shadow(0 0 4px #ffe680); }
.vignette-jeu--trace .t2 { stroke: #c084fc; filter: drop-shadow(0 0 4px #c084fc); }
@media (prefers-reduced-motion: no-preference) {
  .vignette-jeu--trace .t1, .vignette-jeu--trace .t2 { stroke-dasharray: 120; stroke-dashoffset: 120; animation: trace-dessin 3s ease-in-out infinite; }
  .vignette-jeu--trace .t2 { animation-delay: 1s; }
}
@keyframes trace-dessin { 0% { stroke-dashoffset: 120; } 45%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -120; } }


/* =====================================================================
   Habillage « Arcade » : bandeau, titres et boutons comme sur l'accueil
   ===================================================================== */
body { background: #0c0d1c radial-gradient(ellipse at 50% -10%, #2b2466 0, transparent 60%) no-repeat; background-size: 100% 60rem; background-attachment: scroll; }
body::before { display: none; }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50; background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px); }
.bandeau { background: rgba(12, 13, 28, .85); border-bottom: 1px solid #23264a; }
.marque { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.marque::before { display: none; }
.bandeau nav a { font-family: var(--display); font-weight: 600; letter-spacing: .08em; color: #a4a9bf; }
.bandeau nav a:hover, .bandeau nav a[aria-current] { color: #ffd23f; }
h1 {
  font-weight: 800; text-transform: uppercase; letter-spacing: -.02em;
  background: linear-gradient(180deg, #fff 0 45%, #ff4fa3 60%, #7b5cff) 0 0 / 100% .95em repeat-y;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 79, 163, .35));
}
h2, h3, .surtitre { font-weight: 800; }
.surtitre { color: #ffd23f; letter-spacing: .3em; }
.surtitre::before, .surtitre::after { content: " ● "; }
.lien-fort {
  font-weight: 800; text-transform: uppercase; letter-spacing: .08em; border-radius: .4rem;
  background: #ffd23f; color: #1a1c2c; box-shadow: 0 5px 0 #b38a00;
}
.lien-fort:hover { color: #1a1c2c; transform: translateY(2px); box-shadow: 0 3px 0 #b38a00; }
.bouton-contour {
  font-weight: 800; text-transform: uppercase; letter-spacing: .08em; border-radius: .4rem;
  background: transparent; border: 0; box-shadow: inset 0 0 0 2px #6b6f9a; color: #e9ebf3;
}
.bouton-contour:hover { color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.pied { border-top: 1px solid #23264a; color: #8b90b0; }
/* Plateau façon « cartouche » de l'accueil */
.plateau { border: 0 !important; border-radius: .8rem !important; background: radial-gradient(500px 260px at 50% 0%, rgba(255, 79, 163, .14), transparent 70%), #14162b !important; box-shadow: 0 0 0 1px #2c2f52, 0 0 40px -10px rgba(255, 79, 163, .45), 0 20px 40px -20px #000 !important; }
