/* Shanghokite : le festival de nuit du port (maquette M2 LANTERNES DU PORT). Aplats, lanternes, flaques de lumière à deux paliers. */
@font-face {
  font-family: "Lanterne";
  src: url("/statique/polices/lanterne-5x7.woff2") format("woff2");
  font-display: swap;
}
/* Chinois, japonais, coréen : glyphes 10 px de Fusion Pixel Font (OFL 1.1), une police par langue, chargée seulement si la page en a besoin */
@font-face {
  font-family: "Lanterne CJK ja";
  src: url("/statique/polices/lanterne-ja.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Lanterne CJK ko";
  src: url("/statique/polices/lanterne-ko.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Lanterne CJK zh-Hans";
  src: url("/statique/polices/lanterne-zh-hans.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Lanterne CJK zh-Hant";
  src: url("/statique/polices/lanterne-zh-hant.woff2") format("woff2");
  font-display: swap;
}
:root {
  --noir: #080612; --nuit: #0E1028; --eau: #101C3C; --eau2: #1C305A; --eau3: #2C4678;
  --bois: #22161E; --bois2: #3E2828; --ambre: #FFA83A; --ambre-f: #A85422; --rouge: #EC3E34; --rouge-f: #841E2C;
  --jade: #54DEA0; --jade-f: #186C5A; --lilas: #C8A8FF; --blanc: #FFF6D6; --jaune: #FFE262; --papier: #FFCE8E;
  --lotus: #F07896; --lotus2: #FFCED6; --lune: #FFF0C8; --lune-f: #DCC8A0;
  --doux: #C9C2D8;
  --flaque1: #22305E; --flaque2: #2B3B70;
  --pixel: "Lanterne", ui-monospace, monospace;
  --texte: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --large: 1100px;
  color-scheme: dark;
}
:root:lang(ja) { --pixel: "Lanterne", "Lanterne CJK ja", ui-monospace, monospace; }
:root:lang(ko) { --pixel: "Lanterne", "Lanterne CJK ko", ui-monospace, monospace; }
:root:lang(zh-Hans) { --pixel: "Lanterne", "Lanterne CJK zh-Hans", ui-monospace, monospace; }
:root:lang(zh-Hant) { --pixel: "Lanterne", "Lanterne CJK zh-Hant", ui-monospace, monospace; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; color: var(--blanc); font: 17px/1.62 var(--texte);
  background: var(--eau) url("/statique/images/eau.png") 0 0 / 288px 144px repeat;
  image-rendering: pixelated; overflow-x: hidden;
}
img { image-rendering: pixelated; max-width: 100%; height: auto; }
img[src$=".webp"], img[src$=".jpg"] { image-rendering: auto; }
a { color: var(--jaune); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--papier); }
a:focus-visible, summary:focus-visible { outline: none; background: var(--jaune); color: var(--noir); }
.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(--jaune); color: var(--noir); font-weight: 700; }
.saut:focus { top: 12px; }
code { font: 0.92em/1.4 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; overflow-wrap: anywhere; color: var(--papier); }
kbd { font: 700 0.9em var(--texte); color: var(--noir); background: var(--papier); padding: 0 6px; white-space: nowrap; }

/* ---------- ciel de l'en-tête : logo, langue, guirlande de lanternes ---------- */
.ciel {
  position: relative;
  background:
    url("/statique/images/etoiles.png") 0 0 / 320px 160px repeat,
    linear-gradient(to bottom, var(--noir) 0, var(--nuit) 45%, #141A3E 100%);
}
.ciel > * { position: relative; z-index: 1; }
.ciel > .rive { z-index: 0; }
.ciel-haut { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1280px; margin: 0 auto; padding: 18px 16px 0; }
.marque { display: inline-flex; gap: 8px; align-items: flex-end; line-height: 0; }
.marque img { width: auto; height: 39px; }
.marque:focus-visible { background: var(--jaune); }
/* Langues : une lanterne de papier rouge porte le code de la langue ; ouverte, la guirlande des langues sur un aplat de bois, la langue en cours allumée */
.langues { position: relative; }
.langues summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; background: var(--rouge-f); color: var(--papier); font: 20px/1 var(--pixel); }
.langues summary::-webkit-details-marker { display: none; }
.langues summary img { width: 32px; height: 32px; }
.langues summary:hover, .langues[open] summary { background: var(--rouge); color: var(--blanc); }
.langues summary:focus-visible { background: var(--jaune); color: var(--noir); }
.langues nav { position: absolute; right: 0; top: 100%; z-index: 20; width: min(560px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; background: var(--bois); padding: 10px 12px 12px; }
.langues ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.langues a { display: flex; align-items: center; gap: 8px; padding: 6px 4px; color: var(--doux); text-decoration: none; font: 15px/1.2 var(--texte); }
.langues a img { width: 16px; height: 16px; flex: none; }
.langues a:hover { color: var(--papier); background: var(--bois2); }
.langues a.allumee { color: var(--jaune); }
.langues a:focus-visible { background: var(--jaune); color: var(--noir); }
@media (max-width: 599px) { .langues ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } .langues a { gap: 6px; padding: 6px 2px; } }
.guirlande { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.guirlande ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; gap: 4px; }
.guirlande a {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 12px;
  text-decoration: none; color: var(--doux);
}
.guirlande .l { position: relative; line-height: 0; }
.guirlande .l img { width: 48px; height: 48px; }
.guirlande .l-survol { position: absolute; left: 0; top: 0; opacity: 0; }
.guirlande a:hover .l-survol, .guirlande a:focus-visible .l-survol { opacity: 1; }
.guirlande .t { font: 20px/1 var(--pixel); letter-spacing: 0; white-space: nowrap; }
.guirlande a.allumee { color: var(--jaune); }
.guirlande a:hover { color: var(--papier); }
.guirlande a:focus-visible { background: var(--jaune); color: var(--noir); }
/* Le port au pied du ciel, à l'échelle 1 ; absent de l'accueil, où l'écran titre du jeu le montre déjà */
.rive { height: 100px; margin-top: 0; background: url("/statique/images/port.png") 50% 100% / 640px 100px repeat-x; }
.page-accueil .rive { display: none; }
.page-accueil .ciel-haut { justify-content: flex-end; }

/* Menu sur téléphone et tablette : une grande lanterne, puis la liste en deux colonnes */
.lampion { display: none; max-width: 1280px; margin: 0 auto; padding: 4px 16px 0; }
.lampion summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 12px; padding: 6px 8px 6px 0; font: 20px/1 var(--pixel); color: var(--jaune); }
.lampion summary::-webkit-details-marker { display: none; }
.lampion summary img { width: 48px; height: 48px; }
.lampion ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
.lampion a { display: flex; align-items: center; gap: 10px; padding: 8px 4px; font: 20px/1 var(--pixel); color: var(--doux); text-decoration: none; }
.lampion a.allumee { color: var(--jaune); }
.lampion a img { width: 32px; height: 32px; }
@media (max-width: 1000px) {
  .guirlande { display: none; }
  .lampion { display: block; }
}

