section.list {
    width: 100%;
    height: 100%;
    min-height: 60vh;
    padding: 20vh 12.5% 10vh 12.5%;
}

section.list h1 {
    margin: 40px 0 20px 0;
}


/* !LISTES */
ul {
    display: flex;
}

section.list ul {
    width: 100%;
    height: 250px;
    flex-wrap: inherit;
}

section.list ul a {
    height: 225px;
    min-width: 300px;
    max-width: 300px;
    padding: 0;
}

section.list .carousel-container ul a {
    margin: 0 40px 0 0;
}


/* !COURS */
section.list ul a li.coursElem {
    width: 100%;
    height: 100%;
    background: var(--c-white);
    border: solid 2px var(--c-black);
    border-bottom: solid 15px var(--c-black);
    border-radius: 5px;
    padding: 10px;
    position: relative;
    z-index: 980;
    transition: all 0.35s ease-out;
}

section.list ul a:hover li.coursElem {
    margin-top: 13px;
    border-bottom: solid 2px var(--c-black);
}

section.list ul a li.coursElem img {
    width: 100%;
    height: 30%;
    object-fit: cover;
    border: solid 2px var(--c-black);
    border-radius: 2px;
}

section.list ul a li.coursElem h2 {
    margin: 15px 0 5px 0;
    line-height: 95%;
}

section.list ul a li.coursElem .desc {
    font-weight: var(--fw-thin);
    line-height: 95%;
    text-overflow: ellipsis;
}

section.list ul a li.coursElem .level {
    position: absolute;
    bottom: 10px;
    font-size: 0.8rem;
    text-transform: uppercase;
    background: var(--c-secondary);
    padding: 5px 5px 3px 5px;
    border-radius: 2px;
    opacity: 0;
    transition: all 0.35s ease-out;
}

section.list ul a:hover li.coursElem .level {
    opacity: 1;
}

section.list ul a li.coursElem .hideDesc {
    width: 90%;
    height: calc(28px + 1.2rem);
    background: var(--c-white);
    position: absolute;
    bottom: 0;
    opacity: 0;
    transition: all 0.35s ease-out;
}

section.list ul a:hover li.coursElem .hideDesc {
    opacity: 1;
}


    /* !CAROUSEL */
.carousel-container {
    position: relative;
    width: 100%;
}

.carousel-container .carouselOverflow {
    overflow: hidden;
}

.carousel-list {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
    position: relative;
    z-index: 980;
}

.carousel-list li {
    flex: 0 0 300px;
    margin-right: 20px;
}

.carousel-container button.prev,
.carousel-container button.next {
    position: absolute;
    top: 50%;
    z-index: 10;
    background: var(--c-white);
    border: solid 2px var(--c-black);
    border-radius: 5px;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
}

.carousel-container button.prev {
    left: 0;
    transform: translateX(calc(-100% - 20px));
}

.carousel-container button.next {
    right: 0;
    transform: translateX(calc(100% + 20px));
}


/* !ANNEXES */
section.list ul.annexes {
    display: grid;
    grid-template-columns: repeat(auto-fill, 300px);
    justify-content: space-between;
    width: 100%;
    height: 100%;
    overflow-x: initial;
    flex-wrap: wrap;
}

section.list ul.annexes a {
    margin-bottom: 40px;
}

.mobile-controls {
    display: none;
}


@media (max-width: 1024px) {
    section.list {
        padding: 18.5vh 5% 5vh 5%;
    }

    section.list h1 {
        opacity: 0;
        line-height: 0;
        margin: 10px 0;
    }

    section.list ul {
        flex-direction: column;
        height: auto;
    }

    section.list ul a {
        width: 100%;
        max-width: none;
        min-width: auto;
        height: auto;
        margin-bottom: 20px;
    }

    .carousel-container .carouselOverflow,
    .carousel-list {
        flex-direction: column;
        overflow: visible;
        height: auto;
    }

    .carousel-list li {
        margin-right: 0;
        margin-bottom: 30px;
        flex: 1 1 auto;
    }

    .carousel-container button.prev,
    .carousel-container button.next {
        display: none;
    }

    section.list ul.annexes {
        grid-template-columns: 1fr;
        justify-content: center;
    }

    section.list ul a li.coursElem {
        padding: 10px 10px 20px 10px;
    }

    section.list ul a li.coursElem h2 {
        font-size: 1.4rem;
    }

    section.list ul a li.coursElem p {
        font-size: 1.1rem;
    }

    section.list ul a li.coursElem img {
        max-height: 20px;
    }

    section.list ul a:hover li.coursElem .hideDesc, section.list ul a:hover li.coursElem .level {
        opacity: 0;
    }

    .mobile-controls {
        display: block;
        margin-bottom: 20px;
    }

    .mobile-controls input {
        width: 100%;
        padding: 10px;
        font-size: 1rem;
        margin-bottom: 10px;
        border-radius: 5px;
        border: 2px solid var(--c-black);
    }

    .filter-buttons {
        display: flex;
        gap: 10px;
    }


    .filter-buttons button {
        flex: 1;
        padding: 10px;
        font-size: 1rem;
        background-color: var(--c-white);
        border: solid 2px var(--c-black);
        border-radius: 5px;
        color: var(--c-black);
        cursor: pointer;
        transition: all .35s ease-out;
    }

    .filter-buttons button.active {
        background: var(--c-main);
        color: var(--c-white);
        border: solid 2px transparent;
    }

    .filter-buttons button:hover {
        background: var(--c-main);
        color: var(--c-white);
        border: solid 2px transparent;
    }
}
