/* ============================================
   FORMULAIRE FORMATION MODERNE - STYLES ISOLÉS
   ============================================ */

/* Reset pour éviter les conflits avec l'ancien formulaire */
.formation-booking-modern,
.formation-booking-modern * {
    box-sizing: border-box;
}

.formation-booking-modern {
    padding: clamp(3rem, 6vw, 5rem) 0 !important;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%) !important;
    min-height: 100vh;
}

.formation-booking-header {
    text-align: center;
    margin-bottom: 3rem;
}

.formation-booking-badge {
    display: inline-block;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.formation-booking-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.formation-booking-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 400;
}

.formation-booking-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2.5rem;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

/* Sidebar */
.formation-booking-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.formation-recap-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.formation-recap-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.formation-recap-icon {
    font-size: 1.25rem;
}

.formation-recap-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: white;
}

.formation-recap-content {
    padding: 1.5rem;
}

.formation-recap-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.formation-recap-item:last-of-type {
    border-bottom: none;
}

.recap-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.recap-value {
    font-size: 0.95rem;
    color: #1e293b;
    font-weight: 600;
    text-align: right;
    max-width: 60%;
}

.recap-dates {
    font-size: 0.85rem;
    line-height: 1.5;
}

.formation-recap-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    margin: 1rem 0;
}

.formation-recap-total {
    background: #f8fafc;
    margin: 0 -1.5rem;
    padding: 1rem 1.5rem !important;
    border-bottom: none !important;
}

.formation-recap-total .recap-label {
    font-weight: 600;
    color: #1e293b;
}

.recap-price {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #8b5cf6 !important;
}

.formation-recap-note {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
    margin: 1rem 0 0 0;
    padding: 0.75rem;
    background: #fef3c7;
    border-radius: 8px;
}

.formation-contact-card {
    background: white;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.formation-contact-card h4 {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 1rem 0;
    font-weight: 500;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #1e293b;
    text-decoration: none;
    padding: 0.625rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.contact-link:hover {
    color: #8b5cf6;
}

.contact-icon {
    font-size: 1rem;
}

/* Formulaire principal */
.formation-booking-main {
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.formation-form-modern {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    padding-bottom: 2rem;
    border-bottom: 1px solid #f1f5f9;
}

.form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-section-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.form-section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.formation-form-modern .form-field input,
.formation-form-modern .form-field textarea,
.formation-form-modern .form-field select {
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease;
    font-family: inherit;
    width: 100%;
}

.formation-form-modern .form-field input:focus,
.formation-form-modern .form-field textarea:focus,
.formation-form-modern .form-field select:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.formation-form-modern .form-field input::placeholder,
.formation-form-modern .form-field textarea::placeholder {
    color: #9ca3af;
}

.formation-form-modern .form-field textarea {
    resize: vertical;
    min-height: 100px;
}

.form-field .readonly-field {
    background: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

.field-hint {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Section paiement */
.form-section-payment {
    background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
    margin: 0 -2.5rem;
    padding: 2rem 2.5rem !important;
    border-radius: 0 0 24px 24px;
    border-bottom: none !important;
}

.payment-info-box {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 2px solid #e9d5ff;
}

.payment-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.payment-label {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.payment-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #8b5cf6;
}

.payment-note {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.stripe-element-modern {
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    transition: all 0.2s ease;
}

.stripe-element-modern:focus-within {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.stripe-errors {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Actions */
.formation-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-formation-secondary {
    padding: 0.875rem 1.5rem;
    background: transparent;
    color: #64748b;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-formation-secondary:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #374151;
}

.btn-formation-primary {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-formation-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-formation-primary:active {
    transform: translateY(0);
}

.btn-formation-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.loader-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-security-note {
    text-align: center;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 1rem;
}

/* Confirmation moderne */
.formation-confirmation-modern {
    text-align: center;
    padding: 3rem 2rem;
}

.confirmation-icon-modern {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.confirmation-title-modern {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.confirmation-text-modern {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 2rem;
}

.confirmation-details-modern {
    background: #f8fafc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.confirmation-note-modern {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 900px) {
    .formation-booking-layout {
        grid-template-columns: 1fr;
    }
    
    .formation-booking-sidebar {
        position: static;
        order: -1;
    }
    
    .formation-recap-card {
        margin-bottom: 0;
    }
}

@media (max-width: 640px) {
    .formation-booking-modern {
        padding: 2rem 0 !important;
    }
    
    .formation-booking-main {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-section-payment {
        margin: 0 -1.5rem;
        padding: 1.5rem !important;
    }
    
    .formation-form-actions {
        flex-direction: column;
    }
    
    .btn-formation-secondary,
    .btn-formation-primary {
        width: 100%;
    }
    
    .btn-formation-secondary {
        order: 2;
    }
}
