/* ══════════════════════════════════════
   SÉLECTEUR DE LANGUE — DRAPEAUX UE
   ══════════════════════════════════════ */
.lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.lang-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 1.5px solid #e2e8f0;
    border-radius: 50px;
    padding: 6px 10px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: #181d38;
    transition: border-color .25s, color .25s, background .25s;
    white-space: nowrap;
    line-height: 1;
}
.lang-switcher-btn:hover,
.lang-switcher-btn.open {
    border-color: #06BBCC;
    color: #06BBCC;
    background: #F0FBFC;
}
.lang-switcher-flag {
    font-size: 15px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}
.lang-switcher-btn .lang-switcher-caret {
    font-size: 9px;
    transition: transform .25s;
    line-height: 1;
}
.lang-switcher-btn.open .lang-switcher-caret {
    transform: rotate(180deg);
}

.lang-switcher-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(24,29,56,.16);
    padding: 8px;
    min-width: 220px;
    max-height: 360px;
    overflow-y: auto;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
}
.lang-switcher-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang-switcher-menu::-webkit-scrollbar { width: 4px; }
.lang-switcher-menu::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }

.lang-switcher-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Heebo', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #181d38;
    transition: background .15s, color .15s;
    border: none;
    background: transparent;
    text-align: left;
    width: 100%;
}
.lang-switcher-item:hover {
    background: #F0FBFC;
    color: #06BBCC;
}
.lang-switcher-item.active {
    background: #06BBCC;
    color: #fff;
}
.lang-switcher-item .lang-switcher-flag { font-size: 16px; }

/* Petit loader pendant que Google Translate traduit la page */
.lang-switcher-loading .lang-switcher-btn {
    opacity: .6;
    pointer-events: none;
}

/* Mobile : dans le menu burger */
@media (max-width: 991.98px) {
    .lang-switcher {
        width: 100%;
        margin: 14px 0;
        justify-content: flex-start;
    }
    .lang-switcher-btn {
        width: 100%;
        justify-content: space-between;
    }
    .lang-switcher-menu {
        position: static;
        width: 100%;
        margin-top: 8px;
        box-shadow: none;
        border: 1px solid #e2e8f0;
        max-height: 240px;
    }
}
