        /* --- RESET & FOND --- */
        * { box-sizing: border-box; user-select: none; -webkit-user-select: none; }
        body, html {
            margin: 0; padding: 0; width: 100vw; height: 100%; overflow: hidden;
            background-color: #0a0a0c;
            background-image: linear-gradient(to bottom, rgba(10, 10, 15, 0.6), rgba(5, 5, 10, 0.95)), url('wallpaper.png');
            background-size: cover; background-position: center;
            font-family: 'MedievalSharp', cursive; color: #f5e6ce;
            transition: background 1s ease-in-out;
        }

       :root {
    --font-medieval: 'MedievalSharp', cursive;
    --font-tech: 'Share Tech', sans-serif;
}

/* Compatibilité avec tes classes existantes */
.font-medieval {
    font-family: var(--font-medieval);
}

.font-tech {
    font-family: var(--font-tech);
}

/* =========================================================
   TYPOGRAPHIE DU JEU
   Aucun chargement externe obligatoire
   ========================================================= */

:root {
    --font-rpg:
        MedievalSharp,
        'Times New Roman',
        Times,
        serif;

    --font-interface:
        Tech,
        Helvetica,
        sans-serif;
}

body,
html {
    font-family: var(--font-interface);
}

/* Titres et éléments avec une personnalité RPG */
h1,
h2,
h3,
.font-tech,
.rpg-btn,
.mobile-menu__title,
.mobile-menu__label,
.currency-container {
    font-family: var(--font-rpg);
}

