/* Shanghodrop : la ruelle du marché de nuit (maquette M1). Ciel tramé, façades, guirlandes, lanternes, perche de bambou, police 5 x 7 du jeu.
   Aucun cadre, aucune tuile arrondie, aucune ombre portée, aucun liseré : aplats, sprites du jeu, couleur du texte. */
@font-face { font-family: "Ruelle"; src: url("ruelle.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ciel0: #0e0620; --ciel1: #1c0c34; --ciel2: #341444; --ciel3: #5a1e46;
  --puits: rgba(12, 4, 24, .86); --mur-a: #341634; --mur-b: #28183e; --rue: #22102a; --nuit: #120624;
  --creme: #fff6dc; --doux: #cdbedf; --or: #ffd040; --orange: #ff8a24; --prune: #2a0a1e; --laque: #7a1424;
  --jade: #4ad88e; --azur: #5ab4ff; --rouge: #ff5a3a; --lilas: #c8b0f0; --corde: #c8a878;
  --pixel: "Ruelle", ui-monospace, monospace;
  --texte: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; min-height: 100vh; background: var(--ciel0); color: var(--creme); font: 17px/1.6 var(--texte); overflow-x: hidden; }
/* Ciel de la ruelle, fixe derrière tout le site */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--ciel0) url("art/ciel.png") center top / cover no-repeat; image-rendering: pixelated; }
img { max-width: 100%; height: auto; }
.pix, .tete-shangho, .pied-shangho, .action img, .paquet > img, .couleurs img, summary img { image-rendering: pixelated; }
a { color: var(--or); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--creme); }
:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }
code { font: .92em ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", monospace; background: var(--mur-b); padding: .1em .35em; overflow-wrap: anywhere; }
sup { line-height: 0; }
.aller { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 8px 12px; background: var(--or); color: var(--prune); font-weight: 700; }
.aller:focus { top: 8px; }

/* Lettrage laqué du jeu : police 5 x 7 grasse, trois bandes (crème, or, orange), contour prune d'un pixel */
.px, h1, h2, .surtitre, .termes dt, .etapes > li::before, .marque, .langue, .menu summary, .perche a, .pied h2, .paquet-etat, .plateformes a, .touches thead th, .action, .contact, .suite-lien a {
  --c1: #fff6dc; --c2: #ffd040; --c3: #ff8a24; --p: 2px; --k: var(--prune);
  font-family: var(--pixel); font-weight: 700; text-transform: uppercase; letter-spacing: 0; line-height: 1.2;
  color: transparent; background: linear-gradient(180deg, var(--c1) 0 41.67%, var(--c2) 41.67% 58.33%, var(--c3) 58.33% 100%) 0 0 / 100% 1.2em repeat-y;
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(var(--p) 0 0 var(--k)) drop-shadow(calc(-1 * var(--p)) 0 0 var(--k)) drop-shadow(0 var(--p) 0 var(--k)) drop-shadow(0 calc(-1 * var(--p)) 0 var(--k));
}
h1 { --p: 4px; font-size: 40px; margin: 0 0 16px; overflow-wrap: anywhere; }
h2 { --p: 3px; font-size: 30px; margin: 0 0 20px; overflow-wrap: anywhere; }
h3 { font-size: 1.12rem; line-height: 1.35; margin: 0 0 4px; color: var(--creme); }
p { margin: 0 0 14px; }
/* Couleurs du HUD de M1 */
.surtitre { --c1: #e8fff0; --c2: #7ae8a0; --c3: #20a868; font-size: 20px; margin: 0 0 12px; }
.surtitre a { color: inherit; text-decoration-color: #7ae8a0; }
.termes dt { --c1: #f0e8ff; --c2: #c8b0f0; --c3: #9a7ad0; font-size: 20px; }

/* En-tête : guirlande de lanternes, enseigne, langue */
.entete { position: relative; padding: 46px 16px 0; background: url("art/guirlande.png") 0 0 / 384px 48px repeat-x; image-rendering: pixelated; }
.entete-haut { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; max-width: 1240px; margin: 0 auto; }
.marque { --p: 3px; font-size: 30px; text-decoration: none; display: inline-flex; align-items: baseline; }
.marque span { background: inherit; -webkit-background-clip: text; background-clip: text; }
.marque-drop { --c1: #fff6dc; --c2: #ff6a3a; --c3: #c81e3a; background: linear-gradient(180deg, #fff6dc 0 41.67%, #ff6a3a 41.67% 58.33%, #c81e3a 58.33% 100%) 0 0 / 100% 1.2em !important; -webkit-background-clip: text !important; background-clip: text !important; }
.langue { --c1: #f0e8ff; --c2: #c8b0f0; --c3: #9a7ad0; font-size: 20px; text-decoration: none; }
.langue:hover { --c1: #fff6dc; --c2: #ffd040; --c3: #ff8a24; }

/* Menu : chaque rubrique pend à la perche de bambou par une corde ; la rubrique ouverte a sa lanterne en feu */
.menu { max-width: 1240px; margin: 14px auto 0; }
.menu summary { --p: 2px; font-size: 20px; cursor: pointer; list-style: none; display: none; align-items: center; gap: 10px; width: max-content; padding: 6px 0; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary img { width: 32px; height: 32px; filter: none; }
.perche { display: flex; flex-wrap: wrap; justify-content: center; margin: 0; padding: 0; list-style: none; }
.perche li { background: url("art/perche.png") 0 0 / 39px 12px repeat-x; padding: 0 10px 8px; image-rendering: pixelated; }
.perche a { --c1: #f0e8ff; --c2: #c8b0f0; --c3: #9a7ad0; font-size: 20px; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 4px; }
.nav-lanterne { display: block; width: 32px; height: 48px; background: var(--l) center bottom / 32px 32px no-repeat, linear-gradient(var(--corde), var(--corde)) center 12px / 3px 6px no-repeat; image-rendering: pixelated; }
.perche li.allume a, .perche a:hover, .perche a:focus-visible { --c1: #fff6dc; --c2: #ffd040; --c3: #ff8a24; }
.perche li.allume .nav-lanterne, .perche a:hover .nav-lanterne, .perche a:focus-visible .nav-lanterne { background-image: var(--lf), linear-gradient(var(--corde), var(--corde)); }

/* La ruelle : le contenu est le puits sombre ; à partir de 1280 px, une façade de chaque côté porte une annonce */
.ruelle { position: relative; }
main { display: block; max-width: 1040px; margin: 0 auto; padding: 32px 16px 56px; background: var(--puits); }
.facade { display: none; }
.fil ol { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 20px; padding: 0; list-style: none; font-size: .9rem; color: var(--doux); }
.fil li + li::before { content: "›"; margin-right: 10px; color: var(--lilas); }

/* Tête de page : texte, Shangho debout sur les pavés, toits au loin */
.tete { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px; margin: -32px -16px 0; padding: 32px 16px 60px;
  background: url("art/rue.png") 0 100% / 120px 48px repeat-x, url("art/toits.png") 0 calc(100% - 40px) / 768px 148px repeat-x; image-rendering: pixelated; }
.tete-texte { min-width: 0; padding-bottom: 28px; }
.tete .chapo { font-size: 1.2rem; color: var(--creme); }
.tete-shangho { width: 108px; height: 120px; margin-bottom: -12px; }
.titre-jeu { --p: 4px; font-size: 40px; display: flex; flex-direction: column; align-items: flex-start; }
.titre-jeu span { background: inherit; -webkit-background-clip: text; background-clip: text; }
.titre-shangho { font-size: 40px; background: linear-gradient(180deg, #fff6dc 0 41.67%, #ffd040 41.67% 58.33%, #ff8a24 58.33% 100%) 0 0 / 100% 1.2em !important; -webkit-background-clip: text !important; background-clip: text !important; }
.titre-drop { font-size: 70px; background: linear-gradient(180deg, #fff6dc 0 41.67%, #ff6a3a 41.67% 58.33%, #c81e3a 58.33% 100%) 0 0 / 100% 1.2em !important; -webkit-background-clip: text !important; background-clip: text !important; }
.tete-accueil { grid-template-columns: minmax(0, 1fr); }
.tete-accueil .ecran-video { margin-bottom: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 20px; }
.action { --p: 2px; font-size: 20px; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; padding: 4px 0; }
.action img { width: 32px; height: 32px; filter: none; }
.action:hover { --c1: #ffffff; --c2: #fff0c0; --c3: #ffd040; }

/* Rubriques */
.rubrique { margin-top: 64px; }
.duo { display: grid; gap: 24px; align-items: start; }
.ecran { margin: 0; }
.ecran img, .ecran video { display: block; width: 100%; height: auto; background: #000; }
.ecran figcaption { margin-top: 10px; font-size: .92rem; color: var(--doux); }
.galerie { display: grid; gap: 32px 24px; }
/* Lien vers la suite : une lanterne céleste qui s'envole vers la page */
.suite-lien { margin-top: 20px; padding-left: 42px; min-height: 32px; background: url("art/lanterne-R-vol.png") 0 0 / 32px 32px no-repeat; image-rendering: pixelated; }
.suite-lien a { --p: 2px; font-size: 20px; text-decoration: none; }
.suite-lien a:hover { --c1: #ffffff; --c2: #fff0c0; --c3: #ffd040; }

/* Listes : une lanterne de la couleur de la page par point */
.lanternes, .plateformes, .couleurs { list-style: none; margin: 0 0 16px; padding: 0; }
.lanternes li { position: relative; padding: 4px 0 4px 44px; min-height: 36px; margin-bottom: 8px; }
.lanternes li::before { content: ""; position: absolute; left: 0; top: 2px; width: 32px; height: 32px; background: var(--lanterne) 0 0 / 32px 32px no-repeat; image-rendering: pixelated; }
.couleurs { display: flex; flex-wrap: wrap; gap: 16px 32px; }
.couleurs li { display: flex; align-items: center; gap: 10px; color: var(--doux); }
.couleurs strong { color: var(--creme); }
.couleurs img { width: 48px; height: 48px; }
.plateformes { display: flex; flex-wrap: wrap; gap: 20px 40px; }
.plateformes li { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; padding-left: 60px; min-height: 48px; background: var(--l) 0 0 / 48px 48px no-repeat; image-rendering: pixelated; }
.plateformes a { --p: 2px; font-size: 20px; text-decoration: none; width: max-content; max-width: 100%; }
.plateformes a:hover { --c1: #ffffff; --c2: #fff0c0; --c3: #ffd040; }
.plateformes span { color: var(--doux); font-size: .95rem; }

/* Étapes : le numéro en grands chiffres laqués, comme le bandeau « 4 CHAIN » */
.etapes { list-style: none; counter-reset: etape; margin: 0 0 16px; padding: 0; }
.etapes > li { counter-increment: etape; position: relative; padding-left: 64px; min-height: 60px; margin-bottom: 22px; }
.etapes > li::before { content: counter(etape); --p: 3px; font-size: 50px; position: absolute; left: 4px; top: -8px; width: 44px; text-align: center; }
.etapes p { color: var(--doux); }

/* Termes : nom en lettrage du HUD, sens à côté */
.termes { margin: 0 0 16px; }
.termes > div { display: grid; gap: 2px 24px; padding: 10px 0; }
.termes dd { margin: 0; color: var(--doux); }

/* Encart : aplat de mur, bâton d'encens planté à gauche */
.note { position: relative; padding: 16px 18px 16px 52px; background: var(--mur-a); color: var(--creme); }
.note::before { content: ""; position: absolute; left: 18px; top: 12px; width: 15px; height: 54px; background: url("art/encens.png") 0 0 / 15px 54px no-repeat; image-rendering: pixelated; }

/* Tableaux : rangées en aplats alternés, sans trait */
.tableau { overflow-x: auto; margin: 0 0 16px; }
.touches { width: 100%; border-collapse: collapse; font-size: .95rem; }
.touches-large { min-width: 560px; }
.touches th, .touches td { text-align: left; padding: 10px 12px; vertical-align: top; }
.touches thead th { --p: 2px; font-size: 20px; padding-bottom: 14px; }
.touches tbody tr:nth-child(odd) { background: rgba(52, 20, 68, .7); }
.touches tbody th { color: var(--creme); font-weight: 700; }
.touches td { color: var(--doux); }

/* FAQ : lanterne éteinte (fumée), qui s'allume à l'ouverture */
.questions details { padding: 6px 0; }
.questions summary { cursor: pointer; list-style: none; position: relative; padding: 8px 0 8px 48px; min-height: 40px; font-weight: 700; font-size: 1.05rem; color: var(--creme); }
.questions summary::-webkit-details-marker { display: none; }
.questions summary::before { content: ""; position: absolute; left: 0; top: 4px; width: 32px; height: 32px; background: url("art/lanterne-F-repos.png") 0 0 / 32px 32px no-repeat; image-rendering: pixelated; }
.questions summary:hover::before, .questions details[open] summary::before { background-image: var(--lanterne-feu); }
.questions details[open] summary { color: var(--or); }
.reponse { padding: 0 0 8px 48px; color: var(--doux); }

/* Paquet : lanterne allumée et lien, ou lanterne de fumée et « bientôt » */
.paquet { display: flex; align-items: flex-start; gap: 16px; }
.paquet > img { width: 48px; height: 48px; flex: none; }
.paquet p { display: flex; flex-direction: column; gap: 4px; margin: 0; min-width: 0; }
.paquet-etat { --c1: #f0e8ff; --c2: #c8b0f0; --c3: #9a7ad0; --p: 2px; font-size: 20px; }
.paquet span { color: var(--doux); }
.paquet-lien { font-weight: 700; font-size: 1.1rem; }
.contact { --p: 2px; font-size: 20px; text-transform: none; }
.contact a { color: inherit; text-decoration-color: var(--or); }

/* Régie : emplacements à taille réservée par palier (CLS nul), pendus à une perche de bambou par deux cordes */
.pub { --v: var(--v-m, block); --l: var(--l-m, 0px); --h: var(--h-m, 0px); display: var(--v); }
@media (min-width: 768px) and (max-width: 1023px) { .pub { --v: var(--v-t, block); --l: var(--l-t, 0px); --h: var(--h-t, 0px); } }
@media (min-width: 1024px) and (max-width: 1279px) { .pub { --v: var(--v-d, block); --l: var(--l-d, 0px); --h: var(--h-d, 0px); } }
@media (min-width: 1280px) and (max-width: 1799px) { .pub { --v: var(--v-s, block); --l: var(--l-s, 0px); --h: var(--h-s, 0px); } }
@media (min-width: 1800px) { .pub { --v: var(--v-x, block); --l: var(--l-x, 0px); --h: var(--h-x, 0px); } }
@media (max-width: 767px) { .pub-fixe:not(.pub-p-m) { display: none; } }
@media (min-width: 768px) and (max-width: 1023px) { .pub-fixe:not(.pub-p-t) { display: none; } }
@media (min-width: 1024px) and (max-width: 1279px) { .pub-fixe:not(.pub-p-d) { display: none; } }
@media (min-width: 1280px) and (max-width: 1799px) { .pub-fixe:not(.pub-p-s) { display: none; } }
@media (min-width: 1800px) { .pub-fixe:not(.pub-p-x) { display: none; } }
.pub[data-vide] { display: none; }
.pub-cadre { position: relative; width: var(--l); height: var(--h); max-width: 100%; margin-inline: auto; overflow: hidden; }
.pub-lien, .pub-cadre picture, .pub-cadre img { display: block; width: 100%; height: 100%; }
.pub-cadre img { object-fit: contain; image-rendering: pixelated; }
.pub-creation { display: block; width: var(--l); height: var(--h); border: 0; transform-origin: 0 0; }
.pub-lien { position: relative; }
.pub-lien:focus-visible { outline-offset: -3px; }
.pub-clavier { position: absolute; inset: 0; pointer-events: none; }
.pub-etiquette { width: calc(var(--l) + 24px); max-width: 100%; height: 40px; margin: 0 auto; padding: 0 2px; font-size: .72rem; font-weight: 700; line-height: 16px; letter-spacing: .14em; text-transform: uppercase; color: var(--doux);
  background: linear-gradient(var(--corde), var(--corde)) 12% 100% / 3px 12px no-repeat, linear-gradient(var(--corde), var(--corde)) 88% 100% / 3px 12px no-repeat, url("art/perche.png") 0 18px / 39px 12px repeat-x; image-rendering: pixelated; }
.pub-haut { padding: 18px 16px 20px; }
.pub-bas { padding: 28px 16px 24px; }
@media (max-width: 380px) { .pub-haut, .pub-bas { padding-inline: 0; } }
@media print { .pub, .facade, .menu, .langue { display: none !important; } }

/* Pied : la rue pavée, Shangho, puis le sol */
.pied { margin-top: 0; background: var(--rue); }
.pied-rue { height: 48px; background: url("art/rue.png") 0 0 / 120px 48px repeat-x; image-rendering: pixelated; position: relative; }
.pied-shangho { position: absolute; right: 12%; bottom: 12px; width: 72px; height: 80px; }
.pied-dedans { max-width: 1240px; margin: 0 auto; padding: 32px 16px 40px; }
.pied-colonnes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.pied h2 { --p: 2px; font-size: 20px; margin: 0 0 10px; }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin: 4px 0; }
.pied a { color: var(--doux); }
.pied a:hover { color: var(--or); }
.pied-note { margin-top: 28px; font-size: .9rem; color: var(--doux); }
.pied-note a { color: var(--or); }

/* Téléphone : menu replié derrière « Menu », trois rubriques par rangée */
@media (max-width: 719px) {
  .entete { padding-top: 40px; }
  .marque { --p: 2px; font-size: 20px; }
  .menu summary { display: flex; }
  .perche { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 6px; }
  .perche li { padding: 0 2px 10px; }
  .perche a { --p: 1px; font-family: var(--texte); font-size: .8rem; font-weight: 800; letter-spacing: .02em; text-align: center; }
  .tete-shangho { width: 72px; height: 80px; }
  .titre-jeu { --p: 4px; }
}
@media (min-width: 600px) {
  .galerie { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pied-colonnes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .termes > div { grid-template-columns: minmax(160px, 1fr) 2fr; align-items: baseline; }
}
@media (min-width: 900px) {
  main { padding: 40px 40px 72px; }
  .tete { margin: -40px -40px 0; padding: 40px 40px 64px; }
  h1 { --p: 6px; font-size: 60px; }
  .titre-jeu { --p: 5px; }
  .titre-shangho { font-size: 50px; }
  .titre-drop { font-size: 100px; }
  .duo { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; }
  .tete-accueil { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; }
  .tete-shangho { width: 144px; height: 160px; }
}
/* Grand écran : façades de la ruelle de chaque côté, annonce pendue et qui suit la lecture */
@media (min-width: 1280px) {
  .ruelle { display: grid; grid-template-columns: minmax(var(--cote, 208px), 1fr) minmax(0, 1040px) minmax(var(--cote, 208px), 1fr); }
  .ruelle > main { grid-column: 2; grid-row: 1; width: 100%; max-width: none; margin: 0; }
  .facade { display: block; grid-row: 1; padding: 28px 24px; image-rendering: pixelated; }
  .facade-g { grid-column: 1; background: var(--mur-a) url("art/facade-a.png") right top / 360px 396px repeat; }
  .facade-d { grid-column: 3; background: var(--mur-b) url("art/facade-b.png") left top / 360px 396px repeat; }
  .facade .pub { position: sticky; top: 24px; }
  .facade-g .pub { margin-left: auto; width: max-content; }
  .facade-d .pub { width: max-content; }
}
@media (min-width: 1800px) { .ruelle { --cote: 348px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
