/**
 * ProgDom - Styles pour les modals de programmes
 * Modals d'upgrade et fiches détaillées
 */

/* ========================================
   MODAL D'UPGRADE (Visiteurs & Découverte)
   ======================================== */

.program-upgrade-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upgrade-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.upgrade-modal-box {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s ease-out;
}

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

.upgrade-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f5f9;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.upgrade-modal-close:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
    color: #dc2626;
}

.upgrade-modal-content {
    text-align: center;
}

.upgrade-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.upgrade-modal-content h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #1e293b;
}

.program-locked-title {
    font-size: 18px;
    color: #3b82f6;
    font-weight: 600;
    margin-bottom: 20px;
}

.upgrade-message {
    font-size: 16px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 30px;
}

.upgrade-benefits {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 15px;
    color: #475569;
}

.benefit-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.upgrade-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-upgrade-pro {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-upgrade-pro:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.btn-upgrade-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
}

.btn-upgrade-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Plans Comparison (pour Découverte) */
.plans-comparison {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.plan-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.plan-card:hover {
    border-color: #3b82f6;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
}

.plan-card.plan-pro h3 {
    color: #3b82f6;
}

.plan-card.plan-premium {
    border-color: #ec4899;
}

.plan-card.plan-premium h3 {
    color: #ec4899;
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.plan-price {
    font-size: 36px;
    font-weight: 700;
    color: #1e293b;
    margin: 15px 0;
}

.plan-price span {
    font-size: 16px;
    font-weight: 400;
    color: #64748b;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.plan-features li {
    padding: 8px 0;
    font-size: 14px;
    color: #475569;
}

.btn-select-plan {
    display: block;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.plan-premium .btn-select-plan {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.btn-select-plan:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(59, 130, 246, 0.3);
}

/* ========================================
   MODAL FICHE DÉTAILLÉE (Pro & Premium)
   ======================================== */

.program-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.detail-modal-box {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s ease-out;
}

.detail-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f5f9;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    z-index: 1;
}

.detail-modal-close:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
    color: #dc2626;
}

.program-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.program-icon-large {
    font-size: 80px;
    flex-shrink: 0;
}

.program-title-section {
    flex: 1;
}

.program-title-section h2 {
    font-size: 28px;
    margin: 0 0 5px 0;
    color: #1e293b;
}

.program-subtitle {
    font-size: 16px;
    color: #64748b;
    margin: 5px 0;
}

.program-category {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
}

.program-amount-large {
    font-size: 36px;
    font-weight: 700;
    color: #3b82f6;
    flex-shrink: 0;
}

.program-description {
    font-size: 18px;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 30px;
    text-align: center;
}

.program-detail-sections {
    display: grid;
    gap: 25px;
    margin-bottom: 30px;
}

.detail-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
}

.detail-section h3 {
    font-size: 20px;
    margin: 0 0 15px 0;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.detail-section li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    border-bottom: 1px solid #e2e8f0;
}

.detail-section li:last-child {
    border-bottom: none;
}

.detail-section li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: 700;
    font-size: 18px;
}

.program-detail-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn-choose-program {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-choose-program:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.btn-close-detail {
    background: white;
    color: #64748b;
    border: 2px solid #e2e8f0;
    padding: 16px 40px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-detail:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

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

@media (max-width: 768px) {
    .upgrade-modal-box,
    .detail-modal-box {
        padding: 30px 20px;
        max-height: 95vh;
    }
    
    .plans-comparison {
        grid-template-columns: 1fr;
    }
    
    .program-detail-header {
        flex-direction: column;
        text-align: center;
    }
    
    .program-icon-large {
        font-size: 60px;
    }
    
    .program-title-section h2 {
        font-size: 24px;
    }
    
    .program-amount-large {
        font-size: 28px;
    }
    
    .program-detail-actions {
        flex-direction: column;
    }
    
    .btn-choose-program,
    .btn-close-detail {
        width: 100%;
    }
}

/* Scrollbar personnalisée pour les modals */
.upgrade-modal-box::-webkit-scrollbar,
.detail-modal-box::-webkit-scrollbar {
    width: 8px;
}

.upgrade-modal-box::-webkit-scrollbar-track,
.detail-modal-box::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.upgrade-modal-box::-webkit-scrollbar-thumb,
.detail-modal-box::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.upgrade-modal-box::-webkit-scrollbar-thumb:hover,
.detail-modal-box::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
