/* ===== BOUTON WHATSAPP FLOTTANT ===== */

.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #ffffff;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
    text-decoration: none;
}

.whatsapp-float:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.3);
}

/* Animation de pulsation */
@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.8);
    }
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

.whatsapp-float.pulse {
    animation: whatsapp-pulse 2s infinite;
}

/* Tooltip pour le bouton WhatsApp */
.whatsapp-float::before {
    content: "Contactez-nous sur WhatsApp";
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.whatsapp-float::after {
    content: "";
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.whatsapp-float:hover::before,
.whatsapp-float:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Responsive */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 26px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float::before {
        display: none;
    }
    
    .whatsapp-float::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 15px;
        right: 15px;
    }
}

/* Animation d'entrée */
@keyframes whatsapp-bounce-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.whatsapp-float.animate-in {
    animation: whatsapp-bounce-in 0.6s ease-out;
}

/* Styles pour le badge de notification */
.whatsapp-float .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
}

/* Masquer le bouton sur certaines pages si nécessaire */
.hide-whatsapp .whatsapp-float {
    display: none;
}

/* Effet de vibration au clic */
@keyframes whatsapp-vibrate {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

.whatsapp-float.vibrate {
    animation: whatsapp-vibrate 0.5s ease-in-out;
}

/* Version avec texte pour desktop */
.whatsapp-float.with-text {
    width: auto;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
}

.whatsapp-float.with-text .fab {
    margin-right: 8px;
}

@media (max-width: 768px) {
    .whatsapp-float.with-text {
        width: 60px;
        height: 60px;
        padding: 0;
        border-radius: 50%;
    }
    
    .whatsapp-float.with-text .whatsapp-text {
        display: none;
    }
    
    .whatsapp-float.with-text .fab {
        margin-right: 0;
    }
}
