:root {
    --primary: #704A87;
    --secondary: #C9524A;
    --tertiary: #5BB5C9;
    --tertiary-2: #009FC9;
    --black: #000;
}

#step2, #step3, #step4, #step5,#tx_codesapply_candidate_submit {
    display: none;
}

/* Liste des étapes */
form .steps-list {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;

    margin: 20px 0 28px 0;
    padding: 0;

    list-style-type: none;
}
  
form .steps-list .btn {
    border-radius: 30px;
    border: 1px solid var(--black);

    opacity: 0.4;

    transition: opacity 150ms ease-in;
}

form .steps-list .btn:hover {
    opacity: 1;
    
    transition: opacity 150ms ease-in;
}

form .steps-list .btn.active {
    opacity: 1;
} 

form .step-container {
    margin-bottom: 0px;
}

@media screen and (min-width: 992px) {
    form .step-container {
        margin-bottom: 54px;
    }
    form .step-container .form__footer {
        position: absolute;
        bottom: 0;

        justify-content: flex-end;
        margin-left: 0;
    }
}
.form__footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

form .form__footer .btn {
    font-size: 0.875rem;

    margin: 3px 6px;
    padding: 8px 20px;
}

@media screen and (min-width: 992px)  {
    form .form__footer {
        justify-content: flex-start;
        width: calc(33% - 20px);
        flex-wrap: wrap;

        margin-left: 0;
    }
    form .form__footer .btn {
        font-size: 1rem;

        min-width: 180px;
    }
}

@media screen and (min-width: 1400px)  {
    form .form__footer {
        width: calc(50% - 40px);
        margin-left: 50%;
    }
}

form .step-container + .form__footer {
    margin-bottom: 32px;
}

@media screen and (min-width: 992px) {
    form .step-container + .form__footer {
        margin-bottom: 54px;
        margin-left: 33%;

        width: 66%;
    }
}
@media screen and (min-width: 1400px)  {
    form .step-container + .form__footer  {
        width: calc(50% - 40px);
        margin-left: 50%;
    }
}

form .step-container .form-group--checkbox input[type="checkbox"] {
    position: relative;
    top: 3px;

    width: 24px;
    height: 18px;
}

form .steps-list li,
form .steps-list li + li {
    margin: 0;
}

.form__section input[type="text"] {
    border: 1px solid #000;
}

.form__section #tx_codesapply_candidate_date_naissance-datepicker {
    padding-right: 32px;

    background-image: url("/tc_assets/Icons/date.svg");
    background-repeat: no-repeat;
    background-position: center right 8px;
    background-size: 16px auto;
}

/* bouton radio */
form .form-group--radio input[type="radio"] {
    margin-left: 16px;
    margin-right: 8px;
}

form .form-group--radio input[type="radio"]:first-of-type {
    margin-left: 0;
}

/* Input de type file */
.form__section input[type='file'] {
    position: relative;

    padding: 8px 166px 8px 16px;
}
.form__section input[type='file']::file-selector-button {
    position: absolute;
    right: 2px;
    top: 4px;

    border: none;

    padding: 2px 8px;
    margin: 2px;

    color: #fff;
    background: var(--primary); 

    cursor: pointer;
}

.form__section input[type='file']::file-selector-button:hover {
    background: #4e335e;
}

/* Accordéons gris clair */

form .accordion-item--gray .toggle-accordion input[type="checkbox"] {
    position: absolute;
    left: 0;
    top: 1px;
}

form .accordion-item--gray .toggle-accordion label {
    position: relative;
    z-index: 1;

    width: 100%;

    padding: 0 32px;
}

.formation-item,
.cursus-item {
    position: relative;
}

.btn.remove-formation,
.btn.remove-cursus {
    width: 28px;
    height: 28px;

    background-image: url("/tc_assets/Icons/remove.svg");
    background-repeat: no-repeat;
    background-position: center right;
    background-size: contain;
}

@media screen and (min-width: 768px) {
    .btn.remove-formation,
    .btn.remove-cursus {
        position: absolute;
        right: -40px;
        bottom: 25px;
    }
}
@media screen and (min-width: 992px) {
    .btn.remove-formation,
    .btn.remove-cursus {
        bottom: 35px;
    }
}

/* Custom checkbox */
.form-group--checkbox {
    position: relative;
}

.form-group--checkbox .custom-checkbox {
    position: absolute;
    left: 0;

    width: 24px;
    height: 24px;

    background-image: url('/tc_assets/Images/unchecked.svg');
    background-position: center;
    background-size: contain;
}

.form-group--checkbox input[type="checkbox"]:checked ~ .custom-checkbox {
    background-image: url('/tc_assets/Images/checked.svg');
}

.form-group--checkbox input[type="checkbox"] {
    z-index: 2;

    width: 24px;
    height: 18px;

    opacity: 0;
}

/* Ajout diplome/certif */
@media screen and (min-width: 992px) and (max-width: 1199px) {
    #acquisFormationsContainer label,
    #cursusProfessionnelsContainer label {
        font-size: 0.875rem;
    }
}

/* Messages d'erreur */
.form-group.has-error .text-error,
.form-group--radio .text-error {
    position: relative;

    font-size: 0.875rem;
    font-style: italic;

    margin-top: 0.3rem;
    padding-left: 20px;

    /* color: #942c28; */
    color: #d4403a;
}

.form-group.has-error .text-error::before,
.form-group--radio .text-error::before {
    content: '';
    position: absolute;
    left: 0;

    width: 16px;
    height: 16px;

    background-image: url("/tc_assets/Icons/warning.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px auto;
}

input:invalid:focus {
    outline: none;
    box-shadow: 0 0 3px red;
}

.text-error {
    color: red;
    font-size: 0.875em;
    margin-top: 0.25rem;
}
