/* components/_variables.css */
/* Contient toutes les variables CSS globales du site. */

:root {
    --bg-color-dark: #181828;
    --bg-color-medium: #222235;
    --bg-color-light: #303048;
    --text-color-primary: #e8e8f0;
    --text-color-secondary: #a8a8c0;
    --accent-color: #beafff;
    --accent-color-hover: #8870f0;
	--accent-color-hover-shade: #8870f061;
    --border-color: #383850;
    --font-body: 'Roboto', sans-serif;
    --font-title: 'Poppins', sans-serif;
    --page-padding: 10px; /* Padding latéral global */
    --border-radius: 8px; 
    --header-height: 65px; 
    --drawer-width: 240px;
    --scroll-button-size: 44px;
    --scroll-button-offset: 10px; 
    --hover-stroke-width: 3px;
	--drawer-width-collapsed: 65px;
    --drawer-width-expanded: 221px;
}






/* components/_base.css */
/* Contient le reset CSS et les styles globaux pour html et body. */

/* --- Global Reset & Box Sizing --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color-dark);
    color: var(--text-color-primary);
    font-family: var(--font-body);
    line-height: 1.5; 
    font-size: 15px; 
}

/* --- Style Personnalisé pour la Barre de Défilement Globale --- */

/* Pour les navigateurs basés sur WebKit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color-dark); /* Arrière-plan de la piste */
}

::-webkit-scrollbar-thumb {
    background-color: var(--bg-color-light); /* Couleur de la barre de défilement */
    border-radius: var(--border-radius); /* Bords arrondis comme le reste du site */
    border: 2px solid var(--bg-color-dark); /* Bordure pour un effet de "flottement" */
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-color); /* Changement de couleur au survol */
}

/* Pour Firefox */
html {
  scrollbar-width: thin;
  /* La première couleur est la barre, la seconde est l'arrière-plan */
  scrollbar-color: var(--bg-color-light) var(--bg-color-dark);
}





/* components/_layout.css */
/* Contient les styles pour les éléments de structure principaux :
   - Conteneurs (.container)
   - En-tête (.site-header)
   - Pied de page (.site-footer)
   - Contenu principal (.site-main-content)
   - Sections de page (section)
   - Layout de la page de jeu
*/

/* =================================================================== */
/* STYLE GLOBAL POUR LES CONTENEURS PRINCIPAUX                       */
/* =================================================================== */
.container {
    width: 100%;

    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
	
}
.game-container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
}


.site-main-content {
    padding-top: var(--header-height);
    opacity: 1 !important; /* CORRECTION FOUC DÉFINITIVE: Révéler le contenu masqué par critical.css */
    transition: margin-left 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* =================================================================== */
/* EN-TÊTE DU SITE (.site-header)                                    */
/* =================================================================== */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1200;
    background-color: var(--header-bg-color, #22223591);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 var(--page-padding);
    opacity: 1 !important; /* CORRECTION FOUC DÉFINITIVE: Révéler le header masqué par critical.css */
    transition: opacity 0.3s ease;
}

.header-content {
    display: flex;
    align-items: center;
    width: 100%; /* S'assure qu'il prend la largeur disponible */
    /* La transition sur le padding est retirée pour que le contenu ne bouge plus */
}

.header-left {
    display: flex;
    align-items: center;
}

.site-header .logo {
    font-family: var(--font-title);
    font-size: 1.6rem;
    font-weight: 700;
    color: transparent; /* Masque le texte HTML brut, rend l'image visible */
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    position: relative;
    margin-left: 14px;
    height: var(--logo-height, 36px);
    width: auto;
    max-width: 190px;
    flex-shrink: 0;
}
.site-header .logo img {
    height: var(--logo-height, 36px);
    width: auto;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
.site-header .logo::after {
    content: var(--logo-text, "");
    position: absolute;
    left: 45px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 2.2rem;
    z-index: -1;
}

/* Les 3 éléments suivants sont masqués par défaut sur mobile */
.drawer-back-button,
.drawer-search-bar-mobile {
    display: none; 
}

.site-header .container {
    padding: 0;
    max-width: 100%;
}

.drawer-back-button {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--bg-color-light);
    border: 1px solid transparent;
    color: var(--text-color-primary);
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--font-title);
    padding: 8px;
    width: 38px;
    height: 38px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
.drawer-back-button:hover {
    background-color: var(--bg-color-light);
    border-color: var(--accent-color-hover);
}
.drawer-back-button svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.drawer-back-button span {
    display: none;
}

.header-icon-button {
    background-color: var(--bg-color-light);
    border: 1px solid transparent;
    color: var(--text-color-secondary);
    padding: 8px;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s;
}
.header-icon-button:hover {
    background-color: var(--bg-color-light);
    border-color: var(--accent-color-hover);
}
.header-icon-button svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.header-right {
    display: flex;
    align-items: center;
    margin-left: auto;
}

/* =================================================================== */
/* PIED DE PAGE (.site-footer)                                       */
/* =================================================================== */
.site-footer {
    background-color: var(--bg-color-medium); color: var(--text-color-secondary);
    text-align: center; padding: 20px 0; 
    margin-top: 30px; 
    border-top: 1px solid var(--border-color); font-size: 0.85rem;
    transition: margin-left 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.site-footer .container { 
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--page-padding);
}

/* =================================================================== */
/* SECTIONS DE PAGE                                                  */
/* =================================================================== */
section { 
    padding: 0; 
}

.full-width-section { 
    width: 100%;
    padding-left: 0; 
    padding-right: 0;
}

.section-header {
    display: flex;
    align-items: baseline;
    margin-bottom: 5px;
    gap: 16px;
    justify-content: flex-start;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}
.section-header .section-title {
    margin: 0;
    font-family: var(--font-title); 
    font-size: 1.1rem; 
    font-weight: 500;
    color: var(--text-color-primary);
    padding-left: 14px;
    padding-right: var(--page-padding); 
    padding-top: 5px;
}
/* --- BOUTON « SEE MORE » UNIFIÉ EN PILULE VERRE DÉPOLI (FINITION CHIC & COMPACTE) --- */
.see-more-link,
.mobile-category-shelf .shelf-see-all,
.mobile-shelf-island .shelf-cta-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 4px 12px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-family: var(--font-title, sans-serif) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 12 !important;
    pointer-events: auto !important;
    height: auto !important;
    line-height: 1.2 !important;
}
.see-more-link:hover,
.mobile-category-shelf .shelf-see-all:hover,
.mobile-shelf-island .shelf-cta-btn:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #0f172a !important;
    border-color: #ffffff !important;
    transform: translateX(2px) !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.25) !important;
}
.see-more-link svg,
.shelf-cta-btn svg,
.shelf-chevron {
    width: 10px !important;
    height: 10px !important;
    transition: transform 0.2s ease !important;
    opacity: 0.8 !important;
}
.see-more-link:hover svg,
.shelf-cta-btn:hover svg,
.shelf-cta-btn:hover .shelf-chevron {
    transform: translateX(2px) !important;
    opacity: 1 !important;
}
@media (max-width: 768px) {
    .see-more-link,
    .mobile-category-shelf .shelf-see-all,
    .mobile-shelf-island .shelf-cta-btn {
        padding: 3px 9px !important;
        font-size: 11px !important;
        gap: 4px !important;
    }
}

/* NOUVEAU : Style pour les descriptions de section (SEO) */
.section-description {
    font-size: 0.9rem;
    color: var(--text-color-secondary);
    margin: 0 0 9px 3px;
}

/* =================================================================== */
/* LAYOUT DE LA PAGE DE JEU                                          */
/* =================================================================== */
.game-layout-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
    padding: 0;
}

.main-column {
    grid-column: 1 / 2;
}

.right-sidebar-column {
    grid-column: 2 / 3;
    position: sticky;
    top: calc(var(--header-height) + 25px);
    overflow-y: auto;
}

.game-player-wrapper,
.game-content-columns {
    max-width: 100%;
    margin: 0;
}
.game-content-columns {
    max-width: 1800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 25px;
    padding: 22px;
    background-color: var(--bg-color-medium);
    border-radius: 8px;
}

.top-ad-placeholder {
    margin-bottom: 25px;
}

.game-header-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; }
h1.game-title-main { margin: 0; font-size: 1.8rem; line-height: 1.2; }
.game-rating { display: flex; align-items: center; gap: 8px; color: var(--text-color-secondary); }
.rating-stars { color: #ffc107; font-size: 1.2rem; }
.game-embed-container { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.game-actions-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 8px; background-color: var(--bg-color-medium); border-radius: 0 0 8px 8px;}

.actions-bar-title {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.actions-bar-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.ban-placeholder, .sidebar-ban-placeholder {
    background-color: var(--bg-color-medium);
    border: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color-secondary);
    font-size: 0.9rem;
}

.sidebar-ban-placeholder {
    width: 100%;
    min-height: 280px;
    margin-bottom: 25px;
}

#related-games-sidebar {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}
#related-games-sidebar h3 {
    margin-top: 0;
    margin-bottom: 0px;
    font-size: 0.8rem;
    padding-bottom: 4px;
    font-weight: 500;
}

.sidebar-games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.top-ban-placeholder { width: 100%; min-height: 90px; background-color: var(--bg-color-medium); border: 1px dashed var(--border-color); display: flex; align-items: center; justify-content: center; color: var(--text-color-secondary); margin: 25px 0;}
.breadcrumb { margin-bottom: 20px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.breadcrumb li { font-size: 0.85rem; color: var(--text-color-secondary); display: flex; align-items: center; }
.breadcrumb a { color: var(--text-color-secondary); text-decoration: none; transition: color 0.2s; color: var(--accent-color); }
.breadcrumb a:hover { color: var(--accent-color-hover); }
.breadcrumb li:not(:last-child)::after { content: '>'; margin-left: 8px; }
.breadcrumb span[aria-current="page"] { font-weight: bold; color: var(--text-color-primary); }
.game-intro-header { display: flex; justify-content: left; align-items: baseline; flex-wrap: wrap; gap: 15px; margin-bottom: 25px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.game-intro-header .game-title-main { font-size: 2.2rem; line-height: 1.2; }

.intro-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}
#share-button {
    padding: 8px 12px;
}

/* =================================================================== */
/* LAYOUT RESPONSIVE                                                 */
/* =================================================================== */

/* --- DESKTOP STANDARD (769px et plus) --- */
@media (min-width: 769px) {
    .site-header { transition: none; }
    .header-content { width: auto; padding-left: var(--drawer-width-collapsed); }
    .site-main-content, 
    .site-footer { margin-left: var(--drawer-width-collapsed); }
    
    .drawer-search-bar-mobile {
        display: flex;
        flex-grow: 1;
        justify-content: center;
    }
    .drawer-search-bar-mobile .search-input-wrapper {
        max-width: 450px;
    }
     .drawer-back-button { 
        display: none; 
    }
    #open-drawer-button {
        display: flex;
        margin-right: 12px;
    }

    /* NOUVEAU : Styles pour le menu latéral déplié sur desktop */
    /* CORRECTION : Le décalage ne s'applique que si le menu est "épinglé" par un clic. */
    body.drawer-pinned .site-main-content,
    body.drawer-pinned .site-footer {
        margin-left: var(--drawer-width-expanded);
    }
}

/* --- DESKTOP MOYEN (1084px et plus) --- */
@media (min-width: 1084px) {
    .site-header .top-nav { margin-left: auto; order: 3; }
}

/* --- PAGE JEU : Layout à 2 colonnes (1281px et plus) --- */
@media (min-width: 1281px) {

    body.immersive-mode .game-layout-wrapper {
        display: flex;
        flex-direction: column;
        gap: 25px;
        gap: 0;
    }

    .game-layout-wrapper {
        display: grid;
        grid-template-columns: 1fr 320px;
        gap: 12px;
        padding: 12px 12px 0 12px;
    }
    .game-content-columns {
        background-color: unset;
        padding: 0;
    }
    .game-embed-container { 
        border-radius: 8px 8px 0 0;
    }
}

/* --- TRÈS GRANDS ÉCRANS (> 1800px) --- */
@media (min-width: 1801px) {
    .main-column {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .game-player-wrapper,
    .game-content-columns {
        width: 100%;
        max-width: 1800px;
        margin-left: 0;
        margin-right: 0;
    }
}

/* --- TABLETTES (769px à 1280px) --- */
@media (max-width: 1280px) {
    .top-ad-placeholder {
        width: 100%;
        max-width: 1800px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 25px;
    }
    .game-content-columns {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 25px;
        max-width: 1800px;
        margin: 0 auto;
    }
    .game-layout-wrapper {
        display: flex;
        flex-direction: column;
        gap: 0;

    }
    .main-column {
        display: contents;
    }
	.game-player-wrapper { 
        order: 1;
        width: 100%;
    }
    .top-ban-placeholder {
        order: 2;
        width: 100%;
        padding: 8px 0;
    }
    .right-sidebar-column {
        order: 3;
    }
    .game-content-columns {
        order: 4;
    }
    .right-sidebar-column {
        position: static;
        width: 100%;
        max-width: none;
        margin: 8px 0 0 0;
        height: auto;
        overflow-y: visible;
    }
    .game-content-columns {
        margin: 20px 8px 0 8px;
        grid-template-columns: 1fr;
    }
    .in-content-ad-column {
        margin-top: 20px;
    }
    .right-sidebar-column .sidebar-ad-placeholder {
        display: none;
    }
    .sidebar-games-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    .sidebar-ban-placeholder,
    .in-content-ban-column {
        display: none;
    }
}

/* --- TABLETTES (max-width 1083px) --- */
@media (max-width: 1083px) {
    .sidebar-games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .sidebar-ban-placeholder {
        display: none;
    }
}

/* --- MOBILES (max-width 768px) --- */
@media (max-width: 768px) {
    .header-icon-button .open-drawer-text { display: none; }
    .site-header .logo { font-size: 1.3rem; }
    .site-header .top-nav { display: none; } 
    
    body.drawer-open .site-header {
        gap: 10px;
    }
    body.drawer-open .header-content,
	body.drawer-open .header-icon-button {
        display: none;
    }
    body.drawer-open .drawer-back-button {
        display: flex;
        grid-column: 1 / 2;
    }
    body.drawer-open .drawer-search-bar-mobile {
        display: block;
        grid-column: 2 / 3;
        padding: 0;
        width: 100%;
    }
    body.drawer-open .drawer-search-bar-mobile .search-input-wrapper {
        max-width: none;
    }

    .game-content-columns {
        grid-template-columns: 1fr;
        margin: 20px 8px 0 8px;
    }
    .right-sidebar-column {
        max-width: none;
    }
}

/* NOUVEAU : Cacher la bannière publicitaire du haut sur les écrans de moins de 720px
   car elle est souvent trop large pour les mobiles. */
@media (max-width: 719px) {
    .top-ban-placeholder {
        display: none;
    }
}
/* =================================================================== */
/* VUE IMMERSIVE (PAGE JEU)                                          */
/* =================================================================== */

/* NOUVEAU : Full bleed pour l'overlay du jeu sur mobile (avant le mode immersif) 
body.is-mobile .game-layout-wrapper {
    padding: 0;
}*/

/* --- Styles communs au mode immersif --- */
body.immersive-mode {
    overflow: hidden !important;
}
/* NOUVEAU : Supprime le padding du conteneur principal en mode immersif. */
body.immersive-mode .game-layout-wrapper {
    padding: 0 !important;
}
body.immersive-mode .site-footer,
body.immersive-mode .game-actions-bar,
body.immersive-mode .top-ban-placeholder,
body.immersive-mode .game-content-columns,
body.immersive-mode .right-sidebar-column,
body.immersive-mode .category-drawer {
    display: none !important;
}
body.immersive-mode .logo,
body.immersive-mode .drawer-search-bar-mobile,
body.immersive-mode #open-drawer-button,
body.immersive-mode #user-panel-button {
    display: none !important;
}

/* On cache les boutons spécifiques à l'immersif par défaut */
#back-to-home-button,
#header-favorite-button {
    display: none;
}
/* On les affiche uniquement en mode immersif */
body.immersive-mode #back-to-home-button,
body.immersive-mode #header-favorite-button {
    display: inline-flex !important;
}

/* --- Mode immersif par défaut (Mobile-first, header en haut) --- */
body.immersive-mode .site-header {
    height: var(--header-height) !important;
    width: 100% !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    padding: 0 var(--page-padding) !important;
}
body.immersive-mode .header-content {
    flex: 1;
    padding: 0;
    max-width: none;
    justify-content: flex-start;
    align-items: center;
}
body.immersive-mode .site-main-content {    
    padding-top: var(--header-height) !important;
    margin-left: 0 !important;
}
body.immersive-mode .game-player-wrapper {
    height: calc(100vh - var(--header-height)); height: calc(100dvh - var(--header-height));
    width: 100vw;
    margin: 0 calc(-1 * var(--page-padding));
}

/* --- Surcharge pour le mode PAYSAGE --- */
/* Ces styles ne s'appliquent que si l'écran est en mode paysage ET que le JS a activé le mode immersif */
@media (orientation: landscape) {
    body.immersive-mode .site-header {
        width: 45px !important;
        height: 100vh !important; height: 100dvh !important;
        flex-direction: column !important;
        justify-content: flex-start !important; /* Aligne les éléments en haut */
        padding: 15px 0 !important;
    }

    body.immersive-mode #header-user-level {
        padding: 5px !important;
        width: 35px !important;
        height: 35px !important;
        margin: 0 !important;
        justify-content: center !important;
        border-radius: 50% !important;
    }
    body.immersive-mode #header-user-level-value {
        display: none !important;
    }

    .js-enabled .site-main-content {
        opacity: 1 !important; /* On réaffiche le contenu après chargement de main.css */
        visibility: visible !important;
    }
    body.immersive-mode .header-content {
        width: 100%;
        display: flex;
        padding: 0;
        max-width: none;
        justify-content: center;
        align-items: flex-start;
    }
    body.immersive-mode .header-right {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-direction: column; /* Empile les boutons verticalement */
        gap: 15px; /* Espace entre les boutons */
        margin-top: auto; /* Pousse ce groupe de boutons vers le bas */
    }
    body.immersive-mode .site-main-content {
        margin-left: 45px !important;
        padding: 0 !important;
    }
    body.immersive-mode .game-player-wrapper {
        height: 100vh; height: 100dvh;
        width: 100%;
        margin: 0 !important;
    }
}

/* --- Styles communs pour le contenu du jeu en mode immersif --- */
body.immersive-mode .game-player-wrapper {
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
    border-radius: 0 !important;
}
body.immersive-mode .game-embed-container {
    height: 100%;
    width: 100%;
}

/* --- Affichage des boutons sur la page de jeu mobile --- */
@media (max-width: 768px) {
    body:has(.game-layout-wrapper) #header-icon-button {
        display: none;
    }
    body:has(.game-layout-wrapper) #back-to-home-button {
        display: inline-flex;
    }
    body:has(.game-layout-wrapper) .game-actions-bar {
        display: none;
    }
}






/* components/_chips.css */
/* Contient les styles pour les composants de type "chip" ou "tag".
   Utilisé pour les tags de jeu, les liens de catégorie, etc.
*/

/* =================================================================== */
/* STYLE POUR LES COMPOSANTS "CHIP" (TAGS, CATÉGORIES, ETC.)         */
/* =================================================================== */

/* --- 1. Classe de base pour tous les chips --- */
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
    color: var(--accent-color);
}

/* --- 2. Variante "Tag" (style pilule) --- */
/* Remplace .game-tag-chip */
.chip-tag {
    background-color: var(--bg-color-light);
    color: var(--chip-text-color, var(--text-color-secondary));
    border-color: var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
}
.chip-tag:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

/* --- 3. Variante "Catégorie" (style badge rectangulaire) --- */
/* Remplace .game-category-link */
.chip-category {
    background-color: var(--accent-color);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
}
.chip-category:hover {
    background-color: var(--accent-color-hover);
}






/* components/_drawer.css */

/* --- Styles pour le Menu Latéral (Drawer) --- */
.category-drawer {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%; /* Prend toute la largeur sur mobile */
    height: calc(100vh - var(--header-height)); height: calc(100dvh - var(--header-height)); /* Prend toute la hauteur restante */
    background-color: var(--bg-color-medium);
    z-index: 1100;
    overflow-y: auto;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%); /* Caché par défaut sur mobile */
    border-right: 1px solid var(--border-color);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), width 0.2s ease-in-out;
    will-change: transform;
    /* Pour la scrollbar qui apparaît au survol */
    scrollbar-width: none; /* Firefox */
}

.category-drawer::-webkit-scrollbar {
    display: none; /* WebKit */
}

.drawer-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-color-light);
}
.drawer-header h2 { margin: 0; font-family: var(--font-title); font-size: 1.2rem; color: var(--text-color-primary); font-weight: 600; }

.close-drawer-button {
    background: none; border: none; color: var(--text-color-secondary);
    font-size: 2rem; cursor: pointer; padding: 0; line-height: 0.5;
    transition: color 0.2s ease;
}
.close-drawer-button:hover { color: var(--text-color-primary); }

.drawer-nav ul { list-style: none; padding: 0; margin: 0; }

.drawer-nav li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-color-secondary);
    text-decoration: none;
    border-bottom: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-weight: 700;
    font-size: 0.9rem;
	background-color: var(--bg-color-dark);
    position: relative; /* Pour l'indicateur de page active */
}

.drawer-nav .nav-text {
    /* CORRECTION : On anime max-width et margin pour que le texte disparaisse complètement. */
    transition: opacity 0.2s ease-in-out, max-width 0.2s ease-in-out, margin-left 0.2s ease-in-out, transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    padding-left: 5px;
    display: inline-block;
    transform: translateX(0);
    will-change: transform;
}
.drawer-nav li:last-child a { border-bottom: none; }

.drawer-nav li a:hover,
.drawer-nav li a.active {
    color: var(--text-color-primary);
}
.drawer-nav li a:hover {
    background-color: var(--accent-color-hover-shade);
}

.drawer-nav li a:hover .category-icon,
.drawer-nav li a:hover .drawer-icon,
.drawer-nav li a.active .category-icon,
.drawer-nav li a.active .drawer-icon {
    transform: scale(1.1);
    /* NOUVEAU : Retire le filtre pour afficher la couleur originale de l'image */
    filter: none; 
}

/* MODIFIÉ : Styles pour les icônes en tant qu'images */
.category-icon {
    width: 24px; /* Un peu plus grand pour une meilleure visibilité */
    height: 24px;
    transition: transform 0.2s ease, filter 0.2s ease;
    flex-shrink: 0;
    object-fit: contain; /* S'assure que l'image s'adapte sans se déformer */
}

/* NOUVEAU : Styles pour les icônes en background CSS (permet l'upload dynamique) */
.drawer-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease, filter 0.2s ease;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
body.drawer-icons-ready .drawer-icon-home { background-image: var(--icon-home-url, url('../../img/playzool/icons/home.webp')); }
body.drawer-icons-ready .drawer-icon-top { background-image: var(--icon-top-url, url('../../img/playzool/icons/top_games.webp')); }
body.drawer-icons-ready .drawer-icon-featured { background-image: var(--icon-featured-url, url('../../img/playzool/icons/featured.webp')); }
body.drawer-icons-ready .drawer-icon-new { background-image: var(--icon-new-url, url('../../img/playzool/icons/new.webp')); }

.drawer-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.25, 0.1, 0.25, 1), visibility 0s linear 0.35s;
}
.drawer-overlay.active { opacity: 1; visibility: visible; transition-delay: 0s; }

body.drawer-open,
body.panel-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
}

body.drawer-open .category-drawer {
    transform: translateX(0);
}

/* --- Sélecteur de langue --- */
.language-switcher-container {
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.language-dropdown {
    position: relative;
}

.lang-dropdown-btn {
    color: var(--text-color-primary);
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color-primary);
    padding: 6px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 110px;
    justify-content: space-between;
}

.lang-dropdown-btn:hover, .lang-dropdown-btn[aria-expanded="true"] {
    background-color: var(--bg-color-medium);
    border-color: var(--accent-color);
}

.dropdown-arrow {
    width: 1em;
    height: 1em;
    transition: transform 0.2s ease-in-out;
}

.lang-dropdown-btn[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.lang-dropdown-list {
    position: absolute;
    top: 100%;
    right: 0;
    width: 180px;
    background-color: var(--bg-color-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    z-index: 1200;
    margin-top: 8px;
    max-height: 250px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.lang-dropdown-list.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    padding: 10px 15px;
    color: var(--text-color-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s, color 0.2s;
}

.lang-option:hover {
    background-color: var(--accent-color-hover-shade);
    color: #fff;
}

.lang-option.active {
    background-color: var(--accent-color);
    color: #fff;
    font-weight: bold;
}

/* --- Pied de page du menu --- */
.drawer-separator {
    border: none;
    border-top: 1px solid var(--border-color);
    display: block;
}

.drawer-footer-nav {
    padding: 15px 15px 15px 15px;
}

.drawer-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background-color: var(--accent-color);
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background-color 0.2s;
    margin-bottom: 20px;
}

.drawer-button:hover {
    background-color: var(--accent-color-hover);
}

.drawer-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.drawer-footer-links a {
    color: var(--text-color-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}

.drawer-footer-links a:hover {
    color: var(--text-color-primary);
}

.drawer-social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

.drawer-social-links a {
    color: var(--text-color-secondary);
    transition: color 0.2s;
}

.drawer-social-links a:hover {
    color: var(--accent-color);
}

.drawer-copyright {
    font-size: 0.75rem;
    color: var(--text-color-secondary);
    text-align: center;
    padding-bottom: 10px;
    margin: 0;
}

/* --- Indicateur de page active --- */
.active-indicator {
    position: absolute;
    left: 0;
    top: 50%;
    width: 8px;
    height: 28px;
    background-color: var(--accent-color);
    border-radius: 0px 2px 2px 0px;
    transform: translateY(-50%) scaleY(0);
    opacity: 0;
    transition: all 0.2s ease-out;
}

.drawer-nav li a.active .active-indicator {
    transform: translateY(-50%) scaleY(1);
    opacity: 1;
}

/* --- Scrollbar du menu --- */
.category-drawer:hover {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: var(--bg-color-light) var(--bg-color-dark);
}

.category-drawer:hover::-webkit-scrollbar {
    display: block;
    width: 12px;
}

.category-drawer:hover::-webkit-scrollbar-track {
    background: var(--bg-color-dark);
}

.category-drawer:hover::-webkit-scrollbar-thumb {
    background-color: var(--bg-color-light);
    border-radius: var(--border-radius);
    border: 2px solid var(--bg-color-dark);
}

.category-drawer:hover::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-color);
}

/* =================================================================== */
/* STYLES POUR LE MENU LATÉRAL SUR DESKTOP (769px et plus)           */
/* =================================================================== */
@media (min-width: 769px) {
    .category-drawer {
        /* On le rend visible et on définit sa largeur par défaut (replié) */
        transform: translateX(0);
        width: var(--drawer-width-collapsed);
        /* On s'assure qu'il ne se superpose pas au contenu principal */
        position: fixed;
    }

    /* Quand le menu est déplié (via la classe sur le body) */
    /* CORRECTION : Le menu s'élargit au survol OU s'il est épinglé. */
    body.drawer-hover .category-drawer,
    body.drawer-pinned .category-drawer {
        width: var(--drawer-width-expanded);
    }

    /* CORRECTION : On positionne l'icône de manière stable pour éviter les sauts à l'animation. */
    .drawer-nav li a {
        justify-content: flex-start; /* On garde un alignement constant */
        padding-left: 22px; /* (65px collapsed width - 20px icon width) / 2 = 22.5px. On arrondit. */
        padding-right: 22px;
    }

    /* On rétablit l'alignement et les marges quand le menu est déplié. */
    body.drawer-hover .drawer-nav li a,
    body.drawer-pinned .drawer-nav li a {
        justify-content: flex-start;
        padding-left: 22px; /* On garde le même padding pour que l'icône ne bouge pas */
        padding-right: 20px;
    }

    /* On cache le texte et les éléments du pied de page quand le menu est replié */
    .drawer-nav .nav-text,
    .drawer-footer-nav,
    .drawer-separator,
    #lang-switcher-label {
        opacity: 0;
        pointer-events: none; /* Empêche l'interaction avec les éléments cachés */
    }
    /* On s'assure que le texte ne prend pas de place quand il est caché. */
    .drawer-nav .nav-text {
        max-width: 0;
        margin-left: 0;
    }

    /* On affiche le texte et les éléments du pied de page quand le menu est déplié */
    /* CORRECTION : Le texte apparaît au survol OU si le menu est épinglé. */
    body.drawer-hover .drawer-nav .nav-text,
    body.drawer-pinned .drawer-nav .nav-text,
    body.drawer-hover .drawer-footer-nav,
    body.drawer-pinned .drawer-footer-nav,
    body.drawer-hover .drawer-separator,
    body.drawer-pinned .drawer-separator,
    body.drawer-hover #lang-switcher-label,
    body.drawer-pinned #lang-switcher-label {
        opacity: 1;
        pointer-events: auto;
    }
    /* On redonne sa largeur et sa marge au texte quand il est visible. */
    body.drawer-hover .drawer-nav .nav-text,
    body.drawer-pinned .drawer-nav .nav-text {
        max-width: 150px; /* Assez grand pour tous les textes */
        margin-left: 12px;
    }

    /* Animation subtile et fluide du libellé vers la droite au survol */
    .drawer-nav li a:hover .nav-text {
        transform: translateX(5px);
    }
}

/* =================================================================== */
/* STYLES POUR LE PIED DE PAGE DU MENU (DRAWER FOOTER)               */
/* =================================================================== */

/* Conteneur principal du pied de page du menu */
.drawer-footer-nav {
    margin-top: auto; /* Pousse le pied de page vers le bas */
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Conteneur pour le sélecteur de langue */
.drawer-footer-nav .language-switcher-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* Espacement pour le label "Langue" */
#lang-switcher-label {
    margin-right: 15px; /* Espace entre le texte et le dropdown */
    color: var(--text-color-secondary);
}

/* Conteneur pour les liens de pied de page (À propos, etc.) */
.drawer-footer-links {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.drawer-footer-links li a {
    display: block;
    padding: 8px 20px;
    text-decoration: none;
    color: var(--text-color-secondary);
    font-size: 0.85rem;
    transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
    border-radius: var(--border-radius);
}

/* Effet de survol cohérent avec le reste du menu */
.drawer-footer-links li a:hover {
    color: var(--text-color-primary);
    /* Le texte se déplace légèrement comme les autres éléments du menu */
    transform: translateX(5px);
}







/* components/user-panel.css */

/* --- Le panneau lui-même --- */
#user-games-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%; /* Largeur du panneau */
    max-width: 420px; /* Plus large pour accueillir confortablement les 5 onglets et les cartes de défi */
    height: 100%;
    background-color: var(--bg-color-dark);
    color: #e0e0e0;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.3);
    z-index: 1251; /* Au-dessus de l'overlay */
    transform: translateX(100%);
    display: flex;
    flex-direction: column;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* --- État ouvert du panneau --- */
body.panel-open #user-games-panel {
    transform: translateX(0);
}

/* --- Overlay (fond sombre) --- */
.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1250;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    pointer-events: none;
}

/* --- État ouvert de l'overlay --- */
body.panel-open .panel-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

/* --- Contenu du panneau --- */
#user-games-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--bg-color-medium);
    border-bottom: 1px solid #333;
    flex-shrink: 0;
}

#user-games-panel .panel-header h3 {
    margin: 0;
    font-size: 1.2em;
    color: #fff;
}

#user-games-panel .close-button {
    background: none;
    border: none;
    color: #fff;
    font-size: 2em;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

#user-games-panel .panel-tabs {
    display: flex;
    flex-shrink: 0;
    background-color: var(--bg-color-medium);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-overflow-scrolling: touch;
}

#user-games-panel .panel-tabs::-webkit-scrollbar {
    display: none;
}

#user-games-panel .tab-link {
    flex: 1 1 0;
    min-width: max-content;
    padding: 13px 8px;
    text-align: center;
    text-decoration: none;
    color: #a0a0a0;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

#user-games-panel .tab-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

#user-games-panel .tab-link.active {
    color: #fff;
    border-bottom-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.06);
}

#user-games-panel .panel-content {
    flex-grow: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
}

@media (max-width: 768px) {
    #user-games-panel {
        max-width: 100vw;
    }
}

/* --- Styles pour les onglets du panneau utilisateur --- */
.panel-games-grid {
    display: none; /* Cache tous les contenus d'onglets par défaut */
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.panel-games-grid.active-tab-content,
.panel-games-grid.active-subtab-view {
    display: grid; /* Affiche seulement le contenu de l'onglet actif */
}

/* Message pour les panneaux vides */
.empty-panel-message {
    text-align: center;
    color: var(--text-color-secondary);
    font-style: italic;
    padding: 20px;
}

.panel-content > div.active-tab-content:not(#my-games-panel-content):not(#quests-panel-content):not(#challenges-panel-content):not(#profile-panel-content) {
    display: grid;
}

#my-games-panel-content.active-tab-content,
#quests-panel-content.active-tab-content,
#challenges-panel-content.active-tab-content,
#profile-panel-content.active-tab-content {
    display: block !important;
}

/* Animation d'apparition en cascade pour les cartes du panneau */
@keyframes card-cascade-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* On cible UNIQUEMENT les cartes de jeu à l'intérieur du panneau utilisateur. */
.panel-open #user-games-panel .game-card {
    opacity: 0;
    animation: card-cascade-fade-in 0.5s ease-out forwards;
}