/* ---------- quai : contenu, côtés de la régie ---------- */
.quai { width: 100%; }
main { display: block; width: 100%; max-width: calc(var(--large) + 32px); margin: 0 auto; padding: 0 16px 24px; }
/* 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é du contenu (--large) : 1100 + 2 x 176 = 1452 px. Le contenu garde sa place et sa largeur ; à tout zoom, la largeur en px CSS décide. */
@media (min-width: 1452px) {
  .quai { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, calc(var(--large) + 32px)) minmax(0, 1fr); }
  .quai > main { grid-column: 2; grid-row: 1; }
}

/* ---------- tête de page : titre sur l'eau et son reflet, Shangho en vol au-dessus d'une flaque de lumière ---------- */
.tete { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; padding: 24px 0 8px; }
.tete-texte { min-width: 0; }
.surtitre { margin: 0 0 14px; font: 20px/1.2 var(--pixel); color: var(--ambre); }
.surtitre a { color: var(--ambre); }
h1, h2, h3 { font-family: var(--pixel); font-weight: 400; letter-spacing: 0; text-wrap: balance; }
h1 {
  position: relative; margin: 0 0 46px; font-size: 40px; line-height: 1.1; color: var(--papier);
}
h1::after, h2::after {
  content: attr(data-reflet) / ""; position: absolute; left: 0; right: 0; top: 100%; pointer-events: none;
  transform: translateY(50%) scaleY(-0.5); transform-origin: 50% 0; color: var(--papier); opacity: .3;
  -webkit-mask: repeating-linear-gradient(to bottom, #000 0 2px, transparent 2px 4px);
  mask: repeating-linear-gradient(to bottom, #000 0 2px, transparent 2px 4px);
}
.chapeau { margin: 0; max-width: 640px; font-size: 20px; line-height: 1.55; color: var(--blanc); }
.tete-scene {
  position: relative; display: flex; align-items: flex-end; justify-content: center; min-width: 200px; padding-bottom: 28px;
  background: radial-gradient(ellipse 120px 20px at 50% 92%, var(--flaque2), var(--flaque1) 55%, transparent 100%);
}
.tete-scene img { display: block; }
.vol { display: block; animation: vol 4.8s steps(8) infinite; }
@keyframes vol { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .vol { animation: none; } }

/* Accueil : la borne. L'écran titre du jeu, son texte qui clignote, puis la démo sur le même écran ; échelle entière dès 480 px */
.tete-accueil { display: block; padding: 16px 0 0; }
.borne { container-type: inline-size; overflow-x: clip; }  /* lueur de ::before : jamais de défilement horizontal sur téléphone */
.ecran-borne { position: relative; z-index: 1; width: 100%; aspect-ratio: 16 / 9; margin: 0 auto; isolation: isolate; }
/* Lumière des lanternes du port : une flaque ovale derrière l'écran, sans bord ; ni aplat ni vignette autour de l'image du jeu */
.ecran-borne::before { content: ""; position: absolute; top: -12%; right: -8%; bottom: -12%; left: -8%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(255, 176, 80, .26), rgba(255, 150, 60, .1) 72%, rgba(255, 150, 60, 0)); }
/* Sous 600 px, la lueur s'arrête au bord de l'écran (gouttière de 16 px) : aucun défilement horizontal */
@media (max-width: 600px) { .ecran-borne::before { left: -16px; right: -16px; } }
/* Décor animé du port (sprites animés du jeu) : lotus qui dansent sur l'eau, lanternes de papier qui montent, derrière l'écran */
.borne { position: relative; }
.decor { position: absolute; top: -40px; bottom: -40px; left: calc(50% - 50vw); width: 100vw; overflow: hidden; pointer-events: none; }
.decor img { position: absolute; image-rendering: pixelated; }
.decor .lo { width: 26px; height: 50px; bottom: 6%; }
.lo1 { left: 4%; } .lo2 { left: 12%; bottom: 22% !important; } .lo3 { right: 11%; bottom: 16% !important; } .lo4 { right: 4%; }
.decor .lc { width: 32px; height: 32px; bottom: -34px; }
.lc1 { left: 7%; } .lc2 { left: 15%; } .lc3 { right: 15%; } .lc4 { right: 6%; }
@media (max-width: 999px) { .decor { display: none; } }
@media (prefers-reduced-motion: no-preference) {
  .decor .lo { animation: flotte 3.2s steps(4) infinite alternate; }
  .lo2, .lo4 { animation-delay: -1.6s !important; }
  .decor .lc { animation: monte 26s steps(260) infinite; }
  .lc2 { animation-delay: -9s !important; } .lc3 { animation-delay: -15s !important; } .lc4 { animation-delay: -21s !important; }
  .guirlande .l img { animation: balance 2.8s steps(2) infinite alternate; }
  .guirlande li:nth-child(even) .l img { animation-delay: -1.4s; }
  .ciel::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; background: url("/statique/images/etoiles.png") 160px 80px / 320px 160px repeat; animation: scintille 1.04s steps(1) infinite; }
  /* Eau du port : un second jeu de rides décalé qui s'allume et s'éteint, la surface bouge partout */
  body::before { content: ""; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: -1; pointer-events: none; background: url("/statique/images/eau.png") 6px 3px / 288px 144px repeat; animation: houle 1.3s steps(1) infinite; }
  .guirlande a:hover .t { animation: allume .24s linear both; }
  h1::after, h2::after { animation: onde 1.6s steps(2) infinite alternate; }
}
@media (prefers-reduced-motion: reduce) { .decor { display: none; } }
@keyframes flotte { from { transform: translateY(0); } to { transform: translateY(-6px); } }
@keyframes monte { from { transform: translateY(0); } to { transform: translateY(-110vh); } }
@keyframes balance { from { transform: translate(-1px, 0); } to { transform: translate(1px, -2px); } }
@keyframes scintille { 50% { opacity: 0; } }
@keyframes houle { 50% { opacity: 0; } }
@keyframes onde { from { translate: -2px 0; } to { translate: 2px 0; } }
@keyframes allume { 0%, 49% { color: var(--blanc); } 50%, to { color: var(--papier); } }
/* Le rendu CRT du jeu est dans la vidéo ; la vitre bombée du tube découpée (superellipse), rien de noir autour ; reflet posé ici, sans cadre */
.ecran-borne { --vitre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 810' preserveAspectRatio='none'%3E%3Cpolygon points='1435 405 1435 589 1433 629 1431 656 1428 677 1424 694 1419 709 1413 722 1406 733 1398 743 1389 752 1379 760 1368 767 1355 774 1340 779 1324 784 1307 789 1286 793 1263 796 1237 799 1206 801 1168 803 1120 804 1048 805 720 805 392 805 320 804 272 803 234 801 203 799 177 796 154 793 133 789 116 784 100 779 85 774 72 767 61 760 51 752 42 743 34 733 27 722 21 709 16 694 12 677 9 656 7 629 5 589 5 405 5 221 7 181 9 154 12 133 16 116 21 101 27 88 34 77 42 67 51 58 61 50 72 43 85 36 100 31 116 26 133 21 154 17 177 14 203 11 234 9 272 7 320 6 392 5 720 5 1048 5 1120 6 1168 7 1206 9 1237 11 1263 14 1286 17 1307 21 1324 26 1340 31 1355 36 1368 43 1379 50 1389 58 1398 67 1406 77 1413 88 1419 101 1424 116 1428 133 1431 154 1433 181 1435 221'/%3E%3C/svg%3E"); }
.vue-borne, .ecran-borne::after { -webkit-mask: var(--vitre) 0 0 / 100% 100% no-repeat; mask: var(--vitre) 0 0 / 100% 100% no-repeat; }
.ecran-borne::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, .10), rgba(255, 255, 255, 0) 70%); }
.vue-borne { position: absolute; left: 0; top: 0; display: block; width: 100%; height: 100%; max-width: none; }
.ecran-borne .start { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
/* START pris au clavier : l'écran s'allume, rien par-dessus la vidéo (un aplat sur une vidéo en plan matériel cache l'image) */
.ecran-borne .start:focus-visible { background: none; }
.ecran-borne:has(.start:focus-visible) .vue-borne { filter: brightness(1.2) saturate(1.15); }
@container (min-width: 480px) { .ecran-borne { width: 480px; } }
@container (min-width: 960px) {
  @media (min-height: 760px) { .ecran-borne { width: 960px; } }
}
.tete-accueil .tete-texte { max-width: 960px; margin: 14px auto 0; }
.tete-accueil .chapeau { max-width: none; font-size: 18px; }
.etat-jeu { font: 20px/1.4 var(--pixel); color: var(--jade); margin: 10px 0 0; }

/* ---------- rubriques ---------- */
.rubrique { margin: 84px 0 0; }
/* Première rubrique : le contenu de la page tout de suite sous son titre */
.tete + .rubrique { margin-top: 40px; }
.rubrique > p, .rubrique > ul:not(.niveaux):not(.defile), .rubrique > ol:not(.etapes), .rubrique > dl { max-width: 760px; }
h2 { position: relative; margin: 0 0 40px; font-size: 30px; line-height: 1.15; color: var(--ambre); }
h3 { margin: 0 0 6px; font-size: 20px; line-height: 1.3; color: var(--jade); }
p { margin: 0 0 14px; }
.doux { color: var(--doux); }
.rubrique ul { padding-left: 22px; }
.rubrique li { margin: 0 0 6px; }
.rubrique li::marker { color: var(--ambre); }

/* Rangées : titre à gauche, détail à droite sur grand écran */
.rangs { display: grid; gap: 22px; margin: 0; }
.rang { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: baseline; }
.rang h3 { margin: 0; }
.rang p { margin: 0; color: var(--blanc); }
.rang p + p { margin-top: 8px; }

/* Scène et texte côte à côte */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 36px; align-items: start; }
.duo > div > :last-child { margin-bottom: 0; }

