:root {
  --bg: #0d1012;
  --surface: #161b1e;
  --surface-2: #1d2428;
  --ink: #ece5d8;
  --muted: #9b958a;
  --line: rgba(236, 229, 216, 0.11);
  --accent: #e0893a;
  --accent-soft: rgba(224, 137, 58, 0.14);
  --rayon: 10px;
  --titre: "Cinzel", Georgia, serif;
  --texte: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(224, 137, 58, 0.10), transparent 70%),
    var(--bg);
  color: var(--ink);
  font-family: var(--texte);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

.page { max-width: 1280px; margin: 0 auto; padding: 0 16px 80px; }

/* ---------- en-tête */
.entete { padding: 56px 0 28px; }
.retour {
  display: inline-flex; gap: 6px; align-items: center;
  color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 28px;
}
.retour:hover { color: var(--ink); }
.surtitre {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 10px;
}
h1 {
  font-family: var(--titre); font-weight: 600;
  font-size: clamp(36px, 7vw, 72px); line-height: 1.02; margin: 0;
  letter-spacing: .02em;
}
.accroche { color: var(--muted); max-width: 560px; margin: 16px 0 0; font-size: 17px; }
.chiffres { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; }
.chiffres div { font-size: 13px; color: var(--muted); }
.chiffres strong { display: block; font-family: var(--titre); font-size: 26px; color: var(--ink); font-weight: 600; }

/* ---------- filtres */
.filtres {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 8px; overflow-x: auto; padding: 14px 0;
  background: linear-gradient(var(--bg) 75%, transparent);
  scrollbar-width: none;
}
.filtres::-webkit-scrollbar { display: none; }
.filtre {
  flex: none; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); border-radius: 999px; padding: 7px 15px;
  font: 500 14px var(--texte); cursor: pointer;
}
.filtre:hover { color: var(--ink); }
.filtre[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.filtre span { opacity: .6; margin-left: 4px; }

/* ---------- chantiers */
.chantier { margin-top: 44px; scroll-margin-top: 70px; }
.chantier[hidden] { display: none; }
.chantier-tete {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 16px;
}
.chantier-type { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.chantier h2 { font-family: var(--titre); font-weight: 600; font-size: 26px; margin: 0; }
.etiquette {
  font-size: 12px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 10px;
}
.compte { margin-left: auto; color: var(--muted); font-size: 14px; }

.mur { columns: 4 260px; column-gap: 12px; }
.vignette {
  break-inside: avoid; margin: 0 0 12px; border-radius: var(--rayon); overflow: hidden;
  background: var(--surface-2); cursor: zoom-in; position: relative;
  border: 0; padding: 0; width: 100%; display: block;
}
.vignette img { width: 100%; height: auto; transition: transform .5s ease, opacity .4s; opacity: 0; }
.vignette img.charge { opacity: 1; }
.vignette:hover img { transform: scale(1.03); }
.vignette:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- état vide */
.vide {
  margin-top: 40px; padding: 48px 24px; text-align: center;
  border: 1px dashed var(--line); border-radius: 14px; color: var(--muted);
}
.vide h2 { font-family: var(--titre); color: var(--ink); font-weight: 600; margin: 0 0 8px; }

/* ---------- visionneuse */
.visionneuse {
  position: fixed; inset: 0; z-index: 20; background: rgba(6, 8, 9, .94);
  display: none; align-items: center; justify-content: center; padding: 56px 16px 96px;
}
.visionneuse.ouverte { display: flex; }
.visionneuse img { max-height: 100%; max-width: 100%; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.visionneuse .infos {
  position: absolute; left: 16px; right: 16px; bottom: 22px; text-align: center;
  color: var(--muted); font-size: 14px;
}
.visionneuse .infos strong { color: var(--ink); font-weight: 600; }
.bouton-v {
  position: absolute; background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  width: 44px; height: 44px; border-radius: 50%; font-size: 20px; cursor: pointer;
  display: grid; place-items: center;
}
.bouton-v:hover { border-color: var(--accent); }
.fermer { top: 14px; right: 14px; }
.prec { left: 14px; top: 50%; transform: translateY(-50%); }
.suiv { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .prec, .suiv { top: auto; bottom: 64px; transform: none; } }

/* ---------- accueil */
.jeux { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-top: 12px; }
.carte-jeu {
  position: relative; display: block; text-decoration: none; border-radius: 14px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); aspect-ratio: 4 / 3;
}
.carte-jeu img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.carte-jeu:hover img { transform: scale(1.04); }
.carte-jeu .voile {
  position: absolute; inset: 0; padding: 20px; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(transparent 35%, rgba(8, 10, 11, .9));
}
.carte-jeu h2 { font-family: var(--titre); font-weight: 600; font-size: 30px; margin: 0; }
.carte-jeu p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.carte-jeu.a-trier { aspect-ratio: auto; min-height: 140px; border-style: dashed; }
.carte-jeu.a-trier .voile { background: none; }

.pied { margin-top: 64px; color: var(--muted); font-size: 13px; }
