/* ============================================================
   Calcade — feuille de style
   Idee : le cahier a carreaux de l'eleve (papier, encre bleue,
   marge rouge, surligneur jaune) + la calculatrice comme console.
   ============================================================ */

@font-face {
  font-family: "Archivo";
  src: url("polices/archivo.woff2") format("woff2-variations");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("polices/archivo-ext.woff2") format("woff2-variations");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0;
}
@font-face {
  font-family: "Caveat";
  src: url("polices/caveat.woff2") format("woff2");
  font-weight: 600; font-display: swap;
}

:root {
  --papier: #F5F8FD;
  --carreau: rgba(29, 63, 191, .075);
  --carreau-fort: rgba(29, 63, 191, .13);
  --surface: #FFFFFF;
  --surface-2: #EDF2FB;
  --encre: #1D3FBF;
  --encre-fonce: #13287A;
  --encre-doux: rgba(29, 63, 191, .1);
  --marge: #E2453C;
  --fluo: #FFE14D;
  --fluo-texte: #2A2300;
  --vert: #138A4E;
  --vert-doux: #E2F5EA;
  --texte: #1B2033;
  --gris: #5B6380;
  --trait: #D5DDEE;
  --ombre: 0 1px 0 rgba(19, 40, 122, .06), 0 8px 24px -12px rgba(19, 40, 122, .25);
  --ecran: #0E1220;
  --coque: #F2F3F7;
  --coque-ombre: #C9CEDC;
  --rayon: 14px;
  --rayon-petit: 9px;
  --large: 1180px;
  --pas: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --papier: #0E1431;
    --carreau: rgba(150, 175, 255, .055);
    --carreau-fort: rgba(150, 175, 255, .1);
    --surface: #161E44;
    --surface-2: #1C2652;
    --encre: #9DB2FF;
    --encre-fonce: #C9D4FF;
    --encre-doux: rgba(157, 178, 255, .13);
    --marge: #FF6B61;
    --vert: #4FD18C;
    --vert-doux: rgba(79, 209, 140, .14);
    --texte: #E9EDFB;
    --gris: #A3ACCB;
    --trait: #2B3768;
    --ombre: 0 1px 0 rgba(0, 0, 0, .2), 0 10px 30px -14px rgba(0, 0, 0, .7);
    --coque: #DDE1EA;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --papier: #0E1431; --carreau: rgba(150, 175, 255, .055); --carreau-fort: rgba(150, 175, 255, .1);
  --surface: #161E44; --surface-2: #1C2652; --encre: #9DB2FF; --encre-fonce: #C9D4FF;
  --encre-doux: rgba(157, 178, 255, .13); --marge: #FF6B61; --vert: #4FD18C;
  --vert-doux: rgba(79, 209, 140, .14); --texte: #E9EDFB; --gris: #A3ACCB; --trait: #2B3768;
  --ombre: 0 1px 0 rgba(0, 0, 0, .2), 0 10px 30px -14px rgba(0, 0, 0, .7); --coque: #DDE1EA;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  font: 400 16px/1.55 "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--texte);
  background-color: var(--papier);
  /* le cahier : petits carreaux de 8 px, un trait plus marque tous les 32 px */
  background-image:
    linear-gradient(var(--carreau-fort) 1px, transparent 1px),
    linear-gradient(90deg, var(--carreau-fort) 1px, transparent 1px),
    linear-gradient(var(--carreau) 1px, transparent 1px),
    linear-gradient(90deg, var(--carreau) 1px, transparent 1px);
  background-size: 32px 32px, 32px 32px, 8px 8px, 8px 8px;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
body.sans-defilement { overflow: hidden; }

img, video { max-width: 100%; display: block; }
a { color: var(--encre); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--encre-fonce); }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3 {
  font-stretch: 118%;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(30px, 5.2vw, 52px); }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: 18px; font-stretch: 110%; }
