/* ========================================
   COMMERCIFY MODAL JEUX COMMERCIFY
   Standard: overlay+flou, 80% max width, header one line, white/dark Dashlight
   ======================================== */

/* Backdrop masqué : overlay + flou portés par le modal */
body:has(#gamesCommercifyModal.show) .modal-backdrop,
body:has(#gameShootYourScammersModal.show) .modal-backdrop,
body:has(#gameKoinkoinsModal.show) .modal-backdrop,
body.modal-games-open .modal-backdrop,
body.modal-game-koinkoins-open .modal-backdrop,
body.modal-game-shoot-open .modal-backdrop {
    display: none !important;
}

/* Overlay plein écran (commun aux 3 modales) */
#gamesCommercifyModal,
#gameShootYourScammersModal,
#gameKoinkoinsModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    margin: 0 !important;
    padding: 1rem !important;
    border: none !important;
    border-radius: 0;
    box-shadow: none !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    overflow: hidden !important;
}

#gamesCommercifyModal:not(.show),
#gameShootYourScammersModal:not(.show),
#gameKoinkoinsModal:not(.show) {
    display: none !important;
}

#gamesCommercifyModal.show,
#gamesCommercifyModal.fade.show,
#gameShootYourScammersModal.show,
#gameShootYourScammersModal.fade.show,
#gameKoinkoinsModal.show,
#gameKoinkoinsModal.fade.show {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding-top: 20px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Desktop (min-width: 1280px) : plein écran strict, pas de padding (géré par commercify_modal_desktop_sizes.css) */
@media (min-width: 1280px) {
    #gameKoinkoinsModal.show,
    #gameKoinkoinsModal.fade.show,
    #gameShootYourScammersModal.show,
    #gameShootYourScammersModal.fade.show {
        padding: 0 !important;
        align-items: stretch !important;
        justify-content: stretch !important;
    }
}

/* Boîte : dimensionnement géré par fullscreen_touch.css (plein écran) */
/* ═══ V3 Header + Footer alignés sur le modal Dashboard (FICHE_MISE_A_NIVEAU_MODALES_DASHBOARD_V3) ═══ */
#gamesCommercifyModal .dashboard-modal-header {
    position: relative !important;
    background: #101924 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: clamp(16px, 2vw, 22px) clamp(16px, 2vw, 24px) !important;
    padding-right: 8rem !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
    min-height: 80px !important;
    max-height: 180px !important;
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    overflow: clip !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    overscroll-behavior: none !important;
}
#gamesCommercifyModal .dashboard-modal-header *,
#gamesCommercifyModal .dashboard-modal-header *::before,
#gamesCommercifyModal .dashboard-modal-header *::after {
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
#gamesCommercifyModal .dashboard-modal-header .dashboard-modal-logo-link,
#gamesCommercifyModal .dashboard-modal-header .dashboard-modal-lang-btn,
#gamesCommercifyModal .dashboard-modal-header .dashboard-modal-search-btn,
#gamesCommercifyModal .dashboard-modal-header .dashboard-modal-theme-btn,
#gamesCommercifyModal .dashboard-modal-header .dashboard-modal-close {
    overflow: visible !important;
}
#gamesCommercifyModal .dashboard-modal-header::-webkit-scrollbar,
#gamesCommercifyModal .dashboard-modal-header *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
#gamesCommercifyModal .dashboard-modal-header .container-fluid {
    flex: 1 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden !important;
}
#gamesCommercifyModal .dashboard-modal-header .row {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    min-height: 0 !important;
    overflow: hidden !important;
}
#gamesCommercifyModal .dashboard-modal-header .col.dashboard-modal-header-col,
#gamesCommercifyModal .dashboard-modal-header .col {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem 1rem !important;
    text-align: left !important;
    padding: 0 !important;
    padding-right: 18rem !important;
    max-width: none !important;
    min-height: 0 !important;
    overflow: hidden !important;
}
#gamesCommercifyModal .dashboard-modal-header .dashboard-modal-header-inner {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
    gap: 0.5rem 1.5rem !important;
    min-width: 0 !important;
    width: 100% !important;
}
#gamesCommercifyModal .dashboard-modal-header .dashboard-modal-header-spacer { min-width: 0 !important; }
#gamesCommercifyModal .dashboard-modal-header .dashboard-modal-logo-link {
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
    justify-self: start !important;
}
#gamesCommercifyModal .dashboard-modal-header .dashboard-modal-logo {
    height: 54px !important;
    width: auto !important;
    flex-shrink: 0 !important;
    border: 10px solid #000000 !important;
    display: block !important;
}
#gamesCommercifyModal .dashboard-modal-header .dashboard-modal-title {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    width: max-content !important;
    max-width: calc(100% - 4rem) !important;
    text-align: center !important;
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    padding-bottom: 0.35rem !important;
    border-bottom: 2px solid rgba(255, 204, 0, 0.55) !important;
    line-height: 1.25 !important;
    z-index: 1 !important;
    pointer-events: none !important;
    color: #e9ecef !important;
}
#gamesCommercifyModal .dashboard-modal-lang-btn,
#gamesCommercifyModal .dashboard-modal-search-btn,
#gamesCommercifyModal .dashboard-modal-theme-btn {
    position: absolute !important;
    top: 50% !important;
    right: 14rem !important;
    transform: translateY(-50%) !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: 2px solid #ffcc00 !important;
    border-radius: 0;
    color: #e9ecef !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.12s ease !important;
    z-index: 20 !important;
}
#gamesCommercifyModal .dashboard-modal-search-btn { right: 9.75rem !important; }
#gamesCommercifyModal .dashboard-modal-theme-btn { right: 5.5rem !important; }
#gamesCommercifyModal .dashboard-modal-lang-btn:hover,
#gamesCommercifyModal .dashboard-modal-search-btn:hover,
#gamesCommercifyModal .dashboard-modal-theme-btn:hover {
    background: rgba(0, 0, 0, 0.5) !important;
    border-color: #ffcc00 !important;
    color: #ffffff !important;
    transform: translateY(-50%) scale(1.05) !important;
}
#gamesCommercifyModal .dashboard-modal-lang-btn:focus-visible,
#gamesCommercifyModal .dashboard-modal-search-btn:focus-visible,
#gamesCommercifyModal .dashboard-modal-theme-btn:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.5) !important;
}
#gamesCommercifyModal .dashboard-modal-lang-btn .dashboard-modal-lang-btn-icon,
#gamesCommercifyModal .dashboard-modal-lang-btn img.dashboard-modal-lang-btn-icon,
#gamesCommercifyModal .dashboard-modal-search-btn .dashboard-modal-search-btn-icon,
#gamesCommercifyModal .dashboard-modal-theme-btn .theme-icon {
    width: 28px !important;
    height: 28px !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}