.panel-open #user-games-panel .panel-games-grid .game-card:nth-child(1) { animation-delay: var(--card-delay-1, 50ms); }
.panel-open #user-games-panel .panel-games-grid .game-card:nth-child(2) { animation-delay: var(--card-delay-2, 100ms); }
.panel-open #user-games-panel .panel-games-grid .game-card:nth-child(3) { animation-delay: var(--card-delay-3, 150ms); }
.panel-open #user-games-panel .panel-games-grid .game-card:nth-child(4) { animation-delay: var(--card-delay-4, 200ms); }
.panel-open #user-games-panel .panel-games-grid .game-card:nth-child(5) { animation-delay: var(--card-delay-5, 250ms); }
.panel-open #user-games-panel .panel-games-grid .game-card:nth-child(6) { animation-delay: var(--card-delay-6, 300ms); }
.panel-open #user-games-panel .panel-games-grid .game-card:nth-child(7) { animation-delay: var(--card-delay-7, 350ms); }
.panel-open #user-games-panel .panel-games-grid .game-card:nth-child(8) { animation-delay: var(--card-delay-8, 400ms); }
.panel-open #user-games-panel .panel-games-grid .game-card:nth-child(9) { animation-delay: var(--card-delay-9, 450ms); }
.panel-open #user-games-panel .panel-games-grid .game-card:nth-child(10) { animation-delay: var(--card-delay-10, 500ms); }







/* components/game-cards.css */

/* --- Conteneurs de grille --- */
.hero-grid-container,
.games-grid {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	width: max-content;
	/* On ajoute le padding ici pour créer une gouttière de départ pour tous les carrousels. */
	padding-left: 0;
	/* Une valeur relative à la largeur de l'écran garantit un débordement constant. */
	padding-right: 5vw;
}

/* --- Cartes de la section Hero --- */
.hero-grid-item {
	background-color: var(--bg-color-medium);
	border-radius: var(--banner-radius, var(--border-radius));
	overflow: hidden;
	-webkit-mask-image: -webkit-linear-gradient(white, white); /* Hack Safari iOS overflow clipper */
	mask-image: linear-gradient(white, white);
	position: relative;
	flex-shrink: 0;
	/* NOUVEAU : Définit le point d'alignement pour le défilement. */
	scroll-snap-align: start;
	/* Animation d'apparition */
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.6s ease-out var(--animation-delay, 0s), transform 0.6s ease-out var(--animation-delay, 0s), box-shadow 0.2s ease 0s, border-radius 0.2s ease 0s;
}
/* CALIBRAGE LCP CORE WEB VITALS : La première bannière Hero est affichée à 100% dès le premier rendu SSR sans attendre JS */
.hero-grid-item:first-child,
.hero-grid-item.large-featured:first-child {
	opacity: 1 !important;
	transform: none !important;
}
.hero-grid-item:hover {
	z-index: 10;
	border-radius: var(--banner-radius-hover, var(--banner-radius, var(--border-radius)));
}
.hero-grid-item a { display: block; text-decoration: none; height: 100%; position: relative; }

/* NOUVEAU : Style unifié pour les images dans les cartes hero pour assurer le remplissage et la transition. */
.hero-grid-item img {
	/* CORRECTION : On positionne l'image en absolu pour qu'elle se superpose correctement à l'effet skeleton. */
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2; /* Assure que l'image est au-dessus de l'effet skeleton */
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1);
	transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-grid-item-title {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(to top, rgba(20, 14, 45, 0.95) 0%, rgba(20, 14, 45, 0.75) 45%, rgba(20, 14, 45, 0) 100%);
	color: #fff;
	padding: 12px 8px 4px 8px;
	font-size: 1rem;
	font-weight: 500;
	font-family: var(--font-title);
	text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
	line-height: 1.25;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    z-index: 2;
}

.hero-grid-item-title.small-title { font-size: 0.7rem; padding: 10px 8px 6px 8px; }

/* Affiche le titre au survol pour les GRANDES cartes de la section hero */
.hero-grid-item.large-featured:hover .hero-grid-item-title {
	opacity: 1;
	transform: translateY(0);
}

/* Affiche le titre UNIQUEMENT au survol des PETITES cartes individuelles */
.small-game:hover .hero-grid-item-title {
	opacity: 1;
	transform: translateY(0);
}

.small-game .hero-grid-item-title {
	font-size: 0.6rem;
}

.small-game:hover {
	opacity: 1;
	transform: translateY(0);
	z-index: 10;
}

/* La grande carte "hero" est calculée pour faire la taille de 2 cartes standards + la gouttière entre elles. */
.hero-grid-item.large-featured {
	width: calc(38vw * 2 + 6px);
	max-width: calc(233px * 2 + 6px); /* 472px */
	aspect-ratio: 16 / 9;
}

/* La colonne de petites cartes "hero" a la même largeur qu'une carte standard. */
.hero-grid-item.small-column {
	width: 38vw;
	max-width: 233px;
	aspect-ratio: 466 / 531;
	display: flex;
	flex-direction: column;
	gap: 6px !important;
	height: auto !important;
	align-self: stretch !important;
	background-color: transparent;
	box-shadow: none;
	border-radius: 0;
	overflow: visible !important;
	mask-image: none !important;
	-webkit-mask-image: none !important;
}
.hero-grid-item.small-column:hover { transform: none; box-shadow: none; }



.small-game {
	flex: 1 1 0 !important;
	min-height: 0 !important;
	aspect-ratio: auto !important;
	background-color: var(--bg-color-medium);
	border-radius: var(--banner-radius, var(--border-radius));
	overflow: hidden;
	position: relative;
	transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.28s cubic-bezier(0.25, 1, 0.5, 1), border-radius 0.2s ease;
	will-change: transform;
}
.small-game:hover {
	border-radius: var(--banner-radius-hover, var(--banner-radius, var(--border-radius)));
	z-index: 10;
}
/* .small-game img { width: 100%; height: 100%; object-fit: cover; } -- Règle maintenant couverte par .hero-grid-item img */

/* --- Cartes de jeu standard --- */
/* NOUVEAU : On utilise une largeur relative au viewport (vw) au lieu d'une largeur fixe en pixels.
   Cette approche garantit que le nombre de cartes affichées n'est pas un nombre entier,
   forçant ainsi une partie de la dernière carte à être visible ("peek-a-boo" effect)
   de manière fiable sur toutes les tailles d'écran, ce qui incite au défilement. */
.landscape-grid .game-card { width: 38vw; max-width: 233px; }
.portrait-grid .game-card { width: 38vw; max-width: 233px; }

.game-card {
	background-color: var(--bg-color-medium);
	border-radius: var(--banner-radius, var(--border-radius));
	overflow: hidden;
	-webkit-mask-image: -webkit-linear-gradient(white, white); /* Hack Safari iOS overflow clipper */
	mask-image: linear-gradient(white, white);
	display: flex;
	flex-direction: column;
	flex: 0 0 auto;
	scroll-snap-align: start;
	/* Animation d'apparition */
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.6s ease-out var(--animation-delay, 0s), transform 0.28s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.28s cubic-bezier(0.25, 1, 0.5, 1), border-radius 0.2s ease 0s, border-color 0.2s ease 0s;
	will-change: transform;
}
.game-card:hover {
	border-radius: var(--banner-radius-hover, var(--banner-radius, var(--border-radius)));
	z-index: 10;
	position: relative;
}
.game-card a { text-decoration: none; display: block; height: 100%; position:relative; }

.game-card .thumbnail {
	width: 100%;
	background-color: var(--bg-color-light);
	overflow: hidden;
	position: relative;
}

/* NOUVEAU: Border overlay universel pour masquer les décalages de sub-pixels et harmoniser l'épaisseur */
.game-card::before,
.hero-grid-item::before,
.small-game::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit;
    border: solid var(--hover-stroke-width, 3px) var(--banner-border-color, transparent);
    z-index: 6; /* Doit être au-dessus de l'image (z-index 2) */
    pointer-events: none;
    transition: border-color 0.2s ease, border-width 0.2s ease, border-radius 0.2s ease;
}

.game-card:hover::before,
.hero-grid-item:hover::before,
.small-game:hover::before {
    border-color: var(--banner-border-color-hover, var(--accent-color));
}

/* La colonne wrapper .small-column n'a pas besoin de ce overlay */
.hero-grid-item.small-column::before {
    display: none;
}

.game-card .thumbnail.landscape { aspect-ratio: 16 / 9; }
.game-card .thumbnail.portrait { aspect-ratio: 2 / 3; }
.game-card .thumbnail.square { aspect-ratio: 1 / 1; }

.game-card .thumbnail img {
	opacity: 0;
	transition: opacity 0.4s ease-in-out, transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	/* CORRECTION : On positionne l'image en absolu pour qu'elle remplisse le conteneur .thumbnail,
	   qui a déjà la bonne taille grâce à `aspect-ratio`. Cela réserve l'espace et empêche le saut de page (CLS). */
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2; /* NOUVEAU : S'assure que l'image est au-dessus de l'effet skeleton */
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	will-change: transform;
}

.game-card .thumbnail img[fetchpriority="high"],
.game-card .thumbnail img:not([loading="lazy"]) {
	opacity: 1 !important;
}

/* NOUVEAU : Effet Skeleton (Shimmer) pour les conteneurs d'images */
/* CORRECTION : On exclut la carte CTA "Voir tout" qui n'a pas d'image. */
/* CORRECTION 2 : On cible les éléments spécifiques qui contiennent des images (grand hero, petit hero, cartes de jeu)
   au lieu du conteneur générique .hero-grid-item pour éviter d'appliquer l'effet à la colonne. */
.game-card:not(.recent-cta-card) .thumbnail::after,
.hero-grid-item.large-featured::after,
.small-game::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1; /* NOUVEAU : Positionne l'effet skeleton derrière l'image */
    width: 100%;
    height: 100%;
    background-image: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 40%,
        rgba(255, 255, 255, 0.08) 60%,
        transparent 100%
    );
    background-repeat: no-repeat;
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    /* Cet effet sera masqué par l'image une fois chargée (img.is-loaded) */
}


/* L'image devient visible une fois chargée (classe ajoutée par JS). */
.thumbnail img.is-loaded { opacity: 1; }

/* Arrêt de l'animation skeleton et neutralisation du fond pour éliminer les fuites de pixels */
.thumbnail:has(img.is-loaded)::after {
    display: none !important;
}

.thumbnail:has(img.is-loaded) {
    background-color: transparent !important;
}

/* Zoom interne doux par défaut si la carte n'est pas agrandie au premier plan */
.game-card:not(.is-card-expanded):hover .thumbnail img,
.hero-grid-item:not(.is-card-expanded):hover .thumbnail img,
.hero-grid-item.large-featured:not(.is-card-expanded):hover img,
.small-game:not(.is-card-expanded):hover img {
	transform: scale(1.06);
}

.game-card-title,
.game-card-info {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(to top, rgba(20, 14, 45, 0.95) 0%, rgba(20, 14, 45, 0.75) 45%, rgba(20, 14, 45, 0) 100%);
	color: #fff;
	padding: 12px 8px 4px 8px;
	font-family: var(--font-title);
	font-size: 0.8rem;
	font-weight: 500;
	text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	border-bottom: 0;
	margin-bottom: 0;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.25s ease-out, transform 0.25s ease-out;
    z-index: 2;
}

.game-card:hover .game-card-title,
.game-card:hover .game-card-info {
	opacity: 1;
	transform: translateY(0);
}

/* --- Cartes de jeu "Similaires" (sidebar) --- */
.related-games-grid { display: flex; flex-direction: column; gap: 10px; }
.related-game-card { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--border-radius); text-decoration: none; transition: background-color 0.2s; }
.related-game-card:hover { background-color: var(--bg-color-light); }
.related-game-card .thumbnail { width: 100px; height: 65px; flex-shrink: 0; }
.related-game-card .thumbnail img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.related-game-card .game-info h4 { margin: 0 0 5px 0; color: var(--text-color-primary); font-size: 0.9rem; }
.related-game-card .game-info p { margin: 0; color: var(--text-color-secondary); font-size: 0.8rem; }

/* --- Visibilité des titres sur appareils tactiles --- */
@media (pointer: coarse) {
	.game-card-title,
	.hero-grid-item-title {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Lorsque JS ajoute la classe .is-visible, on fait apparaître l'élément avec transition fluide. */
.game-card.is-visible,
.hero-grid-item.is-visible,
.small-game.is-visible {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.6s ease-out var(--animation-delay, 0s), 
	            transform 0.28s cubic-bezier(0.25, 1, 0.5, 1), 
	            box-shadow 0.28s cubic-bezier(0.25, 1, 0.5, 1);
	will-change: transform;
}

/* --- Effet Agrandissement de Carte façon CrazyGames & Netflix --- */
@media (hover: hover) and (pointer: fine) {
    /* Débridage du débordement pour les carrousels de genres visibles */
    .carousel-section-wrapper.is-visible,
    .js-enabled .carousel-section-wrapper:not(#hero-section).is-visible {
        overflow: visible !important;
    }

    /* Élévation prioritaire de la rangée active au-dessus de TOUTES les sections sœurs */
    .carousel-section-wrapper.has-active-card,
    .carousel-section-wrapper:has(.is-card-expanded),
    .carousel-container.has-active-card,
    .game-grid-section.has-active-card {
        z-index: 100 !important;
        position: relative !important;
    }

    /* Rail du carrousel avec espace de dégagement vertical pour éviter tout rognage */
    .carousel-wrapper {
        padding-top: 38px !important;
        padding-bottom: 38px !important;
        margin-top: -38px !important;
        margin-bottom: -38px !important;
        pointer-events: none !important;
    }
    .carousel-wrapper > *,
    .carousel-wrapper .game-card {
        pointer-events: auto !important;
    }
    .carousel-wrapper.is-dragging,
    .carousel-wrapper.is-dragging * {
        cursor: grabbing !important;
        user-select: none !important;
        -webkit-user-select: none !important;
    }

    /* Carte active agrandie au premier plan (Universel pour Hero, Carrousels, Grilles) */
    .game-card.is-card-expanded,
    .small-game.is-card-expanded {
        transform: scale(1.20) translateZ(0) !important;
        z-index: 80 !important;
        box-shadow: 0 14px 32px rgba(0, 0, 0, 0.75), 0 4px 12px rgba(0, 0, 0, 0.45), 0 0 20px rgba(112, 87, 224, 0.3) !important;
    }

    .game-card.portrait-card.is-card-expanded,
    .portrait-grid .game-card.is-card-expanded {
        transform: scale(1.16) translateZ(0) !important;
    }

    .hero-grid-item.large-featured.is-card-expanded {
        transform: scale(1.06) translateZ(0) !important;
        z-index: 80 !important;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8), 0 0 25px rgba(112, 87, 224, 0.35) !important;
    }

    /* Neutralisation du zoom interne sur l'image quand la carte entière s'agrandit */
    .game-card.is-card-expanded .thumbnail img,
    .small-game.is-card-expanded img,
    .hero-grid-item.large-featured.is-card-expanded img {
        transform: scale(1) !important;
    }

    .game-card.is-card-expanded .game-card-title,
    .small-game.is-card-expanded .hero-grid-item-title,
    .hero-grid-item.large-featured.is-card-expanded .hero-grid-item-title {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}


/* NOUVEAU : Animation pour l'effet Skeleton */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* --- Lecteur vidéo d'aperçu au survol (Hover Video Preview) --- */
.preview-video-player {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 3;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.25s ease-in;
	border-radius: inherit;
}
.preview-video-player.is-visible {
	opacity: 1;
}
.game-card-title,
.hero-grid-item-title {
	z-index: 4;
}
.game-card .favorite-toggle-button,
.hero-grid-item .favorite-toggle-button {
	z-index: 5;
}

/* --- Conteneur de l'input et de l'icône --- */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* --- Barre de recherche --- */
.drawer-search-bar-mobile input[type="search"] {
    width: 100%;
    padding: 8px 40px 8px 15px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    border-color: var(--search-input-border, var(--border-color));
    background-color: var(--bg-color-light);
    color: var(--text-color-primary);
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.drawer-search-bar-mobile input[type="search"]::placeholder {
    color: var(--text-color-secondary);
}

/* --- Effet de focus --- */
.drawer-search-bar-mobile input[type="search"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-color-hover-shade);
}

/* --- Icône de recherche --- */
.search-icon {
    position: absolute;
    right: 15px;
    color: var(--text-color-secondary);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.drawer-search-bar-mobile input[type="search"]:focus + .search-icon {
    color: var(--accent-color-hover);
}

/* --- Conteneur des résultats --- */
.search-results-container {
    display: none; /* Caché par défaut */
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background-color: var(--bg-color-dark);
    border: 1px solid var(--accent-color-hover);
    border-top: none;
    border-radius: var(--border-radius);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.search-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-color-primary);
    transition: background-color 0.2s ease-in-out;
}

.search-result-item:hover {
    background-color: var(--bg-color-medium);
    cursor: pointer;
    border-radius: var(--border-radius);
}

.search-result-image {
    width: 80px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
    flex-shrink: 0;
}

.search-result-title {
    font-weight: 500;
    font-size: 1.2rem;
    line-height: 1.2;
}

.search-result-item.no-results-link {
    justify-content: center;
    font-style: italic;
    font-weight: 500;
    font-size: 1.2rem;
}

.search-result-see-all {
    justify-content: center;

}

.search-result-see-all:hover {
    justify-content: center;
    /* Cette règle est maintenant inutile car elle est déjà gérée par le sélecteur partagé plus haut */
}

/* --- Scrollbar des résultats --- */
.search-results-container::-webkit-scrollbar { width: 8px; }
.search-results-container::-webkit-scrollbar-track { background: transparent; }
.search-results-container::-webkit-scrollbar-thumb { background: var(--bg-color-light); border-radius: 4px; }
.search-results-container::-webkit-scrollbar-thumb:hover { background: var(--accent-color); }

/* =================================================================== */
/* STYLE POUR LE MESSAGE D'ÉCHEC DE RECHERCHE (more-games.html)      */
/* =================================================================== */
/* STYLE POUR L'ÉTAT VIDE DE RECHERCHE (Search Empty State Redesign)  */
/* =================================================================== */

.search-empty-container {
    width: 100%;
    margin: 0 auto;
    padding: 24px var(--page-padding, 12px) 16px var(--page-padding, 12px);
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .search-empty-container {
        padding: 36px 24px 24px 24px;
    }
}

@media (min-width: 1200px) {
    .search-empty-container {
        padding: 44px 36px 28px 36px;
    }
}

/* Hero Empty State Card */
.search-empty-card {
    position: relative;
    max-width: 840px;
    margin: 0 auto;
    padding: 40px 24px 34px 24px;
    border-radius: 24px;
    text-align: center;
    overflow: hidden;
    box-sizing: border-box;
    background: linear-gradient(165deg, rgba(34, 34, 53, 0.88) 0%, rgba(24, 24, 40, 0.96) 100%);
    border: 1px solid rgba(190, 175, 255, 0.18);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 40px rgba(112, 87, 224, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Halo doux animé en arrière-plan */
.search-empty-glow-orb {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 180px;
    background: radial-gradient(ellipse at center, var(--accent-color, #7057e0) 0%, transparent 70%);
    opacity: 0.25;
    filter: blur(40px);
    pointer-events: none;
    animation: floatSearchGlow 4s infinite alternate ease-in-out;
}

@keyframes floatSearchGlow {
    0% { transform: translateX(-50%) scale(0.9); opacity: 0.2; }
    100% { transform: translateX(-50%) scale(1.15); opacity: 0.35; }
}

/* Icône loupe + manette flottante */
.search-empty-icon-wrap {
    display: inline-flex;
    justify-content: center;
    margin-bottom: 18px;
    position: relative;
}

.search-empty-icon-circle {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    animation: emptyFloat 3s infinite ease-in-out;
}

.search-icon-svg {
    stroke: var(--accent-color, #beafff);
    filter: drop-shadow(0 4px 10px rgba(112, 87, 224, 0.45));
}

.search-empty-gamepad-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    font-size: 22px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
    animation: gamepadWiggle 2.5s infinite ease-in-out;
}

@keyframes emptyFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes gamepadWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-8deg); }
    75% { transform: rotate(8deg); }
}

/* Titre & Pilule de la requête */
.search-empty-title {
    font-family: var(--font-title, 'Poppins', sans-serif);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-color-primary, #ffffff);
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .search-empty-title {
        font-size: 2.1rem;
    }
}

.search-query-badge-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.search-query-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: rgba(112, 87, 224, 0.12);
    border: 1px solid rgba(190, 175, 255, 0.25);
    border-radius: 999px;
    font-size: 0.95rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.search-query-pill .pill-label {
    color: var(--text-color-secondary, #a8a8c0);
    font-size: 0.85rem;
}

.search-query-pill .pill-query {
    color: var(--accent-color, #beafff);
    font-weight: 800;
}

.search-empty-subtitle {
    max-width: 620px;
    margin: 0 auto 26px auto;
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text-color-secondary, #a8a8c0);
}

/* Barre de rattrapage In-Page */
.search-recovery-form {
    max-width: 580px;
    margin: 0 auto 26px auto;
    width: 100%;
}

.search-recovery-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(15, 15, 26, 0.88);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 6px 8px 6px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-recovery-input-wrap:focus-within {
    border-color: var(--accent-color, #7057e0);
    box-shadow: 0 8px 28px rgba(112, 87, 224, 0.25);
}

.search-recovery-icon {
    color: var(--text-color-secondary, #a8a8c0);
    margin-right: 12px;
    flex-shrink: 0;
}

.search-recovery-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    min-width: 0;
}

.search-recovery-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.search-recovery-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-color, #7057e0);
    color: #140e2d !important;
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.search-recovery-submit:hover {
    background: var(--accent-color-hover, #8870f0);
    color: #140e2d !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(112, 87, 224, 0.4);
}

@media (max-width: 540px) {
    .search-recovery-input-wrap {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 10px;
    }
    .search-recovery-submit {
        justify-content: center;
        width: 100%;
    }
}

/* Quick Tags d'exploration */
.search-quick-tags {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.quick-tags-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-color-secondary, #a8a8c0);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.quick-tags-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.quick-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 15px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: var(--text-color-primary, #ffffff);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.quick-tag-chip:hover {
    background: var(--accent-color, #7057e0);
    border-color: var(--accent-color, #7057e0);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

/* Carrousels de secours : respiration et espacement */
.search-failed-carousels {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
    margin-top: 8px;
    margin-bottom: 48px;
}

.search-failed-carousels .game-grid-section {
    margin: 0 !important;
}

/* Rétro-compatibilité */
.search-failed-message {
    display: none;
}







/* --- Composants spécifiques à la section "Joué Récemment" --- */

/* NOUVEAU : Ajout d'un padding vertical pour donner de l'air à la section,
   maintenant qu'elle n'a plus de titre. */
.recent-games-strip {
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    min-height: 90px !important;
}

/* La grille utilise maintenant le composant de carrousel standard.
   Les styles de défilement manuel et de scrollbar sont donc retirés. */
.recent-games-grid {
    /* display: flex, flex-wrap: nowrap, et gap sont hérités de .games-grid.
       On s'assure que les éléments sont alignés correctement si leur hauteur varie. */
    align-items: stretch;
}

/* Styles pour les cartes de jeu de petite taille, spécifiques à cette section */
.game-card--small {
    flex: 0 0 98px;
    width: 98px;
    max-width: 98px;
}

/* NOUVEAU : On agrandit la carte CTA pour une meilleure lisibilité. */
.game-card--small.recent-cta-card,
.recent-cta-card.desktop-only-cta {
    flex: 0 0 140px;
    min-width: 140px;
    max-height: 56px;
}

/* =================================================================== */
/* VITRINES THÉMATIQUES DESKTOP : CASSER LA MONOTONIE DU SCROLL        */
/* Rails & Étagères Panoramiques (CrazyGames & Poki Style)              */
/* =================================================================== */

.carousel-content {
    align-items: flex-start !important;
}
.carousel-content .game-card {
    height: auto !important;
    align-self: flex-start !important;
}

.shelf-container {
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: var(--page-padding, 10px) !important;
    padding-right: var(--page-padding, 10px) !important;
}

#related-games-sidebar .shelf-container,
#related-games-sidebar .mobile-category-shelf,
#related-games-sidebar .mobile-shelf-island {
    display: none !important;
}

.mobile-category-shelf,
.mobile-shelf-island {
    display: block !important;
    width: 100% !important;
    margin: 32px 0 !important;
    padding: 22px 24px !important;
    border-radius: 20px !important;
    box-sizing: border-box !important;
    background: linear-gradient(135deg, rgba(25, 28, 48, 0.95), rgba(15, 17, 30, 0.98)) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35) !important;
    backdrop-filter: blur(12px) !important;
    grid-column: 1 / -1 !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Fonds dégradés thématiques et bordures lumineuses distinctes (Palette Néon Arcade) */
.mobile-shelf-island[data-shelf-theme="achievements"],
.mobile-category-shelf[data-shelf-theme="achievements"] {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(180, 83, 9, 0.12) 40%, rgba(24, 16, 8, 0.96) 100%) !important;
    border-color: rgba(251, 191, 36, 0.35) !important;
    box-shadow: 0 10px 32px rgba(245, 158, 11, 0.22) !important;
}

.mobile-shelf-island[data-shelf-theme="2-players"],
.mobile-category-shelf[data-shelf-theme="2-players"] {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.30) 0%, rgba(159, 18, 57, 0.14) 45%, rgba(26, 10, 16, 0.96) 100%) !important;
    border-color: rgba(248, 113, 113, 0.35) !important;
    box-shadow: 0 10px 32px rgba(239, 68, 68, 0.24) !important;
}

.mobile-shelf-island[data-shelf-theme="thinking"],
.mobile-category-shelf[data-shelf-theme="thinking"],
.mobile-shelf-island[data-shelf-theme="puzzle"],
.mobile-category-shelf[data-shelf-theme="puzzle"] {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.28) 0%, rgba(14, 116, 144, 0.12) 45%, rgba(8, 22, 34, 0.96) 100%) !important;
    border-color: rgba(34, 211, 238, 0.35) !important;
    box-shadow: 0 10px 32px rgba(6, 182, 212, 0.22) !important;
}

.mobile-shelf-island[data-shelf-theme="leaderboards"],
.mobile-category-shelf[data-shelf-theme="leaderboards"],
.mobile-shelf-island[data-shelf-theme="leaderboard"],
.mobile-category-shelf[data-shelf-theme="leaderboard"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(5, 150, 105, 0.12) 45%, rgba(8, 30, 20, 0.96) 100%) !important;
    border-color: rgba(52, 211, 153, 0.35) !important;
    box-shadow: 0 10px 32px rgba(16, 185, 129, 0.22) !important;
}

.mobile-shelf-island[data-shelf-theme="brick-breaker"],
.mobile-category-shelf[data-shelf-theme="brick-breaker"],
.mobile-shelf-island[data-shelf-theme="breaker"],
.mobile-category-shelf[data-shelf-theme="breaker"] {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(217, 119, 6, 0.14) 45%, rgba(32, 16, 8, 0.96) 100%) !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
    box-shadow: 0 10px 32px rgba(245, 158, 11, 0.22) !important;
}

.mobile-shelf-island[data-shelf-theme="cards"],
.mobile-category-shelf[data-shelf-theme="cards"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(6, 95, 70, 0.14) 45%, rgba(8, 26, 18, 0.96) 100%) !important;
    border-color: rgba(52, 211, 153, 0.35) !important;
    box-shadow: 0 10px 32px rgba(16, 185, 129, 0.22) !important;
}

.mobile-shelf-island[data-shelf-theme="action"],
.mobile-category-shelf[data-shelf-theme="action"] {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.30) 0%, rgba(109, 40, 217, 0.14) 45%, rgba(20, 12, 36, 0.96) 100%) !important;
    border-color: rgba(167, 139, 250, 0.35) !important;
    box-shadow: 0 10px 32px rgba(139, 92, 246, 0.22) !important;
}

.mobile-shelf-island[data-shelf-theme="race"],
.mobile-category-shelf[data-shelf-theme="race"] {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.30) 0%, rgba(194, 65, 12, 0.14) 45%, rgba(30, 12, 6, 0.96) 100%) !important;
    border-color: rgba(251, 146, 60, 0.35) !important;
    box-shadow: 0 10px 32px rgba(249, 115, 22, 0.24) !important;
}

.mobile-shelf-island[data-shelf-theme="sport"],
.mobile-category-shelf[data-shelf-theme="sport"] {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.30) 0%, rgba(21, 128, 61, 0.14) 45%, rgba(8, 28, 14, 0.96) 100%) !important;
    border-color: rgba(74, 222, 128, 0.35) !important;
    box-shadow: 0 10px 32px rgba(34, 197, 94, 0.22) !important;
}

.mobile-shelf-island[data-shelf-theme="zombie"],
.mobile-category-shelf[data-shelf-theme="zombie"] {
    background: linear-gradient(135deg, rgba(132, 204, 22, 0.30) 0%, rgba(77, 124, 15, 0.14) 45%, rgba(18, 28, 6, 0.96) 100%) !important;
    border-color: rgba(163, 230, 53, 0.35) !important;
    box-shadow: 0 10px 32px rgba(132, 204, 22, 0.22) !important;
}

.mobile-category-shelf .shelf-header,
.mobile-shelf-island .shelf-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 16px !important;
    padding: 0 2px !important;
}
.mobile-category-shelf .shelf-title-wrap,
.mobile-shelf-island .shelf-title-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}
.mobile-category-shelf .shelf-icon,
.mobile-shelf-island .shelf-icon {
    font-size: 26px !important;
    line-height: 1 !important;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5)) !important;
}
.mobile-category-shelf .shelf-title,
.mobile-shelf-island .shelf-title {
    font-family: var(--font-title, sans-serif) !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0 !important;
    letter-spacing: -0.3px !important;
}

.shelf-container:hover,
.shelf-container:focus-within,
.mobile-category-shelf:hover,
.mobile-category-shelf:focus-within,
.shelf-container:has(.is-card-expanded),
.mobile-category-shelf:has(.is-card-expanded),
.mobile-shelf-island:has(.is-card-expanded),
.shelf-container.has-active-card,
.mobile-category-shelf.has-active-card,
.mobile-shelf-island.has-active-card {
    z-index: 100 !important;
    position: relative !important;
}

.shelf-carousel-container.carousel-container {
    position: relative !important;
    width: 100% !important;
}

.shelf-carousel-container.carousel-container .scroll-button {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    height: 56px !important;
    width: 44px !important;
    border-radius: 14px !important;
    z-index: 120 !important;
    background-color: var(--accent-color-hover-shade, rgba(15, 20, 35, 0.85)) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
}

@media (hover: hover) and (pointer: fine) {
    .shelf-carousel-container.carousel-container.has-overflow:hover .scroll-button:not(.disabled),
    .shelf-carousel-container.carousel-container:hover .scroll-button:not(.disabled) {
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

/* Rail étendu sur toute la largeur avec bleed horizontal pour supprimer toute découpe prématurée */
.mobile-category-shelf .shelf-track-wrapper,
.mobile-shelf-island .shelf-track-wrapper {
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    padding-top: 48px !important;
    padding-bottom: 48px !important;
    margin-top: -44px !important;
    margin-bottom: -44px !important;
    margin-left: -24px !important;
    margin-right: -24px !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    scroll-padding-left: 24px !important;
    scroll-padding-right: 24px !important;
    pointer-events: none !important;
}
.mobile-category-shelf .shelf-track-wrapper::-webkit-scrollbar,
.mobile-shelf-island .shelf-track-wrapper::-webkit-scrollbar {
    display: none !important;
}
.mobile-category-shelf .shelf-track-wrapper > *,
.mobile-shelf-island .shelf-track-wrapper > * {
    pointer-events: auto !important;
}
.mobile-category-shelf .shelf-track,
.mobile-shelf-island .shelf-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
    width: max-content !important;
}
/* Extrait vidéo mobile pour affiches portrait : masqué par défaut sur desktop */
.shelf-portrait-mobile-video,
.shelf-portrait-video-badge {
    display: none !important;
}

/* Agrandissement des cartes portrait à 160px sur Desktop pour un vrai rendu poster */
.mobile-category-shelf .shelf-portrait-card,
.mobile-shelf-island .shelf-portrait-card {
    flex: 0 0 160px !important;
    width: 160px !important;
    max-width: 160px !important;
    cursor: pointer !important;
    position: relative !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 18px !important;
    overflow: visible !important;
}

/* Stroke universel 3px harmonisé sur les cartes portrait 3:4 */
.mobile-category-shelf .shelf-portrait-card::before,
.mobile-shelf-island .shelf-portrait-card::before {
    display: block !important;
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border-radius: 18px !important;
    border: solid var(--hover-stroke-width, 3px) transparent !important;
    z-index: 26 !important;
    pointer-events: none !important;
    transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
}

.mobile-category-shelf .shelf-portrait-card:hover::before,
.mobile-shelf-island .shelf-portrait-card:hover::before,
.shelf-portrait-card.is-card-expanded::before {
    border-color: var(--banner-border-color-hover, var(--accent-color)) !important;
}

/* Hover doux UNIQUEMENT si la carte n'est pas encore passée en mode vidéo active agrandie */
.mobile-category-shelf .shelf-portrait-card:hover:not(.is-card-expanded),
.mobile-shelf-island .shelf-portrait-card:hover:not(.is-card-expanded) {
    transform: translateY(-4px) scale(1.02) !important;
    z-index: 20 !important;
}

/* Expansion complète à 1.18 avec glow néon violet lors de l'activation vidéo */
.shelf-portrait-card.is-card-expanded,
.mobile-category-shelf .shelf-portrait-card.is-card-expanded,
.mobile-shelf-island .shelf-portrait-card.is-card-expanded {
    transform: scale(1.18) translateZ(0) !important;
    z-index: 95 !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8), 0 0 24px rgba(112, 87, 224, 0.45) !important;
    border-radius: 18px !important;
}

/* Neutralisation du zoom interne sur l'affiche en mode étendu */
.shelf-portrait-card.is-card-expanded .thumbnail img {
    transform: scale(1) !important;
}
.mobile-category-shelf .shelf-portrait-card .thumbnail,
.mobile-shelf-island .shelf-portrait-card .thumbnail {
    aspect-ratio: 220 / 329 !important;
    width: 100% !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    position: relative !important;
    background: transparent !important;
    isolation: isolate;
}

