/* Plugin WhatsApp - Vitalis Care */

/* Bouton WhatsApp principal */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    left: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    outline: none;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.whatsapp-float i {
    font-size: 30px;
}

/* Animation de pulsation */
.whatsapp-float.pulse {
    animation: whatsapp-pulse 2s infinite;
}

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Panel WhatsApp */
.whatsapp-panel {
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 320px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.whatsapp-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Header du panel */
.whatsapp-header {
    background: #25d366;
    color: white;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.whatsapp-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.whatsapp-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.whatsapp-close:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Contenu du panel */
.whatsapp-content {
    padding: 20px;
}

.whatsapp-info {
    text-align: center;
    margin-bottom: 20px;
}

.whatsapp-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 10px;
}

.whatsapp-info h5 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 16px;
}

.whatsapp-info p {
    margin: 0;
    color: #666;
    font-size: 12px;
}

/* Messages prédéfinis */
.whatsapp-messages {
    margin-bottom: 20px;
}

.whatsapp-message {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #333;
}

.whatsapp-message:hover {
    background: #e9ecef;
    border-color: #25d366;
}

.whatsapp-message:last-child {
    margin-bottom: 0;
}

/* Boutons d'action */
.whatsapp-actions {
    display: flex;
    gap: 10px;
}

.whatsapp-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.whatsapp-btn-primary {
    background: #25d366;
    color: white;
}

.whatsapp-btn-primary:hover {
    background: #128c7e;
    color: white;
}

.whatsapp-btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e9ecef;
}

.whatsapp-btn-secondary:hover {
    background: #e9ecef;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .whatsapp-panel {
        width: 280px;
        left: 10px;
        bottom: 80px;
    }
    
    .whatsapp-float {
        left: 10px;
        bottom: 10px;
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-float i {
        font-size: 25px;
    }
}

@media (max-width: 480px) {
    .whatsapp-panel {
        width: calc(100vw - 20px);
        left: 10px;
        right: 10px;
    }
}

/* Animation d'apparition */
.whatsapp-float.animate-in {
    animation: whatsapp-bounce 0.6s ease-out;
}

@keyframes whatsapp-bounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Indicateur de notification */
.whatsapp-notification {
    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;
    animation: whatsapp-notification-pulse 1s infinite;
}

@keyframes whatsapp-notification-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Style pour les heures d'ouverture */
.whatsapp-hours {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.whatsapp-hours.open {
    color: #25d366;
}

.whatsapp-hours.closed {
    color: #ff4444;
}
