/* ==========================================================
   Widget Elementor - How It Works
   ========================================================== */

.hiw-card {
    display: flex;
    align-items: stretch;
    gap: 130px; 
    background-color: #E4EEFC;
    border-radius: 20px;
    padding: 32px;
    box-sizing: border-box;
}

/* ---------- Illustration (colonne gauche) ---------- */
.hiw-illustration {
    flex: 0 0 42%;
    max-width: 42%;
    align-self: stretch;
    background-color: #F3F8FE;
    border: 1px solid #C9DDF7;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px!important;
    box-sizing: border-box;
    overflow: hidden;
}

.hiw-illustration-svg,
.hiw-illustration-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ---------- Colonne droite ---------- */
.hiw-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hiw-heading {
    margin: 0 0 24px 0;
    font-size: 30px;
    font-weight: 500;
    color: #1B2A4A;
    line-height: 1.3;
}

/* ---------- Liste des étapes ---------- */
.hiw-steps {
    display: flex;
    flex-direction: column;
}

.hiw-step {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    position: relative;
}

.hiw-step-number {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #D7E7FB;
    color: #2E6FE0;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Ligne verticale pointillée reliant les numéros */
.hiw-step:not(:last-child) .hiw-step-number::after {
    content: '';
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% + 24px);
    background-color: #C9DDF7;
    background-image: linear-gradient(#C9DDF7 60%, rgba(255,255,255,0) 0%);
    background-position: left;
    background-size: 2px 8px;
    background-repeat: repeat-y;
    z-index: 0;
}

.hiw-step-text {
    margin: 0 0 26px 0;
    font-size: 15px;
    line-height: 1.55;
    color: #33415C;
    padding-top: 3px;
}

.hiw-step:last-child .hiw-step-text {
    margin-bottom: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
    .hiw-card {
        flex-direction: column;
        gap: 32px;
        padding: 24px;
    }

    /* Le wrapper de contenu perd sa boîte : titre et étapes deviennent
       des enfants flex directs de .hiw-card, ce qui permet de les
       réordonner librement autour de l'illustration sans toucher au HTML. */
    .hiw-content {
        display: contents;
    }

    .hiw-heading {
        order: 1;
        text-align: center;
        font-size: 22px;
    }

    .hiw-illustration {
        order: 2;
        max-width: 100%;
        flex-basis: auto;
        min-height: 230px;
    }

    .hiw-steps {
        order: 3;
        margin-top: 40px;
    }
}
