/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
    margin-bottom: 1rem;
}

.back-home {
    margin-top: 1rem;
}

.back-link {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.back-link:hover {
    opacity: 1;
}

/* Form */
.payment-form {
    padding: 40px 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-group input:focus {
    outline: none;
    border-color: #1e40af;
    background: white;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-group input:invalid {
    border-color: #e74c3c;
}

/* Amount display */
.amount-display {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin: 25px 0;
}

.amount-display h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

#amount {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Buttons */
button {
    width: 100%;
    padding: 18px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#submit-btn {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    margin-top: 10px;
}

#submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
}

#submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#pay-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    margin-top: 20px;
}

#pay-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(46, 204, 113, 0.3);
}

#pay-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner.hidden {
    display: none;
}

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

/* Payment section */
.payment-section {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.payment-section h3 {
    margin-bottom: 20px;
    color: #555;
    font-size: 1.2rem;
}

.stripe-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.stripe-info p {
    color: #64748b;
    margin-bottom: 15px;
}

.stripe-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.stripe-features .feature {
    color: #1e40af;
    font-weight: 500;
    font-size: 0.9rem;
}

.stripe-message {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.stripe-info h3 {
    color: #1e40af;
    margin-bottom: 15px;
}

.stripe-instructions {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: left;
}

.stripe-instructions h4 {
    color: #1e293b;
    margin-bottom: 10px;
}

.stripe-instructions ul {
    margin: 0;
    padding-left: 20px;
}

.stripe-instructions li {
    color: #64748b;
    margin-bottom: 5px;
}

.stripe-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

/* Messages */
.success-message, .error-message {
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
}

.success-message {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.error-message {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.success-message h3, .error-message h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.success-message p, .error-message p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: #f8f9fa;
    padding: 25px 30px;
    color: #666;
    border-top: 1px solid #e9ecef;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.footer-contact {
    text-align: left;
}

.footer-legal {
    text-align: right;
}

.footer p {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-contact,
    .footer-legal {
        text-align: center;
    }
}

/* Utility classes */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 15px;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .payment-form {
        padding: 30px 20px;
    }
    
    .form-group input {
        padding: 12px 15px;
    }
    
    button {
        padding: 15px 25px;
        font-size: 1rem;
    }
    
    .payment-section {
        padding: 20px;
    }
}

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

.payment-section, .success-message, .error-message {
    animation: fadeIn 0.5s ease-out;
}

/* Focus styles pour l'accessibilité */
button:focus, input:focus {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

/* Styles pour les états de validation */
.form-group input:valid {
    border-color: #27ae60;
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}
