/* Shanghopoker : le pont de la jonque au clair de lune (maquette M2). Ciel, rive et eau en tête ; table de feutre indigo au centre ;
   pont de teck autour ; textes chromés de la police 5x7 du jeu ; choix à pointe corail comme dans le jeu. */
@font-face { font-family: "Jonque 5x7"; src: url(polices/jonque-5x7.woff2) format("woff2"); font-display: swap; }

:root {
  --vitre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1152 672' preserveAspectRatio='none'%3E%3Cpolygon points='22 377 23 271 24 242 25 219 28 156 31 116 39 43 42 27 65 26 103 25 145 24 189 23 240 22 299 21 375 20 582 18 853 22 912 23 963 24 1097 27 1110 28 1111 33 1122 131 1126 201 1127 220 1130 281 1130 401 1126 472 1125 488 1124 503 1123 517 1121 542 1120 554 1119 565 1117 585 1115 605 1111 639 1110 645 1087 646 1049 647 1008 648 964 649 912 650 853 651 777 652 640 653 375 651 299 650 239 649 189 648 145 647 103 646 65 645 42 644 41 638 37 603 35 584 33 564 32 553 31 541 29 516 28 502 27 487 26 471 22 400'/%3E%3C/svg%3E");
  --nuit: #060A1E; --nuit2: #0A102C; --bleu: #3C46A0; --lune: #FFF6D2; --feutre: #18286A; --feutre-c: #425CB0;
  --teck: #56301A; --teck-f: #2A160C; --teck-c: #D2965A; --laiton: #ECBE50; --corail: #FF846E; --texte: #E8EEFF; --doux: #B9C6F2;
  --pixel: "Jonque 5x7", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
  --large: 860px;
  --cjk-ja: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans CJK JP", "Noto Sans JP", "IPAexGothic", "IPAGothic";
  --cjk-ko: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", "Noto Sans KR", "NanumGothic", "UnDotum";
  --cjk-zh: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "WenQuanYi Micro Hei", "Source Han Sans SC";
  color-scheme: dark;
}
/* Écritures larges : la 5x7 n'a que le latin, les idéogrammes viennent d'une police du système, de la variante de leur langue ;
   le coréen garde ses mots entiers, le japonais et le chinois suivent les règles de coupure strictes (pas de ponctuation en début de ligne) */