/* Textes secondaires plus faciles à lire */
.mobile-menu__description,
.mobile-menu__subtitle,
.mobile-menu__eyebrow,
.mobile-menu__close,
p,
input,
select,
textarea {
    font-family: var(--font-interface);
}
```


        body {
    /* Le dégradé sombre par défaut */
    background-image: radial-gradient(circle at 50% 50%, #2a2a3a 0%, #050508 100%);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Pour s'assurer que le fond noir soit là même si l'écran est très grand */
    background-color: #050508; 
}

        button, .fiole-slot, .booster-pack, .rpg-panel, .shop-tab, .card-container-3d {
            touch-action: manipulation;
        }

        /* --- UI RPG --- */
        .rpg-panel {
            background: linear-gradient(135deg, rgba(30, 15, 10, 0.95) 0%, rgba(15, 5, 5, 0.98) 100%);
            border: 1px solid rgba(252, 211, 77, 0.4);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), inset 0 0 15px rgba(252, 211, 77, 0.1);
            border-radius: 12px;
        }
        
        .rpg-modal-fullscreen {
            background: linear-gradient(135deg, rgba(20, 10, 5, 0.98) 0%, rgba(5, 5, 5, 1) 100%);
            box-shadow: inset 0 0 50px rgba(252, 211, 77, 0.05);
            border: none; border-radius: 0;
        }

        .rpg-banner {
            background: linear-gradient(to right, transparent, rgba(153, 27, 27, 0.9), transparent);
            border-top: 1px solid rgba(252, 211, 77, 0.5); border-bottom: 1px solid rgba(252, 211, 77, 0.5);
        }

        .rpg-btn {
            background: linear-gradient(to bottom, #d97706, #92400e);
            border: 2px solid #fef3c7; border-radius: 8px;
            color: #fffbeb; text-transform: uppercase; font-weight: 800; text-shadow: 1px 1px 2px #451a03;
            box-shadow: 0 6px 15px rgba(0,0,0,0.6), inset 0 2px 5px rgba(255,255,255,0.3);
            cursor: pointer; transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .rpg-btn:hover:not(:disabled) { filter: brightness(1.2); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.8), inset 0 2px 5px rgba(255,255,255,0.5); }
        .rpg-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 5px rgba(0,0,0,0.8); }

        .btn-pulse { animation: glowingPulse 2s infinite; }
        @keyframes glowingPulse { 0%, 100% { box-shadow: 0 0 15px rgba(252, 211, 77, 0.2); } 50% { box-shadow: 0 0 25px rgba(252, 211, 77, 0.6); } }
        
        .logo-anim { animation: floatLogo 4s ease-in-out infinite; }
        @keyframes floatLogo { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

        /* --- ANIMATIONS & PARTICULES OPTIMISEES --- */
        @keyframes screenShake {
            0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
            10%, 30%, 50%, 70%, 90% { transform: translate3d(-10px, 10px, 0) rotate(-1deg); }
            20%, 40%, 60%, 80% { transform: translate3d(10px, -10px, 0) rotate(1deg); }
        }
        .shake-active { animation: screenShake 0.4s ease-in-out; }

        .particle { position: fixed; z-index: 150; pointer-events: none; border-radius: 50%; will-change: transform, opacity; }
        .particle.spark { animation: shootSpark 1s ease-out forwards; }
        .particle.flame { animation: shootFlame 1s ease-out forwards; }
        .particle.smoke { background: #222; opacity: 0.8; animation: shootSmoke 1.5s ease-out forwards; }
        
        @keyframes shootSpark { 0% { transform: translate3d(var(--sx), var(--sy), 0) scale(1); opacity: 1; } 100% { transform: translate3d(var(--tx), var(--ty), 0) scale(0); opacity: 0; } }
        @keyframes shootFlame { 0% { transform: translate3d(var(--sx), var(--sy), 0) scale(2); opacity: 1; background: #ef4444; } 50% { background: #f59e0b; } 100% { transform: translate3d(var(--tx), var(--ty), 0) scale(0); opacity: 0; } }
        @keyframes shootSmoke { 0% { transform: translate3d(var(--sx), var(--sy), 0) scale(0.5); opacity: 0.7; } 100% { transform: translate3d(var(--tx), var(--ty), 0) scale(4); opacity: 0; } }

        @keyframes shakeLittle { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
        .shake-little { animation: shakeLittle 0.2s ease-in-out; }

        /* Ambiance Effects */
        #effect-container { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
        .ambient-particle { position: absolute; will-change: transform, opacity; }
        .effect-dust { background: var(--effect-color, #fcd34d); opacity: 0; border-radius: 50%; filter: blur(1px); animation: floatDust linear infinite; }
        @keyframes floatDust { 0% { transform: translate3d(0, 100vh, 0) scale(0); opacity: 0; } 20% { opacity: 0.6; } 80% { opacity: 0.6; } 100% { transform: translate3d(var(--tx), -20vh, 0) scale(2); opacity: 0; } }
        .effect-snow { background: #ffffff; opacity: 0.8; border-radius: 50%; animation: fallSnow linear infinite; box-shadow: 0 0 5px #fff; }
        @keyframes fallSnow { 0% { transform: translate3d(0, -10vh, 0); opacity: 0; } 10% { opacity: 0.8; } 90% { opacity: 0.8; } 100% { transform: translate3d(var(--tx), 100vh, 0); opacity: 0; } }
        .effect-heat { background: #ea580c; opacity: 0.1; border-radius: 50%; filter: blur(30px); animation: riseHeat linear infinite; }
        @keyframes riseHeat { 0% { transform: translate3d(0, 100vh, 0) scale(1); opacity: 0; } 50% { opacity: 0.15; } 100% { transform: translate3d(var(--tx), -50vh, 0) scale(3); opacity: 0; } }
        .effect-star { background: #fff; opacity: 0; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); animation: twinkleStar linear infinite; }
        @keyframes twinkleStar { 0%, 100% { opacity: 0; transform: scale(0.5); } 50% { opacity: 0.8; transform: scale(1.2) rotate(15deg); box-shadow: 0 0 10px #fcd34d; } }

/* ==========================================
   IMMUNITÉ GLOBALE DE L'ÉQUATION
   (Passe toujours devant les flammes)
   ========================================== */
#equation-display-panel {
    z-index: 55 !important; 
}

/* Fond assombri pour garder le texte lisible si une flamme passe derrière */
#equation-display-panel .rpg-panel {
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(4px);
}

        /* --- DOCK INVENTAIRE --- */
        #inventory-dock {
            position: absolute; bottom: 0; left: 0; width: 100vw;
            height: clamp(160px, 26vh, 200px); 
            background: linear-gradient(to top, rgba(10,5,5,0.98) 0%, rgba(30,15,5,0.85) 100%);
            border-top: 2px solid rgba(252, 211, 77, 0.4); box-shadow: 0 -10px 30px rgba(0,0,0,0.8); z-index: 40;
            display: flex; align-items: center; overflow-x: auto; overflow-y: hidden;
            scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none;
            padding-top: 15px; 
        }
        #inventory-dock::-webkit-scrollbar { display: none; }
        
        .dock-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 0 20px; margin: 0 auto; min-width: max-content; height: 100%; }
        .dock-row { display: flex; flex-wrap: nowrap; justify-content: center; gap: 10px; }

        .fiole-slot {
            width: clamp(40px, 10vw, 60px); height: clamp(55px, 13vw, 80px); 
            flex-shrink: 0; position: relative; cursor: pointer; 
            transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
            transform-origin: bottom center;
        }
        .fiole-slot svg { filter: drop-shadow(0 4px 6px rgba(0,0,0,0.6)); transition: filter 0.2s; }
        .fiole-slot:hover { transform: translateY(-8px) scale(1.1) rotate(4deg); z-index: 50; }
        .fiole-slot:hover svg { filter: drop-shadow(0 0 15px rgba(255,255,255,0.4)); }
        .fiole-slot:active { transform: scale(0.95); }

        .flying-flask { position: fixed; z-index: 200; pointer-events: none; filter: brightness(1.5) drop-shadow(0 0 20px rgba(255,255,255,0.8)); will-change: transform; }

        /* --- UI Flottante --- */
        .wow-toast {
            position: fixed; bottom: 300px; right: 20px; transform: translateY(50px); opacity: 0; pointer-events: none; z-index: 250;
            background: linear-gradient(to right, rgba(20, 10, 5, 0.95), rgba(40, 20, 10, 0.9));
            border: 1px solid rgba(252, 211, 77, 0.5); border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.9);
            display: flex; align-items: center; gap: 15px; padding: 12px 20px; transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        .wow-toast.show { transform: translateY(0); opacity: 1; }

        .floating-success { position: absolute; pointer-events: none; z-index: 100; animation: floatUp 2s ease-out forwards; white-space: nowrap; }
        @keyframes floatUp {
            0% { transform: translate3d(-50%, 0, 0) scale(0.5); opacity: 0; }
            20% { transform: translate3d(-50%, -40px, 0) scale(1.1); opacity: 1; }
            80% { transform: translate3d(-50%, -80px, 0) scale(1); opacity: 1; }
            100% { transform: translate3d(-50%, -120px, 0) scale(1); opacity: 0; }
        }

        .recipe-float { animation: floatRecipe 4s ease-in-out infinite; will-change: transform; }
        @keyframes floatRecipe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

        /* BOUTIQUE ANIMATIONS */
        .shop-tab.active { background: #5a3415; color: #fcd34d; border-top: 2px solid #fcd34d; border-left: 2px solid #fcd34d; border-right: 2px solid #fcd34d; transform: scale(1.05); z-index: 10; box-shadow: 0 -5px 15px rgba(0,0,0,0.5); }
        .shop-tab:not(.active) { border-bottom: 2px solid rgba(166, 124, 82, 0.3); }
        .shop-card { transition: all 0.2s ease; }
        .shop-card:hover { transform: translateY(-3px); border-color: rgba(252, 211, 77, 0.8); box-shadow: 0 5px 15px rgba(0,0,0,0.6), inset 0 0 10px rgba(252, 211, 77, 0.2); }

        /* HAUTS FAITS ANIMATIONS */
        @keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
        .ach-card { animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards; transition: all 0.3s ease; }
        .ach-card:hover { transform: scale(1.02) translateX(5px); border-color: rgba(252, 211, 77, 0.8); background: rgba(0,0,0,0.8); box-shadow: 0 5px 15px rgba(0,0,0,0.6), inset 0 0 15px rgba(252, 211, 77, 0.1); }
        .ach-icon-wrapper { transition: transform 0.3s ease; display: inline-block; }
        .ach-card:hover .ach-icon-wrapper { transform: scale(1.15) rotate(5deg); }
        .ach-bar-glow { box-shadow: 0 0 10px rgba(245, 158, 11, 0.8); }

        /* --- TUTORIEL INTERACTIF --- */
        #tutorial-overlay { position: fixed; inset: 0; z-index: 9998; pointer-events: auto; background: transparent; transition: opacity 0.3s; display: none; }
        #tut-spotlight { position: absolute; border: 3px solid #fcd34d; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,0.85); transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); pointer-events: none; z-index: 9999; }
        #tut-tooltip { position: absolute; z-index: 10000; width: max-content; max-width: 90vw; background: linear-gradient(135deg, #5a3415, #2b1708); border: 2px solid #fcd34d; border-radius: 8px; padding: 15px 20px; color: #fff; text-align: center; box-shadow: 0 10px 25px rgba(0,0,0,0.9); transition: all 0.4s; }

        /* --- LE SCROLL PARFAIT --- */
        .scrollable-content {
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            overflow-y: scroll !important;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch !important;
            padding-bottom: 150px !important; 
        }

        /* --- DESIGN DES CARTES DU TAROT --- */
        .card-container-3d { perspective: 1000px; width: 100%; max-width: 200px; aspect-ratio: 1/1.4; position: relative; cursor: pointer; margin: 0 auto; transition: transform 0.3s; }
        .card-inner-3d { position: absolute; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
        .card-container-3d.flipped .card-inner-3d { transform: rotateY(180deg); }
        
        .card-container-3d:not(.flipped):hover { transform: translateY(-10px) scale(1.05); box-shadow: 0 15px 30px rgba(252,211,77,0.3); z-index: 50;}

        .card-front, .card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 15px; display: flex; flex-direction: column; overflow: hidden; border: 2px solid #111; }
        .card-back { background: linear-gradient(135deg, #2c1606 0%, #0c0502 100%); border: 2px solid #ca8a04; display: flex; align-items: center; justify-content: center; transform: rotateY(0deg); box-shadow: inset 0 0 20px rgba(202, 138, 4, 0.4); }
        .card-front { transform: rotateY(180deg); background-color: #111; }
        
        .card-image-content { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1; }
        .card-fallback-content { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; padding: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }

        /* Styles de raretés corrigés selon la demande */
        .rarity-common { background: linear-gradient(135deg, #4b5563 0%, #1f2937 100%); border-color: #9ca3af; } /* Gris */
        .rarity-rare { background: linear-gradient(135deg, #991b1b 0%, #ea580c 100%); border-color: #ea580c; box-shadow: 0 0 10px rgba(234, 88, 12, 0.3); } /* Rouge Orangée Cuivre */
        .rarity-epic { background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%); border-color: #3b82f6; box-shadow: 0 0 15px rgba(59, 130, 246, 0.5); } /* Bleu mer roi */
        
        /* Holographique Légendaire (Violet et or) */
        .rarity-legendary { background: linear-gradient(135deg, #6b21a8 0%, #312e81 100%); border-color: #fcd34d; box-shadow: 0 0 25px rgba(252, 211, 77, 0.6); position: relative; }
        .rarity-legendary::before {
            content: ''; position: absolute; inset: 0;
            background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.2) 40%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0.2) 60%, transparent 70%);
            background-size: 200% 200%; animation: holoShimmer 4s infinite linear; pointer-events: none; z-index: 5; mix-blend-mode: overlay;
        }
        @keyframes holoShimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
        
        /* --- BOOSTER PACK ANIMATION --- */
        .booster-pack {
            width: 220px; height: 320px; margin: 0 auto;
            background: linear-gradient(135deg, #1e1b4b, #312e81, #4c1d95);
            border-radius: 15px; border: 4px solid #fcd34d;
            box-shadow: 0 20px 40px rgba(0,0,0,0.8), inset 0 0 30px rgba(255,255,255,0.2);
            position: relative; cursor: pointer; transition: transform 0.2s;
            display: flex; flex-direction: column; align-items: center; justify-content: center;
        }
        .booster-pack:hover { transform: scale(1.05) translateY(-10px); box-shadow: 0 30px 50px rgba(0,0,0,0.9), 0 0 30px rgba(252,211,77,0.5); }
        .booster-pack::before, .booster-pack::after {
            content: ''; position: absolute; left: 0; width: 100%; height: 12px;
            background-image: linear-gradient(45deg, #fcd34d 25%, transparent 25%), linear-gradient(-45deg, #fcd34d 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #fcd34d 75%), linear-gradient(-45deg, transparent 75%, #fcd34d 75%);
            background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
        }
        .booster-pack::before { top: -10px; }
        .booster-pack::after { bottom: -10px; transform: rotate(180deg); }
        .pack-foil { position: absolute; inset: 0; background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.3) 50%, transparent 80%); background-size: 200% 200%; animation: holoShimmer 3s infinite linear; border-radius: 10px; pointer-events: none; z-index: 30;}

        .grayscale { filter: grayscale(1); }
.brightness-50 { filter: brightness(0.5); }

/* =========================================================
   MENU MOBILE — GRIMOIRE ALCHIMIQUE
   MedievalSharp + Share Tech
   À placer tout en bas du fichier CSS
   ========================================================= */

:root {
    --mobile-menu-font-medieval:
        'MedievalSharp',
        Georgia,
        'Times New Roman',
        serif;

    --mobile-menu-font-tech:
        'Share Tech',
        Arial,
        Helvetica,
        sans-serif;

    --mobile-menu-gold: #fcd34d;
    --mobile-menu-gold-light: #fef3c7;
    --mobile-menu-orange: #d97706;
    --mobile-menu-copper: #92400e;
    --mobile-menu-red: #991b1b;
    --mobile-menu-dark-red: #450a0a;
    --mobile-menu-cream: #f5e6ce;
    --mobile-menu-dark: #070404;
}


/* =========================================================
   CONTENEUR PRINCIPAL
   ========================================================= */

#mobile-menu.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 200;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;
    padding:
        max(18px, env(safe-area-inset-top))
        16px
        max(18px, env(safe-area-inset-bottom));

    overflow-x: hidden;
    overflow-y: auto;

    background:
        radial-gradient(
            circle at 50% 18%,
            rgba(217, 119, 6, 0.17),
            transparent 37%
        ),
        rgba(3, 2, 3, 0.96);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    isolation: isolate;
    overscroll-behavior: contain;
}

/* Lorsque la classe hidden est retirée */
#mobile-menu.mobile-menu:not(.hidden) {
    display: flex;
    animation: mobileMenuFadeIn 0.25s ease-out both;
}


/* =========================================================
   FOND ET AMBIANCE
   ========================================================= */

.mobile-menu__backdrop {
    position: fixed;
    inset: 0;
    z-index: -4;

    pointer-events: none;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.12),
            rgba(0, 0, 0, 0.72)
        ),
        radial-gradient(
            ellipse at center,
            transparent 10%,
            rgba(0, 0, 0, 0.84) 100%
        );
}

.mobile-menu__aura {
    position: fixed;
    z-index: -3;

    width: 330px;
    height: 330px;

    border-radius: 50%;
    pointer-events: none;

    filter: blur(80px);
    opacity: 0.22;

    animation: mobileMenuAuraPulse 4s ease-in-out infinite;
}

.mobile-menu__aura--gold {
    top: -190px;
    left: 50%;

    background: #d97706;

    animation-name: mobileMenuGoldAuraPulse;
}

.mobile-menu__aura--red {
    right: -210px;
    bottom: -210px;

    background: #991b1b;
    animation-delay: -2s;
}


/* =========================================================
   BRAISES DÉCORATIVES
   ========================================================= */

.mobile-menu__embers {
    position: fixed;
    inset: 0;
    z-index: -2;

    overflow: hidden;
    pointer-events: none;
}

.mobile-menu__embers span {
    position: absolute;
    bottom: -20px;

    display: block;

    width: 4px;
    height: 4px;

    background: var(--mobile-menu-gold);
    border-radius: 50%;

    box-shadow:
        0 0 6px var(--mobile-menu-gold),
        0 0 12px var(--mobile-menu-orange);

    opacity: 0;

    animation: mobileMenuEmberRise 4.8s linear infinite;
}

.mobile-menu__embers span:nth-child(1) {
    left: 12%;
    animation-delay: -1s;
}

.mobile-menu__embers span:nth-child(2) {
    left: 29%;
    width: 3px;
    height: 3px;
    animation-delay: -3.1s;
}

.mobile-menu__embers span:nth-child(3) {
    left: 53%;
    animation-delay: -2.2s;
}

.mobile-menu__embers span:nth-child(4) {
    left: 72%;
    width: 5px;
    height: 5px;
    animation-delay: -4.2s;
}

.mobile-menu__embers span:nth-child(5) {
    left: 89%;
    width: 3px;
    height: 3px;
    animation-delay: -0.4s;
}


/* =========================================================
   PANNEAU CENTRAL
   ========================================================= */

.mobile-menu__panel {
    position: relative;
    z-index: 1;

    width: min(100%, 440px);
    margin: auto;
    padding: 22px 18px 17px;

    color: var(--mobile-menu-cream);

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(217, 119, 6, 0.11),
            transparent 38%
        ),
        linear-gradient(
            145deg,
            rgba(42, 20, 10, 0.985) 0%,
            rgba(19, 8, 6, 0.99) 48%,
            rgba(7, 4, 4, 0.995) 100%
        );

    border: 1px solid rgba(252, 211, 77, 0.45);
    border-radius: 20px;

    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.92),
        0 0 35px rgba(217, 119, 6, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        inset 0 0 35px rgba(252, 211, 77, 0.045);

    overflow: hidden;

    animation:
        mobileMenuPanelAppear 0.42s
        cubic-bezier(0.22, 1, 0.36, 1)
        both;
}

/* Bordure intérieure */

.mobile-menu__panel::before {
    content: "";

    position: absolute;
    inset: 6px;
    z-index: 0;

    border: 1px solid rgba(252, 211, 77, 0.11);
    border-radius: 15px;

    pointer-events: none;
}

/* Reflet subtil */

.mobile-menu__panel::after {
    content: "";

    position: absolute;
    inset: 0;
    z-index: 0;

    background:
        linear-gradient(
            120deg,
            transparent 18%,
            rgba(255, 255, 255, 0.035) 42%,
            transparent 65%
        );

    pointer-events: none;
}


/* =========================================================
   EN-TÊTE
   ========================================================= */

.mobile-menu__header {
    position: relative;
    z-index: 2;

    margin-bottom: 20px;
    text-align: center;
}

.mobile-menu__eyebrow {
    display: block;
    margin-bottom: 6px;

    color: var(--mobile-menu-orange);

    font-family: var(--mobile-menu-font-tech);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.3em;
    text-transform: uppercase;

    text-shadow: 0 0 8px rgba(217, 119, 6, 0.25);
}

.mobile-menu__title {
    margin: 0;

    color: var(--mobile-menu-gold);

    font-family: var(--mobile-menu-font-medieval);
    font-size: clamp(27px, 8vw, 39px);
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.055em;
    text-transform: uppercase;

    text-shadow:
        0 2px 0 #78350f,
        0 4px 8px rgba(0, 0, 0, 0.72),
        0 0 18px rgba(252, 211, 77, 0.2);
}

.mobile-menu__subtitle {
    margin: 9px 0 0;

    color: rgba(245, 230, 206, 0.55);

    font-family: var(--mobile-menu-font-tech);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.045em;
}


/* =========================================================
   ORNEMENTS
   ========================================================= */

.mobile-menu__ornament {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    width: min(240px, 74%);
    margin: 0 auto 17px;

    color: rgba(252, 211, 77, 0.7);
}

.mobile-menu__ornament--bottom {
    margin-top: 17px;
    margin-bottom: 0;
}

.mobile-menu__ornament-line {
    display: block;
    flex: 1;
    height: 1px;

    background:
        linear-gradient(
            to right,
            transparent,
            rgba(252, 211, 77, 0.58)
        );
}

.mobile-menu__ornament-line:last-child {
    background:
        linear-gradient(
            to left,
            transparent,
            rgba(252, 211, 77, 0.58)
        );
}

.mobile-menu__ornament-symbol {
    font-family: var(--mobile-menu-font-medieval);
    font-size: 9px;
    line-height: 1;

    text-shadow: 0 0 8px rgba(252, 211, 77, 0.55);
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.mobile-menu__navigation {
    position: relative;
    z-index: 2;

    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
}


/* =========================================================
   BOUTONS
   ========================================================= */

#mobile-menu .mobile-menu__button {
    position: relative;

    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 12px;

    width: 100%;
    min-height: 66px;

    margin: 0 !important;
    padding: 9px 13px 9px 9px !important;

    color: #fffbeb;
    text-align: left;

    font-family: var(--mobile-menu-font-tech);
    font-size: 14px !important;
    line-height: normal;

    background:
        linear-gradient(
            100deg,
            rgba(120, 53, 15, 0.32),
            rgba(27, 11, 7, 0.71)
        );

    border: 1px solid rgba(252, 211, 77, 0.17);
    border-radius: 13px;

    box-shadow:
        0 7px 16px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);

    cursor: pointer;
    overflow: hidden;

    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;

    transition:
        transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

/* Éclat traversant */

.mobile-menu__button::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: 0;

    background:
        linear-gradient(
            105deg,
            transparent 24%,
            rgba(252, 211, 77, 0.075) 48%,
            transparent 70%
        );

    transform: translateX(-130%);
    pointer-events: none;

    transition: transform 0.48s ease;
}

/* Petite barre cuivre */

.mobile-menu__button::after {
    content: "";

    position: absolute;
    top: 16%;
    bottom: 16%;
    left: 0;

    width: 2px;

    background:
        linear-gradient(
            to bottom,
            transparent,
            rgba(217, 119, 6, 0.75),
            transparent
        );

    opacity: 0.4;

    transition:
        width 0.2s ease,
        opacity 0.2s ease;
}

.mobile-menu__button:hover,
.mobile-menu__button:focus-visible {
    transform: translateY(-2px) scale(1.008);

    background:
        linear-gradient(
            100deg,
            rgba(146, 64, 14, 0.52),
            rgba(44, 17, 8, 0.86)
        );

    border-color: rgba(252, 211, 77, 0.5);

    box-shadow:
        0 11px 24px rgba(0, 0, 0, 0.48),
        0 0 17px rgba(217, 119, 6, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.065);

    outline: none;
}

.mobile-menu__button:hover::before,
.mobile-menu__button:focus-visible::before {
    transform: translateX(130%);
}

.mobile-menu__button:hover::after,
.mobile-menu__button:focus-visible::after {
    width: 3px;
    opacity: 1;
}

.mobile-menu__button:active {
    transform: translateY(1px) scale(0.985);
}


/* =========================================================
   NOUVEAUTÉS MIS EN AVANT
   ========================================================= */

#mobile-menu .mobile-menu__button--featured {
    background:
        linear-gradient(
            100deg,
            rgba(153, 27, 27, 0.42),
            rgba(69, 26, 3, 0.82)
        );

    border-color: rgba(252, 211, 77, 0.34);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.4),
        inset 3px 0 0 rgba(252, 211, 77, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

#mobile-menu .mobile-menu__button--featured::after {
    display: none;
}


/* =========================================================
   ICÔNES
   ========================================================= */

.mobile-menu__button-icon {
    position: relative;
    z-index: 1;

    display: grid;
    place-items: center;

    width: 48px;
    height: 48px;

    font-family:
        "Apple Color Emoji",
        "Segoe UI Emoji",
        "Noto Color Emoji",
        sans-serif;

    font-size: 23px;
    line-height: 1;

    background:
        radial-gradient(
            circle at 34% 24%,
            rgba(255, 255, 255, 0.13),
            transparent 41%
        ),
        linear-gradient(
            145deg,
            rgba(217, 119, 6, 0.58),
            rgba(69, 26, 3, 0.94)
        );

    border: 1px solid rgba(254, 243, 199, 0.26);
    border-radius: 11px;

    box-shadow:
        0 5px 11px rgba(0, 0, 0, 0.42),
        inset 0 1px 3px rgba(255, 255, 255, 0.12);

    transition:
        transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1),
        filter 0.24s ease;
}

.mobile-menu__button:hover .mobile-menu__button-icon,
.mobile-menu__button:focus-visible .mobile-menu__button-icon {
    transform: scale(1.075) rotate(-3deg);
    filter: brightness(1.14);
}


/* =========================================================
   TEXTES DES BOUTONS
   ========================================================= */

.mobile-menu__button-text {
    position: relative;
    z-index: 1;

    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.mobile-menu__button-title {
    display: block;

    color: var(--mobile-menu-gold-light);

    font-family: var(--mobile-menu-font-medieval);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: 0.045em;
    text-transform: uppercase;

    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.85),
        0 0 8px rgba(252, 211, 77, 0.08);
}

.mobile-menu__button-description {
    display: block;
    min-width: 0;
    overflow: hidden;

    color: rgba(245, 230, 206, 0.5);

    font-family: var(--mobile-menu-font-tech);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0.035em;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* =========================================================
   FLÈCHE
   ========================================================= */

.mobile-menu__button-arrow {
    position: relative;
    z-index: 1;

    color: rgba(252, 211, 77, 0.48);

    font-family: var(--mobile-menu-font-medieval);
    font-size: 28px;
    font-weight: 400;
    line-height: 1;

    transform: translateX(0);

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.mobile-menu__button:hover .mobile-menu__button-arrow,
.mobile-menu__button:focus-visible .mobile-menu__button-arrow {
    color: var(--mobile-menu-gold);
    transform: translateX(3px);
}


/* =========================================================
   BOUTON FERMER
   ========================================================= */

#mobile-menu .mobile-menu__close {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    width: 100%;

    margin: 14px 0 0 !important;
    padding: 11px 16px !important;

    color: rgba(252, 165, 165, 0.77);

    font-family: var(--mobile-menu-font-tech);
    font-size: 10px !important;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0.18em;
    text-transform: uppercase;

    background: rgba(127, 29, 29, 0.075);

    border: 1px solid rgba(248, 113, 113, 0.15);
    border-radius: 10px;

    box-shadow: none;

    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.mobile-menu__close:hover,
.mobile-menu__close:focus-visible {
    color: #fecaca;
    background: rgba(127, 29, 29, 0.21);
    border-color: rgba(248, 113, 113, 0.38);

    transform: translateY(-1px);
    outline: none;
}

.mobile-menu__close:active {
    transform: translateY(1px);
}

.mobile-menu__close-icon {
    font-family: var(--mobile-menu-font-tech);
    font-size: 11px;
    line-height: 1;
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes mobileMenuFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes mobileMenuPanelAppear {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes mobileMenuAuraPulse {
    0%,
    100% {
        opacity: 0.14;
        transform: scale(0.92);
    }

    50% {
        opacity: 0.26;
        transform: scale(1.06);
    }
}

@keyframes mobileMenuGoldAuraPulse {
    0%,
    100% {
        opacity: 0.14;
        transform: translateX(-50%) scale(0.92);
    }

    50% {
        opacity: 0.26;
        transform: translateX(-50%) scale(1.06);
    }
}

@keyframes mobileMenuEmberRise {
    0% {
        opacity: 0;
        transform: translate3d(0, 25px, 0) scale(0.4);
    }

    14% {
        opacity: 0.85;
    }

    70% {
        opacity: 0.5;
    }

    100% {
        opacity: 0;
        transform: translate3d(20px, -105vh, 0) scale(1);
    }
}


/* =========================================================
   TÉLÉPHONES ÉTROITS
   ========================================================= */

@media (max-width: 390px) {
    .mobile-menu__panel {
        padding: 19px 14px 15px;
        border-radius: 17px;
    }

    .mobile-menu__header {
        margin-bottom: 16px;
    }

    .mobile-menu__title {
        font-size: 26px;
    }

    #mobile-menu .mobile-menu__button {
        grid-template-columns: 43px minmax(0, 1fr) 14px;
        gap: 10px;

        min-height: 59px;
        padding: 8px 10px 8px 8px !important;
    }

    .mobile-menu__button-icon {
        width: 43px;
        height: 43px;
        font-size: 20px;
    }

    .mobile-menu__button-title {
        font-size: 13px;
    }

    .mobile-menu__button-description {
        font-size: 9px;
    }

    .mobile-menu__button-arrow {
        font-size: 24px;
    }
}


/* =========================================================
   TÉLÉPHONES PEU HAUTS
   ========================================================= */

@media (max-height: 720px) {
    #mobile-menu.mobile-menu {
        align-items: flex-start;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .mobile-menu__panel {
        padding-top: 16px;
        padding-bottom: 14px;
    }

    .mobile-menu__ornament {
        margin-bottom: 10px;
    }

    .mobile-menu__ornament--bottom {
        margin-top: 10px;
        margin-bottom: 0;
    }

    .mobile-menu__header {
        margin-bottom: 12px;
    }

    .mobile-menu__eyebrow {
        margin-bottom: 3px;
    }

    .mobile-menu__subtitle {
        display: none;
    }

    .mobile-menu__navigation {
        gap: 7px;
    }

    #mobile-menu .mobile-menu__button {
        min-height: 54px;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }

    .mobile-menu__button-icon {
        width: 40px;
        height: 40px;
        font-size: 19px;
    }

    #mobile-menu .mobile-menu__close {
        margin-top: 9px !important;
        padding-top: 9px !important;
        padding-bottom: 9px !important;
    }
}


/* =========================================================
   ACCESSIBILITÉ
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    #mobile-menu.mobile-menu:not(.hidden),
    .mobile-menu__panel,
    .mobile-menu__aura,
    .mobile-menu__embers span,
    .mobile-menu__button,
    .mobile-menu__button::before,
    .mobile-menu__button-icon,
    .mobile-menu__button-arrow,
    .mobile-menu__close {
        animation: none !important;
        transition: none !important;
    }
}

/* =========================================================
   1. VARIABLES GLOBALES ET CHAUDRON RESPONSIVE
   ========================================================= */

#cauldron-wrapper {
    /* Échelle responsive par défaut */
    --cauldron-scale: 1;

    /* Variables de base */
    --cauldron-outline: #09080d;
    --potion-color: var(--glow, #7cff57);
    
    /* Variables de Skin (Modifiées par le JS) */
    --skin-highlight: #777783;
    --skin-light: #5a5a66;
    --skin-medium: #2a2a35;
    --skin-dark: #0f0f15;
    --skin-shadow: #07070b;
    --skin-reflection: #b9b9c7;

    position: absolute;
    top: 38%;
    left: 50%;
    width: min(72vw, 350px);
    aspect-ratio: 1.08 / 1;
    
    /* Centrage ET application de l'échelle responsive */
    transform: translate(-50%, -50%) scale(var(--cauldron-scale));
    transform-origin: center center;
    transition: transform 0.3s ease-in-out;
    
    z-index: 35;
    isolation: isolate;
    filter: drop-shadow(0 18px 14px rgba(0, 0, 0, 0.45));
}

/* Petit effet de mouvement global (Aura de la potion) */
#cauldron-wrapper::before {
    content: "";
    position: absolute;
    inset: 19% 7% 13%;
    z-index: -4;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--potion-color) 34%, transparent), transparent 68%);
    filter: blur(22px);
    opacity: 0.72;
    animation: cauldronAura 2.8s ease-in-out infinite;
}

/* Ombre au sol */
.cauldron-shadow {
    position: absolute;
    left: 12%;
    bottom: 1%;
    width: 76%;
    height: 12%;
    z-index: -2;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.72);
    filter: blur(8px);
    transform: scaleX(1.08);
    opacity: 0.82;
}


/* =========================================================
   2. LE CORPS DU CHAUDRON (Connecté aux Skins)
   ========================================================= */

.cauldron-belly {
    position: absolute;
    left: 9%;
    bottom: 15%;
    width: 82%;
    height: 63%;
    z-index: 4;
    overflow: hidden;
    
    border: clamp(2px, 0.55vw, 4px) solid var(--cauldron-outline);
    border-radius: 44% 44% 48% 48% / 30% 30% 69% 69%;

    background-color: var(--skin-medium, #2a2a35) !important;
    background-image: radial-gradient(circle at 30% 30%, var(--skin-light) 0%, var(--skin-medium) 50%, var(--skin-dark) 85%, var(--skin-shadow) 100%) !important;
    border-color: var(--skin-highlight);

    box-shadow:
        inset 6px 4px 0 rgba(255,255,255,0.05),
        inset -12px -12px 0 rgba(0,0,0,0.16),
        inset 0 -20px 28px rgba(0,0,0,0.52),
        0 6px 0 rgba(0,0,0,0.24);
        
    transition: background 0.5s ease, filter 0.4s ease;
}

.cauldron-belly::after {
    content: "";
    position: absolute;
    left: 17%;
    right: 17%;
    bottom: 7%;
    height: 5%;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(153, 148, 180, 0.34), rgba(255, 255, 255, 0.09), transparent);
    opacity: 0.62;
}

.cauldron-highlight {
    position: absolute;
    top: 20%; left: 11%; width: 17%; height: 48%;
    border-left: clamp(3px, 0.8vw, 5px) solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    transform: rotate(12deg);
    filter: blur(0.4px);
    opacity: 0.82;
}

.cauldron-reflection {
    position: absolute;
    top: 16%; left: 22%; width: 9%; height: 9%;
    background: var(--skin-reflection);
    border-radius: 45% 55% 48% 52%;
    box-shadow: 4px 4px 0 rgba(255, 255, 255, 0.05), 20px 8px 0 -3px rgba(255, 255, 255, 0.08);
    transform: rotate(-18deg);
    opacity: 0.88;
}

/* =========================================================
   3. DETAILS (Poignées, Pieds, Bords, Rivets)
   ========================================================= */

.cauldron-rim {
    position: absolute;
    top: 13%; left: 1.5%; width: 97%; height: 25%;
    z-index: 8;
    display: flex; align-items: center; justify-content: center;
    border: clamp(2px, 0.7vw, 5px) solid var(--cauldron-outline);
    border-radius: 50%;
    
    background: linear-gradient(to bottom, var(--skin-light), var(--skin-dark));
    border-bottom: 3px solid var(--skin-shadow);

    box-shadow: inset 0 4px 0 rgba(255,255,255,0.11), inset 0 -6px 0 rgba(0,0,0,0.22), 0 6px 0 rgba(0,0,0,0.18), 0 10px 16px rgba(0,0,0,0.28);
}

.rim-metal-light {
    position: absolute;
    top: 8%; left: 18%; width: 30%; height: 15%;
    border-radius: 50%;
    border-top: 3px solid rgba(255, 255, 255, 0.21);
    background: var(--skin-highlight);
    transform: rotate(-5deg);
    opacity: 0.85;
}

.cauldron-opening {
    position: relative;
    width: 86%; height: 68%;
    overflow: hidden;
    border: 2px solid #08070c !important;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, #181521 0%, #07070b 58%, #000 100%);
    box-shadow: inset 0 9px 16px rgba(0,0,0,0.9), inset 0 -3px 4px rgba(255,255,255,0.03);
}

.cauldron-handle {
    position: absolute;
    top: 24%; width: 24%; height: 38%;
    z-index: 2;
    border: clamp(2px, 0.7vw, 5px) solid var(--cauldron-outline);
    border-radius: 50%;
    background: linear-gradient(to right, var(--skin-dark), var(--skin-medium), var(--skin-shadow));
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.04), 0 5px 0 rgba(0,0,0,0.18);
}
.cauldron-handle::after {
    content: ""; position: absolute; inset: 18%; border-radius: 50%;
    background: #09090e; box-shadow: inset 0 0 10px #000;
}
.handle-left { left: -7%; transform: rotate(-10deg); }
.handle-right { right: -7%; transform: rotate(10deg); }
.cauldron-handle span { position: absolute; inset: 0; border-radius: inherit; }

.cauldron-leg {
    position: absolute;
    bottom: 7%; width: 20%; height: 22%;
    z-index: 3;
    border: clamp(2px, 0.55vw, 4px) solid var(--cauldron-outline);
    background: linear-gradient(to right, var(--skin-dark), var(--skin-medium), var(--skin-shadow));
    box-shadow: inset 4px 2px 0 rgba(255,255,255,0.05), 0 5px 0 rgba(0,0,0,0.18);
}
.leg-left { left: 20%; border-radius: 25% 30% 45% 40%; transform: rotate(17deg) skewX(-8deg); }
.leg-right { right: 20%; border-radius: 30% 25% 40% 45%; transform: rotate(-17deg) skewX(8deg); }

.belly-rivet, .rim-rivet {
    position: absolute;
    aspect-ratio: 1;
    border: 2px solid var(--cauldron-outline);
    border-radius: 50%;
    background: radial-gradient(circle at top left, var(--skin-highlight), var(--skin-dark));
    box-shadow: 1px 1px 2px var(--skin-shadow);
}
.rim-rivet { top: 44%; width: clamp(11px, 3.7vw, 17px); }
.rivet-left { left: 3%; }
.rivet-right { right: 3%; }
.belly-rivet { top: 21%; width: clamp(9px, 3vw, 14px); }
.belly-rivet-left { left: 6%; }
.belly-rivet-right { right: 6%; }

.cauldron-eyes { display: none !important; }


/* =========================================================
   4. LA POTION MAGIQUE
   ========================================================= */

.cauldron-liquid {
    position: absolute;
    left: -7%; bottom: -100%; width: 114%; height: 112%;
    overflow: hidden; border-radius: 50%;
    
    background:
        radial-gradient(circle at 38% 22%, rgba(255,255,255,0.58) 0 2%, transparent 3%),
        radial-gradient(circle at 53% 23%, rgba(255,255,255,0.28) 0 1.5%, transparent 2.5%),
        radial-gradient(ellipse at 45% 6%, rgba(255,255,255,0.35) 0%, var(--potion-color) 18%, var(--potion-color) 55%, rgba(8, 12, 8, 0.55) 100%) !important;
        
    box-shadow: inset 0 8px 9px rgba(255,255,255,0.28), inset 0 -20px 24px rgba(0,0,0,0.32), 0 0 20px var(--potion-color);
    opacity: 0.97;
    transition: bottom 0.65s cubic-bezier(0.22, 1.25, 0.36, 1), background 0.5s ease, box-shadow 0.5s ease;
    will-change: bottom;
    animation: liquidSurface 3.4s ease-in-out infinite;
}

.cauldron-liquid::before {
    content: ""; position: absolute;
    top: -5%; left: 5%; width: 90%; height: 19%;
    border-radius: 50%;
    border-top: 4px solid rgba(255, 255, 255, 0.48);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent);
    opacity: 0.9;
}

.liquid-shine {
    position: absolute; left: 22%; top: 12%; width: 25%; height: 9%;
    border-radius: 50%; border-top: 3px solid rgba(255, 255, 255, 0.34);
    transform: rotate(-5deg);
}

.liquid-wave {
    position: absolute; left: 0; top: 1%; width: 100%; height: 17%;
    border-radius: 50%; border-top: 3px solid rgba(255, 255, 255, 0.2);
}
.liquid-wave-1 { animation: potionWave 2.6s ease-in-out infinite; }
.liquid-wave-2 { top: 5%; opacity: 0.45; transform: scaleX(0.8); animation: potionWave 2.1s ease-in-out infinite reverse; }

.liquid-bubble {
    position: absolute; display: block; aspect-ratio: 1;
    border: 2px solid rgba(255, 255, 255, 0.45); border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.7) 0 9%, rgba(255, 255, 255, 0.1) 12%, transparent 60%);
    box-shadow: inset 0 0 7px rgba(255, 255, 255, 0.18), 0 0 6px var(--potion-color);
    animation: bubbleInside 2.4s ease-in infinite;
}
.bubble-1 { left: 20%; bottom: 12%; width: 13px; animation-delay: -0.4s; }
.bubble-2 { left: 43%; bottom: 2%; width: 8px; animation-delay: -1.1s; }
.bubble-3 { left: 65%; bottom: 18%; width: 16px; animation-delay: -1.7s; }
.bubble-4 { left: 78%; bottom: 8%; width: 7px; animation-delay: -0.8s; }


/* =========================================================
   5. LE GRAND BRASIER ORGANIQUE (20 Flammes)
   ========================================================= */

.cauldron-flames {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 75%; 
    height: 100px;
}

.flames-back { z-index: 1; }
.flames-front { z-index: 10; }

.cauldron-flames .flame-tongue {
    position: absolute;
    bottom: 3%;
    border-radius: 65% 35% 55% 45% / 82% 65% 35% 18%;
    transform-origin: bottom center !important;
    background: radial-gradient(ellipse at 51% 76%, rgba(255, 255, 255, 0.92) 0%, color-mix(in srgb, var(--c3, #fcd34d) 82%, white) 13%, transparent 38%), linear-gradient(180deg, color-mix(in srgb, var(--c3, #fcd34d) 74%, white) 0%, var(--c3, #fcd34d) 25%, var(--c2, #ea580c) 63%, var(--c1, #991b1b) 100%);
    box-shadow: 0 0 8px color-mix(in srgb, var(--c3, #fcd34d) 55%, transparent), 0 0 18px color-mix(in srgb, var(--c2, #ea580c) 45%, transparent), inset 0 -10px 12px color-mix(in srgb, var(--c1, #991b1b) 40%, transparent);
    filter: saturate(1.12);
    mix-blend-mode: screen;
    
    animation-name: organicFlame !important;
    animation-iteration-count: infinite !important;
    animation-timing-function: ease-in-out !important;
}

.flames-back .flame-tongue {
    filter: brightness(0.6) blur(2px);
}

.fire-floor-glow {
    position: absolute; left: 50%; bottom: 0; width: 105%; height: 43%;
    transform: translateX(-50%); border-radius: 50%;
    background: radial-gradient(ellipse at center, color-mix(in srgb, var(--c3, #fcd34d) 68%, transparent) 0%, color-mix(in srgb, var(--c2, #ea580c) 50%, transparent) 34%, color-mix(in srgb, var(--c1, #991b1b) 22%, transparent) 58%, transparent 75%);
    filter: blur(13px); opacity: 0.78; mix-blend-mode: screen;
    animation: fireFloorPulse 1.55s ease-in-out infinite alternate;
}

.fire-ember {
    position: absolute; bottom: 12%; width: clamp(3px, 1vw, 5px); aspect-ratio: 1;
    border-radius: 40%; z-index: 15;
    background: color-mix(in srgb, var(--c3, #fcd34d) 72%, white);
    box-shadow: 0 0 5px var(--c3, #fcd34d), 0 0 10px var(--c2, #ea580c);
    opacity: 0; animation: fireEmberRise 1.7s linear infinite;
}
.fire-ember-1 { left: 13%; animation-delay: -0.25s; }
.fire-ember-2 { left: 29%; animation-delay: -1.1s; }
.fire-ember-3 { left: 43%; animation-delay: -0.62s; }
.fire-ember-4 { left: 58%; animation-delay: -1.45s; }
.fire-ember-5 { left: 72%; animation-delay: -0.9s; }
.fire-ember-6 { left: 85%; animation-delay: -1.65s; }

/* Variables de Chaos pour les Flammes */
.f-size-s { width: 15px !important; height: 35px !important; }
.f-size-m { width: 22px !important; height: 55px !important; }
.f-size-l { width: 30px !important; height: 75px !important; }
.f-size-xl { width: 40px !important; height: 95px !important; }

.f-pos-1 { left: 5% !important; } .f-pos-2 { left: 15% !important; } .f-pos-3 { left: 25% !important; } .f-pos-4 { left: 35% !important; } .f-pos-5 { left: 45% !important; }
.f-pos-6 { left: 55% !important; } .f-pos-7 { left: 65% !important; } .f-pos-8 { left: 75% !important; } .f-pos-9 { left: 85% !important; } .f-pos-10 { left: 95% !important; }

.f-anim-1 { animation-duration: 0.9s !important; animation-delay: 0.1s !important; }
.f-anim-2 { animation-duration: 1.3s !important; animation-delay: 0.4s !important; }
.f-anim-3 { animation-duration: 1.1s !important; animation-delay: 0.7s !important; }
.f-anim-4 { animation-duration: 1.6s !important; animation-delay: 0.2s !important; }
.f-anim-5 { animation-duration: 1.4s !important; animation-delay: 0.9s !important; }


/* =========================================================
   6. VAPEUR ET PARTICULES MAGIQUES
   ========================================================= */

.cauldron-steam { position: absolute; top: -10%; left: 20%; width: 60%; height: 40%; z-index: 11; pointer-events: none; }
.steam {
    position: absolute; bottom: 0; width: 15%; height: 45%;
    border: clamp(3px, 1vw, 5px) solid color-mix(in srgb, var(--potion-color) 42%, white);
    border-bottom-color: transparent; border-left-color: transparent; border-radius: 50%;
    filter: drop-shadow(0 0 7px var(--potion-color)) blur(0.4px); opacity: 0; animation: steamRise 3.3s ease-out infinite;
}
.steam-1 { left: 12%; animation-delay: -0.4s; }
.steam-2 { left: 37%; animation-delay: -1.9s; transform: scale(0.75) rotate(-15deg); }
.steam-3 { right: 21%; animation-delay: -2.6s; transform: scale(1.15) rotate(13deg); }
.steam-4 { right: 4%; animation-delay: -1.2s; transform: scale(0.65); }

.cauldron-particles { position: absolute; top: -6%; left: 15%; width: 70%; height: 47%; z-index: 12; pointer-events: none; }
.magic-particle {
    position: absolute; bottom: 7%; display: block; width: clamp(7px, 2.4vw, 11px); aspect-ratio: 1;
    border: 2px solid color-mix(in srgb, var(--potion-color) 45%, white); border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.9) 0 8%, transparent 30%), color-mix(in srgb, var(--potion-color) 34%, transparent);
    box-shadow: 0 0 7px var(--potion-color), inset 0 0 5px rgba(255, 255, 255, 0.32);
    opacity: 0; animation: magicBubble 2.8s ease-out infinite;
}
.particle-1 { left: 19%; animation-delay: -0.2s; }
.particle-2 { left: 40%; width: clamp(5px, 1.8vw, 8px); animation-delay: -1.5s; }
.particle-3 { left: 62%; width: clamp(9px, 3vw, 13px); animation-delay: -2.2s; }
.particle-4 { left: 79%; width: clamp(5px, 1.7vw, 8px); animation-delay: -0.9s; }

.magic-star {
    position: absolute; color: color-mix(in srgb, var(--potion-color) 38%, white);
    font-size: clamp(13px, 4vw, 20px); line-height: 1;
    text-shadow: 0 0 6px var(--potion-color), 0 0 12px var(--potion-color);
    animation: starBlink 2.4s steps(3, end) infinite;
}
.star-1 { top: 12%; left: 18%; animation-delay: -0.7s; }
.star-2 { top: 3%; right: 19%; animation-delay: -1.6s; }


/* =========================================================
   7. EFFETS GLOBAUX DE FOND
   ========================================================= */

.glow-effect {
    position: absolute; top: 10%; left: 50%; width: 150vw; height: 150vw; max-width: 600px; max-height: 600px;
    transform: translateX(-50%); pointer-events: none; z-index: 1; border-radius: 50%;
    background: radial-gradient(circle, var(--potion-color) 0%, transparent 62%);
    opacity: 0.14; transition: background 0.5s ease;
}

#ambient-flame-glow {
    position: fixed; left: 50%; bottom: 0; width: 150vw; height: 60vh;
    transform: translateX(-50%); pointer-events: none; z-index: 0;
    background: radial-gradient(ellipse at bottom, var(--c2, #ea580c) 0%, transparent 70%);
    opacity: 0.23; mix-blend-mode: screen; transition: background 0.5s ease;
}


/* =========================================================
   8. UTILITAIRES ET MOBILE (Signet, Bloqueur, Corrections)
   ========================================================= */

.signet-nouveau {
    position: absolute;
    top: 70%; 
    right: -8px; 
    background: linear-gradient(135deg, #fbbf24, #d97706); 
    color: #451a03; 
    font-family: 'Tech', sans-serif;
    padding: 4px 12px 4px 10px;
    border-radius: 4px 0 0 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5), inset 0 1px 2px rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 40;
    font-size: 0.65rem;
    font-weight: 900;
}
.signet-nouveau::after {
    content: ''; position: absolute; bottom: -6px; right: 0;
    border-width: 6px 8px 0 0; border-style: solid; border-color: #92400e transparent transparent transparent; 
}

#landscape-blocker {
    display: none; position: fixed; inset: 0; z-index: 999999;
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
    flex-direction: column; align-items: center; justify-content: center; text-align: center;
}


/* =========================================================
   9. ANIMATIONS CSS
   ========================================================= */

@keyframes cauldronAura { 0%, 100% { transform: scale(0.92); opacity: 0.48; } 50% { transform: scale(1.06); opacity: 0.76; } }
@keyframes liquidSurface { 0%, 100% { transform: translateY(0) scaleX(1); } 50% { transform: translateY(2px) scaleX(1.018); } }
@keyframes potionWave { 0%, 100% { transform: translateX(-3%) rotate(-1deg) scaleX(0.91); } 50% { transform: translateX(3%) rotate(1deg) scaleX(1); } }
@keyframes bubbleInside { 0% { transform: translateY(20px) scale(0.55); opacity: 0; } 18% { opacity: 0.85; } 80% { opacity: 0.85; } 100% { transform: translateY(-88px) scale(1.08); opacity: 0; } }

@keyframes organicFlame { 0%, 100% { transform: scaleY(1) rotate(0deg); } 33% { transform: scaleY(1.2) rotate(-3deg); } 66% { transform: scaleY(0.8) rotate(3deg); } }
@keyframes fireFloorPulse { from { transform: translateX(-50%) scaleX(0.88) scaleY(0.9); opacity: 0.58; } to { transform: translateX(-50%) scaleX(1.08) scaleY(1.08); opacity: 0.85; } }
@keyframes fireEmberRise { 0% { transform: translate(0, 8px) scale(0.45) rotate(0deg); opacity: 0; } 18% { opacity: 1; } 70% { opacity: 0.72; } 100% { transform: translate(16px, -92px) scale(0.9) rotate(200deg); opacity: 0; } }

@keyframes steamRise { 0% { transform: translateY(16px) translateX(0) scale(0.55) rotate(0); opacity: 0; } 22% { opacity: 0.42; } 100% { transform: translateY(-80px) translateX(17px) scale(1.3) rotate(35deg); opacity: 0; } }
@keyframes magicBubble { 0% { transform: translate(0, 18px) scale(0.25); opacity: 0; } 15% { opacity: 1; } 72% { opacity: 0.88; } 100% { transform: translate(18px, -100px) scale(1.18); opacity: 0; } }
@keyframes starBlink { 0%, 100% { transform: scale(0.5) rotate(0deg); opacity: 0.15; } 45% { transform: scale(1.25) rotate(18deg); opacity: 1; } 65% { transform: scale(0.85) rotate(-8deg); opacity: 0.65; } }

/* Personnalisation du scroll pour la modale de mise à jour */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(252, 211, 77, 0.3); /* Couleur Or semi-transparente */
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(252, 211, 77, 0.6);
}


/* ==========================================================
   0. MODIFICATIONS GLOBALES & SÉCURITÉS
   ========================================================== */
/* ✦ NOUVEAU FIX : L'or et les géodes CONSTAMMENT à gauche pour tout le monde ! */
.currency-container {
    left: 20px !important;
    right: auto !important;
}

/* Le bloqueur paysage pour les téléphones */
@media (max-height: 600px) and (orientation: landscape) {
    #landscape-blocker { display: flex !important; }
    body { overflow: hidden !important; }
}


/* ==========================================================
   0. LE RETOUR DU BLOQUEUR PAYSAGE (Téléphones)
   ========================================================== */
@media (max-height: 600px) and (orientation: landscape) {
    #landscape-blocker { display: flex !important; }
    body { overflow: hidden !important; }
}

/* ==========================================================
   1. HABILLAGE MOBILE & TABLETTES PORTRAIT (Jusqu'à 850px)
   (Englobe tous les téléphones + iPad Mini + iPad Air Portrait)
   ========================================================== */
@media (max-width: 850px) {
    html { font-size: 11.5px !important; }
    
    .rpg-panel { padding: 12px !important; }
    .rpg-btn, button { padding: 8px 12px !important; font-size: 1rem !important; }

    /* ✦ FIX : Le Logo devient plus grand puisqu'on a le menu Burger ! */
    #logo-container img { height: 55px !important; } 
    #logo-container h1 { font-size: 1.8rem !important; }

    /* ✦ FIX : L'or et les géodes s'ancrent EN HAUT À GAUCHE, sous les déblocages */
    .currency-container { 
        top: 85px !important; /* Calé juste sous la zone du haut */
        left: 15px !important; 
        right: auto !important; 
        bottom: auto !important; 
        flex-direction: column !important; 
        z-index: 100 !important; 
        display: flex !important;
        transform: scale(0.90);
        transform-origin: top left;
    }

    /* L'Équation "Mélangez vos essences" (Premier plan en bas) */
    #equation-display-panel { 
        bottom: calc(clamp(160px, 26vh, 200px) + 10px) !important; 
        width: 95% !important; 
        z-index: 55 !important;
    }
    #equation-display-panel .rpg-panel { 
        background: rgba(0, 0, 0, 0.85) !important; 
        backdrop-filter: blur(4px); 
        padding: 8px !important;
    }

    .cauldron-flames { transform: translateX(-50%) scale(1.3); bottom: -10%; }

    /* UI Annexes */
    .wow-toast { right: 50%; transform: translate(50%, 50px); bottom: 250px; width: 90%; max-width: 350px; }
    .wow-toast.show { transform: translate(50%, 0); }
    .mobile-menu-active { display: flex !important; }
    #booster-pack { max-width: 110px !important; margin: 0 auto !important; }
    #opening-instruction { font-size: 1rem !important; margin-top: 10px !important; margin-bottom: 10px !important; text-align: center; }
    #gacha-stack-container { min-height: 40vh !important; display: flex; align-items: center; justify-content: center; margin-top: 0 !important; margin-bottom: 0 !important; }
    #gacha-stack-container > div { transform: scale(0.70); }
    #btn-finish-opening { position: fixed !important; bottom: 20px !important; left: 50% !important; transform: translateX(-50%) !important; width: 85% !important; max-width: 300px; z-index: 1000 !important; padding: 10px !important; background-color: rgba(0, 0, 0, 0.9) !important; box-shadow: 0 0 20px rgba(251, 191, 36, 0.4) !important; }
    #gacha-summary-container { padding-bottom: 80px !important; }
}

/* ✦ FIX : On cache le panneau sur TOUS les téléphones (largeur < 550px) OU si l'écran manque de hauteur */
@media (max-width: 550px), (max-width: 850px) and (max-height: 750px) {
    #unlock-panel { display: none !important; }
    
    /* On remonte la monnaie puisqu'il n'y a plus le panneau au-dessus */
    .currency-container { top: 65px !important; }
}


/* ==========================================================
   2. LE MOTEUR DE PLACEMENT (On remplit l'espace !)
   ========================================================== */

/* PILIER A : Tablettes Paysage / Laptops / Nest Hub */
@media (min-width: 851px) and (max-height: 900px) and (orientation: landscape) {
    #cauldron-wrapper {
        top: 40% !important; 
        /* Chaudron grossi : 0.80 au lieu de 0.70 */
        transform: translate(-50%, -50%) scale(0.80) !important; 
    }
    #target-number-panel {
        top: 25% !important; 
        right: 5% !important;
    }
}

/* PILIER B : Tablettes Verticales (iPad Portrait classiques > 850px) */
@media (min-width: 851px) and (max-width: 1024px) and (orientation: portrait) {
    #logo-container { transform: translateX(-20px) !important; }
    
    #target-number-panel {
        left: 50% !important;
        right: auto !important;
        top: 15% !important; 
        transform: translateX(-50%) !important;
        width: 180px !important; 
    }
    #cauldron-wrapper {
        left: 50% !important;
        top: 48% !important; 
        /* Chaudron énorme pour remplir la tablette : 0.95 */
        transform: translate(-50%, -50%) scale(0.95) !important;
    }
}

/* PILIER C : Téléphones "Longs" (iPhone XR, 12/14 Pro Max) */
@media (max-width: 850px) and (min-height: 751px) {
    #target-number-panel {
        left: 50% !important;
        right: auto !important;
        top: 15vh !important; 
        transform: translateX(-50%) !important;
        width: 140px !important; /* Recette agrandie */
    }
    #cauldron-wrapper {
        left: 50% !important;
        top: 45vh !important; 
        /* Chaudron boosté pour combler le vide : 0.65 au lieu de 0.55 */
        transform: translate(-50%, -50%) scale(0.65) !important; 
    }
}

/* PILIER D : Téléphones "Courts" (iPhone SE, Galaxy S8+) */
@media (max-width: 850px) and (max-height: 750px) {
    #target-number-panel {
        left: 50% !important;
        right: auto !important;
        top: 10vh !important; 
        transform: translateX(-50%) !important;
        width: 120px !important; /* Recette agrandie */
    }
    #cauldron-wrapper {
        left: 50% !important;
        top: 42vh !important; 
        /* Chaudron boosté pour combler le vide : 0.58 au lieu de 0.48 */
        transform: translate(-50%, -50%) scale(0.58) !important; 
    }
}

/* ==========================================================
   FIX : RÉSUMÉ DES 3 CARTES (Strictement côte à côte !)
   ========================================================== */
#gacha-summary-container {
    margin-top: 2vh !important; 
    /* LA SOLUTION : On force une grille à 3 colonnes égales */
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important; 
    gap: 12px !important; /* Espacement fixe */
    justify-items: center !important;
    align-items: center !important;
    padding-bottom: 100px !important; /* Laisse l'espace pour le bouton */
    width: 100% !important;
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* On force les wrappers des cartes à s'adapter à leur colonne */
#gacha-summary-container .summary-card-wrapper {
    width: 100% !important;
    max-width: 240px !important; /* Évite qu'elles soient trop grosses sur PC */
}

/* Ajustements pour les petits écrans */
@media (max-width: 850px) {
    #booster-opening-step {
        justify-content: flex-start !important; 
        margin-top: 0 !important;
    }
    #gacha-summary-container {
        gap: 6px !important; /* On réduit l'espace entre les cartes pour qu'elles restent grandes */
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}

/* ==========================================================
   FIX : LE FANTÔME DE LA PILE DE CARTES
   ========================================================== */
/* Quand le JS dit de cacher la pile, on force l'invisibilité absolue ! */
#gacha-stack-container.hidden {
    display: none !important;
    min-height: 0 !important;
    margin: 0 !important;
}

/* On s'assure aussi que le panneau d'ouverture ne pousse rien vers le bas */
#booster-opening-step {
    gap: 1rem !important; /* Réduit l'espace par défaut (qui était énorme avec gap-8) */
}

@keyframes mobileMenuLogoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

```css
@keyframes alchemyParticle {
    0% {
        transform: translate3d(0, 40px, 0) scale(0.5);
        opacity: 0;
    }

    15% {
        opacity: 0.55;
    }

    70% {
        opacity: 0.25;
    }

    100% {
        transform:
            translate3d(
                var(--particle-drift, 0),
                -105vh,
                0
            )
            scale(1.35);
        opacity: 0;
    }
}

