/* Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-700: #374151;
    --gray-900: #111827;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    min-height: 100vh;
    color: var(--gray-900);
    line-height: 1.6;
}

/* Navigation */
.top-nav {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-link {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--primary);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Header */
.hero-header {
    text-align: center;
    color: white;
    margin-bottom: 3rem;
}

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

.hero-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Info Section (Gauche) */
.info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.price-card,
.features-card,
.info-card,
.process-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

/* Price Card */
.price-card {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.price-badge {
    position: absolute;
    top: 1rem;
    right: -2rem;
    background: var(--success);
    color: white;
    padding: 0.5rem 3rem;
    transform: rotate(45deg);
    font-size: 0.8rem;
    font-weight: 600;
}

.price-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.price-amount {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary);
}

.price-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.price-currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

.price-period {
    font-size: 1rem;
    color: var(--gray-700);
}

.price-note {
    color: var(--gray-700);
    font-size: 0.9rem;
}

/* Features Card */
.card-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.features-list {
    list-style: none;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list i {
    color: var(--success);
    font-size: 1.2rem;
}

/* Info Card */
.info-card {
    display: flex;
    gap: 1rem;
    background: #fef3c7;
    border-left: 4px solid var(--warning);
}

.info-icon {
    font-size: 2rem;
    color: var(--warning);
}

.info-content h4 {
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.info-content p {
    color: var(--gray-700);
    font-size: 0.95rem;
}

/* Process Steps */
.process-steps {
    list-style: none;
    counter-reset: step-counter;
}

.process-steps li {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.process-steps li:last-child {
    border-bottom: none;
}

.step-number {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--gray-900);
}

.step-content p {
    font-size: 0.9rem;
    color: var(--gray-700);
}

/* Payment Section (Droite) */
.payment-card {
    background: white;
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.card-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--gray-100);
}

.card-header h2 {
    font-size: 1.8rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.card-header p {
    color: var(--gray-700);
}

/* Form Sections */
.form-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.1rem;
    color: var(--gray-900);
    margin-bottom: 1rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-700);
}

/* Card Element */
.card-element {
    padding: 0.875rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    background: white;
    transition: border-color 0.3s;
}

.card-element:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#card-errors {
    color: var(--danger);
    margin-top: 0.5rem;
    font-size: 0.875rem;
    min-height: 20px;
}

/* Terms */
.terms-section {
    margin: 2rem 0;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-label {
    font-size: 0.95rem;
    color: var(--gray-700);
}

.checkbox-label a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Pay Button */
.btn-pay {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-pay:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

.hidden {
    display: none !important;
}

/* Payment Message */
.payment-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 500;
}

.payment-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid var(--success);
}

.payment-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid var(--danger);
}

/* Security Info */
.security-info {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--gray-100);
}

.security-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--gray-700);
}

.security-item i {
    font-size: 1.5rem;
    color: var(--primary);
}

/* Accepted Cards */
.accepted-cards {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 2rem;
    color: var(--gray-700);
}

/* Support Box */
.support-box {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    margin-top: 1.5rem;
    box-shadow: var(--shadow);
}

.support-box i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.support-box p {
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.support-box a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.support-box a:hover {
    text-decoration: underline;
}

/* Footer */
.page-footer {
    text-align: center;
    color: white;
    padding: 2rem;
    margin-top: 3rem;
}

.page-footer p {
    margin: 0.25rem 0;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .info-section {
        order: 2;
    }
    
    .payment-section {
        order: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .hero-header h1 {
        font-size: 2rem;
    }
    
    .price-amount {
        font-size: 3rem;
    }
    
    .payment-card {
        padding: 1.5rem;
    }
    
    .security-info {
        flex-direction: column;
        gap: 1rem;
    }
}
