/* ============================================
   Credits Page - Achat de crédits
   ============================================ */

.credits-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* En-tête avec solde */
.credits-header {
    margin-bottom: 2rem;
}

.current-balance {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(17, 159, 184, 0.3);
}

.balance-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.balance-info {
    display: flex;
    flex-direction: column;
}

.balance-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.balance-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Introduction */
.credits-intro {
    text-align: center;
    margin-bottom: 2.5rem;
}

.credits-intro h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.credits-intro p {
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Grille des packs */
.packs-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.pack-card {
    position: relative;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.pack-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.pack-card.pack-popular {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(17, 159, 184, 0.05) 0%, var(--card-bg) 100%);
    transform: scale(1.02);
}

.pack-card.pack-popular:hover {
    transform: scale(1.02) translateY(-4px);
}

/* Badges */
.pack-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.pack-savings {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--success);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Contenu du pack */
.pack-credits {
    margin: 1rem 0;
}

.credits-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.credits-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pack-price {
    margin: 1rem 0 0.5rem;
}

.price-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
}

.pack-details {
    margin-bottom: 1rem;
}

.price-per-credit {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Bouton d'achat */
.btn-buy {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    background: var(--text-color);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-buy:hover {
    background: var(--primary);
    transform: scale(1.02);
}

.btn-buy-popular {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.btn-buy-popular:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

/* Section paiement sécurisé */
.payment-security {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.security-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #635BFF 0%, #7A73FF 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
}

.security-info {
    display: flex;
    flex-direction: column;
}

.security-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
}

.security-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.payment-methods {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 2rem;
    color: var(--text-muted);
}

.payment-methods i {
    transition: color 0.2s ease;
}

.payment-methods i:hover {
    color: var(--primary);
}

/* FAQ */
.credits-faq {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.credits-faq h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.25rem;
}

.faq-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.faq-question {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.faq-answer {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-left: 1.5rem;
}

/* Dark mode */
[data-bs-theme="dark"] .pack-card {
    border-color: #373b3e;
}

[data-bs-theme="dark"] .pack-card.pack-popular {
    background: linear-gradient(180deg, rgba(17, 159, 184, 0.1) 0%, var(--card-bg) 100%);
}

[data-bs-theme="dark"] .btn-buy {
    background: #f8f9fa;
    color: #212529;
}

[data-bs-theme="dark"] .btn-buy:hover {
    background: var(--primary);
    color: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .packs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .packs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pack-card.pack-popular {
        transform: none;
    }
    
    .pack-card.pack-popular:hover {
        transform: translateY(-4px);
    }
    
    .pack-badge {
        display: none;
    }
    
    .credits-number {
        font-size: 2rem;
    }
    
    .price-value {
        font-size: 1.5rem;
    }
    
    .security-badge {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .packs-grid {
        grid-template-columns: 1fr;
    }
    
    .pack-card {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1rem;
        gap: 1rem;
    }
    
    .pack-badge {
        position: static;
        transform: none;
        order: -1;
        margin-right: auto;
    }
    
    .pack-savings {
        position: static;
        order: 1;
    }
    
    .pack-credits {
        margin: 0;
        display: flex;
        align-items: baseline;
        gap: 0.25rem;
    }
    
    .credits-number {
        font-size: 1.5rem;
    }
    
    .pack-price {
        margin: 0;
    }
    
    .price-value {
        font-size: 1.25rem;
    }
    
    .pack-details {
        display: none;
    }
    
    .btn-buy {
        width: auto;
        padding: 0.5rem 1rem;
    }
}
