*,
*::after,
*::before {
    box-sizing: border-box;
}


/* scroll */
html {
    scroll-behavior: smooth;
}

#listeImages,
.image-card:nth-child(1n) {
    scroll-margin-top: 12rem;
}

#form {
    scroll-margin-top: 35rem;
}

/* GENERAL */
body {
    width: 100vw;
    margin-inline: 0;
    /* padding-block: 2rem; */
    background-color: #212d49;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

main {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-inline: auto;
}

footer {
    margin-top: 4rem;
    margin-bottom: 0;
    padding-top: 1rem;
    background-color: #2a388b;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.footer {
    display: flex;
    gap: 1rem;
}

footer h2, .mentions h2 {
    font-size: 1.25rem;
    font-family: 'Nunito', sans-serif;
    text-align: center;
}

.mentions {
    padding: 4rem;
}
.mentions h3 {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}

.mentions p {
    text-align: center;
}

.mentions a {
    font-weight: 900;
    color: #beecdd;
    text-decoration: none;
}

.mentions ul {
    list-style-type: none;
    text-align: center;
}

.mentions li {
    padding: 1rem;
}

.mentions a:hover {
    text-decoration: underline;
}

.footer-site-popup {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

footer p {
    padding-inline: 1.5rem;
    padding-block: 1rem;
    border-radius: 2rem;
    transition: 0.5s ease;
}

.footerSite:hover,
.footerImages:hover {
    transform: scale(1.1);
    background-color: #ffffff10;
    border-radius: 2rem;
}

/* nav */
nav {
    position: fixed;
    right: 1rem;
    top: 50%;
    transform: translate(0, -50%);
    border-radius: 2rem;
    z-index: 100;
}

main li {
    list-style-type: none;
    margin-block: 0.35rem;
    padding-top: 0.2rem;
    padding-inline: 0.25rem;
    transform: scale(1.5);
}

main li:hover {
    transform: scale(2);
    margin-block: 2rem;
    background-color: #212d49;
    border-radius: 50%;
}

main li:active {
    transform: scale(2);
    background-color: #fdc36b;
    border-radius: 50%;
}

/* textes */
h1,
h2,
h3,
h4,
h5,
h6,
legend {
    font-family: "Merienda", cursive;
    font-weight: 1000;
    color: #fdf5a8;
}

h1 {
    font-size: 3rem;
    text-align: center;
}

h2 {
    font-size: 1.75rem;
}

.intro {
    margin-top: 20rem;
    margin-bottom: 50rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.intro button {
    color: #212d49;
    background-color: #fdc36b;
    font-size: 1.5rem;
    font-weight: 800;
    border: solid 0px;
    border-radius: 2rem;
    padding-inline: 2rem;
    padding-block: 1rem;
    transition: 0.5s ease;
}

.intro button:hover {
    transform: scale(1.15);
}

.chapo {
    text-align: center;
    padding-inline: 2rem;
}

p.chapo {
    font-size: 1.5rem;
}

span[class='name'] {
    color: #fdc36b;
}


p,
label,
input,
a,
button {
    font-family: "Nunito", sans-serif;
    font-weight: 400;
    /* font-optical-sizing: auto;
    font-style: normal;
    font-variation-settings:
        "slnt" 0,
        "wdth" 112.5,
        "GRAD" -122,
        "XOPQ" 143,
        "XTRA" 468,
        "YOPQ" 64,
        "YTAS" 750,
        "YTDE" -305,
        "YTFI" 738,
        "YTLC" 539,
        "YTUC" 712; */
}

p.source {
    color: #ccdfff;
    font-style: italic;
}

.desc h2,
.desc p {
    margin-bottom: 0.25rem;
}

main a {
    color: #ccdfff;
}

/* images cards */

.liste-images {
    display: flex;
    flex-direction: column;
    gap: 50rem;
}

.liste-images img {
    border: solid 0.25rem #fff;
    border-radius: 1rem;
    transition: 1s cubic-bezier(0.075, 0.82, 0.165, 1);
}

.liste-images img:hover {
    scale: 1.03;
    border: solid 0.5rem #fff;
    box-shadow: 0px 0px 20px #a5c6ff88;
}

.image-card {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding-block: 10rem;
    padding-inline: 4rem;
    overflow: scroll;
}

.image-card:nth-child(3n+1) {
    background: linear-gradient(0deg, #ece6ae00 0%, #ece6ae 40%, #ece6ae 60%, #ece6ae00 100%);
    transition: 1s ease;
}

.image-card:nth-child(3n+1):hover {
    background: #ece6ae;
    padding-block: 4rem;
}

.image-card:nth-child(3n+2) {
    background: linear-gradient(0deg, #b3e2fd00 0%, #b3e2fd 40%, #b3e2fd 60%, #b3e2fd00 100%);
    transition: 1s ease;
}

.image-card:nth-child(3n+2):hover {
    background-color: #b3e2fd;
    padding-block: 4rem;
}

.image-card:nth-child(3n+3) {
    background: linear-gradient(0deg, #beecdd00 0%, #beecdd 40%, #beecdd 60%, #beecdd00 100%);
    transition: 1s ease;
}

.image-card:nth-child(3n+3):hover {
    background-color: #beecdd;
    padding-block: 4rem;
}

.image-card img {
    max-width: 30%;
}

.image-card p {
    text-align: left;
}

.image-card .desc {
    height: 100%;
    max-width: 80ch;
}

.img-left {
    flex-direction: row;
}

.img-right {
    flex-direction: row-reverse;
}

.image-card h2 {
    /* color: #3333b8; */
    color: #2a388b;
}

.image-card p {
    color: #212d49;
    font-size: 1.25rem;
    font-weight: 600;
}

/* FOR JS */
/* popup/modal window */

.popup {
    height: 100%;
    position: fixed;
    left: 0px;
    right: 0px;
    top: 0px;
    bottom: 0px;
    z-index: 200;
    background-color: #00000077;
    padding: 4rem;
}

.inner-popup {
    max-width: 95vw;
    max-height: 95vh;
    height: 100%;
    width: 100%;
    padding-inline: 2rem;
    padding-block: 2rem;
    border-radius: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: scroll;
    background-color: #262675;
    position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
    
}

.popup img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.popup p {
    text-align: center;
}

.popup-visible {
    display: block;
}

.popup-invisible {
    display: none;
}

button.close-popup {
    height: 3rem;
    width: 3rem;
    border-radius: 50%;
    border: solid 0px;
    background-color: #ffffff00;
    padding: 0.5rem;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    transition: 1s cubic-bezier(0.075, 0.82, 0.165, 1);
}

button.close-popup:hover {
    scale: 1.03;
    background-color: #262675;
    box-shadow: 0px 0px 20px #a5c6ff88;
}

/* form */

form {
    max-width: 95vw;
}

fieldset {
    border: solid 0;
}

.fieldset-main {
    margin-inline: auto;
    width: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(45deg, #ece6ae, #beecdd, #b3e2fd);
    color: #212d49;
    font-size: 1.25rem;
    font-weight: 600;
    padding: 2rem;
    border-radius: 2rem;
}

.form {
    margin-inline: auto;
}

.form legend {
    text-align: center;
    margin-inline: auto;
    margin-top: 6rem;
    margin-bottom: 3rem;
    font-size: 1.75rem;
    max-width: 60ch;
}

.form-input {
    margin-block: 1.5rem;
    margin-inline: 0;
    padding-inline: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

input {
    width: 100%;
}

label span {
    color: #b40000;
}

input:invalid, textarea:invalid {
    background-color: #ecbebe;
    border: dashed 3px #492121;
    color: #492121;
}

form p.input-legend {
    margin-top: 0.25rem;
}

input,
textarea {
    font-family: 'Nunito', sans-serif;
    display: block;
    font-size: 1.25rem;
    font-weight: 500;
    color: #212d49;
    background-color: #ece6ae;
    border: solid 3px #212d49;
    border-radius: 2rem;
    padding: 0.5rem;
}

#submitInput {
    max-width: 30%;
    transition: 0.5s ease;
    font-weight: 800;
}

#submitInput:hover {
    transform: scale(1.1);
}

/* TODO : harmoniser le thème de couleurs */