* {
    padding: 0;
    margin: 0;
    transition: 0.4s ease-in-out;
}

body {  
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

h1, h2, h3, a, ul, li, p {
    color: #0f0f1b;
}

/* Navigation / Footer */

header,
body>nav {
    width: 100%;
    height: fit-content;
    display: flex;
    background-color: #f4f4f4;
}

header {
    justify-content: space-between;
}

body>nav {
    position: -webkit-sticky;
    position: sticky;
    top: 0; 
    justify-content: space-evenly;
    z-index: 12;
}

header>a>h1 {
    font-weight: bold;
    margin-left: 10px;
}

header>nav {
    display: flex;
    align-items: center;
}

header>nav>a {
    margin-right: 10px;
    text-transform: uppercase;
}

header>a>h1, 
header>nav>a,
body>nav>a,
footer>p {
    padding: 12px;
}

footer {
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: auto; 
}

a:hover {
    text-decoration: underline;
}

body>nav>a:hover {
    transform: scale(1.2);
}

/* Body */

#propos,
#r112,
#r212,
.preview {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-head {
    border-bottom: 2px solid #0f0f1b;
    border-radius: 2px;
    display: flex;
    justify-content: center;
    min-width: 50%;
    max-width: 66%;
}

.section-head>h2 {
    padding: 6px;
}

.preview {
    border: 2px solid #0f0f1b;
    border-radius: 12px;
    margin-top: 12px;
    background-color: #f4f4f4;
}

.preview>a>img {
    width: 100%;
    border-radius: 10px 10px 0px 0px;
}

.preview>h3 {
    padding: 6px;
}

.r112-body>.preview:hover,
.r212-body>.preview:hover {
    transform: scale(1.05);
}

/* À propos */

body, #propos, main {
    background-color: #f6f6f6;
}

.propos-body {
    padding: 12px;
    width: 90%;
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.propos-body>img {
    width: 200px;
    height: 200px;
}

.propos-body>div {
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.propos-body>div>h3 {
    padding: 12px;
}

.propos-body>div>ul {
    padding: 6px;
    font-size: 1.1rem;
}

/* R */

.r112-body,
.r212-body {
    padding: 12px;
    width: 90%;
}

#r112 {
    background-color: #f4f4f4;
}

#r212 {
    background-color: #f6f6f6;
}

/* Login */

main {
    padding: 12px;
    display: flex;
    justify-content: center;
    align-items: center;

}

/* PC */

@media screen and (min-width:481px) {

    body>nav>a {
        font-size: 1.2rem;
    }

    .r112-body,
    .r212-body {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        column-gap: 24px;
    }

    .r112-body>.preview:nth-child(1) {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }

    .r112-body>.preview:nth-child(2) {
        grid-column: 3 / 5;
        grid-row: 1 / 2;
    }

    .r112-body>.preview:nth-child(3) {
        grid-column: 5 / 7;
        grid-row: 1 / 2;
    }

    .r112-body>.preview:nth-child(4) {
        grid-column: 1 / 4;
        grid-row: 2 / 3;
    }

    .r112-body>.preview:nth-child(5) {
        grid-column: 4 / 7;
        grid-row: 2 / 3;
    }

    .r212-body>.preview:nth-child(1) {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }

    .r212-body>.preview:nth-child(2) {
        grid-column: 3 / 5;
        grid-row: 1 / 2;
    }

    .r212-body>.preview:nth-child(3) {
        grid-column: 5 / 7;
        grid-row: 1 / 2;
    }

    .r212-body>.preview:nth-child(4) {
        grid-column: 1 / 3;
        grid-row: 2 / 3;
    }

    .r212-body>.preview:nth-child(5) {
        grid-column: 3 / 5;
        grid-row: 2 / 3;
    }

    .r212-body>.preview:nth-child(6) {
        grid-column: 5 / 7;
        grid-row: 2 / 3;
    }
}

/* Dark Mode */

@media (prefers-color-scheme: dark) {
    
    h1, h2, h3, a, ul, li, p {
        color: #f4f4f4;
    }

    header, body>nav, #r112, footer {
        background-color: #0f0f1b;
    }

    body, #propos, main, #r212 {
        background-color: #0f0f1e;
    }

    .preview {
        background-color: black;
    }

}