@import url("../css/var.css");

.main-header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    padding: 1rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative; /* Changement clé ici */
    width: 100%;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: transform 0.3s;
}

.brand:hover {
    transform: scale(1.02);
}

.logo-img {
    height: 50px;
    width: auto;
}

.brand-name {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Segoe UI', sans-serif;
}

.burger-menu {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 1.5rem;
    width: 2rem;
    padding: 0;
    z-index: 1010;
    position: relative;
    display: none; /* Masqué par défaut */
}

.burger-line {
    width: 100%;
    height: 4px;
    background-color: white;
    border-radius: 2px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.burger-menu.active .burger-line:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #3b3b3b;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
}

.mobile-nav.active {
    transform: translateY(0);
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
}

.mobile-nav ul li a {
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.mobile-nav ul li a:hover {
    color: #3498db;
}

/* Masquer la navigation principale sur mobile */
@media (max-width: 768px) {
    .main-nav {
        display: none; /* Masque la navigation principale */
    }

    .burger-menu {
        display: flex; /* Affiche le menu burger */
    }
}

/* Afficher la navigation principale sur desktop */
@media (min-width: 769px) {
    .mobile-nav {
        display: none; /* Masque le menu mobile */
    }
}