:root {
    --white: #ffffff;
    --black: #000000;
    --black-30: #0000004D;
    --red: #D7201D;
    --yellow: #FBF0C3;
    --yellow-50: #FFE89380;
    --green: #1A981C;
    --radius: 0.875rem; /* 14px */
    --text-radius: 0.3125rem; /* 5px */
}

*,
:after,
:before {
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    font-smooth: antialiased;
    text-rendering: optimizeLegibility
}


body {
    font-size: 16px;
    font-family: "Poppins", sans-serif;
    background-color: var(--white);
    background-image: url("../img/bg-wood-e5eb5c2fd41d96a8715e63ff1f68e78f.webp");
    background-repeat: repeat-y;
    background-position: center top;
    background-size: 100%;
    position: relative;
    overflow-x: hidden;
    margin: 0;
    margin-top: 2.5rem;
}

main {
    padding-bottom: 3.25rem; /* 52px */
    max-width: 73.4375rem; /* 1175px */
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6, p, span {
    padding: 0.25rem 0.5rem;
}

h1 {
    font-weight: 700;
    font-size: 1.75rem; /* 28px */
    line-height: 1.18em; /* 33px */
}

h2 {
    font-weight: 700;
    font-size: 2.3125rem; /* 37px */
    line-height: 1.27em; /* 47px */
}

h3 {
    font-weight: 700;
    font-size: 1.5625rem; /* 25px */
    line-height: 1.36em; /* 34px */
}

/* SHAPE */

.rounded {
    border-radius: var(--radius);
}

/* BACKGROUND */

.bg-red {
    background-color: var(--red);
}
.bg-yellow {
    background-color: var(--yellow);
}
.bg-yellow-50 {
    background-color: var(--yellow-50);
}
.bg-black {
    background-color: var(--black);
}
.bg-black-30 {
    background-color: var(--black-30);
}
.bg-transparent {
    background-color: transparent;
    padding: 0;
}
.bg-green {
    background-color: var(--green);
}

/* TEXT */

.txt-red {
    color: var(--red);
}
.txt-yellow {
    color: var(--yellow);
}
.txt-black {
    color: var(--black);
}
.txt-white {
    color: var(--white);
}

.txt-left {
    text-align: left;
}
.txt-center {
    text-align: center;
}

.txt-bold {
    font-weight: bold;
}

.txt-lower {
    text-transform: lowercase;
}
.txt-upper {
    text-transform: uppercase;
}

.txt-rounded {
    border-radius: var(--text-radius);
}
.txt-slanted {
    display: inline-block;
    transform: rotate(-6.02deg);
    margin-top: 2%;
}

/* SIZING */

.container {
    width: 83.333333%;
    margin: 0 auto;
}

.img-responsive {
    width: 100%;
    height: auto;
}

.no-pad {
    padding: 0;
}

/* DISPLAY */

/*.mobile-only {
    display: block;
}*/

.desktop-only {
    display: none;
}

.is-hidden {
    display: none;
}

/* */

.popin {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--black-30);
}

.popin--close {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    cursor: pointer;
}

.popin--content {
    position: absolute;
    top: 5rem; /* 80px */
    left: 50%;
    transform: translateX(-50%);
    width: 72%;
    max-width: 33.125rem; /* 530px */
    padding: 1.25rem 1.875rem 1.875rem; /* 20px 30px 30px */
    background-color: var(--yellow);
    border-radius: var(--radius);
    max-height: 83%;
    overflow: auto;
}

.popin--form {
    margin-top: 1rem;
}