#gamesCommercifyModal .dashboard-modal-close {
    position: absolute !important;
    top: 50% !important;
    right: 1.25rem !important;
    transform: translateY(-50%) !important;
    background: #0d0d0d !important;
    border: 2px solid #ffcc00 !important;
    border-radius: 0;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.12s ease !important;
    z-index: 20 !important;
}
#gamesCommercifyModal .dashboard-modal-close svg {
    width: 30px !important;
    height: 30px !important;
    max-width: 100% !important;
    max-height: 100% !important;
}
#gamesCommercifyModal .dashboard-modal-close:hover {
    background: #ffcc00 !important;
    border-color: #ffcc00 !important;
    color: #0d0d0d !important;
    transform: translateY(-50%) scale(1.06) !important;
}
#gamesCommercifyModal .dashboard-modal-close:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.5) !important;
}

/* Footer */
#gamesCommercifyModal .modal-footer.dashboard-modal-footer {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.75rem 1rem !important;
    border-top: 1px solid rgba(255, 204, 0, 0.2) !important;
    background: #0a0a0a !important;
    padding: 0.75rem 1.25rem !important;
}
#gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-nav {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0 0.5rem !important;
    font-size: 0.8rem !important;
}
#gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-nav-link {
    color: #e9ecef !important;
    text-decoration: none !important;
    padding: 0.2rem 0 !important;
    border-bottom: 1px solid transparent !important;
    transition: color 0.2s ease, border-color 0.2s ease !important;
}
#gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-nav-link:hover {
    color: #ffcc00 !important;
    border-bottom-color: rgba(255, 204, 0, 0.5) !important;
}
#gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-nav-sep {
    color: rgba(255, 255, 255, 0.35) !important;
    font-weight: 300 !important;
    user-select: none !important;
}
#gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-nav-link-tour {
    font-weight: 600 !important;
    color: #ffcc00 !important;
    border-bottom-color: rgba(255, 204, 0, 0.4) !important;
}
#gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-nav-link-tour:hover {
    color: #fff !important;
    border-bottom-color: #ffcc00 !important;
}
#gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
}
#gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-back-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    min-width: 7rem !important;
    padding: 0.5rem 0.9rem !important;
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.45) !important;
    border-radius: 0;
    color: #e9ecef !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}
#gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-back-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 204, 0, 0.6) !important;
    color: #ffcc00 !important;
}
#gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-back-btn .dashboard-modal-footer-back-btn-icon {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
}
#gamesCommercifyModal .modal-footer .commercify-modal-btn-fermer {
    background: #0d0d0d !important;
    border: 2px solid #ffcc00 !important;
    color: #ffffff !important;
    border-radius: 0;
    padding: 0.65rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}
#gamesCommercifyModal .modal-footer .commercify-modal-btn-fermer:hover {
    background: rgba(255, 204, 0, 0.25) !important;
    border-color: #ffcc00 !important;
    color: #ffcc00 !important;
}

[dir="rtl"] #gamesCommercifyModal .dashboard-modal-header {
    padding-left: 8rem !important;
    padding-right: clamp(16px, 2vw, 24px) !important;
}
[dir="rtl"] #gamesCommercifyModal .dashboard-modal-lang-btn { right: auto !important; left: 14rem !important; }
[dir="rtl"] #gamesCommercifyModal .dashboard-modal-search-btn { right: auto !important; left: 9.75rem !important; }
[dir="rtl"] #gamesCommercifyModal .dashboard-modal-theme-btn { right: auto !important; left: 5.5rem !important; }
[dir="rtl"] #gamesCommercifyModal .dashboard-modal-close { right: auto !important; left: 1.25rem !important; }
[dir="rtl"] #gamesCommercifyModal .dashboard-modal-header .col.dashboard-modal-header-col {
    padding-right: 0 !important;
    padding-left: 18rem !important;
}

