/* XCOM Translate Pro — sélecteur de langue (dropdown compact) */

.ait-st-lang-switcher {
    position: relative;
    z-index: 1100;
    flex-shrink: 0;
}

.ait-st-lang-dropdown {
    position: relative;
}

.ait-st-lang-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 38px;
    height: 34px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .05);
    color: rgba(240, 244, 255, .92);
    cursor: pointer;
    line-height: 1;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .15s ease;
}

.ait-st-lang-trigger:hover,
.ait-st-lang-switcher.is-open .ait-st-lang-trigger {
    border-color: rgba(212, 20, 90, .5);
    background: rgba(212, 20, 90, .12);
    box-shadow: 0 0 0 1px rgba(212, 20, 90, .18);
}

.ait-st-lang-trigger:focus-visible {
    outline: 2px solid rgba(212, 20, 90, .75);
    outline-offset: 2px;
}

.ait-st-lang-chevron {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    opacity: .72;
    transition: transform .2s ease, opacity .2s ease;
}

.ait-st-lang-switcher.is-open .ait-st-lang-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

.ait-st-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 168px;
    margin: 0;
    padding: 6px;
    list-style: none;
    border-radius: 14px;
    border: 1px solid rgba(212, 20, 90, .24);
    background: rgba(10, 14, 39, .98);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .55), 0 0 24px rgba(212, 20, 90, .1);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 1200;
}

.ait-st-lang-menu[hidden] {
    display: none !important;
}

.ait-st-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    text-decoration: none !important;
    color: rgba(240, 244, 255, .88) !important;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.ait-st-lang-option:hover {
    background: rgba(212, 20, 90, .12);
    border-color: rgba(212, 20, 90, .22);
    color: #fff !important;
}

.ait-st-lang-option.is-active {
    background: rgba(212, 20, 90, .16);
    border-color: rgba(212, 20, 90, .35);
    color: #fff !important;
}

.ait-st-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    flex-shrink: 0;
}

.ait-st-flag svg {
    display: block;
    width: 21px;
    height: 15px;
}

.ait-st-lang-label {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
}

.ait-st-lang-code {
    font-family: "Space Grotesk", system-ui, sans-serif;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: rgba(240, 244, 255, .88);
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Intégration header AIT */
.header__lang.lang-switcher {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1100;
}

.header__lang .ait-st-lang-switcher {
    margin: 0;
}

.header__actions .header__lang {
    margin-right: 2px;
}

/* Fallback : deux drapeaux côte à côte (style="flags") */
.ait-st-lang-switcher--flags .ait-st-lang-list {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ait-st-lang-switcher--flags .ait-st-lang-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 32px;
    padding: 4px 6px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .04);
    text-decoration: none !important;
    transition: border-color .2s ease, background .2s ease;
}

.ait-st-lang-switcher--flags .ait-st-lang-link.is-active {
    border-color: rgba(212, 20, 90, .65);
    background: rgba(212, 20, 90, .18);
}

@media (max-width: 900px) {
    .header__actions .header__lang {
        margin-right: 8px;
    }

    .ait-st-lang-trigger {
        min-width: 40px;
        height: 34px;
        padding: 0 8px;
    }
}
