/* Variables pour le menu */
:root {
    --menu-height: 70px;
    --menu-bg: #fff;
    --menu-text: #333;
    --menu-hover: #0056b3;
    --menu-active: #0056b3; /* Couleur active pour le titre et langue sélectionnée */
    --menu-mobile-bg: #fff;
    --menu-border: rgba(0, 0, 0, 0.1);
}

/* Style principal du menu */
#main-nav {
    background-color: var(--menu-bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

#main-nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: var(--menu-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-size: 2.25rem; /* Augmentation de 150% par rapport à 1.5rem */
    font-weight: bold;
    color: var(--menu-active); /* Utilisation de la couleur active */
    text-decoration: none;
}

/* Style de la liste du menu */
#menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

#menu li {
    margin: 0 15px;
    position: relative;
}

#menu li:before {
    display: none; /* Supprime tous les marqueurs de liste */
}

#menu a {
    color: var(--menu-text);
    text-decoration: none;
    font-size: 1.5rem; /* Augmentation de 150% par rapport à 1rem */
    padding: 8px 0;
    display: block;
}

#menu a:hover {
    color: var(--menu-hover);
}

/* Style du sélecteur de langue - Versions desktop et mobile */
.language-bar {
    display: flex;
    align-items: center;
    margin-left: 20px;
    position: relative;
}

.lang-switcher {
    position: relative;
    z-index: 200;
}

/* Version desktop avec dropdown */
.desktop-lang {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 12px;
    background-color: transparent;
    border: 2px solid var(--menu-active);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.desktop-lang:hover {
    background-color: rgba(0, 86, 179, 0.1);
}

.desktop-lang span {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--menu-active);
}

.chevron-icon {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 100%;
    overflow: hidden;
}

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

.lang-switcher:hover .chevron-icon {
    transform: rotate(180deg);
}

.lang-item {
    display: block;
    padding: 10px 20px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--menu-text) !important;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lang-item:hover {
    background-color: rgba(0, 86, 179, 0.1);
}

/* Version mobile avec langues côte à côte */
.mobile-lang {
    display: none;
    justify-content: center;
    align-items: center;
}

.mobile-lang-item {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--menu-text) !important;
    padding: 6px 10px;
    text-decoration: none;
}

.mobile-lang-item.active {
    color: var(--menu-active) !important;
}

.lang-separator {
    font-size: 1.5rem;
    font-weight: normal;
    color: #ccc;
    margin: 0 5px;
}

/* Bouton hamburger pour mobile */
#menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    width: 40px;
    height: 40px;
}

#menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--menu-text);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Animation du bouton hamburger */
#menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Style mobile */
@media (max-width: 768px) {
    #menu-toggle {
        display: block;
    }
    
    #menu {
        position: absolute;
        top: var(--menu-height);
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: var(--menu-mobile-bg);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
    }
    
    #menu.active {
        max-height: 500px; /* Hauteur suffisante pour afficher tous les éléments */
    }
    
    #menu li {
        margin: 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--menu-border);
    }
    
    #menu li:last-child {
        border-bottom: none;
    }
    
    #menu a {
        padding: 15px;
    }
    
    .language-bar {
        margin: 15px 0;
        justify-content: center;
        width: 100%;
    }
    
    .lang-switcher {
        width: auto;
        margin: 0 auto;
    }
    
    /* Masquer la version desktop et afficher la version mobile */
    .desktop-lang, .lang-dropdown {
        display: none;
    }
    
    .mobile-lang {
        display: flex;
        padding: 8px 0;
    }
    
    #main-nav .container {
        height: var(--menu-height);
        padding: 0 15px;
    }
    
    .site-title {
        font-size: 1.8rem; /* Légèrement plus petit en mobile */
    }
}