/* ═══ V3 Modales de JEU (Koinkoins, Shoot) — header + footer alignés Dashboard ═══ */
#gameKoinkoinsModal .dashboard-modal-header,
#gameShootYourScammersModal .dashboard-modal-header {
    position: relative !important;
    background: #101924 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: clamp(16px, 2vw, 22px) clamp(16px, 2vw, 24px) !important;
    padding-right: 8rem !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    flex-shrink: 0 !important;
    min-height: 80px !important;
    max-height: 180px !important;
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    overflow: clip !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    overscroll-behavior: none !important;
}
#gameKoinkoinsModal .dashboard-modal-header *,
#gameKoinkoinsModal .dashboard-modal-header *::before,
#gameKoinkoinsModal .dashboard-modal-header *::after,
#gameShootYourScammersModal .dashboard-modal-header *,
#gameShootYourScammersModal .dashboard-modal-header *::before,
#gameShootYourScammersModal .dashboard-modal-header *::after {
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
#gameKoinkoinsModal .dashboard-modal-header .dashboard-modal-logo-link,
#gameKoinkoinsModal .dashboard-modal-header .dashboard-modal-lang-btn,
#gameKoinkoinsModal .dashboard-modal-header .dashboard-modal-search-btn,
#gameKoinkoinsModal .dashboard-modal-header .dashboard-modal-theme-btn,
#gameKoinkoinsModal .dashboard-modal-header .dashboard-modal-close,
#gameShootYourScammersModal .dashboard-modal-header .dashboard-modal-logo-link,
#gameShootYourScammersModal .dashboard-modal-header .dashboard-modal-lang-btn,
#gameShootYourScammersModal .dashboard-modal-header .dashboard-modal-search-btn,
#gameShootYourScammersModal .dashboard-modal-header .dashboard-modal-theme-btn,
#gameShootYourScammersModal .dashboard-modal-header .dashboard-modal-close {
    overflow: visible !important;
}
#gameKoinkoinsModal .dashboard-modal-header .container-fluid,
#gameShootYourScammersModal .dashboard-modal-header .container-fluid {
    flex: 1 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden !important;
}
#gameKoinkoinsModal .dashboard-modal-header .row,
#gameShootYourScammersModal .dashboard-modal-header .row {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    min-height: 0 !important;
    overflow: hidden !important;
}
#gameKoinkoinsModal .dashboard-modal-header .col.dashboard-modal-header-col,
#gameKoinkoinsModal .dashboard-modal-header .col,
#gameShootYourScammersModal .dashboard-modal-header .col.dashboard-modal-header-col,
#gameShootYourScammersModal .dashboard-modal-header .col {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem 1rem !important;
    text-align: left !important;
    padding: 0 !important;
    padding-right: 18rem !important;
    max-width: none !important;
    min-height: 0 !important;
    overflow: hidden !important;
}
#gameKoinkoinsModal .dashboard-modal-header .dashboard-modal-header-inner,
#gameShootYourScammersModal .dashboard-modal-header .dashboard-modal-header-inner {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
    gap: 0.5rem 1.5rem !important;
    min-width: 0 !important;
    width: 100% !important;
}
#gameKoinkoinsModal .dashboard-modal-header .dashboard-modal-logo-link,
#gameShootYourScammersModal .dashboard-modal-header .dashboard-modal-logo-link {
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
    justify-self: start !important;
}
#gameKoinkoinsModal .dashboard-modal-header .dashboard-modal-logo,
#gameShootYourScammersModal .dashboard-modal-header .dashboard-modal-logo {
    height: 54px !important;
    width: auto !important;
    flex-shrink: 0 !important;
    border: 10px solid #000000 !important;
    display: block !important;
}
#gameKoinkoinsModal .dashboard-modal-header .dashboard-modal-title,
#gameShootYourScammersModal .dashboard-modal-header .dashboard-modal-title {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    width: max-content !important;
    max-width: calc(100% - 4rem) !important;
    text-align: center !important;
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    padding-bottom: 0.35rem !important;
    border-bottom: 2px solid rgba(255, 204, 0, 0.55) !important;
    line-height: 1.25 !important;
    z-index: 1 !important;
    pointer-events: none !important;
    color: #e9ecef !important;
}
#gameKoinkoinsModal .dashboard-modal-lang-btn,
#gameKoinkoinsModal .dashboard-modal-search-btn,
#gameKoinkoinsModal .dashboard-modal-theme-btn,
#gameShootYourScammersModal .dashboard-modal-lang-btn,
#gameShootYourScammersModal .dashboard-modal-search-btn,
#gameShootYourScammersModal .dashboard-modal-theme-btn {
    position: absolute !important;
    top: 50% !important;
    right: 14rem !important;
    transform: translateY(-50%) !important;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: 2px solid #ffcc00 !important;
    border-radius: 0;
    color: #e9ecef !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.12s ease !important;
    z-index: 20 !important;
}
#gameKoinkoinsModal .dashboard-modal-search-btn,
#gameShootYourScammersModal .dashboard-modal-search-btn { right: 9.75rem !important; }
#gameKoinkoinsModal .dashboard-modal-theme-btn,
#gameShootYourScammersModal .dashboard-modal-theme-btn { right: 5.5rem !important; }
#gameKoinkoinsModal .dashboard-modal-lang-btn:hover,
#gameKoinkoinsModal .dashboard-modal-search-btn:hover,
#gameKoinkoinsModal .dashboard-modal-theme-btn:hover,
#gameShootYourScammersModal .dashboard-modal-lang-btn:hover,
#gameShootYourScammersModal .dashboard-modal-search-btn:hover,
#gameShootYourScammersModal .dashboard-modal-theme-btn:hover {
    background: rgba(0, 0, 0, 0.5) !important;
    border-color: #ffcc00 !important;
    color: #ffffff !important;
    transform: translateY(-50%) scale(1.05) !important;
}
#gameKoinkoinsModal .dashboard-modal-close,
#gameShootYourScammersModal .dashboard-modal-close {
    position: absolute !important;
    top: 50% !important;
    right: 1.25rem !important;
    transform: translateY(-50%) !important;
    background: #0d0d0d !important;
    border: 2px solid #ffcc00 !important;
    border-radius: 0;
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ffffff !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.12s ease !important;
    z-index: 20 !important;
}
#gameKoinkoinsModal .dashboard-modal-close:hover,
#gameShootYourScammersModal .dashboard-modal-close:hover {
    background: #ffcc00 !important;
    border-color: #ffcc00 !important;
    color: #0d0d0d !important;
    transform: translateY(-50%) scale(1.06) !important;
}
/* Icônes header à taille normale (28px comme les autres modales) — loupe + soleil/lune */
#gameKoinkoinsModal .dashboard-modal-lang-btn .dashboard-modal-lang-btn-icon,
#gameKoinkoinsModal .dashboard-modal-lang-btn img.dashboard-modal-lang-btn-icon,
#gameKoinkoinsModal .dashboard-modal-search-btn .dashboard-modal-search-btn-icon,
#gameKoinkoinsModal .dashboard-modal-theme-btn .theme-icon,
#gameShootYourScammersModal .dashboard-modal-lang-btn .dashboard-modal-lang-btn-icon,
#gameShootYourScammersModal .dashboard-modal-lang-btn img.dashboard-modal-lang-btn-icon,
#gameShootYourScammersModal .dashboard-modal-search-btn .dashboard-modal-search-btn-icon,
#gameShootYourScammersModal .dashboard-modal-theme-btn .theme-icon {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    object-fit: contain !important;
}
/* Footer modales de jeu */
#gameKoinkoinsModal .modal-footer.dashboard-modal-footer,
#gameShootYourScammersModal .modal-footer.dashboard-modal-footer {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.75rem 1rem !important;
    border-top: 1px solid rgba(255, 204, 0, 0.2) !important;
    background: #0a0a0a !important;
    padding: 0.75rem 1.25rem !important;
}
#gameKoinkoinsModal .dashboard-modal-footer .dashboard-modal-footer-actions,
#gameShootYourScammersModal .dashboard-modal-footer .dashboard-modal-footer-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
}
#gameKoinkoinsModal .dashboard-modal-footer .dashboard-modal-footer-nav,
#gameShootYourScammersModal .dashboard-modal-footer .dashboard-modal-footer-nav {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0 0.5rem !important;
    font-size: 0.8rem !important;
}
#gameKoinkoinsModal .dashboard-modal-footer .dashboard-modal-footer-nav-link,
#gameShootYourScammersModal .dashboard-modal-footer .dashboard-modal-footer-nav-link {
    color: #e9ecef !important;
    text-decoration: none !important;
    padding: 0.2rem 0 !important;
    border-bottom: 1px solid transparent !important;
    transition: color 0.2s ease, border-color 0.2s ease !important;
}
#gameKoinkoinsModal .dashboard-modal-footer .dashboard-modal-footer-nav-link:hover,
#gameShootYourScammersModal .dashboard-modal-footer .dashboard-modal-footer-nav-link:hover {
    color: #ffcc00 !important;
    border-bottom-color: rgba(255, 204, 0, 0.5) !important;
}
#gameKoinkoinsModal .dashboard-modal-footer .dashboard-modal-footer-nav-link-tour,
#gameShootYourScammersModal .dashboard-modal-footer .dashboard-modal-footer-nav-link-tour {
    font-weight: 600 !important;
    color: #ffcc00 !important;
    border-bottom-color: rgba(255, 204, 0, 0.4) !important;
}
#gameKoinkoinsModal .dashboard-modal-footer .dashboard-modal-footer-nav-link-tour:hover,
#gameShootYourScammersModal .dashboard-modal-footer .dashboard-modal-footer-nav-link-tour:hover {
    color: #fff !important;
    border-bottom-color: #ffcc00 !important;
}
#gameKoinkoinsModal .dashboard-modal-footer .dashboard-modal-footer-back-btn,
#gameShootYourScammersModal .dashboard-modal-footer .dashboard-modal-footer-back-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    min-width: 7rem !important;
    padding: 0.5rem 0.9rem !important;
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.45) !important;
    border-radius: 0;
    color: #e9ecef !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}