/* Bouton favori coeur sur cartes portrait desktop */
.shelf-portrait-card .favorite-toggle-button {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 25 !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background-color: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease !important;
}
.shelf-portrait-card .favorite-toggle-button svg {
    width: 18px !important;
    height: 18px !important;
}
.shelf-portrait-card .favorite-toggle-button:hover {
    background-color: rgba(0, 0, 0, 0.75) !important;
    border-color: var(--accent-color, #7057e0) !important;
    transform: scale(1.12) !important;
}
.mobile-category-shelf .shelf-portrait-card .thumbnail img,
.mobile-shelf-island .shelf-portrait-card .thumbnail img {
    aspect-ratio: 220 / 329 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 18px !important;
    transition: transform 0.3s ease !important;
}
.mobile-category-shelf .shelf-portrait-card:hover .thumbnail img,
.mobile-shelf-island .shelf-portrait-card:hover .thumbnail img {
    transform: scale(1.06) !important;
}
.mobile-category-shelf .shelf-portrait-card .game-card-title,
.mobile-category-shelf .shelf-portrait-card .game-info,
.mobile-shelf-island .shelf-portrait-card .game-card-title,
.mobile-shelf-island .shelf-portrait-card .game-info {
    display: none !important;
}

.game-card--small .thumbnail .game-card-title {
    font-size: 0.8rem;
    padding: 4px 6px;
}

/* Styles pour la carte spéciale "CTA" (Call To Action) - Harmonisée avec le Design System */
.game-card--small.recent-cta-card,
.recent-cta-card.desktop-only-cta {
    flex: 0 0 140px;
    min-width: 140px;
    height: 56px;
    align-self: center;
    border-radius: var(--border-radius, 8px);
}

.recent-cta-card a {
    display: block;
    height: 100%;
    width: 100%;
    text-decoration: none !important;
    color: inherit !important;
    outline: none;
}

.recent-cta-card .thumbnail {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--border-radius, 8px);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 14px;
    box-sizing: border-box;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none !important;
}

.recent-cta-card .thumbnail span {
    font-family: var(--font-title, sans-serif);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color-primary);
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.recent-cta-card .arrow-right {
    width: 18px;
    height: 18px;
    fill: var(--text-color-secondary);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), fill 0.2s ease;
    flex-shrink: 0;
}

.recent-cta-card a:hover .thumbnail {
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--accent-color);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4), 0 0 12px var(--accent-color-hover-shade);
    transform: translateY(-2px);
}

.recent-cta-card a:hover .thumbnail span {
    color: #ffffff;
    text-decoration: none !important;
}

.recent-cta-card a:hover .arrow-right {
    fill: var(--accent-color);
    transform: translateX(4px);
}







/* components/buttons.css */

/* =================================================================== */
/* BOUTONS D'ACTION DE BASE                                          */
/* =================================================================== */
.action-button { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center;
    gap: 6px; 
    background-color: var(--bg-color-light); 
    color: var(--action-button-text-color, var(--text-color-primary)); 
    border: var(--action-button-border, 1px solid transparent); 
    border-radius: var(--border-radius); 
    padding: 8px 15px; 
    font-size: 0.9rem; 
    font-weight: 500; 
    cursor: pointer; 
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out; 
}
.action-button:hover { 
    background-color: var(--bg-color-light); 
    border-color: var(--accent-color-hover); 
}

/* =================================================================== */
/* BOUTONS DE DÉFILEMENT DU CARROUSEL (FORMAT PILULE FLOTTANTE CENTRÉE) */
/* =================================================================== */
.carousel-container {
    position: relative !important;
}

.scroll-button {
    position: absolute !important; 
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
    height: 56px !important;
    background-color: var(--accent-color-hover-shade, rgba(15, 20, 35, 0.85)) !important; 
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 14px !important;
    text-align: center !important;
    cursor: pointer !important;
    z-index: 120 !important; 
    opacity: 0 !important; 
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    transition: opacity 0.25s ease, background-color 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease !important;
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    pointer-events: none !important;
}

.scroll-button::after {
    content: '' !important;
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EFF1F2' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    transition: transform 0.2s ease !important;
}

.scroll-button.prev::after {
    transform: scaleX(-1) !important;
}

.scroll-button.prev {
    left: var(--scroll-button-offset, 8px) !important;
}

.scroll-button.next {
    right: var(--scroll-button-offset, 8px) !important;
}

/* Apparition au survol lorsque le carrousel peut défiler */
@media (hover: hover) and (pointer: fine) {
    .carousel-container.has-overflow:hover .scroll-button:not(.disabled),
    .carousel-container:hover .scroll-button:not(.disabled) { 
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

.scroll-button:hover:not(.disabled) { 
    background-color: var(--accent-color, #7057e0) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    transform: translateY(-50%) scale(1.08) !important;
    box-shadow: 0 10px 28px rgba(112, 87, 224, 0.5), 0 4px 10px rgba(0, 0, 0, 0.5) !important;
}

.scroll-button.disabled { 
    opacity: 0 !important;
    pointer-events: none !important;
    cursor: default !important; 
}

/* =================================================================== */
/* BOUTON FAVORI                                                     */
/* =================================================================== */
.favorite-toggle-button {
    cursor: pointer;
}
.favorite-toggle-button svg {
    fill: currentColor;
    transition: fill 0.2s, transform 0.2s;
}

.favorite-toggle-button:not(.is-favorite) svg path {
    fill: transparent !important;
    stroke: currentColor !important;
    stroke-width: 1.5px !important;
}


.game-card .favorite-toggle-button,
.hero-grid-item .favorite-toggle-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 50%;
    color: #fff;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}
.game-card .favorite-toggle-button svg,
.hero-grid-item .favorite-toggle-button svg {
    width: 20px;
    height: 20px;
}
.game-card .favorite-toggle-button:hover,
.hero-grid-item .favorite-toggle-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
    border-color: var(--accent-color);
    transform: scale(1.1);
}

/* Style de base pour un bouton favori actif (ex: juste du texte) */
.favorite-toggle-button.is-favorite {
    color: var(--accent-color);
}

/* Style pour les boutons favoris qui ont un fond (sur les cartes, dans le header, etc.) */
.game-card .favorite-toggle-button.is-favorite,
.hero-grid-item .favorite-toggle-button.is-favorite,
.header-icon-button.favorite-toggle-button.is-favorite,
.action-button.favorite-toggle-button.is-favorite {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

/* Style de survol pour ces mêmes boutons */
.game-card .favorite-toggle-button.is-favorite:hover,
.hero-grid-item .favorite-toggle-button.is-favorite:hover,
.header-icon-button.favorite-toggle-button.is-favorite:hover,
.action-button.favorite-toggle-button.is-favorite:hover {
    background-color: var(--accent-color-hover);
    border-color: var(--accent-color-hover);
}

/* Style pour le bouton favori dans la barre d'actions de la page de jeu */
.game-actions-bar .favorite-toggle-button.action-button {
    position: static;
    transform: none;
    width: auto;
    height: auto;
    padding: 8px 12px;
    border-radius: 6px;
    border-width: 1px;
    border-style: solid;
}

/* NOUVEAU : Définir la taille de l'icône SVG pour qu'elle corresponde aux autres icônes de la barre. */
.game-actions-bar .favorite-toggle-button.action-button svg {
    width: 20px;
    height: 20px;
}

.game-actions-bar .favorite-toggle-button.action-button.is-favorite {
    border-color: var(--accent-color);
}

/* =================================================================== */
/* SECTION TÉLÉCHARGEMENT APPLICATION / STORES                        */
/* =================================================================== */
#download-app,
.game-details-section#download-app {
    margin-top: 36px !important;
    margin-bottom: 28px !important;
    padding: 24px 28px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 18px !important;
    box-sizing: border-box !important;
}
#download-app h2 {
    margin-top: 0 !important;
    margin-bottom: 16px !important;
    font-family: var(--font-title, sans-serif) !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}

/* =================================================================== */
/* BADGES DES STORES D'APPLICATIONS                                  */
/* =================================================================== */
.download-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 15px;
    align-items: center;
	background-color: var(--bg-color-dark);
    border-radius: var(--border-radius);
    border: 1px dashed var(--border-color);
    line-height: 0;
    padding: 8px 0 8px 0;
	justify-content: center;
}
.store-badge img {
    height: 45px;
    transition: opacity 0.2s ease-in-out;
}
.store-badge:hover img {
    opacity: 0.85;
}

/* --- TRÈS GRANDS ÉCRANS (> 1800px) --- */
@media (min-width: 1280px) {
    .download-buttons-container {
        background-color: var(--bg-color-medium);
    }
}

/* =================================================================== */
/* BOUTON "CHARGER PLUS"                                             */
/* =================================================================== */
.load-more-container {
    display: flex;
    justify-content: center;
    padding: 40px 0 20px 0;
}
#load-more-button {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
}
#load-more-button:disabled {
    background-color: var(--bg-color-light);
    cursor: wait;
    opacity: 0.7;
}

/* =================================================================== */
/* BOUTON "RETOUR EN HAUT"                                           */
/* =================================================================== */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    padding: 10px 15px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: none; /* Caché par défaut, géré par JS */
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}
.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-to-top:hover { background-color: var(--accent-color-hover); }
.scroll-to-top.bouncing { animation: bounce 1s ease; }

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}







/* components/modal.css */

.modal-overlay {
    display: none; /* Caché par défaut */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    /* NOUVEAU : Ajout du padding et du défilement pour les petits écrans */
    padding: 20px 0;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background-color: var(--bg-color-dark);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 600px;
    animation: fadeIn 0.3s ease-out;
    animation: animatetop 0.4s;
    /* NOUVEAU : Gestion de la hauteur et du défilement interne */
    display: flex;
    flex-direction: column;
    max-height: 90vh; /* Limite la hauteur à 90% de la hauteur de la vue */
}

@keyframes animatetop {
    from {transform: translateY(-50px); opacity: 0}
    to {transform: translateY(0); opacity: 1}
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-family: var(--font-title);
    font-size: 1.2rem;
}

.modal-close-button {
    background-color: var(--bg-color-medium);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-color-secondary);
    transition: all 0.2s ease;
}
.modal-close-button:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}
.modal-body p {
    font-size: 0.9rem;
    color: var(--text-color-secondary);
    margin-top: 0;
}

#embed-code-textarea {
    width: 100%;
    height: 120px;
    background-color: var(--bg-color-dark);
    border: 1px solid var(--border-color);
    color: var(--text-color-primary);
    border-radius: var(--border-radius);
    padding: 10px;
    font-family: monospace;
    font-size: 0.85rem;
    resize: none;
    margin-bottom: 15px;
}

#copy-embed-code {
    width: 100%;
    padding: 12px;
}

/* NOUVEAU : Style pour le conteneur du QR Code dans la modale */
#qr-code-container {
    display: inline-block; /* Permet le centrage via text-align sur le parent */
    padding: 10px;
    background-color: white;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}
#qr-code-container img {
    display: block; /* Supprime l'espace parfois ajouté sous les images */
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* NOUVEAU : Styles pour le contenu de la modale "À Propos" */
#about-modal .modal-body h4 {
    font-family: var(--font-title);
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--text-color-primary);
}
#about-modal .modal-body h4:first-child {
    margin-top: 0;
}
#about-modal .modal-body p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color-secondary);
    margin-bottom: 15px;
}
/* NOUVEAU : Style pour les liens dans les paragraphes de la modale "À Propos" */
#about-modal .modal-body p a {
    color: var(--accent-color);
    text-decoration: none; /* MODIFIÉ : Pas de soulignement par défaut */
    font-weight: 500;
    transition: color 0.2s, text-decoration 0.2s;
}

#about-modal .modal-body p a:hover {
    color: var(--accent-color-hover);
    text-decoration: underline; /* MODIFIÉ : Soulignement au survol */
}

/* NOUVEAU : Styles pour les listes et tags dans la modale "À Propos" */
.modal-link-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    columns: 2;
    -webkit-columns: 2;
    -moz-columns: 2;
    gap: 20px;
}

.modal-link-list li {
    margin-bottom: 8px;
    break-inside: avoid-column;
}

.modal-link-list li a {
    color: var(--accent-color); /* MODIFIÉ : Utilisation de la couleur d'accentuation */
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.modal-link-list li a:hover {
    color: var(--accent-color-hover);
    text-decoration: underline; /* AJOUTÉ : Soulignement au survol pour la cohérence */
}

.modal-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}








/* components/pagination.css */

/* =================================================================== */
/* COMPOSANT DE PAGINATION                                           */
/* =================================================================== */
.pagination-container {
    display: flex;
    justify-content: center;
    padding: 40px 0 20px 0;
}

ul.pagination {
    display: inline-flex;
    align-items: center;
    list-style: none;
    padding: 6px;
    margin: 0;
    background-color: var(--bg-color-light);
    border-radius: 999px; /* Pour la forme de pilule */
}

.pagination li {
    margin: 0 2px;
}

/* Style commun pour tous les liens/boutons de la pagination */
.pagination li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Pour la forme ronde */
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color-secondary);
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.pagination li a:hover {
    color: var(--text-color-primary);
    background-color: rgba(255,255,255,0.1);
}

/* Style pour la page active */
.pagination li a.active {
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

/* Style pour la flèche "Suivant" mise en évidence */
.pagination li a.next {
    background-color: var(--accent-color);
    color: #fff;
}
.pagination li a.next:hover {
    background-color: var(--accent-color-hover);
}

/* Style pour les "..." */
.pagination li .ellipsis {
    padding: 0 10px;
    color: var(--text-color-secondary);
}

/* =================================================================== */
/* INDICATEUR DE CHARGEMENT (SCROLL INFINI)                          */
/* =================================================================== */
#loading-indicator {
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    width: 100%;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* NOUVEAU : Style pour le conteneur du spinner de chargement des genres */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    width: 100%;    
    /* CORRECTION DÉFINITIVE : La sentinelle a une hauteur minimale pour être toujours observable,
       mais son contenu (le spinner) est invisible par défaut. */
    min-height: 1px;
    padding: 20px 0;
}

.spinner-container .spinner {
    opacity: 0;
    transition: opacity 0.3s ease;
}
.spinner-container.loading .spinner {
    opacity: 1;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}









/* components/categories.css */

/* =================================================================== */
/* SECTION CATÉGORIES (ACCUEIL)                                      */
/* =================================================================== */

/* --- 1. Styles généraux --- */
#more-categories {
	padding: 15px 0 18px 0; /* Padding vertical, le padding horizontal sera sur le conteneur interne */
	display: block !important; /* Force l'affichage même si l'écran est très large et qu'il n'y a pas de scroll overflow */
	scroll-margin-top: 80px;
	transition: box-shadow 0.3s ease, outline 0.3s ease;
}

#categories {
	scroll-margin-top: 80px;
}

/* =========================================================================
   SPOTLIGHT GLOW ARCADE SPECTACULAIRE : SECTION CATÉGORIES (PLAYZOOL)
   ========================================================================= */
.more-categories-section.category-section-spotlight,
#more-categories.category-section-spotlight {
  position: relative;
  border-radius: 24px;
  animation: spotlightSurgePlayzool 2.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  z-index: 20;
}

@keyframes spotlightSurgePlayzool {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 170, 0, 0);
    outline: 2px solid rgba(255, 215, 0, 0);
  }
  20% {
    box-shadow: 0 0 50px 15px rgba(255, 170, 0, 0.7), 0 0 100px 30px rgba(112, 87, 224, 0.4), inset 0 0 35px rgba(255, 215, 0, 0.35);
    outline: 3px solid #ffd700;
    transform: scale(1.008);
  }
  50% {
    box-shadow: 0 0 35px 8px rgba(255, 170, 0, 0.45), 0 0 60px 15px rgba(112, 87, 224, 0.25);
    outline: 2px solid rgba(255, 215, 0, 0.7);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 170, 0, 0);
    outline: 2px solid rgba(255, 215, 0, 0);
    transform: scale(1);
  }
}

/* Onde lumineuse sur les cartes de catégories */
.category-card.spotlight-card-wave,
.category-grid-item.spotlight-card-wave {
  animation: categoryCardShineWave 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes categoryCardShineWave {
  0% { transform: scale(1); border-color: rgba(255, 255, 255, 0.1); }
  40% { transform: scale(1.08) translateY(-4px); border-color: #ffd700; box-shadow: 0 8px 24px rgba(255, 170, 0, 0.6), 0 0 15px #ffd700; }
  100% { transform: scale(1) translateY(0); }
}

/* =========================================================================
   BARRE DE PROGRESSION GLOBALE GAMING & SPINNER DE QUÊTES (ANTI-CLIC MORT)
   ========================================================================= */
.gaming-top-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3.5px;
  z-index: 999999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gaming-top-loader.is-active {
  opacity: 1;
}

.gaming-top-loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffaa00, #ffd700, #ff5e00);
  box-shadow: 0 0 12px #ffaa00, 0 0 20px rgba(255, 215, 0, 0.8);
  transition: width 0.4s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.gaming-top-loader.is-active .gaming-top-loader-bar {
  animation: gamingTopBarProgress 1.4s cubic-bezier(0.1, 0.7, 0.1, 1) forwards;
}

@keyframes gamingTopBarProgress {
  0% { width: 0%; }
  40% { width: 68%; }
  80% { width: 88%; }
  100% { width: 96%; }
}

/* Bouton Quête en état de navigation */
.quest-action-link.is-navigating {
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.35), rgba(255, 94, 0, 0.25)) !important;
  border-color: #ffd700 !important;
  color: #fff !important;
  box-shadow: 0 0 12px rgba(255, 170, 0, 0.5) !important;
  transform: scale(0.96) !important;
}

/* Micro-press tactile sur carte / vignette en cours de navigation */
.game-card.is-navigating,
.hero-grid-item:not(.small-column).is-navigating,
.small-game.is-navigating,
.shelf-portrait-card.is-navigating,
.related-game-card.is-navigating,
.category-grid-item.is-navigating,
.category-card.is-navigating {
  transform: scale(0.972) !important;
  filter: brightness(1.08);
  transition: transform 0.12s ease-out, filter 0.12s ease-out;
}


.quest-action-link {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}

.quest-action-link:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
}

.quest-action-link:active {
  transform: scale(0.94);
  filter: brightness(0.9);
}

.quest-nav-spinner {
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffd700;
  border-radius: 50%;
  animation: questSpin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}

@keyframes questSpin {
  to { transform: rotate(360deg); }
}

/* Le conteneur de la grille qui défile */
.category-grid-container {
	display: grid;
	width: max-content;
	gap: 8px;
	grid-auto-flow: column; /* La grille s'étend horizontalement pour s'adapter au contenu */
	grid-template-rows: repeat(2, 1fr);
	/* La largeur des colonnes est maintenant définie par la largeur des éléments qu'elles contiennent. */
	/* NOUVEAU : On ajoute le padding ici pour créer une gouttière de départ
	   et s'assurer que le contenu déborde toujours à la fin. */
	padding-left: var(--page-padding);
	padding-right: 5vw; /* Une valeur relative pour que ça fonctionne sur tous les écrans */
}

/* --- 2. Comportement par défaut (Desktop > 768px) --- */

/* Le bloc d'introduction qui sera utilisé pour les vues statiques (non-carrousel) */
.category-grid-intro-mobile {
	display: none; /* Reste caché par défaut */
	background-color: var(--bg-color-medium); /* AJOUT : Le fond */
	border-radius: var(--border-radius);      /* AJOUT : Les coins arrondis */
	padding: 25px;  /* AJOUT : Un padding uniforme pour un meilleur aspect */
	margin-bottom: 20px;
}

/* Le bloc d'introduction est un grand carré dans la grille */
.category-grid-container .category-grid-intro {
	display: flex;
	grid-column: span 2;
	grid-row: span 2;
	height: 100% !important;
	align-self: stretch !important;
	box-sizing: border-box !important;
	background-color: var(--bg-color-medium);
	border-radius: var(--border-radius);
	padding: 25px;
	flex-direction: column;
	justify-content: center;
	/* NOUVEAU : La largeur est calculée dynamiquement pour s'aligner sur les cartes de catégorie. */
	width: calc(22vw * 2 + 8px);
	max-width: calc(200px * 2 + 8px); /* 408px */
	scroll-snap-align: start;
    border: 1px solid transparent;
    border-color: var(--category-grid-intro-border, transparent);
}
.category-grid-container .category-grid-intro h3 { font-size: 1.5rem; margin: 0; }
.category-grid-container .category-grid-intro p { color: var(--text-color-secondary); }
.category-grid-container .category-grid-intro .learn-more { color: var(--accent-color-hover); font-weight: bold; text-decoration: none; }

/* Les cartes de catégories */
.category-grid-item {
	width: 22vw; /* Largeur relative pour garantir l'effet "peek-a-boo" */
	max-width: 200px; /* Limite la taille sur les très grands écrans */
	background-color: var(--bg-color-medium);
	border-radius: var(--border-radius);
	text-decoration: none;
	color: var(--text-color-primary);
    border: 1px solid transparent;
    border-color: var(--category-grid-item-border, transparent);
	padding: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	font-weight: 500;
	font-size: 1rem;
	text-align: center;
	transition: background-color 0.2s ease, transform 0.2s ease;
	scroll-snap-align: start;
	min-height: 120px;
}
.category-grid-item:hover {
	background-color: var(--accent-color-hover-shade);
}
.category-grid-item:active {
	background-color: var(--accent-color);
}
.category-grid-item span {
	line-height: 1;
	font-size: 1.2rem;
}

.category-grid-intro-mobile h3 {
	font-family: var(--font-title);
	font-size: 1.5rem;
	margin-top: 0;
	margin-bottom: 10px;
	color: var(--text-color-primary);
}

.category-grid-intro-mobile p {
	color: var(--text-color-secondary);
	font-size: 0.9rem;
	line-height: 1.6;
	margin: 0 0 15px 0;
}

.category-grid-intro-mobile .learn-more {
	color: var(--accent-color);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.9rem;
}

.category-grid-intro-mobile .learn-more:hover {
	color: var(--accent-color-hover);
}

/* --- 3. Comportement sur Mobile (< 768px) --- */
@media (max-width: 768px) {
	.category-grid-intro-mobile { display: block; }
	.category-grid-container .category-grid-intro { display: none; }
	/* On revient à la logique de colonnes de grille pour mobile, qui est plus simple à gérer ici. */
	.category-grid-container { grid-auto-columns: 35vw; }
	/* On annule les largeurs de la vue desktop pour que l'item remplisse la colonne de la grille. */
	.category-grid-item { width: auto; max-width: none; }
}

/* Classe ajoutée par JS pour afficher la section si elle a du contenu scrollable */
.carousel-section-wrapper.is-visible .container .container{
	padding-left: 1px;
	/* La hauteur s'adapte au contenu une fois visible. La transition se fera vers la hauteur réelle. */
}
/* NOUVEAU: Fix Image distortion */
.game-thumbnail, .hero-grid-item img, .related-game-card img { 
    object-fit: cover !important; 
    aspect-ratio: auto; 
}

.game-card img, .hero-grid-item img, .small-game img, .related-game-card img { display: block; width: 100%; height: 100%; object-fit: cover; }


.game-card picture, .hero-grid-item picture, .small-game picture, .related-game-card picture { display: block; width: 100%; height: 100%; }


.game-link img, .game-link picture { display: block; width: 100%; height: 100%; object-fit: cover; }

/* =========================================================================
   COMPOSANT AVATAR UNIVERSEL & CADRES GPU (AVATAR BADGES & PRESTIGE FRAMES)
   ========================================================================= */

@property --frame-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes rotateFrameAngle {
  0% { --frame-angle: 0deg; }
  100% { --frame-angle: 360deg; }
}

@keyframes framePulseGlow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.4)); }
  50% { transform: scale(1.02); filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8)); }
}

/* Base du conteneur Avatar */
.avatar-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  contain: layout style;
  transform: translateZ(0);
  background: radial-gradient(circle, #252836 0%, #15161e 100%);
  user-select: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.avatar-badge:hover {
  transform: scale(1.05);
}

/* Tailles universelles */
.avatar--sm { width: 34px; height: 34px; }   /* Header sticky */
.avatar--md { width: 44px; height: 44px; }   /* Game Page & Leaderboards */
.avatar--lg { width: 84px; height: 84px; }   /* Panneau Profil */

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  background: #1a1a2e;
}

.avatar-inner .avatar-icon {
  font-size: 16px;
  line-height: 1;
}
.avatar--md .avatar-inner .avatar-icon { font-size: 22px; }
.avatar--lg .avatar-inner .avatar-icon { font-size: 40px; }

.avatar-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Pastille de niveau joueur */
.avatar-level-pill {
  position: absolute;
  bottom: -3px;
  right: -3px;
  background: linear-gradient(135deg, #ffaa00, #ff5e00);
  color: #000;
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 900;
  border-radius: 10px;
  padding: 1px 4px;
  font-size: 9px;
  line-height: 1.1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.6);
  z-index: 4;
  pointer-events: none;
}
.avatar--lg .avatar-level-pill {
  font-size: 12px;
  padding: 2px 8px;
  bottom: -4px;
  right: -4px;
}

/* Anneau de bordure animé via pseudo-élément ::before */
.avatar-badge::before,
.hud-frame-gem::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  transition: all 0.3s ease;
}
.avatar--lg.avatar-badge::before {
  inset: -4px;
}

/* --- LES 8 PALIERS HARMONISÉS DE CADRES --- */

/* Niv 1 : Acier Brut (Commune) */
.frame--frame_novice::before,
.frame--frame_default::before {
  border: 2px solid #718096;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Niv 3 : Bronze Antique (Standard) */
.frame--frame_bronze::before {
  border: 2.5px solid #cd7f32;
  box-shadow: 0 0 8px rgba(205, 127, 50, 0.5);
  background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), transparent);
}

/* Niv 6 : Argent Boréal (Rare) */
.frame--frame_silver::before {
  border: 2.5px solid #e2e8f0;
  box-shadow: 0 0 10px rgba(226, 232, 240, 0.6);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent);
}

/* Niv 10 : Or Impérial (Épique) */
.frame--frame_gold::before {
  border: 3px solid #ffd700;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.7);
  animation: framePulseGlow 3s infinite ease-in-out;
}

/* Niv 15 : Émeraude Runique (Épique) */
.frame--frame_emerald::before {
  border: 3px solid #00e676;
  box-shadow: 0 0 16px rgba(0, 230, 118, 0.75);
}

/* Niv 20 : Améthyste Abyssale (Mythique) */
.frame--frame_amethyst::before {
  border: 3px solid #a855f7;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.8);
}

/* Niv 25 : Cyber Synthwave (Légendaire - Conic Gradient Rotatif GPU 60 FPS) */
.frame--frame_cyber::before {
  padding: 3px;
  background: conic-gradient(from var(--frame-angle), #00f0ff, #ff007f, #7928ca, #00f0ff);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotateFrameAngle 3s linear infinite;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.6);
}

/* Niv 30 : Cosmic Inferno (Céleste - Double Plasma Rotatif GPU) */
.frame--frame_cosmic::before {
  padding: 3.5px;
  background: conic-gradient(from var(--frame-angle), #ff0055, #ffaa00, #ff0000, #ff0055);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotateFrameAngle 2s linear infinite;
  box-shadow: 0 0 24px rgba(255, 60, 0, 0.9);
}

/* --- HUD TOAST TEMPS RÉEL (SCORES, RECORDS & ACHIEVEMENTS) --- */
.hud-telemetry-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(18, 20, 32, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 30px;
  padding: 10px 22px;
  color: #fff;
  font-family: 'Poppins', 'Inter', sans-serif;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 170, 0, 0.35);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.hud-telemetry-toast.is-active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.hud-telemetry-toast .hud-toast-icon {
  font-size: 24px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.hud-telemetry-toast .hud-toast-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffaa00;
  margin: 0;
  line-height: 1.2;
}

.hud-telemetry-toast .hud-toast-desc {
  font-size: 12px;
  color: #e2e8f0;
  margin: 0;
  font-weight: 500;
}

.hud-telemetry-toast .hud-toast-xp {
  background: linear-gradient(135deg, #ffaa00, #ff5e00);
  color: #000;
  font-weight: 900;
  font-size: 11px;
  border-radius: 12px;
  padding: 3px 8px;
  margin-left: 6px;
}

/* --- SYSTÈME D'ONGLETS MODULAIRE (GUIDE, CLASSEMENT, SUCCÈS, SPECS) --- */
.game-content-columns {
  min-width: 0;
}
.game-content-main {
  min-width: 0;
  max-width: 100%;
}
.game-meta-tabs-wrapper {
  margin-top: 24px;
  background: rgba(20, 24, 38, 0.65);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-width: 0;
  max-width: 100%;
}

.game-tabs-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 0 12px;
  background: rgba(10, 12, 20, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.game-tabs-nav::-webkit-scrollbar { display: none; }

.game-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px 10px 0 0;
  border: none;
  background: transparent;
  color: #8892b0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
  position: relative;
  flex-shrink: 0;
}
.game-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}
.game-tab-btn.is-active {
  color: #ffaa00;
  background: rgba(255, 170, 0, 0.08);
}
.game-tab-btn.is-active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: #ffaa00;
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 10px rgba(255, 170, 0, 0.7);
}

.tab-counter-pill {
  background: rgba(255, 170, 0, 0.15);
  color: #ffaa00;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 7px;
  border: 1px solid rgba(255, 170, 0, 0.3);
}

.game-tab-panel {
  padding: 20px;
}
.game-tab-panel:not(.is-active) {
  display: none !important;
}

/* --- CLASSEMENT (LEADERBOARD) --- */
.leaderboard-panel-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Multi-Leaderboards Switchers */
.lb-boards-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
.lb-board-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #a0aec0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.lb-board-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.lb-board-pill.is-active {
  background: #ffaa00;
  color: #121420;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(255, 170, 0, 0.35);
}
.lb-board-pill:active {
  transform: scale(0.96);
}

.lb-boards-select-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
.lb-board-select-label {
  font-size: 13px;
  font-weight: 700;
  color: #ccd6f6;
  white-space: nowrap;
}
.lb-board-select {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #1a1e2e;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.lb-board-select:focus {
  border-color: #ffaa00;
  box-shadow: 0 0 0 2px rgba(255, 170, 0, 0.2);
}
.lb-board-select option {
  background: #1a1e2e;
  color: #fff;
  padding: 6px;
}

.lb-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.lb-time-switch {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 3px;
}

.lb-filter-btn {
  padding: 6px 16px;
  border-radius: 16px;
  border: none;
  background: transparent;
  color: #8892b0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.lb-filter-btn.is-active {
  background: #ffaa00;
  color: #121420;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(255, 170, 0, 0.4);
}

.lb-my-standing {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #aaa;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  padding: 5px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.lb-standing-val {
  color: #ffaa00;
  font-weight: 900;
  font-size: 14px;
}

.lb-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  background: rgba(10, 12, 20, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lb-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: left;
}
.lb-table th {
  padding: 12px 16px;
  font-size: 11px;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.5px;
}
.lb-table td {
  padding: 12px 16px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}
