/* Styles pour le système de paiement CinetPay */

/* Variables CSS pour le thème vert */
:root {
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-200: #bbf7d0;
    --green-300: #86efac;
    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-800: #14532d;
    --green-900: #052e16;
}

/* Page de paiement */
.payment-section {
    background: linear-gradient(135deg, var(--green-50) 0%, #ffffff 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

.payment-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Résumé du plan */
.plan-summary .card {
    border: 2px solid rgba(34, 197, 94, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.plan-summary .card:hover {
    border-color: rgba(34, 197, 94, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.15);
}

/* Méthodes de paiement */
.payment-method-option {
    position: relative;
    margin-bottom: 1rem;
}

.payment-method-radio {
    display: none;
}

.payment-method-label {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    overflow: hidden;
}

.payment-method-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(22, 163, 74, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.payment-method-radio:checked + .payment-method-label {
    border-color: var(--green-500);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
    transform: translateY(-2px);
}

.payment-method-radio:checked + .payment-method-label::before {
    opacity: 1;
}

.payment-method-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
    border-radius: 12px;
    margin-right: 1rem;
    position: relative;
    z-index: 1;
}

.payment-method-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.payment-method-info h6 {
    margin: 0;
    color: var(--green-800);
    font-weight: 600;
}

.payment-method-info small {
    color: #64748b;
}

/* Formulaire de paiement */
.auth-form-input {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s ease;
    background: white;
}

.auth-form-input:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
    outline: none;
}

.auth-form-input.is-valid {
    border-color: var(--green-500);
    background-color: rgba(34, 197, 94, 0.05);
}

.auth-form-input.is-invalid {
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.05);
}

/* Boutons */
.btn-green-gradient {
    background: linear-gradient(135deg, var(--green-500) 0%, var(--green-600) 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-green-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-green-gradient:hover::before {
    left: 100%;
}

.btn-green-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
    color: white;
}

.btn-green-gradient:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Résumé de paiement */
.payment-summary .card {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(22, 163, 74, 0.05) 100%);
    border: 1px solid rgba(34, 197, 94, 0.1);
    border-radius: 12px;
}

/* Indicateurs de confiance */
.trust-indicators {
    margin-top: 3rem;
}

.trust-item {
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.trust-item:hover {
    transform: translateY(-5px);
}

.trust-item i {
    font-size: 2.5rem;
    color: var(--green-500);
    margin-bottom: 1rem;
}

.trust-item h6 {
    color: var(--green-800);
    font-weight: 600;
    margin: 0;
}

/* Notices de sécurité */
.security-notice {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
    border-left: 4px solid var(--green-500);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.security-notice h6 {
    color: var(--green-700);
    margin-bottom: 0.5rem;
}

.security-notice p {
    color: #64748b;
    margin: 0;
    font-size: 0.9rem;
}

/* Page de redirection CinetPay */
.redirect-container {
    max-width: 500px;
    width: 100%;
    padding: 2rem;
}

.redirect-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: none;
}

.redirect-header {
    background: linear-gradient(135deg, var(--green-500) 0%, var(--green-600) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.redirect-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--green-100);
    border-top: 4px solid var(--green-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--green-100);
    border-radius: 3px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green-500) 0%, var(--green-600) 100%);
    border-radius: 3px;
    animation: progress 3s ease-in-out;
}

@keyframes progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Page de succès */
.success-section {
    background: linear-gradient(135deg, var(--green-50) 0%, #ffffff 100%);
    min-height: 100vh;
}

.success-icon .icon-circle {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--green-500) 0%, var(--green-600) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
    animation: successPulse 2s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.step-card {
    background: white;
    border: 2px solid rgba(34, 197, 94, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.step-card:hover {
    border-color: rgba(34, 197, 94, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.1);
}

.step-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.step-icon i {
    font-size: 1.5rem;
    color: var(--green-500);
}

/* Page d'annulation */
.cancel-section {
    background: linear-gradient(135deg, var(--green-50) 0%, #ffffff 100%);
    min-height: 100vh;
}

.cancel-icon .icon-circle {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
    animation: cancelPulse 2s ease-in-out;
}

@keyframes cancelPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.reason-card {
    background: white;
    border: 2px solid rgba(34, 197, 94, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.reason-card:hover {
    border-color: rgba(34, 197, 94, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.1);
}

.reason-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.reason-icon i {
    font-size: 1.5rem;
    color: var(--green-500);
}

/* Support links */
.support-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--green-800);
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: 10px;
}

.support-link:hover {
    background: rgba(34, 197, 94, 0.1);
    color: var(--green-500);
    text-decoration: none;
}

.support-link i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Utilitaires */
.bg-green-gradient {
    background: linear-gradient(135deg, var(--green-500) 0%, var(--green-600) 100%);
}

.bg-light-green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, rgba(22, 163, 74, 0.05) 100%);
}

.text-green-primary {
    color: var(--green-500) !important;
}

.text-green-secondary {
    color: var(--green-600) !important;
}

.border-green-primary {
    border-color: var(--green-500) !important;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive */
@media (max-width: 768px) {
    .payment-container {
        padding: 0 1rem;
    }
    
    .payment-method-label {
        padding: 1rem;
    }
    
    .payment-method-icon {
        width: 50px;
        height: 50px;
        margin-right: 0.75rem;
    }
    
    .trust-item {
        padding: 1rem;
    }
    
    .trust-item i {
        font-size: 2rem;
    }
}

/* États de chargement */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-content .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--green-100);
    border-top: 4px solid var(--green-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* Messages d'erreur et de succès */
.alert-payment {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.alert-payment-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.1) 100%);
    border-left: 4px solid var(--green-500);
    color: var(--green-700);
}

.alert-payment-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-left: 4px solid #ef4444;
    color: #dc2626;
}

.alert-payment-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    border-left: 4px solid #f59e0b;
    color: #d97706;
}