#gameKoinkoinsModal .dashboard-modal-footer .dashboard-modal-footer-back-btn:hover,
#gameShootYourScammersModal .dashboard-modal-footer .dashboard-modal-footer-back-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 204, 0, 0.6) !important;
    color: #ffcc00 !important;
}
#gameKoinkoinsModal .dashboard-modal-footer .dashboard-modal-footer-back-btn .dashboard-modal-footer-back-btn-icon,
#gameShootYourScammersModal .dashboard-modal-footer .dashboard-modal-footer-back-btn .dashboard-modal-footer-back-btn-icon {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
}
#gameKoinkoinsModal .modal-footer .commercify-modal-btn-fermer,
#gameShootYourScammersModal .modal-footer .commercify-modal-btn-fermer {
    background: #0d0d0d !important;
    border: 2px solid #ffcc00 !important;
    color: #ffffff !important;
    border-radius: 0;
    padding: 0.65rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}
#gameKoinkoinsModal .modal-footer .commercify-modal-btn-fermer:hover,
#gameShootYourScammersModal .modal-footer .commercify-modal-btn-fermer:hover {
    background: rgba(255, 204, 0, 0.25) !important;
    border-color: #ffcc00 !important;
    color: #ffcc00 !important;
}
/* Light mode — header/footer fond + nav */
body.light-mode #gameKoinkoinsModal .dashboard-modal-header,
body.light-mode #gameShootYourScammersModal .dashboard-modal-header {
    background: #eef0f3 !important;
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}
body.light-mode #gameKoinkoinsModal .dashboard-modal-header .dashboard-modal-title,
body.light-mode #gameShootYourScammersModal .dashboard-modal-header .dashboard-modal-title {
    color: #1a1d21 !important;
    border-bottom-color: rgba(184, 134, 11, 0.6) !important;
}
body.light-mode #gameKoinkoinsModal .modal-footer.dashboard-modal-footer,
body.light-mode #gameShootYourScammersModal .modal-footer.dashboard-modal-footer {
    background: #eef0f3 !important;
    border-top-color: rgba(0, 0, 0, 0.1) !important;
}
body.light-mode #gameKoinkoinsModal .dashboard-modal-footer .dashboard-modal-footer-nav-link,
body.light-mode #gameShootYourScammersModal .dashboard-modal-footer .dashboard-modal-footer-nav-link {
    color: #1a1d21 !important;
}
body.light-mode #gameKoinkoinsModal .dashboard-modal-footer .dashboard-modal-footer-nav-link-tour,
body.light-mode #gameShootYourScammersModal .dashboard-modal-footer .dashboard-modal-footer-nav-link-tour {
    color: #b8860b !important;
    border-bottom-color: rgba(184, 134, 11, 0.5) !important;
}
body.light-mode #gameKoinkoinsModal .dashboard-modal-footer .dashboard-modal-footer-nav-link-tour:hover,
body.light-mode #gameShootYourScammersModal .dashboard-modal-footer .dashboard-modal-footer-nav-link-tour:hover {
    color: #1a1d21 !important;
    border-bottom-color: #b8860b !important;
}
body.light-mode #gameKoinkoinsModal .dashboard-modal-footer .dashboard-modal-footer-nav-sep,
body.light-mode #gameShootYourScammersModal .dashboard-modal-footer .dashboard-modal-footer-nav-sep {
    color: rgba(0, 0, 0, 0.4) !important;
}
body.light-mode #gameKoinkoinsModal .dashboard-modal-close,
body.light-mode #gameShootYourScammersModal .dashboard-modal-close {
    background: #1a1d21 !important;
    border-color: #b8860b !important;
    color: #fff !important;
}
body.light-mode #gameKoinkoinsModal .dashboard-modal-close:hover,
body.light-mode #gameShootYourScammersModal .dashboard-modal-close:hover {
    background: #b8860b !important;
    color: #1a1d21 !important;
}
/* Light mode — §3.1 état de base des 3 boutons header */
body.light-mode #gameKoinkoinsModal .dashboard-modal-lang-btn,
body.light-mode #gameKoinkoinsModal .dashboard-modal-search-btn,
body.light-mode #gameKoinkoinsModal .dashboard-modal-theme-btn,
body.light-mode #gameShootYourScammersModal .dashboard-modal-lang-btn,
body.light-mode #gameShootYourScammersModal .dashboard-modal-search-btn,
body.light-mode #gameShootYourScammersModal .dashboard-modal-theme-btn {
    background: transparent !important;
    border: 2px solid #b8860b !important;
    color: #1a1d21 !important;
}
/* Light mode — §3.2 bouton Retour (base + hover) */
body.light-mode #gameKoinkoinsModal .dashboard-modal-footer .dashboard-modal-footer-back-btn,
body.light-mode #gameShootYourScammersModal .dashboard-modal-footer .dashboard-modal-footer-back-btn {
    border-color: rgba(0, 0, 0, 0.2) !important;
    color: #1a1d21 !important;
}
body.light-mode #gameKoinkoinsModal .dashboard-modal-footer .dashboard-modal-footer-back-btn:hover,
body.light-mode #gameShootYourScammersModal .dashboard-modal-footer .dashboard-modal-footer-back-btn:hover {
    background: rgba(0, 0, 0, 0.06) !important;
    border-color: #b8860b !important;
    color: #1a1d21 !important;
}
/* RTL modales de jeu */
[dir="rtl"] #gameKoinkoinsModal .dashboard-modal-header,
[dir="rtl"] #gameShootYourScammersModal .dashboard-modal-header {
    padding-left: 8rem !important;
    padding-right: clamp(16px, 2vw, 24px) !important;
}
[dir="rtl"] #gameKoinkoinsModal .dashboard-modal-lang-btn,
[dir="rtl"] #gameShootYourScammersModal .dashboard-modal-lang-btn { right: auto !important; left: 14rem !important; }
[dir="rtl"] #gameKoinkoinsModal .dashboard-modal-search-btn,
[dir="rtl"] #gameShootYourScammersModal .dashboard-modal-search-btn { right: auto !important; left: 9.75rem !important; }
[dir="rtl"] #gameKoinkoinsModal .dashboard-modal-theme-btn,
[dir="rtl"] #gameShootYourScammersModal .dashboard-modal-theme-btn { right: auto !important; left: 5.5rem !important; }
[dir="rtl"] #gameKoinkoinsModal .dashboard-modal-close,
[dir="rtl"] #gameShootYourScammersModal .dashboard-modal-close { right: auto !important; left: 1.25rem !important; }
[dir="rtl"] #gameKoinkoinsModal .dashboard-modal-header .col.dashboard-modal-header-col,
[dir="rtl"] #gameShootYourScammersModal .dashboard-modal-header .col.dashboard-modal-header-col {
    padding-right: 0 !important;
    padding-left: 18rem !important;
}