.lb-table tr {
  transition: background 0.18s ease, transform 0.15s ease;
}
.lb-table tr.lb-row {
  cursor: pointer;
}
.lb-table tr.lb-row:hover {
  background: rgba(255, 170, 0, 0.12);
}
.lb-table tr.lb-row:active {
  transform: scale(0.995);
}
.lb-table tr.is-me {
  background: rgba(255, 170, 0, 0.12) !important;
  border-left: 3px solid #ffaa00;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.lb-table tr.is-me.is-just-ranked {
  position: relative;
  z-index: 5;
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.28) 0%, rgba(255, 170, 0, 0.18) 50%, rgba(255, 215, 0, 0.08) 100%) !important;
  border-left: 4px solid #ffd700 !important;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.5), inset 0 0 15px rgba(255, 215, 0, 0.2);
  animation: rowSpotlightGold 2.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.lb-table tr.is-me.is-just-ranked .lb-cell-rank {
  color: #ffd700 !important;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  transform: scale(1.1);
  display: inline-block;
  transition: transform 0.3s ease;
}
.lb-table tr.is-me.is-just-ranked .lb-cell-score {
  color: #fff !important;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.9);
}
.lb-row-victory-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #ffd700 0%, #ff8800 100%);
  color: #120b00;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 8px;
  box-shadow: 0 2px 8px rgba(255, 170, 0, 0.5);
  animation: badgePopBounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  vertical-align: middle;
}
@keyframes rowSpotlightGold {
  0% {
    transform: scale(1.02);
    box-shadow: 0 0 35px rgba(255, 215, 0, 0.8), inset 0 0 25px rgba(255, 215, 0, 0.4);
  }
  30% {
    transform: scale(1.02);
    box-shadow: 0 0 28px rgba(255, 215, 0, 0.65), inset 0 0 18px rgba(255, 215, 0, 0.3);
  }
  70% {
    transform: scale(1.01);
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.4), inset 0 0 10px rgba(255, 215, 0, 0.15);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(255, 215, 0, 0), inset 0 0 0 rgba(255, 215, 0, 0);
  }
}
@keyframes badgePopBounce {
  0% { opacity: 0; transform: scale(0.3) translateY(6px); }
  60% { opacity: 1; transform: scale(1.15) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.lb-cell-rank {
  font-size: 15px;
  font-weight: 900;
  color: #e2e8f0;
}
.lb-player-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.lb-player-name {
  font-weight: 700;
  color: #fff;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.lb-player-avatar {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  cursor: default;
}
.lb-player-avatar .avatar-icon {
  font-size: 13px;
}
.lb-player-avatar .avatar-level-pill {
  font-size: 8px;
  padding: 1px 3.5px;
  bottom: -3px;
  right: -3px;
}
.lb-player-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  justify-content: center;
}
.lb-player-title {
  font-size: 11px;
  font-weight: 600;
  color: #ffaa00;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.lb-title-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #ffaa00;
  background: rgba(255, 170, 0, 0.12);
  border: 1px solid rgba(255, 170, 0, 0.35);
  border-radius: 6px;
  padding: 1px 7px;
  margin-top: 3px;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  transition: all 0.2s ease;
}
.lb-table tr.lb-row:hover .lb-title-badge {
  background: rgba(255, 170, 0, 0.12);
  border-color: #ffaa00;
  box-shadow: 0 0 10px rgba(255, 170, 0, 0.25);
}
@media (max-width: 640px) {
  .lb-title-badge {
    font-size: 10px;
    padding: 1px 5px;
  }
}
@media (max-width: 640px) {
  .lb-player-avatar {
    width: 26px;
    height: 26px;
  }
  .lb-player-avatar .avatar-icon {
    font-size: 11px;
  }
  .lb-player-avatar .avatar-level-pill {
    font-size: 7px;
    padding: 0px 2px;
    bottom: -2px;
    right: -2px;
  }
  .lb-player-title {
    font-size: 10px;
  }
}
.lb-cell-score {
  font-weight: 900;
  font-size: 14px;
  color: #ffaa00;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.lb-empty-notice {
  text-align: center;
  padding: 36px 20px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
}

/* ==========================================================================
   MODALE PLAYER CARD & DÃ‰FI SOCIAL (playzool)
   ========================================================================== */
.player-card-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(5, 7, 15, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  animation: playerCardFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.player-card-modal-overlay.is-closing {
  animation: playerCardFadeOut 0.18s ease forwards;
}

.player-card-box {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: linear-gradient(145deg, #1e2433 0%, #111520 100%);
  border: 1px solid rgba(255, 170, 0, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 170, 0, 0.25);
  border-radius: 24px;
  padding: 32px 24px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform-origin: center center;
  animation: playerCardPop 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.player-card-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.player-card-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  transform: scale(1.08);
}

.player-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  width: 100%;
}

.player-card-avatar {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
}
.player-card-avatar .avatar-icon {
  font-size: 34px;
}
.player-card-avatar .avatar-level-pill {
  font-size: 12px;
  padding: 2px 7px;
  bottom: -4px;
  right: -4px;
  font-weight: 800;
}

.player-card-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.player-card-name {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.3px;
  word-break: break-word;
}
.player-card-title-pill {
  font-size: 12px;
  font-weight: 700;
  color: #ffaa00;
  background: rgba(255, 170, 0, 0.12);
  border: 1px solid rgba(255, 170, 0, 0.35);
  padding: 4px 14px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 12px rgba(255, 170, 0, 0.25);
}
.player-card-me-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 2px 10px;
  border-radius: 12px;
}

.player-card-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  margin-bottom: 24px;
}
.player-card-stat-card {
  background: rgba(10, 14, 24, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.player-card-stat-card .stat-icon {
  font-size: 18px;
}
.player-card-stat-card .stat-value {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.player-card-stat-card .stat-label {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

.player-card-actions {
  width: 100%;
}
.player-card-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
}
.player-card-challenge-btn {
  background: linear-gradient(135deg, #ff9500 0%, #ff5500 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 100, 0, 0.4), 0 0 15px rgba(255, 170, 0, 0.3);
}
.player-card-challenge-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 100, 0, 0.4), 0 0 15px rgba(255, 170, 0, 0.3);
}
.player-card-challenge-btn:active {
  transform: scale(0.98);
}
.player-card-edit-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.player-card-edit-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: translateY(-1px);
}

.challenge-target-hud {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  background: rgba(15, 20, 32, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 170, 0, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 25px rgba(255, 170, 0, 0.25);
  border-radius: 50px;
  padding: 10px 20px;
  animation: challengeHudSlideUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  max-width: 90vw;
}
.challenge-hud-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.challenge-hud-icon {
  font-size: 20px;
  animation: challengeIconBounce 1s infinite alternate ease-in-out;
}
.challenge-hud-text {
  font-size: 13px;
  color: #f8fafc;
  font-weight: 500;
}
.challenge-hud-text strong {
  color: #ffaa00;
  font-weight: 800;
}
.challenge-hud-timer {
  font-size: 12px;
  font-weight: 800;
  color: #ffaa00;
  background: rgba(255, 170, 0, 0.15);
  border: 1px solid rgba(255, 170, 0, 0.35);
  padding: 3px 9px;
  border-radius: 20px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.challenge-hud-timer.is-urgent {
  color: #ff4d4d;
  background: rgba(255, 77, 77, 0.2);
  border-color: rgba(255, 77, 77, 0.5);
  animation: urgentPulse 1s infinite alternate ease-in-out;
}
@keyframes urgentPulse {
  0% { transform: scale(1); box-shadow: 0 0 4px rgba(255, 77, 77, 0.3); }
  100% { transform: scale(1.06); box-shadow: 0 0 12px rgba(255, 77, 77, 0.7); }
}
.challenge-hud-abandon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.challenge-hud-abandon-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.challenge-hud-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #94a3b8;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s ease;
}
.challenge-hud-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* --- MODALE DE DÉBRIEFING DE DÉFI (VICTOIRE / NEAR-MISS) --- */
.challenge-debrief-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 15, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100020;
  padding: 16px;
  animation: playerCardFadeIn 0.25s ease-out;
}
.challenge-debrief-modal-overlay.is-closing {
  animation: playerCardFadeOut 0.2s ease-in forwards;
}
.challenge-debrief-box {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: linear-gradient(155deg, #1b2030 0%, #10131e 100%);
  border-radius: 24px;
  padding: 28px 24px 22px;
  text-align: center;
  color: #fff;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  animation: playerCardPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  box-sizing: border-box;
}
.challenge-debrief-box.is-victory {
  border: 1px solid rgba(255, 215, 0, 0.4);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 170, 0, 0.2);
}
.challenge-debrief-box.is-near-miss {
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 0.15);
}
.challenge-debrief-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
}
.challenge-debrief-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: scale(1.08);
}
.challenge-debrief-header {
  margin-bottom: 20px;
}
.challenge-debrief-emblem {
  font-size: 52px;
  display: inline-block;
  margin-bottom: 8px;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.5));
  animation: challengeIconBounce 1.2s infinite alternate ease-in-out;
}
.challenge-debrief-title {
  font-family: var(--font-title, sans-serif);
  font-size: 20px;
  font-weight: 900;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
}
.is-victory .challenge-debrief-title {
  color: #ffd700;
  text-shadow: 0 0 14px rgba(255, 215, 0, 0.5);
}
.is-near-miss .challenge-debrief-title {
  color: #38bdf8;
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
}
.challenge-debrief-desc {
  font-size: 14px;
  line-height: 1.5;
  color: #cbd5e1;
  margin: 0;
}
.challenge-debrief-desc strong {
  color: #fff;
  font-weight: 700;
}
.challenge-comparison-card {
  background: rgba(10, 14, 24, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.comparison-bar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bar-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}
.bar-labels .player-tag {
  color: #cbd5e1;
}
.bar-labels .score-tag {
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.bar-labels .score-tag.is-winner {
  color: #ffd700;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}
.bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.bar-fill.bar-gold {
  background: linear-gradient(90deg, #ffaa00, #ffd700);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}
.bar-fill.bar-blue {
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}
.bar-fill.bar-gray {
  background: rgba(148, 163, 184, 0.5);
}
.challenge-debrief-reward {
  margin-bottom: 14px;
}
.reward-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 20px;
}
.reward-pill.reward-gold {
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: #ffd700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.25);
}
.reward-pill.reward-blue {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}
.challenge-social-note,
.challenge-timer-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 20px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}
.challenge-social-note strong,
.challenge-timer-note strong {
  color: #f1f5f9;
}
.challenge-debrief-actions {
  display: flex;
  gap: 10px;
}
.challenge-btn-primary {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 16px;
  font-family: var(--font-title, sans-serif);
  font-size: 14px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #ff9500 0%, #ff5500 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 100, 0, 0.4);
}
.is-victory .challenge-btn-primary {
  background: linear-gradient(135deg, #ffd700 0%, #ff8800 100%);
  color: #1a0f00;
  box-shadow: 0 6px 20px rgba(255, 136, 0, 0.4);
}
.challenge-btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}
.challenge-btn-primary:active {
  transform: scale(0.98);
}
.challenge-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 18px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}
.challenge-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

@keyframes playerCardPop {
  0% { opacity: 0; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes playerCardFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes playerCardFadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes challengeHudSlideUp {
  0% { opacity: 0; transform: translate(-50%, 30px); }
  100% { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes challengeIconBounce {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.15) rotate(-8deg); }
}

/* --- SUCCÈS (ACHIEVEMENTS) --- */
.achievements-panel-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ach-header-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(10, 12, 20, 0.6);
  border-radius: 12px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}
.ach-badge-avatar {
  font-size: 28px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 170, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 170, 0, 0.3);
  box-shadow: 0 0 16px rgba(255, 170, 0, 0.2);
}
.ach-header-info {
  flex: 1;
  min-width: 140px;
}
.ach-header-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}
.ach-header-count {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}
.ach-header-bar-wrap {
  flex: 1;
  min-width: 160px;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
}
.ach-header-bar {
  height: 100%;
  background: linear-gradient(90deg, #ffaa00, #00e676);
  border-radius: 6px;
  transition: width 0.5s ease;
}

.achievements-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 14px;
}

.achievement-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: rgba(10, 12, 20, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.25s ease;
  min-width: 0;
}
.achievement-card.is-unlocked {
  background: rgba(0, 230, 118, 0.05);
  border-color: rgba(0, 230, 118, 0.25);
  box-shadow: 0 4px 16px rgba(0, 230, 118, 0.08);
}
.achievement-card.is-locked {
  opacity: 0.65;
}
.achievement-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.ach-card-icon {
  font-size: 24px;
  line-height: 1;
  padding: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ach-card-icon .ach-icon-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  transition: transform 0.25s ease, filter 0.25s ease;
}
.achievement-card.is-locked .ach-card-icon .ach-icon-img {
  filter: grayscale(0.85) opacity(0.7);
}
.achievement-card.is-unlocked .ach-card-icon {
  background: rgba(0, 230, 118, 0.15);
  box-shadow: 0 0 10px rgba(0, 230, 118, 0.2);
}
.achievement-card.is-unlocked .ach-card-icon .ach-icon-img {
  filter: drop-shadow(0 0 6px rgba(0, 230, 118, 0.5));
  transform: scale(1.05);
}

.ach-card-body {
  flex: 1;
  min-width: 0;
}
.ach-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ach-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.3;
}
.ach-card-xp {
  font-size: 11px;
  font-weight: 800;
  color: #00e676;
  background: rgba(0, 230, 118, 0.12);
  padding: 2px 7px;
  border-radius: 8px;
  white-space: nowrap;
}
.ach-status-badge {
  font-size: 11px;
  font-weight: 600;
}
.ach-status-badge.locked { color: #64748b; }
.ach-status-badge.unlocked { color: #00e676; font-weight: 700; }

/* --- TRAILER OFFICIEL (FACADE PATTERN ULTRA-PERFORMANT) --- */
.game-trailer-section {
  scroll-margin-top: 80px;
}
.trailer-panel-content,
.game-trailer-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.trailer-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.trailer-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-color, #ffffff);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.trailer-desc {
  font-size: 0.95rem;
  color: var(--text-color-light, #a0aec0);
  margin: 0;
  line-height: 1.5;
}
.trailer-video-card {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: #000000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.video-facade-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #0b0c10;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-facade-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), filter 0.4s ease;
  display: block;
}
.video-facade-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.65) 100%);
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.video-facade-container:hover .video-facade-poster {
  transform: scale(1.03);
  filter: brightness(1.08);
}
.video-facade-container:hover .video-facade-overlay {
  opacity: 0.4;
}
.video-facade-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.video-facade-play-icon {
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.7));
  transition: filter 0.25s ease;
}
.video-facade-play-icon .play-icon-bg {
  fill: var(--primary-color, #e91e63);
  fill-opacity: 0.92;
  transition: fill 0.2s ease, fill-opacity 0.2s ease;
}
.video-facade-container:hover .video-facade-play-btn {
  transform: translate(-50%, -50%) scale(1.12);
}
.video-facade-container:hover .play-icon-bg {
  fill-opacity: 1;
  filter: drop-shadow(0 0 12px var(--primary-color, #e91e63));
}
.trailer-active-video,
.trailer-active-iframe {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
  background: #000;
  object-fit: contain;
}

/* --- FICHE TECHNIQUE & SPÉCIFICATIONS (SPECS & CONTROLS) --- */
.game-specs-section {
  margin-top: 20px;
}
.game-specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr));
  gap: 12px;
  margin-top: 14px;
}
.spec-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(10, 12, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 0;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.spec-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-color-light, #94a3b8);
  margin-bottom: 4px;
}
.spec-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-color, #f1f5f9);
  line-height: 1.3;
  word-break: break-word;
}
.spec-card-interactive {
  cursor: pointer;
  background: rgba(255, 170, 0, 0.06);
  border-color: rgba(255, 170, 0, 0.25);
  position: relative;
}
.spec-card-interactive:hover {
  background: rgba(255, 170, 0, 0.12);
  border-color: rgba(255, 170, 0, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 170, 0, 0.15);
}
.spec-card-interactive:active {
  transform: translateY(0);
}
.spec-label--achievements {
  color: #ffaa00;
}
.spec-label--leaderboards {
  color: #ffb703;
}
.spec-value--interactive {
  color: #ffaa00;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.spec-store-link {
  color: #ffaa00;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.spec-store-link:hover {
  color: #ffc107;
  opacity: 0.85;
}

/* =================================================================== */
/* CORRECTIFS RESPONSIVE MOBILE : ESPACE D'ONGLETS (#game-meta-tabs)   */
/* =================================================================== */

@media (max-width: 768px) {
  .game-content-columns {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 14px 10px !important;
    margin: 16px 0 0 0 !important;
    border-radius: 10px;
  }

  .game-meta-tabs-wrapper {
    margin-top: 16px;
    border-radius: 12px;
  }

  .game-tab-panel {
    padding: 16px 10px;
  }

  .game-tabs-nav {
    padding: 6px 8px 0 8px;
    gap: 4px;
  }

  .game-tab-btn {
    padding: 9px 12px;
    font-size: 12.5px;
    gap: 6px;
  }

  .ach-header-card {
    padding: 14px;
    gap: 12px;
    display: grid;
    grid-template-columns: 46px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
  }

  .ach-badge-avatar {
    width: 46px;
    height: 46px;
    font-size: 24px;
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  .ach-header-info {
    min-width: 0;
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }

  .ach-header-bar-wrap {
    min-width: 0;
    width: 100%;
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    margin-top: 4px;
  }

  .achievements-cards-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .game-details-section {
    padding: 14px 10px;
    margin-bottom: 16px;
  }

  .game-specs-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)) !important;
    gap: 8px !important;
  }
}

@media (max-width: 640px) {
  .lb-controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .lb-time-switch {
    display: flex;
    width: 100%;
  }

  .lb-filter-btn {
    flex: 1;
    text-align: center;
    padding: 7px 10px;
    font-size: 11.5px;
    white-space: nowrap;
  }

  .lb-my-standing {
    justify-content: space-between;
    width: 100%;
    padding: 6px 12px;
    font-size: 12px;
  }

  .lb-table th {
    padding: 10px 8px;
    font-size: 10px;
    letter-spacing: 0.2px;
  }

  .lb-table td {
    padding: 10px 8px;
    font-size: 12px;
  }

  .lb-table th:nth-child(1),
  .lb-table td:nth-child(1) {
    width: 62px;
  }

  .lb-table th:nth-child(2),
  .lb-table td:nth-child(2) {
    width: auto;
  }

  .lb-table th:nth-child(3),
  .lb-table td:nth-child(3) {
    width: 85px;
    text-align: right;
  }

  .lb-cell-rank {
    font-size: 13px;
  }

  .lb-cell-score {
    font-size: 13px;
  }

  .lb-player-name {
    font-size: 12.5px;
    max-width: 140px;
  }

  .achievement-card {
    padding: 10px 12px;
    gap: 10px;
  }

  .ach-card-icon {
    width: 40px;
    height: 40px;
    padding: 4px;
    flex-shrink: 0;
  }

  .ach-card-icon .ach-icon-img {
    width: 30px;
    height: 30px;
  }

  .ach-card-title {
    font-size: 12.5px;
  }

  .ach-card-xp {
    font-size: 10.5px;
    padding: 1px 6px;
  }

  .lb-boards-select-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .lb-board-select {
    max-width: 100%;
    width: 100%;
  }
  .lb-board-pill {
    font-size: 12px;
    padding: 5px 11px;
  }
}

@media (max-width: 380px) {
  .game-content-columns {
    padding: 10px 6px !important;
  }

  .game-tab-panel {
    padding: 12px 6px;
  }

  .game-tab-btn {
    padding: 8px 9px;
    font-size: 11px;
    gap: 4px;
  }

  .tab-counter-pill {
    padding: 1px 4px;
    font-size: 9.5px;
  }

  .lb-table th, 
  .lb-table td {
    padding: 8px 4px;
  }

  .lb-player-name {
    max-width: 95px;
    font-size: 11.5px;
  }

  .lb-cell-rank {
    font-size: 12px;
  }

  .lb-cell-score {
    font-size: 12px;
  }

  .spec-card {
    padding: 8px 10px !important;
  }

  .spec-label {
    font-size: 0.65rem !important;
  }

  .spec-value {
    font-size: 0.8rem !important;
  }
}

body.immersive-mode #header-user-title-text {
  display: none !important;
}

@media (max-width: 480px) {
  #header-user-title-text {
    display: none !important;
  }
}

/* =================================================================== */
/* REFONTE MOBILE : HEADER FLOTTANT 44PX, FEED HYBRIDE & VIDÉOS        */
/* =================================================================== */

/* Règle globale Desktop : Les bannières vidéo mobile et hero vidéo mobile sont masquées */
.mobile-video-banner-slot,
.hero-mobile-video {
  display: none !important;
}

@media (max-width: 768px) {
  :root {
    --header-height: 44px;
  }

  /* 1. Header Flottant 44px (Style Poki) */
  .site-header {
    height: var(--header-height);
    background-color: var(--header-bg-color, rgba(24, 24, 40, 0.75));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0 var(--page-padding);
    padding-top: env(safe-area-inset-top, 0px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
    will-change: transform;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-header.is-hidden {
    transform: translateY(-100%);
  }

  .site-main-content {
    padding-top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  }

  /* 2. Logo Option A : Textuel Affiné & Allégé (Hauteur 28px max) */
  .site-header .logo {
    width: auto !important;
    height: 28px !important;
    margin-left: 8px !important;
    display: flex;
    align-items: center;
  }

  .site-header .logo img {
    max-height: 28px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
  }

  /* Boutons d'en-tête calibrés pour barre de 44px */
  .header-icon-button {
    width: 34px;
    height: 34px;
    padding: 6px;
    border-radius: 8px;
  }

  .header-icon-button svg {
    width: 20px;
    height: 20px;
  }

  .user-level-badge-header {
    padding: 2px 8px 2px 4px !important;
    font-size: 11px !important;
    gap: 6px !important;
    margin-right: 6px !important;
  }

  .avatar--sm {
    width: 26px !important;
    height: 26px !important;
  }

  .avatar--sm .avatar-level-pill {
    font-size: 8px !important;
    padding: 0 3px !important;
  }

  /* Hero Vedette Unique sur Mobile (CrazyGames Style - 1 seule carte, zéro défilement) */
  .hero-grid-item.small-column,
  .hero-grid-item:not(:first-child) {
    display: none !important;
  }
  .hero-grid-item.large-featured:first-child {
    width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 16px !important;
    margin: 0 !important;
    transform: none !important;
    opacity: 1 !important;
    position: relative !important;
    overflow: hidden !important;
  }
  .hero-grid-item.large-featured img {
    border-radius: 16px !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  .hero-mobile-video {
    display: none !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    z-index: 2 !important;
    opacity: 0 !important;
    border-radius: 16px !important;
    transition: opacity 0.35s ease !important;
    pointer-events: none !important;
  }
  .hero-grid-item.large-featured:first-child.is-playing .hero-mobile-video,
  .hero-grid-item.large-featured:first-child .hero-mobile-video.is-playing {
    display: block !important;
    opacity: 1 !important;
  }
  .hero-grid-container {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }
  .hero-grid-scroll-wrapper {
    overflow: hidden !important;
    width: 100% !important;
  }
  .hero-section .scroll-button {
    display: none !important;
  }

  /* Section Jeux Récents compacte sur mobile : espacement équilibré avec respiration au-dessus du séparateur */
  #recent-games-section,
  .recent-games-strip {
    margin-top: 8px !important;
    margin-bottom: 8px !important;
    padding: 2px 0 16px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    min-height: unset !important;
  }
  .recent-games-header {
    margin-bottom: 14px !important;
    padding: 0 !important;
  }
  .recent-games-header .section-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    margin: 0 !important;
  }
  .recent-games-strip .recent-cta-card,
  .recent-games-grid .recent-cta-card,
  .games-grid .recent-cta-card,
  .desktop-only-cta {
    display: none !important;
  }
  .recent-games-grid,
  .games-grid.recent-games-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 0 !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
  }
  .recent-games-grid .game-card,
  .games-grid.recent-games-grid .game-card {
    display: flex !important;
    flex-direction: column !important;
    width: 76px !important;
    max-width: 76px !important;
    flex: 0 0 76px !important;
    aspect-ratio: unset !important;
    margin: 0 !important;
  }
  #recent-games-section .games-grid-scroll-wrapper,
  .recent-games-strip .games-grid-scroll-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-snap-type: x mandatory !important;
    padding-bottom: 8px !important;
  }
  #recent-games-section .games-grid-scroll-wrapper::-webkit-scrollbar,
  .recent-games-strip .games-grid-scroll-wrapper::-webkit-scrollbar {
    display: none !important;
  }
  #download-app,
  .game-details-section#download-app {
    margin-top: 24px !important;
    margin-bottom: 20px !important;
    padding: 16px 14px !important;
    border-radius: 14px !important;
  }
  .recent-games-grid .thumbnail,
  .games-grid.recent-games-grid .game-card .thumbnail,
  .recent-games-grid .game-card .thumbnail {
    width: 76px !important;
    max-width: 76px !important;
    height: 76px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
  }
  .recent-games-grid .thumbnail img,
  .games-grid.recent-games-grid .game-card .thumbnail img,
  .recent-games-grid .game-card .thumbnail img {
    width: 76px !important;
    max-width: 76px !important;
    height: 76px !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 14px !important;
  }
  .recent-games-grid .game-card .game-card-title,
  .recent-games-grid .game-card .game-card-info,
  .games-grid.recent-games-grid .game-card .game-card-title,
  .games-grid.recent-games-grid .game-card .game-card-info {
    width: 76px !important;
    max-width: 76px !important;
    padding: 3px 0 0 0 !important;
  }
  .recent-games-grid .game-card .game-card-name,
  .games-grid.recent-games-grid .game-card .game-card-name {
    font-size: 10px !important;
    text-align: center !important;
    max-width: 76px !important;
    width: 76px !important;
  }

  /* Espacement Neuro-UX des sections sur mobile (Loi de Proximité de Gestalt : ratio 3:1) */
  .game-grid-section,
  .carousel-section-wrapper {
    margin-top: 28px !important;
    margin-bottom: 0 !important;
  }
  .game-grid-section:first-of-type,
  #hero-section + .game-grid-section,
  #recent-games-section + .game-grid-section {
    margin-top: 16px !important;
  }
  .section-header {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    padding: 0 var(--page-padding, 10px) !important;
  }
  .container > .section-header,
  .container .section-header {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .recent-games-header.section-header,
  .recent-games-header {
    margin-bottom: 14px !important;
  }
  .section-header .section-title {
    font-size: 15px !important;
    font-weight: 700 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Respiration latérale de la grille de jeux similaires sur /game mobile */
  #related-games-sidebar,
  .right-sidebar-column #related-games-sidebar {
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }
  #related-games-sidebar .sidebar-games-grid {
    padding: 0 !important;
  }
  #related-games-sidebar .section-header {
    margin-top: 24px !important;
    margin-bottom: 8px !important;
    padding: 0 !important;
  }

  /* 3. Feed Hybride Bento (Poki 1:1 Squircle + Titre en-dessous) & Harmonisation /game */
  .games-grid-scroll-wrapper {
    overflow-x: visible !important;
    width: 100% !important;
  }

  .games-grid,
  #related-games-sidebar .sidebar-games-grid,
  .sidebar-games-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    flex-wrap: wrap !important;
  }

  .games-grid > * {
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .games-grid .game-card:not(.shelf-portrait-card):not(.mini-rail-card),
  .landscape-grid .game-card:not(.shelf-portrait-card):not(.mini-rail-card),
  .portrait-grid .game-card:not(.shelf-portrait-card):not(.mini-rail-card),
  #related-games-sidebar .sidebar-games-grid .game-card:not(.shelf-portrait-card):not(.mini-rail-card),
  .sidebar-games-grid .game-card:not(.shelf-portrait-card):not(.mini-rail-card) {
    width: 100% !important;
    max-width: none !important;
    aspect-ratio: unset !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 !important;
  }

  .games-grid .game-card:not(.shelf-portrait-card):not(.mini-rail-card) .thumbnail,
  .landscape-grid .game-card:not(.shelf-portrait-card):not(.mini-rail-card) .thumbnail,
  .portrait-grid .game-card:not(.shelf-portrait-card):not(.mini-rail-card) .thumbnail,
  #related-games-sidebar .sidebar-games-grid .game-card:not(.shelf-portrait-card):not(.mini-rail-card) .thumbnail,
  .sidebar-games-grid .game-card:not(.shelf-portrait-card):not(.mini-rail-card) .thumbnail {
    aspect-ratio: 1 / 1 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    width: 100% !important;
    height: auto !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3) !important;
  }

  .games-grid .game-card:not(.shelf-portrait-card):not(.mini-rail-card) .thumbnail img,
  .landscape-grid .game-card:not(.shelf-portrait-card):not(.mini-rail-card) .thumbnail img,
  .portrait-grid .game-card:not(.shelf-portrait-card):not(.mini-rail-card) .thumbnail img,
  #related-games-sidebar .sidebar-games-grid .game-card:not(.shelf-portrait-card):not(.mini-rail-card) .thumbnail img,
  .sidebar-games-grid .game-card:not(.shelf-portrait-card):not(.mini-rail-card) .thumbnail img {
    aspect-ratio: 1 / 1 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 16px !important;
  }

  .game-card .game-card-title,
  .game-card .game-card-info {
    position: static !important;
    opacity: 1 !important;
    transform: none !important;
    background: transparent !important;
    padding: 4px 2px 0 2px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    text-shadow: none !important;
  }

  .game-card .game-card-name,
  .game-card-title > span:first-child {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--text-color-primary, #ffffff) !important;
    line-height: 1.2 !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    word-break: normal !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Masquage des likes / pouce 👍 sur mobile */
  .game-card .game-card-likes,
  .game-card-title span[style*="color:#ffaa00"],
  .game-card-title > span:not(:first-child) {
    display: none !important;
  }

  /* Masquage du coeur sur mobile sur toutes les cartes pour ne pas cacher l'image */
  .game-card .favorite-toggle-button,
  .hero-grid-item .favorite-toggle-button,
  .shelf-portrait-card .favorite-toggle-button,
  .thumbnail .favorite-toggle-button,
  .small-game .favorite-toggle-button,
  .recent-games-grid .favorite-toggle-button,
  .sidebar-games-grid .favorite-toggle-button {
    display: none !important;
    pointer-events: none !important;
  }

  .carousel-container .scroll-button {
    display: none !important;
  }

  /* Mini-Rails Horizontaux / Capsules à Thème (CrazyGames Style) */
  .mobile-category-shelf,
  .mobile-shelf-island {
    display: block !important;
    grid-column: 1 / -1 !important;
    width: 100% !important;
    margin: 16px 0 12px 0 !important;
    padding: 14px 12px 14px 12px !important;
    border-radius: 18px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    background: linear-gradient(145deg, rgba(112, 87, 224, 0.22) 0%, rgba(18, 16, 32, 0.92) 100%) !important;
  }

  /* Fonds dégradés thématiques et bordures lumineuses distinctes */
  .mobile-shelf-island[data-shelf-theme="2-players"],
  .mobile-category-shelf[data-shelf-theme="2-players"] {
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.26) 0%, rgba(10, 18, 42, 0.94) 100%) !important;
    border-color: rgba(96, 165, 250, 0.32) !important;
    box-shadow: 0 4px 22px rgba(37, 99, 235, 0.18) !important;
  }

  .mobile-shelf-island[data-shelf-theme="thinking"],
  .mobile-category-shelf[data-shelf-theme="thinking"] {
    background: linear-gradient(145deg, rgba(20, 184, 166, 0.26) 0%, rgba(6, 28, 32, 0.94) 100%) !important;
    border-color: rgba(45, 212, 191, 0.32) !important;
    box-shadow: 0 4px 22px rgba(20, 184, 166, 0.18) !important;
  }

  .mobile-shelf-island[data-shelf-theme="brick-breaker"],
  .mobile-category-shelf[data-shelf-theme="brick-breaker"] {
    background: linear-gradient(145deg, rgba(244, 63, 94, 0.26) 0%, rgba(42, 10, 22, 0.94) 100%) !important;
    border-color: rgba(251, 113, 133, 0.32) !important;
    box-shadow: 0 4px 22px rgba(244, 63, 94, 0.18) !important;
  }

  .mobile-shelf-island[data-shelf-theme="cards"],
  .mobile-category-shelf[data-shelf-theme="cards"] {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.26) 0%, rgba(6, 32, 20, 0.94) 100%) !important;
    border-color: rgba(52, 211, 153, 0.32) !important;
    box-shadow: 0 4px 22px rgba(16, 185, 129, 0.18) !important;
  }

  .mobile-shelf-island[data-shelf-theme="action"],
  .mobile-category-shelf[data-shelf-theme="action"] {
    background: linear-gradient(145deg, rgba(168, 85, 247, 0.26) 0%, rgba(32, 10, 50, 0.94) 100%) !important;
    border-color: rgba(192, 132, 252, 0.32) !important;
    box-shadow: 0 4px 22px rgba(168, 85, 247, 0.18) !important;
  }

  .mobile-shelf-island[data-shelf-theme="race"],
  .mobile-category-shelf[data-shelf-theme="race"] {
    background: linear-gradient(145deg, rgba(249, 115, 22, 0.26) 0%, rgba(45, 15, 5, 0.94) 100%) !important;
    border-color: rgba(251, 146, 60, 0.32) !important;
    box-shadow: 0 4px 22px rgba(249, 115, 22, 0.18) !important;
  }

  .mobile-shelf-island[data-shelf-theme="sport"],
  .mobile-category-shelf[data-shelf-theme="sport"] {
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.26) 0%, rgba(8, 36, 18, 0.94) 100%) !important;
    border-color: rgba(74, 222, 128, 0.32) !important;
    box-shadow: 0 4px 22px rgba(34, 197, 94, 0.18) !important;
  }

  .mobile-shelf-island[data-shelf-theme="girls"],
  .mobile-category-shelf[data-shelf-theme="girls"] {
    background: linear-gradient(145deg, rgba(236, 72, 153, 0.26) 0%, rgba(48, 10, 32, 0.94) 100%) !important;
    border-color: rgba(244, 114, 182, 0.32) !important;
    box-shadow: 0 4px 22px rgba(236, 72, 153, 0.18) !important;
  }

  .mobile-shelf-island[data-shelf-theme="zombie"],
  .mobile-category-shelf[data-shelf-theme="zombie"] {
    background: linear-gradient(145deg, rgba(132, 204, 22, 0.26) 0%, rgba(22, 36, 6, 0.94) 100%) !important;
    border-color: rgba(163, 230, 53, 0.32) !important;
    box-shadow: 0 4px 22px rgba(132, 204, 22, 0.18) !important;
  }

  .mobile-shelf-island[data-shelf-theme="reflex"],
  .mobile-category-shelf[data-shelf-theme="reflex"] {
    background: linear-gradient(145deg, rgba(234, 179, 8, 0.26) 0%, rgba(42, 32, 6, 0.94) 100%) !important;
    border-color: rgba(250, 204, 21, 0.32) !important;
    box-shadow: 0 4px 22px rgba(234, 179, 8, 0.18) !important;
  }

  .mobile-category-shelf .shelf-header,
  .mobile-shelf-island .shelf-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 10px !important;
    padding: 0 2px !important;
  }

  .mobile-category-shelf .shelf-title-wrap,
  .mobile-shelf-island .shelf-title-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    min-width: 0 !important;
  }

  .mobile-category-shelf .shelf-icon,
  .mobile-shelf-island .shelf-icon {
    font-size: 18px !important;
    line-height: 1 !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)) !important;
  }

  .mobile-category-shelf .shelf-title,
  .mobile-shelf-island .shelf-title {
    font-family: var(--font-title, sans-serif) !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0 !important;
    letter-spacing: -0.2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6) !important;
  }

  .mobile-category-shelf .shelf-see-all,
  .mobile-shelf-island .shelf-cta-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 999px !important;
    padding: 4px 10px !important;
    color: #ffffff !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    transition: background 0.2s ease, transform 0.15s ease !important;
  }

  .mobile-category-shelf .shelf-see-all:active,
  .mobile-shelf-island .shelf-cta-btn:active {
    background: rgba(255, 255, 255, 0.22) !important;
    transform: scale(0.96) !important;
  }

  /* Rétablissement explicite des interactions tactiles et du défilement natif iOS/WebKit */
  .carousel-wrapper,
  .games-grid-scroll-wrapper {
    pointer-events: auto !important;
    touch-action: pan-x pan-y !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .mobile-category-shelf .shelf-track-wrapper,
  .mobile-shelf-island .shelf-track-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-x: contain !important;
    scrollbar-width: none !important;
    pointer-events: auto !important;
    touch-action: pan-x pan-y !important;
    scroll-snap-type: x mandatory !important;
    -webkit-scroll-snap-type: x mandatory !important;
    scroll-behavior: auto !important;
    width: calc(100% + 24px) !important;
    max-width: none !important;
    margin: -16px -12px !important;
    padding: 18px 12px 20px 12px !important;
    scroll-padding-left: 12px !important;
    scroll-padding-right: 12px !important;
  }

  .mobile-category-shelf .shelf-track-wrapper::-webkit-scrollbar,
  .mobile-shelf-island .shelf-track-wrapper::-webkit-scrollbar {
    display: none !important;
  }

  .mobile-category-shelf .shelf-track,
  .mobile-shelf-island .shelf-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    width: max-content !important;
    pointer-events: auto !important;
    touch-action: pan-x pan-y !important;
  }

  /* Cartes PORTRAIT 3:4 Style CrazyGames */
  .mobile-category-shelf .shelf-portrait-card,
  .mobile-shelf-island .shelf-portrait-card,
  .mobile-category-shelf .mini-rail-card,
  .mobile-shelf-island .mini-rail-card,
  #related-games-sidebar .mobile-category-shelf .shelf-portrait-card,
  #related-games-sidebar .mobile-shelf-island .shelf-portrait-card,
  #related-games-sidebar .mobile-category-shelf .mini-rail-card,
  #related-games-sidebar .mobile-shelf-island .mini-rail-card {
    width: 39vw !important;
    max-width: 165px !important;
    min-width: 138px !important;
    flex: 0 0 auto !important;
    scroll-snap-align: start !important;
    display: flex !important;
    flex-direction: column !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    pointer-events: auto !important;
    touch-action: pan-x pan-y !important;
  }

  .mobile-category-shelf .shelf-portrait-card:last-child,
  .mobile-shelf-island .shelf-portrait-card:last-child,
  .mobile-category-shelf .mini-rail-card:last-child,
  .mobile-shelf-island .mini-rail-card:last-child {
    scroll-snap-align: end !important;
  }

  .mobile-category-shelf .shelf-portrait-card .thumbnail,
  .mobile-shelf-island .shelf-portrait-card .thumbnail,
  .mobile-category-shelf .mini-rail-card .thumbnail,
  .mobile-shelf-island .mini-rail-card .thumbnail,
  #related-games-sidebar .mobile-category-shelf .shelf-portrait-card .thumbnail,
  #related-games-sidebar .mobile-shelf-island .shelf-portrait-card .thumbnail,
  #related-games-sidebar .mobile-category-shelf .mini-rail-card .thumbnail,
  #related-games-sidebar .mobile-shelf-island .mini-rail-card .thumbnail {
    aspect-ratio: 220 / 329 !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    position: relative !important;
  }

  .mobile-category-shelf .shelf-portrait-card .thumbnail img,
  .mobile-shelf-island .shelf-portrait-card .thumbnail img,
  .mobile-category-shelf .mini-rail-card .thumbnail img,
  .mobile-shelf-island .mini-rail-card .thumbnail img,
  #related-games-sidebar .mobile-category-shelf .shelf-portrait-card .thumbnail img,
  #related-games-sidebar .mobile-shelf-island .shelf-portrait-card .thumbnail img,
  #related-games-sidebar .mobile-category-shelf .mini-rail-card .thumbnail img,
  #related-games-sidebar .mobile-shelf-island .mini-rail-card .thumbnail img {
    aspect-ratio: 220 / 329 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 18px !important;
    display: block !important;
  }

  /* Masquage des titres sous les cartes portrait (titre déjà intégré dans l'affiche graphique CrazyGames) */
  .mobile-category-shelf .shelf-portrait-card .game-card-title,
  .mobile-category-shelf .shelf-portrait-card .game-info,
  .mobile-shelf-island .shelf-portrait-card .game-card-title,
  .mobile-shelf-island .shelf-portrait-card .game-info,
  #related-games-sidebar .shelf-portrait-card .game-card-title,
  #related-games-sidebar .shelf-portrait-card .game-info {
    display: none !important;
  }

  /* Vidéos de gameplay automatiques pour affiches portrait sur mobile */
  .shelf-portrait-mobile-video {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 18px !important;
    z-index: 2 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.35s ease !important;
  }

  .mobile-category-shelf .shelf-portrait-card.is-playing .shelf-portrait-mobile-video,
  .mobile-shelf-island .shelf-portrait-card.is-playing .shelf-portrait-mobile-video,
  .shelf-portrait-card.is-playing .shelf-portrait-mobile-video {
    opacity: 1 !important;
  }

  .mobile-category-shelf .shelf-portrait-card.is-playing .thumbnail img,
  .mobile-shelf-island .shelf-portrait-card.is-playing .thumbnail img,
  .shelf-portrait-card.is-playing .thumbnail img {
    opacity: 0.15 !important;
    transition: opacity 0.35s ease !important;
  }

  /* Badge indicateur discret de trailer vidéo */
  .shelf-portrait-video-badge {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    color: #ffffff !important;
    font-size: 9px !important;
    z-index: 4 !important;
    pointer-events: none !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
  }

  .shelf-portrait-video-badge .play-pulse-icon {
    display: inline-block;
    margin-left: 1px;
    font-size: 8px;
    line-height: 1;
  }

  .shelf-portrait-card.is-playing .shelf-portrait-video-badge {
    opacity: 0.2 !important;
    transform: scale(0.85) !important;
  }

  /* 4. Bannières Vidéo Gameplay Mobile (CrazyGames Style) */
  .mobile-video-banner-slot {
    display: block !important;
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin: 12px 0 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    position: relative !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: #10101c !important;
  }

  .mobile-video-banner-link {
    display: block !important;
    width: 100% !important;
    text-decoration: none !important;
    position: relative !important;
  }

  .mobile-video-banner-inner {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    overflow: hidden !important;
    border-radius: 16px !important;
  }

  .mobile-video-poster {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    z-index: 1 !important;
    transition: opacity 0.35s ease !important;
  }

  .mobile-video-player {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    z-index: 2 !important;
    opacity: 0 !important;
    transition: opacity 0.35s ease !important;
  }

  .mobile-video-banner-slot.is-playing .mobile-video-player {
    opacity: 1 !important;
  }

  .mobile-video-overlay {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 3 !important;
    padding: 10px 14px !important;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 60%, transparent 100%) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    pointer-events: none !important;
  }

  .mobile-video-meta {
    flex: 1 !important;
    min-width: 0 !important;
    margin-right: 12px !important;
  }

  .mobile-video-live-pill {
    display: none !important;
  }

  .mobile-video-title {
    color: #fff !important;
    font-family: var(--font-title) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9) !important;
  }

  .mobile-video-play-btn {
    background: var(--accent-color, #7057e0) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: inline-block !important;
    text-align: center !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4) !important;
    flex-shrink: 0 !important;
  }

  /* 5. Tiroir de Catégories Mobile (Grille Bento 2 Colonnes Tactile) */
  .category-drawer {
    width: 100% !important;
    background: rgba(18, 16, 32, 0.97) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    padding: 16px 14px 40px 14px !important;
    border-right: none !important;
  }

  .category-drawer .drawer-nav ul {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .category-drawer .drawer-nav li {
    display: block !important;
    margin: 0 !important;
    width: 100% !important;
  }

  .category-drawer .drawer-nav li a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 14px 8px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 14px !important;
    min-height: 82px !important;
    text-align: center !important;
    text-decoration: none !important;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease !important;
    position: relative !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25) !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .category-drawer .drawer-nav li a:active,
  .category-drawer .drawer-nav li a:hover {
    background: rgba(112, 87, 224, 0.25) !important;
    border-color: rgba(112, 87, 224, 0.6) !important;
    transform: scale(0.97) !important;
  }

  .category-drawer .drawer-nav li a.active {
    background: linear-gradient(135deg, rgba(112, 87, 224, 0.35) 0%, rgba(20, 20, 40, 0.9) 100%) !important;
    border-color: var(--accent-color, #7057e0) !important;
  }

  .category-drawer .drawer-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    margin: 0 0 6px 0 !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)) !important;
  }

  .category-drawer .nav-text {
    font-family: var(--font-title, sans-serif) !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .category-drawer .active-indicator {
    display: none !important;
  }

  .category-drawer .drawer-separator,
  .category-drawer .drawer-nav li:has(.drawer-separator) {
    display: none !important;
  }

  .category-drawer .drawer-footer-nav {
    margin-top: 16px !important;
    padding-top: 14px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .category-drawer .drawer-footer-links {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 12px !important;
    padding: 10px 0 !important;
  }
}

/* =========================================================================
   COMPOSANT DE GAMIFICATION SPECTACULAIRE : PLAYZOOL & BLACK GAMES
   ========================================================================= */
.gamif-modal-overlay {
  position: fixed; inset: 0; z-index: 100010;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(8, 7, 15, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: gamifFadeIn 0.25s ease-out forwards;
}
.gamif-modal-card {
  position: relative; width: 100%; max-width: 400px;
  background: linear-gradient(165deg, rgba(28, 22, 48, 0.96) 0%, rgba(14, 11, 26, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px; padding: 28px 24px 24px;
  text-align: center; color: #fff;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(112, 87, 224, 0.25);
  animation: gamifPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  overflow: hidden; box-sizing: border-box;
}
.gamif-theme-black_games .gamif-modal-card {
  background: linear-gradient(165deg, rgba(16, 18, 24, 0.97) 0%, rgba(8, 8, 12, 0.99) 100%);
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 35px rgba(0, 240, 255, 0.2);
}
.gamif-modal-close {
  position: absolute; top: 16px; right: 16px; width: 34px; height: 34px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s ease; z-index: 10;
}
.gamif-modal-close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: rotate(90deg) scale(1.08);
}
.gamif-modal-brand {
  display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 12px;
}
.gamif-modal-brand img {
  max-height: 38px; max-width: 160px; object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}
.gamif-category-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-title, sans-serif); font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px; color: #ffaa00;
  background: rgba(255, 170, 0, 0.12); border: 1px solid rgba(255, 170, 0, 0.32);
  padding: 3px 12px; border-radius: 20px;
}
.gamif-theme-black_games .gamif-category-pill {
  color: #00f0ff; background: rgba(0, 240, 255, 0.1); border-color: rgba(0, 240, 255, 0.35);
}
.gamif-stage {
  position: relative; width: 160px; height: 130px; margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
}
.gamif-sunburst {
  position: absolute; width: 220px; height: 220px; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 170, 0, 0.35) 0%, rgba(255, 94, 0, 0.12) 48%, transparent 70%);
  border-radius: 50%; animation: gamifSunburstRotate 20s linear infinite;
  pointer-events: none; z-index: 1;
}
.gamif-theme-black_games .gamif-sunburst {
  background: radial-gradient(circle, rgba(0, 240, 255, 0.3) 0%, rgba(139, 92, 246, 0.15) 50%, transparent 72%);
}
.gamif-hero-badge {
  position: relative; z-index: 2; font-size: 72px; line-height: 1;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
  animation: gamifFloat 2.6s ease-in-out infinite;
}
.gamif-xp-pill {
  position: relative; z-index: 3; margin-top: -10px;
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #ffd700 0%, #ff8800 100%);
  color: #1a0f00; font-family: var(--font-title, sans-serif);
  font-size: 16px; font-weight: 900; padding: 6px 20px; border-radius: 30px;
  box-shadow: 0 6px 18px rgba(255, 136, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.5);
  overflow: hidden;
}
.gamif-xp-pill::after {
  content: ''; position: absolute; top: -50%; left: -60%; width: 40%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: rotate(25deg); animation: gamifShine 2.8s infinite;
}
.gamif-theme-black_games .gamif-xp-pill {
  background: linear-gradient(135deg, #00f0ff 0%, #0077ff 100%);
  color: #001220; box-shadow: 0 6px 18px rgba(0, 240, 255, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.6);
}
.gamif-modal-title {
  font-family: var(--font-title, sans-serif); font-size: 23px; font-weight: 800;
  margin: 12px 0 6px; color: #ffffff; letter-spacing: -0.3px;
}
.gamif-modal-desc {
  font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, 0.78); margin: 0 0 22px;
}
.gamif-quest-name {
  color: #ffaa00; font-weight: 700;
}
.gamif-theme-black_games .gamif-quest-name {
  color: #00f0ff;
}
.gamif-btn-arcade {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 24px; font-family: var(--font-title, sans-serif);
  font-size: 16px; font-weight: 800; color: #1a0f00;
  background: linear-gradient(180deg, #ffbe26 0%, #ff8a00 100%);
  border: none; border-radius: 18px; cursor: pointer;
  box-shadow: 0 6px 0 #cc6e00, 0 12px 24px rgba(255, 138, 0, 0.4);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  user-select: none;
}
.gamif-btn-arcade:hover { filter: brightness(1.06); }
.gamif-btn-arcade:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #cc6e00, 0 6px 12px rgba(255, 138, 0, 0.4);
}
.gamif-theme-black_games .gamif-btn-arcade {
  background: linear-gradient(180deg, #00f0ff 0%, #00a3ff 100%);
  color: #001220; box-shadow: 0 6px 0 #0077b6, 0 12px 24px rgba(0, 240, 255, 0.35);
}
.gamif-theme-black_games .gamif-btn-arcade:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #0077b6, 0 6px 12px rgba(0, 240, 255, 0.35);
}
@keyframes gamifFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes gamifPopIn { 0% { opacity: 0; transform: scale(0.65) translateY(20px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes gamifSunburstRotate { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes gamifFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes gamifShine { 0% { left: -60%; } 35%, 100% { left: 140%; } }

/* --- HUD RANK CAPSULE (Header Progression Pill - Playzool Arcade) --- */
.hud-rank-capsule {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 3px 6px 3px 4px;
  background: rgba(18, 20, 32, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  cursor: pointer;
  position: relative;
  margin-right: 12px;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}
.hud-rank-capsule:hover {
  transform: translateY(-1px) scale(1.03);
  border-color: rgba(255, 170, 0, 0.6);
  box-shadow: 0 6px 18px rgba(255, 170, 0, 0.25);
}
.hud-level-badge {
  display: flex;
  align-items: baseline;
  gap: 3px;
  background: linear-gradient(135deg, #ffaa00, #ff5e00);
  color: #120b00;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(255, 110, 0, 0.45);
}
.hud-lvl-prefix {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  opacity: 0.95;
  font-family: 'Poppins', 'Inter', sans-serif;
}
.hud-lvl-number {
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  font-family: 'Poppins', 'Inter', sans-serif;
}
.hud-progress-block {
  display: flex;
  flex-direction: column;
  width: 52px;
}
.hud-xp-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  overflow: hidden;
}
.hud-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffaa00, #ffeb3b);
  border-radius: 4px;
  box-shadow: 0 0 6px rgba(255, 170, 0, 0.8);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.hud-frame-gem {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.hud-frame-gem .avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
}
.hud-frame-gem .avatar-icon {
  font-size: 14px;
  line-height: 1;
}
.hud-notif-ping {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 11px;
  height: 11px;
  background: #00e676;
  border: 2px solid #121420;
  border-radius: 50%;
  box-shadow: 0 0 8px #00e676;
  z-index: 10;
  animation: hudPing 2s infinite;
}
@keyframes hudPing {
  0%, 100% { transform: scale(1); box-shadow: 0 0 5px #00e676; }
  50% { transform: scale(1.25); box-shadow: 0 0 12px #00e676; }
}

.hud-notif-ping.hud-notif-ping--gift {
  background: #ffd700 !important;
  border-color: #2b1f05 !important;
  box-shadow: 0 0 8px #ffd700, 0 0 16px rgba(255, 215, 0, 0.7) !important;
  animation: hudPingGift 1.8s infinite !important;
}
@keyframes hudPingGift {
  0%, 100% { transform: scale(1); box-shadow: 0 0 6px #ffd700; }
  50% { transform: scale(1.35); box-shadow: 0 0 16px #ffd700, 0 0 24px rgba(255, 215, 0, 0.85); }
}

.avatar-icon--bounce {
  display: inline-block;
  animation: avatarLootBounce 1.8s cubic-bezier(0.28, 0.84, 0.42, 1) infinite;
}
@keyframes avatarLootBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-4px) scale(1.15); }
  60% { transform: translateY(-2px) scale(1.08); }
}

#header-user-level.has-ready-box {
  border-color: rgba(255, 215, 0, 0.5) !important;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.25) !important;
}

.mystery-boxes-section.highlight-section-pulse {
  animation: sectionHighlightPulse 2.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}
@keyframes sectionHighlightPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.8); }
  25% { transform: scale(1.025); box-shadow: 0 0 30px 8px rgba(255, 215, 0, 0.7), inset 0 0 15px rgba(255, 215, 0, 0.3); border-color: #ffd700; }
  60% { transform: scale(1.01); box-shadow: 0 0 20px 4px rgba(255, 215, 0, 0.45); }
  100% { transform: scale(1); box-shadow: none; }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .hud-rank-capsule {
    height: 32px;
    padding: 2px 4px 2px 3px;
    gap: 5px;
    margin-right: 6px;
  }
  .hud-progress-block {
    display: none;
  }
  .hud-level-badge {
    padding: 3px 8px;
  }
  .hud-lvl-prefix {
    font-size: 9px;
  }
  .hud-lvl-number {
    font-size: 13px;
  }
  .hud-frame-gem {
    width: 24px;
    height: 24px;
  }
  .hud-frame-gem .avatar-icon {
    font-size: 12px;
  }
}

/* --- ENCART EXPLICATIF BOUCLIER ANTI-PERTE (STREAK FREEZE) --- */
.streak-freeze-pill {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.streak-freeze-pill:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 170, 0, 0.45) !important;
  transform: translateY(-1px);
}
.streak-freeze-pill:active {
  transform: translateY(0) scale(0.97);
}
.streak-freeze-explainer {
  transform-origin: top center;
}
.close-freeze-explainer-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
  transform: scale(1.1);
}
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   CHALLENGE HUB & PERSISTENT DUEL ECOSYSTEM (PLAYZOOL)
   ========================================================================== */
