*{font-family: 'Roboto', sans-serif;}

body{
    margin: 0;
    padding: 0;
    min-width: 0;
    background: linear-gradient(135deg, #5b8def, #7fa8ff);
    color: #1f2937;
}

html,
body{
    width: 100%;
    overflow-x: hidden;
}

.principal{
    display:flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 30px 15px;
}

.sub{
    display: flex;
    flex-direction: row;
    width: min(1000px, 92vw);
    min-height: 650px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
    background: #ffffff;
}

.sub .duform,
.sub .dage{
    width: 50%;
    padding: 40px 35px;
    box-sizing: border-box;
}

.duform{
    background-color: #f9fbff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.duform form,
.form-step{
    width: 100%;
    min-width: 0;
}

.duform h1,
.duform h2,
.duform h3{
    margin: 0 0 12px 0;
    color: #123c72;
    line-height: 1.2;
}

.duform h3{
    font-size: 28px;
    font-weight: 700;
}

.duform h4{
    margin: 0;
    font-size: 20px;
    color: #1d4f91;
    font-weight: 700;
}

.duform p{
    margin: 0 0 12px 0;
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
}

small{
    display: inline-block;
    font-size: 14px;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 12px;
}

small a{
    color: #0d6efd;
    text-decoration: none;
    font-weight: 600;
}

small a:hover{
    text-decoration: underline;
}

.dage{
    background-image: linear-gradient(to top, rgba(7, 29, 66, 0.88), rgba(20, 72, 156, 0.25)), url(src/bg.png);
    background-size: cover;
    background-position: center;
    background-repeat:no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    color: #ffffff;
}

.dage h1{
    margin: 0 0 12px 0;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.15;
    font-weight: 800;
    max-width: 420px;
}

.dage p{
    margin: 0;
    font-size: 17px;
    line-height: 1.6;
    color: rgba(255,255,255,0.92);
    max-width: 350px;
}

/* Étapes */
.form-step {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease-in-out;
}

.form-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeIn 0.5s ease-in-out;
}

/* Inputs */
input[type="text"],
input[type="tel"],
input[type="email"],
select{
    width: 100%;
    padding: 14px 15px;
    margin: 8px 0 18px;
    border: 1px solid #d7dfeb;
    border-radius: 12px;
    font-size: 15px;
    background: #ffffff;
    color: #1f2937;
    box-sizing: border-box;
    transition: all 0.25s ease-in-out;
}

input[type="text"]::placeholder,
input[type="tel"]::placeholder,
input[type="email"]::placeholder{
    color: #9aa6b2;
}

select{
    min-height: 50px;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: menulist;
}

.required-mark{
    color: #dc2626;
    font-weight: 800;
}

label{
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
select:focus{
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
    outline: none;
}

/* Checkbox */
input[type="checkbox"]{
    transform: scale(1.1);
    margin-right: 8px;
}

/* Boutons */
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d6efd, #2b8cff);
    color: white;
    border: none;
    padding: 13px 22px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    margin: 8px 8px 0 0;
    box-shadow: 0 10px 20px rgba(13, 110, 253, 0.22);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(13, 110, 253, 0.28);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Ligne étape */
.rev{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.ima{
    height: 32px;
    width: auto;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lien accueil */
.duform small:last-child{
    margin-top: 18px;
    display: block;
}

/* Responsive */
@media (max-width: 900px) {
    .principal{
        align-items: flex-start;
        padding: 12px 0;
    }

    .sub{
        flex-direction: column-reverse;
        width: min(100%, 700px);
        min-height: auto;
        border-radius: 0;
    }

    .sub .duform,
    .sub .dage{
        width: 100%;
        padding: 28px 22px;
    }

    .dage{
        min-height: 240px;
        justify-content: flex-end;
    }

    .dage h1{
        font-size: 30px;
        max-width: 100%;
    }

    .dage p{
        font-size: 15px;
        max-width: 100%;
    }

    .duform h3{
        font-size: 23px;
    }

    .duform h4{
        font-size: 18px;
    }

    small{
        font-size: 13px;
    }

    input[type="text"],
    input[type="tel"],
    input[type="email"],
    select{
        font-size: 16px;
        padding: 12px 13px;
        max-width: 100%;
    }

    button{
        width: 100%;
        margin-right: 0;
    }

    .ima{
        height: 26px;
    }
}



#loadingOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.loader-box {
    background: #ffffff;
    color: #1f2a44;
    padding: 35px 45px;
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    max-width: 360px;
}

.loader {
    width: 55px;
    height: 55px;
    border: 6px solid #dbe4f0;
    border-top: 6px solid #204594;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 18px auto;
}

.loader-box p {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.loader-box small {
    color: #667085;
    line-height: 1.5;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 420px) {
    .sub .duform,
    .sub .dage{
        padding: 24px 16px;
    }

    .dage{
        min-height: 190px;
    }

    .duform h3{
        font-size: 21px;
    }

    select,
    input[type="text"],
    input[type="tel"],
    input[type="email"]{
        width: 100%;
        min-width: 0;
    }
}