/* Écran de jeu : l'image seule, sans cadre ; légende dessous */
figure { margin: 0; }
.ecran img { display: block; width: 100%; height: auto; }
.ecran figcaption { margin-top: 10px; font-size: 15px; color: var(--doux); }
.galerie { display: grid; gap: 40px; }
/* Vidéos : l'image seule, sans cadre ; clips verticaux côte à côte, deux par ligne sur téléphone */
.ecran video, .clip video { display: block; width: 100%; height: auto; background: #07040f; }
.pellicule { display: flex; flex-wrap: wrap; gap: 24px; }
.clip { flex: 0 1 calc(50% - 12px); max-width: 240px; min-width: 0; }
.clip figcaption { margin-top: 10px; font-size: 15px; color: var(--doux); }

/* Niveaux : numéro en grand, comme l'annonce d'un niveau à l'écran */
.niveaux { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.niveaux li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 18px; align-items: start; margin: 0; }
.niveaux .num { font: 40px/1 var(--pixel); color: var(--rouge); padding-top: 4px; }
.niveaux h3 { color: var(--papier); }
.niveaux p { margin: 0; }
.niveaux .boss { color: var(--lilas); }

/* Défilé des personnages : le sprite à gauche, sur sa petite flaque */
.defile { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px; }
.defile li { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 22px; align-items: center; margin: 0; }
.defile .spr {
  display: flex; align-items: flex-end; justify-content: center; min-height: 110px; padding-bottom: 10px;
  background: radial-gradient(ellipse 60px 12px at 50% 90%, var(--flaque2) 0 50%, var(--flaque1) 50% 100%, transparent 100%);
}
.defile p { margin: 0; }
.points { font: 20px/1 var(--pixel); color: var(--jaune); white-space: nowrap; }

/* Valeurs : nom et chiffre, alignés comme le score du HUD */
.valeurs { margin: 0; display: grid; grid-template-columns: minmax(0, max-content) max-content; gap: 10px 36px; align-items: baseline; }
.valeurs dt { color: var(--blanc); }
.valeurs dd { margin: 0; font: 20px/1 var(--pixel); color: var(--jaune); text-align: right; }

/* Chaîne des lanternes : chaque maillon vaut plus */
.chaine { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 22px; padding: 0 !important; margin: 0 0 18px; }
.chaine li { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; font: 20px/1 var(--pixel); color: var(--jaune); }
.chaine li img { width: 18px; height: 32px; }

/* Étapes : un pétard rouge porte le numéro */
.etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; max-width: 760px; }
.etapes > li { position: relative; padding-left: 58px; min-height: 44px; margin: 0; min-width: 0; }
.etapes .petard {
  position: absolute; left: 6px; top: 2px; width: 30px; height: 40px; display: flex; align-items: center; justify-content: center;
  font: 20px/1 var(--pixel); color: var(--blanc);
  background: linear-gradient(var(--jaune) 0 4px, var(--rouge) 4px calc(100% - 4px), var(--ambre-f) calc(100% - 4px));
}
.etapes .petard::before { content: ""; position: absolute; left: 13px; top: -8px; width: 4px; height: 8px; background: var(--ambre); }
.etapes h3 { margin: 0 0 4px; color: var(--papier); overflow-wrap: break-word; }
.etapes p { margin: 0; }

