/**
 * Module FAQ Produit - Styles Front-Office
 * 
 * @author    Energiedin
 * @copyright 2024 Energiedin
 * @license   AFL-3.0
 */

.ed-product-faq {
    padding: 10px 0;
}

.ed-product-faq .faq-list {
    display: flex;
    flex-direction: column;
}

.ed-product-faq .faq-item {
    border: 1px solid #CDCDCD;
    border-radius: 0px;
    overflow: hidden;
    margin-top: -1px;
    transition: box-shadow 0.2s ease;
}

.ed-product-faq .faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    gap: 15px;
}

.ed-product-faq .faq-question:hover {
    background-color: #f8f9fa;
}

.ed-product-faq .faq-question-text {
    font-weight: 600;
    font-size: 18px;
    color: #000;
    flex-grow: 1;
    line-height: 1.4;
}

.ed-product-faq .faq-toggle-icon {
    position: relative;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.ed-product-faq .faq-toggle-icon:after {
    content: '\f067';
    font-family: 'Font Awesome 5 Pro';
    background-color: #E3E3E3;
    min-width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding-top: 3px;
    color: #6A6A6A;
}

.ed-product-faq .faq-item.active .faq-toggle-icon:after {
    content: '\f068';
}

.ed-product-faq .faq-answer {
    display: none;
    border-top: 1px solid #cdcdcd;
}

.ed-product-faq .faq-answer-content {
    padding: 20px;
    font-size: 14px;
    line-height: 1.7;
    color: #000;
}

.ed-product-faq .faq-answer-content p {
    margin-bottom: 10px;
    font-family: 'Instrument Sans' !important;
    font-size: 15px !important;
    background-color: unset !important;
}

.ed-product-faq .faq-answer-content span {
    font-family: 'Instrument Sans' !important;
    font-size: 15px !important;
    background-color: unset !important;
}

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

/* Animation slide */
.ed-product-faq .faq-answer.sliding-down {
    display: block;
    animation: slideDown 0.3s ease forwards;
}

.ed-product-faq .faq-answer.sliding-up {
    animation: slideUp 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        max-height: 500px;
    }
    to {
        opacity: 0;
        max-height: 0;
    }
}

/* Style accordéon */
.ed-product-faq.accordion-style .faq-item {
    border-radius: 0;
    border-bottom: none;
}

.ed-product-faq.accordion-style .faq-item:first-child {
    border-radius: 8px 8px 0 0;
}

.ed-product-faq.accordion-style .faq-item:last-child {
    border-radius: 0 0 8px 8px;
    border-bottom: 1px solid #e5e5e5;
}

.ed-product-faq.accordion-style .faq-item:only-child {
    border-radius: 8px;
}

/* Schéma structuré */
.ed-product-faq .faq-schema {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .ed-product-faq .faq-question {
        padding: 12px 15px;
    }
    
    .ed-product-faq .faq-question-text {
        font-size: 14px;
    }
    
    .ed-product-faq .faq-answer-content {
        padding: 15px;
        font-size: 13px;
    }
}

/* Intégration dans les tabs produit */
#extra-product-faq .ed-product-faq,
.product-faq-content .ed-product-faq {
    padding: 0;
}

/* Tab FAQ icon */
.nav-tabs a[href*="faq"]::before,
.nav-tabs a[href*="product-faq"]::before {
    content: "";
}