p { margin: 0 0 1em; max-width: 68ch; }
.chapeau { font-size: clamp(17px, 1.6vw, 19px); color: var(--gris); max-width: 52ch; }
.mini { font-size: 14px; color: var(--gris); }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .92em; }
.main { font-family: "Caveat", cursive; font-weight: 600; color: var(--marge); }
.cache-visuel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.saut { position: absolute; left: -999px; top: 8px; background: var(--encre); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.saut:focus { left: 8px; }

/* ------------------------------------------------------------ en-tete */

.haut {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--papier) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--trait);
}
.haut-dedans {
  max-width: var(--large); margin: 0 auto;
  display: flex; align-items: center; gap: 18px;
  padding: 10px var(--pas);
  padding-top: max(10px, env(safe-area-inset-top));
}
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--texte); margin-right: auto; }
.marque-logo { width: 40px; height: 40px; }
.marque-nom { font-weight: 900; font-stretch: 125%; font-size: 22px; letter-spacing: -.02em; }
.liens-haut { display: flex; gap: 4px; align-items: center; }
.liens-haut a {
  position: relative;
  text-decoration: none; color: var(--texte); font-weight: 600; font-size: 15px;
  padding: 8px 12px; border-radius: 999px;
}
.liens-haut a:hover { background: var(--encre-doux); color: var(--texte); }
.liens-haut a.actif { background: var(--encre); color: #fff; }
:root[data-theme="dark"] .liens-haut a.actif { color: #0E1431; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .liens-haut a.actif { color: #0E1431; } }
.pastille-nb {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  margin-left: 6px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: var(--fluo); color: var(--fluo-texte);
}

/* barre du bas (telephone) */
.barre-bas { display: none; }
@media (max-width: 760px) {
  .liens-haut { display: none; }
  .barre-bas {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--trait);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .barre-bas a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    text-decoration: none; color: var(--gris); font-size: 11.5px; font-weight: 600;
    padding: 4px 2px; border-radius: 10px; position: relative;
  }
  .barre-bas a svg { width: 22px; height: 22px; }
  .barre-bas a.actif { color: var(--encre); }
  .barre-bas .pastille-nb { position: absolute; top: 0; left: 55%; margin: 0; min-width: 18px; height: 18px; font-size: 11px; }
  body { padding-bottom: 72px; }
}

/* ------------------------------------------------------------ page */

main { flex: 1; width: 100%; max-width: var(--large); margin: 0 auto; padding: 28px var(--pas) 56px; }
main:focus { outline: none; }
.charge { padding: 80px 0; text-align: center; color: var(--gris); }

.section { margin-top: clamp(48px, 8vw, 96px); }
.section-tete { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-tete h2 { margin: 0; }
.section-tete p { margin: 0; }

.retour { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; text-decoration: none; margin-bottom: 18px; }

/* ------------------------------------------------------------ boutons */

button, .bouton {
  font: inherit; font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px;
  border: 1.5px solid var(--trait); background: var(--surface); color: var(--texte);
  text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: transform .08s ease, background-color .15s ease, border-color .15s ease;
}
button:hover, .bouton:hover { border-color: var(--encre); color: var(--texte); }
button:active, .bouton:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.b-principal { background: var(--encre); border-color: var(--encre); color: #fff; box-shadow: 0 3px 0 var(--encre-fonce); }
.b-principal:hover { background: var(--encre-fonce); border-color: var(--encre-fonce); color: #fff; }
:root[data-theme="dark"] .b-principal, :root[data-theme="dark"] .b-principal:hover { color: #0E1431; box-shadow: 0 3px 0 #5A6FC2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .b-principal, :root:not([data-theme="light"]) .b-principal:hover { color: #0E1431; box-shadow: 0 3px 0 #5A6FC2; } }
.b-fluo { background: var(--fluo); border-color: var(--fluo); color: var(--fluo-texte); box-shadow: 0 3px 0 #C9A800; }
.b-fluo:hover { color: var(--fluo-texte); border-color: #E8C600; }
.b-vert { background: var(--vert); border-color: var(--vert); color: #fff; }
.b-vert:hover { color: #fff; filter: brightness(1.08); }
.b-rouge { color: var(--marge); }
.b-rouge:hover { border-color: var(--marge); color: var(--marge); }
.b-discret { border-color: transparent; background: transparent; }
.b-discret:hover { background: var(--encre-doux); border-color: transparent; }
.b-large { width: 100%; padding: 14px 20px; font-size: 16px; }
.b-petit { padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.groupe-boutons { display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------ etiquettes */

.etiquettes { display: flex; flex-wrap: wrap; gap: 6px; }
.etiquette {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--gris); white-space: nowrap;
}
.etiquette.fluo { background: var(--fluo); color: var(--fluo-texte); }
.etiquette.verte { background: var(--vert-doux); color: var(--vert); }
.etiquette.rouge { background: color-mix(in srgb, var(--marge) 14%, transparent); color: var(--marge); }
.etiquette.encre { background: var(--encre-doux); color: var(--encre); }

.prix { font-weight: 800; font-stretch: 112%; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------------------ cartes */

.carte {
  background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon);
  padding: clamp(16px, 3vw, 24px); box-shadow: var(--ombre);
}
.carte + .carte { margin-top: 16px; }
.carte h2 { font-size: 21px; }
.carte > h2:first-child, .carte > h3:first-child { margin-top: 0; }

.encart {
  border-radius: var(--rayon-petit); padding: 12px 16px; margin: 0 0 16px;
  background: var(--surface-2); border-left: 4px solid var(--encre);
}
.encart p { margin: 0 0 4px; }
.encart p:last-child { margin: 0; }
.encart.vert { border-color: var(--vert); background: var(--vert-doux); }
.encart.rouge { border-color: var(--marge); background: color-mix(in srgb, var(--marge) 9%, var(--surface)); }
.encart.fluo { border-color: #D9B800; background: color-mix(in srgb, var(--fluo) 38%, var(--surface)); }

.ligne { display: flex; align-items: center; gap: 12px; }
.espace { flex: 1; min-width: 0; }
.pile > * + * { margin-top: 10px; }
.separe > * + * { border-top: 1px solid var(--trait); }

.vide { text-align: center; padding: 56px 16px; color: var(--gris); }
.vide .gros { font-size: 44px; margin-bottom: 8px; }
.vide h2 { color: var(--texte); }

/* ------------------------------------------------------------ accueil : heros */

.heros {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(24px, 5vw, 64px); align-items: center;
  padding-top: clamp(8px, 3vw, 32px);
}
.heros h1 { font-size: clamp(36px, 6.4vw, 72px); font-stretch: 125%; font-weight: 900; letter-spacing: -.025em; margin-bottom: 20px; }
.heros .chapeau { margin-bottom: 26px; }
.heros-preuves { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; padding: 0; list-style: none; font-size: 14.5px; color: var(--gris); }
.heros-preuves li { display: flex; align-items: center; gap: 7px; }
.heros-preuves svg { width: 18px; height: 18px; color: var(--vert); flex: none; }

@media (max-width: 860px) {
  .heros { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------ la calculatrice */

/* La vraie NumWorks (photo de face). Les captures se posent exactement
   dans son ecran ; ses touches flechees, OK et retour sont cliquables. */
.heros-calc { position: relative; display: flex; justify-content: center; }
.calc-boite { position: relative; width: min(100%, 400px); }
.calc {
  position: relative; width: 100%; aspect-ratio: 678 / 798;
  background: url("img/calculatrice.webp") center top / 100% auto no-repeat;
  border-radius: 34px 34px 0 0;
  filter: drop-shadow(0 28px 34px rgba(19, 40, 122, .28));
  -webkit-mask-image: linear-gradient(#000 84%, transparent 100%);
  mask-image: linear-gradient(#000 84%, transparent 100%);
}
.calc-ecran-dedans {
  position: absolute; left: 14.51%; top: 12.86%; width: 70.97%; height: 45.26%;
  overflow: hidden; background: #2b2b2b; border-radius: 2px;
}
.calc-ecran-dedans img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  image-rendering: pixelated; opacity: 0; transition: opacity .35s ease;
}
.calc-ecran-dedans img.visible { opacity: 1; }
.calc-legende {
  position: absolute; left: 14.51%; width: 70.97%; top: 59.6%;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: #4A4F63;
}
.calc-points { display: flex; gap: 4px; }
.calc-points i { width: 6px; height: 6px; border-radius: 50%; background: #C9CDD8; }
.calc-points i.actif { background: #E6A52E; }
.calc-touche {
  position: absolute; transform: translate(-50%, -50%); width: 9.5%; aspect-ratio: 1;
  padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: none; cursor: pointer;
}
/* zones invisibles posees sur les vraies touches de la photo : rien ne
   s'affiche par-dessus (sauf le contour clavier, pour qui navigue au Tab) */
.calc-touche { -webkit-tap-highlight-color: transparent; outline: none; }
.calc-touche:hover, .calc-touche:active, .calc-touche:focus { background: transparent; border: 0; box-shadow: none; transform: translate(-50%, -50%); }
.calc-touche:focus-visible { outline: 2px solid var(--encre); outline-offset: 0; }
.calc-touche.h { left: 22.57%; top: 70.38%; }
.calc-touche.g { left: 14.51%; top: 77.07%; }
.calc-touche.d { left: 30.62%; top: 77.07%; }
.calc-touche.b { left: 22.57%; top: 83.68%; }
.calc-touche.ok { left: 70.53%; top: 76.92%; width: 11%; }
.calc-touche.retour { left: 84.16%; top: 76.92%; width: 11%; }
.calc-touche.maison { left: 49.9%; top: 71.95%; width: 13.5%; aspect-ratio: 1.6; border-radius: 40%; }
.calc-note {
  position: absolute; left: -104px; top: 64%; transform: rotate(-6deg);
  font-family: "Caveat", cursive; font-size: 24px; color: var(--marge); line-height: 1;
  pointer-events: none; text-align: right;
}
.calc-note svg { display: block; width: 58px; height: 34px; margin: 4px 0 0 auto; }
@media (max-width: 1060px) { .calc-note { display: none; } }
@media (max-width: 860px) { .calc-boite { width: min(100%, 320px); } }

/* ------------------------------------------------------------ comment ca marche */

.cahier {
  position: relative; background: var(--surface); border: 1px solid var(--trait);
  border-radius: var(--rayon); box-shadow: var(--ombre);
  padding: 28px clamp(18px, 4vw, 36px) 28px calc(clamp(18px, 4vw, 36px) + 48px);
  overflow: hidden;
}
.cahier::before {
  /* la marge rouge du cahier */
  content: ""; position: absolute; top: 0; bottom: 0; left: 24px; width: 2px; background: var(--marge); opacity: .55;
}
.etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: etape; }
.etapes li { position: relative; counter-increment: etape; }
.etapes li::before {
  content: counter(etape); position: absolute; left: -38px; top: -6px;
  font-family: "Caveat", cursive; font-size: 40px; color: var(--marge); line-height: 1;
}
.etapes li:not(:first-child)::before { left: -30px; }
.etapes h3 { margin-bottom: 6px; }
.etapes p { margin: 0; font-size: 15px; color: var(--gris); }
@media (max-width: 860px) {
  .etapes { grid-template-columns: 1fr; gap: 20px; }
  .etapes li:not(:first-child)::before { left: -38px; }
}

/* ------------------------------------------------------------ grille des jeux */

.grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.jeu {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--trait); border-radius: var(--rayon);
  box-shadow: var(--ombre); overflow: hidden; color: var(--texte); text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.jeu:hover { transform: translateY(-3px); border-color: var(--encre); color: var(--texte); }
.jeu-visuel { position: relative; aspect-ratio: 4 / 3; background: var(--ecran); }
.jeu-visuel img.capture { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.jeu-visuel .sans-capture {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #26305C, var(--ecran));
}
.jeu-visuel .sans-capture img { width: 96px; height: 96px; border-radius: 22px; image-rendering: pixelated; }
.jeu-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.jeu-corps { position: relative; padding: 34px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.jeu-icone {
  position: absolute; top: -28px; left: 14px; width: 56px; height: 56px; border-radius: 14px;
  border: 3px solid var(--surface); background: var(--surface); image-rendering: pixelated;
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .35); object-fit: cover;
}
.jeu-nom { font-size: 19px; font-weight: 800; font-stretch: 115%; line-height: 1.15; }
.jeu-st { font-size: 14px; color: var(--gris); margin: 4px 0 14px; }
.jeu-bas { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.jeu-bas .prix { font-size: 19px; }
.jeu-bas .possede { color: var(--vert); font-weight: 700; font-size: 14px; }

/* ------------------------------------------------------------ fiche d'un jeu */

.fiche { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); gap: clamp(20px, 4vw, 40px); align-items: start; }
@media (max-width: 900px) { .fiche { grid-template-columns: minmax(0, 1fr); } }

.vitrine-ecran {
  background: var(--ecran); border-radius: 18px; padding: clamp(8px, 1.5vw, 14px);
  box-shadow: 0 24px 48px -26px rgba(19, 40, 122, .6), inset 0 0 0 2px #262C42;
}
.vitrine-ecran button {
  display: block; width: 100%; padding: 0; border: 0; background: #000; border-radius: 6px; overflow: hidden;
  aspect-ratio: 4 / 3; cursor: zoom-in; box-shadow: none;
}
.vitrine-ecran button:active { transform: none; }
.vitrine-ecran img, .vitrine-ecran video { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.vitrine-vide { aspect-ratio: 4 / 3; display: grid; place-items: center; color: #8E97BD; text-align: center; padding: 20px; }
.vitrine-vide img { width: 110px; height: 110px; border-radius: 26px; margin: 0 auto 14px; image-rendering: pixelated; }
.miniatures { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: thin; }
.miniatures button {
  flex: none; width: 96px; aspect-ratio: 4 / 3; padding: 0; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; background: var(--ecran); position: relative;
}
.miniatures button.actif { border-color: var(--encre); }
.miniatures img, .miniatures video { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.miniatures .lecture { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 20px; background: rgba(0, 0, 0, .3); }

.achat { position: sticky; top: 86px; }
.achat-tete { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.achat-tete img { width: 64px; height: 64px; border-radius: 16px; image-rendering: pixelated; flex: none; }
.achat-tete h1 { font-size: clamp(26px, 3.4vw, 34px); margin: 0 0 4px; }
.achat-tete p { margin: 0; color: var(--gris); }
.achat-prix { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 14px; }
.achat-prix .prix { font-size: 40px; line-height: 1; }
.achat .b-large + .b-large { margin-top: 10px; }
.achat-notes { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--trait); font-size: 14px; color: var(--gris); }
.achat-notes li { display: flex; gap: 8px; align-items: flex-start; }
.achat-notes li + li { margin-top: 8px; }
.achat-notes svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--encre); }

.texte-long { white-space: pre-line; }
.touches { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; margin: 0; }
.touches dt { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.touches dd { margin: 0; color: var(--gris); font-size: 15px; }
kbd {
  display: inline-block; font: 700 12.5px/1 "Archivo", sans-serif; padding: 6px 8px; border-radius: 7px;
  background: var(--surface); color: var(--texte); border: 1px solid var(--trait); box-shadow: 0 2px 0 var(--trait);
  white-space: nowrap;
}
.versions-liste { margin: 0; padding: 0; list-style: none; }
.versions-liste li { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.versions-liste li + li { border-top: 1px solid var(--trait); }
.jauge-place { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; width: 90px; flex: none; }
.jauge-place i { display: block; height: 100%; background: var(--encre); border-radius: 99px; }

/* ------------------------------------------------------------ visionneuse */

#visionneuse { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; }
.visionneuse-fond { position: absolute; inset: 0; background: rgba(6, 9, 22, .9); }
.visionneuse-contenu { position: relative; margin: 0; width: min(94vw, 133vh); }
.visionneuse-contenu img, .visionneuse-contenu video { width: 100%; height: auto; max-height: 86vh; object-fit: contain; image-rendering: pixelated; border-radius: 6px; }
.visionneuse-contenu figcaption { color: #C5CCE4; text-align: center; margin-top: 10px; }
.visionneuse-fermer, .visionneuse-fleche {
  position: absolute; z-index: 2; background: rgba(255, 255, 255, .12); color: #fff; border: 0;
  width: 48px; height: 48px; border-radius: 50%; padding: 0; font-size: 22px;
}
.visionneuse-fermer:hover, .visionneuse-fleche:hover { background: rgba(255, 255, 255, .25); color: #fff; }
.visionneuse-fermer { top: 16px; right: 16px; }
.visionneuse-fleche.gauche { left: 14px; top: 50%; transform: translateY(-50%); }
.visionneuse-fleche.droite { right: 14px; top: 50%; transform: translateY(-50%); }

/* ------------------------------------------------------------ formulaires */

.champ { margin-bottom: 14px; }
.champ label, .etiquette-champ { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.champ .aide { font-size: 13px; color: var(--gris); margin-top: 5px; }
.champs-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 520px) { .champs-2 { grid-template-columns: 1fr; } }
input, textarea, select {
  width: 100%; font: inherit; font-size: 16px; color: var(--texte);
  background: var(--surface); border: 1.5px solid var(--trait); border-radius: 10px; padding: 11px 13px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--encre); box-shadow: 0 0 0 3px var(--encre-doux); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; padding: 0; accent-color: var(--encre); flex: none; margin: 2px 0 0; }
textarea { resize: vertical; min-height: 90px; }
.formulaire { max-width: 460px; }

.choix-carte {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--trait); background: var(--surface); cursor: pointer;
}
.choix-carte:has(input:checked) { border-color: var(--encre); background: var(--encre-doux); }
.choix-carte + .choix-carte { margin-top: 8px; }
.choix-carte img { width: 44px; height: 44px; border-radius: 11px; image-rendering: pixelated; flex: none; }
.choix-carte.desactive { opacity: .5; cursor: not-allowed; }

.onglets { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 12px; margin-bottom: 18px; }
.onglets button { border: 0; background: transparent; box-shadow: none; padding: 8px 14px; }
.onglets button.actif { background: var(--surface); box-shadow: var(--ombre); }

/* ------------------------------------------------------------ panier */

.panier { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .panier { grid-template-columns: minmax(0, 1fr); } }
.ligne-panier { display: flex; gap: 14px; align-items: center; padding: 14px 0; }
.ligne-panier + .ligne-panier { border-top: 1px solid var(--trait); }
.ligne-panier img, .ligne-panier .pictogramme { width: 52px; height: 52px; border-radius: 13px; flex: none; image-rendering: pixelated; }
.pictogramme { display: grid; place-items: center; background: var(--encre-doux); color: var(--encre); }
.pictogramme svg { width: 26px; height: 26px; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 16px; margin-top: 4px; border-top: 2px solid var(--texte); }
.total .prix { font-size: 30px; }

/* ------------------------------------------------------------ installation */

.etape { display: flex; gap: 16px; padding: 18px 0; }
.etape + .etape { border-top: 1px dashed var(--trait); }
.etape .num {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-family: "Caveat", cursive; font-size: 26px; color: var(--marge); border: 2px solid currentColor;
}
.etape.faite .num { background: var(--vert); border-color: var(--vert); color: #fff; font-family: inherit; font-size: 16px; }
.etape .contenu { flex: 1; min-width: 0; }
.etape h3 { margin: 6px 0 6px; }
.badge-calc { display: inline-flex; align-items: center; gap: 8px; background: var(--vert-doux); color: var(--vert); padding: 8px 14px; border-radius: 999px; font-weight: 700; }
.jauge { height: 12px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 14px 0 8px; }
.jauge i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(-45deg, var(--encre) 0 10px, color-mix(in srgb, var(--encre) 80%, #fff) 10px 20px); transition: width .25s ease; border-radius: 99px; }
.place-calc { display: flex; gap: 6px; margin: 10px 0 4px; }
.place-calc span { flex: 1; height: 30px; border-radius: 8px; border: 2px dashed var(--trait); display: grid; place-items: center; font-size: 12px; color: var(--gris); font-weight: 700; }
.place-calc span.prise { border-style: solid; border-color: var(--encre); background: var(--encre-doux); color: var(--encre); }

/* l'ecran de publicite pendant l'installation */
.pause-pub { border: 2px solid var(--encre); }
.pause-pub-tete { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.pause-pub-tete h3 { margin: 0; flex: 1; }
.compte-rebours {
  font-variant-numeric: tabular-nums; font-weight: 800; background: var(--fluo); color: var(--fluo-texte);
  padding: 4px 10px; border-radius: 999px; font-size: 14px;
}
.zone-pub {
  position: relative; min-height: 250px; border-radius: 12px; overflow: hidden;
  background: var(--surface-2); display: grid; place-items: center;
}
.zone-pub-etiquette { position: absolute; top: 6px; right: 8px; font-size: 11px; color: var(--gris); z-index: 2; background: var(--surface); padding: 1px 7px; border-radius: 99px; }
.zone-pub ins { display: block; width: 100%; min-height: 250px; }
.pub-maison { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%; align-items: center; gap: 0; }
.pub-maison img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; image-rendering: pixelated; }
.pub-maison div { padding: 18px 20px; }
.pub-maison h4 { margin: 0 0 6px; font-size: 22px; font-stretch: 118%; font-weight: 800; }
@media (max-width: 600px) { .pub-maison { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ gratuit */

.gratuit { font-weight: 800; font-stretch: 112%; color: var(--vert); white-space: nowrap; }
.jeu-bas .etiquettes { flex-wrap: nowrap; overflow: hidden; }
.achat-prix .prix { color: var(--vert); }
.etapes.etapes-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .etapes.etapes-3 { grid-template-columns: 1fr; } }
.grille-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; margin-top: 12px; }
.grille-choix .choix-carte + .choix-carte { margin-top: 0; }

/* la jauge de place sur la calculatrice */
.place { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--surface-2); }
.place-tete { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 8px; }
.place-tete span { font-variant-numeric: tabular-nums; font-weight: 700; }
.place-tete .trop { color: var(--marge); }
.place-barre { display: flex; height: 16px; border-radius: 99px; overflow: hidden; background: var(--surface); border: 1px solid var(--trait); }
.place-barre i { display: block; height: 100%; transition: width .2s ease; }
.place-barre i + i { border-left: 2px solid var(--surface); }
.place-legende { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13.5px; align-items: center; }
.place-legende span { display: inline-flex; align-items: center; gap: 6px; }
.place-legende i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.choix-carte.ne-rentre-pas { opacity: .45; }

/* la grande pub, par-dessus la page */
#pub-plein { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; }
.pub-fond { position: absolute; inset: 0; background: rgba(6, 9, 22, .82); backdrop-filter: blur(3px); }
.pub-cadre {
  position: relative; width: min(1000px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--surface); border-radius: 20px; padding: clamp(16px, 3vw, 28px);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); border: 2px solid var(--encre);
}
.pub-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pub-tete h2 { margin: 0; flex: 1; font-size: clamp(20px, 3vw, 28px); }
.pub-zone {
  position: relative; min-height: min(56vh, 520px); border-radius: 14px; overflow: hidden;
  background: var(--surface-2); display: grid; place-items: center;
}
.pub-zone ins { display: block; width: 100%; min-height: min(56vh, 520px); }
.pub-zone .pub-maison { height: 100%; }
.pub-pied { display: flex; gap: 16px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.pub-pied .jauge { margin: 0 0 6px; }
.pub-pied p { margin: 0; }
.pub-pied button { min-width: 150px; }

/* statistiques */
.histogramme { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 6px; border-bottom: 2px solid var(--trait); }
.histogramme .barre { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.histogramme .barre i { display: block; width: 100%; min-height: 2px; background: var(--encre); border-radius: 4px 4px 0 0; }
/* la bulle au survol (ou au doigt / au clavier) : le nombre d'installations du jour */
.histogramme .barre { position: relative; cursor: default; outline: none; }
.histogramme .barre:hover i, .histogramme .barre:focus i { background: var(--encre-fonce); }
.histogramme .barre:hover, .histogramme .barre:focus { background: var(--encre-doux); border-radius: 4px 4px 0 0; }
.histogramme .bulle { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  z-index: 5; pointer-events: none; opacity: 0; transition: opacity .12s; white-space: nowrap;
  background: var(--texte); color: var(--surface); font-size: 13px; line-height: 1.35; padding: 6px 10px;
  border-radius: 8px; box-shadow: var(--ombre); text-align: center; }
.histogramme .bulle b { display: block; font-size: 14px; }
.histogramme .bord-g .bulle { left: 0; transform: none; }
.histogramme .bord-d .bulle { left: auto; right: 0; transform: none; }
.histogramme .barre:hover .bulle, .histogramme .barre:focus .bulle { opacity: 1; }
.credits { font-size: 14px; color: var(--gris); }
.credits a { overflow-wrap: anywhere; }

/* ------------------------------------------------------------ FAQ */

.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
@media (max-width: 760px) { .faq { grid-template-columns: 1fr; } }
.faq details { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 0 16px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; gap: 10px; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--encre); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--gris); font-size: 15px; }

/* ------------------------------------------------------------ pied */

.pied { border-top: 1px solid var(--trait); background: var(--surface); }
.pied-dedans { max-width: var(--large); margin: 0 auto; padding: 28px var(--pas) 32px; display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: flex-start; font-size: 14px; color: var(--gris); }
.pied-dedans .marque-nom { font-size: 18px; color: var(--texte); }
.pied-dedans nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.pied-dedans nav a { color: var(--gris); }
.pied-dedans p { margin: 4px 0 0; }
.pied-mention { flex-basis: 100%; font-size: 12.5px; }

/* ------------------------------------------------------------ messages */

#messages { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; width: min(92vw, 460px); }
@media (max-width: 760px) { #messages { bottom: 86px; } }
.message {
  background: var(--texte); color: var(--papier); padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 15px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45); animation: monte .2s ease-out;
}
.message.ok { border-left: 5px solid var(--vert); }
.message.ko { border-left: 5px solid var(--marge); }
@keyframes monte { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------------------------------------------------------------ admin */

.admin-entete { display: flex; justify-content: space-between; align-items: end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-onglets { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 20px; scrollbar-width: thin; }
.admin-onglets button { flex: none; border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.admin-onglets button.actif { background: var(--encre); border-color: var(--encre); color: #fff; }
:root[data-theme="dark"] .admin-onglets button.actif { color: #0E1431; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .admin-onglets button.actif { color: #0E1431; } }
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.chiffre { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 14px 16px; }
.chiffre b { display: block; font-size: 26px; font-stretch: 115%; font-weight: 800; font-variant-numeric: tabular-nums; }
.chiffre span { font-size: 13.5px; color: var(--gris); }
.defile { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; font-size: 13px; color: var(--gris); font-weight: 700; padding: 8px 10px; border-bottom: 2px solid var(--trait); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--trait); vertical-align: top; }

.depot-boite { margin-top: 10px; }
.depot-cible {
  border: 2px dashed var(--trait); border-radius: 12px; padding: 18px; text-align: center; cursor: pointer;
  background: var(--surface-2); transition: border-color .15s, background-color .15s;
}
.depot-cible:hover, .depot-cible.survol { border-color: var(--encre); background: var(--encre-doux); }
.depot-icone { font-size: 24px; margin-bottom: 4px; }
.depot-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.depot-vignette { position: relative; margin: 0; border: 1px solid var(--trait); border-radius: 10px; overflow: hidden; background: var(--surface); }
.depot-vignette img, .depot-vignette video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #000; image-rendering: pixelated; }
.depot-vignette figcaption { padding: 6px 8px; font-size: 12px; display: flex; justify-content: space-between; gap: 6px; }
.depot-nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.depot-paquet { aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 34px; background: var(--surface-2); }
.depot-retirer { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; padding: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; border: 0; font-size: 14px; }
.depot-retirer:hover { background: var(--marge); color: #fff; }
.depot-marque { position: absolute; top: 6px; left: 6px; background: var(--fluo); color: var(--fluo-texte); font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 99px; }
.depot-ordre { position: absolute; bottom: 34px; left: 6px; display: flex; gap: 4px; }
.depot-ordre button { width: 28px; height: 28px; padding: 0; border-radius: 8px; background: rgba(0, 0, 0, .65); color: #fff; border: 0; font-size: 13px; }

.versions { display: grid; gap: 12px; }
.version-carte { border: 1.5px solid var(--trait); border-radius: 12px; padding: 14px; opacity: .78; }
.version-carte.allumee { border-color: var(--encre); opacity: 1; }
.version-titre { display: flex; gap: 12px; align-items: flex-start; }
.version-actuelle { padding: 8px 10px; background: var(--surface-2); border-radius: 8px; }
.bascule { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; }
.bascule input { opacity: 0; width: 0; height: 0; position: absolute; }
.bascule-piste { position: absolute; inset: 0; border-radius: 99px; background: var(--trait); transition: background .15s; cursor: pointer; }
.bascule-bille { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.bascule input:checked + .bascule-piste { background: var(--vert); }
.bascule input:checked + .bascule-piste .bascule-bille { transform: translateX(18px); }
.bascule input:focus-visible + .bascule-piste { outline: 3px solid var(--encre); outline-offset: 2px; }

.cle-brute { font-family: ui-monospace, monospace; font-size: 15px; }

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

/* progression sauvegardee : une petite ligne, sans en faire trop */
.note-progression { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; }
.note-progression svg { width: 16px; height: 16px; color: var(--vert); flex: none; }
.tableau-defile { overflow-x: auto; }

/* fleches de la galerie (fiche d'un jeu) */
.vitrine-ecran { position: relative; }
.vitrine-ecran .vitrine-fleche {
  position: absolute; aspect-ratio: auto; overflow: visible; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; padding: 0; border: 0;
  background: rgba(14, 20, 49, .55); color: #fff; font-size: 30px; line-height: 1;
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
  opacity: .85; transition: opacity .15s, background .15s;
}
.vitrine-ecran .vitrine-fleche:hover, .vitrine-ecran .vitrine-fleche:focus-visible { opacity: 1; background: var(--encre); }
.vitrine-ecran .vitrine-fleche:active { transform: translateY(-50%) scale(.94); }
.vitrine-ecran .vitrine-fleche.gauche { left: clamp(14px, 2.4vw, 24px); }
.vitrine-ecran .vitrine-fleche.droite { right: clamp(14px, 2.4vw, 24px); }
.vitrine-compteur {
  position: absolute; right: clamp(16px, 2.6vw, 26px); bottom: clamp(16px, 2.6vw, 26px); z-index: 2;
  background: rgba(14, 20, 49, .6); color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; pointer-events: none;
}
.miniatures-cadre { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.miniatures-cadre .miniatures { margin-top: 0; flex: 1; min-width: 0; scroll-behavior: smooth; }
.mini-fleche {
  flex: none; width: 34px; height: 34px; border-radius: 50%; padding: 0; display: none;
  place-items: center; font-size: 24px; line-height: 1; border: 1.5px solid var(--trait);
  background: var(--surface, #fff); color: var(--encre); cursor: pointer; box-shadow: none;
}
.miniatures-cadre.deborde .mini-fleche { display: grid; }
.mini-fleche:disabled { opacity: .3; cursor: default; }
.mini-fleche:not(:disabled):hover { background: var(--encre); color: #fff; border-color: var(--encre); }

/* ======================================================================
   Fiche d'un jeu : galerie / installation / texte (ordre adapte au telephone)
   ====================================================================== */
.fiche { grid-template-areas: "galerie achat" "texte achat"; }
.fiche-galerie { grid-area: galerie; min-width: 0; }
.fiche .achat { grid-area: achat; }
.fiche-texte { grid-area: texte; margin-top: 0 !important; }
@media (max-width: 900px) {
  .fiche { grid-template-areas: "galerie" "achat" "texte"; }
  .fiche .achat { position: static; }
}

/* ======================================================================
   TELEPHONE : une vraie appli
   ====================================================================== */
@media (max-width: 760px) {
  main { padding-top: 18px; }

  /* --- en-tete plus fin --- */
  .haut-dedans { padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: 8px; }
  .marque-logo { width: 34px; height: 34px; }
  .marque-nom { font-size: 20px; }

  /* --- le haut de l'accueil : un grand bandeau bleu --- */
  .heros {
    margin: -18px calc(-1 * var(--pas)) 0;
    padding: 30px var(--pas) 0;
    gap: 22px;
    color: #fff;
    background:
      linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 22px 22px,
      linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 22px 22px,
      radial-gradient(120% 70% at 85% 0%, #3E63F0 0%, transparent 60%),
      linear-gradient(170deg, #2447D8 0%, #1D3FBF 45%, #13287A 100%);
    border-radius: 0 0 32px 32px;
    overflow: hidden;
    position: relative;
  }
  .heros h1 { color: #fff; font-size: clamp(38px, 11.5vw, 52px); line-height: 1.02; margin-bottom: 16px; }
  .heros .surligne { color: var(--fluo); display: inline-block; transform: rotate(-2deg); text-shadow: 0 3px 0 rgba(0, 0, 0, .18); }
  .heros .chapeau { color: #D9E1FF; font-size: 16.5px; margin-bottom: 22px; }
  .heros .groupe-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .heros .groupe-boutons .bouton { padding: 14px 10px; font-size: 16px; border-radius: 14px; }
  .heros .b-principal { background: #fff; border-color: #fff; color: var(--encre); box-shadow: 0 4px 0 rgba(0, 0, 0, .22); }
  .heros .b-fluo { box-shadow: 0 4px 0 rgba(0, 0, 0, .22); }
  .heros-preuves {
    display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; margin: 20px calc(-1 * var(--pas)) 0;
    padding: 0 var(--pas) 4px; scrollbar-width: none; color: #fff; font-size: 13.5px;
  }
  .heros-preuves::-webkit-scrollbar { display: none; }
  .heros-preuves li {
    flex: none; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .18);
    padding: 7px 12px 7px 9px; border-radius: 999px; font-weight: 600;
  }
  .heros-preuves svg { color: var(--fluo); width: 16px; height: 16px; }
  .heros-calc { margin-top: 4px; }
  .heros-calc::before {
    content: ""; position: absolute; left: 50%; top: 18%; width: 120%; aspect-ratio: 1;
    transform: translateX(-50%); border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 225, 77, .32), transparent 62%);
    pointer-events: none;
  }
  .calc-boite { width: min(84%, 300px); }
  .calc { filter: drop-shadow(0 26px 30px rgba(0, 0, 0, .45)); }

  /* --- sections --- */
  .section { margin-top: 44px; }
  .section-tete h2 { font-size: 26px; }
  .section-tete h2::after {
    content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; margin-top: 8px; background: var(--fluo);
  }

  /* --- comment ca marche : plus serre --- */
  .cahier { padding: 22px 18px 22px 64px; }
  .cahier::before { left: 20px; }
  .etapes { gap: 18px; }
  .etapes li::before, .etapes li:not(:first-child)::before { left: -40px; }

  /* --- les jeux de l'accueil : un carrousel qu'on fait glisser --- */
  .grille-accueil {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--pas)); padding: 4px var(--pas) 18px; scrollbar-width: none;
    scroll-padding: 0 var(--pas);
  }
  .grille-accueil::-webkit-scrollbar { display: none; }
  .grille-accueil .jeu { flex: none; width: 78vw; max-width: 320px; scroll-snap-align: start; }

  /* --- tous les jeux : deux colonnes, comme une boutique d'applis --- */
  .grille:not(.grille-accueil) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grille:not(.grille-accueil) .jeu-corps { padding: 26px 11px 12px; }
  .grille:not(.grille-accueil) .jeu-icone { width: 44px; height: 44px; top: -22px; left: 10px; border-radius: 11px; border-width: 2px; }
  .grille:not(.grille-accueil) .jeu-nom { font-size: 15.5px; }
  .grille:not(.grille-accueil) .jeu-st { font-size: 12.5px; margin: 3px 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .grille:not(.grille-accueil) .jeu-bas .etiquette { display: none; }
  .grille:not(.grille-accueil) .jeu-bas .prix { font-size: 15px; }
  .grille:not(.grille-accueil) .jeu-badges .etiquette { font-size: 10.5px; padding: 3px 7px; }
  .jeu:hover { transform: none; }
  .jeu:active { transform: scale(.98); }

  /* --- fiche d'un jeu --- */
  .fiche { gap: 16px; }
  .vitrine-ecran { border-radius: 16px; padding: 7px; margin: 0 -4px; }
  .achat-tete img { width: 58px; height: 58px; }
  .achat-tete h1 { font-size: 28px; }
  .achat-prix { margin: 12px 0 12px; }
  .achat-prix .prix { font-size: 32px; }
  .achat .b-large { padding: 16px; font-size: 17px; border-radius: 14px; }

  /* --- installer --- */
  .carte { border-radius: 18px; }
  .etape { gap: 12px; padding: 16px 0; }
  .etape .num { width: 30px; height: 30px; font-size: 22px; }
  .etape h3 { margin-top: 3px; font-size: 17px; }
  .etape .contenu > *:not(h3) { margin-left: -42px; }
  .etape .contenu > h3 { min-height: 30px; display: flex; align-items: center; margin-bottom: 10px; }
  .grille-choix { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .choix-carte { padding: 10px 12px; align-items: center; }
  .choix-carte img { width: 40px; height: 40px; }
  .version-choix { width: 100%; max-width: 100%; }
  .place { padding: 12px; }
  .place-tete { flex-wrap: wrap; row-gap: 2px; }
  .place-legende { font-size: 12.5px; }
  #zone-action .b-large, #etat-calc .b-principal { width: 100%; padding: 15px; font-size: 16.5px; border-radius: 14px; }

  /* --- barre du bas : flottante, facon appli --- */
  .barre-bas {
    left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom));
    border: 1px solid var(--trait); border-radius: 22px;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px);
    box-shadow: 0 10px 30px -10px rgba(19, 40, 122, .35);
    padding: 6px;
  }
  .barre-bas a { font-size: 11px; padding: 6px 2px 5px; border-radius: 16px; transition: background .15s, color .15s; }
  .barre-bas a.actif { background: var(--encre-doux); color: var(--encre); }
  .barre-bas a.actif svg { stroke-width: 2.4; }
  body { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  #messages { bottom: calc(96px + env(safe-area-inset-bottom)); }

  /* --- pied de page --- */
  .pied { border-radius: 28px 28px 0 0; }
}

/* mode sombre : le bandeau reste bleu nuit */
@media (max-width: 760px) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .heros {
    background:
      linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 22px 22px,
      linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 22px 22px,
      radial-gradient(120% 70% at 85% 0%, #2E4BC4 0%, transparent 60%),
      linear-gradient(170deg, #1C3199 0%, #16257A 50%, #0E1431 100%);
  }
  :root:not([data-theme="light"]) .heros .b-principal { color: #13287A; }
}

/* ======================================================================
   FORUM
   ====================================================================== */
.forum-heros { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.forum-heros h1 { margin-bottom: 8px; }
.forum-heros .chapeau { margin: 0; }
.forum-filtres { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.forum-cats { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.forum-cats::-webkit-scrollbar { display: none; }
.forum-cats button {
  --c: var(--encre); flex: none; padding: 8px 14px; border-radius: 999px; font-size: 14px; box-shadow: none;
  border: 1.5px solid var(--trait); background: var(--surface);
}
.forum-cats button span { font-weight: 600; color: var(--gris); font-size: 12.5px; margin-left: 2px; }
.forum-cats button.actif { background: var(--c); border-color: var(--c); color: #fff; }
.forum-cats button.actif span { color: rgba(255, 255, 255, .8); }
.forum-outils { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.forum-tri { margin: 0; }
.forum-outils input[type=search] { flex: 1; min-width: 160px; max-width: 320px; }

.forum-liste { display: flex; flex-direction: column; gap: 12px; }
.sujet-carte {
  display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--trait);
  border-radius: var(--rayon); padding: 14px 16px; box-shadow: var(--ombre); transition: border-color .15s;
}
.sujet-carte:hover { border-color: color-mix(in srgb, var(--encre) 50%, var(--trait)); }
.sujet-lien { flex: 1; min-width: 0; color: var(--texte); text-decoration: none; }
.sujet-lien:hover { color: var(--texte); }
.sujet-lien h3 { margin: 6px 0 4px; font-size: 18px; line-height: 1.25; }
.sujet-extrait { margin: 0 0 8px; color: var(--gris); font-size: 14.5px; overflow-wrap: anywhere; }
.sujet-tete { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sujet-meta { font-size: 13px; color: var(--gris); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sujet-rep { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-weight: 700; }
.sujet-rep svg { width: 15px; height: 15px; }
.sujet-vignette { flex: none; width: 112px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--ecran); }
.sujet-vignette img { width: 100%; height: 100%; object-fit: cover; }
.auteur { font-weight: 700; color: var(--texte); }
.auteur-admin { display: inline-flex; align-items: center; gap: 4px; color: var(--encre); }
.auteur-admin img { width: 16px; height: 16px; }

.cat-pastille {
  --c: var(--encre); display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .02em;
  padding: 3px 9px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent);
}

/* votes */
.vote { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 40px; }
.vote button {
  width: 36px; height: 32px; padding: 0; border-radius: 10px; border: 0; background: transparent;
  color: var(--gris); box-shadow: none;
}
.vote button svg { width: 20px; height: 20px; }
.vote button:hover { background: var(--encre-doux); color: var(--encre); }
.vote .vote-haut.actif { color: #fff; background: var(--vert); }
.vote .vote-bas.actif { color: #fff; background: var(--marge); }
.vote-score { font-size: 16px; font-variant-numeric: tabular-nums; }

/* petitions */
.petition { margin: 6px 0 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px dashed color-mix(in srgb, var(--encre) 35%, var(--trait)); }
.petition-tete { display: flex; align-items: flex-start; gap: 8px; font-weight: 700; font-size: 14.5px; }
.petition-tete svg { width: 18px; height: 18px; flex: none; color: var(--encre); margin-top: 1px; }
.petition-objet { flex: 1; }
.petition-barre { height: 9px; border-radius: 99px; background: var(--surface); overflow: hidden; margin: 8px 0 5px; border: 1px solid var(--trait); }
.petition-barre i { display: block; height: 100%; background: linear-gradient(90deg, var(--encre), #4C6CF0); border-radius: 99px; transition: width .4s ease; }
.petition-chiffres { font-size: 13px; color: var(--gris); }
.petition-chiffres b { color: var(--texte); font-size: 15px; }
.petition-badge { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--fluo); color: var(--fluo-texte); }
.petition.adoptee { border-style: solid; border-color: #D9B800; background: color-mix(in srgb, var(--fluo) 22%, var(--surface)); }
.petition.adoptee .petition-barre i { background: linear-gradient(90deg, #E8C600, var(--fluo)); }
.petition.grande { padding: 16px; margin: 0 0 12px; }
.petition.grande .petition-tete { font-size: 17px; }
.petition.grande .petition-barre { height: 14px; }
.petition-boite { margin-top: 18px; }
.petition-boite .b-large { width: 100%; }
.petition-boite button.signe { background: var(--vert-doux); color: var(--vert); border-color: var(--vert); }
.petition-fin { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--texte); }
.petition-fin svg { width: 18px; height: 18px; color: var(--vert); }

/* un sujet */
.sujet-plein { margin-top: 4px; }
.sujet-plein-corps { display: flex; gap: 16px; align-items: flex-start; }
.sujet-plein h1 { font-size: clamp(24px, 3.4vw, 34px); margin: 8px 0 6px; overflow-wrap: anywhere; }
.sujet-texte { margin-top: 14px; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.sujet-image { display: block; margin-top: 16px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--ecran); cursor: zoom-in; max-width: 100%; box-shadow: none; }
.sujet-image img { max-height: 520px; width: auto; max-width: 100%; }
.sujet-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--trait); }
.sujet-actions svg { width: 16px; height: 16px; }
button.danger, .lien-petit.danger { color: var(--marge); }
.est-masque { opacity: .7; }
.reponses { margin-top: 28px; }
.reponses h2 { font-size: 21px; }
.reponse { padding: 14px 0; border-bottom: 1px solid var(--trait); }
.reponse .sujet-texte { margin-top: 6px; font-size: 15.5px; }
.reponse.de-calcade { background: var(--encre-doux); border-radius: 12px; padding: 14px; border-bottom: 0; margin: 8px 0; }
.reponse-actions { display: flex; gap: 14px; margin-top: 6px; }
.lien-petit { background: none; border: 0; padding: 0; font-size: 13px; font-weight: 600; color: var(--gris); box-shadow: none; cursor: pointer; }
.lien-petit:hover { color: var(--encre); text-decoration: underline; }
.repondre { margin-top: 18px; }
.pot-de-miel { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* nouveau sujet */
.form-sujet { max-width: 760px; }
.form-sujet fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.form-sujet legend { font-weight: 700; font-size: 14px; margin-bottom: 8px; padding: 0; }
.choix-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.choix-cats label { --c: var(--encre); cursor: pointer; }
.choix-cats input { position: absolute; opacity: 0; }
.choix-cats span {
  display: inline-block; padding: 9px 15px; border-radius: 999px; font-weight: 700; font-size: 14.5px;
  border: 1.5px solid var(--trait); background: var(--surface); transition: background .15s, color .15s, border-color .15s;
}
.choix-cats input:checked + span { background: var(--c); border-color: var(--c); color: #fff; }
.choix-cats input:focus-visible + span { outline: 3px solid var(--encre); outline-offset: 2px; }
.depot-image {
  display: grid; place-items: center; min-height: 130px; border: 2px dashed var(--trait); border-radius: 14px;
  background: var(--surface-2); cursor: pointer; overflow: hidden; color: var(--gris); text-align: center;
  transition: border-color .15s, background .15s;
}
.depot-image:hover, .depot-image.survol { border-color: var(--encre); color: var(--encre); }
.depot-vide { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; padding: 16px; }
.depot-image.plein .depot-vide { display: none; }
.depot-image img { max-height: 280px; width: auto; }
.petition-option { margin: 4px 0 16px; }
.petition-option .champ { margin: 10px 0 0; }

/* petites fenetres */
#fenetre { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; }
.fenetre-fond { position: absolute; inset: 0; background: rgba(6, 9, 22, .55); }
.fenetre-boite { position: relative; width: min(100%, 440px); max-height: 90vh; overflow: auto; }
.raisons { display: grid; gap: 6px; }
.raisons .choix-carte + .choix-carte { margin-top: 0; }

/* admin */
.admin-forum .chiffres { margin-bottom: 16px; }
.boite-adoptees { border: 2px solid #D9B800; background: color-mix(in srgb, var(--fluo) 12%, var(--surface)); }
.adoptee-ligne { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--trait); }
.adoptee-ligne.vue { opacity: .6; }
.signalement { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--trait); }
.signalement-img { width: 90px; height: 68px; object-fit: cover; border-radius: 8px; flex: none; }
.signalement-extrait { margin: 6px 0 10px; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .forum-heros .bouton { width: 100%; padding: 14px; font-size: 16px; border-radius: 14px; }
  .forum-cats { margin: 0 calc(-1 * var(--pas)); padding: 2px var(--pas) 6px; }
  .forum-outils { flex-direction: column; align-items: stretch; }
  .forum-outils input[type=search] { max-width: none; }
  .forum-tri { display: flex; }
  .forum-tri button { flex: 1; padding: 8px 4px; font-size: 13.5px; }
  .sujet-carte { padding: 12px; gap: 10px; flex-wrap: wrap; }
  .sujet-carte .vote { width: 34px; }
  .sujet-lien { flex: 1 1 calc(100% - 50px); }
  .sujet-vignette { width: calc(100% - 44px); margin-left: 44px; aspect-ratio: 16 / 9; }
  .sujet-lien h3 { font-size: 16.5px; }
  .sujet-plein-corps { gap: 10px; }
  .sujet-plein .vote { width: 34px; }
  .choix-cats span { padding: 8px 12px; font-size: 14px; }
  .signalement { flex-direction: column; }
}
@media (max-width: 760px) {
  .sujet-vignette { aspect-ratio: auto; height: 120px; }
}

/* ------------------------------------------------------------ contestations (forum) */
.forum-heros-boutons { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
@media (max-width: 760px) { .forum-heros-boutons { align-items: stretch; text-align: center; } }
.contestation { margin-top: 18px; padding: 14px 16px; border: 1px solid color-mix(in srgb, #B4235A 35%, var(--trait));
  border-radius: 12px; background: color-mix(in srgb, #B4235A 5%, var(--surface)); }
.contestation-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.contestation-tete svg { color: #B4235A; }
.contestation-etat { margin-left: auto; font-size: 14px; color: var(--gris); display: flex; gap: 6px; align-items: center; }
.contestation-etat select { width: auto; }
.contestation-origine { margin: 10px 0 0; font-size: 15px; }
.contestation-reseaux { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.contestation-partage { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.contestation-partage input { flex: 1 1 220px; min-width: 0; font-family: ui-monospace, monospace; font-size: 13px; }
.contest-option { border: 1px dashed var(--trait); border-radius: 12px; padding: 4px 14px 12px; margin-bottom: 14px; }
.contest-option h3 { margin: 10px 0; }
.choix-ligne { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-bottom: 10px; }
.ligne-reseau { display: grid; grid-template-columns: minmax(110px, 140px) minmax(90px, 1fr) minmax(120px, 1.4fr) auto; gap: 6px; margin-bottom: 6px; align-items: center; }
@media (max-width: 560px) { .ligne-reseau { grid-template-columns: 1fr 1fr auto; } .ligne-reseau .lr-lien { grid-column: 1 / 3; } }
.zone-pieces { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.zone-pieces .etiquette-champ { flex-basis: 100%; }
.liste-pieces { flex-basis: 100%; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.liste-pieces li { display: flex; gap: 6px; align-items: center; padding: 3px 0; }
.pieces { margin-top: 10px; display: grid; gap: 8px; }
.pieces-images { display: flex; flex-wrap: wrap; gap: 8px; }
.piece-image { padding: 0; border: 1px solid var(--trait); border-radius: 10px; overflow: hidden; background: var(--surface-2); width: 120px; height: 90px; cursor: zoom-in; }
.piece-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.piece { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--trait); border-radius: 10px;
  background: var(--surface); color: var(--texte); text-decoration: none; max-width: 520px; }
.piece:hover { border-color: var(--encre); }
.piece b { display: block; overflow-wrap: anywhere; }
.piece .mini { display: block; }
.piece-type { flex: none; font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 6px 7px; border-radius: 6px;
  background: var(--encre-doux); color: var(--encre); min-width: 38px; text-align: center; }
.piece-video { width: 100%; max-width: 520px; border-radius: 10px; background: #000; }
.piece-son { width: 100%; max-width: 420px; }
/* les reseaux du pied de page : discrets */
.pied-reseaux { flex-basis: 100%; font-size: 12.5px; margin: 0 !important; }
.pied-reseaux a { color: var(--gris); }
.reglages-reseaux { display: grid; gap: 6px; }
.reglage-reseau { display: grid; grid-template-columns: 160px 1fr; gap: 8px; align-items: center; }
.reglage-reseau .choix-carte { margin: 0; padding: 8px 10px; }
@media (max-width: 560px) { .reglage-reseau { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ pack NumPlay */
.mode-pack { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.mode-pack button {
  display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer;
  padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--trait);
  background: var(--surface); color: var(--texte); font: inherit;
}
.mode-pack button span { font-size: 13px; color: var(--gris); }
.mode-pack button.actif { border-color: var(--encre); background: var(--encre-doux); }
.mode-pack button:focus-visible { outline: 3px solid var(--encre); outline-offset: 2px; }
@media (max-width: 520px) { .mode-pack { grid-template-columns: 1fr; } }
.carte-pack:has(input:checked) { border-style: solid; }
.place-barre i.bloc-pack, .place-legende i.bloc-pack {
  background: repeating-linear-gradient(135deg, var(--encre) 0 6px, var(--encre-fonce) 6px 12px);
}
.minis { margin-top: 18px; }
.minis-tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.minis-tete .b-petit { margin-left: auto; }
.grille-minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-top: 10px; }
.mini-carte {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 8px; border-radius: 12px; border: 1.5px solid var(--trait); background: var(--surface);
  cursor: pointer; text-align: center; min-width: 0;
}
.mini-carte:has(input:checked) { border-color: var(--encre); background: var(--encre-doux); }
.mini-carte.ne-rentre-pas { opacity: .45; }
.mini-carte input { position: absolute; top: 8px; left: 8px; }
.mini-carte img, .mini-sans-image {
  width: 80px; height: 60px; border-radius: 6px; image-rendering: pixelated; object-fit: cover;
}
.mini-sans-image { display: grid; place-items: center; background: var(--surface-2); font-weight: 800; font-size: 22px; color: var(--gris); }
.mini-nom { font-weight: 700; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-ko { font-size: 12px; color: var(--gris); font-variant-numeric: tabular-nums; }
.badge-numplay { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--encre-doux); color: var(--encre); }
.pack-outils { display: flex; justify-content: flex-end; margin-top: 10px; }
.choix-carte img.vignette-mini { width: 58px; height: 44px; border-radius: 8px; object-fit: cover; }
.choix-carte .mini-sans-image { width: 44px; height: 44px; border-radius: 11px; flex: none; font-size: 18px; }
/* statistiques : inclure ou non les telechargements de l'admin */
.filtre-admin { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 12px 14px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--trait); cursor: pointer; }
.filtre-admin input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.filtre-admin .mini { display: block; }
.chiffre-double .avec-toi { display: block; margin-top: 4px; font-size: 13px; color: var(--gris); }
.chiffre-double .avec-toi b { font-size: inherit; display: inline; color: var(--texte); }
.bientot { font-weight: 800; color: var(--gris); white-space: nowrap; }
.bientot-carte { opacity: .55; cursor: default; }
/* admin : les installations du jour */
.installations { display: flex; flex-direction: column; gap: 6px; }
.installation { border: 1px solid var(--trait); border-radius: 10px; background: var(--surface); }
.installation summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 12px; cursor: pointer; }
.installation .inst-heure { font-weight: 800; font-variant-numeric: tabular-nums; }
.installation .inst-calc { flex: 1; min-width: 140px; }
.installation .inst-n { color: var(--gris); font-weight: 700; }
.installation ul { margin: 0; padding: 0 12px 12px 34px; columns: 2; font-size: 14px; }
@media (max-width: 560px) { .installation ul { columns: 1; } }
/* page Mise a jour */
.maj-carte { max-width: 760px; }
.maj-liste { display: flex; flex-wrap: wrap; gap: 6px; }
.maj-jeu { padding: 5px 11px; border-radius: 99px; background: var(--encre-doux); color: var(--encre); font-weight: 700; font-size: 14px; }
/* admin : progressions par calculatrice */
.calcs { display: flex; flex-direction: column; gap: 6px; }
.calc-ligne { border: 1px solid var(--trait); border-radius: 10px; background: var(--surface); }
.calc-ligne summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 12px; cursor: pointer; list-style: none; }
.calc-ligne summary::-webkit-details-marker { display: none; }
.calc-ligne .calc-voir { margin-left: auto; border: 1px solid var(--trait); }
.calc-ligne[open] .calc-voir { visibility: hidden; }
.calc-detail { padding: 0 12px 12px; }
.calc-detail h4 { margin: 10px 0 6px; font-size: 14px; }

/* ---- statistiques (v65) ---- */
.stats-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 16px; }
.stats-tete .mini { flex: 1; min-width: 220px; }
.interrupteur, .choix-mesure { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--trait); }
.interrupteur button, .choix-mesure button { border: 0; box-shadow: none; background: transparent; color: var(--gris);
  border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 14px; cursor: pointer; transform: none; }
.choix-mesure button { padding: 6px 12px; font-size: 13px; }
.interrupteur button.actif, .choix-mesure button.actif { background: var(--encre); color: var(--surface); }
.choix-mesure { flex-wrap: wrap; border-radius: 16px; }
.stat-case .stat-titre { display: block; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--gris); margin-bottom: 4px; }
.histogramme .bulle { width: max-content; max-width: min(220px, 70vw); white-space: normal; }
details.depliable { padding-top: 0; padding-bottom: 0; }
details.depliable > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 0; }
details.depliable > summary::-webkit-details-marker { display: none; }
details.depliable > summary h2 { margin: 0; flex: 1; font-size: 20px; }
details.depliable > summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--encre); font-weight: 700; }
details.depliable[open] > summary::after { content: "–"; }
details.depliable[open] { padding-bottom: 16px; }
.table-stats { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-stats th { text-align: left; font-size: 12px; color: var(--gris); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--trait); white-space: nowrap; }
.table-stats td { padding: 8px 10px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.table-stats tr.ligne-admin td { opacity: .6; }
.jeux-inst summary { cursor: pointer; font-weight: 700; color: var(--encre); }
.jeux-inst[open] { font-size: 13px; min-width: 140px; }
details.depliable { min-width: 0; max-width: 100%; overflow: hidden; }
details.depliable .defile { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.table-stats td:first-child { white-space: nowrap; }
.table-stats td .etiquette { white-space: nowrap; }
.stats-tete, .choix-mesure { max-width: 100%; }

/* ---- jeux reserves (v68) ---- */
.etiquette.reserve { background: color-mix(in srgb, #C98A00 18%, transparent); color: #8A5A00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .etiquette.reserve { color: #F2C14E; } }
:root[data-theme="dark"] .etiquette.reserve { color: #F2C14E; }
.reserve-encart { border-color: #C98A00; margin-top: 12px; }
.carte-app .version-choix { margin-top: 6px; max-width: 100%; }

/* ---- l'appli deguisee / invisible (v69) ---- */
.options-appli { margin: 12px 0 0; padding: 12px 14px; border: 1px solid var(--trait); border-radius: 12px; background: var(--surface); }
.options-appli .opt-ligne { align-items: flex-start; gap: 10px; margin-top: 10px; cursor: pointer; }
.options-appli .opt-ligne input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.options-appli .opt-code { margin: 8px 0 0 28px; }

/* v71 : onglets de la page Installer (Jeux Calcade / Mes propres .nwa) */
.onglets-choix { display: flex; gap: 6px; margin: 14px 0 12px; border-bottom: 1px solid var(--trait); }
.onglets-choix button { border: 0; background: none; border-radius: 0; padding: 9px 12px 10px; font-weight: 700; color: var(--gris);
  border-bottom: 3px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px; }
.onglets-choix button.actif { color: var(--encre); border-bottom-color: var(--encre); }
.onglets-choix .compte:empty { display: none; }
.onglets-choix .compte { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--encre); color: var(--surface); font-size: 12px; }
.nwa-depot { display: block; }
.nwa-depot.survol { border-color: var(--encre); }
.nwa-liste { margin-top: 12px; }
.carte-nwa { align-items: center; }
.nwa-icone { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800;
  background: var(--trait); color: var(--encre); }
.nwa-depot svg { width: 26px; height: 26px; display: block; margin: 0 auto 6px; }
/* v73 : ses propres .nwa, sous la liste des jeux */
.nwa-section { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--trait); }
.nwa-section h4 { margin: 0 0 6px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.nwa-section .compte:empty { display: none; }
.nwa-section .compte { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--encre); color: var(--surface); font-size: 12px; text-align: center; }
.nwa-section .depot-cible { padding: 12px; }

/* v74 : bannieres de pub (Adsterra) — haut 728x90, cotes 160x600, telephone 300x250 */
.pub-haut, .pub-carre { display: flex; flex-direction: column; align-items: center; gap: 3px; margin: 14px auto 0; padding: 0 var(--pas); }
.pub-carre { margin: 0 auto 24px; }
.pub-haut[hidden], .pub-carre[hidden], .pub-cote[hidden] { display: none; }
.pub-haut iframe, .pub-carre iframe, .pub-cote iframe { border: 0; display: block; max-width: 100%; background: var(--encre-doux); border-radius: 4px; }
.pub-etiquette { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); }
.pub-cote { position: fixed; top: 92px; z-index: 5; width: 160px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pub-cote.gauche { left: 16px; }
.pub-cote.droite { right: 16px; }
/* avec les bannieres des cotes, le contenu se resserre au milieu pour ne jamais passer dessous */
body.avec-cotes main { max-width: min(var(--large), calc(100vw - 2 * 192px)); }
body.avec-cotes .pied > * { max-width: min(var(--large), calc(100vw - 2 * 192px)); }
@media print { .pub-haut, .pub-cote, .pub-carre { display: none !important; } }
/* v75 : la carte « Ajouter ton .nwa » dans la grille des jeux */
.carte-ajout-nwa { border-style: dashed; cursor: pointer; }
.carte-ajout-nwa.survol { border-color: var(--encre); background: var(--encre-doux); }
.nwa-plus { font-size: 22px; background: var(--encre-doux); }
.lien-bouton { border: 0; background: none; padding: 0; color: var(--encre); text-decoration: underline; font: inherit; cursor: pointer; }
.nwa-note { margin: 10px 0 0; }
