/**
 * Styles pour le système de commande d'événements
 * Popins de confirmation et états des boutons
 */

.product-quantity{
    opacity: 0;
}

/* ========================================
   POPIN STYLES
   ======================================== */

/* Overlay de la popin */
.iacf-popin-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

/* Conteneur de la popin */
.iacf-popin {
    background: #fff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
    animation: popinSlideIn 0.3s ease-out;
}

/* Bouton de fermeture */
.iacf-popin-close {
    position: absolute;
    top:5px;
    right:5px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}

.iacf-popin-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* Contenu de la popin */
.iacf-popin-content {
    padding: 30px;
    text-align: center;
}

/* Message de la popin */
.iacf-popin-message {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 25px;
    font-weight: 400;
}

/* Conteneur des boutons */
.iacf-popin-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Styles des boutons */
.iacf-popin-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    min-width: 140px;
    text-align: center;
}

/* Bouton secondaire */
.iacf-popin-button-secondary {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.iacf-popin-button-secondary:hover {
    background-color: #e9ecef;
    color: #495057;
    border-color: #adb5bd;
}

/* Bouton primaire */
.iacf-popin-button-primary {
    background-color: #007cba;
    color: #fff;
}

.iacf-popin-button-primary:hover {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

/* ========================================
   BOUTON ÉVÉNEMENTS STYLES
   ======================================== */

.buy_note{
    margin-bottom:5px;
    color:var(--main)
}
.dates{
    display:flex;
    flex-wrap:wrap;
    gap:20px
}

/* Base des boutons d'événements */
.dates button{
    border:2px solid var(--blue);
    background:transparent;
    text-align:center;
    padding:10px;
    color:var(--blue);
    font-weight:700!important;
    letter-spacing:0.1rem;
    font-family:var(--altfont);
    cursor:pointer;
    transition:background 500ms ease;
    position: relative;
    overflow: hidden;
    width:250px;
}
.dates button:hover{
    background:rgba(var(--rgbblue),0.1)
}

/* Structure interne des boutons d'événements */
.dates button span{
    font-weight:700!important;
    text-transform:uppercase;
    margin-bottom:10px;
    display:block;
    white-space:nowrap;
}
.dates button .date,
.dates button .horaires,
.dates button .type {
    display: block;
    line-height: 1.2;
}
.dates button .date {
    font-weight: 600;
    margin-bottom: 2px;
}
.dates button .horaires {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 2px;
}
.dates button .type {
    font-weight: 500;
    font-size: 0.85em;
    opacity: 0.8;
    margin-bottom:0;
}

/* États désactivés */
.dates button:disabled,
.dates button.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.dates button:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Spans d'état (commun) */
.dates button .bought,
.dates button .in-cart {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: white;
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    z-index: 10;
    border-radius: inherit;
    backdrop-filter: blur(1px);
}

/* Span "Produit déjà commandé" */
.dates button .bought {
    background: rgba(220, 53, 69, 0.7); /* Rouge semi-transparent */
}

/* Span "Produit dans le panier" */
.dates button .in-cart {
    background: rgba(40, 167, 69, 0.9); /* Vert semi-transparent */
}

/* ========================================
   QUICK INFO STYLES
   ======================================== */
.quick_infos{
    display:flex;
    flex-wrap:wrap;
    gap:20px 150px
}
.quick_infos ul{
    max-width:350px;
    list-style:none;
    margin:0;
    padding:0;
    position:relative;
    color:var(--main)
}
.quick_infos ul::before{
    content:'';
    display;block;
    width:45px;
    height:45px;
    border:2px solid var(--lagoon);
    position:absolute;
    top:0;
    left:-60px
}
.quick_infos ul.prices::before{
    background:url(https://dev.madeforyou-agency.com/iacf/wp-content/uploads/2025/08/event_prices.svg) no-repeat center center;
}
.quick_infos ul:not(.prices)::before{
    background:url(https://dev.madeforyou-agency.com/iacf/wp-content/uploads/2025/08/event_lieu.svg) no-repeat center center;
}
.quick_infos ul .title,
.quick_infos ul .ville{
    text-transform:uppercase;
    font-weight:800;
    font-family:var(--altfont);
    letter-spacing:0.1rem;
    color:var(--blue)
}
.quick_infos ul .ville{
    font-size:1.5em;
    color:var(--orange);
    text-decoration:none
}
.quick_infos li.rediff{
    margin-top:10px;
}

/* ========================================
   ANIMATIONS DE CHARGEMENT
   ======================================== */

/* Animation de chargement - seulement si pas déjà commandé ou dans le panier */
.dates button:disabled:not(.already-ordered):not(.in-cart) span {
    display: block;
    animation: pulse 1.5s infinite;
}

/* Indicateur de chargement - seulement si pas déjà commandé ou dans le panier */
.dates button:disabled:not(.already-ordered):not(.in-cart)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ========================================
   ANIMATIONS KEYFRAMES
   ======================================== */

@keyframes popinSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   SIMPLIFICATION PANIER WOOCOMMERCE
   ======================================== */

/* Masquer les champs de quantité */
.woocommerce-cart .quantity,
.woocommerce-cart .qty {
    display: none !important;
}

/* Masquer le champ code promo */
.woocommerce-cart .coupon {
    display: none !important;
}

/* Masquer le bouton "Mettre à jour le panier" */
.woocommerce-cart .actions .button[name="update_cart"] {
    display: none !important;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .iacf-popin {
        width: 95%;
        margin: 20px;
    }
    
    .iacf-popin-content {
        padding: 25px 20px;
    }
    
    .iacf-popin-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .iacf-popin-button {
        width: 100%;
        min-width: auto;
    }
    
    .iacf-popin-message {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .iacf-popin-content {
        padding: 20px 15px;
    }
    
    .iacf-popin-message {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .iacf-popin-button {
        padding: 10px 20px;
        font-size: 13px;
    }
}