/* Flaque de lumière à deux paliers sous une lanterne : l'encart du site */
.flaque {
  position: relative; max-width: 760px; padding: 56px 28px 26px; margin: 8px 0 0;
  background: radial-gradient(ellipse 72% 80% at 50% 0, var(--flaque2) 0 52%, var(--flaque1) 52% 100%, transparent 100%);
}
.flaque-lanterne { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 64px; height: 64px; }
.flaque .etat { font: 30px/1.2 var(--pixel); color: var(--jaune); margin: 10px 0 10px; text-align: center; overflow-wrap: anywhere; }
.flaque.bientot .etat { color: var(--lilas); }
.flaque > p { text-align: center; }
.flaque .etat a { color: var(--jaune); }
.flaque .etat a .nomfic { overflow-wrap: normal; }
@media (max-width: 767px) { .flaque .etat:has(.nomfic) { font-size: 22px; overflow-wrap: normal; } }
.fiche { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 14px 0 0; }
.fiche dt { color: var(--doux); }
.fiche dd { margin: 0; }
.encart { max-width: 760px; padding: 40px 28px 22px;
  background: radial-gradient(ellipse 70% 90% at 50% 0, var(--flaque2) 0 45%, var(--flaque1) 45% 100%, transparent 100%); }
.encart > :last-child { margin-bottom: 0; }