:lang(ja) { --pixel: "Jonque 5x7", var(--cjk-ja), sans-serif; --sans: system-ui, var(--cjk-ja), sans-serif; line-break: strict; word-break: normal; }
:lang(ko) { --pixel: "Jonque 5x7", var(--cjk-ko), sans-serif; --sans: system-ui, var(--cjk-ko), sans-serif; word-break: keep-all; overflow-wrap: break-word; }
:lang(zh) { --pixel: "Jonque 5x7", var(--cjk-zh), sans-serif; --sans: system-ui, var(--cjk-zh), sans-serif; line-break: strict; word-break: normal; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--texte); font: 18px/1.6 var(--sans); overflow-x: hidden;
  background: var(--teck) url(images/planches.png) 0 0 / 480px 144px repeat;
  image-rendering: pixelated;
}
img { max-width: 100%; height: auto; }
a { color: var(--corail); text-underline-offset: 3px; }
a:hover { color: var(--lune); }
a:focus-visible, summary:focus-visible { outline: none; background: var(--laiton); color: var(--nuit); }
a:focus-visible .chrome, summary:focus-visible .chrome { -webkit-text-fill-color: var(--nuit); background: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saut { position: absolute; left: 16px; top: -60px; z-index: 9; padding: 8px 14px; background: var(--laiton); color: var(--nuit); font: 20px/1 var(--pixel); }
.saut:focus { top: 8px; }

/* Texte chromé : dégradé blanc, ciel, bleu sur chaque rangée de la police, ligne par ligne */
.chrome {
  background: linear-gradient(#fff 0 .5em, #C8F0FF .5em .7em, #78C4F6 .7em .9em, #4682DC .9em);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #C8F0FF;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---------- le port : ciel, lune, rive, eau ; voile de la jonque à gauche, le logo posé dessus ---------- */
.port {
  position: relative; height: 160px; background: var(--nuit);
}
/* Ciel de la rive : 8 images empilées (outils/ciel_anime.py) : houle et reflet de la lune, fenêtres qui s'éteignent, étoiles ; la voile par-dessus */
.port::before, .port::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }
.port::before { background: url(images/ciel-anim.png) right 0 bottom 0 / 1920px 1792px repeat-x; animation: rive 2s steps(8) infinite; }
.port::after { background: url(images/voile.png) 24px 0 / 360px 224px no-repeat; }
.port > * { z-index: 1; }
@keyframes rive { to { background-position: right 0 bottom -1792px; } }
.marque { position: absolute; left: 70px; top: 16px; display: block; width: 192px; line-height: 0; }
.marque img { display: block; }
.marque .logo-p { margin: 4px 0 0 52px; }
.marque:focus-visible { background: none; }
.fictifs {
  position: absolute; left: 0; bottom: 0; margin: 0; padding: 6px 12px 6px 16px; background: var(--nuit);
  font: 20px/24px var(--pixel); color: var(--corail); text-transform: uppercase;
}
/* Choix de la langue : liste à pointe corail comme le menu de langue du jeu, sans script ; ◀ du jeu devient ▶ devant la langue courante */
.langue { position: absolute; right: 16px; top: 12px; z-index: 1; }
.langue[open] { z-index: 6; }
.langue summary { list-style: none; cursor: pointer; padding: 4px 6px; font: 20px/1 var(--pixel); color: var(--lune); }
.langue summary::-webkit-details-marker { display: none; }
.langue summary:hover { color: var(--corail); }
.langue[open] summary { background: var(--nuit2); }
.langue nav { position: absolute; right: 0; top: 100%; width: 244px; max-width: 92vw; padding: 8px 6px; background: var(--nuit2); }
.langue ul { list-style: none; margin: 0; padding: 0; }
.langue a { display: flex; align-items: center; gap: 8px; padding: 3px 6px; font: 20px/28px var(--pixel); color: var(--doux); text-decoration: none; text-transform: uppercase; white-space: nowrap; }
.langue a .pointe { visibility: hidden; color: var(--corail); font-size: 14px; }
.langue a:hover, .langue a:focus-visible, .langue a.courante { color: #fff; }
.langue a:hover .pointe, .langue a:focus-visible .pointe, .langue a.courante .pointe { visibility: visible; }

/* Lanternes communes (adminapi/shangho-commun, modèle Shanghodrop) : une couleur par classe lt-*, au repos (reposent) et en feu (choix, survol, focus) ; images fixes si le visiteur réduit les animations */
.lt-R { --r2: url(lanternes/lanterne-R-repos@2x.png); --f2: url(lanternes/lanterne-R-feu@2x.png); --r3: url(lanternes/lanterne-R-repos@3x.png); --f3: url(lanternes/lanterne-R-feu@3x.png); }
.lt-Y { --r2: url(lanternes/lanterne-Y-repos@2x.png); --f2: url(lanternes/lanterne-Y-feu@2x.png); --r3: url(lanternes/lanterne-Y-repos@3x.png); --f3: url(lanternes/lanterne-Y-feu@3x.png); }
.lt-G { --r2: url(lanternes/lanterne-G-repos@2x.png); --f2: url(lanternes/lanterne-G-feu@2x.png); --r3: url(lanternes/lanterne-G-repos@3x.png); --f3: url(lanternes/lanterne-G-feu@3x.png); }
.lt-B { --r2: url(lanternes/lanterne-B-repos@2x.png); --f2: url(lanternes/lanterne-B-feu@2x.png); --r3: url(lanternes/lanterne-B-repos@3x.png); --f3: url(lanternes/lanterne-B-feu@3x.png); }
@media (prefers-reduced-motion: reduce) {
  .lt-R { --r2: url(lanternes/lanterne-R-repos-fixe@2x.png); --f2: url(lanternes/lanterne-R-feu-fixe@2x.png); --r3: url(lanternes/lanterne-R-repos-fixe@3x.png); --f3: url(lanternes/lanterne-R-feu-fixe@3x.png); }
  .lt-Y { --r2: url(lanternes/lanterne-Y-repos-fixe@2x.png); --f2: url(lanternes/lanterne-Y-feu-fixe@2x.png); --r3: url(lanternes/lanterne-Y-repos-fixe@3x.png); --f3: url(lanternes/lanterne-Y-feu-fixe@3x.png); }
  .lt-G { --r2: url(lanternes/lanterne-G-repos-fixe@2x.png); --f2: url(lanternes/lanterne-G-feu-fixe@2x.png); --r3: url(lanternes/lanterne-G-repos-fixe@3x.png); --f3: url(lanternes/lanterne-G-feu-fixe@3x.png); }
  .lt-B { --r2: url(lanternes/lanterne-B-repos-fixe@2x.png); --f2: url(lanternes/lanterne-B-feu-fixe@2x.png); --r3: url(lanternes/lanterne-B-repos-fixe@3x.png); --f3: url(lanternes/lanterne-B-feu-fixe@3x.png); }
}
.lant { display: block; flex: none; width: 32px; height: 32px; background: var(--r2) 0 0 / 32px 32px no-repeat; image-rendering: pixelated; }
.lant-grande { width: 48px; height: 48px; background-image: var(--r3); background-size: 48px 48px; }

/* Menu : une lanterne par rubrique, allumée devant la rubrique choisie, survolée ou au focus. La liste passe à la ligne : aucun mot n'est coupé. */
.choix { position: absolute; right: 0; bottom: 0; max-width: calc(100% - 400px); padding: 6px 12px 6px 14px; background: var(--nuit); }
.choix ul, .choix-tel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 18px; }
.choix a, .choix-tel nav a {
  display: flex; align-items: center; gap: 8px; padding: 2px 4px; font: 20px/28px var(--pixel); color: var(--doux); text-decoration: none; text-transform: uppercase; white-space: nowrap;
}
.choix a:hover, .choix-tel nav a:hover { color: #fff; }
.choix a.choisi, .choix-tel nav a.choisi { color: #fff; }
.choix a:hover .lant, .choix a.choisi .lant, .choix a:focus-visible .lant, .choix-tel nav a:hover .lant, .choix-tel nav a.choisi .lant, .choix-tel nav a:focus-visible .lant { background-image: var(--f2); }
.choix-tel { display: none; }
.choix-tel summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 6px 8px;
  font: 20px/1 var(--pixel); color: var(--lune); text-transform: uppercase;
}
.choix-tel summary::-webkit-details-marker { display: none; }
.choix-tel[open] summary { background: var(--nuit2); }
.choix-tel nav { position: absolute; right: 0; top: 100%; z-index: 5; width: min(92vw, 400px); padding: 12px 10px; background: var(--nuit2); }
.choix-tel nav ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 6px; }
@media (max-width: 479px) { .choix-tel nav ul { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 1199px) {
  .choix { display: none; }
  .choix-tel { display: block; position: absolute; right: 12px; top: 48px; }
}
@media (max-width: 599px) {
  .port { height: 148px; }
  .port::after { background: url(images/voile-tel.png) 12px 0 / 276px 224px no-repeat; }
  .marque { left: 34px; top: 10px; width: 192px; }
  .marque .logo-s { width: 192px; }
  .marque .logo-p { margin-left: 50px; }
  .fictifs { left: 16px; bottom: 4px; max-width: 248px; }
  .langue { top: 8px; right: 10px; }
  .choix-tel { top: 40px; right: 8px; }
}
/* Accueil : le port sans la voile ni le logo (l'écran titre du jeu les montre), la borne monte d'autant */
.page-accueil .port { height: 120px; }
.page-accueil .port::after { display: none; }
.page-accueil .marque { display: none; }
.page-accueil .langue { top: 8px; }
@media (max-width: 1199px) {
  .page-accueil .port { height: 72px; }
  .page-accueil .choix-tel { top: 12px; right: 70px; }
  .page-accueil .langue { top: 20px; }
}
@media (max-width: 599px) {
  .page-accueil .port { height: 112px; }
  .page-accueil .fictifs { bottom: 4px; }
  .page-accueil .choix-tel { top: 2px; right: 60px; }
  .page-accueil .choix-tel nav { right: -52px; }
  .page-accueil .langue { top: 14px; right: 12px; }
}

.rambarde { height: 32px; background: url(images/rambarde.png) 0 0 / 176px 32px repeat-x; }

/* ---------- le pont : la table au centre, la régie de chaque côté ---------- */
.pont { width: 100%; padding: 24px 0 0; }
/* Rails de pub (règle d'Alex du 17/11) : 160 x 600 seulement, au milieu de la marge libre, affichés seulement si elle fait 176 px ou plus
   de chaque côté : accueil 1232 + 2 x 176 = 1584 px, plus 16 px de barre de défilement classique = 1600 px, seuil commun à toutes les pages (campagnes.json). La table garde sa place et sa largeur, à tout zoom. */
@media (min-width: 1212px) {
  .pont { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--large)) minmax(0, 1fr); }
  .pont > main { grid-column: 2; grid-row: 1; }
}
main {
  display: block; width: 100%; max-width: var(--large); margin: 0 auto; padding: 36px 48px 56px; background: var(--feutre);
  clip-path: polygon(40px 0, calc(100% - 40px) 0, 100% 40px, 100% calc(100% - 40px), calc(100% - 40px) 100%, 40px 100%, 0 calc(100% - 40px), 0 40px);
}
@media (max-width: 899px) { main { padding: 28px 20px 48px; } }
@media (max-width: 767px) {
  .pont { padding-top: 0; }
  main { padding: 24px 16px 44px; clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px), 0 16px); }
}