.header-challenges-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 170, 0, 0.25);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  color: #fff;
}
.header-challenges-trigger:hover {
  background: rgba(255, 170, 0, 0.15);
  border-color: rgba(255, 170, 0, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 170, 0, 0.35);
}
.header-challenges-trigger .swords-icon {
  font-size: 18px;
  line-height: 1;
}
.header-challenges-trigger .challenges-counter-pill {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #ff4757, #ff6b81);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  border-radius: 9px;
  padding: 0 4px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 8px rgba(255, 71, 87, 0.6);
  border: 1.5px solid #111422;
}
.header-challenges-trigger.has-active-challenges {
  animation: challengePulseSubtle 6s infinite ease-in-out;
}
@keyframes challengePulseSubtle {
  0%, 90%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(255, 170, 0, 0); }
  95% { transform: scale(1.08); box-shadow: 0 0 14px rgba(255, 170, 0, 0.6); }
}

.tab-link.has-badge {
  position: relative;
}
.tab-badge-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff4757;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  margin-left: 5px;
  vertical-align: middle;
}

/* ==========================================================================
   FLOATING IN-GAME CHALLENGE HUD - PLAYZOOL (DESKTOP & MOBILE ADAPTED)
   ========================================================================== */

/* Structure générale Desktop */
.challenge-target-hud {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  background: rgba(15, 20, 32, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 170, 0, 0.45);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.75), 0 0 25px rgba(255, 170, 0, 0.2);
  border-radius: 36px;
  padding: 7px 14px 7px 9px;
  animation: challengeHudSlideUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  max-width: 95vw;
  box-sizing: border-box;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.challenge-hud-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.challenge-hud-game-thumb {
  width: 36px;
  height: 36px;
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  object-fit: cover;
  border: 1.5px solid rgba(255, 170, 0, 0.4);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.challenge-hud-game-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.challenge-hud-game-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.challenge-hud-versus-line {
  font-size: 13px;
  color: #f8fafc;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.challenge-hud-versus-line .hud-rival-tag {
  color: #ffaa00;
  font-weight: 800;
}

.challenge-hud-versus-line .hud-score-target {
  background: rgba(255, 170, 0, 0.15);
  border: 1px solid rgba(255, 170, 0, 0.35);
  color: #ffaa00;
  padding: 1px 7px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 12px;
}

.challenge-hud-timer {
  font-size: 11.5px;
  font-weight: 800;
  color: #ffaa00;
  background: rgba(255, 170, 0, 0.12);
  border: 1px solid rgba(255, 170, 0, 0.3);
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.challenge-hud-timer.is-urgent {
  color: #ff4757;
  background: rgba(255, 71, 87, 0.18);
  border-color: rgba(255, 71, 87, 0.45);
}

.challenge-hud-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Boutons d'actions homogènes du HUD */
.challenge-hud-toggle-btn,
.challenge-hud-abandon-btn,
.challenge-hud-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  transition: all 0.2s ease;
  flex-shrink: 0;
  line-height: 1;
}

.challenge-hud-toggle-btn:hover,
.challenge-hud-abandon-btn:hover,
.challenge-hud-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  transform: scale(1.08);
}

.challenge-hud-abandon-btn:hover,
.challenge-hud-close:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* Mode Compact Desktop */
.challenge-target-hud.is-compact {
  padding: 6px 12px;
  border-radius: 24px;
}
.challenge-target-hud.is-compact .challenge-hud-full-details {
  display: none;
}

/* Adaptation Mobile du HUD (écrans <= 768px) */
@media (max-width: 768px) {
  .challenge-target-hud {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 20px);
    max-width: 410px;
    border-radius: 20px;
    padding: 8px 12px;
  }

  .challenge-hud-content {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
  }

  .challenge-hud-game-thumb {
    width: 30px;
    height: 30px;
    border-radius: 7px;
  }

  .challenge-hud-game-info {
    flex: 1 1 auto;
    min-width: 0;
  }

  .challenge-hud-game-title {
    font-size: 11px;
    max-width: 140px;
  }

  .challenge-hud-timer {
    font-size: 10.5px;
    padding: 2px 6px;
  }

  .challenge-hud-actions {
    gap: 5px;
  }

  .challenge-hud-toggle-btn,
  .challenge-hud-abandon-btn,
  .challenge-hud-close {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .challenge-hud-versus-line {
    width: 100%;
    order: 10;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
  }

  .challenge-hud-versus-line .hud-score-target {
    font-size: 11px;
    padding: 1px 6px;
    margin-left: auto;
  }

  .challenge-target-hud.is-compact {
    width: auto;
    max-width: 90vw;
    border-radius: 999px;
    padding: 4px 10px 4px 6px;
  }

  .challenge-target-hud.is-compact .challenge-hud-content {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .challenge-target-hud.is-compact .challenge-hud-game-thumb {
    width: 26px;
    height: 26px;
  }

  .challenge-target-hud.is-compact .challenge-hud-timer,
  .challenge-target-hud.is-compact .challenge-hud-abandon-btn,
  .challenge-target-hud.is-compact .challenge-hud-close {
    display: none;
  }
}

/* ==========================================================================
   CHALLENGE HUB & DRAWER CARDS - PLAYZOOL (RESPIRATION & UX REFINED)
   ========================================================================== */

/* 1. Conteneur principal dans le panneau latéral */
.challenges-hub-wrap {
  padding: 6px 0 28px 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.challenges-hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

.challenges-hub-header h4 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.challenges-slots-badge {
  font-size: 11px;
  font-weight: 800;
  color: #ffaa00;
  background: rgba(255, 170, 0, 0.12);
  border: 1px solid rgba(255, 170, 0, 0.3);
  padding: 3px 9px;
  border-radius: 14px;
}

.challenges-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.challenges-section-heading {
  font-size: 0.95rem;
  font-weight: 800;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.challenges-section-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: -4px 0 2px 0;
  line-height: 1.4;
}

.challenges-section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.btn-reroll-challenges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-reroll-challenges:hover {
  background: rgba(255, 170, 0, 0.18);
  border-color: #ffaa00;
  color: #ffaa00;
  transform: translateY(-1px);
}

.btn-reroll-challenges:active {
  transform: scale(0.95);
}

.btn-reroll-challenges .reroll-icon {
  display: inline-block;
  font-size: 12px;
  line-height: 1;
  transition: transform 0.4s ease;
}

.btn-reroll-challenges.is-loading .reroll-icon,
.btn-reroll-challenges .reroll-icon.is-spinning {
  animation: spinReroll 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes spinReroll {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.challenges-daily-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #ffaa00;
  background: rgba(255, 170, 0, 0.12);
  border: 1px solid rgba(255, 170, 0, 0.3);
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}

/* 2. Listes de cartes avec espacement vertical garanti (CORRECTION DU BUG DE COLLAGE) */
.active-challenges-list,
.suggested-challenges-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 3. Carte de Défi unifiée */
.challenge-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.challenge-card:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
  border-color: rgba(255, 170, 0, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.challenge-card-suggested {
  border-left: 3.5px solid #ffaa00;
  background: linear-gradient(180deg, rgba(255, 170, 0, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.challenge-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.challenge-card-thumb {
  width: 46px;
  height: 46px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}

.challenge-card-meta {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.challenge-card-gamename {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.challenge-card-rival {
  font-size: 12px;
  color: #cbd5e1;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.challenge-card-rival .rival-prefix {
  color: #94a3b8;
  flex-shrink: 0;
}

.challenge-card-rival .rival-name {
  color: #ffaa00;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 135px;
  display: inline-block;
  vertical-align: middle;
}

.challenge-card-rival strong {
  color: #ffaa00;
}

.challenge-card-timer {
  font-size: 11px;
  font-weight: 700;
  color: #ffaa00;
  background: rgba(255, 170, 0, 0.12);
  border: 1px solid rgba(255, 170, 0, 0.3);
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.challenge-reward-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 7px;
  border-radius: 8px;
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}

/* 4. Bloc Dual-Stat Symétrique */
.challenge-card-stats-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(0, 0, 0, 0.32);
  border-radius: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.challenge-card-stats-dual .stat-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.challenge-card-stats-dual .target-block {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 8px;
}

.challenge-card-stats-dual .mine-block {
  padding-left: 6px;
}

.challenge-card-stats-dual .stat-dual-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.challenge-card-stats-dual .stat-dual-val {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.challenge-card-stats-dual .target-val { color: #ffaa00; }
.challenge-card-stats-dual .mine-val { color: #f1f5f9; }

/* Shimmer Skeleton pour chargement instantané */
.challenge-skeleton-card {
  pointer-events: none;
  position: relative;
  overflow: hidden;
}
.skeleton-shimmer-box,
.skeleton-shimmer-line {
  position: relative;
  overflow: hidden;
}
.skeleton-shimmer-box::after,
.skeleton-shimmer-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: challenge-shimmer 1.4s infinite ease-in-out;
}
@keyframes challenge-shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* 5. Actions de la carte */
.challenge-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}

.challenge-btn-fight {
  flex: 1;
  font-family: inherit;
  background: linear-gradient(135deg, #ffaa00 0%, #e67e00 100%);
  color: #111422;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 3px 0 rgba(180, 83, 9, 0.85), 0 6px 14px rgba(255, 170, 0, 0.25);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  user-select: none;
}

.challenge-btn-fight:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 4px 0 rgba(180, 83, 9, 0.9), 0 8px 18px rgba(255, 170, 0, 0.38);
}

.challenge-btn-fight:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(180, 83, 9, 0.9), 0 3px 8px rgba(255, 170, 0, 0.2);
}

.challenge-btn-abandon {
  font-family: inherit;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-weight: 700;
  font-size: 11px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.challenge-btn-abandon:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.challenge-empty-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  color: #94a3b8;
}

.challenge-empty-icon {
  font-size: 28px;
  margin-bottom: 8px;
  display: block;
}

.challenge-empty-text {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

/* --- SOUS-ONGLETS SEGMENTED CONTROL "MES JEUX" (FAVORIS / RÉCENTS) - PLAYZOOL --- */
.my-games-subtabs-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 18px;
  position: sticky;
  top: -20px;
  z-index: 10;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.my-games-subtab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #a0a0a0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  text-decoration: none;
}

.my-games-subtab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.my-games-subtab-btn.active {
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.22), rgba(255, 136, 0, 0.14));
  border-color: rgba(255, 170, 0, 0.45);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(255, 170, 0, 0.2);
}

.my-games-subtab-btn .subtab-icon {
  font-size: 14px;
  line-height: 1;
}

.my-games-subtab-btn .subtab-label {
  letter-spacing: 0.2px;
}

.my-games-subtab-btn .subtab-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #e0e0e0;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
  transition: all 0.2s ease;
}

.my-games-subtab-btn.active .subtab-badge {
  background: #ffaa00;
  color: #0b0e14;
  font-weight: 900;
}

/* =========================================================================
   HUD BOOST CAPSULE (Playzool Arcade Golden/Electric)
   ========================================================================= */
.hud-boost-capsule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 3px 10px 3px 8px;
  background: rgba(26, 18, 8, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 170, 0, 0.65);
  border-radius: 999px;
  box-shadow: 0 4px 15px rgba(255, 170, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
  position: relative;
  margin-right: 10px;
  user-select: none;
  animation: boostPulsePlayzool 2s infinite ease-in-out;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}
.hud-boost-capsule:hover {
  transform: translateY(-1px) scale(1.04);
  border-color: #ffd000;
  box-shadow: 0 6px 20px rgba(255, 170, 0, 0.45);
}
@keyframes boostPulsePlayzool {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(255, 170, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 170, 0, 0.65);
  }
  50% {
    box-shadow: 0 4px 22px rgba(255, 170, 0, 0.55), 0 0 10px rgba(255, 215, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: #ffd000;
  }
}
.hud-boost-icon {
  font-size: 16px;
  filter: drop-shadow(0 0 6px #ffaa00);
  animation: boostZap 1.4s infinite ease-in-out;
}
@keyframes boostZap {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.22) rotate(-8deg); }
}
.hud-boost-percent {
  font-size: 12px;
  font-weight: 900;
  color: #ffaa00;
  font-family: var(--font-title, 'Inter', sans-serif);
  letter-spacing: 0.3px;
}
.hud-boost-timer {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: rgba(255, 170, 0, 0.22);
  padding: 2px 7px;
  border-radius: 999px;
  font-family: 'Inter', monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}
@media (max-width: 768px) {
  .hud-boost-capsule {
    height: 32px;
    padding: 2px 8px 2px 6px;
    gap: 4px;
    margin-right: 6px;
  }
  .hud-boost-icon {
    font-size: 14px;
  }
  .hud-boost-percent {
    font-size: 11px;
  }
  .hud-boost-timer {
    font-size: 10px;
    padding: 2px 5px;
  }
}

/* =========================================================================
   XP BOOST PANEL BANNER (Drawer Quests & Profile)
   ========================================================================= */
.xp-boost-panel-banner {
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.16) 0%, rgba(255, 94, 0, 0.08) 100%);
  border: 1.5px solid rgba(255, 170, 0, 0.45);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(255, 170, 0, 0.15);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  scroll-margin-top: 70px;
  scroll-margin-bottom: 40px;
}
.xp-boost-panel-banner:hover {
  transform: scale(1.015);
  border-color: #ffd000;
  box-shadow: 0 6px 20px rgba(255, 170, 0, 0.3);
}
.xp-boost-panel-banner.xp-boost-surge-active {
  animation: xpBoostSurgePlayzool 2.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  z-index: 10;
}
@keyframes xpBoostSurgePlayzool {
  0% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.035);
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.8), 0 8px 30px rgba(255, 170, 0, 0.65);
    filter: brightness(1.2);
  }
  40% {
    transform: scale(1.02);
    border-color: #ffaa00;
    box-shadow: 0 0 0 2px rgba(255, 170, 0, 0.6), 0 6px 22px rgba(255, 170, 0, 0.45);
  }
  75% {
    transform: scale(1.01);
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.35);
  }
  100% {
    transform: scale(1);
    border-color: rgba(255, 170, 0, 0.45);
    box-shadow: 0 4px 15px rgba(255, 170, 0, 0.15);
    filter: brightness(1);
  }
}
.xp-boost-panel-banner .xp-boost-banner-icon {
  font-size: 26px;
  animation: boostZap 1.5s infinite ease-in-out;
  filter: drop-shadow(0 0 8px rgba(255, 170, 0, 0.6));
}
.xp-boost-panel-banner .xp-boost-banner-info {
  flex: 1;
  min-width: 0;
}
.xp-boost-panel-banner .xp-boost-banner-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #ffaa00;
  letter-spacing: 0.3px;
}
.xp-boost-panel-banner .xp-boost-banner-pct {
  background: #ffaa00;
  color: #120b00;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 8px;
}
.xp-boost-panel-banner .xp-boost-banner-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 2px;
}
.xp-boost-panel-banner .xp-boost-banner-countdown {
  color: #ffd000;
  font-family: monospace;
  font-size: 12px;
}

/* =========================================================================
   3D CARD FLIP LOOT BOX ENGINE
   ========================================================================= */
