@font-face {
    font-family: nimbus;
    src: url(../fonts/NimbusSanL-Reg.otf)
}

* {
    box-sizing: border-box;
}

html {
    --main-color: #455839;
    --bgcolor: #d7e1d1;
}

body {
    color: var(--main-color);
    font-size: 1.3rem;
    max-width: 1400px;
    margin: auto;
}

/*
 * Image de fond
 */
.bgimage {
    position: relative;
}

.bgimage>img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    opacity: 0.2;
    border-radius: 2rem;
    z-index: -1;
}

/*
 * Général
 */
header,
main,
footer {
    border-bottom: 5px solid var(--main-color);
    border-top: 5px solid var(--main-color);
    border-radius: 2rem;
    margin-bottom: 2rem;
}

a {
    color: var(--main-color);
}

/*
 * Header
 */
header {
    display: flex;
    justify-content: start;
}

.title {
    position: relative;
    flex-grow: 4;
}

.logo {
    margin-top: 1rem;
}

.presentation {
    text-align: center;
    font-family: nimbus, monospace;
}

header h1 {
    font-size: 5rem;
    text-align: center;
}

#hamburger,
#hamburger-logo {
    display: none;
}

nav {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    justify-content: space-around;
    max-width: 50%;
    min-width: 400px;
    list-style: none;
}

nav a {
    font-style: italic;
}

/*
 * Main
 */
main {
    padding: 2rem;
}

main div:not(:last-of-type),
main section:not(:last-of-type) {
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--main-color);
    border-radius: 0.5rem;
}

main ul {
    display: flex;
    flex-wrap: wrap;
}

main ul li {
    width: 45%;
}

/*
 * Footer
 */
footer ul {
    display: flex;
    justify-content: space-evenly;
    list-style: none;
}

footer li a {
    color: var(--main-color);
    font-style: italic;
}

@media screen and (max-width: 900px) {
    .bgimage {
        display: none;
    }

    .menu {
        position: fixed;
        width: 0;
    }

    #hamburger-logo {
        display: block;
        position: relative;
        z-index: 1;
        cursor: pointer;
        background-color: var(--bgcolor);
        width: 40px;
        color: var(--main-color);
        text-align: right;
        transform: translateX(-205px);
        padding: 10px;
    }

    nav {
        flex-direction: column;
        background-color: var(--bgcolor);
        overflow: hidden;
        width: 200px;
        min-width: 200px;
        transform: translateX(-200px);
    }

    #hamburger-logo,
    nav {
        transition: 0.7s;
    }

    #hamburger:checked~#hamburger-logo,
    #hamburger:checked~nav {
        transform: translateX(0);
    }

    nav a {
        text-decoration: none;
    }

    nav a:hover {
        background-color: white;
    }

    main ul li {
        width: 95%;
    }

    footer ul {
        flex-direction: column;
    }
}
