/* bohec.fr — feuille de style unique, polices auto-hébergées */

@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-style: normal;
  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 {
  /* Palette « Arcade », commune à l'accueil, aux salles de jeux et aux pages d'information */
  color-scheme: dark;
  --papier: #0c0d1c;
  --encre: #e9ebf3;
  --gris: #a4a9bf;
  --rec: #ff4fa3;
  --teal: #6fd3c2;
  --violet: #7b5cff;
  --ocre: #ffd23f;
  --rose: #ff4fa3;
  --nuit: #22254a;
  --pellicule: #14162b;

  --display: "Bricolage", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --texte: "Source Serif", Georgia, "Times New Roman", serif;

  --marge: clamp(1.25rem, 5vw, 4rem);
  --mesure: 38rem;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--papier) radial-gradient(ellipse at 50% -10%, #2b2466 0, transparent 60%) no-repeat;
  background-size: 100% 60rem;
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1.125rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--rec); }
:focus-visible { outline: 3px solid var(--rec); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: var(--marge); top: -4rem;
  background: var(--encre); color: var(--papier); padding: .5rem 1rem;
}
.skip:focus { top: 1rem; }

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

/* ---------- Bandeau ---------- */
.bandeau {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem;
  align-items: baseline; justify-content: space-between;
  padding: 1.25rem var(--marge);
  font-family: var(--display);
}
.marque { font-weight: 700; text-decoration: none; font-size: 1.1rem; }
.bandeau ul { display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.bandeau nav a { text-decoration: none; font-weight: 500; }
.bandeau nav a:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(2rem, 8vw, 6rem) var(--marge) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}
h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(4rem, 15vw, 11.5rem);
  line-height: .86;
  letter-spacing: -.045em;
  margin: 0;
}
.intro {
  max-width: 30rem;
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  line-height: 1.5;
  margin: 0;
}

/* La pellicule : cinq cadres verticaux 9:16, un par projet */
.pellicule {
  list-style: none;
  margin: clamp(2rem, 6vw, 4rem) calc(var(--marge) * -1) 0;
  padding: 1.1rem var(--marge);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(7.5rem, 1fr);
  gap: .9rem;
  overflow-x: auto;
  background:
    radial-gradient(circle, var(--papier) 34%, transparent 36%) 0 .35rem / 1.6rem .7rem repeat-x,
    radial-gradient(circle, var(--papier) 34%, transparent 36%) 0 calc(100% - .35rem) / 1.6rem .7rem repeat-x,
    var(--pellicule);
}
.cadre a {
  display: flex; align-items: flex-end;
  aspect-ratio: 9 / 16;
  padding: .6rem .7rem;
  color: #fff;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: .95rem;
  border-radius: 3px;
  transition: transform .25s ease;
}
.cadre a span { background: rgba(10, 11, 25, .55); padding: .05rem .4rem; border-radius: 2px; }
.cadre a:hover, .cadre a:focus-visible { transform: translateY(-4px); color: #fff; }

@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: translateX(2.5rem); }
  to   { opacity: 1; transform: none; }
}

/* Motifs des cadres, réutilisés pour les vignettes */
.cadre--quiz a, .vignette.cadre--quiz {
  background:
    radial-gradient(circle at 50% 42%, var(--ocre) 0 18%, transparent 19%),
    radial-gradient(circle at 50% 42%, transparent 0 26%, rgba(217, 154, 30, .45) 27% 29%, transparent 30%),
    radial-gradient(circle at 50% 42%, transparent 0 36%, rgba(217, 154, 30, .25) 37% 39%, transparent 40%),
    var(--nuit);
}
.cadre--fractale a, .vignette.cadre--fractale {
  background:
    repeating-conic-gradient(from 10deg at 62% 40%, var(--teal) 0 6deg, #0a3c3a 6deg 14deg, #6fd3c2 14deg 16deg),
    var(--teal);
}
.cadre--angles a, .vignette.cadre--angles {
  background:
    linear-gradient(to bottom, #f2b8a0 0 38%, transparent 38%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 1px, transparent 1px 18%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .5) 0 1px, transparent 1px 12%),
    linear-gradient(to bottom, var(--rose), var(--violet));
}
.cadre--ondes a, .vignette.cadre--ondes {
  background:
    repeating-linear-gradient(90deg,
      transparent 0 8%, #fff 8% 10%, transparent 10% 16%, #fff 16% 18%,
      transparent 18% 22%, #fff 22% 24%, transparent 24% 30%) center / 100% 40% no-repeat,
    var(--violet);
}
.cadre--voix a, .vignette.cadre--voix {
  background:
    repeating-radial-gradient(circle at 30% 60%, var(--rec) 0 4px, #2a0e0b 4px 14px);
}

/* ---------- Sections ---------- */
main > section:not(.hero) {
  padding: clamp(3.5rem, 9vw, 7rem) var(--marge) 0;
}
h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  letter-spacing: -.03em;
  line-height: 1;
  margin: 0 0 2rem;
}
h3 {
  font-family: var(--display);
  font-weight: 650;
  font-size: 1.55rem;
  letter-spacing: -.015em;
  line-height: 1.15;
  margin: 0 0 .5rem;
}

.projets { display: grid; gap: clamp(2rem, 4vw, 3rem); }
.projets h2 { margin-bottom: 0; }

.projet {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, var(--mesure));
  gap: 1.5rem;
  align-items: start;
  scroll-margin-top: 1.5rem;
}
.vignette { aspect-ratio: 9 / 16; border-radius: 3px; }
.projet p { margin: 0 0 .6rem; }
.outils { color: var(--gris); font-style: italic; font-size: 1rem; }

.atelier p, .contact p { max-width: var(--mesure); margin: 0 0 1rem; }
.lien-fort {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
}

/* ---------- Jeux (accueil) ---------- */
.rayons { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 2rem 3rem; max-width: 64rem; }
.rayon h3 a { text-decoration: none; }
.rayon h3 a:hover { text-decoration: underline; }
.rayon p { margin: 0 0 .8rem; }
.rayon ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.rayon li a { font-family: var(--display); font-weight: 600; }
.rayon .outils { display: block; font-size: .95rem; }

/* ---------- Pied ---------- */
.pied {
  margin-top: clamp(4rem, 10vw, 8rem);
  padding: 2rem var(--marge) 2.5rem;
  background: var(--pellicule);
  color: #d9dbe6;
  font-size: .95rem;
  display: flex; flex-wrap: wrap; gap: .5rem 2.5rem;
}
.pied p { margin: 0; }
.pied a:hover { color: #fff; }

/* ---------- Pages simples (mentions légales, 404) ---------- */
.page-simple { padding: clamp(2rem, 6vw, 5rem) var(--marge); max-width: calc(var(--mesure) + 2 * var(--marge)); }
.page-simple h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); margin-bottom: 2rem; }
.page-simple h2 { font-size: 1.6rem; margin: 2.5rem 0 .75rem; }

@media (max-width: 34rem) {
  .projet { grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; }
  h3 { font-size: 1.3rem; }
}

@media print {
  .pellicule, .skip { display: none; }
  body { background: #fff; color: #000; }
}