.popin--form .form--row {
    -ms-flex-direction: column;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.popin--form .form--field {
    width: 100%;
}

.popin--form .form--field input {
    padding: 0.375rem 0.5625rem;
}

.window--book {
    width: 83%;
    margin: 0 auto;
    padding: 1rem;
    padding-bottom: 2.625rem; /* 42px */
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: -10%;
}

.lost .window--book, .won .window--book{
    margin-top: 0;
}

.lost .window--book, .won .window--book{
    margin-top: 0;
}

.window--book--texts {
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /*gap: 1rem;*/
}

.cta {
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1em;
    padding: 1rem 1.375rem; /* 16px 22px */
    border-radius: 3.125rem; /* 50px */
    border: none;
}

/* Pages WIN/LOST */

.form--win {
    padding: 1.25rem;
}

.won .window--book--texts,
.lost .window--book--texts {
    gap: 0;
}

.won h1, .won p,
.lost h1, .lost p {
    margin: 0;
}

/* Page - GAME */

.game textarea {
    width: 100%;
    margin: 1rem 0;
    min-height: 20rem; /* 320px */
    padding: 1.25rem;
    border-radius: var(--radius);
    border: none;
    box-shadow: 3px 4px 4px 0px #00000040 inset;
    font-family: "Poppins", sans-serif;
}

/* Page - WIN */

.form--row {
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.form--row:has(.form--field--checkbox) {
    -ms-flex-direction: row;
    flex-direction: row;
}
.form--row:has(.form--field--checkbox) .form--field,
.form--row:has(.form--field--checkbox) .form--field input {
    width: auto;
    flex: unset;
    min-height: auto;
}
.form--row .form--field input {
    border-radius: var(--text-radius);
}

.form--label {
    flex: 1;
    font-weight: bold;
}

.form--field {
    flex: auto;
    width: 100%;
}

.form--field input {
    border: 1px solid var(--black);
    border-radius: var(--radius);
    width: 100%;
    min-height: 2.25rem; /* 36px */
    font-family: "Poppins", sans-serif;
}

.form--label:last-of-type {
    font-weight: normal;
}

.form--won--wrapper button {
    display: block;
    margin: 0 auto;
}

.home--head--image{
    margin-top: -14%;
    display: flex;
    justify-content: end;
}

.home--head--image img{
    width: 85%;
}

.home--head{
    width: 83%;
    margin: 0 auto;
}

.home--head--texts h2{
    margin-top: -2%;
}

.form--game--image{
    width: 100%;
    display: flex;
    justify-content: end;
    margin-bottom: -30%;
}

.form--game--image img{
    width: 40%;
    margin-top: -14%;
    margin-right: -29%;
    transform: rotate(71deg);
}

main{
    overflow-x: hidden;
}

.tartine{
    margin-left: -27%;
    margin-top: -35%;
    margin-bottom: -13%;
}

.tartine img{
    width: 59%;
}

.won .tartine{
    margin-left: -27%;
    margin-top: -55%;
    margin-bottom: 1%;
}

.legal{
    font-size: 0.6rem;
}

@media screen and (min-width: 62rem) { /* 992px */

    main {
        width: 62%;
    }

    .lost main, .won main{
        overflow-x: visible;
    }
    .tartine{
        margin-left: -11%;
        margin-top: -19%;
        margin-bottom: -13%;
    }

    .tartine img{
        width: 35%;
    }

    .won .tartine{
        margin-left: -11%;
        margin-top: -34%;
        margin-bottom: 0%;
    }

    .won .tartine img{
        width: 27%;
    }

    /* DISPLAY */

    .mobile-only {
        display: none;
    }

    .desktop-only {
        display: block;
    }

    /* Elements */

    .popin--content span {
        font-size: 2.25rem;
    }
    .popin--content span:first-of-type {
        margin-left: 2rem;
    }

    .home--head {
        display: flex;
        -ms-flex-direction: row;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .home--head--texts,
    .window--book--image {
        flex: 4;
    }
    .home--head--image,
    .window--book--texts {
        flex: 6;
    }

    .home--head--image{
        margin-top: 0%;
        display: block;
    }

    .home--head--image img{
        width: 100%;
    }

    .home--head{
        width: 83%;
        margin: 0 auto;
    }

    .home--head--texts h2{
        margin-top: 0%;
    }

    .window--book {
        width: 100%;
        -ms-flex-direction: row;
        flex-direction: row;
        justify-content: space-between;
        gap: 0;
        margin-top: -4%;
    }

    /* Page - GAME */

    .form--game--image{
        width: 100%;
        display: block;
        margin-bottom: 0;
    }

    .form--game--image img{
        width: 100%;
        margin-top: 0;
        margin-right: 0;
        transform: unset;
    }

    .form--game {
        display: flex;
        -ms-flex-direction: row;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .form--game--wrapper {
        flex: 66;
    }

    .form--game--image {
        flex: 33;
    }

    /* Page - WON */

    .form--row {
        display: flex;
        -ms-flex-direction: row;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 2rem;
        margin-bottom: 1.25rem;
    }

    .form--field {
        width: auto;
    }
}