/**
 * Styles pour la fonctionnalité de Panachage
 * Domaine de la Verde
 */

/* ===========================
   Popup d'alerte
   =========================== */

.laverde-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.laverde-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.laverde-popup-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.laverde-popup-overlay.active .laverde-popup-content {
    transform: scale(1);
}

.laverde-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    padding: 8px;
}

.laverde-popup-close svg {
    width: 100%;
    height: 100%;
    display: block;
}

.laverde-popup-close:hover {
    background: #f5f5f5;
    color: #333;
    transform: rotate(90deg);
}

.laverde-popup-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.laverde-popup-content h2 {
    font-size: 2em;
    color: #bb9c35;
    margin: 0 0 20px 0;
    font-weight: 700;
}

.popup-message {
    font-size: 1.1em;
    color: #333;
    margin: 15px 0;
    line-height: 1.6;
}

.popup-message strong {
    color: #bb9c35;
    font-weight: 700;
}

.popup-message-error {
    font-size: 1.2em;
    color: #f57c00;
    margin: 20px 0;
    padding: 15px;
    background: #fff3e0;
    border-radius: 8px;
    font-weight: 600;
    border-left: 4px solid #f57c00;
}

.popup-message-error strong {
    color: #e65100;
    font-size: 1.2em;
}

.popup-info {
    font-size: 0.95em;
    color: #666;
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    line-height: 1.6;
}

.popup-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.laverde-button-gold {
    background-color: #bb9c35 !important;
    color: #fff !important;
    padding: 15px 30px !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    border: 2px solid #bb9c35 !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    text-transform: uppercase;
    display: inline-block;
    min-width: 200px;
}

.laverde-button-gold:hover {
    background-color: #a08830 !important;
    border-color: #a08830 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(187, 156, 53, 0.4);
}

.laverde-button-secondary {
    background-color: transparent !important;
    color: #666 !important;
    padding: 15px 30px !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    border: 2px solid #e5e5e5 !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase;
    min-width: 200px;
}

.laverde-button-secondary:hover {
    background-color: #f5f5f5 !important;
    border-color: #d0d0d0 !important;
    color: #333 !important;
}

/* ===========================
   Désactivation visuelle du bouton checkout
   =========================== */

.checkout-button.panachage-disabled,
.wc-proceed-to-checkout .button.panachage-disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    position: relative;
    /* Ne PAS utiliser pointer-events: none pour que jQuery puisse intercepter le clic */
}

.checkout-button.panachage-disabled::after,
.wc-proceed-to-checkout .button.panachage-disabled::after {
    content: '🔒 Panier incomplet';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.8em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.checkout-button.panachage-disabled:hover::after,
.wc-proceed-to-checkout .button.panachage-disabled:hover::after {
    opacity: 1;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
    .laverde-popup-content {
        padding: 30px 20px;
        width: 95%;
    }
    
    .laverde-popup-content h2 {
        font-size: 1.5em;
    }
    
    .laverde-popup-icon {
        font-size: 3em;
    }
    
    .popup-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .laverde-button-gold,
    .laverde-button-secondary {
        width: 100%;
        min-width: auto;
    }
    
    .laverde-popup-close {
        width: 30px;
        height: 30px;
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .popup-message {
        font-size: 1em;
    }
    
    .popup-message-error {
        font-size: 1.1em;
    }
}

/* ===========================
   Améliorations WooCommerce
   =========================== */

.woocommerce-error.panachage-error {
    background: #fff3e0;
    border-left-color: #f57c00;
    color: #f57c00;
    font-weight: 600;
}

.woocommerce-error.panachage-error::before {
    content: '⚠️ ';
}

