/**
 * Homepage Styles — Optimus Theme
 * Extracted from index.php inline <style> block
 * Uses design system tokens from style.css :root
 */
    /* --------------------------------------------------------------------------
       PREMIUM HEADER NAVIGATION (Restoring functionality to original structure)
       -------------------------------------------------------------------------- */
    .section-header-flex {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
        position: relative;
    }
    .news-scroller-nav {
        display: flex;
        gap: 12px;
    }
    .scroller-arrow {
        position: static;
        transform: none;
        opacity: 0.6;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    .scroller-arrow:hover,
    .light-mode .scroller-arrow:hover {
        background: var(--color-primary);
        color: #000;
        opacity: 1;
        border-color: var(--color-primary);
    }
    .light-mode .scroller-arrow {
        background: #1a1a1a;
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: white;
    }
    .light-mode .popular-slider .game-card h4 a,
    .light-mode .popular-slider .game-card .card-meta span {
        color: #ffffff;
    }
    .section-subtitle-new {
        color: var(--color-primary);
        font-weight: 800;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 1px;
        margin-top: 5px;
        display: block;
    }
    .section-title {
        text-transform: uppercase;
        font-style: italic;
        font-weight: 950;
        margin-bottom: 0;
    }
    .not-italic-force {
        font-style: normal;
    }
    
    /* Badge plateforme - bordure blanche sans fond */
    .badge-platform {
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.5);
        color: rgba(255, 255, 255, 0.8);
        font-size: 8px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 2px 6px;
        border-radius: 10px;
        display: inline-block;
        margin-right: 4px;
        vertical-align: middle;
    }
    .light-mode .badge-platform {
        border-color: rgba(255, 255, 255, 0.5);
        color: rgba(255, 255, 255, 0.8);
    }
    
    /* Conteneur pills plateforme sous le titre */
    .platform-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin-top: 4px;
        margin-bottom: 4px;
    }
    .platform-badges:empty {
        display: none;
    }
    
    /* Cards News à ne pas manquer - même style que À la une */
    #popularSlider .breaking-slide,
    .popular-slider .breaking-slide {
        position: relative;
        flex-shrink: 0;
        scroll-snap-align: start;
        border-radius: 12px;
        overflow: hidden;
        aspect-ratio: 16/10;
        /* Mobile par défaut: ~2.2 cards visibles */
        width: 42%;
        min-width: 42%;
        max-width: none;
        flex: 0 0 42%;
    }
    /* Tablette: ~3.5 cards visibles */
    @media (min-width: 768px) and (max-width: 1023px) {
        #popularSlider .breaking-slide,
        .popular-slider .breaking-slide {
            width: 28%;
            min-width: 28%;
            flex: 0 0 28%;
        }
    }
    /* Desktop: 4.2 cards visibles (4 + bout de la 5ème) */
    @media (min-width: 1024px) {
        #popularSlider .breaking-slide,
        .popular-slider .breaking-slide {
            width: calc((100% - 48px) / 4.2);
            min-width: calc((100% - 48px) / 4.2);
            flex: 0 0 calc((100% - 48px) / 4.2);
        }
    }
    .popular-slider .breaking-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .popular-slider .breaking-slide .card-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 12px;
        background: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.85) 40%, rgba(0,0,0,0.4) 80%, transparent 100%);
    }
    
    /* Conteneur badges pour les dernières news - inline avec truncate */
    .latest-news-list .news-content .badges-container {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 4px;
        margin-bottom: 6px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    .latest-news-list .badge-category {
        flex-shrink: 0;
    }
    .latest-news-list .badge-platform {
        border-color: rgba(255, 255, 255, 0.4);
        color: rgba(255, 255, 255, 0.5);
        font-size: 8px;
        padding: 2px 6px;
        margin-left: 0;
        flex-shrink: 0;
    }
    .light-mode .latest-news-list .badge-platform {
        border-color: rgba(0, 0, 0, 0.25);
        color: rgba(0, 0, 0, 0.4);
    }
    /* Truncate sur mobile */
    @media (max-width: 767px) {
        .latest-news-list .news-content .badges-container {
            max-width: 200px;
        }
        .latest-news-list .badge-platform:nth-child(n+3) {
            display: none;
        }
    }
    
    .latest-news-list {
        display: grid;
        grid-template-rows: repeat(3, auto);
        grid-auto-flow: column;
        /* Show 1.15 columns on mobile (approx 85% each) */
        grid-auto-columns: minmax(280px, 85%);
        gap: 20px;
        padding-bottom: 15px;
        /* Scroll horizontal comme popular-slider */
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        touch-action: pan-x pan-y;
    }
    .latest-news-list::-webkit-scrollbar {
        display: none;
    }
    @media (min-width: 1024px) {
        .latest-news-list {
            grid-auto-columns: 38%;
            gap: 20px 40px;
        }
    }
    @media (min-width: 768px) {
        .hide-nav-desktop {
            display: none;
        }
    }
    .breaking-section {
        padding-bottom: 0px;
    }
    section {
        margin-bottom: 24px;
        padding: 0px 0;
    }
    /* SLIDER COMPACT STYLING */
    .popular-slider {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-behavior: smooth;
        scroll-snap-type: x mandatory;
        touch-action: auto;
    }
    /* Mobile/Tablette: titre première card À la une même taille que les autres */
    @media (max-width: 1023px) {
        .breaking-slider .breaking-main h3,
        .breaking-slider .breaking-main h3 a {
            font-size: 13px;
            font-weight: 700;
        }
    }
    /* Pagination visible sur mobile ET tablette */
    @media (max-width: 1199px) {
        #breakingDots {
            display: flex;
        }
    }
    @media (min-width: 1200px) {
        #breakingDots {
            display: none;
        }
    }
    /* Mobile/Tablette Refinements */
    @media (max-width: 1199px) {
        .scroller-arrow {
            display: none;
        }
        section {
            margin-bottom: 20px;
        }
        .section-header-flex {
            margin-bottom: 8px;
        }
        .latest-news-list .news-entry {
            display: flex;
            align-items: center;
            gap: 12px; /* Move text closer to image */
            padding: 10px; /* Tighter padding */
        }
        .latest-news-list .news-entry .news-image {
            width: 80px;
            height: 80px;
            min-width: 80px;
            min-height: 80px;
            flex: 0 0 80px; /* Force exact width */
            overflow: hidden;
            border-radius: 12px;
        }
        .latest-news-list .news-entry .news-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .latest-news-list .news-entry .news-content {
            padding: 0;
            margin: 0;
            flex: 1;
        }
    }

    /* SHARED FREE GAMES STYLES (Desktop & Mobile) - FIXED FOR LIGHT MODE */
    .fg-type-plat {
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 2px;
        display: block;
    }
    .fg-title-main {
        color: var(--text-main);
        font-weight: 950;
        text-transform: uppercase;
        line-height: 1.1;
        display: block;
        font-family: 'Spline Sans', sans-serif;
    }
    .fg-merchant {
        color: var(--color-primary);
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: 1px;
        display: block;
    }
    .fg-expiry {
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 600;
        display: block;
    }
    .fg-score-badge {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 4px 10px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12px;
    }
    .light-mode .fg-score-badge {
        background: rgba(0, 0, 0, 0.05);
        border-color: rgba(0, 0, 0, 0.1);
    }
    .fg-score-plus { color: var(--color-danger); font-weight: 900; }
    .fg-score-val { color: var(--text-main); font-weight: 900; font-style: italic; }
    .fg-score-minus { color: var(--color-secondary); font-weight: 900; }

    .fg-actions {
        display: flex;
        align-items: center;
        gap: 16px;
    }
    .fg-action-item {
        display: flex;
        align-items: center;
        gap: 6px;
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
    }

    /* MOBILE SPECIFIC OVERRIDES */
    @media (max-width: 1023px) {
        .popular-slider#latestDealsContainer {
            display: flex;
            flex-direction: row;
            overflow-x: auto;
            gap: 15px;
            padding: 0 5px;
            scroll-snap-type: x mandatory;
            touch-action: auto; /* FIXED: Allow vertical page scroll on mobile */
            scrollbar-width: none;
        }
        .popular-slider#latestDealsContainer::-webkit-scrollbar {
            display: none;
        }
        .popular-slider#latestDealsContainer .game-card {
            display: flex;
            flex-direction: row;
            gap: 16px;
            padding: 12px;
            background: var(--card-bg);
            border-radius: 28px;
            width: 85%;
            min-width: 85%;
            flex: 0 0 85%;
            position: relative;
            border: 1px solid var(--border-color);
            box-shadow: 0 8px 30px rgba(0,0,0,0.2);
            scroll-snap-align: start;
        }
        .popular-slider#latestDealsContainer .news-image {
            width: 110px;
            aspect-ratio: 3/4;
            height: auto;
            flex: 0 0 110px;
            border-radius: 20px;
            overflow: hidden;
        }
        .popular-slider#latestDealsContainer .news-content {
            padding: 4px 0;
            justify-content: center;
            flex: 1;
        }
        .fg-title-main {
            font-size: 18px;
            margin-bottom: 6px;
        }
        .fg-merchant {
            font-size: 13px;
            letter-spacing: 1.2px;
            margin-bottom: 4px;
        }
        .fg-score-badge {
            position: absolute;
            top: 15px;
            right: 15px;
            padding: 5px 12px;
            border-radius: 12px;
            font-size: 13px;
        }
        .fg-actions {
            margin-top: 14px;
        }
    }

    /* DESKTOP SPECIFIC OVERRIDES */
    @media (min-width: 1024px) {
        .popular-slider#latestDealsContainer .game-card {
            display: flex;
            flex-direction: column;
            background: var(--card-bg);
            border: 1px solid var(--border-color);
        }
        .popular-slider#latestDealsContainer .news-image {
            width: 100%;
            aspect-ratio: 16/9;
            border-radius: 12px 12px 0 0;
            overflow: hidden;
        }
        .popular-slider#latestDealsContainer .news-content {
            padding: 15px;
        }
        .fg-title-main {
            font-size: 16px;
            margin-bottom: 6px;
        }
        .fg-score-badge {
            position: absolute;
            top: 10px;
            right: 10px;
            z-index: 5;
        }
    }

/* --------------------------------------------------------------------------
   UTILITY CLASSES (extracted from inline styles)
   -------------------------------------------------------------------------- */
.dot-indicator {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    padding: 0;
    margin: 0 4px;
    cursor: pointer;
}
.dot-indicator.active {
    background: var(--color-primary);
}
.section-view-all {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 20px;
}
.link-inherit {
    color: inherit;
    text-decoration: none;
}
