body[data-open="yes"]{background:#e7eaf1;overflow:hidden}
.kiosk{width:min(100%,calc(100cqh * 9 / 16));height:100cqh;margin:auto;background:#fff;display:grid;grid-template-rows:20% 50% 30%;position:relative;overflow:hidden;--ink:#26335d}
.menu-header{display:grid;grid-template-rows:55% 45%;padding:.8cqh 4%;border-bottom:1px solid #e4e7ee;min-height:0}
.menu-header>img{display:block;width:80%;height:80%;max-width:100%;object-fit:contain;justify-self:center;align-self:start;transform:translateY(-10%)}
.phone-slots{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1%;height:85%;align-self:center}
.player-card{position:relative;background:#f7f8fc;border:2px solid #d8deea;border-radius:1cqh;color:#4c5872;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.3cqh;padding:.6cqh .2cqh;min-height:0}
.player-name{font-size:clamp(12px,1.25cqh,26px);font-weight:700;color:#293354}.player-state{font-size:clamp(8px,.85cqh,18px);white-space:nowrap}.player-check{font-size:clamp(12px,1.2cqh,24px);line-height:1}.player-source{font-size:clamp(8px,.7cqh,14px);min-height:.8cqh}.player-card.connected{background:#e6f5ed;border-color:#8ac5a1;color:#276749}.player-card.selecting{outline:4px solid #293782;outline-offset:3px;background:#eceffa}
.category-list{display:grid;grid-template-rows:repeat(3,minmax(0,1fr));gap:1.4cqh;padding:2cqh 5%;min-height:0;transition:opacity .15s}.choosing-player .category-list{opacity:.45}
.category{--accent:#ae6331;--wash:#fff4df;position:relative;display:flex;align-items:center;min-height:0;width:100%;padding:1cqh 6%;border:3px solid transparent;border-radius:2cqh;background:var(--wash);color:var(--ink);text-align:left;transition:border-color .15s,box-shadow .15s;isolation:isolate;overflow:hidden}.category.retro{--accent:#7564bd;--wash:#f0ecfa}.category.thinking{--accent:#467a91;--wash:#e9f3f5}.category.selected{border-color:var(--accent);box-shadow:0 0 0 3px #fff,0 0 0 5px var(--accent)}.category:focus-visible{outline:none}
.category-copy{position:relative;display:flex;flex-direction:column;gap:.8cqh;z-index:1;width:90%}.eyebrow{font-size:clamp(12px,1.5cqh,30px);letter-spacing:.13em;font-weight:700;color:var(--accent,#64718b);line-height:1.2}.category strong{font-size:clamp(22px,2.8cqh,57px);font-weight:800;line-height:1.04;letter-spacing:-.055em}.description{font-size:clamp(14px,2cqh,42px);line-height:1.35;color:#647084}.category-art{position:absolute;right:1%;bottom:5%;width:24%;height:44%;opacity:.18;pointer-events:none}.category.selected .category-art{opacity:.12}.selection-arrow{position:absolute;right:6%;top:43%;font-size:clamp(20px,2.6cqh,52px);color:var(--accent);opacity:0;transition:opacity .15s;z-index:2}.selected .selection-arrow{opacity:1}
.category-detail{grid-row:2;padding:4cqh 8%;align-self:center;text-align:center;color:var(--ink)}.category-detail h2{font-size:clamp(24px,3.5cqh,70px);letter-spacing:-.05em}.category-detail p{font-size:clamp(12px,1.3cqh,26px);line-height:1.5;color:#647084}.category-detail button{padding:1.5cqh 3cqh;margin-top:2cqh;font-size:clamp(13px,1.3cqh,26px)}
.controller-footer{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5%;padding:1cqh 4%;border-top:1px solid #e4e7ee;min-height:0;background:white}
.footer-device-stack{display:grid;grid-template-rows:45% 8% 47%;min-height:0;min-width:0}.usb-panel{position:relative;min-width:0;min-height:0}.usb-panel #usb-ready{height:100%;width:100%}.controller-photo{position:relative;width:100%;height:100%}.controller-photo img{display:block;width:100%;height:100%;object-fit:contain}.controller-photo .controller-overlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.controller-overlay [data-control]{opacity:0;fill:#276aff85;stroke:#003cff;stroke-width:24;filter:drop-shadow(0 0 14px #fff)}.controller-overlay [data-control].active{opacity:1}
.footer-or{display:block;align-self:center;text-align:center;font-size:clamp(14px,1.35cqh,28px);font-weight:700;color:#78829b}
.phone-panel{display:flex;align-items:center;justify-content:center;gap:.6cqh;min-width:0;min-height:0}#phone-qr{display:flex;align-items:center;justify-content:center;height:min(12cqh,100%);width:12cqh;max-width:calc(100% - 3.5cqh);flex-shrink:0;background:#fff;font-size:clamp(10px,1cqh,20px);text-align:center}#phone-qr svg{height:100%;width:100%;display:block}.qr-caption{display:block;writing-mode:vertical-rl;white-space:nowrap;background:#eef1f8;color:#293782;border:1px solid #d1d9eb;border-radius:999px;padding:.6cqh .5cqh;font-size:clamp(8px,.9cqh,19px);font-weight:700;line-height:1.2}
.commands-panel{display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:1.2cqh;min-width:0;min-height:0;padding-left:1%;color:#293354}.commands-panel h2{font-size:clamp(16px,1.6cqh,33px);margin:0 0 .4cqh;font-weight:700}.controller-help,#usb-choice-hint{display:flex;flex-direction:column;gap:1.2cqh;margin:0}.commands-context{font-size:clamp(13px,1.2cqh,25px);margin:0 0 .5cqh;color:#66728b;line-height:1.3}.help-item{display:flex;align-items:center;gap:1cqh;font-size:clamp(13px,1.5cqh,31px);color:#596982;line-height:1.2}.help-item b{display:flex;align-items:center;justify-content:center;width:2.8cqh;height:2.8cqh;min-width:2.8cqh;border-radius:50%;background:#edf0f5;color:#465370;font-size:clamp(12px,1.3cqh,27px);font-weight:700}.help-item .button-a{background:#d94848;color:white}.help-item .button-b{background:#e5bf32;color:#493d19}.help-item.active{color:#293782;font-weight:700}.help-item.active b{box-shadow:0 0 0 3px #293782}.help-item b[data-control].active{background:#276aff;color:white;box-shadow:0 0 0 3px #003cff}
#usb-setup{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:.8cqh;text-align:center;background:white}#usb-message{font-size:clamp(14px,1.3cqh,27px);font-weight:700;color:#293354;margin:0;line-height:1.3}#usb-detection-hint{font-size:clamp(11px,.9cqh,19px);line-height:1.4;color:#66728b;margin:0}#usb-retry{font-size:clamp(12px,.9cqh,18px);min-height:0;padding:.5cqh 1cqh}.usb-panel #usb-ready:not([hidden])+#usb-setup:not([hidden]){position:absolute;bottom:0;left:0;right:0;height:auto;background:#fffffff0;padding:.5cqh}
#controller-status{align-self:flex-start;display:inline-flex;align-items:center;gap:.6cqh;border:1px solid #9acdb1;background:#e9f6ef;border-radius:999px;padding:.5cqh .8cqh;font-size:clamp(10px,.85cqh,18px);font-weight:700;color:#276749;line-height:1.3}#controller-status::before{content:'';width:.65em;height:.65em;border-radius:50%;background:#2a9a60;flex-shrink:0}
[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media(prefers-reduced-motion:reduce){.category,.selection-arrow,.category-list{transition:none}}
@media(max-height:950px){.qr-caption{padding:.2cqh .5cqh}}

/* Le cadre identifie le joueur qui vient d’appuyer, sans coche ni texte d’occupation. */
.player-card{--player-accent:#2e64be;--player-wash:#edf3ff}.player-card[data-phone-slot="2"]{--player-accent:#b85d20;--player-wash:#fff2e5}.player-card[data-phone-slot="3"]{--player-accent:#7952b7;--player-wash:#f3edff}.player-card[data-phone-slot="4"]{--player-accent:#187c82;--player-wash:#e5f6f6}.player-card.connected{background:#f6f7fb;border-color:#bbc5d8;color:#465775}.player-name{display:block;transform-origin:center;will-change:transform}.player-symbol{display:flex;align-items:center;justify-content:center;gap:.8cqh;color:#8290a8}.player-icon{display:block;width:3cqh;height:2.3cqh}.icon-phone{width:1.8cqh}.player-connect{font-size:clamp(10px,1cqh,21px);font-weight:700;color:#566783}.player-card.connected .player-connect{display:none}.player-card.connected .player-symbol{color:#40516e}.player-card.connected .player-icon{height:3.2cqh;width:4.4cqh}.player-card.device-phone .icon-gamepad,.player-card.device-usb .icon-phone{display:none}.player-card.connected .icon-phone{width:2.6cqh}.player-card.player-active,.player-card.player-held{border-color:var(--player-accent);box-shadow:0 0 0 3px var(--player-accent);background:var(--player-wash)}.player-card.player-active .player-name,.player-card.player-held .player-name{color:var(--player-accent)}

/* Commandes au bord droit, connexion matérialisée en vert. */
.controller-footer{padding-right:1.5%}.commands-panel{align-items:flex-end;padding-left:0;text-align:right}.commands-panel h2{width:100%;text-align:right}.commands-panel .controller-help,.commands-panel #usb-choice-hint{width:100%;align-items:stretch}.commands-panel .help-item{flex-direction:row-reverse;justify-content:flex-start;text-align:right}.commands-context{text-align:right}#controller-status{align-self:flex-end;max-width:100%}.player-card.connected{background:#dff3e5;color:#1d6038}.player-card.connected:not(.player-active):not(.player-held){border-color:#4f9668}.player-card.connected .player-name,.player-card.connected .player-symbol{color:#1d6038}

/* Habillage SNES : visuels locaux et QR dans le support fourni. */
.footer-device-stack{grid-template-rows:50% 50%;gap:0}.phone-panel{display:flex;align-items:center;justify-content:center}.qr-art{position:relative;width:100%;aspect-ratio:2;max-width:100%}.qr-support{display:block;width:100%;height:auto}.qr-art #phone-qr{position:absolute;left:63.443125%;top:22.88625%;width:28.11375%;height:56.2275%;max-width:none;flex-shrink:1;background:#fff}.qr-art #phone-qr svg{width:100%;height:100%;display:block}
.player-icon.icon-gamepad{object-fit:contain;width:4.2cqh;height:2.3cqh}.player-icon.icon-phone{width:4.2cqh;height:2.3cqh}.player-card.connected .player-icon.icon-gamepad,.player-card.connected .player-icon.icon-phone{width:6cqh;height:3.3cqh}.player-symbol{gap:.7cqh}
#usb-setup{position:relative;width:100%;height:100%;background:transparent;overflow:visible}.usb-idle-image{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;filter:grayscale(1);opacity:.3}.usb-idle-notice{position:relative;z-index:1;max-width:94%;padding:1cqh 1.2cqh;border:2px solid #89849b;border-radius:1.2cqh;background:#efeff5ed;box-shadow:0 .35cqh 0 #aaa6ba,inset 0 2px 0 #fff;text-align:center}#usb-message{font-size:clamp(12px,1.1cqh,23px);line-height:1.35}#usb-detection-hint{margin-top:.6cqh}.usb-panel #usb-ready:not([hidden])+#usb-setup:not([hidden]){position:absolute;inset:0;height:100%;padding:0;background:transparent}
.commands-panel{background:linear-gradient(145deg,#f2f2f7,#dedee8);border:3px solid #9c97ac;border-radius:2cqh;padding:1.5cqh 1.3cqh;box-shadow:inset 0 3px 0 #fff,inset 0 -3px 0 #c4c1d0,0 .5cqh 0 #a8a2b9;gap:1.4cqh}.snes-accent{display:flex;align-self:flex-end;gap:.6cqh;margin:0 0 .6cqh}.snes-accent i{display:block;width:1.3cqh;height:2.5cqh;border-radius:999px;transform:rotate(35deg);box-shadow:inset 0 2px 1px #ffffff90,0 2px 1px #0002}.snes-blue{background:#365db8}.snes-green{background:#3d9c62}.snes-yellow{background:#e5bf32}.snes-red{background:#d94848}

/* Visuel de branchement et fondu rapide, uniquement lors des transitions USB. */
.menu-header>img{transform:translateY(10%)}.free-icons,.connected-icons{display:flex;align-items:center;justify-content:center;gap:.8cqh}.free-icon{display:block;width:3.5cqh;height:2.3cqh;color:#8290a8}.free-phone{width:1.8cqh}.player-card .connected-icons{display:none}.player-card.connected .free-icons{display:none}.player-card.connected .connected-icons{display:flex}.commands-panel .help-item b{border:2px solid #111}
.usb-panel #usb-ready,#usb-idle-visual{position:absolute;inset:0;height:100%;width:100%;transition:opacity 180ms ease-out,visibility 0s linear 180ms}.usb-panel #usb-ready{opacity:0;visibility:hidden;pointer-events:none}#usb-idle-visual{opacity:1;visibility:visible;transition-delay:0s}#usb-idle-visual img{display:block;width:100%;height:100%;object-fit:contain;border-radius:.7cqh}.usb-panel.usb-connected #usb-ready{opacity:1;visibility:visible;transition-delay:0s}.usb-panel.usb-connected #usb-idle-visual{opacity:0;visibility:hidden;transition:opacity 180ms ease-out,visibility 0s linear 180ms}.usb-panel #usb-setup{position:absolute;inset:0;height:100%;padding:0;background:transparent;z-index:2}@media(prefers-reduced-motion:reduce){.usb-panel #usb-ready,#usb-idle-visual{transition:none!important}}

/* QR sans aplat blanc : la fenêtre du support reste visible. */
.qr-art #phone-qr{background:transparent}.qr-art #phone-qr svg>rect{fill:transparent}

/* Écran rétro des indications et accents fixés dans le cadre. */
.menu-header{border-bottom:0}.controller-footer{border-top:0}.commands-panel{position:relative;display:grid;grid-template-rows:auto minmax(0,1fr);align-items:stretch;align-content:stretch;padding-bottom:4.8cqh;gap:1.1cqh}.commands-screen{width:100%;box-sizing:border-box;min-height:5.3cqh;display:flex;align-items:center;justify-content:center;padding:.6cqh .8cqh;background:repeating-linear-gradient(0deg,#b9c9aa40 0,#b9c9aa40 1px,transparent 1px,transparent 4px),#dce5cb;border:3px solid #454955;border-radius:0;box-shadow:inset 3px 3px 0 #76826b,inset -3px -3px 0 #edf3e3,3px 0 0 #777283,-3px 0 0 #777283,0 3px 0 #777283,0 -3px 0 #777283}.commands-screen p{margin:0;max-width:100%;font-family:monospace;font-size:clamp(12px,1.3cqh,27px);font-weight:700;line-height:1.25;text-align:center;color:#28392b;overflow-wrap:normal}.commands-panel .snes-accent{position:absolute;left:1.5cqh;bottom:1cqh;margin:0;gap:.6cqh}.commands-panel .controller-help,.commands-panel #usb-choice-hint{justify-content:center;gap:1cqh;min-height:0}

/* Écran des indications : largeur maximale et hauteur stable pour deux lignes. */
.commands-panel{grid-template-rows:6.4cqh minmax(0,1fr);padding-top:.8cqh;padding-left:.6cqh;padding-right:.6cqh}.commands-screen{width:100%;height:6.4cqh;min-height:6.4cqh;max-height:6.4cqh;min-width:0;overflow:hidden;padding:.4cqh .5cqh}.commands-screen p{font-size:clamp(11px,1.25cqh,26px);line-height:1.3}.commands-panel .controller-help,.commands-panel #usb-choice-hint{padding-left:.7cqh;padding-right:.7cqh;box-sizing:border-box}

/* La colonne ne doit pas prendre la largeur intrinsèque du texte. */
.commands-panel{grid-template-columns:minmax(0,1fr);justify-content:stretch;justify-items:stretch;width:100%;box-sizing:border-box}.commands-screen{justify-self:stretch;contain:inline-size}

/* Fond illustré local et fondu de couleur sur toute la page. */
body[data-open="yes"]{background:#250547 url("fond-menu-retro.png") center/cover no-repeat fixed;isolation:isolate}body[data-open="yes"]::before{content:"";position:fixed;inset:0;background:var(--category-background,#fff4df);opacity:0;transition:opacity 240ms ease;pointer-events:none;z-index:-1}body[data-open="yes"].category-open::before{opacity:1}.kiosk{background:transparent}.controller-footer{background:transparent}.category-detail{width:100%;box-sizing:border-box;padding:3cqh 4%}.coming-soon{display:flex;align-items:center;justify-content:center;min-height:10cqh;margin:2cqh 0;padding:1.5cqh 1cqh;border-top:4px solid #26335d;border-bottom:4px solid #26335d;background:#26335d;color:#fff;font-family:monospace;font-size:clamp(24px,4.3cqh,86px);font-weight:900;text-transform:uppercase;letter-spacing:.03em;box-shadow:0 .6cqh 0 #26335d30}.category-detail:not([hidden]){animation:category-appear 240ms ease-out}@keyframes category-appear{from{opacity:0;transform:translateY(1cqh)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){body[data-open="yes"]::before{transition:none}.category-detail:not([hidden]){animation:none}}

/* Scène portrait 9:16 contenue dans la fenêtre ; unités internes liées à sa hauteur. */
html:has(body[data-open="yes"]){height:100%;min-height:100svh;display:grid;place-items:center;background:#10091d}body[data-open="yes"]{position:relative;width:min(100vw,56.25svh);height:min(100svh,177.7777778vw);min-height:0;margin:0;container-type:size;background-attachment:scroll}.kiosk{width:100%;height:100%;margin:0}body[data-open="yes"]::before{position:absolute}

/* Illustrations locales propres au menu et aux trois univers. */
body[data-open="yes"]{background-image:url("fond-menu-vert-v2.png")}body[data-open="yes"]::before{background-image:var(--category-wallpaper,none);background-position:center;background-size:cover;background-repeat:no-repeat}.category-detail{background:#ffffffdf;border-radius:2cqh;margin:0 4%;width:92%;padding:2cqh 3%;box-shadow:0 .5cqh 2cqh #0002}

/* Deux joueurs aux anciennes positions centrales. */
.phone-slots{grid-template-columns:repeat(2,minmax(0,1fr));width:49.5%;justify-self:center;gap:2%}

/* Activité joueur : seule la couleur du contour change. */
.player-card.player-active,.player-card.player-held{border-width:2px;border-color:#2e64be;box-shadow:none;background:#dff3e5}

.help-item .button-y{background:#329653;color:#fff}

/* Joueur 1 et Joueur 2 plus espacés (demande du 20/11). */
.phone-slots{width:62%;gap:16%}
