/* Site de Shanghobros : univers de la maquette M1 « Marché aux lanternes ».
   Ciel en 10 paliers, lanternes de papier, auvents d'étal festonnés, tuiles vernissées jade, pavés. Aucun cadre, liseré, bord d'accent ni ombre dure. */
@font-face { font-family: "Barlow Condensed"; src: url(polices/barlow-condensed-600.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; src: url(polices/barlow-condensed-700.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Marche Texte"; src: url(polices/marche-texte-400.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Marche Texte"; src: url(polices/marche-texte-600.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Marche Texte"; src: url(polices/marche-texte-400-italique.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Latin étendu, grec et cyrillique (langues de l'UE et ukrainien) ; chinois, japonais, coréen : polices du système selon lang */
@font-face { font-family: "Barlow Condensed"; src: url(polices/barlow-condensed-600-ext.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; src: url(polices/barlow-condensed-700-ext.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; src: url(polices/marche-texte-600-ext.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0370-03FF, U+1F00-1FFF, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Barlow Condensed"; src: url(polices/marche-texte-700-grec-cyrillique.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0370-03FF, U+1F00-1FFF, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Marche Texte"; src: url(polices/marche-texte-400-ext.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF, U+0370-03FF, U+1F00-1FFF, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Marche Texte"; src: url(polices/marche-texte-600-ext.woff2) format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF, U+0370-03FF, U+1F00-1FFF, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Marche Texte"; src: url(polices/marche-texte-400-italique-ext.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF, U+0370-03FF, U+1F00-1FFF, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
:root {
  --ciel-0: #0c0a26; --ciel-1: #110d2d; --ciel-2: #161035; --ciel-3: #1c133c; --ciel-4: #211644;
  --ciel-5: #2b1a4a; --ciel-6: #3b1e4e; --ciel-7: #4b2353; --ciel-8: #602954; --ciel-9: #803450;
  --papier: #fbf3e2; --papier-2: #f3e3c2; --toile-creme: #f2d6a8; --vermillon: #c82e32; --vermillon-fonce: #8a1a2a;
  --jade: #1f5e52; --jade-clair: #2f8a72; --or: #fcc84a; --or-fonce: #e28428; --bois: #9a5a2e;
  --encre: #1f1426; --encre-douce: #4b3a4a; --rue: #261a32; --rue-2: #3a2a48; --lavande: #d4caff;
  --fond: var(--papier); --fond-2: var(--papier-2); --texte: var(--encre); --texte-doux: var(--encre-douce);
  --titre: var(--vermillon-fonce); --lien: #9c2420; --lien-survol: var(--vermillon); --sur: var(--jade);
  --lueur: 255, 150, 60; --touche: var(--toile-creme);
  --gouttiere: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fond: #1d1430; --fond-2: #281c3e; --texte: #f5e8cc; --texte-doux: #cdbfae; --titre: var(--or);
    --lien: #ffb37a; --lien-survol: #ffd59a; --sur: #7fd6b8; --touche: #3d2c52; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --fond: #1d1430; --fond-2: #281c3e; --texte: #f5e8cc; --texte-doux: #cdbfae; --titre: var(--or);
  --lien: #ffb37a; --lien-survol: #ffd59a; --sur: #7fd6b8; --touche: #3d2c52; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 400 1.0625rem/1.6 "Marche Texte", "Source Sans 3", system-ui, sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
img[src$=".png"] { image-rendering: pixelated; }
h1, h2, h3 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; line-height: 1.1; color: var(--titre); margin: 0; hyphens: auto; overflow-wrap: break-word; }
a { color: var(--lien); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--lien-survol); }
a:focus-visible, summary:focus-visible { outline: none; background: var(--or); color: var(--encre); }
code { font-family: ui-monospace, "DejaVu Sans Mono", monospace; font-size: .88em; overflow-wrap: anywhere; }
kbd { font-family: "Barlow Condensed", sans-serif; font-weight: 600; font-size: 1em; background: var(--touche); padding: 0 .35em; white-space: nowrap; }

.evitement { position: absolute; left: -9999px; top: 0; }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.evitement:focus { left: 16px; top: 8px; z-index: 10; padding: 8px 12px; background: var(--or); color: var(--encre); }

/* ---------- ciel, logo, fil des lanternes ---------- */
.ciel {
  background: linear-gradient(to bottom,
    var(--ciel-0) 0 10%, var(--ciel-1) 10% 20%, var(--ciel-2) 20% 30%, var(--ciel-3) 30% 40%, var(--ciel-4) 40% 50%,
    var(--ciel-5) 50% 60%, var(--ciel-6) 60% 70%, var(--ciel-7) 70% 80%, var(--ciel-8) 80% 90%, var(--ciel-9) 90% 100%);
  color: #f5e8cc; position: relative;
}
.ciel-haut { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1400px; margin: 0 auto; padding: 16px var(--gouttiere) 4px; }
.marque { display: block; line-height: 0; }
.marque img { width: 248px; height: 78px; }
.marque:focus-visible { background: none; }
.marque:focus-visible img { filter: brightness(1.3); }
/* Sélecteur de langue : une lanterne pendue au ciel ; ouvert, les langues sur un aplat de nuit */
.langues { position: relative; z-index: 3; }
.langues summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; color: #f5e8cc; padding: 6px 4px;
  font: 600 1.05rem "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .06em; }
.langues summary::-webkit-details-marker { display: none; }
.langues-code { display: none; }
.langues summary img { width: 21px; height: 26px; image-rendering: pixelated; }
.langues[open] summary img, .langues summary:hover img { filter: brightness(1.25); }
.langues summary:hover { color: var(--or); }
.langues-mot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.langues-liste { position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: 14px 18px; list-style: none;
  background: var(--ciel-0); columns: 2; column-gap: 22px; width: max-content; max-width: min(92vw, 520px); }
.langues-liste li { break-inside: avoid; }
.langues-liste a { display: block; padding: 5px 2px; color: #f5e8cc; font-size: 1rem; white-space: nowrap; }
.langues-liste a:hover { color: var(--or); }
.langues-liste a[aria-current] { color: var(--or); font-weight: 600; }
@media (min-width: 700px) { .langues-liste { columns: 3; } }

.fil {
  position: relative; z-index: 1;
  background: url(/images/facades.png) repeat-x center bottom / 768px 104px;
  padding: 0 var(--gouttiere) 104px; image-rendering: pixelated; overflow-x: clip;
}
/* les façades commencent sous les libellés : aucune fenêtre derrière un nom de rubrique */
.fil ul { list-style: none; margin: 0 auto; padding: 0; max-width: 1100px; display: grid; grid-template-columns: repeat(7, 1fr); }
.fil li { position: relative; display: flex; justify-content: center; }
.fil li::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 22' preserveAspectRatio='none'%3E%3Cpath d='M0 3 Q50 30 100 3' fill='none' stroke='%237a4a36' stroke-width='3' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") no-repeat;
  background-size: 100% 100%;
}
.lanterne {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px 4px;
  color: #f5e8cc; text-decoration: none; text-align: center;
  font: 600 1.05rem/1.1 "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .04em;
}
.lanterne .corps {
  position: relative; width: 42px; height: 51px;
  background: url(/images/lanterne-eteinte.png) center / 42px 51px no-repeat; image-rendering: pixelated;
}
.lanterne .corps::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; z-index: -1;
  background: radial-gradient(circle closest-side, rgba(var(--lueur), .42) 0 34%, rgba(var(--lueur), .26) 34% 56%, rgba(var(--lueur), .12) 56% 78%, transparent 78%);
  opacity: 0; transition: opacity .2s steps(3);
}
.lanterne:hover .corps, .lanterne:focus-visible .corps, .lanterne[aria-current] .corps { background-image: url(/images/lanterne-allumee.png); }
.lanterne:hover .corps::before, .lanterne:focus-visible .corps::before, .lanterne[aria-current] .corps::before { opacity: 1; }
.lanterne:hover, .lanterne[aria-current] { color: var(--or); }
.lanterne:focus-visible { background: none; color: var(--or); }
.lanterne:focus-visible .nom { background: var(--or); color: var(--encre); }

/* ---------- publicités du store : créations en iframe (site/regie, taille réservée par format) ---------- */
.pub { text-align: center; margin: 0 auto; padding: 14px var(--gouttiere); }
.pub-mot { margin: 0 0 4px; font: 600 .8rem/1 "Barlow Condensed", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--texte-doux); }
.pub-haut { padding-top: 18px; }
.pub-bas { padding: 40px var(--gouttiere) 92px; }
.pub-gauche, .pub-droite { display: none; }

/* ---------- rue : contenu entre les deux colonnes de publicité ---------- */
.rue { max-width: 1840px; margin: 0 auto; }
main { display: block; min-width: 0; }
main:focus { outline: none; }

/* ---------- étal : titre de page sous son auvent ---------- */
.etal { background: var(--fond); }
.auvent {
  height: 38px; background-color: transparent;
  background: repeating-linear-gradient(90deg, var(--vermillon) 0 32px, var(--toile-creme) 32px 64px);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% 24px no-repeat, radial-gradient(16px at 16px 0, #000 99%, transparent 101%) left 0 bottom 0 / 32px 14px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% 24px no-repeat, radial-gradient(16px at 16px 0, #000 99%, transparent 101%) left 0 bottom 0 / 32px 14px repeat-x;
}
.etal-corps { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: 1100px; margin: 0 auto; padding: 20px var(--gouttiere) 4px; }
.etal-texte { min-width: 0; }
.etal h1 { font-weight: 700; font-size: clamp(2.2rem, 6vw, 3.6rem); text-transform: uppercase; letter-spacing: .01em; overflow-wrap: break-word; hyphens: auto; }
.chapeau { margin: 8px 0 0; font-size: 1.2rem; line-height: 1.45; max-width: 46ch; color: var(--texte); }
.scene { flex: none; image-rendering: pixelated; }

.enseignes { max-width: 1100px; margin: 0 auto; padding: 10px var(--gouttiere) 0; }
.enseignes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.enseignes a {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 2px; text-decoration: none; color: var(--texte);
  font: 600 1.15rem "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .04em;
}
.enseignes a::before { content: ""; width: 14px; height: 17px; background: url(/images/lanterne-eteinte.png) center / 14px 17px; image-rendering: pixelated; flex: none; }
.enseignes a[aria-current]::before, .enseignes a:hover::before { background-image: url(/images/lanterne-allumee.png); }
.enseignes a[aria-current] { color: var(--titre); }

/* ---------- rubriques ---------- */
.rubrique { max-width: 1100px; margin: 0 auto; padding: 64px var(--gouttiere) 0; }
/* première rubrique : tout de suite sous le titre de la page (#121) */
main > header + .rubrique, main > header + div.rubrique { padding-top: 28px; }
.rubrique > h2, .rubrique .duo-texte > h2 {
  font-weight: 700; font-size: clamp(1.9rem, 4.4vw, 2.6rem); text-transform: uppercase; letter-spacing: .01em;
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; overflow-wrap: anywhere;
}
.rubrique > h2::before, .rubrique .duo-texte > h2::before {
  content: ""; flex: none; width: 28px; height: 34px; margin-top: -2px;
  background: url(/images/lanterne-allumee.png) center / 28px 34px; image-rendering: pixelated;
}
.rubrique h3 { font-weight: 700; font-size: 1.5rem; margin: 28px 0 6px; text-transform: uppercase; letter-spacing: .02em; color: var(--titre); }
.rubrique p, .rubrique ul, .rubrique ol, .rubrique dl { max-width: 68ch; }
.rubrique > p:first-of-type { margin-top: 0; }
.chapeau-rub { font-size: 1.15rem; }
.doux { color: var(--texte-doux); }

.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.duo-texte { min-width: 0; }
.duo figure { margin: 0; }
.sprite-duo { display: flex; align-items: flex-end; justify-content: center; gap: 28px; padding: 24px 0; }
.sprite-duo img { height: 160px; width: auto; }

/* étapes : le numéro écrit sur une lanterne allumée */
ol.etapes { list-style: none; counter-reset: e; padding: 0; margin: 20px 0 0; }
ol.etapes > li { counter-increment: e; position: relative; padding: 4px 0 0 66px; min-height: 60px; margin-bottom: 18px; }
ol.etapes > li::before {
  content: counter(e); position: absolute; left: 0; top: 0; width: 42px; height: 51px; padding-top: 6px;
  display: grid; place-items: center; color: #fff4c8; font: 700 1.2rem "Barlow Condensed", sans-serif;
  background: url(/images/lanterne-allumee.png) center / 42px 51px; image-rendering: pixelated;
}
ol.etapes > li > h3 { margin: 0 0 4px; font-size: 1.35rem; }
ol.etapes > li > p { margin: 0; }

/* puces : petites lanternes éteintes */
ul.puces { list-style: none; padding: 0; }
ul.puces > li { position: relative; padding-left: 28px; margin: 8px 0; }
ul.puces > li::before { content: ""; position: absolute; left: 0; top: .2em; width: 14px; height: 17px; background: url(/images/lanterne-eteinte.png) center / 14px 17px; image-rendering: pixelated; }

/* enseigne d'étal : aplat jade des tuiles vernissées, une lanterne pendue au coin */
.enseigne { position: relative; background: var(--jade); color: #f5e8cc; padding: 22px 24px 20px 76px; margin: 44px 0 0; max-width: 820px; }
.enseigne::before { content: ""; position: absolute; left: 22px; top: 20px; width: 28px; height: 34px; background: url(/images/lanterne-allumee.png) center / 28px 34px; image-rendering: pixelated; }
.enseigne h2, .enseigne h3 { color: var(--or); margin: 0 0 8px; text-transform: uppercase; font-size: 1.5rem; }
.enseigne h2::before { display: none; }
.enseigne p { margin: 0 0 8px; max-width: none; }
.enseigne p:last-child { margin-bottom: 0; }
.enseigne a { color: #ffd59a; }
.enseigne a:focus-visible { color: var(--encre); }

/* images du jeu */
.ecran { margin: 0; }
.ecran img { display: block; width: 100%; height: auto; image-rendering: auto; }
.ecran figcaption { font-size: .95rem; color: var(--texte-doux); padding-top: 8px; }
.galerie { display: flex; flex-direction: column; gap: 56px; margin-top: 28px; }
.galerie figure { margin: 0; max-width: 860px; }
.galerie figure:nth-child(even) { margin-left: auto; }
.galerie figcaption { display: flex; align-items: center; gap: 12px; padding-top: 10px; font-size: 1rem; color: var(--texte-doux); }
.galerie figcaption img { flex: none; width: auto; height: 34px; }
.galerie figcaption strong { color: var(--texte); font-family: "Barlow Condensed", sans-serif; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .03em; }

/* liens d'appel : une lanterne devant le texte */
.suite {
  display: inline-flex; align-items: center; gap: 10px; font: 700 1.3rem "Barlow Condensed", sans-serif;
  text-transform: uppercase; letter-spacing: .04em; padding: 4px 2px;
}
.suite::before { content: ""; flex: none; width: 28px; height: 34px; background: url(/images/lanterne-allumee.png) center / 28px 34px; image-rendering: pixelated; }
.suites { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 18px; }

/* listes de plateformes, quartiers, esprits : enseignes pendues */
.pendus { list-style: none; padding: 0; margin: 20px 0 0; }
.pendus > li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 18px; align-items: start; padding: 14px 0; }
.pendus > li > img { grid-row: span 2; justify-self: center; width: auto; height: 51px; }
.pendus > li > .nom { font: 700 1.4rem/1.1 "Barlow Condensed", sans-serif; text-transform: uppercase; color: var(--titre); letter-spacing: .02em; }
.pendus > li > .nom a { color: inherit; }
.pendus > li > p { margin: 0; }
.etat { display: inline-block; margin-left: 10px; font: 600 .95rem "Barlow Condensed", sans-serif; letter-spacing: .08em; text-transform: uppercase; background: var(--fond-2); color: var(--texte); padding: 1px 8px; vertical-align: 3px; }

/* tableaux : rangées en aplat alterné, sans filet */
.tableau { overflow-x: auto; margin: 18px 0 0; max-width: 100%; }
table { border-collapse: collapse; min-width: 100%; font-size: 1rem; }
.tableau.large table { min-width: 760px; }
th, td { text-align: left; padding: 9px 14px; vertical-align: top; hyphens: auto; overflow-wrap: anywhere; }
thead th { background: var(--jade); color: #f5e8cc; font: 700 1.05rem "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .05em; }
tbody tr:nth-child(odd) { background: var(--fond-2); }
tbody th { font-weight: 600; }

/* paquet à télécharger */
.paquet { display: flex; gap: 18px; align-items: flex-start; background: var(--fond-2); padding: 18px 20px; margin: 18px 0 0; max-width: 760px; }
.paquet > img { flex: none; width: 42px; height: 51px; }
.paquet p { margin: 0 0 4px; }
.paquet-etat { font: 700 1.35rem "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .03em; color: var(--titre); }
.paquet > div { min-width: 0; }
.empreinte { font-size: .92rem; color: var(--texte-doux); }
.defile { display: block; white-space: nowrap; overflow-x: auto; overflow-wrap: normal; padding: 2px 0 4px; }

/* questions : la lanterne s'allume à l'ouverture */
.questions { margin-top: 12px; max-width: 820px; }
.questions details { position: relative; padding: 12px 0 12px 46px; }
.questions summary {
  list-style: none; cursor: pointer; font: 600 1.3rem/1.25 "Barlow Condensed", sans-serif; color: var(--titre); letter-spacing: .01em;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::before { content: ""; position: absolute; left: 0; top: 10px; width: 28px; height: 34px; background: url(/images/lanterne-eteinte.png) center / 28px 34px; image-rendering: pixelated; }
.questions details[open] summary::before, .questions summary:hover::before { background-image: url(/images/lanterne-allumee.png); }
.questions details > *:not(summary) { margin: 10px 0 0; }

/* accueil : la borne (#121). Écran titre du jeu 2,5 s, puis la démo sur le même écran (statique/attract.js) ;
   échelle entière des pixels du jeu (384 x 224) dès que la place le permet, sinon toute la largeur */
.p-accueil .marque { display: none; }
.p-accueil .ciel-haut { justify-content: flex-end; padding-top: 6px; }
.p-accueil .fil { background: none; padding-bottom: 14px; }
/* Haut de l'accueil (ciel, fil, auvent) mesuré par largeur : la borne a sa taille finale dès le premier rendu (attract.js recale ensuite, sans décalage) */
:root { --haut-attract: 231px; }
@media (min-width: 761px) { :root { --haut-attract: 193px; } }
@media (min-width: 1240px) { :root { --haut-attract: 144px; } }
.attract { position: relative; isolation: isolate; display: flex; flex-direction: column; height: calc(100svh - var(--haut-attract, 230px)); min-height: 290px; color: #f5e8cc; }
/* La rue du marché de nuit sur toute la largeur de la page, rails de pub posés dessus : ciel étoilé, façades aux fenêtres allumées */
.attract::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); z-index: -2; pointer-events: none;
  background: url(/images/facades.png) repeat-x 50% 100% / 1536px 208px, linear-gradient(to bottom, var(--ciel-0) 0 14%, var(--ciel-1) 14% 28%, var(--ciel-2) 28% 42%, var(--ciel-3) 42% 56%, var(--ciel-4) 56% 70%, var(--ciel-5) 70% 100%); image-rendering: pixelated; }
.attract::after { content: ""; position: absolute; top: 0; height: 58%; left: calc(50% - 50vw); right: calc(50% - 50vw); z-index: -1; pointer-events: none; background: var(--etoiles) 0 0 / 320px 160px; }
:root { --etoiles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 80' shape-rendering='crispEdges'%3E%3Cg fill='%23f5e8cc'%3E%3Crect x='12' y='9' width='1' height='1'/%3E%3Crect x='47' y='31' width='1' height='1'/%3E%3Crect x='83' y='6' width='1' height='1'/%3E%3Crect x='121' y='22' width='1' height='1'/%3E%3Crect x='146' y='57' width='1' height='1'/%3E%3Crect x='28' y='63' width='1' height='1'/%3E%3C/g%3E%3Cg fill='%23d4caff'%3E%3Crect x='66' y='45' width='1' height='1'/%3E%3Crect x='103' y='70' width='1' height='1'/%3E%3Crect x='5' y='40' width='1' height='1'/%3E%3C/g%3E%3C/svg%3E"); }
.p-accueil .rue { overflow-x: clip; }
.p-accueil .pub-gauche, .p-accueil .pub-droite { z-index: 1; }
.p-accueil .pub-gauche .pub-mot, .p-accueil .pub-droite .pub-mot { color: var(--lavande); }
.attract-zone { position: relative; flex: 1 1 auto; min-height: 0; container: borne / size; display: grid; place-items: center; }
.borne { position: relative; display: block; width: min(100cqw, 100cqh * 384 / 224); aspect-ratio: 384 / 224; line-height: 0; }
.borne > video { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
/* Un seul écran de jeu : la vitre bombée du CRT découpée (superellipse, coins du tube), rien de noir autour ; lueur des lanternes en flaque ovale, sans bord */
.borne { isolation: isolate; --vitre: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1152 672' preserveAspectRatio='none'%3E%3Cpolygon points='1148 336 1148 488 1147 522 1145 544 1142 562 1139 576 1135 588 1130 599 1125 608 1119 617 1111 624 1103 631 1094 637 1084 642 1072 647 1060 651 1045 655 1029 658 1011 661 990 663 965 665 935 666 896 667 838 668 576 668 314 668 256 667 217 666 187 665 162 663 141 661 123 658 107 655 92 651 80 647 68 642 58 637 49 631 41 624 33 617 27 608 22 599 17 588 13 576 10 562 7 544 5 522 4 488 4 336 4 184 5 150 7 128 10 110 13 96 17 84 22 73 27 64 33 55 41 48 49 41 58 35 68 30 80 25 92 21 107 17 123 14 141 11 162 9 187 7 217 6 256 5 314 4 576 4 838 4 896 5 935 6 965 7 990 9 1011 11 1029 14 1045 17 1060 21 1072 25 1084 30 1094 35 1103 41 1111 48 1119 55 1125 64 1130 73 1135 84 1139 96 1142 110 1145 128 1147 150 1148 184'/%3E%3C/svg%3E"); }
.borne > video, .borne::after { -webkit-mask: var(--vitre) 0 0 / 100% 100% no-repeat; mask: var(--vitre) 0 0 / 100% 100% no-repeat; }
.borne::before { content: ""; position: absolute; top: -14%; bottom: -14%; left: -9%; right: -9%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--lueur), .30), rgba(var(--lueur), .14) 55%, rgba(var(--lueur), 0)); }
.borne::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 38% at 28% 14%, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 70%); }
.borne:focus-visible { background: none; }
.borne:focus-visible > video { filter: brightness(1.15); }
@container borne (min-width: 384px) and (min-height: 224px) { .borne { width: 384px; } }
@container borne (min-width: 768px) and (min-height: 448px) { .borne { width: 768px; } }
@container borne (min-width: 1152px) and (min-height: 672px) { .borne { width: 1152px; } }
@container borne (min-width: 1536px) and (min-height: 896px) { .borne { width: 1536px; } }
/* Décor autour de l'écran : esprits qui flottent, lanternes qui vacillent ; montré seulement s'il tient entre l'écran et le bord ou le rail de pub */
.decor { display: none; position: absolute; inset: 0; pointer-events: none; --demi: 384px; }
.decor span { position: absolute; image-rendering: pixelated; background: center / 100% 100% no-repeat; }
.decor .esprit { width: 40px; height: 50px; background-image: url(/images/esprit.png); }
.decor .lampe { width: 42px; height: 51px; background-image: url(/images/lanterne-allumee.png); }
.decor .lampe::before { content: ""; position: absolute; left: -40px; right: -40px; top: -36px; bottom: -36px; z-index: -1;
  background: radial-gradient(closest-side, rgba(var(--lueur), .34), rgba(var(--lueur), .12) 60%, rgba(var(--lueur), 0)); }
.decor .g { right: calc(50% + var(--demi) + 14px); }
.decor .d { left: calc(50% + var(--demi) + 14px); }
.decor .e1 { top: 16%; } .decor .e2 { top: 58%; } .decor .e3 { top: 34%; } .decor .e4 { top: 72%; }
.decor .l1, .decor .l2 { top: 2%; }
@container borne (min-width: 900px) and (min-height: 448px) { .decor { display: block; } }
@container borne (min-width: 1152px) and (min-height: 672px) { .decor { display: none; } }
@container borne (min-width: 1284px) and (min-height: 672px) { .decor { display: block; --demi: 576px; } }
@container borne (min-width: 1536px) and (min-height: 896px) { .decor { display: none; } }
@media (min-width: 1800px) { @container borne (min-width: 1152px) and (min-height: 672px) { .decor { display: block; --demi: 576px; } } }
@media (prefers-reduced-motion: no-preference) {
  .decor .esprit { animation: flotte 2.4s steps(6) infinite alternate; }
  .decor .e1 { animation-name: flotte, peur; animation-duration: 2.4s, 7s; animation-timing-function: steps(6), steps(1); animation-direction: alternate, normal; }
  .decor .e3 { animation-delay: -1.1s; }
  .decor .e2 { animation-delay: -.6s; }
  .decor .e4 { animation-name: flotte, peur; animation-duration: 2.8s, 9s; animation-delay: -1.7s, -4s; animation-timing-function: steps(6), steps(1); animation-direction: alternate, normal; }
  .decor .lampe { animation: balance 3s steps(4) infinite alternate; }
  .decor .lampe::before { animation: vacille 1.3s steps(2) infinite; }
  .decor .l2, .decor .l2::before { animation-delay: -1.4s; }
  .attract::after { animation: scintille 2.6s steps(2) infinite; }
}
@keyframes flotte { from { transform: translate(0, 0); } to { transform: translate(6px, -12px); } }
@keyframes peur { 0%, 82% { background-image: url(/images/esprit.png); } 83%, 100% { background-image: url(/images/esprit-peur.png); } }
@keyframes balance { from { transform: translateY(0); } to { transform: translateY(4px); } }
@keyframes vacille { 0% { opacity: 1; } 50% { opacity: .72; } }
@keyframes scintille { 0% { opacity: 1; } 50% { opacity: .55; } }
.devise { flex: none; font: 700 clamp(1.25rem, 3vw, 1.8rem)/1.15 "Barlow Condensed", sans-serif; color: var(--or); text-transform: uppercase; margin: 0; padding: 10px var(--gouttiere) 12px; text-align: center; letter-spacing: .02em; }

/* pied : les pavés du marché, Shangho et Yuetu */
.pied { margin-top: 0; }
.pied-sol { position: relative; height: 48px; background: var(--rue) url(/images/paves.png) repeat-x left top / 768px 48px; image-rendering: pixelated; }
.pied-sol img { position: absolute; bottom: 40px; image-rendering: pixelated; }
.pied-shangho { left: max(var(--gouttiere), calc(50% - 520px)); width: 56px; height: 84px; }
.pied-yuetu { left: calc(max(var(--gouttiere), calc(50% - 520px)) + 68px); width: 40px; height: 94px; }
.pied-corps { background: var(--rue); color: #e9dcc4; padding: 28px var(--gouttiere) 36px; }
.pied-signature { max-width: 1100px; margin: 0 auto; font-size: .95rem; color: #cdbfae; }
.pied-signature + .pied-signature { margin-top: 4px; }

/* ---------- largeurs ---------- */
/* grand écran : logo, lanternes et langue sur une seule rangée au-dessus des façades */
@media (min-width: 1240px) {
  .ciel-haut { position: absolute; left: 0; right: 0; top: 0; max-width: none; padding: 14px var(--gouttiere) 0; }
  .fil ul { max-width: min(1100px, calc(100% - 2 * 272px)); }
  .lanterne { font-size: .98rem; letter-spacing: .02em; }
  .lanterne .nom { overflow-wrap: anywhere; hyphens: auto; }
  .langues-nom { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .langues-code { display: inline; }
  .p-accueil .ciel-haut { position: absolute; }
}
/* 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é de la rue (1184 px au plus : écran de jeu x 3 et ses gouttières) : 1184 + 2 x 176 = 1536 px, plus 16 px de barre de défilement classique = 1552 px. La rue garde sa place et sa largeur, à tout zoom. */
@media (min-width: 1552px) {
  .rue { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1184px) minmax(0, 1fr); }
  .rue > main { grid-column: 2; grid-row: 1; }
  .pub-gauche, .pub-droite { display: block; position: sticky; top: 16px; align-self: start; justify-self: center; padding: 24px 0 0; grid-row: 1; }
  .pub-gauche { grid-column: 1; }
  .pub-droite { grid-column: 3; }
}
/* tableau large sous 800 px : une rangée par action, le nom de colonne devant chaque valeur */
@media (max-width: 799px) {
  .tableau.large { overflow: visible; }
  .tableau.large table, .tableau.large tbody, .tableau.large tr, .tableau.large th, .tableau.large td { display: block; min-width: 0; width: 100%; }
  .tableau.large thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tableau.large tbody tr { padding: 4px 0 10px; }
  .tableau.large tbody th { background: var(--jade); color: #f5e8cc; font: 700 1.1rem "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .05em; padding: 7px 14px; }
  .tableau.large td { display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); gap: 10px; padding: 6px 14px; }
  .tableau.large td::before { content: attr(data-th); font: 600 .95rem/1.5 "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .05em; color: var(--texte-doux); }
}
@media (max-width: 900px) {
  .duo { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .ciel-haut { padding-top: 8px; }
  .marque img { width: 186px; height: auto; image-rendering: auto; }
  .fil { min-height: 0; padding-bottom: 60px; background-position: center bottom -44px; }
  .fil ul { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 2px; }
  .lanterne { padding-top: 10px; gap: 3px; }
  .lanterne .corps { width: 28px; height: 34px; background-size: 28px 34px; }
  .auvent { height: 30px; }
  .lanterne { font-size: .98rem; min-width: 0; }
  .lanterne .nom { max-width: 100%; hyphens: auto; overflow-wrap: anywhere; }
  .etal-corps { padding-top: 14px; }
  .rubrique { padding-top: 48px; }
  main > header + .rubrique, main > header + div.rubrique { padding-top: 20px; }
}
@media (max-width: 480px) {
  :root { --gouttiere: 16px; }
  /* nom de langue long (БЪЛГАРСКИ, УКРАЇНСЬКА) : code court à l'écran, nom gardé pour les lecteurs d'écran */
  .langues-nom { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .langues-code { display: inline; }
  /* colonnes à la largeur des noms, aucun mot coupé ni débordant à 360 px (ダウンロード, Изображения, Завантажити) */
  .fil ul { grid-template-columns: repeat(4, auto); justify-content: space-between; column-gap: 2px; }
  .lanterne { font-size: clamp(.7rem, 3.4vw, .8rem); letter-spacing: 0; padding-inline: 0; }
  .lanterne .nom { overflow-wrap: normal; hyphens: manual; word-break: keep-all; }
  .pub-haut { padding: 10px var(--gouttiere) 6px; }
  .pub-bas { padding: 28px var(--gouttiere) 88px; }
  body { font-size: 1rem; }
  .chapeau { font-size: 1.12rem; }
  .scene { display: none; }
  .sprite-duo img { height: 112px; }
  .pendus > li { grid-template-columns: 44px minmax(0, 1fr); gap: 4px 12px; }
  .pendus > li > img { height: 40px; }
  .enseigne { padding: 18px 16px 18px 60px; }
  .enseigne::before { left: 16px; top: 18px; }
  .questions details { padding-left: 40px; }
  th, td { padding: 8px 10px; }
}
/* Ciel de la tête : les mêmes étoiles qui scintillent, au-dessus des façades ; z-index 2 > fil (1) : menu des langues cliquable et par-dessus les lanternes (#202) */
.ciel-haut { position: relative; z-index: 2; }
.ciel::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 64%; pointer-events: none; background: var(--etoiles) 80px 40px / 320px 160px; }
@media (prefers-reduced-motion: no-preference) { .ciel::after { animation: scintille 2.6s steps(2) infinite; } }
/* Téléphone : l'écran tout en largeur juste sous l'auvent, la devise puis les façades à l'échelle 1 */
@media (max-width: 599px) {
  .attract { height: auto; min-height: 0; padding: 12px 0 92px; }
  .attract::before { background-size: 768px 104px, auto; }
  .attract-zone { flex: none; height: calc(100vw * 224 / 384); }
}
@media (prefers-reduced-motion: no-preference) {
  .fil li:nth-child(odd) .lanterne .corps { animation: vent 2.2s steps(3) infinite alternate; }
  .fil li:nth-child(even) .lanterne .corps { animation: vent 2.2s steps(3) -1.1s infinite alternate; }
  .lanterne:hover .corps, .lanterne:focus-visible .corps { animation: saute .36s steps(3) 1, vent 2.2s steps(3) .36s infinite alternate; }
  .lanterne:hover .corps::before, .lanterne:focus-visible .corps::before, .lanterne[aria-current] .corps::before { animation: vacille 1.1s steps(2) infinite; }
}
@keyframes vent { from { transform: translateY(0); } to { transform: translateY(3px); } }
@keyframes saute { 0% { transform: translateY(0); } 50% { transform: translateY(-8px); } 100% { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .lanterne .corps::before { transition: none; }
}
@media print {
  .ciel, .pub, .pied-sol, .auvent, .enseignes { display: none; }
  body { background: #fff; color: #000; }
}
.ecran video { display: block; width: 100%; height: auto; background: #0c0820; }
.clips { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 0 16px; margin-top: 16px; }
.clips figure { flex: none; width: min(270px, 72vw); margin: 0; scroll-snap-align: start; }
.clips video { display: block; width: 100%; height: auto; background: #0c0820; }
.clips figcaption { padding-top: 8px; font-family: "Barlow Condensed", sans-serif; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .03em; color: var(--texte); }