/* Plateformes : lanterne allumée quand le paquet existe */
.plateformes { list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 22px; max-width: 860px; }
.plateformes li { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 18px; align-items: baseline; margin: 0; }
.plateformes h3 { margin: 0; }
.plateformes h3 a { color: var(--papier); }
.plateformes p { margin: 4px 0 0; color: var(--doux); }
.attente { font: 20px/1 var(--pixel); color: var(--lilas); }
.dispo { font: 20px/1 var(--pixel); color: var(--jade); }

/* Commandes : une liste par manière de jouer */
.touches { margin: 0; display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 10px 26px; max-width: 760px; }
.touches dt { color: var(--papier); }
.touches dd { margin: 0; }

/* FAQ : la lanterne de chaque question s'allume quand elle s'ouvre */
.questions { max-width: 820px; }
.questions details { margin: 0 0 6px; }
.questions summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 10px 4px; font-weight: 700; font-size: 18px; color: var(--papier);
}
.questions summary::-webkit-details-marker { display: none; }
.q-lanterne { position: relative; line-height: 0; width: 32px; height: 32px; }
.q-lanterne img { width: 32px; height: 32px; }
.q-lanterne .allumee { position: absolute; left: 0; top: 0; opacity: 0; }
.questions details[open] .q-lanterne .allumee, .questions summary:hover .q-lanterne .allumee { opacity: 1; }
.questions details[open] summary { color: var(--jaune); }
.questions details > :not(summary) { margin: 4px 0 18px 48px; }

