/* Sélecteur de Langue - Bas à gauche - Même taille que WhatsApp */

#language-selector-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    z-index: 9998;
    transition: all 0.3s ease;
    cursor: pointer;
    opacity: 0;
    transform: scale(0);
}

#language-selector-btn.show {
    opacity: 1;
    transform: scale(1);
}

#language-selector-btn svg {
    width: 28px;
    height: 28px;
    color: white;
}

#language-selector-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(34, 197, 94, 0.6);
}

#language-selector-btn:active {
    transform: scale(0.95);
}

/* Menu déroulant des langues */
#language-menu {
    position: fixed;
    bottom: 85px;
    left: 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(34, 197, 94, 0.3);
    border: 2px solid rgba(34, 197, 94, 0.3);
    padding: 10px 0;
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Scrollbar personnalisée */
#language-menu::-webkit-scrollbar {
    width: 6px;
}

#language-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

#language-menu::-webkit-scrollbar-thumb {
    background: #22c55e;
    border-radius: 3px;
}

#language-menu::-webkit-scrollbar-thumb:hover {
    background: #16a34a;
}

#language-menu.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.language-option:hover {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.language-option.active {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border-left: 3px solid #22c55e;
}

.language-flag {
    font-size: 1.5rem;
    width: 24px;
    text-align: center;
}

.language-name {
    flex: 1;
}

.language-code {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    #language-selector-btn {
        bottom: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
    }

    #language-selector-btn svg {
        width: 25px;
        height: 25px;
    }

    #language-menu {
        bottom: 75px;
        left: 15px;
        min-width: 180px;
    }

    .language-option {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #language-selector-btn {
        bottom: 12px;
        left: 12px;
        width: 42px;
        height: 42px;
    }

    #language-selector-btn svg {
        width: 23px;
        height: 23px;
    }

    #language-menu {
        bottom: 68px;
        left: 12px;
        min-width: 170px;
    }
}

/* Animation de pulsation (optionnelle) */
@keyframes language-pulse {
    0% {
        box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(34, 197, 94, 0.7);
    }
    100% {
        box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
    }
}

#language-selector-btn.pulse {
    animation: language-pulse 2s infinite;
}

/* Éviter le conflit avec le menu mobile */
@media (max-width: 768px) {
    body.menu-open #language-selector-btn {
        opacity: 0.3;
        pointer-events: none;
    }
}
