@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

body {
    background-color: #f0f0f0;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-optical-sizing: auto;
    margin: 0;
    padding: 1rem 3rem;
    display: flex;

    flex-direction: column;
    align-items: center;
}

.illustration {
    max-width: 100%;
    border-radius: 30px;
    margin-bottom: 1.3rem;
}

/* The Header */

.header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    padding: 0 0rem;
    container-name: header;
    container-type: inline-size;
}

.header, .footer, main {
    box-sizing: border-box;
}

.header h1 {
    margin: 0;
    align-self: center;
}

.header h1 a {
    text-decoration: none;
    color: #333;
}

@container header (width < 680px) {
    .header h1 {
        font-size: 1.4rem
    }
    
}

@container header (width < 500px) {
    .header h1 {
        font-size: 1.0rem
    }
    .header {
        padding: 0 0.2rem;
    }
}

@media screen and (max-width: 680px) {
    .header {
        padding: 0 0rem;
    }
}

.main-nav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.main-nav a,
.previous-next a {
    display: block;
    min-width: 4em;
    border: 1px solid #333;
    padding: 1rem 2rem;
    background-color: white;
    border-radius: 30px;
    color: #000;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
}

.main-nav a:hover,
.previous-next a:hover {
    background-color: #755c77;
    color: white;
}

@container header (width < 820px) {
    .main-nav a {
        padding: 0.5rem 1rem;
    }
}

@container header (width < 620px) {
    .main-nav a {
        font-size: 0.70rem
    }

    .main-nav ul {
        gap: 0.5rem
    }
}

body.serie-01 .main-nav li:first-of-type a,
body.serie-02 .main-nav li:nth-of-type(2) a,
body.serie-03 .main-nav li:last-of-type a {
    background-color: #755c77;
    color: white;
}

.header,
.footer,
main {
    max-width: min(700px, 120vh);
}

.infos {
    font-size: 1.4rem;
    line-height: 1.4;
    margin-bottom: 2rem;
}

@media screen and (max-width: 700px) {
    .infos {
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 620px) {
    .infos {
        font-size: 1rem;
    }
}

/* Liste Specimens */

.liste-specimens{
    list-style: none;
    padding: 0;
    margin: 2em 0 ;
    display: flex;
    gap: 1.3em;
    flex-wrap: wrap;
    justify-content: flex-start;
    font-size: 1.3rem;
}
.liste-specimens > li > a,
.button-link {
    border: 1px solid #333;
    border-radius: 30px;
    background-color: white;
    padding: 0.3em 1em 0.5em ;
    display: flex;
    align-items: center;
}

.button-link {
    margin: 2em auto ;
    width: fit-content;
    padding: 1rem 2rem;
}

.liste-specimens a,
.button-link {
    text-decoration: none;
    color: #000;
    font-weight: 600;
}
.liste-specimens a:hover,
.button-link:hover {
    background-color: #755c77;
    color: white;
}

@media screen and (max-width:  820px) {
    .liste-specimens {
        font-size: 1rem;
    }
}


/* The Specimen */

.main-specimen {
    width: 100%;
    container-name: mainspecimen;
    container-type: inline-size;
}

/* the IMG tag */
.specimen {
    max-width: 100%;
    display: block
}

.main-specimen h1 {
    margin: 1rem 2rem 2rem 2rem;
    text-align: center;
    font-size: 1.8rem;
}

@container mainspecimen (width < 820px) {
    .main-specimen h1 {
        font-size: 1.5rem;
    }
}

@container mainspecimen (width < 620px) {
    .main-specimen h1 {
        font-size: 1.0rem;
        margin-top: 0.5rem;
        margin-bottom: 1rem;
    }
}

.main-specimen p {
    text-align: center;
}

.specimen-author__separator {
    margin: 0 0.5rem
}

.previous-next {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.previous-next a {
    margin: 1rem 0.6rem;
    padding: 0.8rem 1.4rem 1rem 1.4rem;
    font-weight: 500;
}

.previous-next a:first-child:before {
    content: "<<";
    text-decoration: none;
    padding-right: 0.7rem;
    font-weight: 400;
}

.previous-next a:last-child::after {
    content: ">>";
    text-decoration: none;
    padding-left: 0.7rem;
    font-weight: 400;
}

.prev-next__separator {
    visibility: hidden;
    font-size: 0.3rem;
}

@container mainspecimen (width < 620px) {
    .specimen-author {
        font-size: 0.8rem;
    }
    
    .previous-next a {
        font-size: 0.8rem;
        padding: 0.4rem 0.7rem 0.5rem 0.7rem;
    }
}

/* The Footer */

footer {
    background-color: #473d2e;
    color: white;
    padding: 2rem;
    border-radius: 20px;
}

footer h1 {
    margin-top: 0;
}
footer h1 a {
    text-decoration: none;
}

footer a {
    color: white;
}