header {
    position: sticky; /* Fait coller tout l'en-tête */
    top: 0;
    z-index: 1000; /* S'assure qu'il passe au-dessus de tout */
    width: 100%;
}

/* Styles pour la barre du haut */
.top-bar {
    background-color: rgba(18, 24, 40, 0.7); /* Fond semi-transparent */
    padding: 8px 30px;
    border-bottom: 1px solid rgba(42, 59, 92, 0.5); /* Ligne de séparation subtile */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-links-left, .top-bar-links-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-links-left a,
.top-bar-links-right a {
    color: var(--text-color-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.top-bar-links-left a:hover,
.top-bar-links-right a:hover {
    color: var(--text-color-light);
}

.top-bar-links-left a i,
.top-bar-links-right a i {
    margin-right: 8px;
}

/* Styles de la barre de navigation principale */
.navbar {
    background-color: rgba(27, 37, 59, 0.7); /* Fond semi-transparent */
    backdrop-filter: blur(10px); /* Effet de flou pour un look moderne */
    padding: 10px 50px; /* Augmentation du padding pour décaler des bords */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-logo img {
    height: 40px;
    vertical-align: middle;
}

.navbar-links {
    display: flex;
    align-items: center;
    margin-left: auto;
    gap: 50px;
}

.navbar-links a {
    color: var(--text-color-light);
    text-decoration: none;
    font-size: 18px;
    padding: 8px 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-links a:hover {
    color: var(--text-color-light);
    background-color: var(--primary-blue);
    text-decoration: none;
}

/* --- Styles pour le menu déroulant --- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color-light);
    font-size: 18px;
    font-family: inherit;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.dropdown:hover .dropdown-btn {
    color: var(--primary-blue);
}
.dropdown:hover .dropdown-btn i {
    transform: rotate(180deg);
}
.dropdown-btn:hover {
    color: var(--primary-blue);
}

.dropdown-btn i {
    margin-left: 5px;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.dropdown-content {
    position: absolute;
    background-color: var(--dark-bg-secondary);
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.3);
    z-index: 1;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
    min-width: 340px;
    opacity: 0;
    visibility: hidden;
    max-width: 90vw;
    left: 50%;
    transform: translate(-50%, -10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.info-dropdown {
    min-width: 220px;
    left: 20%;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.dropdown:hover .info-item,
.dropdown:hover .game-item {
    opacity: 1;
    transform: translateY(0);
    transition-delay: calc(0.05s * var(--i));
}

.dropdown-title {
    color: var(--text-color-light);
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.dropdown-separator {
    height: 1px;
    background-color: var(--border-color);
    margin-bottom: 15px;
}

.game-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.all-offers-link {
    display: block;
    padding: 10px;
    margin-bottom: 10px;
    text-align: center;
    color: var(--text-color-light);
    text-decoration: none;
    font-weight: 600;
    border-radius: 5px;
    background-color: var(--border-color);
    transition: all 0.3s ease;
}

.all-offers-link:hover {
    background-color: var(--primary-blue);
    color: var(--text-color-light);
    transform: translateY(-2px);
}

.game-item {
    display: flex;
    align-items: center;
    padding: 15px 10px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.game-item:hover {
    background-color: var(--border-color);
}

.game-card-image {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-right: 15px;
}

.game-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.game-item-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.game-item-title {
    color: var(--text-color-light);
    font-weight: 700;
    font-size: 1.1em;
}

.game-item-price {
    color: var(--text-color-muted);
    font-weight: 400;
    font-size: 0.9em;
}

.game-item-order {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.9em;
    padding: 6px 12px;
    border: 1px solid var(--primary-blue);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.game-item:hover .game-item-order {
    background-color: var(--primary-blue);
    color: var(--text-color-light);
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 5px;
    text-decoration: none;
    color: var(--text-color-light);
    font-weight: 600;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.info-item:hover {
    background-color: var(--border-color);
    color: var(--primary-blue);
}

.info-item i {
    width: 18px;
    text-align: center;
    color: var(--primary-blue);
}

.hamburger {
    display: none;
}

/* --- Media Queries pour la Responsivité --- */
@media (max-width: 992px) {
    .navbar {
        padding: 10px 30px;
    }

    .navbar-links {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 20px;
    }

    .navbar {
        padding: 10px 20px;
    }

    .navbar-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--dark-bg-secondary);
        z-index: 999;
        flex-direction: column;
        align-items: stretch;
        padding: 20px 0;
        gap: 0;
    }

    .navbar-links.active {
        display: flex;
    }

    .navbar-links a, .navbar-links .dropdown-btn {
        text-align: center;
        padding: 15px 20px;
        border-radius: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .navbar-links a:hover, .navbar-links .dropdown-btn:hover {
        background-color: var(--primary-blue);
    }

    .dropdown {
        display: flex;
        flex-direction: column;
    }

    .navbar-links .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        background-color: var(--dark-bg-primary);
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        min-width: auto;
        padding: 10px 0 0 0;
    }

    .dropdown:hover .dropdown-content, .dropdown-btn:focus + .dropdown-content {
        display: block;
    }

    .hamburger {
        display: block;
        padding: 15px;
        cursor: pointer;
        transition-timing-function: linear;
        transition-duration: .15s;
        transition-property: opacity,filter;
        background-color: transparent;
        border: 0;
        z-index: 1001;
    }

    .hamburger-box {
        width: 30px;
        height: 24px;
        display: inline-block;
        position: relative;
    }

    .hamburger-inner, .hamburger-inner::before, .hamburger-inner::after {
        width: 30px;
        height: 3px;
        background-color: var(--text-color-light);
        border-radius: 4px;
        position: absolute;
        transition-timing-function: ease;
        transition-duration: .15s;
        transition-property: transform;
    }

    .hamburger-inner::before, .hamburger-inner::after {
        content: "";
        display: block;
    }

    .hamburger-inner::before { top: -10px; }
    .hamburger-inner::after { bottom: -10px; }

    .hamburger.is-active .hamburger-inner { transform: translate3d(0, 10px, 0) rotate(45deg); }
    .hamburger.is-active .hamburger-inner::before { transform: rotate(-45deg) translate3d(-5.71429px, -6px, 0); opacity: 0; }
    .hamburger.is-active .hamburger-inner::after { transform: translate3d(0, -20px, 0) rotate(-90deg); }
}