/* ==================== BOUTON WHATSAPP FLOTTANT ==================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    cursor: pointer;
    animation: float 2s ease-in-out infinite;
}

/* Tooltip */
.whatsapp-tooltip {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: var(--bg-card);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    pointer-events: none;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: var(--bg-card);
    transform: rotate(45deg);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-5px);
}

/* Bouton principal */
.whatsapp-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    overflow: hidden;
}

/* Effet de vague */
.whatsapp-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.whatsapp-button:hover::before {
    width: 100%;
    height: 100%;
}

.whatsapp-button i {
    font-size: 32px;
    color: white;
    transition: transform 0.3s ease;
    z-index: 1;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4);
}

.whatsapp-button:hover i {
    transform: scale(1.1);
}

/* Notification badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 1.5s ease-in-out infinite;
    border: 2px solid var(--bg-color);
}

/* Animation flottante */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Animation pulsation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Animation de rotation au clic */
.whatsapp-button:active {
    transform: scale(0.95);
}

/* Variation pour le mode sombre/clair */
[data-theme="light"] .whatsapp-button {
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25);
}

[data-theme="dark"] .whatsapp-button {
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

/* Style pour le tooltip en mode clair */
[data-theme="light"] .whatsapp-tooltip {
    background: white;
    color: #333;
    border-color: #e0e0e0;
}

[data-theme="light"] .whatsapp-tooltip::after {
    background: white;
    border-color: #e0e0e0;
}

/* Style pour le tooltip en mode sombre */
[data-theme="dark"] .whatsapp-tooltip {
    background: #2d2d2d;
    color: #fff;
    border-color: #404040;
}

[data-theme="dark"] .whatsapp-tooltip::after {
    background: #2d2d2d;
    border-color: #404040;
}

/* Responsive */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-button {
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-button i {
        font-size: 28px;
    }
    
    .whatsapp-tooltip {
        font-size: 0.75rem;
        padding: 6px 12px;
        bottom: 65px;
    }
}

@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-button {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-button i {
        font-size: 26px;
    }
    
    .whatsapp-tooltip {
        display: none; /* Masquer le tooltip sur très petits écrans pour économiser de l'espace */
    }
}
