/* Amélioration du responsive pour la box "Découvrir ou apprendre" */
#decouvrir .col-md-5 {
    min-width: 0;
    /* Permet au flex de fonctionner correctement */
}

#decouvrir .col-md-5>div {
    max-width: 100%;
    overflow-wrap: break-word;
}

#decouvrir .col-md-5 .btn {
    white-space: nowrap;
    min-width: fit-content;
}

/* Sur mobile, les boutons prennent toute la largeur */
@media (max-width: 767.98px) {
    #decouvrir .col-md-5 .btn {
        width: 100%;
    }
}

/* Sur tablette et desktop, les boutons s'adaptent avec wrap */
@media (min-width: 768px) {
    #decouvrir .col-md-5>div {
        justify-content: flex-end;
    }
}

.featured-cards-row>.col {
    display: flex;
}

.featured-card {
    display: flex;
    width: 100%;
    height: 100%;
}

@media (max-width: 991.98px) {
    .featured-card {
        height: auto;
    }
}

/* Amélioration de l'espacement des checkboxes dans le menu déroulant */
#contentTypesDropdown+.dropdown-menu {
    padding: 0.5rem 0;
}

#contentTypesDropdown+.dropdown-menu .form-check {
    margin: 0;
    padding: 0.5rem 1rem;
    padding-left: 2rem;
    display: flex;
    align-items: center;
}

#contentTypesDropdown+.dropdown-menu .form-check:hover {
    background-color: #f8f9fa;
}

#contentTypesDropdown+.dropdown-menu .form-check-input {
    margin-top: 0;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

#contentTypesDropdown+.dropdown-menu .form-check-label {
    margin: 0;
    cursor: pointer;
}

/* Forcer l'affichage de la section "Découvrir" sur mobile */
@media (max-width: 767.98px) {

    #decouvrir[data-cue="fadeIn"],
    #decouvrir[data-cue="fadeIn"]>* {
        opacity: 1 !important;
        animation: none !important;
    }

    #decouvrir [data-cue="slideInLeft"] {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    /* Ajouter plus d'espacement entre les cards dans les onglets */
    #pills-tabContent .row.pb-4>[class*="col-"] {
        margin-bottom: 1.5rem;
    }

    #pills-tabContent .row.pb-4>[class*="col-"]:last-child {
        margin-bottom: 0;
    }
}