/* Tableau simple (licences) */
.tableau { width: 100%; max-width: 860px; border-collapse: collapse; }
.tableau th { font: 20px/1.2 var(--pixel); color: var(--ambre); text-align: left; padding: 0 16px 10px 0; font-weight: 400; }
.tableau td { padding: 8px 16px 8px 0; vertical-align: top; }
.tableau tr:nth-child(even) td { background: rgba(28, 48, 90, 0.55); }

/* ---------- 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(--lilas); }
.pub-boite { background: var(--nuit); }
.pub-haut { margin: 40px 0 8px; }
.pub-bas { margin: 64px auto 40px; padding: 0 16px; }
.pub-gauche, .pub-droite { display: none; }
@media (min-width: 1452px) { .pub-gauche, .pub-droite { display: flex; position: sticky; top: 24px; align-self: start; justify-self: center; margin-top: 40px; grid-row: 1; } .pub-gauche { grid-column: 1; } .pub-droite { grid-column: 3; } }
@media (max-width: 767px) { .pub-bas { margin: 48px auto 32px; } }

/* ---------- pied : la nuit au fond du port, lotus sur l'eau ---------- */
.pied { background: var(--nuit) url("/statique/images/nuit.png") 0 0 / 288px 144px repeat; padding: 48px 16px 36px; }
.pied-in { max-width: 1100px; margin: 0 auto; position: relative; }
.pied-lotus { position: absolute; right: 0; top: -84px; width: 33px; height: 75px; }
.pied-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.pied-titre { font: 20px/1.2 var(--pixel); color: var(--ambre); margin: 0 0 12px; }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin: 0 0 8px; }
.pied a { color: var(--blanc); text-decoration: none; }
.pied a:hover { color: var(--jaune); text-decoration: underline; }
.pied-bas { margin: 36px 0 0; font-size: 15px; color: var(--doux); }
.pied-bas a { color: var(--doux); text-decoration: underline; }

