/* Shanghoma : la borne (maquette S2). Le site est l'attract mode du jeu, un écran après l'autre. */
@font-face{font-family:"Shanghoma Pixel";src:url(/medias/police/shanghoma-pixel.woff2) format("woff2");font-display:block}
:root{--hud:52px;--flanc:0px;--noir:#000;--ecran:#0c0820;--ecran2:#140c30;--blanc:#ffffff;--or:#ffc830;--rouge:#ff7a5a;--jade:#7ce8b8;--gris:#8a84a8;--prune:#2a0a1c;color-scheme:dark}
*{box-sizing:border-box;margin:0;padding:0}
html{background:var(--noir);color:var(--blanc);font:20px/1.6 "Shanghoma Pixel",monospace;-webkit-font-smoothing:none;text-transform:uppercase;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{background:var(--noir);overflow-x:hidden}
img,.spr{image-rendering:pixelated}
a{color:inherit;text-decoration:none}
a:focus-visible,a:hover{color:var(--noir);background:var(--or);outline:none}
main:focus{outline:none}
.spr{--s:2;--d:80;display:inline-block;width:calc(var(--w)*var(--s)*1px);height:calc(var(--h)*var(--s)*1px);background:var(--img) 0 0/calc(var(--w)*var(--n)*var(--s)*1px) 100% no-repeat;vertical-align:bottom}
.anim{animation:cadre calc(var(--n)*var(--d)*1ms) steps(var(--n)) infinite}
@keyframes cadre{to{background-position-x:calc(var(--w)*var(--n)*var(--s)*-1px)}}
.clignote{animation:clic 1s steps(1) infinite}
@keyframes clic{50%{visibility:hidden}}
.evitement{position:absolute;left:16px;top:-200px;z-index:30;background:var(--or);color:var(--noir);padding:4px 10px}
.evitement:focus{top:8px}
/* Balayage et vignette du tube, posés sur toute la page */
body::after{content:"";position:fixed;inset:0;pointer-events:none;z-index:20;background:repeating-linear-gradient(to bottom,rgba(0,0,0,0) 0 2px,rgba(0,0,0,.28) 2px 3px),radial-gradient(ellipse at center,rgba(0,0,0,0) 62%,rgba(0,0,0,.55) 100%)}
/* HUD : la ligne du haut de l'écran de jeu sert de menu */
.hud{position:sticky;top:0;z-index:10;background:var(--noir);display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 16px}
.hud .menu{white-space:nowrap}
.hud .piece{text-align:right}
.hud .joueur{color:var(--rouge);white-space:nowrap}
.hud .joueur b{color:var(--blanc);font-weight:normal}
@media (max-width:420px){.hud .joueur b{display:none}}
.hud ul{display:none;list-style:none;gap:28px}
.hud ul a{color:var(--gris);white-space:nowrap}
.hud ul a:hover,.hud ul a:focus-visible{color:var(--noir)}
.hud ul li.ici a{color:var(--or)}
/* Curseur du menu, comme dans le jeu : une pointe d'or devant le choix en cours (elle clignote) et devant le choix survolé (elle arrive en deux pas) */
.hud ul a{position:relative}
.hud ul li.ici a::before,.hud ul a:hover::before,.hud ul a:focus-visible::before{content:"";position:absolute;left:-14px;top:50%;width:8px;height:12px;margin-top:-6px;background:var(--or);clip-path:polygon(0 0,100% 50%,0 100%)}
@media (prefers-reduced-motion:no-preference){
.hud ul li.ici a::before{animation:clic 1s steps(1) infinite}
.hud ul a:hover::before,.hud ul a:focus-visible::before{animation:arrive .16s steps(2) both}
.hud ul a:hover,.hud ul a:focus-visible{animation:allume .24s linear both}
}
@keyframes arrive{from{transform:translateX(-8px)}to{transform:none}}
@keyframes allume{0%,49%{background:var(--jade)}50%,to{background:var(--or)}}
.hud .piece{color:var(--or)}
.hud .menu{color:var(--jade)}
/* Sous 1024 px : MENU ouvre la ligne du HUD en liste sous la barre, sans script */
.hud ul:target{display:flex;flex-direction:column;position:absolute;left:0;right:0;top:100%;background:var(--noir);padding:4px 16px 16px;gap:8px}
/* Écrans successifs : chaque section est un écran 384 × 224 agrandi */
.ecran{position:relative;padding:48px 16px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:20px;background:var(--ecran)}
.ecran+.ecran{margin-top:24px}
@media (max-width:899px){main>.ecran:first-child:not(.attract){padding-top:24px}}
.titre-ecran{line-height:0}
.titre-ecran .spr{--s:2}
.gris{color:var(--gris)}
.sous{color:var(--gris);margin-top:-8px}
.or{color:var(--or)}
.jade{color:var(--jade)}
.rouge{color:var(--rouge)}
.titre-texte{font-weight:normal;font-size:40px;line-height:1.2;color:var(--or)}
@media (max-width:400px){h1.titre-texte{font-size:32px}}
h2.titre-texte,h3.titre-texte{font-size:30px}
.galerie h2.titre-texte{font-size:40px}
/* 1. Accueil : un seul écran, comme la borne. Titre et START ; sans action, la démo passe sur le même écran (statique/attract.js) */
.ecran.attract{height:calc(100svh - var(--hud));min-height:440px;padding:16px;gap:12px;background:url(/medias/sprites/fond_temple_pres.png) repeat-x 50% 100%/1536px 448px,url(/medias/sprites/fond_temple_milieu.png) repeat-x 50% calc(100% + var(--temple-bas,0px))/1536px 448px,url(/medias/ciel-temple-accueil.png) 50% 0/1536px 896px repeat-x var(--ecran);image-rendering:pixelated}
.attract .scene{flex:1 1 0;min-height:0;width:min(100%,100vw - 2*var(--flanc));display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:center;container:scene/size}
/* Borne : un seul écran de jeu (384 x 224 natif, tourné x 3 avec le rendu CRT du jeu) ; les cycles titre, choix, partie, scores passent dedans (statique/attract.js) */
.borne-jeu{grid-area:1/1;position:relative;width:min(100cqw,100cqh*1152/672,1152px);aspect-ratio:1152/672}
.vue-borne{position:absolute;inset:0;width:100%;height:100%;display:block}
.borne-jeu{isolation:isolate}
/* Lumière des lanternes du temple sur la vitre : une flaque ovale, sans bord ; vitre bombée du CRT découpée (contour mesuré sur les cycles), rien de noir autour */
.borne-jeu::before{content:"";position:absolute;inset:-12% -8%;z-index:-1;pointer-events:none;background:radial-gradient(closest-side,rgba(255,200,48,.26),rgba(255,160,48,.1) 72%,rgba(255,160,48,0))}
.vue-borne,.borne-jeu::after{-webkit-mask:var(--vitre) 0 0/100% 100% no-repeat;mask:var(--vitre) 0 0/100% 100% no-repeat}
.borne-jeu{--vitre:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1152 672' preserveAspectRatio='none'%3E%3Cpolygon points='6 179 21 37 29 26 30 25 208 6 948 7 1068 18 1126 34 1146 45 1146 484 1127 618 1123 643 1122 646 1114 648 1002 654 832 662 649 665 564 666 398 662 185 656 139 653 38 646 30 645 29 642 27 628 13 523 6 378'/%3E%3C/svg%3E")}
.borne-jeu::after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse 60% 38% at 28% 14%,rgba(255,255,255,.1),rgba(255,255,255,0) 70%),radial-gradient(ellipse 90% 90% at 50% 50%,rgba(0,0,0,0) 62%,rgba(0,0,0,.35) 100%)}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0}
.start{position:absolute;inset:0;line-height:0}
/* START pris : aplat d'or sur l'écran, sans bord ni cadre */
.start:focus-visible{background:var(--or);mix-blend-mode:multiply}
.attract>.gris{max-width:30em;color:var(--blanc)}
/* Téléphone : l'écran à pleine largeur, collé sous le HUD, les toits du temple juste dessous ; pas de vide autour */
/* Temple sous l'écran : quand l'écran prend toute la hauteur, les toits descendent sous le bas de la vitre (écran de 672 px, centré dans la scène) */
@media (min-width:600px){.ecran.attract{--temple-bas:clamp(0px,560px - 50svh,172px)}
/* « Gratuit » : enseigne de laque pendue sous les toits du temple, aplat plein */
.ecran.attract>.gris{background:var(--prune);color:var(--or);padding:6px 16px}}
/* Téléphone : temple à l'échelle 1, toits sous la ligne « Gratuit » */
@media (max-width:599px){.ecran.attract{background-size:768px 224px,768px 224px,1536px 896px}.ecran.attract{height:auto;min-height:0;padding:12px 0 124px}.attract .scene{flex:none;width:100%;height:calc(100vw*672/1152)}}
/* Décor du temple animé, sprites du jeu : lanternes qui montent, étoiles, fumée d'encens au-dessus des brûle-parfums (tas du milieu, x 2) */
.attract .scene,.attract>.gris{position:relative}
.decor{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.decor .spr{position:absolute}
.decor .lt{--img:url(/medias/sprites/fonds_lanterne_flottante.png);--w:12;--h:14;--n:4;--d:200;--s:3;bottom:-48px}
.decor .lt1{left:3%}.decor .lt2{left:9%}.decor .lt3{right:9%}.decor .lt4{right:3%}
.decor .et{--img:url(/medias/sprites/fonds_etoile.png);--w:5;--h:5;--n:4;--d:167;--s:2}
.decor .et1{left:4%;top:9%}.decor .et2{left:12%;top:22%}.decor .et3{left:7%;top:40%}.decor .et4{right:5%;top:12%}.decor .et5{right:11%;top:30%}.decor .et6{right:6%;top:48%}
/* Temple vivant, calé sur la couche des toits (tuile de 1536 px centrée, 3 tuiles) : lanternes de papier qui se balancent sous l'avant-toit,
   fumée des brûle-parfums, lumière chaude des salles qui vacille. Descend avec les toits ; masqué au téléphone (temple à l'échelle 1) */
.ecran.attract{overflow:clip}
.temple{position:absolute;left:calc(50% - 2304px);width:4608px;bottom:0;height:448px;transform:translateY(var(--temple-bas,0px));pointer-events:none}
.temple>*{position:absolute}
.temple .lb{--img:url(/medias/sprites/fonds_lanterne_balance.png);--w:21;--h:24;--n:8;--d:117;top:300px}
.temple .fu{--img:url(/medias/sprites/fonds_fumee.png);--w:16;--h:48;--n:8;--d:133;top:256px}
.temple .lueur{top:300px;width:600px;height:104px;background:radial-gradient(closest-side,rgba(255,176,64,.34),rgba(255,176,64,.12) 60%,rgba(255,176,64,0))}
@media (prefers-reduced-motion:no-preference){.temple .lueur{animation:vacille 1.4s steps(2) infinite}.temple .lueur:nth-child(odd){animation-delay:-.7s}}
@keyframes vacille{50%{opacity:.7}}
@media (max-width:599px){.temple{display:none}}
@media (prefers-reduced-motion:no-preference){
.decor .lt{animation:cadre 800ms steps(4) infinite,monte 28s steps(280) infinite}
.decor .lt2{animation-delay:0s,-9s}.decor .lt3{animation-delay:0s,-16s}.decor .lt4{animation-delay:0s,-23s}
.decor .et2{animation-delay:-.3s}.decor .et4{animation-delay:-.5s}.decor .et6{animation-delay:-.2s}
.decor .et{animation-duration:2.4s}
}
@keyframes monte{from{transform:translateY(0)}to{transform:translateY(calc(-100svh - 60px))}}
/* 2. Démo, vidéos et écrans */
.galerie img,.ecrans video{width:min(100%,1152px,100vw - 2*var(--flanc));height:auto;display:block;background:var(--noir)}
.ecrans>p,.clips>p,.clips>h2{max-width:min(100%,1152px,100vw - 2*var(--flanc))}
/* 3. Choix du mode : la liste du menu du jeu */
.liste{list-style:none;width:min(100%,860px);text-align:left;display:grid;gap:18px}
.liste li{display:grid;grid-template-columns:28px 1fr;column-gap:12px}
.liste .ic{--w:10;--h:10;--n:2;--s:2;margin-top:6px}
.liste b{font-weight:normal;color:var(--or)}
.liste span{grid-column:2;color:var(--blanc)}
.liste .points{display:none}
/* 4. Comment jouer, touches par plateforme */
.regles .dessins{display:flex;flex-wrap:wrap;justify-content:center;gap:16px 40px}
.regles .dessins img{height:128px;width:auto}
/* Touches : un relevé par appareil, comme la carte d'instructions collée sur la borne */
.touches{width:min(100%,1100px,100vw - 2*var(--flanc));display:flex;flex-wrap:wrap;gap:36px 40px;text-align:left}
.appareil{flex:1 1 200px;min-width:0}
.appareil h3,.appareil h2{font-weight:normal;font-size:1.17em;color:var(--or)}
.appareil h3 i,.appareil h2 i{font-style:normal;display:block;color:var(--gris)}
.appareil dl{display:grid;grid-template-columns:minmax(0,max-content) minmax(0,1fr);gap:4px 16px;margin-top:10px}
.appareil dt{color:var(--jade);min-width:0;hyphens:auto;overflow-wrap:anywhere}
.appareil dd{color:var(--blanc);min-width:0;hyphens:auto;overflow-wrap:anywhere}
.appareil dd.off{color:var(--gris)}
.sortir{max-width:40em}
/* 6. Plateformes : la liste des réglages, valeurs à droite */
.reglages{list-style:none;width:min(100%,860px);display:grid;gap:14px;text-align:left}
.reglages li{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 12px}
.reglages b{font-weight:normal;color:var(--blanc);width:100%}
.reglages .val{color:var(--jade)}
.reglages .val.off{color:var(--gris)}
.reglages a{color:var(--or)}
.reglages i{font-style:normal;width:100%;color:var(--gris)}
/* 7. Fin : l'écran THANK YOU FOR PLAYING, sur le port */
.fin{background:url(/medias/sprites/fond_port_pres.png) repeat-x 50% 100%/1536px 448px,url(/medias/sprites/fond_port_milieu.png) repeat-x 50% 100%/1536px 448px,url(/medias/sprites/fond_port_ciel.png) 50% 0/cover var(--ecran);justify-content:flex-start;padding-top:10vh}
.fin .titre-ecran .spr{--s:1.3}
.fin .panda{--s:1.5}
.fin p{max-width:30em}
.fin .gris a{color:var(--gris);padding:0 2px}
.hud ul li.lg a{color:var(--jade)}
.langues{width:100%;max-width:960px;margin:8px auto}
.langues ul{list-style:none;display:grid;grid-template-columns:repeat(auto-fill,minmax(13em,1fr));gap:2px 24px;text-align:left;margin-top:8px}
.langues a{color:var(--gris);padding:0 6px;display:inline-block}
.langues a::before{content:"\25B6";visibility:hidden;margin-right:8px;color:var(--or)}
.langues li.ici a{color:var(--or)}
.langues li.ici a::before,.langues a:hover::before,.langues a:focus-visible::before{visibility:visible}
.fin .gris a:hover,.fin .gris a:focus-visible{color:var(--noir)}
/* Pages : texte de la borne, lisible à 390 */
.texte{width:min(100%,860px);text-align:left;display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
.texte h2,.texte h3{font-weight:normal;font-size:20px;color:var(--or);margin-top:12px}
.texte a,.lien{color:var(--or)}
.texte p,.texte dd,.texte li{overflow-wrap:anywhere}
.texte ul,.texte ol{list-style:none;display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.texte li{position:relative;padding-left:36px}
.texte li::before{position:absolute;left:0;top:0}
.texte li .commande{margin-top:8px}
.texte ul>li::before{content:"→";color:var(--jade)}
.texte ol{counter-reset:n}
.texte ol>li{counter-increment:n}
.texte ol>li::before{content:counter(n,decimal-leading-zero);color:var(--jade)}
.texte dl{display:grid;grid-template-columns:max-content 1fr;gap:4px 16px}
.texte dt{color:var(--jade)}
@media (max-width:767px){.texte dl{grid-template-columns:minmax(0,1fr);gap:0}.texte dd+dt{margin-top:12px}}
.prendre{color:var(--or)}
code,pre,.cmd{font:16px/1.5 ui-monospace,"DejaVu Sans Mono",monospace;text-transform:none;-webkit-font-smoothing:auto}
code{overflow-wrap:anywhere;color:var(--jade)}
pre{display:block;background:var(--noir);color:var(--blanc);padding:12px 14px;overflow-x:auto;white-space:pre;max-width:100%;text-align:left}
pre code{color:inherit}
/* Commande plus large que l'écran : « ← glisser → » sous la commande, seulement quand elle défile */
.commande{min-width:0;max-width:100%;timeline-scope:--cmd}
.commande pre{scroll-timeline:--cmd inline}
.commande::after{display:block;max-height:0;overflow:hidden;color:var(--gris);text-align:right;content:"← →"/""}
.commande:lang(fr)::after{content:"← faites glisser →"/""}
.commande:lang(en)::after{content:"← swipe →"/""}
@supports (timeline-scope:--cmd){.commande::after{animation:glisser linear both;animation-timeline:--cmd}}
@keyframes glisser{from,to{max-height:2em;margin-top:4px}}
@supports not (timeline-scope:--cmd){@media (max-width:479px){.commande::after{max-height:2em;margin-top:4px}}}
.empreinte code{color:var(--blanc)}
/* Empreinte : 4 groupes de 16 insécables, coupure seulement entre deux groupes */
.empreinte .hachage{display:block}
.hachage span{display:inline-block;white-space:nowrap}
/* Nom de paquet : passe entier à la ligne suivante quand il tient sur une ligne */
.prendre .nom{display:inline-block;max-width:100%}
.hachage span:not(:last-child){margin-right:.5ch}
.texte a[href^="mailto:"]{white-space:nowrap}
.grand-chiffre{font-size:80px;line-height:1}
/* Tableau des touches : rangées en aplats alternés, empilé sous 900 px */
.tableau{width:min(100%,1100px,100vw - 2*var(--flanc))}
.tableau table{width:100%;border-collapse:collapse;text-align:left}
.tableau caption{color:var(--or);text-align:left;padding-bottom:8px}
.tableau th{font-weight:normal;color:var(--gris);padding:6px 10px;vertical-align:bottom}
.tableau td{padding:6px 10px;vertical-align:top}
.tableau td:first-child{color:var(--jade)}
.tableau tbody tr:nth-child(odd){background:var(--ecran2)}
.tableau td code{color:var(--blanc);font-size:16px}
/* Écrans du jeu : un écran par numéro */
.bobine{list-style:none;width:min(100%,1152px,100vw - 2*var(--flanc));display:flex;flex-wrap:wrap;gap:24px 16px}
.bobine li{flex:1 1 200px;max-width:270px}
.bobine figure{display:grid;gap:8px}
.bobine video,.clips>video{width:100%;height:auto;display:block;background:var(--noir)}
.clips>video{width:min(100%,1152px,100vw - 2*var(--flanc))}
.bobine figcaption{color:var(--blanc)}
.bobine figcaption b{font-weight:normal;color:var(--or)}
.planche{list-style:none;width:min(100%,1152px,100vw - 2*var(--flanc));display:grid;gap:32px}
.planche figure{display:grid;gap:8px}
.planche img{width:100%;height:auto;display:block;background:var(--noir)}
.planche figcaption{color:var(--blanc)}
.planche figcaption b{font-weight:normal;color:var(--or)}
:target{scroll-margin-top:60px}
/* Régie : créations du store en iframe (site/regie : taille réservée par format) ; mention dans la police du jeu, sur l'aplat noir de la borne */
.pub{background:var(--noir);text-align:center;padding:8px 16px 10px}
.pub-mot{font-size:20px;line-height:24px;color:var(--gris)}
.pub-boite{margin-top:4px;background:var(--prune)}
.pub-gauche,.pub-droite{display:none}
.pub-bas{padding-top:24px;padding-bottom:24px}
@media (max-width:767px){.pub{padding:6px 16px 8px}.pub-boite{margin-top:2px}}
/* Rails de pub (règle d'Alex du 17/11) : 160 x 600 seulement, fixes au milieu de la marge libre, affichés seulement si cette marge fait 176 px ou plus
   à côté du contenu (1152 px au plus) : 1152 + 2 x 176 = 1504 px. Le contenu ne bouge jamais pour un rail ; à tout zoom, la largeur en px CSS décide. */
@media (min-width:1504px){
.pub-gauche,.pub-droite{display:block;position:fixed;z-index:5;top:max(64px,calc(28px + 50vh - 318px));padding:0;background:none;width:160px}
.pub-gauche .pub-mot:lang(en),.pub-droite .pub-mot:lang(en){font-size:10px}
.pub-gauche{left:calc((100vw - 1152px) / 4 - 80px)}
.pub-droite{right:calc((100vw - 1152px) / 4 - 80px)}
}
@media (min-width:900px){
:root{--hud:56px}
.hud{padding:12px 32px}
.ecran{min-height:calc(100svh - var(--hud))}
.titre-ecran .spr,.fin .titre-ecran .spr{--s:3}
.reglages b{width:auto;min-width:9em}
.ecran{padding:56px 32px}
.liste li{grid-template-columns:28px max-content 1fr max-content;align-items:baseline}
.liste span{grid-column:4;text-align:right}
.liste .points{display:block;grid-column:3;grid-row:1;height:auto;color:var(--gris);overflow:hidden;white-space:nowrap}
.reglages i{width:auto;margin-left:auto}
.regles .dessins img{height:192px}
}
/* Règles près des publicités de côté : ×2 de 1280 à 1439 px ; ×3 dès 1440 px, marges transparentes des dessins rognées, 76 px entre les dessins */
@media (min-width:1280px){.regles .dessins{max-width:1152px}}
@media (min-width:1280px) and (max-width:1439px){.regles .dessins img{height:128px}}
@media (min-width:1440px){.regles .dessins{column-gap:76px}.regles .dessins img[src$="paire.png"]{margin:0 -15px 0 -18px}.regles .dessins img[src$="libre.png"],.regles .dessins img[src$="combo.png"]{margin:0 -51px 0 -24px}}
@media (min-width:1024px){.hud ul,.hud ul:target{display:flex;flex-direction:row;position:static;padding:0;gap:28px;background:none}.hud .menu{display:none}}
@media (min-width:1024px) and (max-width:1279px){.hud{gap:12px}.hud ul,.hud ul:target{gap:16px}.hud .joueur b{display:none}}
/* Pages de texte : l'écran tient la hauteur du contenu */
.court{min-height:0}
/* Tableau sous 900 px : chaque rangée devient un relevé, une ligne par appareil */
@media (max-width:899px){
.tableau thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.tableau tr,.tableau td{display:block}
.tableau tr{padding:8px 10px}
.tableau td{padding:2px 0;display:grid;grid-template-columns:minmax(0,9em) 1fr;gap:12px}
.tableau td::before{content:attr(data-th);color:var(--gris)}
.tableau td:first-child{grid-template-columns:1fr}
.tableau td:first-child::before{display:none}
}
@media (prefers-reduced-motion:reduce){.anim,.clignote{animation:none!important}}
