/* ==========================================================================
   Sélecteur de langue — menu déroulant élégant
   ==========================================================================
   Remplace les deux liens "FR | ENG" figés (top-header.blade.php), qui ne
   permettaient pas d'afficher les langues ajoutées dynamiquement depuis
   l'administration (voir App\Models\SiteLocale). Le menu liste maintenant
   toutes les langues actives, quel que soit leur nombre.
   ========================================================================== */

.lang-switcher {
    position: relative;
}

.lang-switcher__toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 2px;
    background: transparent;
    border: none;
    color: #10233F;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: color 0.18s ease;
}

.lang-switcher__toggle:hover,
.lang-switcher__toggle:focus-visible {
    color: #1e5f8e;
    outline: none;
}

.lang-switcher__drapeau {
    font-size: 1.05rem;
    line-height: 1;
}

.lang-switcher__code {
    letter-spacing: 0.02em;
}

.lang-switcher__chevron {
    font-size: 0.65rem;
    color: #9CA3AF;
    transition: transform 0.2s ease;
}

.lang-switcher.est-ouvert .lang-switcher__chevron {
    transform: rotate(180deg);
}

.lang-switcher__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1050;
    min-width: 210px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(16, 35, 63, 0.14);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}

.lang-switcher.est-ouvert .lang-switcher__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-switcher__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: transparent;
    border-radius: 9px;
    color: #1F2937;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.lang-switcher__item:hover,
.lang-switcher__item:focus-visible {
    background: #F3F4F6;
    color: #10233F;
    outline: none;
}

.lang-switcher__item.est-active {
    background: #EFF6FF;
    color: #1e5f8e;
    font-weight: 700;
}

.lang-switcher__item-drapeau {
    font-size: 1.15rem;
    line-height: 1;
    flex-shrink: 0;
}

.lang-switcher__item-libelle {
    flex: 1 1 auto;
}

.lang-switcher__item-check {
    color: #1e5f8e;
    font-size: 0.8rem;
}

/* Variante mobile — intégrée au panneau de navigation sombre */
/* Ce variant supposait un fond bleu marine (texte/bordures
   blancs translucides). Le panneau du menu hamburger est désormais blanc
   (voir navbar-fix.css) : les couleurs sont inversées pour rester lisibles. */
.lang-switcher--mobile .lang-switcher__toggle {
    color: #10233F;
    width: 100%;
    padding: 8px 2px;
    justify-content: space-between;
}

.lang-switcher--mobile .lang-switcher__toggle:hover {
    color: #1e5f8e;
}

.lang-switcher--mobile .lang-switcher__menu {
    position: static;
    margin-top: 8px;
    box-shadow: none;
    border-color: rgba(16, 35, 63, 0.12);
    background: #FFFFFF;
    display: none;
}

.lang-switcher--mobile.est-ouvert .lang-switcher__menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: none;
}

.lang-switcher--mobile .lang-switcher__item {
    color: rgba(16, 35, 63, 0.75);
}

.lang-switcher--mobile .lang-switcher__item:hover,
.lang-switcher--mobile .lang-switcher__item.est-active {
    background: rgba(30, 95, 142, 0.08);
    color: #1e5f8e;
}
