/**
 * Module BWA Auto FAQ - CSS pour le Front Office
 *
 * @author    BWA Dev
 * @copyright 2025 BWA Dev
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/* Styles pour le widget FAQ */
.bwa-faq-container {
    margin: 30px 0;
    padding: 0;
}

.bwa-faq-title {
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #232323;
}

.bwa-faq-accordion {
    border-radius: 5px;
    overflow: hidden;
}

/* Style des questions */
.bwa-faq-question {
    gap: 10px;
    padding: 15px;
    margin-bottom: 1px;
    cursor: pointer;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-bottom: 1px solid #f2f2f2;
}

.bwa-faq-question:hover {
    background-color: #eaeaea;
}

.bwa-faq-question[aria-expanded="true"] {
    background-color: #f0f0f0;
}

.bwa-faq-question h3,
.bwa-faq-question h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #232323;
    flex: 1;
}

/* Icône flèche pour indiquer l'état ouvert/fermé */
.bwa-faq-icon {
    width: 20px;
    height: 20px;
    position: relative;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

/* Création de la flèche avec CSS */
.bwa-faq-icon:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 6px 10px;
    border-color: transparent transparent transparent #232323;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
}

/* Rotation de la flèche quand ouvert */
.bwa-faq-question[aria-expanded="true"] .bwa-faq-icon {
    transform: rotate(90deg);
}

/* Style alternatif avec chevron (optionnel) */
.bwa-faq-icon.chevron:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid #232323;
    border-bottom: 2px solid #232323;
    transform: translate(-70%, -50%) rotate(-45deg);
    transition: transform 0.3s ease;
}

.bwa-faq-question[aria-expanded="true"] .bwa-faq-icon.chevron:before {
    transform: translate(-50%, -70%) rotate(45deg);
}

/* Cache l'icône FontAwesome par défaut */
.bwa-faq-icon .fa {
    display: none;
}

/* Style des réponses */
.bwa-faq-answer {
    font-weight: 300;
    padding: 0;
    overflow: hidden;
    background-color: white;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.bwa-faq-answer.show,
.bwa-faq-answer.collapse.in {
    max-height: 500px;
}

.bwa-faq-answer-content {
    padding: 20px;
}

.bwa-faq-answer-content p:last-child {
    margin-bottom: 0;
}

/* Style pour les FAQ en liste (sans accordéon) */
.bwa-faq-list .bwa-faq-item{
    border-bottom: 1px solid #f2f2f2;
    padding: 15px 0;
    margin-bottom: 10px;
}

.bwa-faq-list .bwa-faq-item:first-child{
    border-top: 1px solid #f2f2f2;
}

.bwa-faq-list .bwa-faq-question {
    background: none;
    border: none;
    cursor: default;
    padding: 0 0 10px 0;
}

.bwa-faq-list .bwa-faq-answer {
    max-height: none;
    background: none;
}

.bwa-faq-list .bwa-faq-answer-content {
    padding: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .bwa-faq-question {
        padding: 12px;
        font-size: 0.95rem;
    }

    .bwa-faq-answer-content {
        padding: 15px;
    }

    .bwa-faq-question h3,
    .bwa-faq-question h4 {
        font-size: 1rem;
    }
}
