/* --- SÉLECTEUR DE LANGUE --- */
.language-selector {
    position: relative;
    margin-left: 8px; /* Espace après le bouton DONNER */
}

.lang-dropdown {
    position: relative;
}

.lang-options {
    right: 0 !important;
}

.lang-selected {
    background: transparent;
    border: none;
    padding: 5px 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px; /* Espace réduit entre le drapeau, le texte et la flèche */
    transition: all 0.3s ease;
}

/* Taille des drapeaux (réduite selon demande) */
/* Taille des drapeaux (réduite) */
.lang-selected img,
.lang-option img {
    width: 18px; /* Passage de 22px à 18px */
    height: auto;
    display: block;
    border-radius: 2px;
}

.lang-code {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--primary-color, #2c3e50);
    text-transform: uppercase;
    font-family: var(--font-body, 'Montserrat', sans-serif), serif;
}

.expand-icon {
    font-size: 16px !important;
    color: var(--primary-color, #2c3e50);
    margin-left: 2px;
    vertical-align: middle;
    line-height: 1;
}

/* Aligne le texte et la flèche sur la même ligne pour le toggle DECOUVRIR */
.dropdown-toggle-nav {
    display: inline-flex !important;
    align-items: center;
    gap: 2px;
}

/* --- ANIMATION FLÈCHE DECOUVRIR --- */
.dropdown-toggle-nav .expand-icon {
    transition: transform 0.3s ease;
}

.dropdown.open .dropdown-toggle-nav .expand-icon {
    transform: rotate(180deg);
}

/* --- DROPDOWN AU CLIC (classe .open ajoutée par JS) --- */
.dropdown.open .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* Réduit légèrement l'espacement entre les rubriques du menu */
.nav-links li > a,
.nav-links li > .dropdown-toggle-nav {
    padding-left: 10px;
    padding-right: 10px;
}

.nav-links {
    gap: 0;
}

/* --- CORRECTION DU MENU DÉROULANT DES TRADUCTIONS --- */
/* --- CORRECTION DE L'ALIGNEMENT DU MENU DÉROULANT --- */
.lang-options {
    position: absolute;
    top: calc(100% + 10px);
    right: -10px; /* Ajustez cette valeur (ex: -5px ou -10px) pour coller au bord droit */
    background: white;
    border: none;
    border-radius: 8px;
    padding: 8px;
    display: none;
    flex-direction: column;
    min-width: 60px; /* Taille réduite précédemment */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

/* Classe active déclenchée par le JS */
.lang-options.show {
    display: flex;
}

.lang-option {
    background: transparent;
    border: none;
    padding: 6px 10px; /* Légère réduction du padding pour compacter le tout */
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column; /* Drapeau au-dessus du texte pour un look compact */
    align-items: center;
    gap: 4px;
    width: 60%;
}

.lang-option span {
    font-size: 0.75rem;
    font-weight: bold;
    color: #333;
}

.lang-option:hover {
    background-color: #f8f9fa;
    color: var(--accent-color, #3498db);
}

/* --- BOUTON CONNEXION (STYLE ARRONDI ET ALIGNEMENT DROIT) --- */
/* Supprime l'espace après le dernier élément pour un alignement parfait à droite */
.admin-login {
    margin-left: 8px;
    margin-right: 0; /* Assure qu'il n'y a aucune marge à droite */
}

.btn-login {
    background: #3498db;
    color: white !important;
    padding: 8px 22px;
    border-radius: 25px; /* Retour au style arrondi pillule */
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
    margin-right: 0 !important; /* Aligne l'extrémité droite parfaitement avec le container */
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.btn-login:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

/* Ajustement global de la navigation pour l'alignement */
.navbar {
    display: flex;
    align-items: center;
    margin-right: 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px; /* Assure que le bouton reste dans les limites du container */
}

/* Responsive */
@media (max-width: 768px) {
    .language-selector,
    .admin-login {
        margin-left: 10px;
    }

    .lang-selected img {
        width: 18px;
    }

    .btn-login {
        padding: 6px 15px;
        font-size: 0.8rem;
    }
}