
/* ========================================
   CARROUSEL FORMATIONS
======================================== */

.cefa-formations {
    width: 100%;
    overflow: hidden;
}

/* SLIDER */

.cefa-formations-slider {
    display: flex;
    gap: 14px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    padding: 0;
    margin: 0;
    cursor: grab;
    touch-action: auto;
}

.cefa-formations-slider::-webkit-scrollbar {
    display: none;
}

.cefa-formations-slider.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    scroll-snap-type: none;
    user-select: none;
}

/* CARTES */

.cefa-formation-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex: 0 0 calc((100% - 28px) / 3);
    min-width: 0;
    height: 310px;
    padding: 22px;
    border-radius: 28px;
    overflow: hidden;
    scroll-snap-align: start;
    isolation: isolate;
    text-decoration: none !important;
    color: #111 !important;
    transition: border-radius .3s ease;
}

.cefa-formation-card:hover {
    border-radius: 36px;
}

/* COULEURS */

.cefa-formation-color-0 {
    background: #c4f5a6;
    /* background: #e5efec; */
}

.cefa-formation-color-1 {
    background: #ff9968;
    /* background: #dfdaff; */
}

.cefa-formation-color-2 {
    background: #bdd9f6;
    /* background: #eaf5fd; */
}

/* FLÈCHE */

.cefa-formation-arrow {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #fff;
    border-radius: 50%;
    color: #111;
    transition: transform .3s ease;
}

.cefa-formation-arrow svg {
    width: 17px;
    height: 17px;
}

.cefa-formation-card:hover .cefa-formation-arrow {
    transform: rotate(45deg);
}

/* IMAGE */

.cefa-formation-image {
    position: absolute;
    top: 20px;
    right: 18px;
    width: 49%;
    height: 57%;
    border-radius: 22px;
    overflow: hidden;
    z-index: 1;
}

.cefa-formation-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    transition: transform .5s ease;
    pointer-events: none;
}

.cefa-formation-card:hover .cefa-formation-image img {
    transform: scale(1.06);
}

/* CONTENU */

.cefa-formation-content {
    position: relative;
    z-index: 2;
    width: 100%;
    margin-top: auto;
}

.cefa-formation-label {
    display: inline-block;
    margin-bottom: 9px;
    padding: 2px 7px;
    border: 1px solid currentColor;
    border-radius: 20px;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 400;
    color: #111;
}

.cefa-formation-title,
.et_pb_module .cefa-formation-title {
    margin: 0;
    padding: 0;
    font-size: clamp(19px, 1.8vw, 26px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.035em;
    color: #111 !important;
}

/* BARRE DE PROGRESSION */

.cefa-formations-progress {
    position: relative;
    width: 100%;
    height: 7px;
    margin-top: 30px;
    background: #eeeeee;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    touch-action: none;
}

.cefa-formations-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 33.333%;
    height: 100%;
    background: var(--cefa-bleu);
    border-radius: 20px;
    transition: left .1s linear;
    pointer-events: none;
}

/* RESPONSIVE TABLETTE */

@media (max-width: 980px) {

    .cefa-formation-card {
        flex-basis: calc((100% - 14px) / 2);
        height: 290px;
    }

    .cefa-formation-title,
    .et_pb_module .cefa-formation-title {
        font-size: 23px;
    }

}

/* RESPONSIVE MOBILE */

@media (max-width: 600px) {

    .cefa-formations-slider {
        gap: 12px;
    }

    .cefa-formation-card {
        flex-basis: 86%;
        height: 300px;
        padding: 22px;
        border-radius: 25px;
    }

    .cefa-formation-image {
        width: 48%;
        height: 58%;
    }

    .cefa-formation-title,
    .et_pb_module .cefa-formation-title {
        font-size: 25px;
    }

    .cefa-formations-progress {
        margin-top: 22px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .cefa-formations-slider {
        scroll-behavior: auto;
    }

    .cefa-formation-card,
    .cefa-formation-image img,
    .cefa-formation-arrow {
        transition: none;
    }

}