/* Styles pour les icônes WhatsApp flottantes */
.whatsapp-buttons-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: transparent;
    border-radius: 50%;
    text-decoration: none !important;
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
}

/* Image WhatsApp */
.whatsapp-button img {
    width: 60px;
    height: 60px;
    display: block;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 12px rgba(37, 211, 102, 0.4));
}

/* Label au survol */
.whatsapp-button::after {
    content: attr(data-label);
    position: absolute;
    right: 70px;
    background: #333;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.whatsapp-button:hover::after {
    opacity: 1;
}

.whatsapp-button:hover img {
    transform: scale(1.15);
    filter: drop-shadow(0 6px 20px rgba(37, 211, 102, 0.6));
}

.whatsapp-button:active img {
    transform: scale(0.95);
}

/* Badge de numérotation pour différencier les boutons */
.whatsapp-button .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Style vertical (par défaut) */
.whatsapp-style-vertical {
    flex-direction: column;
}

/* Style horizontal */
.whatsapp-style-horizontal {
    flex-direction: row;
    gap: 15px;
}

/* Animation de pulsation */
@keyframes pulse {
    0%, 100% {
        filter: drop-shadow(0 4px 12px rgba(37, 211, 102, 0.4));
    }
    50% {
        filter: drop-shadow(0 4px 20px rgba(37, 211, 102, 0.8));
    }
}

.whatsapp-button img {
    animation: pulse 2s infinite;
}

.whatsapp-button:hover img {
    animation: none;
}

/* Animation de rebond au chargement */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.whatsapp-button {
    animation: bounceIn 0.6s ease-out;
}

.whatsapp-button:nth-child(2) {
    animation-delay: 0.1s;
}

/* Responsive */
@media (max-width: 768px) {
    .whatsapp-buttons-container {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-button {
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-button img {
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-button::after {
        font-size: 12px;
        padding: 6px 12px;
        right: 65px;
    }
    
    .whatsapp-button .badge {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .whatsapp-buttons-container {
        bottom: 10px;
        right: 10px;
    }
    
    .whatsapp-button {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-button img {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-button::after {
        display: none; /* Masquer les labels sur très petits écrans */
    }
}

/* Styles pour le gestionnaire frontend */
.whatsapp-manager-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 20px;
}

.whatsapp-manager-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
}

.whatsapp-manager-card h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 3px solid #25D366;
    padding-bottom: 10px;
}

.whatsapp-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.whatsapp-section h3 {
    margin-top: 0;
    color: #25D366;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: #25D366;
}

.form-group small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.btn-save {
    background: #25D366;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-save:hover {
    background: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

.btn-save:active {
    transform: translateY(0);
}

.btn-save:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.whatsapp-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.whatsapp-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.whatsapp-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.whatsapp-preview {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.whatsapp-preview h3 {
    color: #333;
    margin-bottom: 20px;
}

/* Animation de chargement */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-save.loading::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Responsive pour le gestionnaire */
@media (max-width: 768px) {
    .whatsapp-manager-card {
        padding: 20px;
    }
    
    .whatsapp-section {
        padding: 15px;
    }
    
    .btn-save {
        width: 100%;
        padding: 15px 20px;
    }
}