/*
 * CAMP DE RENTRÉE - PRICING SECTION
 * Styles pour les 3 cartes de pricing avec Early Bird et badges
 */

/* === CONTAINER PRINCIPAL === */
/* Étend la largeur du container Participation pour permettre 3 cartes alignées */
#Section-Participation .prerequis-container {
    max-width: 1200px;
}
.prerequis-section .pricing-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0;
}

/* === CARTES DE BASE === */
.prerequis-section .pricing-card {
    width: auto;
    min-width: 0;
    max-width: none;
    position: relative;
    overflow: hidden; /* nécessaire pour le ruban diagonal */
    display: flex;
    flex-direction: column;
}

/* Card featured légèrement mise en avant */
.prerequis-section .pricing-card.featured {
    transform: none; /* ne pas décaler verticalement pour aligner les 3 cartes */
    box-shadow: 0 8px 32px rgba(144, 98, 240, 0.15);
}

/* === BADGES === */

/* Badge Early Bird - style moderne */
/* Ruban Early Bird — diagonale en haut à gauche (miroir du ruban violet) */
.prerequis-section .pricing-card-badge.early-bird {
    position: absolute;
    top: 8px;
    left: -49px;         /* symétrique du ruban violet (qui est à right:-45px) */
    right: auto;
    background: #ff6b6b;
    color: #fff;
    padding: 0.4rem 3rem;
    font-size: 0.8rem;
    font-weight: 600;
    transform: rotate(-45deg);
    transform-origin: center;
    width: 170px;
    text-align: center;
    z-index: 20;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Badge Recommandé - garde le style diagonal original */
.prerequis-section .pricing-card.featured .pricing-card-badge:not(.early-bird) {
    /* Ce badge utilise déjà les styles de pricing-card-fix.css */
    /* On s'assure juste qu'il n'interfère pas avec early-bird */
    z-index: 10;
}

/* === PRIX BARRÉS === */
.prerequis-section .price-strike {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9em;
    margin-right: 8px;
}

/* === BOUTONS DÉSACTIVÉS === */
.prerequis-section .button.disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.7;
}

.prerequis-section .button.disabled:hover {
    background-color: #ccc;
    transform: none;
}

/* === RESPONSIVE === */

/* Tablette et plus petit */
@media (max-width: 1024px) {
    .prerequis-section .pricing-cards {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .prerequis-section .pricing-card {
        width: 100%;
        min-width: 0;
        max-width: none;
    }
    
    /* Supprime le décalage de la featured card sur mobile */
    .prerequis-section .pricing-card.featured {
        transform: none;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .prerequis-section .pricing-cards {
        gap: 1.5rem;
    }
    
    .prerequis-section .pricing-card {
        min-width: 280px;
        max-width: 350px;
    }
    
    .prerequis-section .pricing-card-badge.early-bird {
        top: 10px;
        left: -50px;
        width: 160px;
        padding: 0.3rem 2.5rem;
        font-size: 0.75rem;
    }
}

/* Très petit mobile */
@media (max-width: 480px) {
    .prerequis-section .pricing-cards {
        padding: 0.5rem;
    }
    
    .prerequis-section .pricing-card {
        min-width: 260px;
    }
}
/* Aligner le bouton en bas de la carte et homogénéiser la hauteur */
.prerequis-section .pricing-card-cta {
    margin-top: auto;
}
/* Normalise widths/heights across the 3 cards */
.prerequis-section .pricing-card {
    box-sizing: border-box; /* borders don’t change final size */
}

/* Give non-featured cards a transparent 2px border so all three have same outer size as the featured one */
.prerequis-section .pricing-card:not(.featured) {
    border: 2px solid transparent;
}

/* Ribbon alignment (purple diagonal) — scope to this section and override global values */
/* Alignement du ruban diagonal "RECOMMANDÉ" sur la carte featured */
.prerequis-section .pricing-card.featured .pricing-card-badge:not(.early-bird) {
    top: 22px;
    right: -38px;
    width: 160px;
    padding: 0.4rem 2rem;
    z-index: 20;
}
/* Harmonisation visuelle de la hauteur du header des cartes (évite qu'une carte paraisse plus grande) */
@media (min-width: 1025px) {
  .prerequis-section .pricing-card-header {
    min-height: 150px;
  }
}

/* S'assure que le ruban passe au dessus de tout */
.prerequis-section .pricing-card .pricing-card-badge {
  z-index: 30;
}
/* Anchor scroll offset so pricing section isn't hidden under sticky header */
#Section-Participation { scroll-margin-top: 120px; }

/* === LOADERS ET ÉTATS DE CHARGEMENT === */

/* Animation de chargement pour les textes de pricing */
.pricing-loading {
    position: relative;
    color: transparent !important;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: pricing-shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes pricing-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Animation spécifique pour les badges Early Bird */
.pricing-card-badge.early-bird.pricing-loading {
    background: linear-gradient(90deg, #ffb3b3 25%, #ff9999 50%, #ffb3b3 75%);
    background-size: 200% 100%;
    animation: pricing-shimmer 1.5s infinite;
}

/* Animation pour les prix */
.pricing-price.pricing-loading {
    background: linear-gradient(90deg, #f8f9fa 25%, #e9ecef 50%, #f8f9fa 75%);
    background-size: 200% 100%;
    animation: pricing-shimmer 1.5s infinite;
    display: inline-block;
    min-width: 80px;
    min-height: 1.2em;
}

/* Animation pour les textes de header de section */
.pricing-header p.pricing-loading {
    background: linear-gradient(90deg, #f8f9fa 25%, #e9ecef 50%, #f8f9fa 75%);
    background-size: 200% 100%;
    animation: pricing-shimmer 1.5s infinite;
    min-height: 1.5em;
    border-radius: 4px;
}

/* États d'erreur discrets */
.pricing-error-indicator {
    position: fixed !important;
    top: 10px !important;
    right: 10px !important;
    background: #fff3cd !important;
    color: #856404 !important;
    border: 1px solid #ffeaa7 !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    z-index: 9999 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    opacity: 0.95 !important;
    animation: pricing-error-slide-in 0.3s ease-out !important;
}

@keyframes pricing-error-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 0.95;
    }
}

/* Loader pour la section hero */
.early-bird-hero-text.pricing-loading,
.early-bird-hero-badge.pricing-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: pricing-shimmer 1.5s infinite;
    color: transparent !important;
    border-radius: 4px;
    display: inline-block;
    min-width: 120px;
    min-height: 1.2em;
}

/* Transition douce quand les données arrivent */
.pricing-loading {
    transition: all 0.3s ease-out;
}

/* Assurer que les loaders ne cassent pas la mise en page */
.pricing-card-badge.early-bird.pricing-loading {
    min-width: 140px;
    text-align: center;
}

/* Responsive pour les loaders */
@media (max-width: 768px) {
    .pricing-error-indicator {
        top: 5px !important;
        right: 5px !important;
        font-size: 11px !important;
        padding: 6px 10px !important;
    }
    
    .early-bird-hero-text.pricing-loading {
        min-width: 100px;
    }
}