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

.faq__introduction p {
    width: 60vw;
    margin: 45px auto;
    text-align: center;
}

.btn {
    display: flex;
    justify-content: center;
    align-items: center;
}

.accordion {
    width: 80%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    padding-bottom: 25px;
    margin-bottom: 50px;
}

.accordion h2 {
    color: var(--colorSecondary);
    text-transform: uppercase;
}

.faq {
    width: 100%;
    margin-top: 30px;
    padding: 20px 15px 0;
    border-radius: 8px;
    cursor: pointer;
    background-color: var(--important);
    transition: box-shadow 0.3s ease-in-out,
        background-color 0.3s ease-in-out;
}

.faq:hover,
.faq.active {
    box-shadow: 0 1px 6px var(--colorSecondary);
    background-color: var(--paragraph);
}

.question {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.question h3 {
    margin-bottom: 16px;
    color: var(--text);
}

.fa-solid.fa-chevron-down {
    font-size: 1.1em;
    margin: 0 12px 16px;
    color: var(--text);
}

.answer {
    max-height: 0;
    overflow: hidden;
    will-change: transform;
    transition: max-height 1.2s ease;
}

.answer p {
    margin: 16px 0;
    color: var(--text);
    font-weight: 500;
    will-change: transform;
}

.faq.active .answer {
    max-height: fit-content;
    animation: fade 1s ease-in-out;
}

.faq.active .fa-solid.fa-chevron-down {
    transform: rotate(180deg);
}

/**** Animation fade ****/

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

/**** Responisve design Tablette ****/

@media screen and (max-width: 992px) {
    .question {
        justify-content: center;
    }

    .question h3 {
        text-align: center;
    }

    .fa-solid.fa-chevron-down {
        display: none;
    }
}

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

@media screen and (max-width: 768px) {
    .accordion {
        width: 100%;
    }

    .answer p {
        font-size: 1em;
    }
}