/* Fix pour éviter les bugs visuels du header au chargement */

/* État initial du header pour éviter le flash */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--header-bg, #1a1a1a);
    min-height: 80px;
}

/* Game dropdowns - état initial */
.game-dropdown {
    position: relative;
    display: inline-block;
    min-width: 90px;
}

.game-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    min-width: 90px;
    height: 40px;
    white-space: nowrap;
    opacity: 1;
}

.game-dropdown-toggle span {
    display: inline-block;
    min-width: 60px;
}

/* Cacher le contenu du dropdown par défaut */
.game-dropdown-content {
    display: none !important;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg, #1a1a1a);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid var(--border-color, #333);
}

/* Afficher quand actif */
.game-dropdown.active .game-dropdown-content {
    display: block !important;
    opacity: 1;
    visibility: visible;
}

/* Animation d'apparition */
@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.game-dropdown.active .game-dropdown-content {
    animation: dropdownFadeIn 0.2s ease-out;
}

/* Logo dans le dropdown - sans background */
.game-dropdown-logo {
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
    margin: 20px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Menu items */
.game-dropdown-menu {
    padding: 8px;
    background: var(--card-bg, #1a1a1a);
}

/* User dropdown */
.user-dropdown {
    display: none !important;
}

.user-menu.active .user-dropdown,
.user-dropdown.show {
    display: block !important;
}

/* Language dropdown */
.language-dropdown {
    display: none !important;
}

.language-selector:hover .language-dropdown,
.language-dropdown.show {
    display: block !important;
}

/* Mobile menu */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .nav.nav-open {
        display: flex;
    }
}