/* Tête de page : titre chromé, chapeau, personnage de la bande assis à droite */
.tete { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.tete-perso { position: relative; padding-bottom: 10px; line-height: 0; }
.tete-perso::after {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: 2px; height: 16px; z-index: -1;
  background: radial-gradient(closest-side, rgba(4, 6, 20, .55), rgba(4, 6, 20, 0));
}
.tete-perso img { position: relative; z-index: 1; }
.surtitre { margin: 0 0 8px; font: 20px/1.2 var(--pixel); text-transform: uppercase; color: var(--laiton); }
.surtitre a { color: var(--laiton); text-decoration: none; }
.surtitre a::before { content: "◀ "; font-family: var(--sans); font-size: 14px; }
/* Rubrique parente : déjà allumée dans le menu quand il est déplié (grand écran), pas de lien en double */
@media (min-width: 1100px) { .surtitre { display: none; } }
h1 { margin: 0; font: 40px/1.25 var(--pixel); text-transform: uppercase; overflow-wrap: normal; }
.chapeau { margin: 16px 0 0; font-size: 20px; line-height: 1.55; color: var(--texte); }
.logo-titre { line-height: 0; }
.logo-titre span[aria-hidden] { display: block; }
.logo-titre img { display: block; }
.logo-titre .logo-p { margin: 8px 0 0 104px; }
.etat-jeu { margin: 18px 0 0; font: 20px/1.3 var(--pixel); color: var(--laiton); text-transform: uppercase; }
.appels { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); justify-content: start; column-gap: 28px; row-gap: 8px; }
.appels a { display: block; padding: 4px 6px 4px 0; font: 30px/1.2 var(--pixel); text-transform: uppercase; color: var(--lune); text-decoration: none; }
.appels a::before { content: "▶"; display: inline-block; width: 26px; color: var(--corail); visibility: hidden; }
.appels li:first-child a::before, .appels a:hover::before { visibility: visible; }
.appels a:hover { color: #fff; }
@media (max-width: 767px) {
  h1 { font-size: 30px; }
  .chapeau { font-size: 18px; }
  .tete { grid-template-columns: minmax(0, 1fr) 66px; gap: 12px; }
  .tete-perso img { width: 66px; height: auto; }
  .appels a { font-size: 20px; }
  .appels a::before { width: 18px; }
  .logo-titre .logo-s { width: 288px; }
  .logo-titre .logo-p { width: 137px; margin-left: 76px; }
  .page-accueil .tete { grid-template-columns: minmax(0, 1fr); }
  .page-accueil .tete-perso { display: none; }
}
@media (max-width: 419px) {
  .tete { grid-template-columns: minmax(0, 1fr); }
  .tete-perso { display: none; }
}
@media (max-width: 359px) { .logo-titre .logo-s { width: 260px; } }


/* ---------- borne de l'accueil : un seul écran de jeu, les cycles tournés dans le jeu passent dedans (attract.js) ----------
   Écran de 384 x 224 pixels du jeu, à l'échelle entière ; jamais plus haut que la fenêtre */
.page-accueil main { max-width: 1232px; padding: 24px 40px 40px; background: none; clip-path: none; }
@media (min-width: 1212px) { .page-accueil .pont { grid-template-columns: minmax(0, 1fr) minmax(0, 1232px) minmax(0, 1fr); } }
/* Échelle entière du jeu (384 x 224) : x1 sur téléphone, x2 dès 768 px de large et 700 px de haut, x3 dès 1232 x 940.
   Sous 384 px seulement, l'écran prend toute la largeur (x0,9375 à 360 px), lissé : x1 couperait le HUD du jeu.
   La marge négative centre l'écran sur la page même quand il déborde la table (téléphone, tablette). */
@media (max-width: 899px) { .page-accueil main { padding: 40px 20px 36px; } }
@media (max-width: 767px) { .page-accueil main { padding: 20px 16px 32px; } }
.borne { container: borne / inline-size; --ecran: min(384px, 100vw); }
@media (min-width: 768px) and (min-height: 700px) { .borne { --ecran: 768px; } }
@media (min-width: 1232px) and (min-height: 940px) { .borne { --ecran: 1152px; } }
.vue {
  position: relative; width: var(--ecran); aspect-ratio: 384 / 224; margin: 0 0 0 calc((100% - var(--ecran)) / 2);
  image-rendering: pixelated; isolation: isolate;
}
.vue-start { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.vue-borne { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: fill; image-rendering: pixelated; display: block; }
/* Vitre bombée du CRT (contour mesuré sur les cycles) : rien de noir autour de l'image, le teck du pont tout autour */
.vue-borne, .vue::after { -webkit-mask: var(--vitre) 0 0 / 100% 100% no-repeat; mask: var(--vitre) 0 0 / 100% 100% no-repeat; }

@media (max-width: 383px) { .vue-borne { image-rendering: auto; } }
/* Écran CRT de la borne : courbure et lignes du rendu CRT du jeu (dans la vidéo) ; reflet de la vitre et lueur des lanternes posés ici */
/* Lumière des lanternes du pont sur le teck : une flaque ovale derrière la vitre, sans bord */
.vue::before { content: ""; position: absolute; top: -14%; right: -9%; bottom: -14%; left: -9%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 186, 110, .34), rgba(255, 176, 96, .14) 72%, rgba(255, 176, 96, 0)); }
@media (max-width: 899px) { .vue::before { right: 0; left: 0; } }
.vue::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 38% at 28% 14%, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 70%),
              radial-gradient(ellipse 90% 90% at 50% 50%, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, 0.35) 100%);
}
.vue-start:focus-visible { background: none; }
.vue-start:focus-visible .vh {
  clip: auto; width: auto; height: auto; left: 50%; bottom: 4%; transform: translateX(-50%); padding: 4px 10px;
  background: var(--laiton); color: var(--nuit); font: 20px/1.2 var(--pixel); text-transform: uppercase;
}
.accroche { max-width: 768px; margin: 16px auto 0; font: 400 20px/1.5 var(--sans); text-align: center; text-transform: none; }
.borne .etat-jeu { margin: 8px 0 0; text-align: center; }
@media (max-width: 767px) { .accroche { font-size: 18px; margin-top: 12px; } }