#gameShootYourScammersModal .modal-dialog,
#gameKoinkoinsModal .modal-dialog {
    /* Dimensionnement plein écran géré par fullscreen_touch.css */
}

/* Contenu modal — typologie dark */
.games-modal-content {
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 0;
    box-shadow: none !important;
    background: #0a0a0a !important;
    color: #f8f9fa !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Header one-line : logo + titre + raccourcis (dashboard, etc.) + croix — aligné autres modales */
.games-modal-header {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    padding: clamp(12px, 1.5vw, 18px) clamp(14px, 1.8vw, 22px) !important;
    padding-right: 4.5rem !important;
    padding-left: 10px !important;
    background: #101924 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
}
.games-modal-header .container-fluid {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 0 !important;
}
.games-modal-header .row {
    margin: 0 !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}
.games-modal-header .col.games-modal-header-col,
.games-modal-header .col {
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    min-width: 0 !important;
}
.games-modal-header .games-modal-header-inner {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem 1rem !important;
    min-width: 0 !important;
}
.games-modal-header .games-modal-logo-link {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}
.games-modal-header .games-modal-logo {
    height: 32px !important;
    width: auto !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}
.games-modal-title {
    margin: 0 !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #ffcc00 !important;
    flex-shrink: 0 !important;
}
.games-modal-header .games-modal-shortcuts {
    margin: 0 !important;
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    gap: 0.35rem !important;
}
.games-modal-header .games-modal-shortcuts .modal-shortcuts {
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    gap: 0.35rem !important;
}
.games-modal-header .games-modal-shortcuts .modal-shortcut-btn {
    background: #141c26 !important;
    border: 1px solid rgba(255, 204, 0, 0.45) !important;
    color: #f8f9fa !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.72rem !important;
    border-radius: 0;
}
.games-modal-header .games-modal-shortcuts .modal-shortcut-btn:hover {
    background: rgba(255, 204, 0, 0.15) !important;
    border-color: #ffcc00 !important;
    color: #ffcc00 !important;
}
.games-modal-header .games-modal-shortcuts .modal-shortcut-btn:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.25) !important;
}

.games-modal-close {
    position: absolute !important;
    top: 50% !important;
    right: 1.25rem !important;
    transform: translateY(-50%) !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #141c26 !important;
    border: 1px solid rgba(255, 204, 0, 0.45) !important;
    border-radius: 0;
    color: #f8f9fa !important;
    cursor: pointer !important;
    transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease, border-color 0.12s ease !important;
    z-index: 10 !important;
}

.games-modal-close:hover {
    background: #e6b800 !important;
    color: #000000 !important;
    transform: translateY(-50%) scale(1.05) !important;
}

.games-modal-close:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.25) !important;
}

.games-modal-close svg {
    width: 24px !important;
    height: 24px !important;
}

/* Bouton « Retour aux jeux » dans le header des modales de jeu (Koinkoins, Shoot) */
.games-modal-back-to-list {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    padding: 0.35rem 0.75rem !important;
    margin-right: 0.75rem !important;
    background: #141c26 !important;
    border: 1px solid rgba(255, 204, 0, 0.45) !important;
    border-radius: 0;
    color: #f8f9fa !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}
.games-modal-back-to-list:hover {
    background: rgba(255, 204, 0, 0.15) !important;
    border-color: #ffcc00 !important;
    color: #ffcc00 !important;
}
.games-modal-back-to-list:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.25) !important;
}
.games-modal-back-to-list svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
}
#gameKoinkoinsModal .games-modal-header,
#gameShootYourScammersModal .games-modal-header {
    padding-right: 4.5rem !important;
    flex-wrap: nowrap !important;
}
#gameKoinkoinsModal .games-modal-title,
#gameShootYourScammersModal .games-modal-title {
    flex: 1 !important;
    min-width: 0 !important;
    margin: 0 !important;
}

[dir="rtl"] .games-modal-back-to-list {
    margin-right: 0 !important;
    margin-left: 0.75rem !important;
}
[dir="rtl"] .games-modal-back-to-list svg {
    transform: scaleX(-1) !important;
}

[dir="rtl"] .games-modal-header {
    padding-left: 4.5rem !important;
    padding-right: 10px !important;
}
[dir="rtl"] .games-modal-header .col.games-modal-header-col,
[dir="rtl"] .games-modal-header .col {
    justify-content: flex-end !important;
}
[dir="rtl"] .games-modal-header .games-modal-logo-link {
    margin-left: auto !important;
    margin-right: 0 !important;
}
[dir="rtl"] .games-modal-close {
    right: auto !important;
    left: 1.25rem !important;
}

/* Body */
.games-modal-body {
    padding: 1.25rem 1.5rem !important;
    background: #0a0a0a !important;
    color: #f8f9fa !important;
    flex: 1 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    overscroll-behavior: contain !important;
}

.games-modal-body::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.games-modal-body-game {
    position: relative !important;
    height: 100% !important;
    min-height: 280px !important;
}

.games-modal-subtitle {
    color: #8094ae !important;
    font-size: 0.9rem !important;
    margin: 0 0 1rem !important;
}

.games-modal-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 1.5rem !important;
    justify-items: center !important;
}

/* Cartes de jeux */
.game-card {
    background: #141c26 !important;
    border: 1px solid rgba(255, 204, 0, 0.35) !important;
    border-radius: 0;
    padding: 1.5rem !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
    max-width: 400px !important;
    width: 100% !important;
}