/* ---------- tablette ---------- */
@media (max-width: 1023px) {
  .guirlande .t { font-size: 20px; }
  .guirlande a { padding: 8px 2px 10px; }
  .duo { grid-template-columns: minmax(0, 1fr); }
  .rang { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}
/* ---------- téléphone ---------- */
@media (max-width: 767px) {
  body { font-size: 16px; }
  .marque img { height: 26px; }
  .ciel-haut { padding-top: 14px; }
  .rive { margin-top: -10px; }
  .tete { padding-top: 18px; gap: 8px; align-items: start; }
  .tete-scene { min-width: 0; padding-bottom: 10px; background-size: 100% 100%; }
  .tete-scene img { max-height: 64px; width: auto; }
  .tete-accueil { padding-top: 10px; }
  h1 { font-size: 30px; margin-bottom: 34px; }
  .chapeau { font-size: 18px; }
  h2 { font-size: 20px; margin-bottom: 30px; }
  .rubrique { margin-top: 64px; }
  .tete + .rubrique { margin-top: 28px; }
  .niveaux li { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .niveaux .num { font-size: 30px; }
  .defile li { grid-template-columns: 90px minmax(0, 1fr); gap: 14px; }
  .defile .spr img { max-width: 80px; height: auto; }
  .touches { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .touches dd { margin-bottom: 10px; }
  .plateformes li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .flaque { padding: 56px 14px 20px; }
  .encart { padding: 36px 16px 18px; }
  .fiche { grid-template-columns: minmax(0, 1fr); }
  .questions details > :not(summary) { margin-left: 0; }
  .pied-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .valeurs { gap: 8px 18px; }
  .tableau th, .tableau td { padding-right: 10px; font-size: 15px; }
}
/* Petit téléphone : « TÉLÉCHARGER » mesure 186 px en police 20 px, deux colonnes ne tiennent qu'à partir de 420 px */
/* Téléphone : la table des licences se lit rang par rang, sans colonne trop étroite pour un mot long */
@media (max-width: 599px) {
  .licences thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .licences tr { display: block; padding: 8px 0; }
  .licences tr:nth-child(even) { background: rgba(28, 48, 90, 0.55); }
  .licences tr:nth-child(even) td { background: none; }
  .licences td { display: block; padding: 0 10px 2px; }
}
@media (max-width: 419px) {
  /* Titre à côté du dessin : 26 px pour les mots longs (« operētājsistēmā », « Конфіденційність ») */
  h1 { font-size: 26px; }
  .lampion ul { grid-template-columns: minmax(0, 1fr); }
  .pied-cols { column-gap: 12px; }
}
@media (max-width: 359px) {
  .pied-cols { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .pub, .guirlande, .rive, .tete-scene { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Aucun mot coupé (#177) : mots à tiret ou en katakana jamais coupés ; coréen par mot entier ; japonais par groupe de sens */
.mot { white-space: nowrap; }
:lang(ko) { word-break: keep-all; }
:lang(ja) { word-break: auto-phrase; }
