/* Éden Blues — site du jeu. Mêmes polices et mêmes couleurs que le jeu. */
@font-face { font-family: "Anton"; src: url("fonts/anton.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/garamond.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/garamond-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/garamond-italic.woff2") format("woff2"); font-style: italic; font-weight: 500; font-display: swap; }
@font-face { font-family: "Special Elite"; src: url("fonts/elite.woff2") format("woff2"); font-display: swap; }

:root {
  color-scheme: dark;
  --nuit: #0c1b25;        /* fond des écrans du jeu */
  --abysse: #060d13;      /* le vide, à gauche de Boca */
  --creme: #f3ead8;       /* le titre */
  --ocre: #e0a845;        /* « d'après le roman… » */
  --cuivre: #d7b783;      /* filets des cases */
  --recitatif: #f1dc98;   /* encadrés narratifs */
  --encre: #000;
  --voile: #8fb0d8;       /* voiles bleues de l'Éden */
  --texte: #e4dccb;
  --discret: #a99f8c;
  --mesure: 38rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--nuit); color: var(--texte);
  font: 400 1.1875rem/1.6 "EB Garamond", Georgia, serif;
  font-variant-numeric: oldstyle-nums;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ocre); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--creme); }
:focus-visible { outline: 3px solid var(--ocre); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saut { position: absolute; left: 1rem; top: -4rem; background: var(--recitatif); color: var(--encre); padding: .5rem 1rem; z-index: 10; }
.saut:focus { top: 1rem; }

/* ——— En-tête ——— */
.entete {
  position: absolute; inset: 0 0 auto 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  font-family: "Special Elite", monospace; font-size: .95rem;
}
.entete a { color: var(--creme); text-decoration: none; }
.entete a:hover { color: var(--ocre); }
.entete .marque { font-family: "Anton", sans-serif; font-size: 1.35rem; letter-spacing: .02em; white-space: nowrap; }
@media (max-width: 34rem) {
  .entete { font-size: .85rem; }
  .entete nav { gap: .7rem; }
  .entete nav a.option { display: none; }
}
.entete nav { display: flex; gap: clamp(.8rem, 2.5vw, 2rem); flex-wrap: wrap; justify-content: flex-end; }
.page-simple .entete { position: static; background: var(--abysse); border-bottom: 1px solid #1d2f3b; }

/* ——— Ouverture : l'écran-titre du jeu ——— */
.ouverture {
  position: relative; min-height: min(100svh, 62rem); overflow: hidden;
  display: grid; align-items: center; background: var(--abysse);
}
.ouverture picture img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 72% 50%;
}
.ouverture::after { /* le vide garde le texte lisible */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6,13,19,.92) 0%, rgba(6,13,19,.55) 38%, rgba(6,13,19,0) 62%);
}
@media (max-width: 48rem) {
  .ouverture::after { background: linear-gradient(180deg, rgba(6,13,19,.45) 0%, rgba(6,13,19,.82) 55%, rgba(6,13,19,.9) 100%); }
}
.ouverture .contenu { position: relative; z-index: 2; padding: 7rem clamp(1rem, 6vw, 6rem) 4rem; max-width: 52rem; }
.titre {
  margin: 0; text-transform: uppercase; font: 400 clamp(4.2rem, 14vw, 11.5rem)/.9 "Anton", Impact, sans-serif;
  color: var(--creme); letter-spacing: .005em; text-shadow: .06em .06em 0 var(--encre);
  animation: apparition 1.6s cubic-bezier(.2,.7,.2,1) both;
}
.d-apres {
  margin: .9rem 0 0; font: italic 500 clamp(1.35rem, 3vw, 2.1rem)/1.2 "EB Garamond", serif; color: var(--ocre);
  animation: apparition 1.6s .35s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes apparition { from { opacity: 0; transform: translateY(.4rem); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .titre, .d-apres { animation: none; } }

/* L'encadré narratif, comme dans les cases du jeu */
.recitatif {
  background: var(--recitatif); color: #1a1408; border: 2px solid var(--encre);
  box-shadow: 4px 4px 0 var(--encre);
  font-style: italic; font-weight: 500; padding: .7rem 1rem; line-height: 1.45;
}
.ouverture .recitatif { margin: 2rem 0 0; max-width: 31rem; font-size: 1.15rem; }

.actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.bouton {
  display: inline-block; font: 1.12rem/1.2 "Special Elite", monospace; text-decoration: none; text-align: center;
  color: var(--creme); background: rgba(5,9,13,.88); border: 1.5px solid #8d8678; border-radius: 6px;
  padding: .85rem 1.5rem; min-width: 13rem;
}
.bouton:hover { color: var(--encre); background: var(--creme); border-color: var(--creme); }
.bouton.principal { background: var(--ocre); color: var(--encre); border-color: var(--ocre); }
.bouton.principal:hover { background: var(--creme); border-color: var(--creme); }
.precision { margin: 1rem 0 0; font-size: .98rem; color: var(--discret); }

/* ——— Sections ——— */
main > section { padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1rem, 5vw, 4rem); }
.large { max-width: 74rem; margin: 0 auto; }
h2 {
  margin: 0 0 1.5rem; font: 400 clamp(2.2rem, 5.5vw, 3.6rem)/1 "Anton", Impact, sans-serif;
  color: var(--creme); letter-spacing: .01em;
}
h3 { margin: 0 0 .35rem; font-weight: 700; font-size: 1.2rem; line-height: 1.3; }
.prose { max-width: var(--mesure); }
.prose p { margin: 0 0 1.05rem; }
.chapeau { font-size: 1.35rem; line-height: 1.5; color: var(--creme); }

.histoire { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 60rem) { .histoire { grid-template-columns: minmax(0, 36rem) minmax(0, 1fr); } }

/* ——— La planche : les cases du jeu, comme une page de BD ——— */
.planche-section { background: var(--abysse); }
.planche {
  display: grid; gap: 14px; grid-template-columns: repeat(6, minmax(0, 1fr));
  background: var(--abysse);
}
.case {
  position: relative; margin: 0; border: 3px solid var(--encre); outline: 1px solid var(--cuivre);
  background: var(--encre); grid-column: span 6; display: flex; flex-direction: column;
}
.case img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; flex: 1 1 auto; min-height: 0; }
.case figcaption { border-width: 2px 0 0; box-shadow: none; flex: none; }
.case figcaption h3 { font-style: normal; margin-bottom: .15rem; }
.case figcaption p { margin: 0; font-size: 1rem; }
@media (min-width: 48rem) {
  .case.l { grid-column: span 4; } .case.m { grid-column: span 3; } .case.s { grid-column: span 2; }
  .case.s img { aspect-ratio: auto; }
}
.histoire .case { grid-column: auto; }

