/* =====================================================
   Inscription Multi-étapes
   ===================================================== */

/* Progress Bar */
.inscription-progress {
    margin-bottom: 40px;
    padding: 0 20px;
}

.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--smoke-color, #E4E4E5);
    color: var(--body-color, #5C5F71);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.progress-step.active .step-number,
.progress-step.completed .step-number {
    background: var(--title-color, #1C2359);
    color: #fff;
    border-color: var(--title-color, #1C2359);
}

.progress-step.completed .step-number {
    background: var(--success-color, #28a745);
    border-color: var(--success-color, #28a745);
}

.step-label {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--body-color, #5C5F71);
    white-space: nowrap;
    text-align: center; 
    line-height: normal;
}

.progress-step.active .step-label {
    color: var(--title-color, #1C2359);
    font-weight: 600;
}

.progress-step.completed .step-label {
    color: var(--success-color, #28a745);
}

.progress-line {
    flex: 1;
    height: 3px;
    background: var(--smoke-color, #E4E4E5);
    margin: 0 8px;
    margin-bottom: 28px;
    transition: background 0.3s ease;
}

.progress-line.active {
    background: var(--title-color, #1C2359);
}

/* Section */
.inscription-section {
    background: var(--smoke-color2, #F2F3FC);
}

/* Step Titles */
.step-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--title-color, #1C2359);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--smoke-color, #E4E4E5);
}

.subsection-title {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--title-color, #1C2359);
    margin-bottom: 15px;
    margin-top: 10px;
}

/* Form Controls */
.form-step .form-group {
    margin-bottom: 20px;
}

.form-step label {
    display: block;
    font-weight: 500;
    color: var(--title-color, #1C2359);
    margin-bottom: 6px;
    font-size: 14px;
}
.form-step .formule-check label {
    font-weight: 600;
    font-size: 16px;
}
.form-step .formule-check label i {
    font-size: 13px;
    font-weight: 400;;
}
.formule-check .formule-tarif {
    margin-left: 50px;
    font-size: 13px;
}
.formule-check strong {
    font-size: 1.2rem;
    color: var(--title-color, #1C2359);
}

.form-step .required {
    color: var(--theme-color, #F96363);
}

.form-step .form-control {
    height: 48px;
    border: 1px solid var(--smoke-color, #E4E4E5);
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 15px;
    color: var(--body-color, #5C5F71);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.form-step .form-control:focus {
    border-color: var(--title-color, #1C2359);
    box-shadow: 0 0 0 3px rgba(28, 35, 89, 0.1);
    outline: none;
}

.form-step .form-control.is-invalid {
    border-color: var(--theme-color, #F96363);
}

.form-step .invalid-feedback {
    display: none;
    color: var(--theme-color, #F96363);
    font-size: 13px;
    margin-top: 4px;
}

.form-step .form-control.is-invalid ~ .invalid-feedback,
.form-step .is-invalid ~ .invalid-feedback {
    display: block;
}

/* Select styling */
.form-step select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235C5F71' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Preparation Options (Radio cards) */
.preparation-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.preparation-option input[type="radio"] {
    display: none;
}

.preparation-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    border: 2px solid var(--smoke-color, #E4E4E5);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    background: #fff;
    min-height: 56px;
}

.preparation-option input[type="radio"]:checked + .preparation-label {
    border-color: var(--title-color, #1C2359);
    background: var(--title-color, #1C2359);
    color: #fff;
}
.preparation-option .preparation-label:after,
.annee-option .annee-label:after {
    content: none;
    display: none;
}
.preparation-label:hover {
    border-color: var(--title-color, #1C2359);
}

/* Année scolaire options */
.annee-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.annee-option input[type="radio"] {
    display: none;
}

.annee-label {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border: 2px solid var(--smoke-color, #E4E4E5);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    background: #fff;
}

.annee-option input[type="radio"]:checked + .annee-label {
    border-color: var(--title-color, #1C2359);
    background: var(--title-color, #1C2359);
    color: #fff;
}

.annee-label:hover {
    border-color: var(--title-color, #1C2359);
}

/* Formule Cards */
.formules-section {
    margin-top: 20px;

    display:none;
    background-color: #1C2359;
    padding:0px 20px 20px;
}

.formule-card {
    background: #fff;
    border: 1px solid var(--smoke-color, #E4E4E5);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    transition: border-color 0.2s ease;
}

.formule-card:hover {
    border-color: var(--title-color, #1C2359);
}

.formule-check {
    display: flex;
    align-items: center;
    gap: 12px;
}

.formule-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--title-color, #1C2359);
    cursor: pointer;
}

.formule-label {
    font-weight: 500;
    color: var(--title-color, #1C2359);
    cursor: pointer;
    margin-bottom: 0 !important;
    font-size: 15px;
}

.formule-modalite {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--smoke-color, #E4E4E5);
}

.formule-modalite > label {
    font-size: 13px;
    color: var(--body-color);
    margin-bottom: 8px;
}

.modalite-options {
    display: flex;
    gap: 20px;
}

.modalite-radio {
    display: flex !important;
    align-items: center;
    gap: 0px;
    cursor: pointer;
    font-weight: 400 !important;
    font-size: 14px !important;
    color: var(--body-color) !important;
}

.modalite-radio input[type="radio"] {
    accent-color: var(--title-color, #1C2359);
    opacity: 1;
    height: 20px;
    width: 20px;
    display: block;
    visibility: visible;
    position: unset !important;
}

/* Bulletin Upload */
.bulletin-upload-wrapper {
    margin-bottom: 15px;
}

.bulletin-upload-wrapper .form-control {
    padding: 10px;
    height: auto;
    display: none;
}

.bulletin-upload-wrapper label {
    background-color: #1c2359a8;
    color: #ffffff;
    width: fit-content;
    padding: 5px 40px;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;;
}

.bulletin-upload-wrapper label i{
    display: block;
    font-size: 30px;
    opacity: .5;
}

.bulletin-status {
    margin-top: 6px;
    font-size: 13px;
}

.bulletin-status .text-success {
    color: var(--success-color, #28a745) !important;
}

.bulletin-status .text-danger {
    color: var(--theme-color, #F96363) !important;
}

.bulletin-status .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--smoke-color);
    border-top-color: var(--title-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--smoke-color, #E4E4E5);
    gap: 12px;
}

.form-actions .th-btn {
    min-width: 160px;
}

.form-actions .th-btn.style3 {
    background-color: #fff;
    border: 2px solid var(--title-color, #1C2359);
    color: var(--title-color, #1C2359);
    padding: 18px 24px;
}

/* Summary (step 4) */
#summary-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
}

.summary-section {
    margin-bottom: 24px;
}

.summary-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--smoke-color, #E4E4E5);
}

.summary-section-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: var(--title-color, #1C2359);
}

.summary-edit-btn {
    background: none;
    border: none;
    color: var(--title-color, #1C2359);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    padding: 0;
}

.summary-edit-btn:hover {
    color: var(--theme-color, #F96363);
}

.summary-row {
    display: flex;
    padding: 6px 0;
    font-size: 15px;
}

.summary-label {
    font-weight: 500;
    color: var(--title-color, #1C2359);
    min-width: 200px;
}

.summary-value {
    color: var(--body-color, #5C5F71);
}

/* Submit button */
#btn-submit {
    min-width: 220px;
}

/* Loading overlay */
.form-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

/* Alert */
.alert-danger {
    border-radius: 8px;
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 768px) {
    .inscription-progress {
        padding: 0;
        margin-bottom: 30px;
    }

    .step-label {
        font-size: 11px;
    }

    .step-number {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    .step-title {
        font-size: 22px;
    }

    .preparation-options {
        grid-template-columns: 1fr 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .th-btn {
        width: 100%;
    }

    .summary-row {
        flex-direction: column;
    }

    .summary-label {
        min-width: auto;
        margin-bottom: 2px;
    }

    .annee-options {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .preparation-options {
        grid-template-columns: 1fr;
    }

    .progress-line {
        margin: 0 4px;
    }

    .step-label {
        font-size: 10px;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .modalite-options {
        flex-direction: column;
        gap: 8px;
    }
}

.formule-check input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--title-color, #1C2359);
    cursor: pointer;
    display: block;
    visibility: visible;
}

.formules-section input[type="radio"] {
     width: 40px;
    position: absolute;
    top: 10px;
    right: 10px;
}