/**
 * WHATSAPP-MODAL.CSS
 * Styles pour le modal WhatsApp QR Code
 * Volant d'Oc Vauréen
 */

/* ==================== MODAL CONTAINER ==================== */
.whatsapp-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.whatsapp-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-in-out;
}

/* Overlay semi-transparent */
.whatsapp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

/* ==================== MODAL CONTENT ==================== */
.whatsapp-modal-content {
    position: relative;
    z-index: 10;
    background-color: var(--color-dark-card);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 500px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

/* Bouton fermer */
.whatsapp-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--color-text-secondary);
}

.whatsapp-modal-close:hover {
    background-color: var(--color-orange);
    color: var(--color-black);
    transform: rotate(90deg);
}

/* ==================== MODAL HEADER ==================== */
.whatsapp-modal-header {
    padding: 2rem 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.whatsapp-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #25D366, #128C7E);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: pulse 2s infinite;
}

.whatsapp-icon i {
    width: 2rem;
    height: 2rem;
}

.whatsapp-modal-title {
    font-size: 1.75rem;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.whatsapp-modal-description {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* ==================== MODAL BODY ==================== */
.whatsapp-modal-body {
    padding: 2rem;
}

/* QR Code container */
.qrcode-link {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
    transition: all var(--transition-base);
    cursor: pointer;
}

.qrcode-link:hover {
    border-color: var(--color-orange);
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(255, 102, 0, 0.3);
}

.qrcode-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay au survol */
.qrcode-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.95), rgba(255, 187, 34, 0.95));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity var(--transition-base);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
}

.qrcode-link:hover .qrcode-overlay {
    opacity: 1;
}

.qrcode-overlay i {
    width: 3rem;
    height: 3rem;
    animation: bounce 1s infinite;
}

/* Informations sous le QR code */
.whatsapp-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.info-item i {
    color: var(--color-orange);
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

/* ==================== MODAL FOOTER ==================== */
.whatsapp-modal-footer {
    padding: 1.5rem 2rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.whatsapp-modal-footer p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-style: italic;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 640px) {
    .whatsapp-modal-content {
        max-width: 95%;
    }
    
    .whatsapp-modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .whatsapp-modal-title {
        font-size: 1.4rem;
    }
    
    .whatsapp-modal-description {
        font-size: 0.875rem;
    }
    
    .whatsapp-modal-body {
        padding: 1.5rem;
    }
    
    .whatsapp-icon {
        width: 3rem;
        height: 3rem;
    }
    
    .whatsapp-icon i {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .info-item {
        font-size: 0.85rem;
    }
}

/* ==================== BOUTON WHATSAPP DANS FOOTER ==================== */
/* Style spécifique pour le bouton WhatsApp */
.social-link[aria-label="WhatsApp"] {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
}

.social-link[aria-label="WhatsApp"]:hover {
    background: linear-gradient(135deg, #128C7E, #075E54);
    transform: scale(1.15);
}

/* Le bouton WhatsApp est un <button>, pas un <a> */
.social-link[type="button"] {
    cursor: pointer;
    border: none;
    outline: none;
}