#booster-card {
    animation: boosterLevitation 5s ease-in-out infinite;
    transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes boosterLevitation {
    0%,
    100% {
        margin-top: 0;
        filter: drop-shadow(0 22px 26px rgba(0, 0, 0, 0.65));
    }

    50% {
        margin-top: -13px;
        filter:
            drop-shadow(0 34px 30px rgba(0, 0, 0, 0.75))
            drop-shadow(0 0 16px rgba(251, 191, 36, 0.13));
    }
}

@media (prefers-reduced-motion: reduce) {
    #booster-card,
    #update-halo,
    #alchemy-particles span {
        animation: none !important;
    }

    .alchemy-card {
        transition-duration: 0ms !important;
    }
}

```css
@keyframes alchemyParticle {
    0% {
        transform: translate3d(0, 30px, 0) scale(0.5);
        opacity: 0;
    }

    15% {
        opacity: 0.45;
    }

    75% {
        opacity: 0.2;
    }

    100% {
        transform:
            translate3d(
                var(--particle-drift, 0),
                -105vh,
                0
            )
            scale(1.2);
        opacity: 0;
    }
}

#booster-card {
    animation: boosterLevitation 5s ease-in-out infinite;
    transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes boosterLevitation {
    0%,
    100% {
        translate: 0 0;
        filter: drop-shadow(0 22px 25px rgba(0, 0, 0, 0.7));
    }

    50% {
        translate: 0 -10px;
        filter:
            drop-shadow(0 32px 30px rgba(0, 0, 0, 0.8))
            drop-shadow(0 0 15px rgba(251, 191, 36, 0.12));
    }
}

@media (max-width: 639px) {
    #booster-card {
        animation-duration: 6s;
    }
}

@media (prefers-reduced-motion: reduce) {
    #booster-card,
    #update-halo,
    #alchemy-particles span {
        animation: none !important;
    }

    .alchemy-card {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
```