.game-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(255, 204, 0, 0.2) !important;
    border-color: rgba(255, 204, 0, 0.6) !important;
}

.game-card-icon {
    margin-bottom: 1rem !important;
    color: #ffcc00 !important;
}

.game-card-title {
    color: #ffcc00 !important;
    font-size: 1.2rem !important;
    margin-bottom: 0.75rem !important;
    font-weight: 600 !important;
}

.game-card-desc {
    color: #8094ae !important;
    font-size: 0.9rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.5 !important;
}

.game-card-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem 0.75rem !important;
    justify-content: center !important;
    align-items: center !important;
}

.game-card-actions .btn-play-game {
    flex: 0 1 auto !important;
}

.btn-play-game {
    background: #ffcc00 !important;
    color: #000000 !important;
    border: 1px solid rgba(255, 204, 0, 0.6) !important;
    padding: 0.5rem 1.25rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 0;
    cursor: pointer !important;
    transition: background 0.12s ease, transform 0.12s ease !important;
}

.btn-play-game:hover {
    background: #e6b800 !important;
    transform: scale(1.02) !important;
}

/* Footer & disclaimer */
.games-modal-footer {
    padding: 1rem 1.5rem !important;
    background: #101924 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    flex-shrink: 0 !important;
}

.games-modal-disclaimer {
    padding: 0.5rem 1rem !important;
    background: #0a0a0a !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    text-align: center !important;
    flex-shrink: 0 !important;
}

.games-modal-disclaimer p {
    color: #6b7280 !important;
    font-size: 0.75rem !important;
    margin: 0 !important;
}

.commercify-modal-btn-fermer {
    background: #ffcc00 !important;
    color: #000000 !important;
    border: 1px solid rgba(255, 204, 0, 0.6) !important;
}

.commercify-modal-btn-fermer:hover {
    background: #e6b800 !important;
    color: #000000 !important;
}

/* ========== THÈME CLAIR (body.light-mode) — DashLite, même logique que visitor/langues ========== */
body.light-mode #gamesCommercifyModal .games-modal-content,
body.light-mode .games-modal-content {
    background: #f5f6f8 !important;
    color: #1a1d21 !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* V3 — Header + 3 boutons (drapeau, loupe, thème) : état de base explicite (§3.1) */
body.light-mode #gamesCommercifyModal .dashboard-modal-header {
    background: #eef0f3 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}
body.light-mode #gamesCommercifyModal .dashboard-modal-lang-btn {
    background: transparent !important;
    border: 2px solid #b8860b !important;
    color: #1a1d21 !important;
}
body.light-mode #gamesCommercifyModal .dashboard-modal-search-btn {
    background: transparent !important;
    border: 2px solid #b8860b !important;
    color: #1a1d21 !important;
}
body.light-mode #gamesCommercifyModal .dashboard-modal-theme-btn {
    background: transparent !important;
    border: 2px solid #b8860b !important;
    color: #1a1d21 !important;
}
body.light-mode #gamesCommercifyModal .dashboard-modal-lang-btn:hover,
body.light-mode #gamesCommercifyModal .dashboard-modal-search-btn:hover,
body.light-mode #gamesCommercifyModal .dashboard-modal-theme-btn:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    border-color: #b8860b !important;
    color: #1a1d21 !important;
}
body.light-mode #gamesCommercifyModal .dashboard-modal-close {
    background: #1a1d21 !important;
    border: 2px solid #b8860b !important;
    color: #ffffff !important;
}
body.light-mode #gamesCommercifyModal .dashboard-modal-close:hover {
    background: #ffcc00 !important;
    border-color: #b8860b !important;
    color: #1a1d21 !important;
}
body.light-mode #gamesCommercifyModal .dashboard-modal-header .dashboard-modal-title {
    color: #1a1d21 !important;
    border-bottom-color: rgba(184, 134, 11, 0.55) !important;
}

/* V3 — Footer + bouton Retour : lisible en light (§3.2) */
body.light-mode #gamesCommercifyModal .modal-footer.dashboard-modal-footer {
    background: #eef0f3 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
}
body.light-mode #gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-nav-link {
    color: #1a1d21 !important;
}
body.light-mode #gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-nav-link:hover {
    color: #b8860b !important;
}
body.light-mode #gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-nav-sep {
    color: rgba(0, 0, 0, 0.35) !important;
}
body.light-mode #gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-nav-link-tour {
    color: #b8860b !important;
}
body.light-mode #gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-nav-link-tour:hover {
    color: #1a1d21 !important;
}
body.light-mode #gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-back-btn {
    border-color: rgba(0, 0, 0, 0.2) !important;
    color: #1a1d21 !important;
}
body.light-mode #gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-back-btn:hover {
    background: rgba(0, 0, 0, 0.06) !important;
    border-color: #b8860b !important;
    color: #1a1d21 !important;
}
body.light-mode #gamesCommercifyModal .modal-footer .commercify-modal-btn-fermer {
    background: #1a1d21 !important;
    border: 2px solid #b8860b !important;
    color: #ffffff !important;
}
body.light-mode #gamesCommercifyModal .modal-footer .commercify-modal-btn-fermer:hover {
    background: #b8860b !important;
    border-color: #b8860b !important;
    color: #ffffff !important;
}

body.light-mode #gamesCommercifyModal .games-modal-header,
body.light-mode .games-modal-header {
    background: #eef0f3 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

body.light-mode #gamesCommercifyModal .games-modal-title,
body.light-mode .games-modal-title {
    color: #1a1d21 !important;
}

body.light-mode #gamesCommercifyModal .games-modal-header .games-modal-shortcuts .modal-shortcut-btn,
body.light-mode .games-modal-header .games-modal-shortcuts .modal-shortcut-btn {
    background: #ffffff !important;
    border: 1px solid rgba(184, 134, 11, 0.5) !important;
    color: #1a1d21 !important;
}

body.light-mode #gamesCommercifyModal .games-modal-header .games-modal-shortcuts .modal-shortcut-btn:hover,
body.light-mode .games-modal-header .games-modal-shortcuts .modal-shortcut-btn:hover {
    background: #eef0f3 !important;
    border-color: #b8860b !important;
    color: #b8860b !important;
}

body.light-mode #gamesCommercifyModal .games-modal-close,
body.light-mode .games-modal-close {
    background: #eef0f3 !important;
    border: 1px solid rgba(184, 134, 11, 0.5) !important;
    color: #1a1d21 !important;
}

body.light-mode #gamesCommercifyModal .games-modal-close:hover,
body.light-mode .games-modal-close:hover {
    background: #ffcc00 !important;
    color: #000000 !important;
}

body.light-mode .games-modal-back-to-list {
    background: #eef0f3 !important;
    border: 1px solid rgba(184, 134, 11, 0.5) !important;
    color: #1a1d21 !important;
}
body.light-mode .games-modal-back-to-list:hover {
    background: rgba(184, 134, 11, 0.12) !important;
    border-color: #b8860b !important;
    color: #b8860b !important;
}

body.light-mode #gamesCommercifyModal .games-modal-body,
body.light-mode .games-modal-body {
    background: #f5f6f8 !important;
    color: #1a1d21 !important;
}

body.light-mode #gamesCommercifyModal .games-modal-subtitle,
body.light-mode .games-modal-subtitle {
    color: #4a5568 !important;
}

body.light-mode #gamesCommercifyModal .game-card,
body.light-mode .game-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
}

