/**** Importation des polices DM Sans et Alan Sans ****/

@import url('https://fonts.googleapis.com/css2?family=Alan+Sans:wght@300..900&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');


/**** Reset ****/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

button {
    border: none;
    outline: none;
    font-family: "DM Sans", sans-serif;
}

/**** Style général de la page ****/

body {
    width: 100%;
    height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(255, 254, 254, 0.7), rgba(255, 250, 250, 0.7)),
        url("img/football_1.jpg") center no-repeat fixed;
    object-fit: cover;
    position: relative;
    font-family: "DM Sans", sans-serif;
}


header,
footer {
    display: flex;
    justify-content: center;
    align-items: center;
}

h1 {
    font-size: 28px;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 10px;
    padding-inline: 12px;
    font-family: "Alan Sans", sans-serif;
}

main {
    height: 75%;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

p {
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    margin: 0 40px 20px 40px;
    line-height: 35px;
}

.alert {
    background-color: #5d9b63;
    color: #ffffff;
    font-weight: 700;
    width: 100%;
    padding: 12px;
    border-radius: 0;
    position: absolute;
    top: 0;
    left: 0;
    display: none;
}

.btn {
    width: 80%;
    font-size: 20px;
    font-weight: 700;
    padding: 12px 20px;
    margin: 20px auto 0 auto;
    background-color: #006400;
    color: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn:hover {
    background-color: #08780c;
}

.startBtn {
    width: 230px;
    padding: 25px;
    text-align: center;
}

.quiz__container {
    width: 80%;
    max-width: 850px;
    padding: 30px;
    text-align: center;
    display: none;
}

.question {
    font-size: 22px;
    font-weight: bold;
    line-height: 30px;
    font-family: "Alan Sans", sans-serif;
}

.choices {
    margin-top: 20px;
}

.choice {
    font-size: 19px;
    font-weight: 400;
    line-height: 28px;
    cursor: pointer;
    animation: fade-in 0.5s ease-in-out;
}

.choice:hover {
    background-color: #dddddd;
}

.choice.selected {
    background-color: #006400;
    color: #ffffff;
}

.score__card {
    font-size: 24px;
    margin-top: 20px;
}

/**** Animation fade-in pour l'apparition du quiz ****/

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(50%);
    }

    to {
        opacity: 1;
        transform: translateY(0%);
    }
}

footer {
    margin-top: 20px;
}

footer p {
    font-weight: 700;
    font-size: 18px;
    padding-inline: 12px;
    font-family: "Alan Sans", sans-serif;
}

/**** Responsive design ****/

@media screen and (max-width: 688px) {
    h1 {
        font-size: 24px;
    }

    .quiz__container {
        width: 100%;
    }
}

@media screen and (max-width: 440px) {
    h1 {
        font-size: 22px;
        margin-left: 15px;
        margin-right: 15px;
        text-align: center;
        text-decoration: none;
    }

    .btn {
        font-size: 18px;
    }
}