/* ============================================================
   Language Switcher — SiteWeb67 v4.0
   Positionné en haut à droite, fixe sur toutes les pages
   ============================================================ */

/* Conteneur principal */
.lang-switcher-inline {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 999999 !important;
    display: inline-block;
}

/* Bouton principal */
.lang-switcher-btn {
    display: flex !important;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.72) !important;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 5px;
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer !important;
    white-space: nowrap;
    transition: background 0.2s ease;
    line-height: 1;
    user-select: none;
}

.lang-switcher-btn:hover {
    background: rgba(0, 0, 0, 0.92) !important;
}

.lang-switcher-btn .lang-code {
    font-size: 12px;
    letter-spacing: 0.02em;
}

.lang-switcher-btn i {
    font-size: 9px;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

/* Flèche rotative quand le menu est ouvert */
.lang-switcher-inline:has(#lang-dropdown.show) .lang-switcher-btn i,
.lang-switcher-inline:has(.lang-switcher-menu.show) .lang-switcher-btn i {
    transform: rotate(180deg);
}

/* Menu déroulant */
.lang-switcher-menu {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 0 !important;
    min-width: 80px;
    background: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    padding: 4px 0 !important;
    list-style: none !important;
    margin: 0 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55) !important;
    overflow: hidden;
}

/* Classe .show pour l'affichage */
.lang-switcher-menu.show,
#lang-dropdown.show {
    display: block !important;
}

/* Items du menu */
.lang-switcher-menu li {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 14px !important;
    color: #ccc !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-weight: 700;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.lang-switcher-menu li:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
}

/* Item actif (langue courante) */
.lang-switcher-menu li.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.07) !important;
    position: relative;
}

.lang-switcher-menu li.active::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    background: #4caf50;
    border-radius: 50%;
    margin-left: 4px;
    flex-shrink: 0;
}

/* ============================================================
   Responsive mobile
   ============================================================ */

@media (max-width: 768px) {
    .lang-switcher-inline {
        top: 12px !important;
        right: 12px !important;
    }

    .lang-switcher-btn {
        padding: 5px 9px;
        font-size: 11px;
    }

    .lang-switcher-btn i {
        display: none; /* Cache la flèche sur mobile pour gagner de la place */
    }

    .lang-switcher-menu li {
        padding: 8px 12px !important;
        font-size: 11px !important;
    }
}
