/* ================================================
   FAQ Huiles Berliet — Accordéon par catégorie
   ================================================ */

.hb-faq-wrapper {
    margin: 0 auto;
}

/* --- Section catégorie --- */
.hb-faq-section {
    margin-bottom: 40px;
}

.hb-faq-cat-title {
    text-transform: uppercase;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--e-global-color-primary, #1a1a1a);
}

/* --- Liste de questions --- */
.hb-faq-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* --- Item accordéon --- */
.hb-faq-item {
    border: 1px solid var(--e-global-color-primary);
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
}

/* --- Question (summary) --- */
.hb-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
        transition: background .2s ease, color .2s ease;
}

/* Supprime la flèche native sur tous les navigateurs */
.hb-faq-question::-webkit-details-marker { display: none; }
.hb-faq-question::marker { display: none; }

.hb-faq-question:hover {
    background: #f7f7f7;
}

details[open] > .hb-faq-question {
    background:var(--e-global-color-primary);
    color: #fff;
    font-weight: 600;
}

.hb-faq-q-text {
    flex: 1;
    line-height: 1.5;
}

/* --- Icône +/× --- */
.hb-faq-icon {
    position: relative;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.hb-faq-icon::before,
.hb-faq-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--e-global-color-primary, #1a1a1a);
    border-radius: 2px;
    transform: translate(-50%, -50%);
    transition: transform .3s ease, opacity .3s ease;
}

/* barre horizontale */
.hb-faq-icon::before {
    width: 14px;
    height: 2px;
}

/* barre verticale */
.hb-faq-icon::after {
    width: 2px;
    height: 14px;
}

/* Quand ouvert : barre verticale tourne → croix devient tiret */
details[open] .hb-faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

/* --- Réponse --- */
.hb-faq-reponse {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .3s ease;
    border-top: 0px solid #e2e2e2;
}

details[open] .hb-faq-reponse {
    max-height: 2000px;
    padding: 18px 20px 22px;
    border-top-width: 1px;
    background: var(---e-global-color-4d87c53);
}

.hb-faq-reponse p {
    margin: 0 0 10px;
}

.hb-faq-reponse p:last-child {
    margin-bottom: 0;
}

.hb-faq-reponse a {
     text-decoration: underline;
}

.hb-faq-reponse a:hover {
    opacity: .75;
}

.hb-faq-reponse ul,
.hb-faq-reponse ol {
    margin: 0 0 10px 20px;
    line-height: 1.75;
    
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .hb-faq-question {
        padding: 14px 16px;
        font-size: .88rem;
    }
    .hb-faq-reponse {
        font-size: .85rem;
    }
    details[open] .hb-faq-reponse {
        padding: 14px 16px 18px;
    }
}
