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 .def {
    height: 225px;
    min-width: 300px;
    max-width: 300px;
    padding: 0;
    margin-bottom: 40px;
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}


/* !COURS */
section.list ul .def 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;
    transition: all 0.35s ease-out;
}

section.list ul .def:hover li.coursElem {
    margin-top: 13px;
    border-bottom: solid 2px var(--c-black);
}

section.list ul .def li.coursElem img {
    width: 100%;
    height: 30%;
    object-fit: cover;
    border: solid 2px var(--c-black);
    border-radius: 2px;
}

section.list ul .def li.coursElem h2 {
    margin: 15px 0 5px 0;
    line-height: 95%;
}

section.list ul .def li.coursElem .desc {
    font-weight: var(--fw-thin);
    line-height: 95%;

    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

section.list ul .def 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 .def:hover li.coursElem .level {
    opacity: 1;
}

section.list ul .def 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 .def:hover li.coursElem .hideDesc {
    opacity: 1;
}

/* !ANNEXES */
section.list ul.annexes {
    display: grid;
    grid-template-columns: repeat(auto-fit, 300px);
    justify-content: space-between;
    width: 100%;
    height: 100%;
    overflow-x: initial;
    flex-wrap: wrap;
}

section.list ul.annexes a {
    margin-bottom: 40px;
}

.modal {
    opacity: 0;
    pointer-events: none;
    position: fixed;
    z-index: 999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    transition: all .35s ease-out;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    position: relative;
}

.modal-content img {
    width: 100%;
    border: solid 2px var(--c-black);
    border-radius: 5px;
}

.modal-content input[type="url"] {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    padding: 5px;
    border: solid 2px var(--c-black);
    border-radius: 5px;
    width: 100%;
}

.modal-content button {
    width: 100%;
    font-size: 1.2rem;
    background: none;
    padding: 15px;
    font-weight: var(--fw-normal);
    border-radius: 5px;
    transition: all .35s ease-out;
    cursor: pointer;
    background: var(--c-main);
    color: var(--c-white);
    border: none;
    transition: all .35s ease-out;
}

.modal-content button:hover {
    background: var(--ch-main);
    color: var(--c-white);=
}



.close {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 28px;
    cursor: pointer;
}



@media (max-width: 1024px) {
    section.list {
        padding: 16vh 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 .def {
        width: 90vw;
        max-width: none;
        min-width: auto;
        height: auto;
        margin-bottom: 20px;
    }

    section.list ul .def li.coursElem {
        padding: 10px 10px 20px 10px;
    }

    section.list ul .def li.coursElem h2 {
        font-size: 1.4rem;
    }

    section.list ul .def li.coursElem p {
        font-size: 1.1rem;
    }

    section.list ul .def li.coursElem img {
        max-height: 20px;
    }

    section.list ul .def:hover li.coursElem .hideDesc,
    section.list ul .def:hover li.coursElem .level {
        opacity: 0;
    }

    .modal-content {
        width: 90%;
        margin: 10% 5%;
    }
}
