/* 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; }
@font-face { font-family: "Barlow Condensed"; src: url(polices/barlow-condensed-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Marche Texte"; src: url(polices/marche-texte-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Marche Texte"; src: url(polices/marche-texte-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@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; }

: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; }
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; }
.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); }
.langue { color: #f5e8cc; font: 600 1.05rem "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .06em; padding: 6px 4px; }
.langue:hover { color: var(--or); }

.fil {
  position: relative; z-index: 1;
  background: url(/images/facades.png) repeat-x center bottom / 1536px 208px;
  min-height: 228px; padding: 0 var(--gouttiere) 72px; image-rendering: pixelated;
}
.fil ul { list-style: none; margin: 0 auto; padding: 0; max-width: 1100px; display: grid; grid-template-columns: repeat(8, 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 ---------- */
.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 a { display: inline-block; line-height: 0; }
.pub img { display: block; max-width: 100%; height: auto; }
.pub-haut { padding-top: 18px; }
.pub-bas { padding: 40px var(--gouttiere) 28px; }
.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: 36px var(--gouttiere) 8px; }
.etal-texte { min-width: 0; }
.surtitre { margin: 0 0 6px; font: 700 1rem "Barlow Condensed", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--sur); }
.etal h1 { font-weight: 700; font-size: clamp(2.5rem, 7vw, 4.4rem); text-transform: uppercase; letter-spacing: .01em; overflow-wrap: break-word; hyphens: auto; }
.chapeau { margin: 14px 0 0; font-size: 1.25rem; line-height: 1.45; max-width: 46ch; color: var(--texte); }
.scene { flex: none; image-rendering: pixelated; }

.enseignes { max-width: 1100px; margin: 0 auto; padding: 18px 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; }
.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;
}
.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; }
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); }
.empreinte { font-size: .92rem; color: var(--texte-doux); }

/* 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 : vitrine de nuit */
.vitrine { background: var(--rue) url(/images/paves.png) repeat-x left top / 768px 48px; image-rendering: pixelated; color: #f5e8cc; padding-top: 48px; }
.vitrine img[src$=".webp"] { image-rendering: auto; }
.p-accueil .marque { visibility: hidden; }
.vitrine-corps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; max-width: 1240px; margin: 0 auto; padding: 36px var(--gouttiere) 48px; }
.vitrine h1 { margin: 0; line-height: 0; }
.vitrine h1 img { width: 496px; max-width: 100%; height: auto; }
.devise { font: 700 clamp(1.7rem, 3.6vw, 2.4rem)/1.1 "Barlow Condensed", sans-serif; color: var(--or); text-transform: uppercase; margin: 22px 0 10px; letter-spacing: .01em; }
.vitrine p { max-width: 46ch; }
.vitrine .suite { color: #ffd59a; }
.vitrine .suite:focus-visible { color: var(--encre); }
.vitrine figure { margin: 0; }
.vitrine figcaption { color: #cdbfae; font-size: .92rem; padding-top: 8px; }
.quartiers { counter-reset: q; }

/* 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: 64px; height: 50px; }
.pied-yuetu { left: calc(max(var(--gouttiere), calc(50% - 520px)) + 76px); width: 50px; height: 80px; }
.pied-corps { background: var(--rue); color: #e9dcc4; padding: 28px var(--gouttiere) 36px; }
.pied-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; max-width: 1100px; margin: 0 auto; }
.pied h2 { color: var(--or); font-size: 1.25rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin: 5px 0; }
.pied a { color: #f5e8cc; }
.pied a:hover { color: var(--or); }
.pied a:focus-visible { color: var(--encre); }
.pied-signature { max-width: 1100px; margin: 22px auto 0; font-size: .95rem; color: #cdbfae; }
.pied-signature + .pied-signature { margin-top: 4px; }

/* ---------- largeurs ---------- */
@media (min-width: 1280px) {
  .rue { display: grid; grid-template-columns: 160px minmax(0, 1fr) 160px; gap: 24px; padding: 0 var(--gouttiere); }
  .pub-gauche, .pub-droite { display: block; position: sticky; top: 16px; align-self: start; padding: 24px 0 0; }
}
@media (min-width: 1800px) {
  .rue { grid-template-columns: 300px minmax(0, 1fr) 300px; }
}
@media (max-width: 900px) {
  .duo, .vitrine-corps { grid-template-columns: minmax(0, 1fr); }
  .pied-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .fil { background-size: 768px 104px; min-height: 0; padding-bottom: 92px; }
  .fil ul { grid-template-columns: repeat(4, 1fr); row-gap: 6px; }
  .lanterne { font-size: .98rem; }
  .etal-corps { padding-top: 28px; }
  .rubrique { padding-top: 48px; }
}
@media (max-width: 480px) {
  :root { --gouttiere: 16px; }
  .pub-haut { padding: 10px var(--gouttiere) 6px; }
  .pub-bas { padding: 28px var(--gouttiere) 20px; }
  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; }
  .pied-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 14px; }
  .questions details { padding-left: 40px; }
  th, td { padding: 8px 10px; }
}
@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; }
}
