/* ========================================
   HEADER GAMING - Belgium Video Gaming
   Design noir/rouge/jaune - Style gaming moderne
======================================== */

:root {
    --header-bg: #1A1A1A;
    --header-text: #ffffff;
    --header-border: #1a1a1a;
    --primary-red: #9D1313;
    --primary-yellow: #FFD700;
    --primary-orange: #FF8C00;
    --hover-bg: #1a1a1a;
    --nav-height: 60px;
    --top-height: 100px;
}

/* Reset */
.modern-header * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
   STRUCTURE PRINCIPALE
======================================== */
.modern-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--header-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Effet de brillance subtile jaune sur le header ET navbar */
.modern-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.08), transparent);
    animation: headerShine 4s infinite;
    z-index: 10;
    pointer-events: none;
}

@keyframes headerShine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

/* ========================================
   LIGNE 1 : TOP (Logo + Titre + Recherche + Actions)
======================================== */
.header-top {
    background: var(--header-bg);
    border-bottom: 2px solid var(--primary-red);
    height: var(--top-height);
    transition: all 0.3s ease;
    overflow: visible;
}

/* Effet au scroll : réduction de la ligne top */
.modern-header.scrolled .header-top {
    height: 0;
    opacity: 0;
    border-bottom: 0;
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    z-index: 20;
}

/* Logo + Titre */
.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.header-brand:hover {
    opacity: 0.9;
}

.header-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px #FFD700);
}

.header-title {
    display: flex;
    flex-direction: column;
}

.title-main {
    font-size: 1.5rem;
    font-weight: 900;
    color: #FFD700;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.title-tagline {
    font-size: 0.75rem;
    color: #999;
    font-weight: 400;
    margin-top: 0.25rem;
}

/* Actions (Recherche + Auth) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ========================================
   RECHERCHE (Centrée, toujours visible)
======================================== */
.search-wrapper {
    flex: 1;
    max-width: 600px;
    position: relative;
    z-index: 10000 !important; /* Z-index élevé pour le wrapper */
    overflow: visible !important; /* Pour que les résultats ne soient pas coupés */
}

.search-toggle {
    display: none;
}

.search-box {
    display: flex;
    width: 100%;
    background: #ffffff; /* Fond blanc pour la lisibilité */
    border: 1px solid #ddd;
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 2px rgba(227, 6, 19, 0.2);
}

.search-input {
    flex: 1;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    outline: none;
    background: transparent;
    color: #000000; /* Texte noir pour contraste sur fond blanc */
}

.search-input::placeholder {
    color: #666;
}

.search-submit {
    background: var(--primary-red);
    border: none;
    padding: 0 1.5rem;
    cursor: pointer;
    color: white;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-submit:hover {
    background: #c00510;
    transform: scale(1.05);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: #1A1A1A;
    border: 1px solid #ddd;
    border-radius: 8px;
    z-index: 99999 !important; /* Z-index très élevé */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.search-results.active {
    display: block;
}

/* Items de résultats */
.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #ffffff; /* Texte blanc */
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(227, 6, 19, 0.2); /* Rouge transparent au hover */
    transform: translateX(4px);
}

.search-result-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff; /* Texte blanc */
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-excerpt {
    font-size: 0.8rem;
    color: #999; /* Gris clair */
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.search-result-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #E30613;
    color: white;
}

.search-result-date {
    font-size: 0.7rem;
    color: #888;
}

.search-results-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #999; /* Gris clair */
}

.search-results-loading {
    padding: 2rem 1rem;
    text-align: center;
    color: #999; /* Gris clair */
}

/* ========================================
   AUTHENTIFICATION (Boutons rouges)
======================================== */
.auth-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    background: var(--primary-red);
    border: none;
    white-space: nowrap;
}

.auth-btn:hover {
    background: #c00510;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(227, 6, 19, 0.4);
}

.auth-label {
    font-size: 0.9rem;
}

/* ========================================
   LIGNE 2 : NAVBAR (Fond noir)
======================================== */
.header-nav {
    background: var(--header-bg);
    border-bottom: 1px solid #1a1a1a;
    height: var(--nav-height);
    position: relative;
    z-index: 2;
}

/* Navbar devient sticky quand le top disparaît */
.modern-header.scrolled .header-nav {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 20;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0;
    height: 100%;
}

/* Items de navigation */
.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.5rem;
    height: 100%;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    color: var(--primary-red);
    background: rgba(227, 6, 19, 0.1);
}

/* Événement spécial (Bouton rouge vif) */
.nav-item-event {
    padding: 0.65rem 1.75rem;
    background: var(--primary-red);
    color: white;
    font-weight: 700;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 20px rgba(227, 6, 19, 0.5);
    transition: all 0.2s;
    margin: 0 0.5rem;
}

.nav-item-event:hover {
    background: #ff0015;
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(227, 6, 19, 0.8);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-icon {
    transition: transform 0.2s;
}

.nav-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    margin-top: 0.5rem;
}

