/**
 * Styles pour les fonctionnalités premium
 */

/* Styles des cartes d'options premium */
.premium-option-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.premium-option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.premium-option-card.recommended {
    border: 2px solid #ffc107;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.premium-option-card .card-header {
    background-color: #f8f9fa;
    font-weight: bold;
    padding: 15px;
}

.price-tag {
    margin-bottom: 20px;
}

.price-tag .price {
    font-size: 2.5rem;
    font-weight: bold;
    color: #4a4a4a;
}

.price-tag .period {
    font-size: 1rem;
    color: #6c757d;
}

.price-tag .saving {
    color: #dc3545;
    font-weight: bold;
    margin-top: 5px;
}

.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.feature-list li i {
    margin-right: 10px;
    min-width: 20px;
}

/* Styles des cartes de crédits */
.credits-option-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.credits-option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.credits-option-card.recommended {
    border: 2px solid #ffc107;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Styles pour les avantages premium */
.premium-feature-item {
    padding: 15px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.premium-feature-item:hover {
    background-color: #f8f9fa;
}

.premium-feature-item h4 {
    color: #343a40;
}

.premium-feature-item p {
    color: #6c757d;
    margin-bottom: 0;
}

/* Badge premium */
.badge-premium {
    background-color: #ffc107;
    color: #212529;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 20px;
}

/* Style pour la FAQ */
#faqAccordion .btn-link {
    text-decoration: none;
    color: #343a40;
    font-weight: 500;
}

#faqAccordion .btn-link:hover,
#faqAccordion .btn-link:focus {
    text-decoration: none;
    color: #007bff;
}

#faqAccordion .card {
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
}

#faqAccordion .card-header {
    background-color: #f8f9fa;
    padding: 10px 15px;
}

/* Responsive design */
@media (max-width: 768px) {
    .premium-option-card, 
    .credits-option-card {
        margin-bottom: 30px;
    }
    
    .price-tag .price {
        font-size: 2rem;
    }
    
    .feature-list li {
        font-size: 0.9rem;
    }
}

/* Tableau de bord premium */
#premium-dashboard i.fa-crown {
    color: #ffc107;
}

#premium-dashboard i.fa-bolt {
    color: #007bff;
}

#premium-dashboard i.fa-coins {
    color: #ffc107;
}

#subscription-status.text-success {
    color: #28a745 !important;
}

/* Styles pour la modal */
#payment-success-modal .modal-header {
    background-color: #28a745;
    color: white;
}

#payment-success-modal .modal-body {
    padding: 20px;
}

#payment-success-modal .alert-success {
    background-color: #f8f9fa;
    border-color: #28a745;
    color: #212529;
}

#payment-success-modal h4 {
    color: #28a745;
}

/* Animation lors de l'achat */
@keyframes pulseSuccess {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse-success {
    animation: pulseSuccess 0.5s ease-in-out;
}

/* Styles pour la boîte de dialogue de sélection de méthode de paiement */
.payment-choice-dialog {
    max-width: 500px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.payment-choice-dialog h3 {
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
    color: #333;
}

.payment-options {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.payment-option {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 10px;
}

.payment-option:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.payment-option.selected {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.05);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.payment-option img {
    height: 40px;
    margin-bottom: 10px;
    object-fit: contain;
}

.payment-option span {
    display: block;
    font-weight: 600;
    color: #333;
}

.payment-cards {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.payment-cards img {
    height: 30px;
    margin: 0 5px;
    border-radius: 4px;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

/* Styles pour l'intégration PayPal */
.premium-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

.premium-header {
    text-align: center;
    margin-bottom: 30px;
}

.premium-header h2 {
    color: #343a40;
    font-weight: bold;
    margin-bottom: 10px;
}

.premium-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

.premium-status-card {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.premium-section-title {
    text-align: center;
    margin: 40px 0 20px;
}

.premium-section-title h3 {
    font-weight: bold;
    color: #343a40;
    margin-bottom: 10px;
}

.premium-section-title p {
    color: #6c757d;
}

/* Plans d'abonnement */
.subscription-plans-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.premium-plan-card {
    flex: 0 0 calc(33.333% - 20px);
    max-width: 350px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
}

.premium-plan-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.plan-header {
    background-color: #f8f9fa;
    padding: 20px;
    text-align: center;
    position: relative;
}

.plan-header h3 {
    font-weight: bold;
    color: #343a40;
    margin: 0;
}

.recommended-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #ffc107;
    color: #212529;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 20px;
}

.plan-price {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.plan-price .price {
    font-size: 2.5rem;
    font-weight: bold;
    color: #343a40;
}

.plan-price .cycle {
    font-size: 1rem;
    color: #6c757d;
}

.plan-description {
    padding: 20px;
    text-align: center;
    color: #6c757d;
}

.plan-features {
    padding: 0 20px 20px;
}

.plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-features li {
    padding: 8px 0;
    position: relative;
    padding-left: 25px;
    color: #6c757d;
}

.plan-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Options de crédit */
.credit-options-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.credit-option-card {
    flex: 0 0 calc(33.333% - 20px);
    max-width: 350px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
}

.credit-option-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.credit-header {
    background-color: #f8f9fa;
    padding: 20px;
    text-align: center;
}

.credit-header h3 {
    font-weight: bold;
    color: #343a40;
    margin: 0;
}

.credit-price {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.credit-price .price {
    font-size: 2.5rem;
    font-weight: bold;
    color: #343a40;
}

.credit-description {
    padding: 20px;
    text-align: center;
    color: #6c757d;
}

/* Boutons de paiement */
.payment-methods {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-method {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.payment-method img {
    height: 20px;
}

.stripe-btn {
    background-color: #6772e5;
    color: white;
}

.stripe-btn:hover {
    background-color: #5469d4;
    transform: translateY(-2px);
}

.paypal-btn {
    background-color: #0070ba;
    color: white;
}

.paypal-btn:hover {
    background-color: #005ea6;
    transform: translateY(-2px);
}

/* Loading spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.loading-spinner::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    max-width: 350px;
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification.success {
    border-left: 4px solid #28a745;
}

.notification.error {
    border-left: 4px solid #dc3545;
}

.notification.info {
    border-left: 4px solid #17a2b8;
}

.notification-message {
    margin-right: 10px;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #6c757d;
}

/* Responsive design pour les nouvelles sections */
@media (max-width: 992px) {
    .premium-plan-card,
    .credit-option-card {
        flex: 0 0 calc(50% - 20px);
    }
}

@media (max-width: 768px) {
    .premium-plan-card,
    .credit-option-card {
        flex: 0 0 100%;
        max-width: 400px;
    }
    
    .payment-methods {
        flex-direction: column;
    }
}
