/* Progress Bar */
.progress-container {
    background: var(--gray-100);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 0.5rem;
}

.step {
    text-align: center;
    flex: 1;
    position: relative;
    z-index: 2;
}

.step.active .step-number {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.step.completed .step-number {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    transition: all 0.3s ease;
}

.progress-bar {
    height: 4px;
    background: var(--gray-300);
    border-radius: 2px;
    position: relative;
    margin: 0 20px;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    width: 0%;
    transition: width 0.5s ease;
}

/* Inscription Steps */
.inscription-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.inscription-step.active {
    display: block;
}

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

.step-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.step-header h2 {
    color: var(--primary-color);
}

/* Formation Selection */
.formation-selection {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--border-radius);
}

.formation-item {
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.formation-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.formation-item.selected {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.05);
}

.formation-info h5 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.formation-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.formation-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
    white-space: nowrap;
}

.add-to-cart {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-to-cart .btn {
    padding: 0.25rem 1rem;
    font-size: 0.9rem;
}

/* Cart Summary */
.cart-summary {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.cart-items {
    margin-bottom: 1.5rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item .btn-remove {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.cart-total {
    padding-top: 1rem;
    border-top: 2px solid var(--gray-300);
    font-size: 1.25rem;
}

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

/* Payment Methods */
.payment-methods {
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.payment-option {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.payment-option:hover {
    background: var(--gray-100);
}

.payment-option.active {
    background: rgba(var(--primary-color-rgb), 0.05);
    border-left: 4px solid var(--primary-color);
}

.payment-option:last-child {
    border-bottom: none;
}

.payment-option .form-check-input {
    margin-top: 0.3rem;
}

.payment-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.payment-info {
    flex: 1;
}

.payment-info h6 {
    margin-bottom: 0.25rem;
}

/* Billing Info */
.billing-info {
    background: var(--gray-100);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

/* Order Summary */
.order-summary {
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.summary-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.summary-item.total {
    border-top: 2px solid var(--gray-300);
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.25rem;
}

/* Confirmation */
.success-icon {
    font-size: 5rem;
    color: var(--success-color);
    margin-bottom: 1.5rem;
}

.confirmation-details {
    max-width: 800px;
    margin: 0 auto;
}

.confirmation-card {
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.steps-list {
    list-style: none;
    padding: 0;
    counter-reset: step-counter;
}

.steps-list li {
    counter-increment: step-counter;
    margin-bottom: 2rem;
    padding-left: 3rem;
    position: relative;
}

.steps-list li:before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.steps-list li strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

/* Step Actions */
.step-actions {
    display: flex;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 2px solid var(--gray-200);
}

/* Inscription Footer */
.inscription-footer {
    border-top: 1px solid var(--gray-300);
    margin-top: 3rem;
}

/* Form Validation */
.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: var(--danger-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: var(--success-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Responsive */
@media (max-width: 768px) {
    .progress-steps {
        flex-wrap: wrap;
    }
    
    .step {
        flex: 0 0 50%;
        margin-bottom: 1rem;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .step-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step-actions .btn {
        width: 100%;
    }
    
    .formation-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .add-to-cart {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 576px) {
    .step {
        flex: 0 0 100%;
    }
    
    .payment-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .success-icon {
        font-size: 3rem;
    }
}