/*
 * Nouvelle galerie publique CJV (cjv/galerie/). Base commune, puis cinq designs
 * sous body[data-cjvg="…"] : vitrine, magazine, index, arcade, album.
 * Marges, retraits et tailles de police en em (16px = 1em) ; la galerie prend
 * sa propre base de 16px (le body du thème varie de 10 à 20px).
 */

/* ─── Base ─────────────────────────────────────────────────────────────── */
body.cjvg-page { --fond: #fff; --surface: #f4f5f9; --encre: #1f2747; --doux: #5d6585; --accent: #2a3975; --accent2: #ff7476;
  --police: "Inter", system-ui, sans-serif; --titres: var(--police); --rayon: 10px; --carte: 11.5em; --gap: 1.5em; }
body.cjvg-page { background: var(--fond); }
body.cjvg-page article { margin: 2em auto 0 !important; }

.cjvg { font-size: 1rem; max-width: 1240px; margin: 0 auto; padding: 0 1.25em 6em; color: var(--encre); font-family: var(--police); line-height: 1.45; }
.cjvg *, .cjvg-fiche *, .cjvg-barre * { box-sizing: border-box; }
.cjvg a { color: inherit; }
.cjvg [hidden], .cjvg-fiche [hidden] { display: none !important; }

.cjvg-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5em 1.5em; margin-bottom: 1.5em; }
.cjvg-surtitre { margin: 0; font-family: var(--titres); font-size: 0.8em; letter-spacing: 0.14em; text-transform: uppercase; color: var(--doux); }
.cjvg-total { margin: 0; font-family: var(--titres); font-size: 1.1em; }
.cjvg-total strong { font-size: 1.6em; color: var(--accent); }
.cjvg-annees { display: flex; flex-wrap: wrap; gap: 0.4em; margin-left: auto; }
.cjvg-annees a { padding: 0.3em 0.75em; border: 1px solid currentColor; border-radius: 999px; font-size: 0.85em; text-decoration: none; opacity: 0.6; }
.cjvg-annees a[aria-current] { opacity: 1; background: var(--accent); border-color: var(--accent); color: #fff; }
.cjvg-annees a.cjvg-prod::after { content: " •"; color: var(--accent2); }

.cjvg-outils { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75em; margin-bottom: 1em; }
.cjvg-cherche { display: flex; flex-direction: column; gap: 0.25em; flex: 1 1 16em; font-size: 0.8em; color: var(--doux); }
.cjvg-cherche span { letter-spacing: 0.06em; text-transform: uppercase; }
.cjvg-outils input[type="search"], .cjvg-outils select {
  font: inherit; font-size: 1rem; color: var(--encre); background: var(--surface); border: 1px solid transparent; border-radius: var(--rayon);
  padding: 0.6em 0.8em; min-height: 44px; margin: 0; max-width: 100%; }
.cjvg-outils select { flex: 0 1 13em; cursor: pointer; }
.cjvg-outils input[type="search"]:focus, .cjvg-outils select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.cjvg-compte { margin: 0 0 0 auto; font-size: 0.95em; white-space: nowrap; align-self: center; }
.cjvg-compte strong { font-size: 1.3em; color: var(--accent); }
.cjvg-effacer { font: inherit; font-size: 0.85em; background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 0.5em; align-self: center; }

.cjvg-notes { display: flex; flex-wrap: wrap; gap: .75em; margin-bottom: 2em; font-size: 0.8em; line-height: 1.45; color: var(--doux); }
.cjvg-notes p { display: flex; align-items: flex-start; gap: .7em; margin: 0; padding: .75em 1em; background: var(--surface); border-radius: var(--rayon); }
.cjvg-notes p:first-child { flex: 0 1 auto; align-items: center; }
.cjvg-notes p:last-child { flex: 1 1 26em; }
.cjvg-notes svg { flex: none; width: 1.6em; height: 1.6em; color: var(--accent); }

.cjvg-grille { list-style: none; margin: 0 !important; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--carte), 1fr)); gap: var(--gap); }
.cjvg-c { position: relative; margin: 0 !important; padding: 0 !important; list-style: none !important; min-width: 0; cursor: pointer; }
.cjvg-c > a { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.cjvg-p { display: block; position: relative; aspect-ratio: 469 / 768; overflow: hidden; background: var(--surface); border-radius: var(--rayon); }
.cjvg-p img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Forme mesurée de la pochette (gv_pochette_cadre) : boîtier exporté avec des
   marges blanches ou transparentes, rogné en CSS ; image seule qui remplit la case. */
.cjvg-p[data-forme="boitier"] img { object-fit: fill; }
.cjvg-p[data-forme="rogne"] img { position: absolute; max-width: none; object-fit: fill;
  width: calc(100% / var(--cl)); height: calc(100% / var(--ch));
  left: calc(-100% * var(--cx) / var(--cl)); top: calc(-100% * var(--cy) / var(--ch)); }
.cjvg-p[data-forme="art"] img { object-fit: cover; }
.cjvg-sans .cjvg-p::after, .cjvg-f-ecran.cjvg-sans::after { content: attr(data-t); position: absolute; left: 12%; right: 12%; top: 34%; text-align: center; color: #fff;
  font-weight: 800; font-size: 0.85em; line-height: 1.2; text-transform: uppercase; overflow-wrap: anywhere; pointer-events: none; }
.cjvg-t { display: block; margin-top: 0.6em; font-family: var(--titres); font-weight: 700; font-size: 1em; line-height: 1.25; overflow-wrap: anywhere; }
.cjvg-s, .cjvg-e { display: block; font-size: 0.78em; color: var(--doux); }
.cjvg-d { margin: 0.4em 0 0; font-size: 0.82em; color: var(--doux); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cjvg-laureat .cjvg-p::before { content: "🏆"; position: absolute; z-index: 1; top: 0.4em; right: 0.4em; font-size: 1.1em; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.cjvg-c:focus-within { outline: 3px solid var(--accent2); outline-offset: 4px; border-radius: var(--rayon); }
.cjvg-c a:focus { outline: none; }
.cjvg-vide { margin: 3em 0; text-align: center; font-size: 1.1em; color: var(--doux); }

/* Connexion des équipes et des animateur·trices */
.cjvg-connexion { margin-top: 5em; padding: 2em; border-radius: calc(var(--rayon) * 1.5); background: var(--surface); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1em 2.5em; align-items: start; }
.cjvg-cx-tete h2 { margin: 0 0 0.3em; font-family: var(--titres); font-size: 1.5em; font-weight: 700; color: var(--encre); }
.cjvg-cx-tete p { margin: 0; color: var(--doux); font-size: 0.95em; }
.cjvg-cx-onglets { grid-column: 2; display: flex; gap: 0.4em; }
.cjvg-cx-onglets button { font: inherit; font-size: 0.9em; padding: 0.55em 1.1em; border-radius: 999px; border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; min-height: 40px; }
.cjvg-cx-onglets button[aria-selected="true"] { background: var(--accent); color: #fff; }
.cjvg-connexion .section_connexion { grid-column: 2; }
.cjvg-connexion .cjvg-cx-tete { grid-row: 1 / span 2; }
.cjvg-connexion form.formulaire { background: transparent; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75em; overflow: visible; }
.cjvg-connexion form.formulaire label { display: flex; flex-direction: column; font-size: 0.8em; color: var(--doux); gap: 0.25em; }
.cjvg-connexion form.formulaire input[type="text"], .cjvg-connexion form.formulaire input[type="password"] {
  font: inherit; font-size: 1rem; margin: 0 !important; padding: 0.7em 0.8em; border: 1px solid rgba(0,0,0,.15); border-radius: var(--rayon); background: #fff; color: #1f2747; }
.cjvg-connexion form.formulaire input[type="submit"] { grid-column: 1 / -1; justify-self: start; width: auto; margin: 0.25em 0 0 !important; padding: 0.7em 1.8em; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.cjvg-connexion .fjr_ouvrir_ligne { grid-column: 1 / -1; margin: 0; font-size: 0.85em; }
.cjvg-connexion .fjr_ouvrir { text-decoration: underline; }
.cjvg-connexion .reponse_connexion_negative p, .cjvg-connexion .reponse_connexion_trop p { margin: 0.75em 0 0; color: #b3261e; font-weight: 600; }
body.cjvg-connecte .cjvg { display: none; }
.cjvg-espace { max-width: 1240px; margin: 0 auto; padding: 0 1.25em; }

/* Fiche d'un jeu */
.cjvg-fiche { font-size: 1rem; width: min(1180px, 96vw); max-width: none; max-height: 94vh; padding: 0; border: 0; border-radius: calc(var(--rayon) * 1.5);
  background: var(--fond); color: var(--encre); font-family: var(--police); box-shadow: 0 30px 80px rgba(0,0,0,.45); overflow: hidden; }
.cjvg-fiche::backdrop { background: rgba(10, 14, 40, .72); backdrop-filter: blur(3px); }
.cjvg-f-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); max-height: 94vh; overflow: auto; }
.cjvg-f-fermer { position: absolute; z-index: 3; top: 0.5em; right: 0.5em; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 1.6em; line-height: 1; cursor: pointer; }
.cjvg-f-jeu { background: #0b0d1c; display: flex; flex-direction: column; }
.cjvg-f-ecran { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; background: #0b0d1c; }
.cjvg-f-poch { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: .55; filter: blur(0); }
.cjvg-f-ecran.cjvg-sans::after { font-size: 1.4em; top: 40%; }
.cjvg-f-jouer { position: relative; z-index: 1; font: inherit; font-size: 1.3em; font-weight: 800; padding: 0.8em 2em; border: 0; border-radius: 999px; background: var(--accent2); color: #111; cursor: pointer; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.cjvg-f-jouer:hover { transform: scale(1.04); }
.cjvg-f-ecran iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; z-index: 2; }
.cjvg-f-ecran.joue .cjvg-f-jouer, .cjvg-f-ecran.joue .cjvg-f-poch { display: none; }
.cjvg-f-ecran:fullscreen { aspect-ratio: auto; width: 100vw; height: 100vh; }
.cjvg-f-ecran.pseudo { position: fixed; inset: 0; z-index: 20; aspect-ratio: auto; width: 100vw; height: 100dvh; }
.cjvg-f-sortir { display: none; position: absolute; z-index: 3; top: 0.5em; right: 0.5em; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 1.6em; line-height: 1; cursor: pointer; }
.cjvg-f-ecran.pseudo .cjvg-f-sortir { display: block; }
html.cjvg-pseudo, html.cjvg-pseudo body { overflow: hidden; }
.cjvg-f-actions { display: flex; flex-wrap: wrap; gap: 0.5em; padding: 0.75em; }
.cjvg-f-actions button, .cjvg-f-actions a { font: inherit; font-size: 0.85em; padding: 0.5em 1em; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; cursor: pointer; text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; }
.cjvg-f-actions button:hover, .cjvg-f-actions a:hover { background: rgba(255,255,255,.12); }
.cjvg-f-info { padding: 2em 2em 2em 1.75em; }
.cjvg-f-ou { margin: 0 2.5em 0.4em 0; font-size: 0.8em; letter-spacing: 0.06em; text-transform: uppercase; color: var(--doux); }
.cjvg-f-info h2 { margin: 0 0 0.75em; font-family: var(--titres); font-size: 1.9em; line-height: 1.1; color: var(--encre); overflow-wrap: anywhere; }
.cjvg-f-info dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35em 1em; margin: 0 0 1.25em; font-size: 0.9em; }
.cjvg-f-info dt { font-weight: 700; color: var(--doux); }
.cjvg-f-info dd { margin: 0; overflow-wrap: anywhere; }
.cjvg-f-desc, .cjvg-f-long { white-space: pre-line; margin: 0 0 1.25em; overflow-wrap: anywhere; }
.cjvg-f-info h3 { margin: 1.25em 0 0.5em; font-family: var(--titres); font-size: 1em; }
.cjvg-f-yt, .cjvg-f-info video { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--rayon); background: #000; }
.cjvg-f-mentions { list-style: none; margin: 0 0 1em !important; padding: 0; font-weight: 600; }
.cjvg-f-lien { display: inline-block; margin: 0.75em 0; text-decoration: underline; color: var(--accent); overflow-wrap: anywhere; }
.cjvg-f-ecole { display: block; margin-top: 1.25em; font: inherit; font-size: 0.9em; padding: 0.6em 1.2em; border-radius: 999px; border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; }

/* Barre des designs : règles 778 à 781 (largeur fixe, flèches immobiles) */
.cjvg-barre { position: fixed; z-index: 2147483647; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 6px 14px 6px 6px;
  border: 1px solid #8a8fa3; border-radius: 999px; background: #fff; color: #111; font: 14px/1.2 system-ui, sans-serif; box-shadow: 0 8px 28px rgba(0,0,0,.28); white-space: nowrap; }
.cjvg-barre button { flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: #eceef3; color: #111; font: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.cjvg-barre button:hover { background: #dadde6; }
.cjvg-barre input[type="range"] { flex: 0 0 auto; width: 9rem; height: 36px; margin: 0; accent-color: #2a3975; cursor: pointer; }
.cjvg-barre-noms { display: grid; font-weight: 600; }
.cjvg-barre-noms span { grid-area: 1 / 1; visibility: hidden; }
.cjvg-barre-noms span.on { visibility: visible; }
body.cjvg-page footer { padding-bottom: 4.5em; }

/* Écran étroit */
@media (max-width: 800px) {
  .cjvg-f-in { grid-template-columns: 1fr; }
  .cjvg-fiche { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .cjvg-f-in { max-height: 100dvh; }
  .cjvg-f-info { padding: 1.25em; }
  .cjvg-connexion { grid-template-columns: 1fr; padding: 1.25em; }
  .cjvg-cx-onglets, .cjvg-connexion .section_connexion { grid-column: 1; }
  .cjvg-connexion .cjvg-cx-tete { grid-row: auto; }
}
@media (max-width: 560px) {
  body.cjvg-page { --carte: 9em; --gap: 1em; }
  .cjvg { padding: 0 0.9em 6em; }
  .cjvg-annees { margin-left: 0; }
  .cjvg-outils select { flex: 1 1 100%; }
  .cjvg-compte { margin-left: 0; }
  .cjvg-connexion form.formulaire { grid-template-columns: 1fr; }
  .cjvg-barre { box-sizing: border-box; width: calc(100vw - 16px); max-width: calc(100vw - 16px); justify-content: center; padding-right: 10px; gap: 4px; }
  .cjvg-barre input[type="range"] { width: auto; flex: 1 1 4rem; min-width: 2.5rem; }
  .cjvg-barre-noms { flex: 0 1 auto; min-width: 0; font-size: 0.85em; }
}

/* ═══ 1. Vitrine Fusion — Inter, bleu FJ, filtres dans une colonne fixe ═══ */
body[data-cjvg="vitrine"] .cjvg { display: grid; grid-template-columns: 15.5em minmax(0, 1fr); column-gap: 2.5em; align-items: start; }
body[data-cjvg="vitrine"] .cjvg-tete { grid-column: 1 / -1; padding-bottom: 1.25em; border-bottom: 1px solid #e3e6ef; }
body[data-cjvg="vitrine"] .cjvg-outils { grid-column: 1; grid-row: 3 / span 3; position: sticky; top: calc(var(--cjvg-haut, 6em) + 1em); flex-direction: column; align-items: stretch; gap: 0.6em;
  padding: 1.25em; background: var(--accent); border-radius: 14px; color: #fff; }
body[data-cjvg="vitrine"] .cjvg-cherche { flex: 0 0 auto; color: rgba(255,255,255,.75); }
body[data-cjvg="vitrine"] .cjvg-outils input[type="search"], body[data-cjvg="vitrine"] .cjvg-outils select { flex: 0 0 auto; width: 100%; background: #fff; }
body[data-cjvg="vitrine"] .cjvg-compte { margin: 0.5em 0 0; color: #fff; align-self: start; }
body[data-cjvg="vitrine"] .cjvg-compte strong { color: var(--accent2); font-size: 2em; display: block; line-height: 1; }
body[data-cjvg="vitrine"] .cjvg-effacer { color: #fff; align-self: start; padding: 0; }
body[data-cjvg="vitrine"] .cjvg-grille, body[data-cjvg="vitrine"] .cjvg-vide, body[data-cjvg="vitrine"] .cjvg-connexion { grid-column: 2; }
/* Notes (manette, orthographe) : une ligne à elles, sur toute la largeur, pour que
   la colonne de recherche et la grille des jeux commencent à la même hauteur. */
body[data-cjvg="vitrine"] .cjvg-notes { grid-column: 1 / -1; grid-row: 2; margin: 1.25em 0 1.5em; }
body[data-cjvg="vitrine"] .cjvg-p { box-shadow: 0 2px 8px rgba(42,57,117,.18); transition: transform .2s, box-shadow .2s; }
body[data-cjvg="vitrine"] .cjvg-c:hover .cjvg-p { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(42,57,117,.28); }
body[data-cjvg="vitrine"] .cjvg-t { color: var(--accent); }
body[data-cjvg="vitrine"] .cjvg-d { display: none; }
@media (max-width: 800px) {
  body[data-cjvg="vitrine"] .cjvg { display: block; }
  body[data-cjvg="vitrine"] .cjvg-outils { position: static; margin-top: 1em; }
}

/* ═══ 2. Magazine — Newsreader, papier, colonnes de revue, textes lisibles ═══ */
body[data-cjvg="magazine"] { --fond: #f5f0e6; --surface: #ebe3d3; --encre: #1d1a16; --doux: #6b6153; --accent: #b3122e; --accent2: #f2c14e;
  --police: "Newsreader", Georgia, serif; --titres: "Newsreader", Georgia, serif; --rayon: 0; --gap: 2.25em; }
body[data-cjvg="magazine"] .bloc_intro { background: #1d1a16 !important; border-radius: 0; }
body[data-cjvg="magazine"] .bloc_intro h1 { font-family: "Newsreader", Georgia, serif; font-style: italic; font-weight: 400; }
body[data-cjvg="magazine"] .cjvg-tete { display: block; text-align: center; border-bottom: 3px double var(--encre); padding-bottom: 1em; }
body[data-cjvg="magazine"] .cjvg-surtitre { font-size: 0.85em; letter-spacing: 0.3em; color: var(--accent); }
body[data-cjvg="magazine"] .cjvg-total { font-size: 1.5em; font-style: italic; margin: 0.2em 0 0.6em; }
body[data-cjvg="magazine"] .cjvg-total strong { color: var(--encre); font-style: normal; }
body[data-cjvg="magazine"] .cjvg-annees { justify-content: center; margin: 0; }
body[data-cjvg="magazine"] .cjvg-annees a { border: 0; border-radius: 0; font-variant: small-caps; font-size: 1em; letter-spacing: 0.05em; }
body[data-cjvg="magazine"] .cjvg-annees a[aria-current] { background: none; color: var(--accent); border-bottom: 2px solid var(--accent); }
body[data-cjvg="magazine"] .cjvg-outils { padding: 0.75em 0; border-bottom: 1px solid var(--encre); font-family: "Inter", sans-serif; }
body[data-cjvg="magazine"] .cjvg-outils input[type="search"], body[data-cjvg="magazine"] .cjvg-outils select { background: transparent; border: 0; border-bottom: 1px solid var(--doux); border-radius: 0; font-family: "Newsreader", serif; font-size: 1.05rem; }
body[data-cjvg="magazine"] .cjvg-notes { font-style: italic; justify-content: center; margin: 1.25em auto 2.5em; max-width: 52em; }
body[data-cjvg="magazine"] .cjvg-grille { display: block; column-width: 15em; column-gap: 2.25em; column-rule: 1px solid #cfc4b0; }
body[data-cjvg="magazine"] .cjvg-c { break-inside: avoid; margin: 0 0 2.25em !important; display: block; }
body[data-cjvg="magazine"] .cjvg-c[hidden] { display: none !important; }
body[data-cjvg="magazine"] .cjvg-p { filter: saturate(.9) contrast(1.05); }
body[data-cjvg="magazine"] .cjvg-c:nth-child(3n+1) .cjvg-p { aspect-ratio: 469 / 768; }
body[data-cjvg="magazine"] .cjvg-t { font-size: 1.45em; font-weight: 600; font-style: italic; margin-top: 0.4em; }
body[data-cjvg="magazine"] .cjvg-c:hover .cjvg-t { color: var(--accent); }
body[data-cjvg="magazine"] .cjvg-s { order: 3; font-family: "Inter", sans-serif; font-size: 0.72em; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-top: 0.3em; }
body[data-cjvg="magazine"] .cjvg-e { order: 4; font-variant: small-caps; font-size: 0.85em; letter-spacing: 0.03em; }
body[data-cjvg="magazine"] .cjvg-d { -webkit-line-clamp: 7; font-size: 0.98em; color: var(--encre); line-height: 1.5; }
body[data-cjvg="magazine"] .cjvg-d::first-letter { font-size: 2.6em; float: left; line-height: 0.85; padding: 0.06em 0.08em 0 0; color: var(--accent); font-weight: 600; }
body[data-cjvg="magazine"] .cjvg-connexion { background: transparent; border-top: 3px double var(--encre); border-bottom: 1px solid var(--encre); border-radius: 0; }
body[data-cjvg="magazine"] .cjvg-cx-tete h2 { font-style: italic; font-weight: 400; font-size: 2em; }
body[data-cjvg="magazine"] .cjvg-fiche { --rayon: 0; }
body[data-cjvg="magazine"] .cjvg-f-info h2 { font-style: italic; font-weight: 400; font-size: 2.4em; }

/* ═══ 3. Répertoire — JetBrains Mono, une ligne par jeu, numérotée ═══ */
body[data-cjvg="index"] { --fond: #fbfbf8; --surface: #efefe9; --encre: #111; --doux: #555; --accent: #2a3975; --accent2: #2a3975;
  --police: "JetBrains Mono", ui-monospace, monospace; --titres: "JetBrains Mono", ui-monospace, monospace; --rayon: 0; }
body[data-cjvg="index"] .bloc_intro { background: #111 !important; border-radius: 0; }
body[data-cjvg="index"] .bloc_intro h1 { font-family: "JetBrains Mono", monospace; letter-spacing: -0.02em; }
body[data-cjvg="index"] .cjvg { counter-reset: jeu; }
body[data-cjvg="index"] .cjvg-tete { border-bottom: 2px solid var(--encre); padding-bottom: 0.75em; }
body[data-cjvg="index"] .cjvg-total strong { color: var(--encre); }
body[data-cjvg="index"] .cjvg-annees a { border-radius: 0; }
body[data-cjvg="index"] .cjvg-outils { position: sticky; top: var(--cjvg-haut, 6em); z-index: 5; background: var(--fond); padding: 0.75em 0; border-bottom: 1px solid var(--encre); }
body[data-cjvg="index"] .cjvg-cherche { flex-direction: row; align-items: center; }
body[data-cjvg="index"] .cjvg-cherche span { font-size: 0; }
body[data-cjvg="index"] .cjvg-cherche span::before { content: ">"; font-size: 1.4rem; font-weight: 700; color: var(--accent); margin-right: 0.3em; }
body[data-cjvg="index"] .cjvg-outils input[type="search"] { flex: 1; background: transparent; border: 0; border-bottom: 2px solid var(--encre); border-radius: 0; font-size: 1.15rem; }
body[data-cjvg="index"] .cjvg-outils select { border: 1px solid var(--encre); background: transparent; border-radius: 0; font-size: 0.85rem; }
body[data-cjvg="index"] .cjvg-grille { display: block; border-top: 1px solid var(--encre); }
body[data-cjvg="index"] .cjvg-c { counter-increment: jeu; border-bottom: 1px solid #cfcfc6; }
body[data-cjvg="index"] .cjvg-c[hidden] { display: none !important; }
body[data-cjvg="index"] .cjvg-c > a { display: grid; grid-template-columns: 3.2em 3.2em minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1.6fr); align-items: center; column-gap: 1.25em; padding: 0.45em 0.5em; }
body[data-cjvg="index"] .cjvg-c > a::before { content: counter(jeu, decimal-leading-zero); grid-column: 1; grid-row: 1; font-size: 0.8em; color: var(--doux); }
body[data-cjvg="index"] .cjvg-p { grid-column: 2; grid-row: 1; width: 3.2em; }
body[data-cjvg="index"] .cjvg-sans .cjvg-p::after { content: ""; }
body[data-cjvg="index"] .cjvg-t { grid-column: 3; grid-row: 1; margin: 0; font-size: 1.15em; }
body[data-cjvg="index"] .cjvg-s { grid-column: 4; grid-row: 1; font-size: 0.8em; }
body[data-cjvg="index"] .cjvg-e { grid-column: 5; grid-row: 1; font-size: 0.8em; }
body[data-cjvg="index"] .cjvg-d { margin: -0.3em 0 0.6em calc(6.4em + 2.5em + 0.5em); -webkit-line-clamp: 1; font-size: 0.78em; max-width: 60em; }
body[data-cjvg="index"] .cjvg-c:hover { background: var(--accent); color: #fff; }
body[data-cjvg="index"] .cjvg-c:hover .cjvg-s, body[data-cjvg="index"] .cjvg-c:hover .cjvg-e, body[data-cjvg="index"] .cjvg-c:hover .cjvg-d, body[data-cjvg="index"] .cjvg-c:hover > a::before { color: rgba(255,255,255,.8); }
body[data-cjvg="index"] .cjvg-laureat .cjvg-p::before { font-size: 0.8em; top: 0; right: 0; }
body[data-cjvg="index"] .cjvg-connexion { background: transparent; border: 2px solid var(--encre); border-radius: 0; }
body[data-cjvg="index"] .cjvg-cx-onglets button, body[data-cjvg="index"] .cjvg-connexion form.formulaire input[type="submit"], body[data-cjvg="index"] .cjvg-f-ecole { border-radius: 0; }
body[data-cjvg="index"] .cjvg-fiche { --rayon: 0; border: 2px solid #111; }
@media (max-width: 800px) {
  body[data-cjvg="index"] .cjvg-outils { position: static; }
  body[data-cjvg="index"] .cjvg-c > a { grid-template-columns: 3.2em minmax(0, 1fr); grid-template-rows: auto auto auto; row-gap: 0.1em; }
  body[data-cjvg="index"] .cjvg-c > a::before { display: none; }
  body[data-cjvg="index"] .cjvg-p { grid-column: 1; grid-row: 1 / span 3; }
  body[data-cjvg="index"] .cjvg-t, body[data-cjvg="index"] .cjvg-s, body[data-cjvg="index"] .cjvg-e { grid-column: 2; grid-row: auto; }
  body[data-cjvg="index"] .cjvg-d { margin-left: 4.9em; }
}

/* ═══ 4. Arcade de nuit — Bricolage Grotesque, nuit bleu FJ, grandes boîtes ═══ */
body[data-cjvg="arcade"] { --fond: #0a0e2c; --surface: #151b47; --encre: #eef0ff; --doux: #9aa3d9; --accent: #ffd23f; --accent2: #ff7476;
  --police: "Bricolage Grotesque", "Inter", sans-serif; --titres: "Bricolage Grotesque", "Inter", sans-serif; --rayon: 6px; --carte: 14em; --gap: 2em; }
body[data-cjvg="arcade"] .bloc_intro { background: linear-gradient(120deg, #2a3975, #0a0e2c 70%) !important; }
body[data-cjvg="arcade"] .bloc_intro h1 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; letter-spacing: -0.02em; }
body[data-cjvg="arcade"] footer { background: #0a0e2c; }
body[data-cjvg="arcade"] .cjvg-surtitre { color: var(--accent2); }
body[data-cjvg="arcade"] .cjvg-total { font-size: 1.3em; font-weight: 800; }
body[data-cjvg="arcade"] .cjvg-total strong { font-size: 2.4em; color: var(--accent); }
body[data-cjvg="arcade"] .cjvg-annees a[aria-current] { color: #0a0e2c; }
body[data-cjvg="arcade"] .cjvg-outils input[type="search"], body[data-cjvg="arcade"] .cjvg-outils select { background: var(--surface); color: var(--encre); border: 1px solid #2c357a; border-radius: 999px; padding-left: 1.1em; }
body[data-cjvg="arcade"] .cjvg-outils input[type="search"]::placeholder { color: var(--doux); }
body[data-cjvg="arcade"] .cjvg-c { perspective: 900px; }
body[data-cjvg="arcade"] .cjvg-p { transition: transform .25s, box-shadow .25s; box-shadow: 0 10px 30px rgba(0,0,0,.5); outline: 1px solid rgba(255,255,255,.08); }
body[data-cjvg="arcade"] .cjvg-c:hover .cjvg-p { transform: rotateY(-8deg) rotateX(3deg) translateY(-6px); box-shadow: 14px 18px 40px rgba(0,0,0,.6), 0 0 0 2px var(--accent), 0 0 34px rgba(255,210,63,.35); }
body[data-cjvg="arcade"] .cjvg-t { font-size: 1.2em; font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; margin-top: 0.75em; }
body[data-cjvg="arcade"] .cjvg-s { color: var(--accent); font-weight: 700; }
body[data-cjvg="arcade"] .cjvg-d { color: var(--doux); -webkit-line-clamp: 2; }
body[data-cjvg="arcade"] .cjvg-connexion { background: linear-gradient(135deg, #2a3975, #151b47); }
body[data-cjvg="arcade"] .cjvg-cx-tete h2 { font-weight: 800; font-size: 2em; color: #fff; }
body[data-cjvg="arcade"] .cjvg-cx-onglets button { border-color: var(--accent); color: var(--accent); }
body[data-cjvg="arcade"] .cjvg-cx-onglets button[aria-selected="true"], body[data-cjvg="arcade"] .cjvg-connexion form.formulaire input[type="submit"] { background: var(--accent); color: #0a0e2c; }
body[data-cjvg="arcade"] .cjvg-fiche { background: #0f1438; }
body[data-cjvg="arcade"] .cjvg-f-info h2 { font-weight: 800; text-transform: uppercase; color: var(--accent); }
body[data-cjvg="arcade"] .cjvg-f-jouer { background: var(--accent); }
body[data-cjvg="arcade"] .cjvg-f-ecole, body[data-cjvg="arcade"] .cjvg-f-lien { color: var(--accent); border-color: var(--accent); }

/* ═══ 5. Album d’autocollants — Caveat et Nunito, cartes collées de travers ═══ */
body[data-cjvg="album"] { --fond: #f2e6cf; --surface: #fffaf0; --encre: #3a2f25; --doux: #7a6a58; --accent: #2a3975; --accent2: #e8553d;
  --police: "Nunito", "Inter", sans-serif; --titres: "Caveat", cursive; --rayon: 4px; --carte: 12em; --gap: 2.25em 1.75em; }
body[data-cjvg="album"] { background-image: radial-gradient(rgba(58,47,37,.09) 1px, transparent 1.5px); background-size: 18px 18px; }
body[data-cjvg="album"] .bloc_intro h1 { font-family: "Caveat", cursive; font-size: 3.2em; font-weight: 700; }
body[data-cjvg="album"] .cjvg-surtitre { font-family: "Nunito", sans-serif; font-weight: 800; color: var(--accent2); }
body[data-cjvg="album"] .cjvg-total { font-size: 2em; }
body[data-cjvg="album"] .cjvg-total strong { color: var(--accent2); }
body[data-cjvg="album"] .cjvg-annees a { font-weight: 800; border-width: 2px; }
body[data-cjvg="album"] .cjvg-outils { background: var(--surface); padding: 1em 1.25em; border-radius: 4px; box-shadow: 0 2px 0 rgba(0,0,0,.08); transform: rotate(-0.4deg);
  background-image: repeating-linear-gradient(transparent 0 1.9em, rgba(42,57,117,.12) 1.9em 2em); }
body[data-cjvg="album"] .cjvg-outils input[type="search"], body[data-cjvg="album"] .cjvg-outils select { background: #fff; border: 2px solid var(--encre); border-radius: 999px; font-weight: 700; }
body[data-cjvg="album"] .cjvg-c { background: #fff; padding: 0.6em 0.6em 0.9em !important; box-shadow: 0 6px 14px rgba(58,47,37,.22); transition: transform .2s; }
body[data-cjvg="album"] .cjvg-c:nth-child(4n+1) { transform: rotate(-2deg); }
body[data-cjvg="album"] .cjvg-c:nth-child(4n+2) { transform: rotate(1.5deg); }
body[data-cjvg="album"] .cjvg-c:nth-child(4n+3) { transform: rotate(-0.8deg); }
body[data-cjvg="album"] .cjvg-c:nth-child(4n) { transform: rotate(2.2deg); }
body[data-cjvg="album"] .cjvg-c:hover { transform: rotate(0) scale(1.04); z-index: 2; }
body[data-cjvg="album"] .cjvg-c::before { content: ""; position: absolute; z-index: 2; top: -0.7em; left: 50%; width: 5em; height: 1.4em; margin-left: -2.5em; background: rgba(255,226,140,.75); transform: rotate(-3deg); box-shadow: 0 1px 2px rgba(0,0,0,.1); }
body[data-cjvg="album"] .cjvg-c:nth-child(3n)::before { background: rgba(160,210,235,.75); transform: rotate(4deg); }
body[data-cjvg="album"] .cjvg-c:nth-child(3n+1)::before { background: rgba(240,160,170,.7); }
body[data-cjvg="album"] .cjvg-t { font-size: 1.7em; line-height: 1; margin-top: 0.35em; color: var(--accent); }
body[data-cjvg="album"] .cjvg-s { font-weight: 800; color: var(--accent2); }
body[data-cjvg="album"] .cjvg-d { -webkit-line-clamp: 2; }
body[data-cjvg="album"] .cjvg-connexion { background: #fff; box-shadow: 0 8px 20px rgba(58,47,37,.2); transform: rotate(0.3deg); }
body[data-cjvg="album"] .cjvg-cx-tete h2 { font-family: "Caveat", cursive; font-size: 2.4em; color: var(--accent2); }
body[data-cjvg="album"] .cjvg-f-info h2 { font-size: 2.8em; color: var(--accent); }
body[data-cjvg="album"] .cjvg-fiche { background: var(--surface); }

/* « Jouer » est un vrai lien (choix 131) : même allure que le bouton d'avant */
a.cjvg-f-jouer, a.cjvg-f-jouer:hover, a.cjvg-f-jouer:visited { display: inline-block; text-decoration: none !important; color: #111 !important; line-height: 1.2; }
a.cjvg-f-jouer[hidden] { display: none; }
