        /* PC : masquage auto du menu quand un décor joue en fond (réapparaît au mouvement souris) */
        /* Loader (chargement de la vidéo de fond) */
        #bg-loading { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: #14110e; transition: opacity .5s ease; }
        #bg-loading.hidden { opacity: 0; pointer-events: none; }
        .bl-spinner { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(181,154,98,0.28); border-top-color: #c6951f; animation: blspin 0.9s linear infinite; }
        @keyframes blspin { to { transform: rotate(360deg); } }

        /* Slogan dans l'en-tête : plus grand + scintillement doré */
        .head-slogan {
            font-style: italic; font-weight: 600; font-size: 1.2rem; line-height: 1;
            background: linear-gradient(90deg, #efe3c4 0%, #fff6dc 25%, #e5b94e 50%, #fff6dc 75%, #efe3c4 100%);
            background-size: 200% auto; -webkit-background-clip: text; background-clip: text;
            -webkit-text-fill-color: transparent; color: transparent;
            filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
            animation: slogShimmer 5s linear infinite;
        }
        /* scintillement de gauche à droite */
        @keyframes slogShimmer { from { background-position: 200% center; } to { background-position: 0% center; } }
        :root {
            --vermilion: #9e2a22;
            --vermilion-glow: rgba(186, 50, 38, 0.45);
            --washi-bg: #f7f3eb;
            --washi-banner: #faf7f0;
            --washi-dark: #dfd5be;
            --ink-black: #181512;
            --gold-line: #b59a62;
        }

        * {
            user-select: none;
            -webkit-font-smoothing: antialiased;
        }

        body {
            font-family: 'Cormorant Garamond', Georgia, serif;
            background-color: #14110e;
            color: var(--ink-black);
            overflow-x: hidden;
            margin: 0;
            padding: 0;
        }

        /* Panneau latéral gauche avec fondu parchemin organique, irrégulier et effiloché */
        .left-menu-panel {
            background-color: #f7f3eb;
            background-image: 
                radial-gradient(at 15% 20%, rgba(255, 252, 245, 0.95) 0px, transparent 70%),
                radial-gradient(at 85% 80%, rgba(225, 212, 190, 0.7) 0px, transparent 60%),
                repeating-linear-gradient(45deg, rgba(0,0,0,0.012) 0px, rgba(0,0,0,0.012) 2px, transparent 2px, transparent 4px);
            box-shadow: 25px 0 65px rgba(0, 0, 0, 0.42);
            position: relative;
            z-index: 20;
            /* Masque SVG de fondu organique style bord de parchemin déchiré */
            -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,1) 58%, rgba(0,0,0,0.82) 74%, rgba(0,0,0,0.45) 88%, rgba(0,0,0,0) 100%),
                                radial-gradient(circle at 75% 50%, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 85%);
            -webkit-mask-composite: source-in;
            mask-image: linear-gradient(90deg, rgba(0,0,0,1) 58%, rgba(0,0,0,0.82) 74%, rgba(0,0,0,0.45) 88%, rgba(0,0,0,0) 100%);
            mask-composite: intersect;
        }

        @media (max-width: 1024px) {
            .left-menu-panel {
                background: linear-gradient(180deg, #f7f3eb 0%, #f7f3eb 78%, rgba(247, 243, 235, 0.75) 92%, rgba(247, 243, 235, 0) 100%);
                box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
                -webkit-mask-image: none;
                mask-image: none;
            }
        }

        /* ===== Carte-menu flottante haut de gamme (style goal.jpg) ===== */
        .menu-hero-card {
            background-color: rgba(255, 255, 255, 0.66);
            background-image: none;
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            box-shadow:
                0 28px 70px rgba(10, 7, 4, 0.4),
                inset 0 0 22px rgba(255, 255, 255, 0.35);
            position: relative;
        }
        .menu-hero-card::before {
            content: '';
            position: absolute;
            inset: 10px;
            border: 1.5px solid var(--gold-line);
            border-radius: 22px;
            pointer-events: none;
        }
        .menu-hero-card::after {
            content: '';
            position: absolute;
            inset: 14px;
            border: 0.75px solid rgba(181, 154, 98, 0.5);
            border-radius: 19px;
            pointer-events: none;
        }


        /* Boutons-talismans haut de gamme Washi & Or (Entièrement arrondis et somptueux) */
        .banner-path-btn {
            background-color: #fcf9f2;
            background-image: 
                radial-gradient(circle at 18% 50%, rgba(181, 154, 98, 0.2) 0%, transparent 65%),
                linear-gradient(135deg, #ffffff 0%, #f6efe2 55%, #ebe0cc 100%);
            border: 2px solid #b59a62;
            border-radius: 9999px; /* Forme pilule/arrondie parfaite */
            box-shadow: 
                0 8px 22px rgba(24, 21, 18, 0.2),
                0 2px 5px rgba(24, 21, 18, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.95),
                inset 0 -3px 0 rgba(181, 154, 98, 0.35),
                inset 0 0 15px rgba(181, 154, 98, 0.2);
            position: relative;
            overflow: hidden;
            transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
        }

        .banner-path-btn::before {
            content: '';
            position: absolute;
            inset: 5px;
            border: 1px solid rgba(181, 154, 98, 0.65);
            border-radius: 9999px;
            pointer-events: none;
            transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
        }

        .banner-path-btn::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 15%;
            right: 15%;
            height: 3px;
            background: linear-gradient(90deg, transparent, var(--vermilion), transparent);
            transform: scaleX(0);
            transform-origin: center;
            transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
        }

        .banner-path-btn:hover {
            transform: translateY(-4px) scale(1.02);
            background-image: 
                radial-gradient(circle at 18% 50%, rgba(158, 42, 34, 0.15) 0%, transparent 70%),
                linear-gradient(135deg, #ffffff 0%, #fdf8ee 60%, #f4ead8 100%);
            border-color: var(--vermilion);
            box-shadow: 
                0 16px 35px rgba(158, 42, 34, 0.32),
                0 4px 12px rgba(24, 21, 18, 0.18),
                inset 0 1px 0 #ffffff,
                inset 0 0 20px rgba(158, 42, 34, 0.2);
        }

        .banner-path-btn:hover::before {
            border-color: rgba(158, 42, 34, 0.6);
            inset: 6px;
        }

        .banner-path-btn:hover::after {
            transform: scaleX(1);
        }

        .banner-path-btn:active {
            transform: translateY(-1px) scale(1.0);
        }

        .stone-pedestal {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 9999px;
            padding: 3px;
            background: radial-gradient(circle, rgba(181,154,98,0.35) 0%, rgba(181,154,98,0.08) 70%);
            border: 1px solid rgba(181, 154, 98, 0.75);
            box-shadow: inset 0 1px 5px rgba(0,0,0,0.18);
            transition: all 0.4s ease;
        }

        .banner-path-btn:hover .stone-pedestal {
            border-color: var(--vermilion);
            background: radial-gradient(circle, rgba(158,42,34,0.25) 0%, transparent 75%);
            transform: scale(1.1) rotate(-6deg);
        }

        .path-hanko-badge {
            width: 24px;
            height: 24px;
            border-radius: 6px;
            border: 1.2px solid rgba(158, 42, 34, 0.5);
            color: var(--vermilion);
            font-size: 12px;
            line-height: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            opacity: 0.65;
            transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
            flex-shrink: 0;
            background: rgba(255, 255, 255, 0.7);
        }

        .banner-path-btn:hover .path-hanko-badge {
            background-color: var(--vermilion);
            color: #faf7f0;
            border-color: var(--vermilion);
            opacity: 1;
            transform: scale(1.12);
            box-shadow: 0 3px 12px rgba(158, 42, 34, 0.45);
        }

        .sanctuary-action-btn {
            background: linear-gradient(180deg, #fdfaf3 0%, #ede3cf 100%);
            border: 1.5px solid #b59a62;
            box-shadow: 
                0 6px 16px rgba(10, 7, 4, 0.38),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
            transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
        }
        .sanctuary-action-btn:hover {
            transform: translateY(-2px);
            border-color: var(--vermilion);
            background: linear-gradient(180deg, #ffffff 0%, #f8f1e2 100%);
            box-shadow: 
                0 10px 22px rgba(158, 42, 34, 0.32),
                inset 0 1px 0 #ffffff;
        }

        /* Effet visuel majestueux sur le slogan (lueur et respiration lumineuse) */
        @keyframes sloganBreath {
            0%, 100% {
                text-shadow: 0 0 25px rgba(255, 245, 220, 0.4), 0 2px 4px rgba(0,0,0,0.15);
                transform: translateY(0);
            }
            50% {
                text-shadow: 0 0 45px rgba(255, 235, 190, 0.75), 0 4px 12px rgba(158, 42, 34, 0.2);
                transform: translateY(-2px);
            }
        }

        .slogan-glowing-effect {
            animation: sloganBreath 6s ease-in-out infinite;
        }

        @keyframes pathHighlightPulse {
            0%, 100% {
                transform: translateY(0);
                border-color: #b59a62;
                box-shadow: 0 8px 22px rgba(24, 21, 18, 0.2);
            }
            40% {
                transform: translateY(-4px);
                border-color: var(--vermilion);
                box-shadow: 
                    0 16px 30px rgba(158, 42, 34, 0.32),
                    0 0 22px rgba(181, 154, 98, 0.5);
            }
            75% {
                transform: translateY(0);
                border-color: #b59a62;
            }
        }

        .guided-seq-1 { animation: pathHighlightPulse 4.5s ease-in-out infinite; animation-delay: 0s; }
        .guided-seq-2 { animation: pathHighlightPulse 4.5s ease-in-out infinite; animation-delay: 1.5s; }
        .guided-seq-3 { animation: pathHighlightPulse 4.5s ease-in-out infinite; animation-delay: 3s; }

        .paths-nav-group:hover .banner-path-btn {
            animation-play-state: paused;
        }

        .screen-layer {
            transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
        }


        .kaya-board {
            background: linear-gradient(135deg, #d7a15c 0%, #c68b45 45%, #b37632 100%);
            box-shadow: 
                0 28px 60px rgba(0, 0, 0, 0.75),
                0 12px 0 #8a561e,
                0 18px 25px rgba(0, 0, 0, 0.6),
                inset 0 2px 4px rgba(255, 235, 195, 0.6);
            transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
        }

        .kaya-board.perspective-3d {
            transform: perspective(1100px) rotateX(26deg) rotateZ(-6deg);
        }

        .kaya-board.zenithal-2d {
            transform: perspective(1100px) rotateX(0deg) rotateZ(0deg);
        }

        @media (max-width: 640px) {
            .kaya-board.perspective-3d {
                transform: perspective(800px) rotateX(18deg) rotateZ(-3deg);
            }
            /* ===== Rendu mobile raffiné (immersif, pas « grille/pub ») ===== */
            .menu-hero-card { gap: 0.6rem; padding: 1rem 0.95rem; }
            #hero-slogan { font-size: 1.4rem; }

            /* Titres de section : petites capitales dorées, centrés, aérés */
            .sec-title {
                font-size: 0.6rem !important; font-weight: 700; letter-spacing: 0.2em;
                text-transform: uppercase; color: #9a7b3e !important; text-align: center;
                margin-bottom: 0.35rem !important; opacity: 0.95;
            }

            /* Langue : drapeaux nus (plus de boîtes), centrés */
            .lang-btn { border: none !important; background: transparent !important; height: auto; padding: 2px; }
            .lang-btn.is-active { box-shadow: none; }
            .lang-btn img { width: 24px; height: 17px; }
            .lang-btn.is-active img { outline: 2px solid #9e2a22; outline-offset: 1px; }

            /* Graphisme & Niveau : pastilles légères, sans effet tableau */
            .gfx-tile, .voie-sq {
                border-color: rgba(181,154,98,0.3) !important;
                background: rgba(255,253,248,0.45) !important; box-shadow: none !important;
                font-size: 0.72rem;
            }
            .gfx-tile { height: 34px; }
            .gfx-tile.is-selected, .voie-sq.is-selected {
                border-color: #9e2a22 !important; background: rgba(158,42,34,0.08) !important;
            }

            /* Carrousel : cadre plus doux */
            .decor-stage { border-width: 1px; border-color: rgba(181,154,98,0.55); box-shadow: 0 10px 26px rgba(20,12,6,0.26); }
            #decor-name { font-size: 0.95rem; }

            /* Puces de langue alignées proprement */
            .grid.grid-cols-6 { justify-items: center; }

            /* ===== Splash mobile : d'abord la vidéo + slogan + bouton ===== */
            body:not(.menu-open) header,
            body:not(.menu-open) footer,
            body:not(.menu-open) .menu-scroll { display: none; }
            body:not(.menu-open) #mobile-splash { display: flex; }

            /* ===== Mobile : vidéo de fond immersive + décor en vedette, contrôles épurés ===== */
            #bg-video { object-position: 70% center; }      /* garde le sujet (à droite) visible */
            .menu-hero-card {
                gap: 0.55rem;
                background-color: rgba(255,255,255,0.5) !important;
                backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
                max-width: 370px; margin: 0 auto;
            }
            #hero-slogan { order: 0; font-size: 1.55rem; }
            .sec-env   { display: none; }   /* décor choisi via l'étape plein écran */
            .sec-env .sec-title { display: none; }

            /* Étape 1 (plein écran) : la vidéo de fond EST le décor ; options masquées */
            body.menu-open.decor-select #decor-mobile { display: block; }
            body.decor-select .menu-scroll { display: none !important; }
            body.decor-select footer,
            body.decor-select #cookie-banner { display: none !important; }
            body.decor-select #bg-video { object-position: center; }
            .sec-mode  { order: 2; }
            .sec-level { order: 3; }
            .sec-gfx   { order: 4; }
            .sec-lang  { display: none; }   /* langue via le menu déroulant du splash */
            #decor-name { font-size: 1.05rem; margin-top: 0.35rem; }

            /* Logo + Connexion/Inscription uniquement sur le splash → en-tête masqué, menu PLEIN ÉCRAN */
            header { display: none !important; }
            body.menu-open #menu-close {
                display: flex; position: fixed; top: 12px; right: 12px; z-index: 50;
                width: 34px; height: 34px; align-items: center; justify-content: center;
                border-radius: 9999px; background: rgba(247,243,235,0.92); color: #9e2a22;
                font-size: 15px; line-height: 1; border: 1px solid rgba(181,154,98,0.55);
                box-shadow: 0 2px 10px rgba(20,12,6,0.2); cursor: pointer;
            }
            body.menu-open #menu-close:hover { background: #fff; }
            .menu-scroll { padding: 0.4rem 0 3rem !important; align-items: stretch; }
            .menu-hero-card {
                max-width: 100% !important; margin: 0; border-radius: 0;
                background-color: rgba(247,243,235,0.95) !important;
                backdrop-filter: none; -webkit-backdrop-filter: none;
                box-shadow: none; min-height: 100%; justify-content: center;
                padding: 2.75rem 1.15rem 1rem; gap: 0.85rem;
            }
            .menu-hero-card::before, .menu-hero-card::after { display: none; }
        }

        body.mobile-sim-active {
            background-color: #0b0908 !important;
            background-image: radial-gradient(circle at 50% 45%, #26201a 0%, #090806 100%) !important;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100dvh;
            padding: 3.2rem 1rem 1rem 1rem;
            overflow: hidden !important;
        }

        #phone-frame-simulator {
            transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1), height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
        }

        body.mobile-sim-active #phone-frame-simulator {
            position: relative;
            width: var(--sim-w, 390px);
            height: var(--sim-h, 812px);
            max-height: calc(100dvh - 4.5rem);
            max-width: calc(100vw - 1.5rem);
            border: 11px solid #24201c;
            border-radius: 42px;
            box-shadow: 
                0 30px 90px rgba(0, 0, 0, 0.9),
                0 0 0 2px #b59a62,
                inset 0 0 18px rgba(0, 0, 0, 0.5);
            overflow: hidden;
            background: #14110e;
            transform: translateZ(0);
        }

        body.mobile-sim-active #phone-frame-simulator::before {
            content: '';
            position: absolute;
            top: 6px;
            left: 50%;
            transform: translateX(-50%);
            width: 86px;
            height: 16px;
            background: #14110e;
            border-radius: 12px;
            z-index: 100;
            pointer-events: none;
            box-shadow: inset 0 1px 2px rgba(255,255,255,0.12);
        }
        /* ===== Sélecteur de décor (vignettes vidéo dans la carte) ===== */
        .gfx-tile {
            position: relative; display: flex; align-items: center; justify-content: center; gap: 5px;
            height: 40px; padding: 0 8px; border: 2px solid rgba(181,154,98,0.5); border-radius: 10px;
            background: rgba(247,243,235,0.7); color: #181512; cursor: pointer;
            font-family: 'Cinzel', serif; font-weight: 700; font-size: 0.82rem; text-align: center;
            transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
        }
        .gfx-tile:hover { border-color: #9e2a22; transform: translateY(-2px); }
        .gfx-tile.is-selected { border-color: #9e2a22; box-shadow: 0 0 0 2px rgba(158,42,34,0.45); background: rgba(158,42,34,0.07); }
        .gfx-prem { color: #c79a2e; font-size: 13px; line-height: 1; }
        #premium-modal, #account-modal {
            position: fixed; inset: 0; z-index: 100; display: none;
            align-items: center; justify-content: center; padding: 18px;
            background: rgba(10,7,4,0.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
        }
        #premium-modal.open, #account-modal.open { display: flex; }
        /* Modale de compte (connexion / inscription), branchée sur /api/account */
        .ac2-tabs { display: flex; gap: 6px; margin: 2px 0 14px; }
        .ac2-tabs button { flex: 1; padding: 8px; border-radius: 10px; border: 1px solid #b59a62; background: #f0e8d6; color: #57493c; font-weight: 600; cursor: pointer; }
        .ac2-tabs button[aria-selected="true"] { background: #9e2a22; color: #faf7f0; border-color: #9e2a22; }
        .ac2-form { display: grid; gap: 10px; text-align: left; }
        .ac2-form label { display: grid; gap: 4px; font-size: 12.5px; color: #57493c; font-weight: 600; }
        .ac2-form input { padding: 10px 12px; border-radius: 10px; border: 1px solid #b59a62; background: #fffdf7; color: #2a2012; font-size: 15px; }
        .ac2-main { width: 100%; padding: 12px; border-radius: 12px; border: 0; background: #9e2a22; color: #faf7f0; font-weight: 700; cursor: pointer; }
        .ac2-main[disabled] { opacity: .7; cursor: wait; }
        .ac2-link { background: none; border: 0; color: #9e2a22; text-decoration: underline; cursor: pointer; font-size: 13px; padding: 2px; }
        .ac2-msg { margin: 0 0 10px; padding: 9px 11px; border-radius: 10px; background: #f6e3dc; color: #8a3220; font-size: 13px; text-align: left; }
        .ac2-msg.ok { background: #e3ead6; color: #3c4a2c; }
        .ac2-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
        .ac2-who { font-size: 15px; color: #2a2012; }
        .ac2-prem { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: linear-gradient(135deg,#fff3cf,#f1d58d); color: #5b3f0c; font-weight: 600; font-size: 13px; }
        .premium-card {
            font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
            width: 100%; max-width: 400px; background: #faf7f0;
            border: 2px solid #b59a62; border-radius: 20px; padding: 24px 22px;
            box-shadow: 0 24px 60px rgba(0,0,0,0.5); text-align: center; max-height: 90vh; overflow-y: auto;
        }
        .decor-stage {
            position: relative; width: 100%; aspect-ratio: 16 / 10;
            border-radius: 16px; overflow: hidden;
            border: 2px solid rgba(181,154,98,0.6);
            box-shadow: 0 14px 34px rgba(20,12,6,0.34);
            background: #1c140c;
        }
        .decor-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
        .decor-arrow {
            position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
            width: 40px; height: 40px; border-radius: 9999px;
            display: flex; align-items: center; justify-content: center;
            font-size: 26px; line-height: 1; color: #181512; padding-bottom: 3px;
            background: rgba(247,243,235,0.92); border: 1px solid rgba(181,154,98,0.7);
            box-shadow: 0 4px 12px rgba(20,12,6,0.4); cursor: pointer; transition: background .2s ease;
        }
        .decor-arrow:hover { background: #ffffff; }
        .decor-arrow-l { left: 8px; }
        .decor-arrow-r { right: 8px; }
        #decor-dots .dot { width: 8px; height: 8px; border-radius: 9999px; background: rgba(181,154,98,0.5); cursor: pointer; transition: all .2s ease; border: none; padding: 0; }
        #decor-dots .dot.active { background: #9e2a22; transform: scale(1.25); }

        /* ===== Sélection du décor en plein écran (smartphone) ===== */
        #decor-mobile { position: fixed; inset: 0; z-index: 30; display: none; pointer-events: none; }
        #decor-mobile > * { pointer-events: auto; }
        /* Surface plein écran qui capte le balayage (sous les flèches et le bandeau du bas) */
        /* 2026-11-11 : bande à défilement aimanté (scroll snap) — une diapositive plein écran par décor (app.js : buildDecorSlides) */
        #dm-swipe { position: absolute; inset: 0; z-index: 1; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
            scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x; background: transparent; }
        #dm-swipe::-webkit-scrollbar { display: none; }
        .dm-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always;
            background-size: cover; background-position: center; background-repeat: no-repeat; }
        /* l'image s'efface en fondu devant la vidéo, mais REVIENT d'un coup au départ d'un glissement (pas de fondu pendant le mouvement) */
        .dm-slide.live { opacity: 0; transition: opacity .45s ease; }
        /* PC : la même bande, derrière l'interface (aucun clic capté : flèches, moitiés d'écran, pavé tactile — app.js) */
        #decor-strip { display: none; }
        @media (min-width: 641px) {
            body[data-flow="decor"] #decor-strip { display: block; position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; contain: strict; }
            /* piste déplacée par transformation : animation faite par la carte graphique (plus fluide qu'un défilement sur de grandes images) */
            #decor-strip .ds-track { display: flex; width: 100%; height: 100%; will-change: transform; transform: translate3d(0,0,0);
                transition: transform .62s cubic-bezier(.22,.72,.18,1); }
            #decor-strip .dm-slide { backface-visibility: hidden; }
        }
        /* le bandeau du bas laisse passer le geste vers la bande (ses boutons restent cliquables) */
        #decor-mobile > .dm-bottom { pointer-events: none; }
        #decor-mobile .dm-bottom button { pointer-events: auto; }
        .dm-arrow { z-index: 3; }
        .dm-bottom { z-index: 3; touch-action: pan-y; }   /* le titre se balaie aussi (geste écouté sur #decor-mobile) */
        .dm-arrow {
            position: absolute; top: 50%; transform: translateY(-50%);
            width: 54px; height: 54px; border-radius: 9999px;
            display: flex; align-items: center; justify-content: center;
            font-size: 34px; line-height: 1; padding-bottom: 4px;
            color: #faf7f0; background: rgba(20,12,6,0.42);
            border: 1.5px solid rgba(255,255,255,0.55);
            backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
            box-shadow: 0 4px 14px rgba(0,0,0,0.45); cursor: pointer;
        }
        .dm-arrow:active { background: rgba(20,12,6,0.62); }
        .dm-arrow-l { left: 12px; }
        .dm-arrow-r { right: 12px; }
        .dm-lock { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-56%); z-index: 2; }
        .dm-bottom {
            position: absolute; left: 0; right: 0; bottom: 0;
            display: flex; flex-direction: column; align-items: center; gap: 14px;
            padding: 2rem 1.25rem 2.4rem;
            background: linear-gradient(to top, rgba(0,0,0,0.74), rgba(0,0,0,0.25) 62%, transparent);
        }
        .dm-name {
            font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.65rem; color: #faf7f0;
            text-shadow: 0 2px 12px rgba(0,0,0,0.8); text-align: center;
        }
        .dm-dots { display: flex; gap: 7px; }
        .dm-dots .dot { width: 8px; height: 8px; border-radius: 9999px; background: rgba(255,255,255,0.4); border: none; padding: 0; cursor: pointer; transition: all .2s ease; }
        .dm-dots .dot.active { background: #faf7f0; width: 22px; }
        .dm-validate {
            width: 100%; max-width: 340px; height: 52px; border-radius: 9999px;
            background: #9e2a22; color: #faf7f0; border: none; cursor: pointer;
            font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.1rem;
            box-shadow: 0 8px 24px rgba(0,0,0,0.5);
        }
        .dm-validate:active { background: #8a241d; }

        /* ===== Assistant pas à pas du menu (Jouer maintenant → Graphisme → Niveau → Mode) ===== */
        .step-off { display: none !important; }
        #play-now {
            align-self: center; align-items: center; justify-content: center; text-align: center;
            height: 48px; padding: 0 34px; border: none; border-radius: 9999px;
            background: #9e2a22; color: #faf7f0; cursor: pointer; line-height: 1;
            font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.15rem;
            box-shadow: 0 10px 28px rgba(158,42,34,0.5); transition: background .2s ease, transform .2s ease;
        }
        #play-now .pn-log { display: none; }
        body.is-logged #play-now .pn-free { display: none; }
        body.is-logged #play-now .pn-log { display: inline; }
        #play-now:hover { background: #8a241d; transform: translateY(-1px); }
        #menu-back {
            align-self: center; display: inline-flex; align-items: center; gap: 5px;
            background: rgba(0,0,0,0.05); color: #5a4b33; border: 1px solid rgba(181,154,98,0.6);
            border-radius: 9999px; padding: 6px 14px; font-size: 0.8rem; font-weight: 600; cursor: pointer;
            transition: background .2s ease;
        }
        #menu-back:hover { background: rgba(0,0,0,0.1); }

        /* Zones de clic latérales pour changer de décor (PC, pendant le choix) */
        .decor-click { display: none; }

        /* ===== Parcours : Jouer maintenant / Je choisis ce décor ===== */
        #play-now, #confirm-decor { display: none; }
        #confirm-decor {
            align-self: center; align-items: center; justify-content: center; text-align: center;
            min-height: 48px; max-width: 440px; padding: 10px 28px; border-radius: 9999px; border: none; cursor: pointer;
            background: #9e2a22; color: #faf7f0; line-height: 1.2;
            font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.05rem;
            box-shadow: 0 10px 26px rgba(158,42,34,0.45); transition: background .2s ease, transform .2s ease;
        }
        #confirm-decor:hover { background: #8a241d; transform: translateY(-1px); }
        #confirm-decor.is-premium { background: #1c140c; border: 1.5px solid #cda434; }
        #confirm-decor.is-premium:hover { background: #2c2217; }

        /* ===== Popup de configuration ===== */
        #setup-modal {
            position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 18px;
            background: rgba(10,7,4,0.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
        }
        #setup-modal.open { display: flex; }
        .setup-card {
            position: relative; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
            width: 100%; max-width: 460px; background: #faf7f0; border: 2px solid #b59a62; border-radius: 20px;
            padding: 26px 22px 22px; box-shadow: 0 24px 60px rgba(0,0,0,0.5); max-height: 92vh; overflow-y: auto; text-align: center;
        }
        .setup-close {
            position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 9999px;
            border: 1px solid #d9c7a6; background: #fff; color: #9e2a22; cursor: pointer; font-size: 14px; line-height: 1;
        }
        .setup-title { font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.3rem; color: #181512; margin: 0 0 2px; }
        .setup-decor { font-size: 0.85rem; color: #57493c; margin: 0 0 16px; }
        .setup-sec { text-align: left; margin-bottom: 14px; }
        .setup-label { font-family: 'Cinzel', serif; font-weight: 700; font-size: 0.85rem; color: #181512; margin-bottom: 6px; }
        #setup-modal .voie-sq {
            height: 44px; border-radius: 10px; border: 1.5px solid rgba(181,154,98,0.6); background: #f7f3eb; color: #181512;
            display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem;
            position: relative; overflow: hidden; cursor: pointer; box-shadow: none;
        }
        #setup-modal .voie-sq.is-selected { background: #9e2a22; border-color: #9e2a22; color: #faf7f0; }
        #setup-modal .voie-sq span:first-child { color: inherit; }
        .mode-btn {
            height: 46px; border-radius: 12px; border: 1.5px solid rgba(181,154,98,0.6); background: #f7f3eb; color: #181512;
            display: flex; align-items: center; justify-content: center; gap: 5px; font-weight: 700; font-size: 0.9rem;
            position: relative; overflow: hidden; cursor: pointer;
        }
        .mode-btn.is-selected { background: #9e2a22; border-color: #9e2a22; color: #faf7f0; }
        .setup-go {
            margin-top: 6px; width: 100%; height: 50px; border: none; border-radius: 9999px;
            background: #9e2a22; color: #faf7f0; font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.15rem;
            cursor: pointer; box-shadow: 0 10px 26px rgba(158,42,34,0.45); transition: background .2s ease;
        }
        .setup-go:hover { background: #8a241d; }
        /* Cohérence des tuiles dans la popup (y compris sur mobile) */
        #setup-modal .gfx-tile, #setup-modal .voie-sq {
            background: #f7f3eb !important; border: 1.5px solid rgba(181,154,98,0.6) !important; color: #181512 !important;
            box-shadow: none !important; font-size: 0.8rem !important;
        }
        #setup-modal .gfx-tile { height: 42px !important; }
        #setup-modal .gfx-tile.is-selected, #setup-modal .voie-sq.is-selected {
            background: #9e2a22 !important; border-color: #9e2a22 !important; color: #faf7f0 !important;
        }

        /* Légende "coin doré = premium" (dans la popup) + pulsation des coins réels */
        #prem-hint { display: none; }
        #setup-modal #prem-hint {
            display: inline-flex; align-items: center; gap: 8px; justify-content: center;
            margin: 2px 0 16px; padding: 6px 13px; border-radius: 9999px;
            background: rgba(16,11,6,0.05); color: #7a5f1e; font-size: 0.76rem; font-weight: 600;
            border: 1px solid rgba(205,164,52,0.5);
            animation: phglow 2.4s ease-in-out infinite;
        }
        .ph-corner {
            position: relative; width: 18px; height: 18px; border-radius: 4px; flex: 0 0 auto;
            background: rgba(0,0,0,0.06); border: 1px solid rgba(181,154,98,0.5); overflow: hidden;
        }
        .ph-corner::after { content: ''; position: absolute; top: 0; right: 0; border-top: 11px solid #cda434; border-left: 11px solid transparent; }
        @keyframes phglow { 0%,100% { box-shadow: 0 0 0 0 rgba(205,164,52,0); } 50% { box-shadow: 0 0 0 3px rgba(205,164,52,0.18); } }
        .premium-locked .prem-cross { animation: cornerpulse 2.2s ease-in-out infinite; }
        @keyframes cornerpulse { 0%,100% { opacity: .92; filter: none; } 50% { opacity: 1; filter: drop-shadow(0 0 3px rgba(205,164,52,0.95)); } }

        /* ===== PC : menu immersif — le décor en fond, options en bandeau bas ===== */
        #decor-pc { display: none; }
        @media (min-width: 641px) {
            /* Conteneur : la carte descend en bandeau, le centre laisse voir le décor */
            .menu-scroll {
                align-items: flex-end !important; justify-content: center !important;
                padding: 0 0 44px 0 !important; pointer-events: none; overflow: visible !important;
            }
            /* Slogan déplacé dans l'en-tête (à droite du logo) */
            #hero-slogan { display: none; }

            /* ----- Bandeau du bas (fond fondu dans la vidéo sur ses bords) ----- */
            .menu-hero-card {
                width: 100% !important; max-width: none !important; margin: 0 !important;
                border-radius: 0 !important; border-top: none !important;
                background: transparent !important; box-shadow: none !important;
                display: flex !important; flex-direction: row !important; flex-wrap: wrap;
                align-items: flex-end; justify-content: center;
                gap: 10px 0 !important; padding: 16px 24px 14px !important; pointer-events: auto;
                position: relative; isolation: isolate; z-index: 6;   /* au-dessus des zones de clic latérales */
            }
            /* Plus de bandeau : les contrôles flottent directement sur la vidéo */
            .menu-hero-card::before, .menu-hero-card::after { display: none !important; }
            .menu-hero-card > * { position: relative; z-index: 1; }
            /* Lisibilité des intitulés sur la vidéo */
            .menu-hero-card .sec-title { text-shadow: 0 1px 6px rgba(0,0,0,0.85); }

            /* Assistant : un seul groupe à la fois, centré (plus de séparateurs) */
            .menu-hero-card > .opt-section,
            .menu-hero-card > .sec-mode {
                width: auto !important; display: flex; flex-direction: column; gap: 6px;
                padding: 0 22px; border-left: none;
            }
            .menu-hero-card > .sec-lang { display: none; }   /* langue déplacée dans l'en-tête */
            .menu-hero-card .sec-title {
                color: #d9c69b; font-size: 10.5px; font-weight: 700;
                letter-spacing: 0.1em; text-transform: uppercase; text-align: center; margin: 0 0 2px;
            }

            /* Nom du décor : légende centrée AU-DESSUS du bandeau */
            .sec-env {
                position: absolute; left: 0; right: 0; bottom: calc(100% + 14px);
                width: 100% !important; display: flex; justify-content: center; border: none !important; padding: 0 !important;
            }
            .sec-env .decor-stage, .sec-env #decor-dots, .sec-env .decor-arrow, .sec-env .sec-title { display: none !important; }
            #decor-name {
                margin: 0; color: #faf7f0; font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.5rem;
                text-shadow: 0 2px 14px rgba(0,0,0,0.85); letter-spacing: 0.01em;
            }

            /* Contrôles : hauteur uniforme + fonds TRANSLUCIDES (voir le décor au travers) */
            .menu-hero-card .gfx-tile,
            .menu-hero-card .voie-sq {
                height: 40px !important; min-width: 74px;
                background: rgba(255,255,255,0.12) !important;
                border: 1.5px solid rgba(255,255,255,0.42) !important; box-shadow: none !important;
                color: #faf7f0 !important; font-size: 0.8rem !important;
                backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
            }
            .menu-hero-card .gfx-tile:hover,
            .menu-hero-card .voie-sq:hover { background: rgba(255,255,255,0.2) !important; }
            .menu-hero-card .gfx-tile.is-selected,
            .menu-hero-card .voie-sq.is-selected {
                background: rgba(158,42,34,0.72) !important; border-color: rgba(255,255,255,0.6) !important; color: #faf7f0 !important;
            }
            .menu-hero-card .voie-sq span { color: inherit !important; }
            /* Mode de jeu : boutons translucides aussi */
            .menu-hero-card .sec-mode .grid { gap: 10px; }
            .menu-hero-card .sec-mode button {
                height: 40px; border: 1px solid rgba(255,255,255,0.28) !important;
                backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
            }
            /* action principale : "Jouer contre l'IA" plein et mis en avant */
            .menu-hero-card .sec-mode button:not(.premium-locked) {
                background: #9e2a22 !important; border-color: #9e2a22 !important;
                box-shadow: 0 6px 18px rgba(158,42,34,0.45); font-size: 0.92rem;
            }
            .menu-hero-card .sec-mode button:not(.premium-locked):hover { background: #8a241d !important; }
            /* action secondaire : "Jouer online" discret et translucide */
            .menu-hero-card .sec-mode button.premium-locked { background: rgba(24,21,18,0.42) !important; }
            .menu-hero-card .sec-mode button.premium-locked:hover { background: rgba(24,21,18,0.6) !important; }
            /* Langue : rangée de drapeaux compacte */
            .menu-hero-card .sec-lang .grid { grid-template-columns: repeat(6, auto); gap: 6px; }
            .menu-hero-card .lang-btn img { width: 26px; height: 18px; }

            /* Flèches plein écran aux bords de l'écran */
            #decor-pc { display: block; position: fixed; inset: 0; z-index: 25; pointer-events: none; }
            #decor-pc > * { pointer-events: auto; }
            .dpc-arrow {
                position: absolute; top: 50%; transform: translateY(-50%);
                width: 60px; height: 60px; border-radius: 9999px;
                display: flex; align-items: center; justify-content: center;
                font-size: 38px; line-height: 1; padding-bottom: 5px;
                color: #faf7f0; background: rgba(20,12,6,0.42);
                border: 1.5px solid rgba(255,255,255,0.5);
                backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
                box-shadow: 0 4px 14px rgba(0,0,0,0.45); cursor: pointer;
                transition: background .2s ease;
            }
            .dpc-arrow:hover { background: rgba(20,12,6,0.64); }
            .dpc-arrow-l { left: 18px; }
            .dpc-arrow-r { right: 18px; }

            /* Bouton Retour : clair sur le bandeau sombre */
            #menu-back { background: rgba(255,255,255,0.12); color: #faf7f0; border-color: rgba(255,255,255,0.4); }
            #menu-back:hover { background: rgba(255,255,255,0.22); }

            /* Avant le 1er choix (intro) : pas de nom de décor (le menu reste utilisable) */
            body.menu-prechoice #decor-name { display: none; }

            /* Zones de clic gauche/droite actives seulement pendant le choix du décor */
            body[data-flow="decor"] .decor-click { display: block; position: fixed; top: 0; bottom: 0; width: 50%; z-index: 1; cursor: pointer; }
            body[data-flow="decor"] #decor-click-l { left: 0; }
            body[data-flow="decor"] #decor-click-r { right: 0; }

            /* Étapes du parcours : intro (Jouer maintenant) -> decor (titre+flèches+confirmer) */
            body[data-flow="intro"] #play-now { display: inline-flex; }
            body[data-flow="decor"] #confirm-decor { display: inline-flex; }
            body[data-flow="intro"] #decor-titlebar { display: none; }

            /* Barre de titre : "Bienvenue"/nom du décor encadré par les flèches */
            #decor-pc { display: none !important; }        /* anciennes flèches de bord retirées */
            #decor-name { display: none !important; }        /* le titre est géré par la barre */
            #decor-titlebar {
                display: flex; align-items: center; justify-content: center; gap: 18px;
                position: fixed; left: 0; right: 0; bottom: 150px; top: auto; z-index: 26; pointer-events: none;
            }
            #decor-titlebar > * { pointer-events: auto; }
            #decor-title-pc {
                color: #faf7f0; font-family: 'Cinzel', serif; font-weight: 700; font-size: 2rem;
                text-shadow: 0 2px 16px rgba(0,0,0,0.85); min-width: 3ch; text-align: center;
            }
            .tb-arrow {
                width: 54px; height: 54px; border-radius: 9999px; flex: 0 0 auto;
                display: flex; align-items: center; justify-content: center;
                font-size: 34px; line-height: 1; padding-bottom: 4px; color: #faf7f0; cursor: pointer;
                background: rgba(20,12,6,0.42); border: 1.5px solid rgba(255,255,255,0.5);
                backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
                box-shadow: 0 4px 14px rgba(0,0,0,0.45); transition: background .2s ease;
            }
            .tb-arrow:hover { background: rgba(20,12,6,0.64); }
            body.hint-on .tb-arrow { border-color: #e5b94e; animation: tbarrow 1.3s ease-in-out infinite; }
            body.hint-urge #decor-titlebar { animation: tbshake .4s ease-in-out 3; }
        }
        @keyframes tbarrow {
            0%,100% { transform: scale(1); box-shadow: 0 4px 14px rgba(0,0,0,.45); }
            50% { transform: scale(1.12); box-shadow: 0 0 0 7px rgba(229,185,78,0.22), 0 4px 14px rgba(0,0,0,.45); }
        }
        @keyframes tbshake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
        @keyframes dhpulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
        @keyframes dhleft  { 0%,100% { transform: translateX(0); opacity:.7; } 50% { transform: translateX(-6px); opacity:1; } }
        @keyframes dhright { 0%,100% { transform: translateX(0); opacity:.7; } 50% { transform: translateX(6px); opacity:1; } }
        @keyframes dharrow {
            0%,100% { transform: translateY(-50%) scale(1); box-shadow: 0 4px 14px rgba(0,0,0,.45); }
            50%     { transform: translateY(-50%) scale(1.12); box-shadow: 0 0 0 7px rgba(229,185,78,0.22), 0 4px 14px rgba(0,0,0,.45); }
        }

        .decor-tile {
            position: relative;
            display: block;
            width: 100%;
            aspect-ratio: 16 / 10;
            border-radius: 14px;
            overflow: hidden;
            border: 2px solid rgba(181, 154, 98, 0.6);
            box-shadow: 0 6px 16px rgba(20, 12, 6, 0.28);
            cursor: pointer;
            transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
        }
        .decor-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
        .decor-tile:hover { transform: translateY(-2px); border-color: #9e2a22; box-shadow: 0 10px 22px rgba(20,12,6,0.4); }
        .decor-tile.is-selected {
            border-color: #9e2a22;
            box-shadow: 0 0 0 4px #9e2a22, 0 0 0 7px rgba(158,42,34,0.3), 0 10px 24px rgba(20,12,6,0.5);
            transform: translateY(-3px) scale(1.03);
            z-index: 2;
        }
        .decor-tile.is-selected::before {
            content: "✓";
            position: absolute; top: 6px; right: 6px; z-index: 3;
            width: 26px; height: 26px; border-radius: 9999px;
            display: flex; align-items: center; justify-content: center;
            background: #9e2a22; color: #faf7f0; font-size: 15px; font-weight: 700;
            box-shadow: 0 2px 6px rgba(0,0,0,0.4);
        }
        /* Décor Tutoriel : rendu distinct (bordure dorée pointillée + badge) */
        .decor-tile.decor-tuto { border-style: dashed; border-width: 2px; border-color: #b59a62; }
        .decor-tile.decor-tuto.is-selected { border-style: solid; }
        .decor-tile.decor-locked { cursor: not-allowed; }
        .decor-tile.decor-locked video { filter: brightness(0.92); }
        .decor-tile.decor-locked:hover { transform: none; border-color: rgba(181,154,98,0.45); box-shadow: 0 6px 16px rgba(20,12,6,0.28); }
        .decor-lock { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 3; display: flex; align-items: center; justify-content: center; background: transparent; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.75)); }
        .decor-badge-pay { background: #9e2a22 !important; color: #faf7f0 !important; }
        .decor-badge {
            position: absolute; top: 10px; left: 10px; z-index: 2;
            padding: 5px 14px; border-radius: 9999px;
            background: rgba(181,154,98,0.96); color: #1c140c;
            font-family: 'Cinzel', serif; font-weight: 700; font-size: 0.9rem;
            letter-spacing: 0.03em; box-shadow: 0 2px 6px rgba(0,0,0,0.35);
        }
        .decor-tile .decor-label {
            position: absolute; left: 0; right: 0; bottom: 0;
            padding: 14px 4px 4px;
            font-family: 'Cinzel', serif; font-weight: 700;
            font-size: 0.74rem; line-height: 1; color: #faf7f0; text-align: center;
            background: linear-gradient(to top, rgba(20,12,6,0.85) 0%, rgba(20,12,6,0.3) 60%, transparent 100%);
        }
        @media (min-width: 640px) { .decor-tile .decor-label { font-size: 0.85rem; padding: 18px 6px 7px; } }
        .voie-sq { position: relative; }
        .premium-locked { position: relative; cursor: pointer; overflow: hidden; }
        .voie-sq.is-selected {
            border-color: #9e2a22 !important; border-width: 2px !important;
            background: rgba(158,42,34,0.10) !important;
            box-shadow: 0 0 0 3px rgba(158,42,34,0.35), 0 6px 16px rgba(20,12,6,0.3);
        }

        /* Marqueur premium : petit coin doré discret (angle replié), haut-droite */
        .prem-cross {
            position: absolute; top: 0; right: 0; z-index: 2; pointer-events: none;
            width: 0; height: 0;
            border-top: 16px solid #cda434;
            border-left: 16px solid transparent;
        }
        /* Membre premium : plus aucun verrou visible (coin doré ni bandeau d'avertissement) */
        body.is-premium-member .prem-cross { display: none !important; }
        body.is-premium-member #prem-hint,
        body.is-premium-member #setup-modal #prem-hint { display: none !important; }
        body.is-premium-member .premium-locked { cursor: pointer; }
        #mobile-splash { display: none; }
        #menu-close { display: none; }
        .lang-opt { display: flex; align-items: center; justify-content: center; padding: 5px 7px; border-radius: 8px; cursor: pointer; background: none; border: none; }
        .lang-opt:hover { background: rgba(255,255,255,0.12); }
        .lang-opt img { width: 26px; height: 18px; border-radius: 2px; display: block; box-shadow: 0 1px 2px rgba(0,0,0,0.35); }
        .game-link { background: none; border: none; padding: 0; cursor: pointer; color: inherit; font: inherit; transition: color .2s ease; }
        .game-link:hover { color: #e5b94e; }
        .game-link.is-selected { color: #e5b94e; font-weight: 700; }

        .lang-btn {
            display: flex; align-items: center; justify-content: center; gap: 6px;
            height: 36px; padding: 0 6px; border-radius: 8px;
            border: 2px solid rgba(181,154,98,0.45); background: rgba(247,243,235,0.7);
            cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
            font-family: 'Cinzel', serif; font-weight: 700; font-size: 0.72rem; color: #181512;
        }
        .lang-btn img { display: block; width: 22px; height: 16px; border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,0.2); flex-shrink: 0; }
        .lang-btn:hover { border-color: #9e2a22; }
        .lang-btn.is-active { border-color: #9e2a22; box-shadow: 0 0 0 2px rgba(158,42,34,0.4); background: rgba(158,42,34,0.06); }

/* Membre premium connecté : masquer les boutons « Devenir membre premium » / « Inscription » */
body.is-premium-member .premium-cta{display:none!important;}

/* Menus déroulants des langues (en-tête) : le menu prend la largeur de son contenu — positionné contre le petit bouton du drapeau, il
   en héritait la largeur (62 px) et les drapeaux tombaient à 3 px. Drapeaux à taille fixe, jamais rétrécis. */
#lang-dd-pc-menu, #lang-dd-menu { width: max-content; }
#lang-dd-pc-menu img, #lang-dd-menu img { width: 28px; height: 20px; max-width: none; flex-shrink: 0; object-fit: cover; }

/* bouton de la musique des menus (js/menu-music.js) */
#menu-music-btn{position:fixed;z-index:60;left:16px;bottom:calc(58px + env(safe-area-inset-bottom,0px));width:40px;height:40px;border-radius:9999px;display:flex;align-items:center;justify-content:center;
  padding:0;cursor:pointer;color:#faf7f0;background:rgba(28,20,12,.62);border:1px solid rgba(229,185,78,.6);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);box-shadow:0 4px 14px rgba(0,0,0,.35)}
#menu-music-btn[hidden]{display:none}
#menu-music-btn svg{width:22px;height:22px}#menu-music-btn .mm-x{display:none}#menu-music-btn.off .mm-x{display:inline}#menu-music-btn.off .mm-w{display:none}#menu-music-btn.off{opacity:.7}
@media (max-width:640px){#menu-music-btn{left:12px;top:calc(12px + env(safe-area-inset-top,0px));bottom:auto;width:34px;height:34px}#menu-music-btn svg{width:19px;height:19px}}

        /* 2026-11 — popup de configuration : version du jeu et graphisme, bornés par le diagnostic de l'appareil (js/device.js) */
        #setup-modal .opt-sq { min-height: 52px; padding: 5px 3px; border-radius: 10px; border: 1.5px solid rgba(181,154,98,0.6); background: #f7f3eb; color: #181512;
            display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 0.78rem; line-height: 1.15; cursor: pointer; }
        #setup-modal .opt-sq b { font-weight: 700; } #setup-modal .opt-sq small { font-size: 0.66rem; opacity: .8; }
        #setup-modal .opt-sq .opt-tag { font-style: normal; font-size: 0.6rem; font-weight: 700; min-height: 0.75rem; }
        #setup-modal .opt-sq .opt-tag.reco { color: #1f7a3d; } #setup-modal .opt-sq .opt-tag.warn { color: #a8610a; }
        #setup-modal .opt-sq.is-selected { background: #9e2a22; border-color: #9e2a22; color: #faf7f0; }
        #setup-modal .opt-sq.is-selected .opt-tag { color: #ffe9b0; }
        #setup-modal .opt-sq:disabled { opacity: .45; cursor: not-allowed; }
        #setup-diag { font-size: 0.74rem; color: #57493c; text-align: left; margin: -4px 0 12px; min-height: 1em; }
        @media (max-width: 420px) { #setup-gfx > div:last-child { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }

        /* 2026-11-11 — test de la 3D dans la popup de configuration (js/test3d.js) */
        #test3d { display: block; width: 100%; height: 190px; border-radius: 12px; background: #0e0c0a; border: 1.5px solid rgba(181,154,98,0.6); }
        #setup-modal .test3d-q { font-size: 0.82rem; color: #3a3028; margin: 8px 0 8px; text-align: left; }
        #test3d-done { font-size: 0.8rem; color: #57493c; text-align: left; margin: 0; }
        #setup-modal .test3d-redo { background: none; border: 0; padding: 0; color: #9e2a22; font-weight: 700; text-decoration: underline; cursor: pointer; font-size: 0.8rem; }
        #test3d-run[hidden], #test3d-done[hidden] { display: none; }

        /* 2026-11-12 (« dans le choix du décor, bandes noires panoramiques plutôt qu'opaques pour la bande du logo et celle des mentions légales ;
           ajoute un vignettage, sans assombrir la vidéo ») : les deux bandes deviennent des bandes de cinéma, noires, sans flou ni filet ; le voile
           uniforme sur la vidéo est remplacé par un vignettage — centre intact, bords et coins assombris */
        header.fixed, footer.fixed { background: #000 !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; border-color: transparent !important; box-shadow: none !important; }
        :root { --vignette: radial-gradient(ellipse 70% 66% at 50% 48%, rgba(0,0,0,0) 32%, rgba(0,0,0,.38) 60%, rgba(0,0,0,.7) 82%, rgba(0,0,0,.85) 100%); }   /* (« plus du tout de vignettage » → plus fort ; puis « un peu moins fort »)
        /* (« ça ne marche pas : tu as mis le vignettage sur la vidéo — rien ne s'affiche tant qu'elle n'est pas chargée ; mets-le sur l'interface ») :
           un calque fixe de l'interface (#site-vignette, index.html), au-dessus de la vidéo, de la bande d'images et du fond, sous les boutons ;
           téléphone : dans l'écran du choix du décor, au-dessus de la bande et sous les flèches et le bouton */
        #video-veil { background: transparent !important; }
        #site-vignette { position: fixed; inset: 0; z-index: 5; pointer-events: none; background: var(--vignette); }
        #decor-mobile::before { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: var(--vignette); }
        body.decor-select #site-vignette { display: none; }   /* (« mets plus de vignettage, ça ne se voit pas ») */
        /* (« aussi enlève la barre opaque ») : plus de bande floutée derrière « Je choisis ce décor » — le bouton flotte sur la vidéo */
        .menu-hero-card { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; background: transparent !important; }

        /* 2026-11-13 — fenêtre « Configurez votre partie » : version gratuite (non premium) — bouton « Tester gratuitement », puis inscription et
           connexion ; membre premium : « C'est parti ! » seul. Connecté sans être premium : pas de bouton de connexion. */
        .setup-go .sg-prem { display: none; }
        body.is-premium-member .setup-go .sg-free { display: none; }
        body.is-premium-member .setup-go .sg-prem { display: inline; }
        .setup-free { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
        body.is-premium-member .setup-free { display: none; }
        .setup-free-note { margin: 0; font-size: 12.5px; line-height: 1.4; color: #6b5a44; text-align: center; }
        .setup-free-btns { display: flex; gap: 8px; }
        .setup-free-btns button { flex: 1; padding: 10px 8px; border-radius: 12px; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .2s; }
        .setup-free-sub { background: #fff; border: 1.5px solid #9e2a22; color: #9e2a22; }
        .setup-free-sub:hover { background: #f6e9e5; }
        .setup-free-login { background: #fff; border: 1.5px solid #b59a62; color: #3d2f1f; }
        .setup-free-login:hover { background: #f3ecdd; }
        body.is-logged .setup-free-login { display: none; }
