@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');

:root {
    --dark-grey: #333333;
    --medium-grey: #636363;
    --light-grey: #eeeeee;
    --ash: #f4f4f4;
    --primary-color: #334080;
    --secondary-color: #F5C400;
    --white: white;
    --border: 1px solid var(--light-grey);
    --shadow: rgba(0, 0, 0, 0.05) 0px 6px 24px 0px,
      rgba(0, 0, 0, 0.08) 0px 0px 0px 1px;
}

* {
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/** PAGE D'ACCUEIL QUIZ **/

.quiz-module-title {
    background-color: var(--primary-color);
    font-size: 1.2rem;
    padding-top: 50px;
    padding-bottom: 30px;
}

.h1__quiz-module-title {
    font-weight: 500;
    text-align: center;
    color: var(--white);
}

/** QUIZ **/

::selection {
    color: #fff;
    background: var(--primary-color);
}

.quiz {
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center; 
    background-color: var(--primary-color);
}

.info_box,
.quiz_box,
.result_box,
.start_btn {
    margin-top: 50px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 
                0 6px 20px 0 rgba(0, 0, 0, 0.19);   
}

.result_box,
.quiz_box,
.info_box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.info_box.activeInfo,
.quiz_box.activeQuiz,
.result_box.activeResult {
    opacity: 1;
    z-index: 5;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.start_btn button {
    font-size: 25px;
    font-weight: 500;
    color: var(--dark);
    padding: 15px 30px;
    outline: none;
    border: none;
    border-radius: 5px;
    background: var(--white);
    cursor: pointer;
    max-width: 300px;
}

.start_btn {
    position: relative;
    text-align: center;
    z-index: 1;
    margin-bottom: 400px;
    background-color: var(--white);
    color: var(--primary-color);
    border-radius: 8px;
    margin: 0 auto; 
    margin-bottom: 300px;
}

.start_btn:hover {
    background-color: var(--white);
    color: var(--secondary-color);
}

.info_box {
    width: 500px;
    background: var(--white);
    border-radius: 5px;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.info_box .info-title {
    height: 60px;
    width: 100%;
    border-bottom: 1px solid var(--light-grey);
    display: flex;
    align-items: center;
    padding: 0 30px;
    border-radius: 5px 5px 0 0;
    font-size: 20px;
    font-weight: 600;
}

.info_box .info-list {
    padding: 15px 30px;
}

.info_box .info-list .info {
    margin: 5px 0;
    font-size: 17px;
}

.info_box .info-list .info span {
    font-weight: 600;
    color: var(--primary-color);
}

.info_box .buttons {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 30px;
    border-top: 1px solid var(--light-grey);
}

.info_box .buttons button {
    margin: 0 5px;
    height: 40px;
    width: 100px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    outline: none;
    border-radius: 5px;
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
    background-color: var(--primary-color);
    color: var(--white);
}

.quiz_box {
    width: 600px;
    background: var(--white);
    border-radius: 5px;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.quiz_box .header-quiz {
    position: relative;
    z-index: 2;
    height: 70px;
    padding: 0 30px;
    background: var(--white);
    border-radius: 5px 5px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0px 3px 5px 1px rgba(0,0,0,0.1);
}

.quiz_box .header-quiz .title {
    font-size: 20px;
    font-weight: 600;
    padding-right: 20px;
}

.quiz_box .header-quiz .timer {
    color: #004085;
    background: #cce5ff;
    border: 1px solid #b8daff;
    height: 45px;
    padding: 0 8px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 145px;
}

.quiz_box .header-quiz .timer .time_left_txt {
    font-weight: 400;
    font-size: 17px;
    user-select: none;
}

.quiz_box .header-quiz .timer .timer_sec {
    font-size: 18px;
    font-weight: 500;
    height: 30px;
    width: 45px;
    color: #fff;
    border-radius: 5px;
    line-height: 30px;
    text-align: center;
    background: var(--dark-grey);
    border: 1px solid var(--dark-grey);
    user-select: none;
}

.quiz_box .header-quiz .time_line {
    position: absolute;
    bottom: 0px;
    left: 0px;
    height: 3px;
    background: var(--secondary-color);
}

.section-quiz_box {
    padding: 25px 30px 20px 30px;
    background: var(--white);
}

.section-quiz_box .que_text {
    font-size: 25px;
    font-weight: 600;
}

.section-quiz_box .option_list {
    padding: 20px 0px;
    display: block;   
}

.section-quiz_box .option_list .option {
    background: aliceblue;
    border: 1px solid #84c5fe;
    border-radius: 5px;
    padding: 8px 15px;
    font-size: 17px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-quiz_box .option_list .option:last-child {
    margin-bottom: 0px;
}

.section-quiz_box .option_list .option:hover {
    color: #004085;
    background: #cce5ff;
    border: 1px solid #b8daff;
}

.section-quiz_box .option_list .option.correct {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.section-quiz_box .option_list .option.incorrect {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.section-quiz_box .option_list .option.disabled {
    pointer-events: none;
}

.section-quiz_box .option_list .option .icon {
    height: 26px;
    width: 26px;
    border: 2px solid transparent;
    border-radius: 50%;
    text-align: center;
    font-size: 13px;
    pointer-events: none;
    transition: all 0.3s ease;
    line-height: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.option_list .option .icon.tick {
    color: #23903c;
    border-color: #23903c;
    background: #d4edda;
    display: flex;
    text-align: center;
}

.option_list .option .icon.cross {
    color: #a42834;
    background: #f8d7da;
    border-color: #a42834;
    display: flex;
    text-align: center;
}

.footer-quiz {
    height: 60px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--light-grey);
}

.footer-quiz .total_que span {
    display: flex;
    user-select: none;
}

.footer-quiz .total_que span p {
    font-weight: 500;
    padding: 0 5px;
}

.footer-quiz .total_que span p:first-child {
    padding-left: 0px;
}

.footer-quiz button {
    height: 40px;
    padding: 0 13px;
    font-size: 18px;
    font-weight: 400;
    cursor: pointer;
    border: none;
    outline: none;
    color: #fff;
    border-radius: 5px;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    line-height: 10px;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.footer-quiz button:hover {
    background: var(--primary-color);
}

.footer-quiz button.show {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.result_box {
    background: var(--white);
    border-radius: 5px;
    display: flex;
    padding: 25px 30px;
    width: 450px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.result_box .icon {
    font-size: 100px;
    color: var(--white);
    margin-bottom: 10px;
}

.result_box .complete_text {
    font-size: 20px;
    font-weight: 500;
}

.result_box .score_text span {
    display: flex;
    margin: 10px 0;
    font-size: 18px;
    font-weight: 500;
}

.result_box .score_text span p {
    padding: 0 4px;
    font-weight: 600;
}

.result_box .buttons {
    display: flex;
    margin: 20px 0;
}

.result_box .buttons button {
    margin: 0 10px;
    height: 45px;
    padding: 0 20px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    outline: none;
    border-radius: 5px;
    border: 1px solid var(--primary-color);
    transition: all 0.3s ease;
}

.result_box .buttons button:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    border: 1px solid var(--secondary-color);
}

.buttons button {
    color: var(--primary-color);
    background: var(--white);
}

.buttons button:hover {
    background: var(--secondary-color);
    color: var(--white);
    border: var(--secondary-color);
}

@media only screen and (max-width: 600px) {
    .quiz-module-title {
        background-color: var(--primary-color);
        font-size: 1rem;
        padding-top: 50px;
        padding-bottom: 30px;
    }

    .start_btn,
    .info_box,
    .quiz_box,
    .result_box {
        width: 80%; 
    }

    .start_btn {
        font-size: 1rem;
        border-radius: 8px;
        width: 60%; 
        margin: 0 auto; 
        margin-bottom: 280px;
    }

    .quiz_box,
    .result_box {
        padding: 15px;
    }

    .quiz_box .header-quiz {
        padding: 20px;
        text-align: center; 
    } 

    .quiz_box .header-quiz .title
    .quiz_box .header-quiz .timer {
        margin-top: 15px; 
    }

    .quiz_box .header-quiz .time_line {
        display: none; 
    }

    .section-quiz_box {
        padding: 15px;
    }

    .section-quiz_box .que_text {
        font-size: 20px; 
    }

    .section-quiz_box .option_list .option {
        font-size: 14px;
    }

    .footer-quiz {
        flex-direction: column; 
        align-items: center; 
    }

    .footer-quiz .total_que {
        margin-top: 10px;
    }

    .footer-quiz .next_btn {
        margin-top: 10px; 
    }

    .footer-quiz button {
        font-size: 16px; 
    }

    .timer {
        padding-bottom: 15px;
    }

    .title {
        padding-top: 10px;
    }

    .time_left_txt {
        display: flex;
    }

    .result_box {
        display: flex;
        flex-direction: column;
    }

    .result_box .buttons {
        display: flex;
        flex-direction: column;
        align-items: center; 
    }
    
    .result_box .score_text {
        text-align: center;
        line-height: 0.2;
    }

    .result_box .buttons .restart {
        margin-bottom: 15px;
    }
}