/* ——— Téléchargements ——— */
.telechargements { list-style: none; padding: 0; margin: 2rem 0 0; border-top: 1px solid #2a3c48; }
.plateforme {
  display: grid; gap: .4rem 2rem; align-items: center; padding: 1.4rem 0 1.4rem 1rem;
  border-bottom: 1px solid #2a3c48; border-left: 4px solid transparent;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 52rem) { .plateforme { grid-template-columns: 13rem minmax(0, 1fr) auto; } }
.plateforme .nom { font: 400 1.9rem/1 "Anton", Impact, sans-serif; color: var(--creme); }
.plateforme .detail { font-size: 1.02rem; }
.plateforme .detail p { margin: 0; }
.plateforme .fichier { color: var(--discret); font-size: .95rem; }
.plateforme .liens { display: flex; flex-wrap: wrap; gap: .6rem; }
.plateforme .bouton { min-width: 0; padding: .7rem 1.1rem; font-size: 1rem; }
.plateforme.conseille { border-left-color: var(--ocre); background: linear-gradient(90deg, rgba(224,168,69,.09), transparent 60%); }
.conseil { display: none; font: .9rem "Special Elite", monospace; color: var(--ocre); margin-top: .5rem; }
.plateforme.conseille .conseil { display: block; }
.empreintes { margin-top: 1.4rem; font-size: 1rem; color: var(--discret); }

/* ——— Questions ——— */
.questions details { border-bottom: 1px solid #2a3c48; padding: 1rem 0; max-width: 46rem; }
.questions summary { cursor: pointer; font-weight: 700; color: var(--creme); font-size: 1.15rem; list-style-position: outside; }
.questions summary::marker { color: var(--ocre); }
.questions details p, .questions details ol, .questions details ul { margin: .6rem 0 0; }
.questions code, .prose code { font-family: "Special Elite", monospace; font-size: .92em; color: var(--recitatif); word-break: break-word; }

/* ——— Pied de page ——— */
.pied { background: var(--abysse); border-top: 1px solid #1d2f3b; padding: 3rem clamp(1rem, 5vw, 4rem) 2.5rem; font-size: 1rem; }
.pied .colonnes { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 52rem) { .pied .colonnes { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); } }
.pied h2 { font-size: 1.5rem; margin-bottom: .8rem; }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied li { margin: 0 0 .55rem; }
.pied .projets a { font-weight: 700; }
.pied .projets span { color: var(--discret); }
.pied .bas { margin-top: 2.5rem; color: var(--discret); font-size: .95rem; }

/* ——— Pages simples (confidentialité, mentions) ——— */
.page-simple main { padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 5vw, 4rem); }
.page-simple main .prose { margin: 0 auto; }
.page-simple h1 { font: 400 clamp(2.2rem, 6vw, 3.4rem)/1.05 "Anton", Impact, sans-serif; color: var(--creme); margin: 0 0 1rem; }
.page-simple h2 { font-size: 1.7rem; margin: 2.2rem 0 .7rem; }
.maj { color: var(--discret); }