body.light-mode #gamesCommercifyModal .game-card:hover,
body.light-mode .game-card:hover {
    border-color: rgba(184, 134, 11, 0.5) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

body.light-mode #gamesCommercifyModal .game-card-icon,
body.light-mode .game-card-icon {
    color: #b8860b !important;
}

body.light-mode #gamesCommercifyModal .game-card-title,
body.light-mode .game-card-title {
    color: #1a1d21 !important;
}

body.light-mode #gamesCommercifyModal .game-card-desc,
body.light-mode .game-card-desc {
    color: #4a5568 !important;
}

body.light-mode #gamesCommercifyModal .btn-play-game,
body.light-mode .btn-play-game {
    background: #b8860b !important;
    color: #ffffff !important;
    border-color: #b8860b !important;
}

body.light-mode #gamesCommercifyModal .btn-play-game:hover,
body.light-mode .btn-play-game:hover {
    background: #996f09 !important;
    color: #ffffff !important;
}

body.light-mode #gamesCommercifyModal .games-modal-footer,
body.light-mode .games-modal-footer {
    background: #eef0f3 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
}

body.light-mode #gamesCommercifyModal .games-modal-disclaimer,
body.light-mode .games-modal-disclaimer {
    background: #f5f6f8 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}

body.light-mode #gamesCommercifyModal .games-modal-disclaimer p,
body.light-mode .games-modal-disclaimer p {
    color: #6b7280 !important;
}

body.light-mode #gamesCommercifyModal .commercify-modal-btn-fermer,
body.light-mode .commercify-modal-btn-fermer {
    background: #b8860b !important;
    color: #ffffff !important;
    border-color: #b8860b !important;
}

body.light-mode #gamesCommercifyModal .commercify-modal-btn-fermer:hover,
body.light-mode .commercify-modal-btn-fermer:hover {
    background: #996f09 !important;
    color: #ffffff !important;
}

/* Responsive — tablettes : aligné sur modal dashboard */
@media (max-width: 991.98px) {
    /* Fenêtre lancement jeux Commercify — header + footer réduits */
    #gamesCommercifyModal .dashboard-modal-header {
        padding: 0.5rem 0.75rem !important;
        padding-right: 8rem !important;
        min-height: 0 !important;
    }
    #gamesCommercifyModal .dashboard-modal-header .col.dashboard-modal-header-col,
    #gamesCommercifyModal .dashboard-modal-header .col {
        padding-right: 14rem !important;
    }
    #gamesCommercifyModal .dashboard-modal-lang-btn,
    #gamesCommercifyModal .dashboard-modal-search-btn,
    #gamesCommercifyModal .dashboard-modal-theme-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }
    #gamesCommercifyModal .dashboard-modal-lang-btn { right: 10.5rem !important; }
    #gamesCommercifyModal .dashboard-modal-search-btn { right: 7.2rem !important; }
    #gamesCommercifyModal .dashboard-modal-theme-btn { right: 3.9rem !important; }
    #gamesCommercifyModal .dashboard-modal-close {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        right: 0.5rem !important;
    }
    #gamesCommercifyModal .dashboard-modal-lang-btn .dashboard-modal-lang-btn-icon,
    #gamesCommercifyModal .dashboard-modal-lang-btn img.dashboard-modal-lang-btn-icon,
    #gamesCommercifyModal .dashboard-modal-search-btn .dashboard-modal-search-btn-icon,
    #gamesCommercifyModal .dashboard-modal-theme-btn .theme-icon {
        width: 20px !important;
        height: 20px !important;
    }
    #gamesCommercifyModal .dashboard-modal-close svg {
        width: 20px !important;
        height: 20px !important;
    }
    #gamesCommercifyModal .modal-footer.dashboard-modal-footer {
        padding: 0.5rem 0.75rem !important;
        gap: 0.5rem 0.75rem !important;
    }
    #gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-nav {
        font-size: 0.7rem !important;
        gap: 0 0.35rem !important;
    }
    #gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-back-btn {
        min-width: 5.5rem !important;
        padding: 0.4rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
    #gamesCommercifyModal .dashboard-modal-footer .dashboard-modal-footer-back-btn .dashboard-modal-footer-back-btn-icon {
        width: 14px !important;
        height: 14px !important;
    }
    #gamesCommercifyModal .modal-footer .commercify-modal-btn-fermer {
        padding: 0.5rem 1rem !important;
        font-size: 0.9rem !important;
    }
    [dir="rtl"] #gamesCommercifyModal .dashboard-modal-header .col.dashboard-modal-header-col,
    [dir="rtl"] #gamesCommercifyModal .dashboard-modal-header .col { padding-left: 14rem !important; padding-right: 0 !important; }
    [dir="rtl"] #gamesCommercifyModal .dashboard-modal-lang-btn { left: 10.5rem !important; right: auto !important; }
    [dir="rtl"] #gamesCommercifyModal .dashboard-modal-search-btn { left: 7.2rem !important; right: auto !important; }
    [dir="rtl"] #gamesCommercifyModal .dashboard-modal-theme-btn { left: 3.9rem !important; right: auto !important; }
    [dir="rtl"] #gamesCommercifyModal .dashboard-modal-close { left: 0.5rem !important; right: auto !important; }

    /* À la pêche au petit coin-coin + Shoot your scammer — header réduit + plein écran tablette */
    #gameKoinkoinsModal,
    #gameShootYourScammersModal {
        padding: 0 !important;
        align-items: stretch !important;
        justify-content: stretch !important;
    }
    #gameKoinkoinsModal .modal-dialog,
    #gameShootYourScammersModal .modal-dialog {
        width: 100vw !important;
        max-width: none !important;
        height: 100% !important;
        min-height: 100vh !important;
        margin: 0 !important;
        flex: 1 1 auto !important;
        align-self: stretch !important;
    }
    #gameKoinkoinsModal .dashboard-modal-header,
    #gameShootYourScammersModal .dashboard-modal-header {
        padding: 0.5rem 0.75rem !important;
        padding-right: 8rem !important;
        min-height: 0 !important;
    }
    #gameKoinkoinsModal .dashboard-modal-header .dashboard-modal-title,
    #gameShootYourScammersModal .dashboard-modal-header .dashboard-modal-title {
        font-size: 1.1rem !important;
        padding-bottom: 0.25rem !important;
    }
    #gameKoinkoinsModal .dashboard-modal-header .col.dashboard-modal-header-col,
    #gameKoinkoinsModal .dashboard-modal-header .col,
    #gameShootYourScammersModal .dashboard-modal-header .col.dashboard-modal-header-col,
    #gameShootYourScammersModal .dashboard-modal-header .col {
        padding-right: 14rem !important;
    }
    #gameKoinkoinsModal .dashboard-modal-lang-btn,
    #gameKoinkoinsModal .dashboard-modal-search-btn,
    #gameKoinkoinsModal .dashboard-modal-theme-btn,
    #gameShootYourScammersModal .dashboard-modal-lang-btn,
    #gameShootYourScammersModal .dashboard-modal-search-btn,
    #gameShootYourScammersModal .dashboard-modal-theme-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }
    #gameKoinkoinsModal .dashboard-modal-lang-btn,
    #gameShootYourScammersModal .dashboard-modal-lang-btn { right: 10.5rem !important; }
    #gameKoinkoinsModal .dashboard-modal-search-btn,
    #gameShootYourScammersModal .dashboard-modal-search-btn { right: 7.2rem !important; }
    #gameKoinkoinsModal .dashboard-modal-theme-btn,
    #gameShootYourScammersModal .dashboard-modal-theme-btn { right: 3.9rem !important; }
    #gameKoinkoinsModal .dashboard-modal-close,
    #gameShootYourScammersModal .dashboard-modal-close {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        right: 0.5rem !important;
    }
    #gameKoinkoinsModal .dashboard-modal-lang-btn .dashboard-modal-lang-btn-icon,
    #gameKoinkoinsModal .dashboard-modal-lang-btn img.dashboard-modal-lang-btn-icon,
    #gameKoinkoinsModal .dashboard-modal-search-btn .dashboard-modal-search-btn-icon,
    #gameKoinkoinsModal .dashboard-modal-theme-btn .theme-icon,
    #gameShootYourScammersModal .dashboard-modal-lang-btn .dashboard-modal-lang-btn-icon,
    #gameShootYourScammersModal .dashboard-modal-lang-btn img.dashboard-modal-lang-btn-icon,
    #gameShootYourScammersModal .dashboard-modal-search-btn .dashboard-modal-search-btn-icon,
    #gameShootYourScammersModal .dashboard-modal-theme-btn .theme-icon {
        width: 20px !important;
        height: 20px !important;
    }
    #gameKoinkoinsModal .dashboard-modal-close svg,
    #gameShootYourScammersModal .dashboard-modal-close svg {
        width: 20px !important;
        height: 20px !important;
    }
    [dir="rtl"] #gameKoinkoinsModal .dashboard-modal-header .col.dashboard-modal-header-col,
    [dir="rtl"] #gameKoinkoinsModal .dashboard-modal-header .col,
    [dir="rtl"] #gameShootYourScammersModal .dashboard-modal-header .col.dashboard-modal-header-col,
    [dir="rtl"] #gameShootYourScammersModal .dashboard-modal-header .col {
        padding-right: 0 !important;
        padding-left: 14rem !important;
    }
    [dir="rtl"] #gameKoinkoinsModal .dashboard-modal-lang-btn,
    [dir="rtl"] #gameShootYourScammersModal .dashboard-modal-lang-btn { left: 10.5rem !important; right: auto !important; }
    [dir="rtl"] #gameKoinkoinsModal .dashboard-modal-search-btn,
    [dir="rtl"] #gameShootYourScammersModal .dashboard-modal-search-btn { left: 7.2rem !important; right: auto !important; }
    [dir="rtl"] #gameKoinkoinsModal .dashboard-modal-theme-btn,
    [dir="rtl"] #gameShootYourScammersModal .dashboard-modal-theme-btn { left: 3.9rem !important; right: auto !important; }
    [dir="rtl"] #gameKoinkoinsModal .dashboard-modal-close,
    [dir="rtl"] #gameShootYourScammersModal .dashboard-modal-close { left: 0.5rem !important; right: auto !important; }
}

