/* ================================
   SHORTCODE : display-formations
   ================================ */
.formations-wrapper {
    max-width: 1450px;
    margin: 0 auto;
}

/* Filtres catégories */
.formations-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}
.filter-btn {
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid #BBFEF1;
    background: transparent;
    color: #BBFEF1;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.filter-btn:hover,
.filter-btn.active {
    background: #BBFEF1;
    color: #04221D;
}

/* Grille formations */
.formations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Card formation */
.formation-card {
    background-color: #04221D;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    padding: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.formation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.formation-card.hidden {
    display: none;
}

/* Image */
.formation-card-image {
    width: 100%;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    border-radius: 4px;
}
.formation-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contenu */
.formation-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Tags catégories */
.formation-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.formation-tag {
    padding: 0 15px;
    border-radius: 50px;
    border: 1px solid #BBFEF1;
    color: #BBFEF1;
}

/* Titre */
.formation-card-title {
    margin-bottom: 10px;
    color: #BBFEF1;
}

/* Description */
.formation-card-desc {
    color: #BBFEF1;
    margin-bottom: 15px;
    flex: 1;
}

/* Bouton Découvrir */
span.formation-card-btn.default.et_pb_button {
    padding: 5px 20px !important;
    width: fit-content;
}

/* Pagination */
.formations-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}
.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #BBFEF1;
    background: transparent;
    color: #BBFEF1;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.page-btn:hover,
.page-btn.active {
    background: #BBFEF1;
    color: #04221D;
}
.page-btn.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}
.formation-card.filtered {
    display: none;
}

/* Responsive */
@media screen and (max-width: 1000px) {
    .formations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media screen and (max-width: 600px) {
    .formations-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   PAGE FORMATION (contenu)
   ================================ */
.formation-main-content{
    h2{
        font-size: clamp(0.6875rem, 0.4875rem + 0.625vw, 1.3125rem)!important;
        margin-bottom: 20px;
    }
    h2:not(:first-child){
        margin-top: 40px;
    }

}

.formation-programme-item {
    background-color: #04221D;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 15px;
    .sous-titre{
        opacity: 1;
        visibility: visible;
        transition: all 0.3s ease;
    }
    .titre-programme {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .titre-programme:after{
        content: url('/wp-content/uploads/bascule-icon.svg');
        transition: all 0.3s ease;
    }
}

.formation-programme-item.active {
    .sous-titre{
        height: 0;
        opacity: 0;
        visibility: hidden;
    }
    .titre-programme:after{
        transform: rotate(-180deg);
    }
}
.formation-programme-item:not(.active):hover{
    .titre-programme:after{
        transform: rotate(-90deg);
    }
}
.contenu-programme {
    height: 0;
    overflow: hidden;
    transition: all 0.3s ease;

    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-around;

    margin-top: 20px;

    .col-1,.col-2,.col-3{
        padding: 15px;
        border-radius: 8px;
        border: 1px solid #BBFEF1;
        h3{
            padding: 20px !important;
            background: #0B3C36;
            border-radius: 4px;
        }
        .contenu-col-1 ,.contenu-col-2 ,.contenu-col-3 {
            padding: 20px;
            .sous-partie-titre {
                font-weight: 700;
            }
            ul{
                padding-bottom: 0px;
            }
            .sous-partie:not(:last-child) {
                border-bottom: 4px dotted #BBFEF1;
                padding-bottom: 15px;
                margin-bottom: 15px;
            }
        }
    }

}
/* 3 colonnes présentes */
.contenu-programme:has(.col-1):has(.col-2):has(.col-3) > [class^="col-"] {
    width: calc(100% / 3 - 15px);
}

/* 2 colonnes présentes (pas de col-3) */
.contenu-programme:has(.col-1):has(.col-2):not(:has(.col-3)) > [class^="col-"] {
    width: calc(100% / 2 - 15px);
}

/* 1 seule colonne */
.contenu-programme:not(:has(.col-2)):not(:has(.col-3)) > [class^="col-"] {
    width: 100%;
}

@media screen and (max-width :1000px){
    .contenu-programme:has(.col-1):has(.col-2):has(.col-3){
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .contenu-programme:has(.col-1):has(.col-2):has(.col-3) > [class^="col-"] {
        width: 100%;
    }

}
@media screen and (max-width :760px){

    .contenu-programme{
        flex-direction: column;
        flex-wrap: nowrap;
    }
    .contenu-programme:has(.col-1):has(.col-2):not(:has(.col-3)) > [class^="col-"] {
        width: 100%;
    }

}



