/* ==========================================================
   FAQ
========================================================== */

.formation-faq{
    padding:8rem 0;
    background:#fff;
}

.formation-faq .content{
    width:min(1200px,92%);
    margin:auto;
}


/* ==========================================================
   CONTENEUR FAQ
========================================================== */

#faq-container{
    max-width:1000px;

    margin:4rem auto 0;

    display:flex;
    flex-direction:column;

    gap:1rem;
}


/* ==========================================================
   ITEM
========================================================== */

.faq-item{
    width:100%;

    background:#fff;

    border:1px solid #e5e5e5;

    transition:
        border-color .3s ease,
        box-shadow .3s ease;
}

.faq-item:hover{
    border-color:var(--accent);
}

.faq-item.open{
    border-color:var(--accent);

    box-shadow:0 12px 30px rgba(0,0,0,.08);
}


/* ==========================================================
   QUESTION
========================================================== */

.faq-question{
    width:100%;

    display:flex;
    justify-content:space-between;
    align-items:center;

    gap:2rem;

    padding:1.8rem 2rem;

    background:#fff;

    border:none;

    cursor:pointer;

    text-align:left;

    font-family:var(--font-heading);

    font-size:1.35rem;
    font-weight:700;

    color:#222;
}


/* ==========================================================
   ICÔNE
========================================================== */

.faq-icon{
    width:18px;
    height:18px;

    flex-shrink:0;

    font-size:0;

    border-right:3px solid var(--accent);
    border-bottom:3px solid var(--accent);

    transform:rotate(45deg);

    transition:transform .35s ease;
}

.faq-item.open .faq-icon{
    transform:rotate(225deg);
}


/* ==========================================================
   RÉPONSE
========================================================== */

.faq-answer{
    max-height:0;

    overflow:hidden;

    background:#fafafa;

    transition:max-height .45s ease;
}

.faq-answer p{
    margin:0;

    padding:0 2rem 2rem;

    color:#555;

    font-size:1.08rem;
    line-height:1.8;

    /* Respecte les \n et \n\n présents dans questions.json */
    white-space:pre-wrap;
}

.faq-item.open .faq-answer{
    max-height:2000px;
}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width:768px){

    .formation-faq{
        padding:5rem 0;
    }

    #faq-container{
        margin-top:2.5rem;
    }

    .faq-question{
        gap:1.5rem;

        padding:1.4rem 1.5rem;

        font-size:1.15rem;
    }

    .faq-answer p{
        padding:0 1.5rem 1.5rem;

        font-size:1rem;
        line-height:1.7;
    }

}