/* ========================================
   CSS VERSION SWITCHER - BOUTON TOGGLE
   ======================================== */

/* Container du switcher - Positionné en bas à droite */
.mm-css-switcher-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mm-css-switcher-container.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Label au-dessus du bouton */
.mm-switcher-text {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

/* Container du toggle */
.mm-css-toggle {
    position: relative;
    width: 80px;
    height: 40px;
    background: #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid #fff;
}

.mm-css-toggle:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* État actif (V2) */
.mm-css-toggle.active {
    background: #4CAF50;
}

/* Le slider qui bouge */
.mm-toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 28px;
    height: 28px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mm-css-toggle.active .mm-toggle-slider {
    transform: translateX(40px);
}

/* Label V1/V2 sur le slider */
.mm-toggle-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 700;
    color: #666;
    user-select: none;
}

/* Labels V1 et V2 fixes sur les côtés */
.mm-toggle-text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    user-select: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.mm-toggle-text.left {
    left: 10px;
}

.mm-toggle-text.right {
    right: 10px;
}

/* Animation de transition du body pendant le switch */
body.css-switching {
    transition: opacity 0.3s ease;
}

body.css-switching * {
    transition: all 0.3s ease !important;
}

/* Version responsive - Mobile */
@media (max-width: 768px) {
    .mm-css-switcher-container {
        bottom: 20px;
        right: 20px;
    }

    .mm-css-toggle {
        width: 70px;
        height: 36px;
    }

    .mm-toggle-slider {
        width: 24px;
        height: 24px;
    }

    .mm-css-toggle.active .mm-toggle-slider {
        transform: translateX(34px);
    }

    .mm-switcher-text {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* Animation de pulsation pour attirer l'attention (optionnelle) */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.mm-css-toggle.pulse {
    animation: pulse 2s infinite;
}

/* Variante : Position en haut à droite (alternative) */
/*
.mm-css-switcher-container {
    top: 100px;
    right: 30px;
    bottom: auto;
}
*/

/* Variante : Position centrée en bas (alternative) */
/*
.mm-css-switcher-container {
    bottom: 30px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}
.mm-css-switcher-container.visible {
    transform: translateX(-50%);
}
*/
