.lang-switcher {
    position: relative;
    flex-shrink: 0;
}

.lang-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1;
    color: #475569;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lang-switcher-btn:hover,
.lang-switcher-btn[aria-expanded="true"] {
    border-color: var(--green, #166534);
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.1);
}

.lang-switcher-btn .lang-flag {
    font-size: 1.125rem;
    line-height: 1;
}

.lang-switcher-btn .lang-chevron {
    font-size: 0.5rem;
    opacity: 0.55;
    transition: transform 0.2s ease;
}

.lang-switcher-btn[aria-expanded="true"] .lang-chevron {
    transform: rotate(180deg);
}

.lang-switcher-menu {
    display: none;
    position: fixed;
    z-index: 100000;
    min-width: 11rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 12px 32px -10px rgba(30, 58, 95, 0.25);
    padding: 0.35rem;
}

.lang-switcher-menu.is-open {
    display: block;
}

.lang-switcher-menu button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: none;
    border-radius: 0.5rem;
    background: none;
    font: inherit;
    font-size: 0.8125rem;
    color: #475569;
    cursor: pointer;
    text-align: start;
}

.lang-switcher-menu button:hover {
    background: #ecfdf5;
    color: var(--green, #166534);
}

.lang-switcher-menu button.is-active {
    background: #ecfdf5;
    color: var(--green, #166534);
    font-weight: 600;
}

.lang-switcher-menu .lang-flag {
    font-size: 1.125rem;
    line-height: 1;
}

html[dir="rtl"] body {
    font-family: 'Noto Sans Arabic', 'Inter', system-ui, sans-serif;
}

html[dir="rtl"] .nav-import-btn,
html[dir="rtl"] .lang-switcher-btn {
    flex-direction: row-reverse;
}

html[dir="rtl"] .lang-switcher-menu button {
    flex-direction: row-reverse;
    text-align: end;
}

/* Prix en dirhams : lecture gauche→droite en contexte RTL */
html[dir="rtl"] .price-mad,
html[dir="rtl"] bdi.price-mad {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
    text-align: left;
}

html[dir="rtl"] .compare-table .col-plan .price-mad {
    width: 100%;
}