* {
    --borders: 1px solid rgb(112, 112, 112);
    --labels: rgb(214, 214, 214);
    --white: #f8f8f8;
    --green: #00bd4c;

    box-sizing: border-box;
}

html {
    min-height: 100vh;
    background-image: url(/images/jeux/guess-wow/wallpaper.jpg);
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    padding-bottom: 0;
}

body {
    background: none;
    padding-bottom: 4rem;
}

body#bodyExplanation {
    background: var(--white);
}

.rules {
    position: fixed;
    top: 15px;
    left: 15px;
    height: 50px;
    transition: 0.25s;
    z-index: 100;
}.rules:hover {
    transform: scale(1.05);
}

.aft:after {
    content: "<-- Lisez les règles !";
    position: absolute;
    left: 110%;
    top: 25%;
    width: 150px;
    color: var(--dark);
    font-weight: bold;
}

.rules img{
    width: 50px;
}

.home {
    left: unset;
    right: 15px;
}

.good { background-color: var(--green); }

h1 {
    text-align: center;
}
h2 {
    font-size: 1.4rem;
    margin-top: 0;
}
h3 { font-weight: normal; }

#explanation {
    display: flex;
    flex-direction: column;

    padding: 1.5rem 8rem 2rem;
    width: 100%;

    border-radius: 6px;
}

#explanation a {
    text-align: center;
}

#explanation .firstExplRow {
    display: flex;
    align-items: center;
    justify-content: center;

    margin: 2rem 0 0;

    min-height: 6   0vh;
}
#explanation .firstExplRow > div {
    width: 600px;
    margin: 0;
    
    display: block;
}
#explanation .firstExplRow div div {
    display: flex;
    flex-direction: column;
    align-items: center;
}
#explanation .firstExplRow div div a {
    margin-top: 8px;
}
#explanation .firstExplRow img {
    width: 35%;
    margin-left: 2rem;
}

#CommentCaMarche {
    margin-top: 6rem;
    padding-top: 2rem;
}

#explanation .explanationRow {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    grid-template-columns: repeat(2, 1fr);
    align-items: flex-start;
    justify-content: center;

    margin: 5rem 0 0;

    min-height: 50vh;
}
#explanation .explanationRow div {
    width: 80%;
    margin: 0 auto 2rem;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
#explanation .explanationRow img {
    width: 50px;
    margin-bottom: 1rem;
    align-self: center;
}

#explanation p,
#explanation h3 {
    margin: 0;
    font-size: 1.2rem;
}

img.gifExplanation {
    height: 400px;
    width: 400px;
    margin: 0 auto 1rem;
}


@media (max-width: 992px) {

    #explanation{
        padding: 1.5rem 1.5rem 2rem;
    }

    #explanation .firstExplRow {
        flex-direction: column-reverse;
    }
    #explanation .firstExplRow img {
        width: 90%;
        margin: 0 0 2rem;
    }
    #explanation .firstExplRow div {
        width: 90%;
    }

    #explanation .explanationRow {
        grid-template-columns: 1fr;
    }
    #explanation .explanationRow div {
        width: 95%;
        margin: 0 auto 3rem;
    }
    
    img.gifExplanation {
        height: auto;
        width: 100%;
    }
}

button {
    border: none;
    background: var(--blue-4);
    box-shadow: rgba(0, 0, 0, 0.4) 2px 2px 6px;

    font-weight: 600;
    color: var(--white);
    font-size: 1rem;

    cursor: pointer;

    transition: .25s;
}button:hover {
    transform: scale(1.1);
}button:active {
    transform: scale(0.9);
}

#start {
    display: flex;
    justify-content: center;
}

button.start {
    padding: 0.5rem 1.5rem;
    margin-top: 2rem;
    border-radius: 6px;
    
    font-size: 1.2rem;
}

#answerInput {    
    margin: 8rem auto 2rem;
}

#answerInput div {
    display: flex;
    margin: 0 auto 2rem;

    width: 500px;
}

#answerData.endGame .answer:nth-child(2) {
    background-color: var(--green);
}

#answerInput div input[type="text"] {
    width: 80%;
    height: 1.8rem;
    padding: 3px 6px;
    border: none;

    font-size: 1rem;

    border-radius: 6px 0 0 6px;
    box-shadow: rgba(0, 0, 0, 0.3) 2px 2px 6px;
}

#answerInput div button {
    width: 20%;

    border-radius: 0 6px 6px 0;
}

#answerInput #error {
    width: 100%;
    text-align: center;
    margin: 0;
}

#answerData {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.answer { background: var(--white); }

#answerData div {
    display: grid;
    text-align: center;
    grid-template-columns: repeat(7, 120px);

    border: var(--borders);
}
#answerData div:not(:first-of-type) {
    border-top: none;
}

#answerData div:first-of-type {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}
#answerData div:last-of-type {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* REFAIRE EN MOBILE */

#answerData div.labels {
    position: sticky;
    left: 0;

    background-color: var(--blue-bg);
    color: white;
    font-weight: bold;
}


#answerData div span {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 100%;
    min-height: 80px;
    padding: 2px;
}

#answerData div span.little {
    font-size: 0.8rem;
}

#info {
    margin: 10rem 1rem 0;
    font-size: .7rem;
}

#score {
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
}


@media (max-width: 992px) {
    #answerData {
        flex-direction: row;
        overflow-x: scroll;

        margin: auto;
        width: 100%;
    }

    #answerData div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    #answerData div:not(:first-of-type) {
        border-top: var(--borders);
    }
    #answerData div:not(:first-of-type) {
        border-left: none;
    }
        
    #answerData div:first-of-type {
        border-radius: 6px 0 0 6px;
    }
    #answerData div:last-of-type {
        border-radius: 0 6px 6px 0;
    }

    /* Force border radius on mobile */
    #answerData div.labels {
        border-top-left-radius: 6px;
        border-bottom-left-radius: 6px;
    }
        
    #answerData div .label {
        width: 120px;
        text-wrap: wrap;
    }

    #answerData div span {
        width: 220px;
    }
}


@media (max-width: 768px) {
    #answerInput div {
        width: 100%;
    }
}