/* ========================= Conteneur général ========================= */
#ecofin-faq {
    display: flex;
    flex-direction: column;
    max-width: 900px;
    margin: 0 auto;
    font-size: 15px;
    color: #333;
}

/* ========================= Bouton chatbot ========================= */
#ecofin-faq-chatbot-link {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    text-align: center;
    background-color: #0073aa;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
}

/* ========================= Layout desktop ========================= */
.ecofin-faq-container {
    display: flex;
    gap: 20px;
}

/* ========================= Menu catégories ========================= */
.ecofin-faq-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 220px;
    border-right: 1px solid #ddd;
    background: #f9f9f9;
}

.ecofin-faq-menu li {
    padding: 6px 12px; /* réduit le padding vertical pour éviter les grandes boîtes */
    cursor: pointer;
    border-bottom: 1px solid #eee;
    line-height: 1.3; /* ligne plus compacte */
    word-break: break-word; /* pour que le texte long passe à la ligne naturellement */
}

.ecofin-faq-menu li.active {
    background: #0073aa;
    color: #fff;
}

/* ========================= Contenu FAQ ========================= */
.ecofin-faq-content {
    flex: 1;
}

/* ========================= Question / Réponse ========================= */
.faq-item {
    margin-bottom: 12px;
}

.faq-question {
    padding: 6px 10px; /* réduit le padding vertical pour éviter les grandes boîtes */
    background: #f0f0f0;
    cursor: pointer;
    font-weight: 600;
    line-height: 1.3; /* ligne plus compacte */
    word-break: break-word; /* pour que le texte long passe à la ligne naturellement */
}

.faq-answer {
    display: none;
    padding: 10px;
    background: #fff;
    border-left: 3px solid #0073aa;
}

/* Affichage actif */
.faq-answer.slide-down {
    display: block;
}

/* ========================= MOBILE CLEAN ========================= */
@media (max-width: 768px) {
    .ecofin-faq-container {
        flex-direction: column;
    }

    .ecofin-faq-menu {
        width: 100%;
        border-right: none;
    }

    .ecofin-faq-menu li {
        font-size: 16px;
        padding: 10px 12px; /* réduit légèrement le padding vertical */
    }

    .ecofin-faq-content {
        display: none;
    }

    .ecofin-faq-content.mobile-active {
        display: block;
        margin-top: 10px;
    }
}

/* ========================= FAQ PREMIUM – Texte compact ========================= */
.faq-answer {
    line-height: 1.35;
    font-size: 14.5px;
    position: relative;
}

.faq-answer p {
    margin: 0 0 6px 0;
}

/* Limitation de hauteur (si tu gardes le collapsed) */
.faq-answer.collapsed {
    max-height: 80px;
    overflow: hidden;
}

/* Effet fondu en bas */
.faq-answer.collapsed::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
}

/* Bouton Lire plus – tu peux le garder mais inutile si tu supprimes le JS */
.faq-read-more {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    color: #0073aa;
    cursor: pointer;
    font-weight: 600;
}

.faq-read-more:hover {
    text-decoration: underline;
}