.nav-dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 0.85rem 1.25rem;
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.dropdown-link:hover {
    background: rgba(227, 6, 19, 0.2);
    color: var(--primary-red);
}

.dropdown-link-all {
    font-weight: 700;
    color: var(--primary-yellow);
}

.dropdown-divider {
    height: 1px;
    background: #333;
    margin: 0.25rem 0;
}

/* Menu burger (mobile) */
.nav-burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.nav-burger span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--header-text);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ========================================
   MENU MOBILE
======================================== */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 400px;
    height: 100%;
    background: #0a0a0a;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 2px solid var(--primary-red);
}

.mobile-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-orange);
    text-transform: uppercase;
}

.mobile-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: white;
}

.mobile-section {
    padding: 1.5rem;
    border-bottom: 1px solid #1a1a1a;
}

.mobile-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-yellow);
    margin-bottom: 1rem;
}

.mobile-link {
    display: block;
    padding: 0.75rem 0;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}

.mobile-link:hover {
    color: var(--primary-red);
}

.mobile-link-bold {
    font-weight: 700;
    color: var(--primary-yellow);
}

.mobile-event {
    background: var(--primary-red);
    border-radius: 8px;
}

.mobile-event .mobile-link {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 0 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    /* Cacher le menu desktop */
    .nav-menu {
        display: none;
    }
    
    /* Afficher le burger */
    .nav-burger {
        display: flex;
    }
    
    /* Simplifier le header top */
    .title-tagline {
        display: none;
    }
    
    .auth-label {
        display: none;
    }
    
    .header-logo {
        width: 40px;
        height: 40px;
    }
    
    .title-main {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .header-top {
        height: 60px;
    }
    
    .header-nav {
        height: 50px;
    }
    
    .header-title {
        display: none;
    }
    
    .search-box {
        min-width: 280px;
        right: -50px;
    }
}

/* ========================================
   SCROLLBAR JAUNE - ZONE HEADER/NAVBAR
   ======================================== */

/* Scrollbar pour le header et tous ses éléments scrollables */
.modern-header,
.modern-header *,
#mainHeader,
#mainHeader *,
.dropdown-menu,
.search-results,
.mobile-menu,
.nav-menu,
.header-nav,
.header-nav * {
    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: #D0B74D #1A1A1A; /* Jaune sur noir */
}

/* Chrome, Safari, Edge - Scrollbar verticale ET horizontale */
.modern-header::-webkit-scrollbar,
.modern-header *::-webkit-scrollbar,
#mainHeader::-webkit-scrollbar,
#mainHeader *::-webkit-scrollbar,
.dropdown-menu::-webkit-scrollbar,
.search-results::-webkit-scrollbar,
.mobile-menu::-webkit-scrollbar,
.nav-menu::-webkit-scrollbar,
.header-nav::-webkit-scrollbar,
.header-nav *::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

/* Track (rail) */
.modern-header::-webkit-scrollbar-track,
.modern-header *::-webkit-scrollbar-track,
#mainHeader::-webkit-scrollbar-track,
#mainHeader *::-webkit-scrollbar-track,
.dropdown-menu::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track,
.mobile-menu::-webkit-scrollbar-track,
.nav-menu::-webkit-scrollbar-track,
.header-nav::-webkit-scrollbar-track,
.header-nav *::-webkit-scrollbar-track {
    background: #1A1A1A;
    border-radius: 4px;
}

/* Thumb (curseur) */
.modern-header::-webkit-scrollbar-thumb,
.modern-header *::-webkit-scrollbar-thumb,
#mainHeader::-webkit-scrollbar-thumb,
#mainHeader *::-webkit-scrollbar-thumb,
.dropdown-menu::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb,
.mobile-menu::-webkit-scrollbar-thumb,
.nav-menu::-webkit-scrollbar-thumb,
.header-nav::-webkit-scrollbar-thumb,
.header-nav *::-webkit-scrollbar-thumb {
    background: #D0B74D; /* Jaune */
    border-radius: 4px;
    transition: background 0.3s ease;
}

/* Thumb hover */
.modern-header::-webkit-scrollbar-thumb:hover,
.modern-header *::-webkit-scrollbar-thumb:hover,
#mainHeader::-webkit-scrollbar-thumb:hover,
#mainHeader *::-webkit-scrollbar-thumb:hover,
.dropdown-menu::-webkit-scrollbar-thumb:hover,
.search-results::-webkit-scrollbar-thumb:hover,
.mobile-menu::-webkit-scrollbar-thumb:hover,
.nav-menu::-webkit-scrollbar-thumb:hover,
.header-nav::-webkit-scrollbar-thumb:hover,
.header-nav *::-webkit-scrollbar-thumb:hover {
    background: #e0c75d; /* Jaune plus clair */
}