.gamif-cards-stage {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 14px;
  perspective: 1200px;
  margin: 16px 0 20px;
  flex-wrap: wrap;
}
.gamif-card-wrapper {
  position: relative;
  width: 140px;
  height: 205px;
  cursor: pointer;
  user-select: none;
  border-radius: 16px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gamif-card-wrapper:hover:not(.is-flipped) {
  transform: translateY(-8px) scale(1.04);
}
.gamif-card-wrapper.is-flipped {
  cursor: default;
}
.gamif-card-3d {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.2, 0.85, 0.3, 1.15);
  border-radius: 16px;
}
.gamif-card-wrapper.is-flipped .gamif-card-3d {
  transform: rotateY(180deg);
}
.gamif-card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
  box-sizing: border-box;
}
.gamif-card-back {
  transform: rotateY(0deg);
  background: linear-gradient(150deg, #1d1730 0%, #0d0a18 100%);
  border: 2px solid #ffaa00;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.65), inset 0 0 16px rgba(255, 170, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 14px 10px;
  text-align: center;
}
.gamif-card-back-pattern {
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(255, 170, 0, 0.4);
  border-radius: 12px;
  pointer-events: none;
}
.gamif-card-back-logo {
  height: 24px;
  max-width: 90px;
  object-fit: contain;
  margin-top: 4px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}
.gamif-card-back-emblem {
  font-size: 38px;
  filter: drop-shadow(0 4px 12px rgba(255, 170, 0, 0.5));
  animation: cardEmblemPulse 2.2s infinite ease-in-out;
}
@keyframes cardEmblemPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 4px 12px rgba(255, 170, 0, 0.4)); }
  50% { transform: scale(1.1) translateY(-3px); filter: drop-shadow(0 6px 18px rgba(255, 215, 0, 0.8)); }
}
.gamif-card-back-hint {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 170, 0, 0.18);
  border: 1px solid rgba(255, 170, 0, 0.45);
  color: #ffd000;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  animation: cardHintPulse 1.6s infinite ease-in-out;
}
@keyframes cardHintPulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
.gamif-card-front {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 14px 10px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
}
.gamif-card-front.card-type-xp {
  background: linear-gradient(155deg, #2b1f06 0%, #151003 100%);
  border: 2px solid #ffb700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), 0 0 18px rgba(255, 183, 0, 0.4);
}
.gamif-card-front.card-type-boost {
  background: linear-gradient(155deg, #1f0d3a 0%, #0c081e 100%);
  border: 2px solid #00f0ff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 240, 255, 0.45);
}
.gamif-card-front.card-type-freeze {
  background: linear-gradient(155deg, #05263a 0%, #03141f 100%);
  border: 2px solid #48cae4;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), 0 0 18px rgba(72, 202, 228, 0.4);
}
.gamif-card-front.card-type-frame,
.gamif-card-front.card-type-title {
  background: linear-gradient(155deg, #300c38 0%, #16031f 100%);
  border: 2px solid #e056fd;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), 0 0 22px rgba(224, 86, 253, 0.5);
}
.card-rarity-pill {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.card-type-xp .card-rarity-pill {
  background: rgba(255, 170, 0, 0.25);
  border-color: rgba(255, 170, 0, 0.55);
  color: #ffd000;
}
.card-type-boost .card-rarity-pill {
  background: rgba(0, 240, 255, 0.2);
  border-color: rgba(0, 240, 255, 0.55);
  color: #00f0ff;
}
.card-type-freeze .card-rarity-pill {
  background: rgba(72, 202, 228, 0.25);
  border-color: rgba(72, 202, 228, 0.55);
  color: #ade8f4;
}
.card-type-frame .card-rarity-pill,
.card-type-title .card-rarity-pill {
  background: rgba(224, 86, 253, 0.25);
  border-color: rgba(224, 86, 253, 0.55);
  color: #f3a6ff;
}
.card-hero-icon {
  font-size: 44px;
  margin: 8px 0;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  animation: cardHeroPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cardHeroPop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.card-hero-value {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 2px;
  max-width: 100%;
  word-break: break-word;
}
.card-foil-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.35) 45%, transparent 70%);
  transform: translateX(-150%);
  pointer-events: none;
}
.gamif-card-wrapper.is-flipped .card-foil-sheen {
  animation: cardFoilSweep 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.35s forwards;
}
@keyframes cardFoilSweep {
  0% { transform: translateX(-150%); }
  100% { transform: translateX(150%); }
}
@media (max-width: 480px) {
  .gamif-cards-stage {
    gap: 8px;
    margin: 12px 0 16px;
  }
  .gamif-card-wrapper {
    width: 102px;
    height: 165px;
  }
  .gamif-card-back, .gamif-card-front {
    padding: 10px 6px;
  }
  .gamif-card-back-logo {
    height: 18px;
    max-width: 65px;
  }
  .gamif-card-back-emblem {
    font-size: 28px;
  }
  .gamif-card-back-hint {
    font-size: 8px;
    padding: 2px 5px;
  }
  .card-hero-icon {
    font-size: 32px;
    margin: 4px 0;
  }
  .card-hero-value {
    font-size: 11px;
  }
  .card-rarity-pill {
    font-size: 8px;
    padding: 1px 5px;
  }
}

/* ==========================================================================
   HUB DE REBOND EN FIN DE CATALOGUE (PLAYZOOL THEME)
   ========================================================================== */
.catalog-rebound-hub {
  display: block;
  width: 100%;
  margin: 40px 0 20px;
  position: relative;
  z-index: 5;
}

.rebound-island-wrapper {
  background: linear-gradient(135deg, rgba(28, 20, 52, 0.95) 0%, rgba(18, 14, 38, 0.98) 100%);
  border: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 35px rgba(124, 58, 237, 0.16);
  border-radius: 24px;
  padding: 30px 28px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(14px);
  box-sizing: border-box;
}

.rebound-island-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #7c3aed, #ffaa00, #7c3aed, transparent);
  opacity: 0.8;
}

.rebound-header {
  text-align: center;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.rebound-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ffaa00;
  background: rgba(255, 170, 0, 0.15);
  border: 1px solid rgba(255, 170, 0, 0.35);
  padding: 4px 14px;
  border-radius: 999px;
  display: inline-block;
}

.rebound-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
}

.rebound-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.rebound-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-sizing: border-box;
}

.rebound-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.rebound-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.rebound-status-pill {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.rebound-status-pill.status-active {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.rebound-status-pill.status-bonus {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.rebound-status-pill.status-ready {
  background: rgba(250, 204, 21, 0.22);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.6);
  animation: reboundReadyPillGlow 2s infinite ease-in-out;
}

@keyframes reboundReadyPillGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(250, 204, 21, 0.2); }
  50% { box-shadow: 0 0 14px rgba(250, 204, 21, 0.5); }
}

.rebound-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.3;
}

/* Slot A : Challenge / Duel */
.rebound-challenge-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
  justify-content: space-between;
}

.rebound-challenge-game {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.rebound-challenge-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.rebound-challenge-info {
  flex: 1;
  min-width: 0;
}

.rebound-game-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rebound-rival-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #cbd5e1;
  margin-top: 3px;
}

.rebound-rival-prefix {
  color: #94a3b8;
}

.rebound-rival-name {
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}

.rebound-lvl-pill {
  font-size: 10px;
  font-weight: 800;
  background: rgba(255, 170, 0, 0.25);
  color: #ffaa00;
  padding: 1px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 170, 0, 0.4);
}

.rebound-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rebound-stat-item {
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 10px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.rebound-stat-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}

.rebound-stat-val {
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.rebound-stat-val.target-val {
  color: #fbbf24;
}

.rebound-stat-val.best-val {
  color: #38bdf8;
}

.rebound-stat-val.reward-val {
  color: #4ade80;
}

.rebound-empty-challenge {
  text-align: center;
  padding: 18px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}

.rebound-empty-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 6px;
}

.rebound-empty-text {
  font-size: 12px;
  color: #cbd5e1;
  margin: 0;
}

/* Slot B : Quests & Progression */
.rebound-quests-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
  justify-content: space-between;
}

.rebound-quests-counter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}

.rebound-quests-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.rebound-quests-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.4s ease;
}

.rebound-quest-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.rebound-quest-preview.is-ready-pulse {
  border-color: rgba(74, 222, 128, 0.45) !important;
  animation: questReadyPulse 2s infinite;
}

@keyframes questReadyPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(74, 222, 128, 0); }
  50% { box-shadow: 0 0 16px rgba(74, 222, 128, 0.35); }
}

.rebound-quest-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.rebound-quest-meta {
  flex: 1;
  min-width: 0;
}

.rebound-quest-name {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rebound-quest-status-badge.ready {
  font-size: 11px;
  font-weight: 800;
  color: #4ade80;
}

.rebound-quest-mini-prog-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  margin-top: 4px;
  overflow: hidden;
}

.rebound-quest-mini-prog-fill {
  height: 100%;
  background: #ffaa00;
}

.rebound-quest-counts {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
  flex-shrink: 0;
}

.rebound-quest-sub {
  font-size: 11px;
  color: #94a3b8;
  display: block;
}

/* Slot C : Navigation & Actions */
.rebound-actions-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
  justify-content: center;
}

.rebound-action-btn {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: left;
  font-family: inherit;
  box-sizing: border-box;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.rebound-action-btn:hover {
  transform: translateY(-2.5px) scale(1.015);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.rebound-action-btn:active {
  transform: translateY(-1px) scale(0.985);
}

/* Badge carré arrondi dédié (40x40px) */
.rebound-badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.2s ease;
}

.rebound-action-btn:hover .rebound-badge-icon {
  transform: scale(1.08) rotate(-4deg);
}

.rebound-glyph {
  font-size: 20px;
  line-height: 1;
  display: inline-block;
}

/* Bloc texte hiérarchique */
.rebound-action-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
  min-width: 0;
}

.rebound-action-text {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rebound-action-hint {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chevron d'engagement */
.rebound-action-arrow {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  font-weight: 800;
}

.rebound-action-btn:hover .rebound-action-arrow {
  transform: translateX(3px);
  color: #ffffff;
}

.rebound-btn-back-to-top:hover .rebound-arrow-up {
  transform: translateY(-3px);
}

/* 1. Jeu Aléatoire (Ambre Chaleureux) */
.rebound-btn-random-game {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(217, 119, 6, 0.08));
  border-color: rgba(245, 158, 11, 0.25);
}
.rebound-btn-random-game:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(217, 119, 6, 0.16));
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.25);
}
.rebound-btn-random-game:hover .rebound-badge-icon {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.3);
}

/* 2. Explorer Catégories (Violet / Magenta) */
.rebound-btn-categories {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.16), rgba(126, 34, 206, 0.08));
  border-color: rgba(168, 85, 247, 0.25);
}
.rebound-btn-categories:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(126, 34, 206, 0.16));
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.25);
}
.rebound-btn-categories:hover .rebound-badge-icon {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.3);
}

/* 3. Revenir en haut (Bleu Royal / Indigo) */
.rebound-btn-back-to-top {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(67, 56, 202, 0.08));
  border-color: rgba(99, 102, 241, 0.25);
}
.rebound-btn-back-to-top:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.28), rgba(67, 56, 202, 0.16));
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
}
.rebound-btn-back-to-top:hover .rebound-badge-icon {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.3);
}

/* 4. Action Capsule Héroïque (Duel / Défi - Ambre & Flamme Arcade) */
.rebound-action-btn-heroic {
  background: linear-gradient(135deg, rgba(255, 126, 0, 0.2), rgba(239, 68, 68, 0.1));
  border-color: rgba(255, 126, 0, 0.35);
  box-shadow: 0 4px 14px rgba(255, 126, 0, 0.15);
}
.rebound-action-btn-heroic:hover {
  background: linear-gradient(135deg, rgba(255, 126, 0, 0.32), rgba(239, 68, 68, 0.2));
  border-color: rgba(255, 126, 0, 0.7);
  box-shadow: 0 8px 24px rgba(255, 126, 0, 0.35);
}
.rebound-action-btn-heroic .rebound-badge-icon {
  background: rgba(255, 126, 0, 0.16);
  border-color: rgba(255, 126, 0, 0.4);
}
.rebound-action-btn-heroic:hover .rebound-badge-icon {
  background: rgba(255, 126, 0, 0.28);
  border-color: rgba(255, 126, 0, 0.7);
  box-shadow: 0 0 16px rgba(255, 126, 0, 0.45);
}

/* 5. Action Capsule Quêtes (Émeraude / Butin) */
.rebound-action-btn-quests {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(5, 150, 105, 0.08));
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}
.rebound-action-btn-quests:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(5, 150, 105, 0.16));
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}
.rebound-action-btn-quests .rebound-badge-icon {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
}
.rebound-action-btn-quests:hover .rebound-badge-icon {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

/* Quête prête : Aura pulsante dorée / émeraude */
.rebound-action-btn.has-quest-ready-glow {
  border-color: rgba(250, 204, 21, 0.7) !important;
  animation: reboundQuestReadyPulse 2.2s ease-in-out infinite;
}
.rebound-action-btn.has-quest-ready-glow .rebound-badge-icon {
  background: rgba(250, 204, 21, 0.2);
  border-color: rgba(250, 204, 21, 0.6);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.4);
}
.rebound-action-btn .ready-hint-gold {
  color: #facc15 !important;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.4);
}

@keyframes reboundQuestReadyPulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(250, 204, 21, 0.25), inset 0 0 10px rgba(250, 204, 21, 0.08);
  }
  50% {
    box-shadow: 0 8px 25px rgba(250, 204, 21, 0.45), inset 0 0 16px rgba(250, 204, 21, 0.18);
    border-color: rgba(250, 204, 21, 0.95) !important;
  }
}

/* Rebound Common Buttons */
.rebound-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  border: none;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.rebound-btn-primary {
  background: linear-gradient(90deg, #ffaa00, #ff5e00);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(255, 170, 0, 0.35);
}

.rebound-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 170, 0, 0.5);
}

.rebound-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.rebound-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.rebound-btn.has-glow {
  border-color: rgba(74, 222, 128, 0.6);
  background: linear-gradient(90deg, #059669, #10b981);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* Responsive Media Queries */
@media (max-width: 991px) {
  .rebound-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .rebound-island-wrapper {
    padding: 22px 18px;
    margin: 30px auto 15px;
    border-radius: 20px;
  }
  .rebound-title {
    font-size: 19px;
  }
}

/* =========================================================================
   HEADER DAILY STREAK CAPSULE (#header-streak-badge)
   ========================================================================= */
.hud-streak-capsule {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  font-family: inherit;
  font-weight: 900;
  font-size: 13px;
  line-height: 1;
  margin-right: 4px;
  user-select: none;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease;
}
.hud-streak-capsule:hover {
  transform: translateY(-1px) scale(1.04);
}
.hud-streak-capsule.is-unlit {
  background: rgba(255, 152, 0, 0.1);
  border: 1.5px dashed rgba(255, 170, 0, 0.5);
  color: #ffd580;
  animation: streakPillPulsePz 2.4s infinite ease-in-out;
}
.hud-streak-capsule.is-unlit .hud-streak-flame {
  filter: grayscale(0.55) brightness(0.95);
  font-size: 15px;
  line-height: 1;
}
.hud-streak-capsule.is-lit {
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.24), rgba(255, 85, 0, 0.34));
  border: 1.5px solid rgba(255, 185, 0, 0.7);
  color: #ffd700;
  box-shadow: 0 0 14px rgba(255, 140, 0, 0.28);
}
.hud-streak-capsule.is-lit .hud-streak-flame {
  filter: drop-shadow(0 0 6px rgba(255, 140, 0, 0.85));
  font-size: 15px;
  line-height: 1;
  animation: streakHeaderFlameBob 1.9s infinite ease-in-out;
}
.hud-streak-ping {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff3d00;
  border: 1.5px solid #181828;
  box-shadow: 0 0 8px rgba(255, 61, 0, 0.9);
  pointer-events: none;
  animation: streakPingPulse 1.6s infinite ease-in-out;
}
@keyframes streakPillPulsePz {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 152, 0, 0); border-color: rgba(255, 170, 0, 0.45); }
  50% { box-shadow: 0 0 12px 2px rgba(255, 152, 0, 0.22); border-color: rgba(255, 170, 0, 0.85); }
}
@keyframes streakHeaderFlameBob {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.12) rotate(3deg); }
}
@keyframes streakPingPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.75; }
}
@media (max-width: 768px) {
  .hud-streak-capsule {
    height: 30px;
    padding: 0 8px;
    font-size: 11.5px;
    gap: 4px;
    margin-right: 2px;
  }
  .hud-streak-capsule .hud-streak-flame {
    font-size: 13px !important;
  }
}