/* ---------- rubriques ---------- */
.rubrique { margin-top: 56px; }
.tete + .rubrique { margin-top: 36px; }
h2 { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; font: 30px/1.3 var(--pixel); text-transform: uppercase; }
h2 .enseigne { flex: none; }
h3 { margin: 0 0 6px; font: 20px/1.3 var(--pixel); color: var(--lune); text-transform: uppercase; }
p { margin: 0 0 14px; }
.rubrique > :last-child { margin-bottom: 0; }
code { padding: 1px 6px; background: var(--nuit2); color: var(--lune); font: 15px/1.5 ui-monospace, "DejaVu Sans Mono", Menlo, monospace; }
.lie { white-space: nowrap; }
code.empreinte span { margin-right: 0.6ch; }
code.empreinte span:last-child { margin-right: 0; }
kbd { display: inline-block; min-width: 28px; padding: 2px 6px; background: var(--bleu); color: #fff; font: 20px/1.1 var(--pixel); text-align: center; text-transform: uppercase; }
@media (max-width: 767px) { h2 { font-size: 20px; gap: 10px; } .rubrique { margin-top: 44px; } .tete + .rubrique { margin-top: 28px; } }

/* Écrans de la maquette : image entière, sans lissage perdu */
.ecran { margin: 0; }
.ecran img { display: block; width: 100%; image-rendering: auto; }
/* Écrans du jeu : la vitre bombée du CRT seule, comme sur la borne de l'accueil */
.ecran img:not([src*="bande"]) { -webkit-mask: var(--vitre) 0 0 / 100% 100% no-repeat; mask: var(--vitre) 0 0 / 100% 100% no-repeat; }
.ecran figcaption { margin-top: 8px; font-size: 15px; line-height: 1.45; color: var(--doux); }
.duo { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.duo h2 { margin-top: 0; }
/* Table tirée au hasard : sans script, la première (la jonque) reste affichée */
.tirage > .ecran + .ecran { display: none; }
@media (max-width: 899px) { .duo { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

/* Modes et tables : une rangée par mode, l'écran à gauche puis à droite, comme on fait tourner le bouton du donneur */
.modes, .tables { list-style: none; margin: 0; padding: 0; }
.modes > li, .tables > li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; margin-top: 36px; }
.modes > li:first-child, .tables > li:first-child { margin-top: 8px; }
.modes > li:nth-child(even) > .ecran, .tables > li:nth-child(even) > .ecran { order: 2; }
.modes p, .tables p { margin-bottom: 8px; }
@media (max-width: 767px) {
  .modes > li, .tables > li { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 30px; }
  .modes > li:nth-child(even) > .ecran, .tables > li:nth-child(even) > .ecran { order: 0; }
}

/* La bande : chaque adversaire sur son tabouret, son caractère en corail */
.bande { list-style: none; margin: 0; padding: 0; }
.bande li { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 22px; align-items: center; margin-top: 22px; }
.bande .siege { position: relative; line-height: 0; text-align: center; padding-bottom: 8px; }
.bande .siege::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 0; height: 14px; background: radial-gradient(closest-side, rgba(4, 6, 20, .55), rgba(4, 6, 20, 0)); }
.bande .siege img { position: relative; z-index: 1; }
.bande .trait { display: block; margin-bottom: 4px; font: 20px/1.2 var(--pixel); color: var(--corail); text-transform: uppercase; }
.bande p { margin: 0; }
@media (max-width: 479px) { .bande li { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; } .bande .siege img { width: 72px; height: auto; } }

/* Table des gains du vidéo-poker : aplat nuit, ligne gagnante en aplat bleu (comme à l'écran) */
.tableaux { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 899px) { .tableaux { grid-template-columns: minmax(0, 1fr); } }
table.gains { width: 100%; border-collapse: collapse; background: var(--nuit2); font: 20px/1.2 var(--pixel); text-transform: uppercase; }
table.gains caption { padding: 10px 12px 8px; text-align: left; background: var(--nuit2); color: var(--laiton); font: 20px/1.25 var(--pixel); caption-side: top; }
table.gains th, table.gains td { padding: 5px 12px; text-align: left; font-weight: 400; color: var(--doux); }
table.gains td { text-align: right; color: var(--lune); }
table.gains tr.gagne th, table.gains tr.gagne td { background: var(--bleu); color: #fff; }
table.gains tr.gagne th::before { content: "▶"; color: var(--corail); margin-right: 6px; }
table.gains tbody tr:last-child th, table.gains tbody tr:last-child td { padding-bottom: 12px; }

/* Listes de points et de faits */
.points { list-style: none; margin: 0; padding: 0; }
.points li { position: relative; padding-left: 34px; margin-top: 12px; }
.points li::before { content: ""; position: absolute; left: 0; top: 7px; width: 20px; height: 14px; background: url(images/jeton-0.png) 0 0 / 20px 14px no-repeat; }
.points li:nth-child(4n+2)::before { background-image: url(images/jeton-1.png); }
.points li:nth-child(4n+3)::before { background-image: url(images/jeton-2.png); }
.points li:nth-child(4n)::before { background-image: url(images/jeton-3.png); }

/* Plateformes (modèle : page Télécharger de Shanghodrop) : une lanterne de 48 px, le nom en lettrage d'arcade orange, une phrase, l'état */
.plateformes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px 36px; }
.plateformes li { position: relative; min-width: 0; min-height: 48px; padding-left: 64px; }
.plateformes .lant { position: absolute; left: 0; top: 0; }
.plateformes h3 { margin: 0 0 4px; font: 20px/1.3 var(--pixel); }
.plateformes h3 a {
  display: inline-block; text-decoration: none; color: #FFD040;
  background: linear-gradient(180deg, #FFF6DC 0 41.67%, #FFD040 41.67% 58.33%, #FF8A24 58.33%) 0 0 / 100% 1.2em no-repeat; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.plateformes li:hover .lant, .plateformes li:focus-within .lant { background-image: var(--f3); }
.plateformes p { margin: 0 0 6px; color: var(--doux); }
.attente, .dispo { display: block; font: 20px/1 var(--pixel); text-transform: uppercase; white-space: nowrap; }
.attente { color: var(--laiton); }
.dispo { color: #7CE0A0; }

/* Étapes : une pile de jetons qui monte d'un jeton à chaque étape */
.etapes { list-style: none; margin: 0; padding: 0; }
.etapes li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 18px; }
.etapes li > .mise { grid-column: 1; grid-row: 1 / span 3; }
.etapes li > :not(.mise) { grid-column: 2; }
.etapes li { row-gap: 0; }
.mise { display: flex; align-items: flex-end; gap: 8px; line-height: 0; }
.mise-n { font: 30px/1 var(--pixel); color: var(--corail); }
.etapes p { margin: 0; }

/* Touches et réglages : dt en pixel, dd en texte */
.touches { display: grid; grid-template-columns: minmax(140px, auto) minmax(0, 1fr); gap: 10px 22px; margin: 0; }
.touches dt { font: 20px/1.4 var(--pixel); color: var(--lune); text-transform: uppercase; }
.touches dd { margin: 0; }
@media (max-width: 559px) { .touches { grid-template-columns: minmax(0, 1fr); gap: 2px; } .touches dd { margin-bottom: 12px; } }

/* Paquet d'une plateforme : la donne, carte retournée tant que le paquet n'existe pas */
.donne { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; align-items: start; padding: 20px; background: var(--nuit2); }
.donne .etat { margin: 0 0 8px; font: 30px/1.2 var(--pixel); text-transform: uppercase; }
.donne .etat a { text-decoration: none; color: var(--lune); }
.donne .etat a .pointe { visibility: visible; width: 26px; }
.donne p:last-child { margin: 0; }
.donne dl.gains { display: grid; grid-template-columns: fit-content(14em) minmax(0, 1fr); gap: 4px 16px; margin: 12px 0 0; font-size: 16px; }
.donne dl.gains dt { color: var(--doux); }
.donne dl.gains dd { margin: 0; }
.nomfic { overflow-wrap: normal; }
@media (max-width: 559px) { .donne { grid-template-columns: minmax(0, 1fr); } .donne .etat { font-size: 20px; } .donne dl.gains { grid-template-columns: minmax(0, 1fr); } }

/* FAQ : une carte retournée par question, ouverte avec la réponse */
.faq details { margin-top: 10px; }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; align-items: center; padding: 8px 6px; font-weight: 700; color: var(--lune); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--nuit2); }
.q-carte { line-height: 0; }
.q-face, details[open] .q-dos { display: none; }
details[open] .q-face { display: block; }
.faq details > :not(summary) { margin: 6px 0 12px 50px; }
@media (max-width: 479px) { .faq details > :not(summary) { margin-left: 6px; } }

/* Galerie d'images : les écrans les uns sous les autres, en grand */
.galerie { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 24px; }
.galerie > li:first-child { grid-column: 1 / -1; }
@media (max-width: 767px) { .galerie { grid-template-columns: minmax(0, 1fr); } }

/* Vidéos : lecture à la demande, jamais de son automatique ; les cinq clips verticaux tenus en main, en arc comme une main de poker */
.video { margin: 0; }
.video video { display: block; width: 100%; height: auto; background: var(--nuit); }
.video figcaption { margin-top: 8px; font-size: 15px; line-height: 1.45; color: var(--doux); }
.clips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 24px 16px; }
.clips > li { flex: 1 1 150px; max-width: calc(20% - 13px); }
@media (min-width: 900px) { .clips > li:nth-child(2), .clips > li:nth-child(4) { margin-top: 14px; } .clips > li:nth-child(3) { margin-top: 22px; } }
@media (max-width: 899px) { .clips > li { max-width: calc(50% - 8px); } }

/* ---------- régie : créations du store en iframe (site/regie : taille réservée par format), mention Publicité ---------- */
.pub { display: flex; flex-direction: column; align-items: center; }
.pub-mot { margin: 0 0 6px; font: 20px/1 var(--pixel); color: var(--doux); text-transform: uppercase; }
.pub-boite { background: var(--nuit); }
.pub-haut { margin: 40px 0 0; }
.pub-bas { margin: 56px auto 44px; padding: 0 16px; }
.pub-gauche, .pub-droite { display: none; }
@media (min-width: 1600px) { .pub-gauche, .pub-droite { display: flex; position: sticky; top: 24px; align-self: start; justify-self: center; margin-top: 8px; grid-row: 1; } .pub-gauche { grid-column: 1; } .pub-droite { grid-column: 3; } }
@media (max-width: 767px) { .pub-bas { margin: 44px auto 32px; } }

/* ---------- pied : le pont arrière, sous les lanternes ---------- */
.pied { background: var(--teck-f); color: #F4E2C8; }
.pied-in { max-width: 1100px; margin: 0 auto; padding: 40px 16px 32px; }
.pied-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 640px; margin: 0 auto; }
.pied-titre { margin: 0 0 10px; font: 20px/1.2 var(--pixel); color: var(--laiton); text-transform: uppercase; }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin: 6px 0; font-size: 16px; }
.pied a { color: #F4E2C8; }
.pied a:hover { color: var(--corail); }
.pied-lanternes { display: flex; justify-content: center; gap: 70px; margin: 34px 0 16px; line-height: 0; }
@media (prefers-reduced-motion: no-preference) {
  .pied-lanternes picture { display: block; }
  .pied-lanternes img { animation: houle 2.4s steps(3) infinite alternate; }
  .pied-lanternes picture:nth-child(even) img { animation-delay: -1.2s; }
  .tete-perso img, .bande .siege img { animation: souffle 3.2s steps(1) infinite; }
  .bande li:nth-child(even) .siege img { animation-delay: -1.6s; }
}
@keyframes houle { from { transform: translate(-2px, 0); } to { transform: translate(2px, 2px); } }
@keyframes souffle { 50% { transform: translateY(2px); } }
.pied-bas { margin: 0; font-size: 14px; line-height: 1.55; color: #D9C2A2; text-align: center; }
@media (max-width: 479px) { .pied-cols { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .port::before { animation: none; }
}
@media print {
  .pub, .choix, .choix-tel, .rambarde, .tete-perso { display: none !important; }
  body { background: #fff; color: #000; }
  main { clip-path: none; background: #fff; }
  .chrome { -webkit-text-fill-color: #000; background: none; }
}
