/* Sélecteur de langue : menu déroulant (drapeau + code) + liste drapeau + libellé. */

.locale-switcher {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
    align-items: flex-start;
}
.locale-switcher-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #f5c400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.locale-switcher-details {
    position: relative;
    width: 100%;
    max-width: 100%;
}
.locale-switcher-details summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.45rem 0.28rem 0.35rem;
    border-radius: 8px;
    border: 1px solid rgba(245, 196, 0, 0.45);
    background: rgba(17, 24, 39, 0.95);
    color: inherit;
    font: inherit;
    line-height: 1.2;
    min-height: 2rem;
    box-sizing: border-box;
    user-select: none;
    transition: border-color 0.15s, background 0.15s;
}
.locale-switcher-details summary::-webkit-details-marker {
    display: none;
}
.locale-switcher-details summary::marker {
    display: none;
}
.locale-switcher-details summary:hover {
    border-color: rgba(245, 196, 0, 0.75);
    background: rgba(255, 255, 255, 0.07);
}
.locale-switcher-details[open] > summary {
    border-color: rgba(245, 196, 0, 0.9);
    box-shadow: 0 0 0 1px rgba(245, 196, 0, 0.25);
}
.locale-switcher-details[open] .locale-switcher-chevron {
    transform: rotate(180deg);
}
.locale-switcher-trigger-code {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: rgba(248, 250, 252, 0.95);
    min-width: 1.35rem;
    text-align: center;
}
.locale-switcher-chevron {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.1rem;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(245, 196, 0, 0.85);
    transition: transform 0.15s ease;
    flex-shrink: 0;
}
.locale-switcher-panel {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: auto;
    min-width: 11.5rem;
    max-width: min(92vw, 18rem);
    max-height: min(70vh, 22rem);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.35rem 0;
    margin: 0;
    list-style: none;
    border-radius: 10px;
    border: 1px solid rgba(245, 196, 0, 0.35);
    background: rgba(17, 24, 39, 0.98);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    z-index: 6000;
}
.locale-switcher-panel-item {
    margin: 0;
    padding: 0;
}
.locale-switcher-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.65rem;
    text-decoration: none !important;
    color: rgba(248, 250, 252, 0.95) !important;
    font-size: 0.88rem;
    line-height: 1.25;
    border: none;
    border-radius: 0;
    background: transparent;
    transition: background 0.12s;
}
.locale-switcher-option:hover {
    background: rgba(255, 255, 255, 0.08);
}
.locale-switcher-option.is-active {
    background: rgba(245, 196, 0, 0.12);
    font-weight: 600;
}
.locale-switcher-option-label {
    flex: 1;
    min-width: 0;
}
.locale-flag-img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: block;
    flex-shrink: 0;
}
.locale-flag-img--trigger {
    width: 22px;
    height: 15px;
}
.locale-switcher--hexa .locale-switcher-label {
    display: none;
}
.locale-switcher--hexa .locale-switcher-details summary {
    padding: 0.22rem 0.38rem;
    min-height: 1.75rem;
}
.locale-switcher--hexa .locale-flag-img--trigger {
    width: 18px;
    height: 13px;
}
.locale-switcher--hexa .locale-switcher-trigger-code {
    font-size: 0.68rem;
}
.locale-switcher--hexa .locale-switcher-panel {
    right: 0;
    left: auto;
}
.locale-switcher--marketing .locale-switcher-details summary {
    background: rgba(255, 255, 255, 0.06);
}
.marketing .marketing-locale-wrap {
    position: relative;
    z-index: 110;
    overflow: visible;
}

@media (max-width: 768px) {
    .locale-switcher--marketing .locale-switcher-label {
        display: none;
    }
    .locale-switcher--admin .locale-switcher-label {
        display: none;
    }
    .locale-switcher-panel {
        max-width: min(92vw, 16rem);
    }
}