/* === PLAYZOOL CASUAL ROYAL THEME CONSOLIDATED (v2.2.6) === */
/* =========================================================
           PLAYZOOL CASUAL ROYAL THEME — FLOATING GLASS HEADER & DRAWERS
           ========================================================= */
        body {
            background-color: #0e091c !important;
            background-image:
                radial-gradient(ellipse at 50% 0%, rgba(124, 58, 237, 0.16) 0%, transparent 65%),
                radial-gradient(ellipse at 85% 25%, rgba(99, 102, 241, 0.08) 0%, transparent 50%) !important;
            background-attachment: fixed !important;
        }
        /* 1. FLOATING GLASS PILL HEADER (FIN, AÉRÉ & ANTI-ENFERMEMENT) */
        .site-header {
            position: fixed !important;
            top: 10px !important;
            left: 50% !important;
            right: auto !important;
            transform: translateX(-50%) translateY(0) !important;
            width: calc(100% - 28px) !important;
            max-width: 1560px !important;
            height: 52px !important;
            min-height: 52px !important;
            padding: 0 14px !important;
            margin: 0 !important;
            border-radius: 999px !important;
            background: linear-gradient(180deg, rgba(28, 17, 54, 0.72) 0%, rgba(16, 10, 32, 0.78) 100%) !important;
            backdrop-filter: blur(18px) saturate(150%) !important;
            -webkit-backdrop-filter: blur(18px) saturate(150%) !important;
            border: 1px solid rgba(168, 85, 247, 0.28) !important;
            border-bottom: 1px solid rgba(246, 196, 83, 0.32) !important;
            box-shadow: 0 8px 28px rgba(5, 2, 14, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
            transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease, background 0.25s ease, box-shadow 0.25s ease !important;
            z-index: 1200 !important;
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            box-sizing: border-box !important;
        }
        /* Header reste toujours en place (pas d'auto-hide au scroll) */
        .site-header.is-hidden {
            transform: translateX(-50%) translateY(0) !important;
            opacity: 1 !important;
            pointer-events: auto !important;
        }
        /* Allègement des éléments internes du header */
        .site-header .header-content {
            height: 100% !important;
            display: flex !important;
            align-items: center !important;
            padding: 0 !important;
            margin: 0 !important;
            width: auto !important;
            max-width: none !important;
            flex: 0 0 auto !important;
        }
        .site-header .header-left {
            display: flex !important;
            align-items: center !important;
            gap: 8px !important;
        }
        .site-header .logo img {
            max-height: 32px !important;
            width: auto !important;
            display: block !important;
            filter: drop-shadow(0 2px 5px rgba(8, 3, 20, 0.55)) !important;
        }
        /* Boutons ronds du header (Menu / Retour / Plein écran) */
        #open-drawer-button,
        #back-to-home-button,
        #drawer-back-button,
        .drawer-back-button {
            width: 36px !important;
            height: 36px !important;
            min-width: 36px !important;
            max-width: 36px !important;
            min-height: 36px !important;
            max-height: 36px !important;
            flex: 0 0 36px !important;
            aspect-ratio: 1 / 1 !important;
            border-radius: 50% !important;
            padding: 0 !important;
            background: rgba(139, 92, 246, 0.14) !important;
            border: 1px solid rgba(167, 139, 250, 0.30) !important;
            color: #f5f3ff !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            box-sizing: border-box !important;
            transition: all 0.2s ease !important;
        }
        #back-to-home-button[style*="display: none"],
        #back-to-home-button[style*="display:none"] {
            display: none !important;
        }
        #drawer-back-button {
            display: none !important;
        }
        #drawer-back-button span,
        .drawer-back-button span {
            display: none !important;
        }
        #open-drawer-button:hover,
        #back-to-home-button:hover,
        #drawer-back-button:hover {
            background: rgba(139, 92, 246, 0.28) !important;
            border-color: rgba(246, 196, 83, 0.65) !important;
            color: #fde68a !important;
            transform: translateY(-1px) !important;
        }
        /* Barre de recherche compacte en pilule de verre */
        .site-header .drawer-search-bar-mobile .search-input-wrapper input#search-input-mobile,
        .category-drawer .drawer-search-bar-mobile .search-input-wrapper input#search-input-mobile {
            height: 36px !important;
            background: rgba(12, 7, 26, 0.55) !important;
            border: 1px solid rgba(139, 92, 246, 0.32) !important;
            border-radius: 999px !important;
            color: #ffffff !important;
            font-size: 13.5px !important;
            padding-top: 0 !important;
            padding-bottom: 0 !important;
            box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.35) !important;
            transition: all 0.22s ease !important;
        }
        .site-header .drawer-search-bar-mobile .search-input-wrapper input#search-input-mobile::placeholder,
        .category-drawer .drawer-search-bar-mobile .search-input-wrapper input#search-input-mobile::placeholder {
            color: #a78bfa !important;
            opacity: 0.78 !important;
        }
        .site-header .drawer-search-bar-mobile .search-input-wrapper input#search-input-mobile:focus,
        .category-drawer .drawer-search-bar-mobile .search-input-wrapper input#search-input-mobile:focus {
            background: rgba(18, 11, 38, 0.92) !important;
            border-color: rgba(246, 196, 83, 0.75) !important;
            box-shadow: 0 0 14px rgba(246, 196, 83, 0.22), inset 0 2px 5px rgba(0, 0, 0, 0.45) !important;
            outline: none !important;
        }

        /* 2. FLOATING LEFT DOCK (TIROIR GAUCHE FLOTTANT DÉCOLLÉ DU HEADER & DU BORD) */
        .category-drawer {
            background: linear-gradient(180deg, rgba(28, 17, 54, 0.78) 0%, rgba(15, 9, 30, 0.86) 100%) !important;
            backdrop-filter: blur(18px) saturate(145%) !important;
            -webkit-backdrop-filter: blur(18px) saturate(145%) !important;
            border: 1px solid rgba(168, 85, 247, 0.26) !important;
            box-shadow: 0 12px 32px rgba(4, 2, 12, 0.50), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
            box-sizing: border-box !important;
            scrollbar-width: none !important;
            -ms-overflow-style: none !important;
        }
        .category-drawer::-webkit-scrollbar,
        .category-drawer:hover::-webkit-scrollbar {
            display: none !important;
            width: 0 !important;
            height: 0 !important;
        }
        @media (min-width: 769px) {
            body:not(.game-page-layout) .category-drawer {
                top: 72px !important;
                left: 12px !important;
                width: 64px !important;
                height: calc(100vh - 84px) !important;
                padding: 8px 0 !important;
                border-radius: 22px !important;
                border: 1px solid rgba(168, 85, 247, 0.26) !important;
                overflow-x: hidden !important;
                transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease, box-shadow 0.25s ease !important;
            }
            /* Survol ou épinglage du dock gauche : élargissement fluide, fond plus lisible et lueur dorée */
            body.drawer-hover:not(.game-page-layout) .category-drawer,
            body.drawer-pinned:not(.game-page-layout) .category-drawer,
            body.drawer-open:not(.game-page-layout) .category-drawer {
                width: var(--drawer-width-expanded, 240px) !important;
                background: linear-gradient(180deg, rgba(30, 19, 58, 0.95) 0%, rgba(16, 10, 32, 0.97) 100%) !important;
                border-color: rgba(246, 196, 83, 0.42) !important;
                box-shadow: 10px 14px 38px rgba(4, 2, 12, 0.72), 0 0 24px rgba(124, 58, 237, 0.22) !important;
            }
            /* Centrage géométrique parfait des icônes 24x24 dans le dock replié de 64px :
               1px border + 6px margin + 13px padding = 20px à gauche et 20px à droite (20 + 24 + 20 = 64px) */
            .category-drawer .drawer-nav li a {
                margin: 2px 6px !important;
                padding: 10px 13px !important;
                justify-content: flex-start !important;
                box-sizing: border-box !important;
            }
            body.drawer-hover .category-drawer .drawer-nav li a,
            body.drawer-pinned .category-drawer .drawer-nav li a {
                padding: 10px 13px !important;
                justify-content: flex-start !important;
            }
            /* Quand le dock est replié, .nav-text ne doit occuper strictement aucun pixel (padding-left: 0) */
            body:not(.drawer-hover):not(.drawer-pinned) .category-drawer .drawer-nav .nav-text {
                max-width: 0 !important;
                margin-left: 0 !important;
                padding-left: 0 !important;
                opacity: 0 !important;
                overflow: hidden !important;
            }
            body.drawer-hover .category-drawer .drawer-nav .nav-text,
            body.drawer-pinned .category-drawer .drawer-nav .nav-text {
                max-width: 155px !important;
                margin-left: 12px !important;
                padding-left: 0 !important;
                opacity: 1 !important;
            }
            /* Sur la page de jeu (game-page-layout), le tiroir s'ouvre en panneau flottant */
            body.game-page-layout .category-drawer {
                top: 70px !important;
                height: calc(100vh - 82px) !important;
                border-radius: 0 22px 22px 0 !important;
                border-right: 1.5px solid rgba(246, 196, 83, 0.45) !important;
            }
            /* Espace contenu principal fluide et respirant */
            body:not(.game-page-layout) .site-main-content {
                padding-top: 72px !important;
                margin-left: 78px !important;
                padding-right: 12px !important;
            }
            /* Masquer tout élément de recherche éventuellement resté dans le tiroir sur desktop */
            .category-drawer .drawer-search-bar-mobile {
                display: none !important;
            }
        }
        .category-drawer .drawer-nav li a {
            border-radius: 12px !important;
            color: #e9d5ff !important;
            transition: all 0.2s ease !important;
        }
        .category-drawer .drawer-nav li a:hover {
            background: linear-gradient(90deg, rgba(124, 58, 237, 0.28) 0%, rgba(124, 58, 237, 0.06) 100%) !important;
            color: #ffffff !important;
            box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.3) !important;
        }
        .category-drawer .drawer-nav li a.active {
            background: linear-gradient(90deg, rgba(246, 196, 83, 0.20) 0%, rgba(124, 58, 237, 0.18) 100%) !important;
            color: #fde68a !important;
            box-shadow: inset 0 0 0 1px rgba(246, 196, 83, 0.45) !important;
        }
        .category-drawer .drawer-nav li a.active .active-indicator {
            background: linear-gradient(180deg, #fde047, #f59e0b) !important;
            box-shadow: 0 0 8px rgba(245, 158, 11, 0.7) !important;
        }
        .category-drawer .drawer-separator {
            background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.25), transparent) !important;
            height: 1px !important;
            border: none !important;
        }
        .category-drawer .lang-dropdown-btn {
            background: rgba(15, 9, 30, 0.75) !important;
            border: 1px solid rgba(167, 139, 250, 0.35) !important;
            border-radius: 10px !important;
            color: #f3e8ff !important;
        }
        .category-drawer .lang-dropdown-list {
            background: #1a1033 !important;
            border: 1px solid rgba(246, 196, 83, 0.45) !important;
            border-radius: 12px !important;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.75) !important;
        }

        /* 3. FLOATING RIGHT USER PANEL (TIROIR GAMIFICATION FLOTTANT SYMÉTRIQUE AU HEADER & DOCK GAUCHE) */
        .panel-overlay {
            background: rgba(6, 3, 15, 0.55) !important;
            backdrop-filter: blur(6px) !important;
            -webkit-backdrop-filter: blur(6px) !important;
            z-index: 1190 !important; /* Sous .site-header (1200) pour garder le HUD visible et net */
        }
        #user-games-panel,
        #user-panel {
            background: linear-gradient(170deg, rgba(37, 22, 77, 0.95) 0%, rgba(20, 11, 41, 0.98) 55%, rgba(13, 7, 28, 0.99) 100%) !important;
            backdrop-filter: blur(20px) saturate(150%) !important;
            -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
            border: 1.5px solid rgba(246, 196, 83, 0.52) !important;
            box-shadow: none !important;
            color: #ffffff !important;
            overflow: hidden !important;
            box-sizing: border-box !important;
            z-index: 1251 !important;
        }
        @media (min-width: 769px) {
            #user-games-panel,
            #user-panel {
                top: 72px !important;
                right: 12px !important;
                width: 420px !important;
                max-width: calc(100vw - 24px) !important;
                height: calc(100vh - 84px) !important;
                border-radius: 24px !important;
                transform: translateX(calc(100% + 28px)) !important;
                transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease, border-color 0.25s ease !important;
            }
            body.panel-open #user-games-panel,
            body.panel-open #user-panel {
                transform: translateX(0) !important;
                box-shadow:
                    -14px 18px 48px rgba(4, 2, 12, 0.82),
                    0 0 32px rgba(124, 58, 237, 0.28),
                    0 0 0 1px rgba(246, 196, 83, 0.22),
                    inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
            }
        }
        #user-games-panel .panel-header,
        #user-panel .panel-header {
            padding: 13px 18px !important;
            background: linear-gradient(180deg, rgba(124, 58, 237, 0.26) 0%, rgba(20, 11, 41, 0.90) 100%) !important;
            border-bottom: 1px solid rgba(246, 196, 83, 0.32) !important;
        }
        #user-games-panel .panel-header h3,
        #user-panel .panel-header h3 {
            font-family: 'Poppins', sans-serif !important;
            font-size: 16px !important;
            font-weight: 800 !important;
            color: #fef08a !important;
            text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
        }
        #user-games-panel .close-button,
        #user-panel .close-button {
            width: 32px !important;
            height: 32px !important;
            border-radius: 50% !important;
            background: rgba(139, 92, 246, 0.18) !important;
            border: 1px solid rgba(167, 139, 250, 0.35) !important;
            color: #f3e8ff !important;
            font-size: 20px !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            transition: all 0.2s ease !important;
        }
        #user-games-panel .close-button:hover,
        #user-panel .close-button:hover {
            background: rgba(246, 196, 83, 0.22) !important;
            border-color: #fde047 !important;
            color: #fde047 !important;
            transform: scale(1.06) !important;
        }
        #user-games-panel .panel-tabs,
        #user-panel .panel-tabs {
            background: rgba(11, 6, 24, 0.75) !important;
            border-bottom: 1px solid rgba(139, 92, 246, 0.26) !important;
            padding: 6px 8px !important;
            gap: 4px !important;
        }
        #user-games-panel .tab-link,
        #user-panel .tab-link {
            border-radius: 12px !important;
            border-bottom: none !important;
            padding: 9px 8px !important;
            font-size: 12.5px !important;
            font-weight: 700 !important;
            color: #c4b5fd !important;
            transition: all 0.2s ease !important;
        }
        #user-games-panel .tab-link:hover,
        #user-panel .tab-link:hover {
            background: rgba(139, 92, 246, 0.16) !important;
            color: #ffffff !important;
        }
        #user-games-panel .tab-link.active,
        #user-panel .tab-link.active {
            background: linear-gradient(135deg, rgba(246, 196, 83, 0.22) 0%, rgba(124, 58, 237, 0.28) 100%) !important;
            border: 1px solid rgba(246, 196, 83, 0.55) !important;
            color: #fef08a !important;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
        }

        /* 4. GAME CARDS, "WELCOME TO PLAYZOOL" & "SEE MORE" BLOCKS (Casual Royal Glass Polish) */
        .game-card,
        .thumbnail-item {
            border-radius: 14px !important;
            transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.22s ease !important;
        }
        .game-card:hover,
        .thumbnail-item:hover {
            box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(246, 196, 83, 0.75), 0 0 16px rgba(246, 196, 83, 0.28) !important;
        }
        .category-title,
        .section-title,
        .carousel-header h2 {
            color: #ffffff !important;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
        }

        /* Bloc "Welcome to Playzool!" (.category-grid-intro & .category-grid-intro-mobile) */
        .category-grid-container .category-grid-intro,
        .category-grid-intro-mobile {
            background:
                radial-gradient(circle at 15% 15%, rgba(246, 196, 83, 0.15) 0%, transparent 55%),
                linear-gradient(145deg, rgba(40, 24, 78, 0.88) 0%, rgba(20, 12, 42, 0.95) 100%) !important;
            backdrop-filter: blur(16px) saturate(140%) !important;
            -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
            border: 1.5px solid rgba(168, 85, 247, 0.38) !important;
            border-top-color: rgba(246, 196, 83, 0.50) !important;
            border-radius: 20px !important;
            padding: 24px 26px !important;
            box-shadow: 0 12px 32px rgba(5, 2, 14, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
            position: relative !important;
            overflow: hidden !important;
        }
        .category-grid-container .category-grid-intro h2,
        .category-grid-container .category-grid-intro h3,
        .category-grid-intro-mobile h2,
        .category-grid-intro-mobile h3 {
            font-family: 'Poppins', sans-serif !important;
            font-size: 1.35rem !important;
            font-weight: 800 !important;
            color: #fef08a !important;
            margin: 0 0 10px 0 !important;
            letter-spacing: -0.01em !important;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45) !important;
        }
        .category-grid-container .category-grid-intro p,
        .category-grid-intro-mobile p {
            color: #e9d5ff !important;
            font-size: 0.92rem !important;
            line-height: 1.55 !important;
            margin: 0 0 16px 0 !important;
            opacity: 0.94 !important;
        }
        .category-grid-container .category-grid-intro .learn-more,
        .category-grid-intro-mobile .learn-more {
            display: inline-flex !important;
            align-items: center !important;
            gap: 6px !important;
            width: fit-content !important;
            padding: 8px 16px !important;
            border-radius: 999px !important;
            background: linear-gradient(135deg, rgba(246, 196, 83, 0.22) 0%, rgba(124, 58, 237, 0.34) 100%) !important;
            border: 1.5px solid rgba(246, 196, 83, 0.62) !important;
            color: #fef08a !important;
            font-family: 'Poppins', sans-serif !important;
            font-size: 12.5px !important;
            font-weight: 700 !important;
            text-decoration: none !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
            transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1) !important;
        }
        .category-grid-container .category-grid-intro .learn-more::after,
        .category-grid-intro-mobile .learn-more::after {
            content: '→' !important;
            font-size: 13px !important;
            transition: transform 0.2s ease !important;
        }
        .category-grid-container .category-grid-intro .learn-more:hover,
        .category-grid-intro-mobile .learn-more:hover {
            background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%) !important;
            border-color: #fef08a !important;
            color: #1e1035 !important;
            transform: translateY(-2px) !important;
            box-shadow: 0 6px 18px rgba(245, 158, 11, 0.38) !important;
        }
        .category-grid-container .category-grid-intro .learn-more:hover::after,
        .category-grid-intro-mobile .learn-more:hover::after {
            transform: translateX(3px) !important;
        }
        /* Tuiles de catégories (.category-grid-item) à côté de Welcome to Playzool */
        .category-grid-item {
            background: linear-gradient(160deg, rgba(34, 21, 68, 0.78) 0%, rgba(18, 11, 36, 0.88) 100%) !important;
            backdrop-filter: blur(12px) !important;
            -webkit-backdrop-filter: blur(12px) !important;
            border: 1px solid rgba(167, 139, 250, 0.26) !important;
            border-radius: 16px !important;
            color: #f3e8ff !important;
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
            transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease !important;
        }
        .category-grid-item:hover {
            transform: translateY(-3px) !important;
            background: linear-gradient(160deg, rgba(52, 32, 102, 0.90) 0%, rgba(26, 15, 52, 0.95) 100%) !important;
            border-color: rgba(246, 196, 83, 0.65) !important;
            color: #fef08a !important;
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(246, 196, 83, 0.22) !important;
        }
        /* Mise en valeur 3D Satin-Matte des pictogrammes de catégories (Dock gauche & Grille Home) */
        .category-drawer .drawer-icon {
            width: 24px !important;
            height: 24px !important;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.52)) !important;
            transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), filter 0.2s ease !important;
        }
        .category-drawer .drawer-nav li a:hover .drawer-icon,
        .category-drawer .drawer-nav li a.active .drawer-icon {
            transform: scale(1.14) !important;
            filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6)) !important;
        }
        .category-grid-item .category-grid-icon {
            width: 38px !important;
            height: 38px !important;
            object-fit: contain !important;
            filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.52)) !important;
            transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), filter 0.22s ease !important;
        }
        .category-grid-item:hover .category-grid-icon {
            transform: scale(1.12) translateY(-2px) !important;
            filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.62)) !important;
        }
        /* Icônes 3D Satin-Matte dans les rails de jeux portrait (.mobile-category-shelf / .mobile-shelf-island) */
        .mobile-category-shelf .shelf-icon,
        .mobile-shelf-island .shelf-icon {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            width: 30px !important;
            height: 30px !important;
            flex-shrink: 0 !important;
            line-height: 1 !important;
        }
        .mobile-category-shelf .shelf-icon .shelf-icon-img,
        .mobile-shelf-island .shelf-icon .shelf-icon-img {
            width: 30px !important;
            height: 30px !important;
            object-fit: contain !important;
            display: block !important;
            filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55)) !important;
        }

        /* Alignement optique parfait Titre de section + Bouton "See more" (.section-header / .see-more-link) */
        .section-header {
            display: flex !important;
            align-items: center !important;
            justify-content: flex-start !important;
            gap: 12px !important;
            margin-top: 0 !important;
            margin-bottom: 12px !important;
        }
        .section-header .section-title {
            margin: 0 !important;
            padding: 0 0 0 14px !important;
            line-height: 1.2 !important;
            display: inline-flex !important;
            align-items: center !important;
        }
        /* Blocs & Boutons "See more" (.see-more-link, .shelf-cta-btn, .recent-cta-card, #load-more-button) */
        .see-more-link,
        .mobile-category-shelf .shelf-see-all,
        .mobile-shelf-island .shelf-cta-btn {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 6px !important;
            background: linear-gradient(180deg, rgba(43, 25, 82, 0.78) 0%, rgba(24, 13, 49, 0.88) 100%) !important;
            border: 1px solid rgba(246, 196, 83, 0.42) !important;
            color: #fef08a !important;
            padding: 5px 13px !important;
            margin: 0 !important;
            line-height: 1 !important;
            vertical-align: middle !important;
            flex-shrink: 0 !important;
            border-radius: 999px !important;
            font-weight: 700 !important;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
            transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1) !important;
        }
        .see-more-link span {
            line-height: 1 !important;
            display: inline-block !important;
        }
        .see-more-link svg {
            width: 13px !important;
            height: 13px !important;
            display: block !important;
            flex-shrink: 0 !important;
        }
        @media (max-width: 768px) {
            .mobile-category-shelf .shelf-icon,
            .mobile-shelf-island .shelf-icon {
                width: 24px !important;
                height: 24px !important;
            }
            .mobile-category-shelf .shelf-icon .shelf-icon-img,
            .mobile-shelf-island .shelf-icon .shelf-icon-img {
                width: 24px !important;
                height: 24px !important;
            }
            .section-header {
                padding: 0 var(--page-padding, 10px) !important;
                gap: 10px !important;
                margin-top: 0 !important;
                margin-bottom: 10px !important;
            }
            .section-header .section-title {
                padding: 0 !important;
            }
        }
        .see-more-link:hover,
        .mobile-category-shelf .shelf-see-all:hover,
        .mobile-shelf-island .shelf-cta-btn:hover {
            background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%) !important;
            border-color: #fef08a !important;
            color: #1e1035 !important;
            transform: translateY(-1px) translateX(2px) !important;
            box-shadow: 0 5px 14px rgba(245, 158, 11, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
        }
        .recent-cta-card .thumbnail {
            background: linear-gradient(145deg, rgba(43, 25, 82, 0.82) 0%, rgba(22, 12, 46, 0.92) 100%) !important;
            border: 1.5px solid rgba(246, 196, 83, 0.45) !important;
            border-radius: 14px !important;
            color: #fef08a !important;
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
        }
        .recent-cta-card .thumbnail span {
            color: #fef08a !important;
            font-weight: 700 !important;
        }
        .recent-cta-card .arrow-right {
            fill: #fde047 !important;
        }
        .recent-cta-card a:hover .thumbnail {
            background: linear-gradient(135deg, rgba(246, 196, 83, 0.25) 0%, rgba(124, 58, 237, 0.35) 100%) !important;
            border-color: #fde047 !important;
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 14px rgba(246, 196, 83, 0.28) !important;
        }
        #load-more-button,
        #load-more-btn {
            border-radius: 999px !important;
            padding: 12px 32px !important;
            background: linear-gradient(135deg, rgba(43, 25, 82, 0.90) 0%, rgba(24, 13, 49, 0.96) 100%) !important;
            border: 1.5px solid rgba(246, 196, 83, 0.55) !important;
            color: #fef08a !important;
            font-family: 'Poppins', sans-serif !important;
            font-weight: 700 !important;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
            transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1) !important;
        }
        #load-more-button:hover:not(:disabled),
        #load-more-btn:hover:not(:disabled) {
            background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%) !important;
            border-color: #fef08a !important;
            color: #1e1035 !important;
            transform: translateY(-2px) !important;
            box-shadow: 0 10px 26px rgba(245, 158, 11, 0.38) !important;
        }

        /* 5. HEADER HUD CAPSULES (Daily Streak & Level XP Bar) */
        .site-header .header-right {
            gap: 8px !important;
        }
        .hud-streak-capsule {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            height: 34px;
            padding: 0 11px 0 9px;
            border-radius: 999px;
            background: linear-gradient(180deg, rgba(43, 25, 82, 0.88) 0%, rgba(24, 13, 49, 0.94) 100%);
            border: 1.5px solid rgba(246, 196, 83, 0.55);
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.16);
            color: #fde047;
            font-weight: 800;
            font-size: 13px;
            cursor: pointer;
            position: relative;
            transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
            flex-shrink: 0;
        }
        .hud-streak-capsule:hover {
            transform: translateY(-1px) scale(1.03);
            border-color: #fde047;
            box-shadow: 0 5px 14px rgba(245, 158, 11, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25);
        }
        .hud-streak-flame {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
        }
        .hud-streak-flame img,
        .header-3d-flame-img {
            width: 20px !important;
            height: 20px !important;
            object-fit: contain !important;
            display: block !important;
            filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.45));
        }
        .hud-streak-count {
            font-weight: 900;
            font-size: 13px;
            line-height: 1;
            color: #fef08a;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
        }
        .hud-rank-capsule {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            height: 34px;
            padding: 0 11px 0 5px;
            border-radius: 999px;
            background: linear-gradient(180deg, rgba(43, 25, 82, 0.88) 0%, rgba(24, 13, 49, 0.94) 100%);
            border: 1.5px solid rgba(167, 139, 250, 0.48);
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.14);
            cursor: pointer;
            position: relative;
            transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
            flex-shrink: 0;
        }
        .hud-rank-capsule:hover {
            transform: translateY(-1px);
            border-color: rgba(246, 196, 83, 0.75);
            box-shadow: 0 5px 14px rgba(124, 58, 237, 0.35);
        }
        .hud-level-badge {
            display: inline-flex;
            align-items: center;
            gap: 3px;
            height: 24px;
            padding: 0 8px;
            border-radius: 999px;
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 5px rgba(0, 0, 0, 0.4);
            color: #1e1035;
            font-weight: 900;
            font-size: 11px;
            letter-spacing: 0.03em;
            line-height: 1;
        }
        .hud-lvl-prefix {
            font-size: 9.5px;
            font-weight: 800;
            opacity: 0.85;
        }
        .hud-lvl-number {
            font-size: 12px;
            font-weight: 900;
        }
        .hud-progress-block {
            width: 56px;
            display: flex;
            align-items: center;
        }
        .hud-xp-track {
            width: 100%;
            height: 7px;
            border-radius: 999px;
            background: rgba(11, 6, 24, 0.85);
            border: 1px solid rgba(167, 139, 250, 0.28);
            overflow: hidden;
            box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.7);
        }
        .hud-xp-fill {
            height: 100%;
            border-radius: 999px;
            background: linear-gradient(90deg, #a855f7 0%, #f59e0b 55%, #fde047 100%);
            box-shadow: 0 0 8px rgba(245, 158, 11, 0.65);
            transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
        }
        .hud-boost-capsule {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            height: 30px;
            padding: 0 9px;
            border-radius: 999px;
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.45) 100%);
            border: 1px solid rgba(52, 211, 153, 0.6);
            color: #6ee7b7;
            font-size: 11.5px;
            font-weight: 800;
            flex-shrink: 0;
        }
        .hud-notif-ping,
        .hud-streak-ping {
            position: absolute;
            top: -2px;
            right: -2px;
            width: 9px;
            height: 9px;
            border-radius: 50%;
            background: #ef4444;
            border: 1.5px solid #180d31;
            box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
        }

        /* 6. PROFILE AVATAR BUTTON IN HEADER */
        .header-profile-avatar-btn {
            padding: 0 !important;
            width: 36px !important;
            height: 36px !important;
            min-width: 36px !important;
            max-width: 36px !important;
            min-height: 36px !important;
            max-height: 36px !important;
            flex: 0 0 36px !important;
            aspect-ratio: 1 / 1 !important;
            border-radius: 50% !important;
            background: transparent !important;
            border: none !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            position: relative !important;
            overflow: visible !important;
            flex-shrink: 0 !important;
        }
        .header-profile-avatar-btn #header-avatar-badge {
            width: 34px !important;
            height: 34px !important;
            min-width: 34px !important;
            min-height: 34px !important;
            border-radius: 50% !important;
            position: relative !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            padding: 2px !important;
            box-sizing: border-box !important;
            background: linear-gradient(135deg, #f6c453 0%, #9333ea 100%) !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 1.5px rgba(246, 196, 83, 0.55) !important;
            transition: transform 0.18s ease, box-shadow 0.18s ease !important;
        }
        .header-profile-avatar-btn:hover #header-avatar-badge {
            transform: scale(1.07);
            box-shadow: 0 4px 12px rgba(246, 196, 83, 0.4), 0 0 0 2px #fde047 !important;
        }
        .header-profile-avatar-btn #header-avatar-badge .avatar-inner {
            width: 100% !important;
            height: 100% !important;
            border-radius: 50% !important;
            overflow: hidden !important;
            background: #140b29 !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
        }
        .header-profile-avatar-btn #header-avatar-badge .avatar-icon,
        .header-profile-avatar-btn #header-avatar-badge .avatar-icon img {
            width: 100% !important;
            height: 100% !important;
            object-fit: cover !important;
            border-radius: 50% !important;
            display: block !important;
        }

        /* =========================================================
           7. RESPONSIVE MOBILE (<= 768px) — HEADER COMPACT, TIROIRS FLOTTANTS & RECHERCHE INTÉGRÉE
           ========================================================= */
        @media (max-width: 768px) {
            /* Header pilule flottante ultra-fluide sur mobile */
            .site-header {
                top: 8px !important;
                width: calc(100% - 16px) !important;
                height: 46px !important;
                min-height: 46px !important;
                padding: 0 10px !important;
                border-radius: 999px !important;
                gap: 6px !important;
                justify-content: space-between !important;
            }
            body:not(.game-page-layout) .site-main-content {
                padding-top: 62px !important;
                margin-left: 0 !important;
                padding-left: 8px !important;
                padding-right: 8px !important;
            }
            .site-header .header-content {
                flex: 0 0 auto !important;
                width: auto !important;
                display: flex !important;
                align-items: center !important;
                padding: 0 !important;
                margin: 0 !important;
            }
            .site-header .header-left {
                gap: 8px !important;
                flex-shrink: 0 !important;
                display: flex !important;
                align-items: center !important;
            }
            .site-header .logo {
                display: inline-flex !important;
                align-items: center !important;
                margin-left: 0 !important;
            }
            .site-header .logo img {
                max-height: 24px !important;
                width: auto !important;
            }

            /* Boutons gauche (Menu / Back) : 32x32px, 100% ronds, même taille exacte que le bouton profil à droite */
            #open-drawer-button,
            #back-to-home-button,
            #drawer-back-button,
            .drawer-back-button {
                width: 32px !important;
                height: 32px !important;
                min-width: 32px !important;
                max-width: 32px !important;
                min-height: 32px !important;
                max-height: 32px !important;
                flex: 0 0 32px !important;
                aspect-ratio: 1 / 1 !important;
                border-radius: 50% !important;
                padding: 0 !important;
                margin: 0 !important;
            }
            #open-drawer-button svg,
            #back-to-home-button svg,
            #drawer-back-button svg,
            .drawer-back-button svg {
                width: 17px !important;
                height: 17px !important;
                flex-shrink: 0 !important;
            }

            /* Quand le menu mobile est ouvert : #drawer-back-button est dans .header-left juste à côté de #open-drawer-button,
               il le remplace donc exactement au même pixel sans aucun décalage ! */
            body.drawer-open .site-header .header-content {
                display: flex !important;
                margin: 0 !important;
            }
            body.drawer-open #open-drawer-button,
            body.drawer-open #back-to-home-button {
                display: none !important;
            }
            body.drawer-open #drawer-back-button {
                display: inline-flex !important;
                margin: 0 !important;
            }
            body.drawer-open #user-panel-button.header-profile-avatar-btn {
                display: inline-flex !important;
            }

            /* Cacher la barre de recherche dans le header mobile (elle est intégrée en haut du menu qui s'ouvre) */
            .site-header > .drawer-search-bar-mobile {
                display: none !important;
            }

            /* Cacher le Daily Streak et les badges secondaires sur mobile pour ne jamais surcharger le header */
            #header-streak-badge,
            .hud-streak-capsule,
            #header-xp-boost,
            #header-challenges-button {
                display: none !important;
            }

            /* Groupe droite mobile épuré : capsule LVL + bouton Avatar Profil (32x32px) */
            .site-header .header-right {
                gap: 6px !important;
                flex-shrink: 0 !important;
                margin-left: auto !important;
            }
            .hud-rank-capsule {
                height: 30px !important;
                padding: 0 8px 0 4px !important;
                gap: 5px !important;
            }
            .hud-level-badge {
                height: 21px !important;
                padding: 0 6px !important;
                font-size: 10px !important;
            }
            .hud-lvl-prefix {
                font-size: 8.5px !important;
            }
            .hud-lvl-number {
                font-size: 10.5px !important;
            }
            .hud-progress-block {
                width: 34px !important;
            }
            .hud-xp-track {
                height: 5.5px !important;
            }
            .header-profile-avatar-btn {
                width: 32px !important;
                height: 32px !important;
                min-width: 32px !important;
                max-width: 32px !important;
                min-height: 32px !important;
                max-height: 32px !important;
                flex: 0 0 32px !important;
            }
            .header-profile-avatar-btn #header-avatar-badge {
                width: 30px !important;
                height: 30px !important;
                min-width: 30px !important;
                min-height: 30px !important;
            }
            .site-header #favorite-button-header,
            .site-header .favorite-btn-header {
                width: 30px !important;
                height: 30px !important;
                min-width: 30px !important;
            }

            /* TIROIR DROIT MOBILE (#user-games-panel) : CARTE FLOTTANTE ARRONDIE SOUS LE HEADER & CHROME COMPACT */
            #user-games-panel,
            #user-panel {
                position: fixed !important;
                top: 60px !important;
                left: 8px !important;
                right: 8px !important;
                width: calc(100vw - 16px) !important;
                max-width: calc(100vw - 16px) !important;
                height: calc(100vh - 68px) !important;
                height: calc(100dvh - 68px) !important;
                margin: 0 !important;
                border-radius: 20px !important;
                border: 1.5px solid rgba(246, 196, 83, 0.48) !important;
                box-sizing: border-box !important;
                transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1) !important;
            }
            body:not(.panel-open) #user-games-panel,
            body:not(.panel-open) #user-panel {
                transform: translateX(calc(100% + 24px)) !important;
                box-shadow: none !important;
                visibility: hidden !important;
                pointer-events: none !important;
            }
            body.panel-open #user-games-panel,
            body.panel-open #user-panel {
                transform: translateX(0) !important;
                visibility: visible !important;
                pointer-events: auto !important;
                box-shadow: 0 18px 44px rgba(0, 0, 0, 0.88), 0 0 24px rgba(124, 58, 237, 0.25) !important;
            }
            #user-games-panel .panel-header,
            #user-panel .panel-header {
                padding: 10px 14px !important;
            }
            #user-games-panel .panel-header h3,
            #user-panel .panel-header h3 {
                font-size: 15px !important;
            }
            #user-games-panel .close-button,
            #user-panel .close-button {
                width: 28px !important;
                height: 28px !important;
                font-size: 18px !important;
            }
            #user-games-panel .panel-tabs,
            #user-panel .panel-tabs {
                padding: 5px 6px !important;
                gap: 4px !important;
            }
            #user-games-panel .tab-link,
            #user-panel .tab-link {
                padding: 7px 6px !important;
                font-size: 12px !important;
                border-radius: 10px !important;
            }
            #user-games-panel .panel-content,
            #user-panel .panel-content {
                padding: 12px !important;
            }

            /* TIROIR GAUCHE MOBILE (.category-drawer) : 100% INVISIBLE FERMÉ, 100% CENTRÉ OUVERT */
            .category-drawer {
                position: fixed !important;
                top: 60px !important;
                left: 8px !important;
                right: 8px !important;
                width: calc(100vw - 16px) !important;
                max-width: calc(100vw - 16px) !important;
                height: calc(100vh - 68px) !important;
                height: calc(100dvh - 68px) !important;
                margin: 0 !important;
                padding: 14px 12px 32px 12px !important;
                border-radius: 20px !important;
                border: 1.5px solid rgba(246, 196, 83, 0.42) !important;
                background: linear-gradient(180deg, rgba(28, 17, 54, 0.97) 0%, rgba(14, 9, 28, 0.99) 100%) !important;
                box-sizing: border-box !important;
                overflow-x: hidden !important;
                overflow-y: auto !important;
                white-space: normal !important;
                transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1) !important;
            }
            body:not(.drawer-open) .category-drawer {
                transform: translateX(calc(-100% - 24px)) !important;
                box-shadow: none !important;
                visibility: hidden !important;
                pointer-events: none !important;
            }
            body.drawer-open .category-drawer {
                transform: translateX(0) !important;
                visibility: visible !important;
                pointer-events: auto !important;
                box-shadow: 0 18px 44px rgba(0, 0, 0, 0.85) !important;
            }
            .category-drawer .drawer-nav {
                width: 100% !important;
                max-width: 100% !important;
                margin: 0 !important;
                padding: 0 !important;
                box-sizing: border-box !important;
            }
            .category-drawer .drawer-nav ul {
                display: grid !important;
                grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
                gap: 10px !important;
                width: 100% !important;
                max-width: 100% !important;
                margin: 0 !important;
                padding: 0 !important;
                list-style: none !important;
                box-sizing: border-box !important;
            }
            .category-drawer .drawer-nav ul li {
                width: 100% !important;
                max-width: 100% !important;
                margin: 0 !important;
                padding: 0 !important;
                box-sizing: border-box !important;
            }
            /* Séparateur sur toute la largeur des 2 colonnes */
            .category-drawer .drawer-nav ul li:has(.drawer-separator) {
                grid-column: 1 / -1 !important;
            }
            /* Cartes de catégories centrées sans margin parasite */
            .category-drawer .drawer-nav li a {
                margin: 0 !important;
                width: 100% !important;
                min-height: 78px !important;
                padding: 12px 8px !important;
                box-sizing: border-box !important;
                display: flex !important;
                flex-direction: column !important;
                align-items: center !important;
                justify-content: center !important;
                text-align: center !important;
                border-radius: 14px !important;
                background: rgba(255, 255, 255, 0.04) !important;
                border: 1px solid rgba(167, 139, 250, 0.22) !important;
            }
            .category-drawer .drawer-nav li a .drawer-icon {
                margin: 0 0 6px 0 !important;
            }
            .category-drawer .drawer-nav li a .nav-text {
                opacity: 1 !important;
                visibility: visible !important;
                font-size: 13px !important;
                font-weight: 600 !important;
                line-height: 1.25 !important;
                white-space: normal !important;
                text-align: center !important;
            }
            .category-drawer .drawer-footer-nav {
                opacity: 1 !important;
                visibility: visible !important;
                width: 100% !important;
                padding: 12px 0 24px 0 !important;
                box-sizing: border-box !important;
            }
            .category-drawer .drawer-footer-nav ul {
                display: flex !important;
                flex-direction: column !important;
                align-items: center !important;
                gap: 8px !important;
            }
            .category-drawer .drawer-footer-nav ul.drawer-footer-links {
                flex-direction: row !important;
                flex-wrap: wrap !important;
                justify-content: center !important;
                gap: 14px !important;
            }

            /* BARRE DE RECHERCHE & RÉSULTATS INTÉGRÉS EN HAUT DU MENU MOBILE (.category-drawer) */
            .category-drawer .drawer-search-bar-mobile {
                display: block !important;
                width: 100% !important;
                max-width: 100% !important;
                margin: 0 0 14px 0 !important;
                padding: 0 !important;
                position: relative !important;
                z-index: 40 !important;
                box-sizing: border-box !important;
            }
            .category-drawer .drawer-search-bar-mobile .search-input-wrapper {
                width: 100% !important;
                max-width: 100% !important;
                position: relative !important;
                box-sizing: border-box !important;
            }
            .category-drawer .drawer-search-bar-mobile .search-input-wrapper input#search-input-mobile {
                width: 100% !important;
                height: 44px !important;
                padding: 0 42px 0 16px !important;
                font-size: 14.5px !important;
                border-radius: 14px !important;
                background: rgba(12, 7, 26, 0.85) !important;
                border: 1.5px solid rgba(246, 196, 83, 0.45) !important;
                color: #ffffff !important;
                box-sizing: border-box !important;
            }
            .category-drawer .drawer-search-bar-mobile .search-input-wrapper .search-icon {
                position: absolute !important;
                right: 14px !important;
                top: 50% !important;
                transform: translateY(-50%) !important;
                width: 18px !important;
                height: 18px !important;
                color: #fde047 !important;
                pointer-events: none !important;
            }
            /* Conteneur des résultats de recherche mobile : pleine largeur du menu, lisible et spacieux */
            .category-drawer #search-results-container,
            .drawer-search-bar-mobile #search-results-container {
                width: 100% !important;
                left: 0 !important;
                right: 0 !important;
                top: calc(100% + 8px) !important;
                max-height: calc(100dvh - 150px) !important;
                border-radius: 16px !important;
                background: linear-gradient(180deg, rgba(30, 19, 58, 0.99) 0%, rgba(16, 10, 32, 0.99) 100%) !important;
                border: 1.5px solid rgba(246, 196, 83, 0.55) !important;
                box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85) !important;
                padding: 6px !important;
                box-sizing: border-box !important;
                overflow-y: auto !important;
                z-index: 60 !important;
            }
            #search-results-container .search-result-item {
                display: flex !important;
                align-items: center !important;
                gap: 12px !important;
                padding: 8px 10px !important;
                border-radius: 12px !important;
                border-bottom: 1px solid rgba(167, 139, 250, 0.16) !important;
                color: #ffffff !important;
                text-decoration: none !important;
            }
            #search-results-container .search-result-item:last-child {
                border-bottom: none !important;
            }
            #search-results-container .search-result-item:hover,
            #search-results-container .search-result-item:active {
                background: rgba(124, 58, 237, 0.28) !important;
            }
            #search-results-container .search-result-item img {
                width: 68px !important;
                height: 42px !important;
                object-fit: cover !important;
                border-radius: 8px !important;
                flex-shrink: 0 !important;
                margin-right: 0 !important;
                border: 1px solid rgba(246, 196, 83, 0.35) !important;
            }
            #search-results-container .search-result-item span {
                font-size: 14px !important;
                font-weight: 600 !important;
                line-height: 1.3 !important;
                color: #f5f3ff !important;
                white-space: normal !important;
            }
        }
        @media (max-width: 390px) {
            .hud-progress-block {
                display: none !important;
            }
        }

        /* =========================================================
           8. ESPACE HAUT DESKTOP, ALIGNEMENT DU FOOTER (.site-footer) & REBOUND HUB
           ========================================================= */
        .rebound-ribbon-pill,
        #rebound-ribbon-pill {
            display: none !important;
        }
        /* Fix universel Desktop & Mobile : annule le margin négatif (-38px / -25px) de .carousel-wrapper sur Recently Played */
        #recent-games-section.recent-games-strip .recent-games-header,
        #recent-games-section.recent-games-strip .section-header {
            margin-bottom: 8px !important;
        }
        #recent-games-section.recent-games-strip .carousel-wrapper,
        #recent-games-section.recent-games-strip .games-grid-scroll-wrapper {
            margin-top: 0 !important;
            margin-bottom: 0 !important;
            padding: 6px 0 8px !important;
        }
        #featured-games-container:empty,
        #new-games-container:empty,
        #games-of-the-day-container:empty,
        #trending-games-container:empty,
        #recent-games-container:empty {
            display: none !important;
            margin: 0 !important;
            min-height: 0 !important;
        }
        .js-enabled .carousel-section-wrapper:not(#hero-section).is-visible {
            overflow: visible !important;
            min-height: 0 !important;
        }
        @media (min-width: 769px) {
            /* Suppression de l'espace superflu au-dessus de Recently Played / Hero Games sur Desktop */
            #recent-games-section.recent-games-strip {
                padding-top: 2px !important;
                margin-top: 0 !important;
                margin-bottom: 10px !important;
            }
            .hero-games-showcase {
                margin-top: 4px !important;
                margin-bottom: 16px !important;
            }
            .hero-games-showcase .carousel-wrapper,
            .hero-games-showcase .games-grid-scroll-wrapper {
                margin-top: 0 !important;
                margin-bottom: 0 !important;
                padding-top: 6px !important;
                padding-bottom: 8px !important;
            }

            /* Respiration verticale constante et homogène au-dessus de CHAQUE titre de catégorie + bouton "See more" */
            .game-grid-section,
            .carousel-section-wrapper.game-grid-section,
            #genre-sections-container > .game-grid-section {
                margin-top: 28px !important;
                margin-bottom: 28px !important;
                padding-top: 4px !important;
            }
            #featured-games-container,
            #new-games-container,
            #games-of-the-day-container,
            #trending-games-container {
                min-height: 0 !important;
                margin-top: 28px !important;
                margin-bottom: 28px !important;
            }
            #featured-games-container > .game-grid-section,
            #new-games-container > .game-grid-section,
            #games-of-the-day-container > .game-grid-section,
            #trending-games-container > .game-grid-section {
                margin-top: 0 !important;
                margin-bottom: 0 !important;
            }
            .mobile-category-shelf,
            .mobile-shelf-island {
                margin: 28px 0 !important;
            }
            #more-categories {
                margin: 28px 0 !important;
                padding: 12px 0 !important;
            }

            /* Alignement et respiration du Footer (.site-footer) avec .site-main-content et le dock flottant gauche */
            .site-footer {
                margin-left: 88px !important;
                margin-right: 22px !important;
                margin-bottom: 18px !important;
                width: auto !important;
                border-radius: 20px !important;
                background: linear-gradient(180deg, rgba(30, 20, 60, 0.78) 0%, rgba(16, 10, 34, 0.92) 100%) !important;
                border: 1.5px solid rgba(168, 85, 247, 0.24) !important;
                box-shadow: 0 10px 30px rgba(5, 2, 14, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
                transition: margin-left 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
            }
            body.drawer-pinned .site-footer {
                margin-left: 260px !important;
            }
        }
        @media (max-width: 768px) {
            /* Annulation des marges négatives (-25px de style.css) sur les grilles mobiles pour éviter tout collage du titre suivant */
            .hero-games-showcase .carousel-wrapper,
            .hero-games-showcase .hero-grid-scroll-wrapper,
            .game-grid-section .carousel-wrapper,
            .game-grid-section .games-grid-scroll-wrapper,
            #more-categories .carousel-wrapper {
                margin-top: 0 !important;
                margin-bottom: 0 !important;
                padding-top: 4px !important;
                padding-bottom: 4px !important;
            }
            .hero-games-showcase {
                margin-bottom: 16px !important;
            }
            /* Respiration verticale constante et homogène entre toutes les sections sur mobile */
            .game-grid-section,
            .game-grid-section:first-of-type,
            #hero-section + .game-grid-section,
            #recent-games-section + .game-grid-section,
            #genre-sections-container > .game-grid-section {
                margin-top: 26px !important;
                margin-bottom: 26px !important;
                padding-top: 4px !important;
            }
            #featured-games-container,
            #new-games-container,
            #games-of-the-day-container,
            #trending-games-container {
                min-height: 0 !important;
                margin-top: 26px !important;
                margin-bottom: 26px !important;
            }
            #featured-games-container > .game-grid-section,
            #new-games-container > .game-grid-section,
            #games-of-the-day-container > .game-grid-section,
            #trending-games-container > .game-grid-section {
                margin-top: 0 !important;
                margin-bottom: 0 !important;
            }
            .mobile-category-shelf,
            .mobile-shelf-island {
                margin: 26px 0 !important;
            }
            #more-categories {
                margin: 26px 0 !important;
                padding: 8px 0 !important;
            }
            .site-footer {
                margin: 12px 8px 16px 8px !important;
                width: auto !important;
                border-radius: 18px !important;
                background: linear-gradient(180deg, rgba(30, 20, 60, 0.78) 0%, rgba(16, 10, 34, 0.92) 100%) !important;
                border: 1.5px solid rgba(168, 85, 247, 0.24) !important;
            }
            /* Anti-orphelins universel pour toutes les grilles 3 colonnes sur mobile :
               évite d'afficher 1 ou 2 cartes seules sur la dernière ligne (ex: 10 ou 11 jeux -> 9 affichés, 12 jeux -> 12 affichés) */
            .games-grid:not(.recent-games-grid) > .game-card:nth-child(3n+1 of .game-card):nth-last-child(1 of .game-card),
            .games-grid:not(.recent-games-grid) > .game-card:nth-child(3n+1 of .game-card):nth-last-child(2 of .game-card),
            .games-grid:not(.recent-games-grid) > .game-card:nth-child(3n+2 of .game-card):nth-last-child(1 of .game-card),
            .sidebar-games-grid > .game-card:nth-child(3n+1 of .game-card):nth-last-child(1 of .game-card),
            .sidebar-games-grid > .game-card:nth-child(3n+1 of .game-card):nth-last-child(2 of .game-card),
            .sidebar-games-grid > .game-card:nth-child(3n+2 of .game-card):nth-last-child(1 of .game-card) {
                display: none !important;
            }
        }

        /* =========================================================
           9. ANTI-CLIPPING DES OMBRES 3D DANS LE TIROIR DE DROITE (#user-games-panel)
           ========================================================= */
        #user-games-panel .quest-card > div,
        #user-panel .quest-card > div {
            overflow: visible !important;
        }
        #user-games-panel .quest-card,
        #user-panel .quest-card,
        #user-games-panel .challenge-card,
        #user-panel .challenge-card,
        #user-games-panel .mystery-boxes-section,
        #user-panel .mystery-boxes-section,
        #user-games-panel .streak-banner,
        #user-panel .streak-banner,
        #user-games-panel .reward-claim-sticky-banner,
        #user-panel .reward-claim-sticky-banner {
            overflow: visible !important;
            padding-bottom: 16px !important;
        }
        #user-games-panel .equip-avatar-btn,
        #user-games-panel .equip-frame-btn,
        #user-games-panel .equip-title-btn {
            margin: 5px !important;
        }

        /* =========================================================
           10. HARMONISATION ONGLET CHALLENGES (#challenges-panel-content) & BOUTON SHUFFLE
           ========================================================= */
        #user-games-panel .challenges-hub-container,
        #user-panel .challenges-hub-container {
            padding: 12px 10px 24px !important;
            font-family: 'Plus Jakarta Sans', 'Inter', sans-serif !important;
        }
        #user-games-panel .challenges-hub-header,
        #user-panel .challenges-hub-header {
            margin-bottom: 14px !important;
        }
        #user-games-panel .challenges-hub-title,
        #user-panel .challenges-hub-title {
            font-family: 'Rubik', 'Fredoka', 'Inter', sans-serif !important;
            font-size: 19px !important;
            font-weight: 900 !important;
            text-transform: uppercase !important;
            letter-spacing: 0.5px !important;
            background: linear-gradient(180deg, #fffef5 0%, #fde047 45%, #f59e0b 100%) !important;
            -webkit-background-clip: text !important;
            -webkit-text-fill-color: transparent !important;
            filter: drop-shadow(0 2px 0 #4d2600) !important;
        }
        #user-games-panel .challenges-slots-pill,
        #user-panel .challenges-slots-pill {
            background: linear-gradient(180deg, #352063 0%, #211340 100%) !important;
            border: 1.5px solid #f6c453 !important;
            color: #fde047 !important;
            font-family: 'Rubik', 'Fredoka', sans-serif !important;
            font-size: 11.5px !important;
            font-weight: 900 !important;
            padding: 4px 11px !important;
            border-radius: 999px !important;
            box-shadow: 0 3px 0 #120824, inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
        }
        #user-games-panel .challenges-section-label,
        #user-panel .challenges-section-label {
            font-family: 'Rubik', 'Fredoka', 'Inter', sans-serif !important;
            font-size: 14px !important;
            font-weight: 900 !important;
            text-transform: uppercase !important;
            letter-spacing: 0.5px !important;
            color: #fde047 !important;
            text-shadow: 0 2px 0 #4d2600 !important;
        }
        #user-games-panel .challenges-section-sub,
        #user-panel .challenges-section-sub {
            color: #d4c6fb !important;
            font-weight: 600 !important;
        }
        /* Bouton Shuffle (#btn-reroll-challenges) en 3D Arcade Or 24K */
        #user-games-panel .btn-reroll-challenges,
        #user-panel .btn-reroll-challenges {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 6px !important;
            background: linear-gradient(180deg, #ffe885 0%, #f7b733 52%, #df9018 100%) !important;
            border: 1.5px solid #fff3b0 !important;
            color: #261300 !important;
            padding: 6px 13px !important;
            border-radius: 999px !important;
            font-family: 'Rubik', 'Fredoka', 'Inter', sans-serif !important;
            font-size: 11px !important;
            font-weight: 900 !important;
            text-transform: uppercase !important;
            letter-spacing: 0.4px !important;
            text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) !important;
            box-shadow: 0 3px 0 #8c5308, 0 5px 12px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
            transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.15s ease, box-shadow 0.15s ease !important;
        }
        #user-games-panel .btn-reroll-challenges svg,
        #user-panel .btn-reroll-challenges svg {
            stroke: #261300 !important;
            stroke-width: 2.6 !important;
            filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.4));
        }
        #user-games-panel .btn-reroll-challenges:hover:not(:disabled),
        #user-panel .btn-reroll-challenges:hover:not(:disabled) {
            transform: translateY(-1.5px) !important;
            filter: brightness(1.06) !important;
            box-shadow: 0 4px 0 #8c5308, 0 8px 16px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
        }
        #user-games-panel .btn-reroll-challenges:active:not(:disabled),
        #user-panel .btn-reroll-challenges:active:not(:disabled) {
            transform: translateY(1.5px) !important;
            box-shadow: 0 1px 0 #8c5308 !important;
        }
        #user-games-panel .challenge-card,
        #user-panel .challenge-card {
            background: linear-gradient(180deg, #281d49 0%, #1b1234 100%) !important;
            border: 1.5px solid #483876 !important;
            border-radius: 18px !important;
            padding: 14px 14px 16px !important;
            overflow: visible !important;
            box-shadow: 0 8px 18px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
        }
        #user-games-panel .challenge-card.challenge-featured,
        #user-panel .challenge-card.challenge-featured {
            border: 2px solid #f6c453 !important;
            box-shadow: 0 8px 22px rgba(246, 196, 83, 0.22), inset 0 1px 0 rgba(255, 244, 184, 0.3) !important;
        }
        #user-games-panel .challenge-featured-ribbon,
        #user-panel .challenge-featured-ribbon {
            background: linear-gradient(180deg, #ffe885 0%, #f59e0b 100%) !important;
            color: #261300 !important;
            border: 1px solid #fef08a !important;
            border-radius: 999px !important;
            font-family: 'Rubik', 'Fredoka', sans-serif !important;
            font-weight: 900 !important;
            box-shadow: 0 2px 0 #78350f !important;
        }
        #user-games-panel .challenge-game-thumb,
        #user-panel .challenge-game-thumb {
            border: 2px solid #f6c453 !important;
            border-radius: 12px !important;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5) !important;
        }
        #user-games-panel .challenge-score-duel,
        #user-panel .challenge-score-duel {
            background: linear-gradient(180deg, #180e32 0%, #110924 100%) !important;
            border: 1.5px solid #452e7a !important;
            border-radius: 12px !important;
            box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6) !important;
        }
        #user-games-panel .challenge-score-lbl,
        #user-panel .challenge-score-lbl {
            color: #c4b5fd !important;
            font-weight: 800 !important;
        }
        #user-games-panel .challenge-score-val.target,
        #user-panel .challenge-score-val.target {
            color: #fde047 !important;
            font-family: 'Rubik', 'Fredoka', sans-serif !important;
            text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5) !important;
        }
        #user-games-panel .challenge-progress-bar,
        #user-panel .challenge-progress-bar {
            height: 10px !important;
            background: #0e081f !important;
            border: 1.5px solid #483778 !important;
            border-radius: 999px !important;
            padding: 1.5px !important;
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8) !important;
        }
        #user-games-panel .challenge-progress-fill,
        #user-panel .challenge-progress-fill {
            border-radius: 999px !important;
            background: linear-gradient(90deg, #a855f7 0%, #f59e0b 55%, #fde047 100%) !important;
            box-shadow: 0 0 8px rgba(251, 191, 36, 0.55) !important;
        }
        #user-games-panel .challenge-btn-fight,
        #user-panel .challenge-btn-fight {
            background: linear-gradient(180deg, #fde047 0%, #f59e0b 52%, #d97706 100%) !important;
            border: 2px solid #fef08a !important;
            border-radius: 12px !important;
            color: #271002 !important;
            font-family: 'Rubik', 'Fredoka', 'Inter', sans-serif !important;
            font-size: 12.5px !important;
            font-weight: 900 !important;
            text-transform: uppercase !important;
            letter-spacing: 0.4px !important;
            text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) !important;
            padding: 10px 14px !important;
            box-shadow: 0 4px 0 #78350f, 0 6px 14px rgba(245, 158, 11, 0.32), inset 0 1.5px 0 rgba(255, 255, 255, 0.75) !important;
        }
        #user-games-panel .challenge-btn-fight:hover:not(:disabled),
        #user-panel .challenge-btn-fight:hover:not(:disabled) {
            transform: translateY(-1.5px) !important;
            filter: brightness(1.06) !important;
            box-shadow: 0 5px 0 #78350f, 0 10px 20px rgba(245, 158, 11, 0.45), inset 0 1.5px 0 rgba(255, 255, 255, 0.85) !important;
        }
        #user-games-panel .challenge-btn-abandon,
        #user-panel .challenge-btn-abandon {
            background: linear-gradient(180deg, #352363 0%, #211540 100%) !important;
            border: 1.5px solid #5d4796 !important;
            border-radius: 12px !important;
            color: #e9d5ff !important;
            box-shadow: 0 3px 0 #130b26 !important;
        }
        #user-games-panel .challenges-empty-box,
        #user-panel .challenges-empty-box {
            background: linear-gradient(180deg, rgba(40, 29, 73, 0.65) 0%, rgba(27, 18, 52, 0.75) 100%) !important;
            border: 1.5px dashed #5d4796 !important;
            border-radius: 16px !important;
            color: #d4c6fb !important;
        }

        /* =========================================================
           11. HARMONISATION PAGE DE JEU (/game) — THÈME CASUAL ROYAL GLASS
           ========================================================= */
        @media (min-width: 769px) {
            body.game-page-layout .site-main-content {
                padding-top: 72px !important;
                margin-left: 78px !important;
                padding-right: 12px !important;
            }
            body.game-page-layout.drawer-pinned .site-main-content {
                margin-left: 260px !important;
            }
        }
        @media (max-width: 768px) {
            body.game-page-layout:not(.immersive-mode) .site-main-content {
                padding-top: 0 !important;
                margin-top: 0 !important;
            }
            body.game-page-layout:not(.immersive-mode) .game-player-wrapper,
            body.game-page-layout:not(.immersive-mode) .game-embed-container,
            body.game-page-layout:not(.immersive-mode) .game-iframe-overlay {
                border-radius: 0 !important;
                margin-top: 0 !important;
            }
            body.game-page-layout:not(.immersive-mode) .overlay-content {
                padding-top: 56px !important;
            }
        }
        body.immersive-mode .site-header #header-fullscreen-button {
            background: linear-gradient(180deg, #352363 0%, #211540 100%) !important;
            border: 1.5px solid rgba(246, 196, 83, 0.55) !important;
            color: #ffe885 !important;
            box-shadow: 0 3px 0 #130b26, inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
        }
        .game-player-wrapper {
            border-radius: 18px !important;
            border: 1.5px solid rgba(168, 85, 247, 0.28) !important;
            background: #130b24 !important;
            box-shadow: 0 14px 36px rgba(5, 2, 14, 0.65), 0 0 24px rgba(124, 58, 237, 0.12) !important;
            overflow: hidden;
        }
        .game-embed-container {
            border-radius: 17px 17px 0 0 !important;
            background-color: #090514 !important;
        }
        .game-actions-bar {
            background: linear-gradient(180deg, #21153d 0%, #160d2b 100%) !important;
            border-top: 1px solid rgba(168, 85, 247, 0.22) !important;
            border-radius: 0 0 17px 17px !important;
            padding: 10px 16px !important;
        }
        #game-player-badge {
            background: linear-gradient(180deg, #2d1e54 0%, #1b1136 100%) !important;
            border: 1.5px solid rgba(246, 196, 83, 0.55) !important;
            border-radius: 999px !important;
            padding: 4px 12px 4px 5px !important;
            box-shadow: 0 3px 0 #120924, inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
            transition: transform 0.15s ease, border-color 0.15s ease !important;
        }
        #game-player-badge:hover {
            transform: translateY(-1px) !important;
            border-color: #fde047 !important;
        }
        #game-player-badge span {
            color: #ede4ff !important;
        }
        #game-player-badge #game-player-level {
            color: #fde047 !important;
            font-family: 'Rubik', 'Fredoka', sans-serif !important;
            font-weight: 900 !important;
        }
        .game-actions-bar .action-button {
            background: linear-gradient(180deg, #2d1f52 0%, #1e1438 100%) !important;
            border: 1.5px solid rgba(168, 85, 247, 0.32) !important;
            border-radius: 12px !important;
            color: #ede4ff !important;
            font-weight: 700 !important;
            box-shadow: 0 3px 0 #120a24, inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
            transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease !important;
        }
        .game-actions-bar .action-button:hover {
            transform: translateY(-1.5px) !important;
            background: linear-gradient(180deg, #3b286b 0%, #281a4a 100%) !important;
            border-color: rgba(246, 196, 83, 0.7) !important;
            color: #ffffff !important;
        }
        .game-actions-bar .action-button:active {
            transform: translateY(1px) !important;
            box-shadow: 0 1px 0 #120a24 !important;
        }
        .game-actions-bar .action-button.active,
        .game-actions-bar .favorite-toggle-button.is-favorite {
            background: linear-gradient(180deg, #4b2c85 0%, #311b5e 100%) !important;
            border-color: #f6c453 !important;
            color: #fde047 !important;
        }
        .game-actions-bar #fullscreen-button {
            background: linear-gradient(180deg, #ffe885 0%, #f7b733 52%, #df9018 100%) !important;
            border: 1.5px solid #fff3b0 !important;
            color: #261300 !important;
            font-family: 'Rubik', 'Fredoka', inherit !important;
            font-weight: 900 !important;
            box-shadow: 0 3px 0 #8c5308, inset 0 1px 0 rgba(255, 255, 255, 0.75) !important;
        }
        .game-actions-bar #fullscreen-button svg {
            fill: #261300 !important;
        }
        @media (max-width: 992px) {
            .game-player-wrapper {
                border: none !important;
                box-shadow: none !important;
                background: transparent !important;
            }
            .game-iframe-overlay::after {
                background: linear-gradient(
                    to bottom,
                    rgba(14, 9, 28, 0) 0%,
                    rgba(14, 9, 28, 0.25) 35%,
                    rgba(14, 9, 28, 0.72) 65%,
                    rgba(14, 9, 28, 0.94) 85%,
                    #0e091c 100%
                ) !important;
            }
        }
        .overlay-foreground-image {
            border-radius: 18px !important;
            border: 2px solid rgba(246, 196, 83, 0.55) !important;
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65) !important;
        }
        .play-button-overlay,
        #play-immersive-button {
            background: linear-gradient(180deg, #4ade80 0%, #22c55e 48%, #16a34a 100%) !important;
            color: #ffffff !important;
            border: 2px solid #bbf7d0 !important;
            border-radius: 999px !important;
            font-family: 'Rubik', 'Fredoka', sans-serif !important;
            font-weight: 900 !important;
            text-transform: uppercase !important;
            letter-spacing: 0.6px !important;
            text-shadow: 0 2px 0 #14532d !important;
            box-shadow: 0 5px 0 #14532d, 0 10px 24px rgba(34, 197, 94, 0.45), inset 0 1.5px 0 rgba(255, 255, 255, 0.65) !important;
        }
        .play-button-overlay svg {
            fill: #ffffff !important;
            filter: drop-shadow(0 2px 0 #14532d);
        }
        .overlay-action-button {
            background: rgba(34, 21, 66, 0.82) !important;
            border: 1.5px solid rgba(192, 132, 252, 0.4) !important;
            color: #f3e8ff !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45) !important;
        }
        .desktop-loader-bar {
            background: rgba(20, 12, 40, 0.85) !important;
            border: 1px solid rgba(168, 85, 247, 0.35) !important;
        }
        .desktop-loader-progress {
            background: linear-gradient(90deg, #9333ea 0%, #f59e0b 55%, #fde047 100%) !important;
            box-shadow: 0 0 14px rgba(251, 191, 36, 0.6) !important;
        }
        @media (max-width: 1280px) {
            .game-content-columns {
                background: transparent !important;
                padding: 16px 12px 24px 12px !important;
                box-sizing: border-box !important;
                overflow-anchor: none !important;
            }
            #related-games-sidebar,
            #related-games-sidebar .sidebar-games-grid,
            .right-sidebar-column {
                overflow-anchor: none !important;
            }
        }
        @media (max-width: 819px) {
            #related-games-sidebar .sidebar-games-grid #show-more-related-container {
                width: 100% !important;
                min-width: 0 !important;
                margin: 0 !important;
                padding: 0 !important;
                align-self: start !important;
            }
            #related-games-sidebar .sidebar-games-grid #show-more-related {
                aspect-ratio: 1 / 1 !important;
                width: 100% !important;
                height: auto !important;
                margin: 0 !important;
                padding: 8px !important;
                border-radius: 16px !important;
                display: flex !important;
                flex-direction: column !important;
                align-items: center !important;
                justify-content: center !important;
                gap: 6px !important;
                box-sizing: border-box !important;
            }
            #related-games-sidebar .sidebar-games-grid #show-more-related .show-more-related-plus {
                width: 34px !important;
                height: 34px !important;
                border-radius: 50% !important;
                background: linear-gradient(180deg, #ffe885 0%, #f59e0b 100%) !important;
                color: #261300 !important;
                font-size: 22px !important;
                font-weight: 900 !important;
                line-height: 1 !important;
                display: inline-flex !important;
                align-items: center !important;
                justify-content: center !important;
                box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35) !important;
                flex-shrink: 0 !important;
            }
            #related-games-sidebar .sidebar-games-grid #show-more-related .show-more-related-label {
                font-size: 11px !important;
                line-height: 1.15 !important;
                font-weight: 800 !important;
                color: #fde047 !important;
                text-align: center !important;
                white-space: normal !important;
                word-break: break-word !important;
            }
        }
        @media (min-width: 820px) {
            #related-games-sidebar .sidebar-games-grid #show-more-related-container {
                grid-column: 1 / -1 !important;
                width: 100% !important;
            }
            #related-games-sidebar .sidebar-games-grid #show-more-related .show-more-related-plus {
                display: none !important;
            }
        }
        .game-intro-header {
            border-bottom: 1px solid rgba(168, 85, 247, 0.22) !important;
            padding-bottom: 14px !important;
        }
        .game-title {
            font-family: 'Rubik', 'Fredoka', sans-serif !important;
            font-weight: 800 !important;
            color: #ffffff !important;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
        }
        .breadcrumb li a {
            color: #c4b5fd !important;
        }
        .breadcrumb li a:hover {
            color: #fde047 !important;
        }
        .chip-tag {
            background: linear-gradient(180deg, rgba(45, 31, 84, 0.85) 0%, rgba(28, 19, 54, 0.9) 100%) !important;
            border: 1px solid rgba(168, 85, 247, 0.35) !important;
            color: #e9d5ff !important;
            border-radius: 999px !important;
            font-weight: 700 !important;
            padding: 5px 13px !important;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
        }
        .chip-tag:hover {
            background: linear-gradient(180deg, #4b2d83 0%, #311b5e 100%) !important;
            border-color: #f6c453 !important;
            color: #fde047 !important;
            transform: translateY(-1px);
        }
        .game-meta-tabs-wrapper {
            background: linear-gradient(180deg, rgba(32, 20, 61, 0.88) 0%, rgba(19, 12, 38, 0.94) 100%) !important;
            border: 1.5px solid rgba(168, 85, 247, 0.28) !important;
            border-radius: 20px !important;
            box-shadow: 0 12px 32px rgba(5, 2, 14, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
        }
        .game-tabs-nav {
            background: rgba(16, 10, 32, 0.9) !important;
            border-bottom: 1.5px solid rgba(168, 85, 247, 0.24) !important;
            padding: 6px 10px 0 !important;
        }
        .game-tab-btn {
            color: #b8abdf !important;
            font-family: 'Rubik', 'Fredoka', sans-serif !important;
            font-weight: 800 !important;
            letter-spacing: 0.3px !important;
        }
        .game-tab-btn:hover {
            color: #ffffff !important;
            background: rgba(168, 85, 247, 0.1) !important;
        }
        .game-tab-btn.active {
            color: #fde047 !important;
            border-bottom-color: #f6c453 !important;
            background: linear-gradient(180deg, transparent 0%, rgba(246, 196, 83, 0.14) 100%) !important;
        }
        .game-tab-badge {
            background: rgba(168, 85, 247, 0.2) !important;
            color: #e9d5ff !important;
            border: 1px solid rgba(168, 85, 247, 0.35) !important;
        }
        .game-tab-btn.active .game-tab-badge {
            background: linear-gradient(180deg, #fde047 0%, #f59e0b 100%) !important;
            color: #261300 !important;
            border-color: #fef08a !important;
        }
        .game-details-section {
            background: linear-gradient(180deg, #241744 0%, #180f30 100%) !important;
            border: 1.5px solid rgba(168, 85, 247, 0.26) !important;
            border-radius: 16px !important;
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
        }
        .game-details-section h2,
        .game-details-section h3 {
            font-family: 'Rubik', 'Fredoka', sans-serif !important;
            color: #fde047 !important;
        }
        .description-fade {
            background: linear-gradient(to bottom, rgba(24, 15, 48, 0) 0%, #180f30 95%) !important;
        }
        .read-more-btn {
            background: rgba(168, 85, 247, 0.16) !important;
            border: 1px solid rgba(246, 196, 83, 0.45) !important;
            color: #fde047 !important;
            border-radius: 999px !important;
            padding: 6px 16px !important;
            font-weight: 800 !important;
        }
        .read-more-btn:hover {
            background: rgba(246, 196, 83, 0.2) !important;
            color: #ffffff !important;
        }
        .spec-card,
        .lb-boards-switch,
        .lb-table-wrapper,
        .ach-header-card,
        .achievement-card,
        .download-buttons-container {
            background: linear-gradient(180deg, rgba(38, 25, 72, 0.78) 0%, rgba(22, 14, 44, 0.88) 100%) !important;
            border: 1.5px solid rgba(168, 85, 247, 0.25) !important;
            border-radius: 14px !important;
        }
        .spec-label,
        .lb-table th {
            color: #b4a4e0 !important;
        }
        .lb-scope-pill.active {
            background: linear-gradient(180deg, #ffe885 0%, #f7b733 52%, #df9018 100%) !important;
            color: #261300 !important;
            font-weight: 900 !important;
        }
        @media (min-width: 1281px) {
            .right-sidebar-column {
                top: 78px !important;
            }
        }
        .show-more-related {
            background: linear-gradient(180deg, #352063 0%, #221342 100%) !important;
            border: 1.5px solid #f6c453 !important;
            color: #fde047 !important;
            border-radius: 999px !important;
            font-family: 'Rubik', 'Fredoka', sans-serif !important;
            font-weight: 900 !important;
            text-transform: uppercase !important;
            letter-spacing: 0.4px !important;
            box-shadow: 0 4px 0 #120824, 0 6px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
        }
        .show-more-related:hover {
            background: linear-gradient(180deg, #4b2d83 0%, #311b5e 100%) !important;
            color: #ffffff !important;
            transform: translateY(-1.5px) !important;
        }

        /* =========================================================
           12. FIX HOVER RAIL HERO (.small-game) & REFONTE UX SÉLECTEUR DE LANGUE (DROP-UP PLEINE LARGEUR)
           ========================================================= */
        .hero-games-showcase.has-active-card,
        .hero-games-showcase:has(.is-card-expanded),
        #recent-games-section.has-active-card,
        #recent-games-section:has(.is-card-expanded) {
            z-index: 100 !important;
            position: relative !important;
            overflow: visible !important;
        }
        @media (min-width: 769px) {
            /* Chambre d'expansion verticale compensée (38px - 32px = 6px haut, 38px - 30px = 8px bas) :
               0 impact sur la hauteur visuelle de la page, 0 rognage des petites cartes Hero à scale(1.20) */
            .hero-games-showcase .carousel-wrapper,
            .hero-games-showcase .hero-grid-scroll-wrapper,
            .hero-games-showcase .games-grid-scroll-wrapper,
            #recent-games-section.recent-games-strip .carousel-wrapper,
            #recent-games-section.recent-games-strip .games-grid-scroll-wrapper {
                padding-top: 38px !important;
                padding-bottom: 38px !important;
                margin-top: -32px !important;
                margin-bottom: -30px !important;
            }
            /* Rétablir l'interactivité du footer du tiroir dans tous les états ouverts (hover, pinned, open, lang-dropdown-open) */
            body:not(.drawer-hover):not(.drawer-pinned):not(.drawer-open) .category-drawer .drawer-footer-nav {
                opacity: 0 !important;
                pointer-events: none !important;
            }
            body.drawer-hover .category-drawer .drawer-footer-nav,
            body.drawer-pinned .category-drawer .drawer-footer-nav,
            body.drawer-open .category-drawer .drawer-footer-nav,
            body.lang-dropdown-open .category-drawer .drawer-footer-nav {
                opacity: 1 !important;
                visibility: visible !important;
                pointer-events: auto !important;
            }
        }

        /* Sélecteur de langue UX : Capsule pleine largeur + Drop-Up vers le haut + Isolation complète du clic */
        .category-drawer .drawer-footer-nav {
            position: relative !important;
            z-index: 30 !important;
            width: 100% !important;
            padding: 12px 12px 16px 12px !important;
            box-sizing: border-box !important;
        }
        .category-drawer .drawer-footer-nav > ul:first-child {
            display: block !important;
            width: 100% !important;
            max-width: 100% !important;
            padding: 0 !important;
            margin: 0 0 10px 0 !important;
            list-style: none !important;
            box-sizing: border-box !important;
        }
        .category-drawer .drawer-footer-nav .language-switcher-container {
            display: block !important;
            width: 100% !important;
            max-width: 100% !important;
            padding: 0 !important;
            margin: 0 !important;
            box-sizing: border-box !important;
            position: relative !important;
            z-index: 50 !important;
        }
        /* Label conservé pour les lecteurs d'écran (aria-labelledby) mais masqué visuellement pour éviter tout débordement à droite */
        .category-drawer #lang-switcher-label {
            position: absolute !important;
            width: 1px !important;
            height: 1px !important;
            padding: 0 !important;
            margin: -1px !important;
            overflow: hidden !important;
            clip: rect(0, 0, 0, 0) !important;
            white-space: nowrap !important;
            border: 0 !important;
        }
        .category-drawer .language-dropdown {
            position: relative !important;
            width: 100% !important;
            max-width: 100% !important;
            box-sizing: border-box !important;
        }
        .category-drawer .lang-dropdown-btn {
            width: 100% !important;
            min-width: 0 !important;
            max-width: 100% !important;
            box-sizing: border-box !important;
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            gap: 8px !important;
            padding: 9px 12px !important;
            background: linear-gradient(180deg, rgba(40, 25, 76, 0.92) 0%, rgba(20, 12, 42, 0.96) 100%) !important;
            border: 1.5px solid rgba(246, 196, 83, 0.45) !important;
            border-radius: 12px !important;
            color: #fef08a !important;
            font-size: 13.5px !important;
            font-weight: 700 !important;
            cursor: pointer !important;
            pointer-events: auto !important;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
            transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease !important;
        }
        .category-drawer .lang-dropdown-btn:hover,
        .category-drawer .lang-dropdown-btn[aria-expanded="true"] {
            border-color: #fde047 !important;
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55), 0 0 12px rgba(246, 196, 83, 0.28) !important;
        }
        .category-drawer .lang-dropdown-btn .lang-globe-icon {
            font-size: 15px !important;
            line-height: 1 !important;
            flex-shrink: 0 !important;
        }
        .category-drawer .lang-dropdown-btn #current-lang-text {
            flex: 1 !important;
            min-width: 0 !important;
            text-align: left !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            white-space: nowrap !important;
            color: #ffffff !important;
        }
        .category-drawer .lang-dropdown-btn .dropdown-arrow {
            width: 14px !important;
            height: 14px !important;
            flex-shrink: 0 !important;
            color: #fde047 !important;
            transition: transform 0.22s ease !important;
        }
        .category-drawer .lang-dropdown-btn[aria-expanded="true"] .dropdown-arrow {
            transform: rotate(180deg) !important;
        }
        /* Menu déroulant en mode DROP-UP (s'ouvre vers le HAUT dans le champ de vision, pleine largeur du tiroir) */
        .category-drawer .lang-dropdown-list {
            position: absolute !important;
            bottom: calc(100% + 8px) !important;
            top: auto !important;
            left: 0 !important;
            right: 0 !important;
            width: 100% !important;
            min-width: 0 !important;
            max-height: 260px !important;
            margin: 0 !important;
            padding: 6px !important;
            box-sizing: border-box !important;
            background: linear-gradient(180deg, #28184d 0%, #150c2b 100%) !important;
            border: 1.5px solid rgba(246, 196, 83, 0.65) !important;
            border-radius: 14px !important;
            box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.85), 0 0 22px rgba(124, 58, 237, 0.35) !important;
            z-index: 9999 !important;
            overflow-y: auto !important;
            overflow-x: hidden !important;
            opacity: 0 !important;
            visibility: hidden !important;
            pointer-events: none !important;
            transform: translateY(8px) !important;
            transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1) !important;
            scrollbar-width: thin !important;
            scrollbar-color: #f6c453 rgba(20, 12, 41, 0.6) !important;
        }
        .category-drawer .lang-dropdown-list.open {
            opacity: 1 !important;
            visibility: visible !important;
            pointer-events: auto !important;
            transform: translateY(0) !important;
        }
        /* Isolation stricte de chaque option de langue contre les règles globales .drawer-nav li a (Desktop & Mobile) */
        .category-drawer .drawer-nav li a.lang-option,
        .category-drawer .lang-dropdown-list a.lang-option {
            display: flex !important;
            flex-direction: row !important;
            align-items: center !important;
            justify-content: space-between !important;
            width: 100% !important;
            min-height: 36px !important;
            height: auto !important;
            margin: 0 0 2px 0 !important;
            padding: 7px 11px !important;
            border-radius: 9px !important;
            background: transparent !important;
            border: 1px solid transparent !important;
            box-shadow: none !important;
            color: #e9d5ff !important;
            font-family: system-ui, -apple-system, 'Segoe UI', sans-serif !important;
            font-size: 13px !important;
            font-weight: 600 !important;
            text-align: left !important;
            pointer-events: auto !important;
            cursor: pointer !important;
            box-sizing: border-box !important;
        }
        .category-drawer .drawer-nav li a.lang-option:hover,
        .category-drawer .lang-dropdown-list a.lang-option:hover {
            background: rgba(139, 92, 246, 0.28) !important;
            border-color: rgba(167, 139, 250, 0.38) !important;
            color: #ffffff !important;
            transform: none !important;
        }
        .category-drawer .drawer-nav li a.lang-option.active,
        .category-drawer .lang-dropdown-list a.lang-option.active {
            background: linear-gradient(90deg, rgba(246, 196, 83, 0.25) 0%, rgba(124, 58, 237, 0.22) 100%) !important;
            border-color: rgba(246, 196, 83, 0.55) !important;
            color: #fde047 !important;
            font-weight: 800 !important;
        }
        .category-drawer .drawer-nav li a.lang-option.active::after {
            content: '✓' !important;
            font-size: 12px !important;
            font-weight: 900 !important;
            color: #fde047 !important;
            margin-left: 8px !important;
        }

        /* ==========================================================================
           BLOC SEO & FAQ STRUCTURÉE DYNAMIQUE EN BAS DES PAGES CATÉGORIES
           ========================================================================== */
        .category-seo-faq-section {
            margin: 18px 24px 36px 24px;
            padding: 24px 28px;
            border-radius: 22px;
            background: linear-gradient(145deg, rgba(36, 18, 72, 0.78) 0%, rgba(19, 10, 41, 0.92) 100%);
            border: 1.5px solid rgba(167, 139, 250, 0.28);
            box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
        }
        .cat-seo-faq-header {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-bottom: 16px;
        }
        .cat-seo-faq-badge {
            display: inline-flex;
            align-items: center;
            width: fit-content;
            padding: 3px 10px;
            border-radius: 999px;
            background: rgba(246, 196, 83, 0.14);
            border: 1px solid rgba(246, 196, 83, 0.42);
            color: #fde047;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }
        .cat-seo-faq-title {
            margin: 0;
            font-size: 1.2rem;
            font-weight: 800;
            color: #ffffff;
            line-height: 1.3;
        }
        .cat-seo-faq-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .cat-faq-item {
            border-radius: 14px;
            background: rgba(15, 8, 32, 0.55);
            border: 1px solid rgba(167, 139, 250, 0.22);
            overflow: hidden;
            transition: border-color 0.2s ease, background 0.2s ease;
        }
        .cat-faq-item[open] {
            border-color: rgba(246, 196, 83, 0.48);
            background: rgba(24, 13, 50, 0.78);
        }
        .cat-faq-question {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 13px 16px;
            cursor: pointer;
            list-style: none;
            color: #f3e8ff;
            font-size: 0.95rem;
            font-weight: 700;
            user-select: none;
        }
        .cat-faq-question::-webkit-details-marker {
            display: none;
        }
        .cat-faq-chevron {
            color: #f6c453;
            font-size: 14px;
            transition: transform 0.2s ease;
            flex-shrink: 0;
        }
        .cat-faq-item[open] .cat-faq-chevron {
            transform: rotate(180deg);
        }
        .cat-faq-answer {
            padding: 0 16px 14px 16px;
            color: #d8b4fe;
            font-size: 0.88rem;
            line-height: 1.6;
        }
        .cat-faq-answer p {
            margin: 0;
        }
        .cat-faq-game-link {
            color: #fde047;
            font-weight: 700;
            text-decoration: underline;
            text-underline-offset: 2px;
            transition: color 0.15s ease;
        }
        .cat-faq-game-link:hover {
            color: #ffffff;
        }
        @media (max-width: 768px) {
            .category-seo-faq-section {
                margin: 14px 12px 28px 12px;
                padding: 16px;
                border-radius: 18px;
            }
            .cat-seo-faq-title {
                font-size: 1.05rem;
            }
            .cat-faq-question {
                padding: 11px 13px;
                font-size: 0.88rem;
            }
            .cat-faq-answer {
                padding: 0 13px 12px 13px;
                font-size: 0.83rem;
            }
        }

/* =========================================================
   VERROUILLAGE STRICT DU SCROLL & ADAPTATION HEADER EN MODE IMMERSIF MOBILE
   ========================================================= */
html:has(body.immersive-mode),
html.immersive-lock,
body.immersive-mode {
    overflow: hidden !important;
    overscroll-behavior: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.immersive-mode {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    touch-action: none !important;
}
body.immersive-mode #game-iframe,
body.immersive-mode .site-header {
    touch-action: auto !important;
}
body.immersive-mode .site-footer,
body.immersive-mode .game-actions-bar,
body.immersive-mode .top-ban-placeholder,
body.immersive-mode .game-content-columns,
body.immersive-mode .right-sidebar-column,
body.immersive-mode .category-drawer,
body.immersive-mode #scroll-to-top-button,
body.immersive-mode .site-header .logo,
body.immersive-mode .site-header .drawer-search-bar-mobile,
body.immersive-mode #open-drawer-button,
body.immersive-mode #user-panel-button,
body.immersive-mode #header-streak-badge,
body.immersive-mode .hud-streak-capsule,
body.immersive-mode #header-xp-boost,
body.immersive-mode #header-challenges-button {
    display: none !important;
}
body.immersive-mode #back-to-home-button,
body.immersive-mode #header-favorite-button {
    display: inline-flex !important;
}
body.immersive-mode .site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    border-radius: 0 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
}
body.immersive-mode .site-main-content,
body.immersive-mode.game-page-layout .site-main-content,
body.immersive-mode:not(.game-page-layout) .site-main-content {
    padding-top: 46px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
}
body.immersive-mode .game-layout-wrapper,
body.immersive-mode .main-column {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    display: block !important;
}
body.immersive-mode .game-player-wrapper {
    width: 100vw !important;
    max-width: 100vw !important;
    height: calc(100vh - 46px) !important;
    height: calc(100dvh - 46px) !important;
    max-height: calc(100dvh - 46px) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
}
body.immersive-mode .game-embed-container {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    aspect-ratio: unset !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}
body.immersive-mode #game-iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    display: block !important;
}
@media (orientation: landscape) {
    body.immersive-mode .site-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
        bottom: 0 !important;
        transform: none !important;
        width: 45px !important;
        min-width: 45px !important;
        max-width: 45px !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        padding: 12px 0 !important;
        border-radius: 0 !important;
        border-top: none !important;
        border-bottom: none !important;
        border-left: none !important;
        border-right: 1px solid rgba(246, 196, 83, 0.32) !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    body.immersive-mode .site-header .header-content {
        width: 100% !important;
        height: auto !important;
        flex: 0 0 auto !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
    }
    body.immersive-mode .site-header .header-left {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        width: 100% !important;
    }
    body.immersive-mode .site-header #header-fullscreen-button {
        margin-left: 0 !important;
        margin-top: 0 !important;
    }
    body.immersive-mode .site-header .header-right {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 10px !important;
        margin-top: auto !important;
        margin-left: 0 !important;
    }
    body.immersive-mode .site-header #header-user-level {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 50% !important;
        justify-content: center !important;
    }
    body.immersive-mode .site-header #header-user-level .hud-progress-block,
    body.immersive-mode .site-header #header-user-level .hud-lvl-prefix,
    body.immersive-mode .site-header #header-user-level #header-quest-gem {
        display: none !important;
    }
    body.immersive-mode .site-header #header-user-level .hud-level-badge {
        width: 28px !important;
        height: 28px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        justify-content: center !important;
    }
    body.immersive-mode .site-header #header-user-level #header-user-level-value {
        display: inline !important;
        font-size: 11px !important;
    }
    body.immersive-mode .site-main-content,
    body.immersive-mode.game-page-layout .site-main-content,
    body.immersive-mode:not(.game-page-layout) .site-main-content {
        margin-left: 45px !important;
        margin-right: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        width: calc(100vw - 45px) !important;
        max-width: calc(100vw - 45px) !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow: hidden !important;
    }
    body.immersive-mode .game-player-wrapper {
        width: calc(100vw - 45px) !important;
        max-width: calc(100vw - 45px) !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}
