/* ==========================================================================
   LANG SWITCHER — CSS externe (extrait de translations-helpers.php)
   ========================================================================== */

.lang-switcher { position: relative; display: inline-flex; align-items: center; }
.ls-cb { display: none; }
.ls-overlay { display: none; position: fixed; inset: 0; z-index: 998; }
.ls-cb:checked ~ .ls-overlay { display: block; }

.ls-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    background: #fff;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    user-select: none;
    transition: .15s;
}
.ls-btn:hover { border-color: #6366f1; background: #f5f5ff; }

.ls-arrow { transition: transform .2s; opacity: .6; }
.ls-cb:checked ~ .ls-btn .ls-arrow { transform: rotate(180deg); }

.ls-flag {
    display: flex;
    align-items: center;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}

.ls-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    z-index: 999;
    min-width: 170px;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: .18s;
}
.ls-cb:checked ~ .ls-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.ls-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 7px;
    text-decoration: none;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    transition: .12s;
}
.ls-item:hover { background: #f3f4f6; }
.ls-item.ls-active { background: #eef2ff; color: #4f46e5; font-weight: 700; }
.ls-check { margin-left: auto; color: #4f46e5; font-weight: 700; }
.ls-label { flex: 1; }

/* ── Responsive ≤ 998px ── */
@media (max-width: 998px) {
    .ls-name { display: none; }

    .ls-menu {
        position: fixed;
        top: 62px;      /* hauteur header */
        right: 12px;
        left: auto;
        min-width: 140px;
    }

    /* Avec la barre admin WordPress */
    .admin-bar .ls-menu {
        top: 94px;      /* 62px header + 32px admin bar */
    }
}