/* Responsive */
@media (max-width: 768px) {
    #gamesCommercifyModal .modal-dialog {
        max-width: 95vw !important;
    }
    #gameShootYourScammersModal .modal-dialog,
    #gameKoinkoinsModal .modal-dialog {
        max-width: 100vw !important;
    }
    .games-modal-grid {
        grid-template-columns: 1fr !important;
    }
    .game-card {
        max-width: 100% !important;
    }
}

/* Mode performance : modales jeux — backdrop, hovers et transitions réduits */
body.performance-mode #gamesCommercifyModal,
body.performance-mode #gameKoinkoinsModal,
body.performance-mode #gameShootYourScammersModal {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
body.performance-mode #gamesCommercifyModal .game-card:hover,
body.performance-mode #gameKoinkoinsModal .game-card:hover,
body.performance-mode #gameShootYourScammersModal .game-card:hover {
    transform: none !important;
    box-shadow: none !important;
}
body.performance-mode #gamesCommercifyModal .btn-play-game:hover,
body.performance-mode #gameKoinkoinsModal .btn-play-game:hover,
body.performance-mode #gameShootYourScammersModal .btn-play-game:hover {
    transform: none !important;
}
body.performance-mode #gamesCommercifyModal .dashboard-modal-close:hover,
body.performance-mode #gamesCommercifyModal .dashboard-modal-lang-btn:hover,
body.performance-mode #gamesCommercifyModal .dashboard-modal-search-btn:hover,
body.performance-mode #gamesCommercifyModal .dashboard-modal-theme-btn:hover,
body.performance-mode #gameKoinkoinsModal .dashboard-modal-close:hover,
body.performance-mode #gameShootYourScammersModal .dashboard-modal-close:hover,
body.performance-mode .games-modal-close:hover,
body.performance-mode .games-modal-back-to-list:hover,
body.performance-mode .games-modal-header .modal-shortcut-btn:hover {
    transform: none !important;
    box-shadow: none !important;
}
