/* =====================================================================
 * Fichier : assets/css/pages/faq.css
 * Projet  : Brennholz Shop24
 * Rôle    : Styles propres à la foire aux questions (faq.php) :
 *           bandeau avec recherche, navigation par thèmes (collante sur
 *           ordinateur, défilante sur mobile), accordéons animés,
 *           surlignage des résultats, état « aucun résultat » et bloc
 *           d'aide final.
 * ===================================================================== */

/* ---------------------------------------------------------------------
 * 1. Bandeau + recherche
 * ------------------------------------------------------------------- */
.fq-hero { padding-bottom: clamp(3rem, 6vw, 4.5rem); }
.fq-hero-embers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.fq-hero-inner { position: relative; z-index: 2; }
.fq-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; margin-top: 1rem; }
.fq-hero-text h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); animation: hfk-fade-up .7s var(--hfk-ease) both; }
.fq-hero-text h1 span { display: block; font-size: .6em; line-height: 1.25; margin-top: .35rem; background: var(--hfk-grad-fire-h); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fq-hero-text p { animation: hfk-fade-up .7s .12s var(--hfk-ease) both; }

.fq-search { position: relative; padding: clamp(1.2rem, 2.6vw, 1.8rem); background: #fff; border-top: 5px solid var(--hfk-flame); box-shadow: var(--hfk-shadow-lg); animation: hfk-fade-up .7s .2s var(--hfk-ease) both; }
.fq-search-label { display: block; margin-bottom: .7rem; font-family: var(--hfk-font-head); font-size: 1.2rem; font-weight: 700; color: var(--hfk-charcoal); }
.fq-search-field { position: relative; display: flex; align-items: stretch; border: 2px solid var(--hfk-border); background: #fff; transition: border-color .3s, box-shadow .3s; }
.fq-search-field:focus-within { border-color: var(--hfk-flame); box-shadow: 0 0 0 4px rgba(34, 166, 75, .15); }
.fq-search-icon { width: 48px; flex: 0 0 48px; display: grid; place-items: center; color: var(--hfk-flame); }
.fq-search-field input { flex: 1; min-width: 0; height: 56px; padding: 0 .3rem; border: 0; outline: 0; font-size: 1.02rem; color: var(--hfk-text); background: transparent; }
.fq-search-field input::-webkit-search-cancel-button { display: none; }
.fq-search-field input::placeholder { color: #A3A9AF; }
.fq-search-clear { width: 44px; flex: 0 0 44px; border: 0; background: transparent; color: var(--hfk-muted); transition: color .25s, transform .3s var(--hfk-ease-bounce); }
.fq-search-clear:hover { color: var(--hfk-ember); transform: rotate(90deg); }
.fq-search-clear[hidden] { display: none; }
.fq-search-submit { flex: 0 0 auto; padding-inline: 1.4rem; }
.fq-count { margin: .75rem 0 0; font-size: .92rem; font-weight: 600; color: var(--hfk-charcoal) !important; max-width: none !important; }
.fq-count.is-pulse { animation: fq-pop .4s var(--hfk-ease); }
.fq-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .9rem; font-size: .84rem; color: var(--hfk-muted); }
.fq-suggest span { font-weight: 600; margin-right: .2rem; }
.fq-suggest a { padding: .28rem .7rem; background: var(--hfk-cream); border: 1px solid var(--hfk-border); color: var(--hfk-charcoal); font-weight: 500; transition: background .25s, color .25s, border-color .25s, transform .3s var(--hfk-ease); }
.fq-suggest a:hover, .fq-suggest a.is-active { background: var(--hfk-flame); border-color: var(--hfk-flame); color: #fff; transform: translateY(-2px); }

/* ---------------------------------------------------------------------
 * 2. Mise en page : navigation + contenu
 * ------------------------------------------------------------------- */
.fq-main { overflow-x: clip; }
.fq-layout { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(1.5rem, 3.5vw, 3rem); align-items: start; }

.fq-nav { position: sticky; top: calc(var(--fq-sticky, var(--hfk-header-h, 76px)) + 1.2rem); background: #fff; border: 1px solid var(--hfk-border); box-shadow: var(--hfk-shadow-sm); }
.fq-nav-title { margin: 0; padding: 1rem 1.2rem .7rem; font-family: var(--hfk-font-head); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--hfk-muted); }
.fq-nav-list { margin: 0; padding: 0 0 .4rem; list-style: none; }
.fq-nav-link { position: relative; display: flex; align-items: center; gap: .75rem; padding: .7rem 1.2rem; color: var(--hfk-text); font-weight: 500; line-height: 1.3; transition: background .25s, color .25s, padding .35s var(--hfk-ease); }
.fq-nav-link::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--hfk-grad-fire); transform: scaleY(0); transition: transform .35s var(--hfk-ease); }
.fq-nav-link:hover { background: var(--hfk-cream); color: var(--hfk-charcoal); padding-left: 1.45rem; }
.fq-nav-link.is-active { background: #FFF3EA; color: var(--hfk-flame-dark); font-weight: 600; }
.fq-nav-link.is-active::before { transform: scaleY(1); }
.fq-nav-link.is-empty { opacity: .45; }
.fq-nav-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; background: var(--hfk-cream); color: var(--hfk-flame-dark); font-size: .9rem; transition: background .25s, color .25s, transform .4s var(--hfk-ease-bounce); }
.fq-nav-link.is-active .fq-nav-icon { background: var(--hfk-flame); color: #fff; transform: rotate(-6deg); }
.fq-nav-label { flex: 1; min-width: 0; }
.fq-nav-count { min-width: 28px; padding: .1rem .45rem; text-align: center; background: var(--hfk-ash); font-size: .76rem; font-weight: 700; color: var(--hfk-muted); font-variant-numeric: tabular-nums; transition: background .25s, color .25s; }
.fq-nav-link.is-active .fq-nav-count { background: var(--hfk-flame); color: #fff; }
.fq-nav-help { margin: 0; padding: 1rem 1.2rem 1.2rem; border-top: 1px solid var(--hfk-border); background: var(--hfk-cream); }
.fq-nav-help strong { display: block; font-family: var(--hfk-font-head); color: var(--hfk-charcoal); }
.fq-nav-help p { margin: .25rem 0 .5rem; font-size: .88rem; color: var(--hfk-muted); }

.fq-content { min-width: 0; }
.fq-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-bottom: 1.4rem; padding-bottom: .9rem; border-bottom: 2px solid var(--hfk-ash); }
.fq-toolbar p { margin: 0; font-weight: 600; color: var(--hfk-charcoal); overflow-wrap: anywhere; }
.fq-toggle-all { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .95rem; border: 1.5px solid var(--hfk-border); background: #fff; font-weight: 600; font-size: .88rem; color: var(--hfk-charcoal); transition: border-color .25s, color .25s, background .25s; }
.fq-toggle-all i { width: 14px; transition: transform .4s var(--hfk-ease); }
.fq-toggle-all:hover { border-color: var(--hfk-flame); color: var(--hfk-flame-dark); }
.fq-toggle-all[aria-pressed="true"] i { transform: rotate(180deg); }

/* ---------------------------------------------------------------------
 * 3. Groupes et accordéons
 * ------------------------------------------------------------------- */
.fq-group { margin-bottom: clamp(2rem, 4vw, 3rem); scroll-margin-top: calc(var(--hfk-header-h, 76px) + 1.2rem); }
.fq-group[hidden] { display: none; }
.fq-group-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.fq-group-head h2 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.65rem); }
.fq-group-head small { color: var(--hfk-muted); font-size: .86rem; }
.fq-group-head > div { flex: 1; min-width: 0; }
.fq-group-icon { width: 52px; height: 52px; flex: 0 0 52px; display: grid; place-items: center; color: #fff; font-size: 1.2rem; background: var(--hfk-flame); box-shadow: var(--hfk-shadow-sm); }
.fq-group-icon.is-c1 { background: var(--hfk-amber); color: var(--hfk-charcoal); }
.fq-group-icon.is-c2 { background: var(--hfk-forest); }
.fq-group-icon.is-c3 { background: var(--hfk-ember); }
.fq-group-icon.is-c4 { background: var(--hfk-sky); }
.fq-group-icon.is-c5 { background: var(--hfk-plum); }
.fq-anchor { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; color: var(--hfk-muted); border: 1px solid var(--hfk-border); opacity: .6; transition: opacity .25s, color .25s, border-color .25s, transform .3s var(--hfk-ease); }
.fq-group-head:hover .fq-anchor, .fq-anchor:focus-visible { opacity: 1; }
.fq-anchor:hover { color: var(--hfk-flame-dark); border-color: var(--hfk-flame); transform: rotate(-12deg); }

.fq-items { display: grid; gap: .7rem; }
.fq-item { position: relative; background: #fff; border: 1px solid var(--hfk-border); border-left: 4px solid var(--hfk-border); scroll-margin-top: calc(var(--hfk-header-h, 76px) + 1.5rem); transition: border-color .3s, box-shadow .35s var(--hfk-ease), transform .35s var(--hfk-ease); }
.fq-item[hidden] { display: none; }
.fq-item:hover { border-left-color: var(--hfk-amber); box-shadow: var(--hfk-shadow-sm); }
.fq-item.is-open { border-left-color: var(--hfk-flame); box-shadow: var(--hfk-shadow); }
.fq-item.is-target { animation: fq-target 1.8s var(--hfk-ease); }
.fq-item.is-entering { animation: hfk-fade-up .4s var(--hfk-ease) both; }

.fq-q { margin: 0; font-size: 1.04rem; }
.fq-q-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.05rem 1.2rem; border: 0; background: transparent; text-align: left; font-family: var(--hfk-font-head); font-size: inherit; font-weight: 600; line-height: 1.4; color: var(--hfk-charcoal); cursor: pointer; transition: color .25s; }
.fq-q-btn:hover, .fq-item.is-open .fq-q-btn { color: var(--hfk-flame-dark); }
.fq-q-text { min-width: 0; overflow-wrap: anywhere; }
.fq-q-sign { position: relative; width: 34px; height: 34px; flex: 0 0 34px; background: var(--hfk-cream); transition: background .3s, transform .45s var(--hfk-ease); }
.fq-q-sign::before, .fq-q-sign::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px; background: var(--hfk-flame-dark); transition: transform .45s var(--hfk-ease), background .3s; }
.fq-q-sign::after { transform: rotate(90deg); }
.fq-item.is-open .fq-q-sign { background: var(--hfk-flame); transform: rotate(180deg); }
.fq-item.is-open .fq-q-sign::before, .fq-item.is-open .fq-q-sign::after { background: #fff; }
.fq-item.is-open .fq-q-sign::after { transform: rotate(0deg); }

/* Panneau : ouvert par défaut sans JavaScript, animé en hauteur avec JavaScript */
.fq-a { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .45s var(--hfk-ease), visibility .45s; }
.js .fq-item:not(.is-open) .fq-a { grid-template-rows: 0fr; visibility: hidden; }
.fq-a-inner { min-height: 0; overflow: hidden; }
.fq-a-text { padding: 0 1.2rem .4rem; color: var(--hfk-text); line-height: 1.7; }
.fq-a-text p { margin: 0 0 .8rem; }
.fq-a-text p:last-child { margin-bottom: .6rem; }
.js .fq-a-text { opacity: 0; transform: translateY(-6px); transition: opacity .35s, transform .45s var(--hfk-ease); }
.js .fq-item.is-open .fq-a-text { opacity: 1; transform: none; transition-delay: .08s; }
.fq-a-foot { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 0 1.2rem 1.1rem; padding-top: .75rem; border-top: 1px dashed var(--hfk-border); }
.fq-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; color: var(--hfk-muted); }
.fq-link i { width: 14px; }
.fq-link:hover { color: var(--hfk-flame-dark); }
.fq-link.is-copied { color: var(--hfk-forest-dark); }

/* Surlignage des termes recherchés */
mark.fq-mark { padding: 0 .1em; background: var(--hfk-amber-light); color: inherit; box-shadow: inset 0 -2px 0 var(--hfk-amber); animation: fq-mark .5s var(--hfk-ease); }

/* ---------------------------------------------------------------------
 * 4. Aucun résultat
 * ------------------------------------------------------------------- */
.fq-empty { padding: clamp(1.6rem, 4vw, 3rem); text-align: center; background: var(--hfk-cream); border: 2px dashed var(--hfk-border); animation: hfk-fade-up .45s var(--hfk-ease) both; }
.fq-empty[hidden] { display: none; }
.fq-empty-icon { width: 76px; height: 76px; margin: 0 auto 1rem; display: grid; place-items: center; background: #fff; color: var(--hfk-flame); font-size: 1.8rem; box-shadow: var(--hfk-shadow-sm); animation: hfk-float 4s ease-in-out infinite; }
.fq-empty h2 { margin: 0 0 .6rem; font-size: clamp(1.25rem, 2.4vw, 1.6rem); overflow-wrap: anywhere; }
.fq-empty p { max-width: 620px; margin: 0 auto 1.3rem; color: var(--hfk-muted); }
.fq-empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }

/* ---------------------------------------------------------------------
 * 5. Aide finale
 * ------------------------------------------------------------------- */
.fq-help { overflow: hidden; overflow-x: clip; }
.fq-help-embers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.fq-help .container-xxl { position: relative; z-index: 1; }
.fq-help-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.fq-help-text h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.fq-help-text p { color: #D5DADF; }
.fq-help-hours { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .9rem; background: rgba(255, 255, 255, .08); border-left: 3px solid var(--hfk-amber); color: #fff !important; font-weight: 600; }
.fq-help-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.fq-help-card { --fq-c: var(--hfk-flame); position: relative; display: flex; flex-direction: column; gap: .35rem; padding: 1.3rem; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-top: 3px solid var(--fq-c); color: #fff; overflow: hidden; transition: background .3s, transform .4s var(--hfk-ease), box-shadow .4s; }
.fq-help-card::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--fq-c); opacity: .12; transition: transform .5s var(--hfk-ease); }
.fq-help-card:hover { color: #fff; background: rgba(255, 255, 255, .11); transform: translateY(-5px); box-shadow: 0 18px 40px rgba(0, 0, 0, .3); }
.fq-help-card:hover::after { transform: scale(1.6); }
.fq-help-card.is-forest { --fq-c: var(--hfk-forest); }
.fq-help-card.is-sky { --fq-c: #3BA3DB; }
.fq-help-card.is-amber { --fq-c: var(--hfk-amber); }
.fq-help-icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: .4rem; background: var(--fq-c); color: #fff; font-size: 1.1rem; transition: transform .45s var(--hfk-ease-bounce); }
.fq-help-card:hover .fq-help-icon { transform: rotate(-8deg) scale(1.08); }
.fq-help-card strong { font-family: var(--hfk-font-head); font-size: 1.08rem; overflow-wrap: anywhere; }
.fq-help-card small { color: #D5DADF; font-size: .86rem; line-height: 1.45; }

/* ---------------------------------------------------------------------
 * 6. Animations
 * ------------------------------------------------------------------- */
@keyframes fq-pop { 0% { transform: scale(.96); opacity: .4; } 100% { transform: none; opacity: 1; } }
@keyframes fq-mark { from { background: var(--hfk-amber); } to { background: var(--hfk-amber-light); } }
@keyframes fq-target {
    0%, 30% { box-shadow: 0 0 0 4px rgba(255, 227, 43, .65), var(--hfk-shadow); }
    100% { box-shadow: var(--hfk-shadow); }
}

/* ---------------------------------------------------------------------
 * 7. Adaptation aux écrans
 * ------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .fq-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); }
}
@media (max-width: 991.98px) {
    .fq-hero-grid, .fq-help-grid { grid-template-columns: minmax(0, 1fr); }
    .fq-layout { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
    /* Navigation : bande horizontale défilante, collée sous l'en-tête */
    .fq-nav { top: var(--fq-sticky, var(--hfk-header-h, 64px)); z-index: 20; margin: 0 calc(-1 * clamp(1rem, 3vw, 1.75rem)); border-left: 0; border-right: 0; box-shadow: 0 8px 18px rgba(20, 30, 40, .08); }
    .fq-nav-title, .fq-nav-help { display: none; }
    .fq-nav-list { display: flex; gap: .4rem; padding: .6rem clamp(1rem, 3vw, 1.75rem); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .fq-nav-list::-webkit-scrollbar { display: none; }
    .fq-nav-list li { flex: 0 0 auto; scroll-snap-align: start; }
    .fq-nav-link { padding: .45rem .75rem .45rem .45rem; border: 1px solid var(--hfk-border); white-space: nowrap; font-size: .9rem; gap: .5rem; }
    .fq-nav-link:hover { padding-left: .45rem; }
    .fq-nav-link::before { top: auto; left: 0; right: 0; width: auto; height: 3px; transform: scaleX(0); }
    .fq-nav-link.is-active::before { transform: scaleX(1); }
    .fq-nav-icon { width: 28px; height: 28px; flex-basis: 28px; font-size: .8rem; }
    .fq-group { scroll-margin-top: calc(var(--hfk-header-h, 64px) + 70px); }
    .fq-item { scroll-margin-top: calc(var(--hfk-header-h, 64px) + 76px); }
}
@media (max-width: 575.98px) {
    .fq-search-submit { display: none; }
    .fq-search-field input { height: 52px; }
    .fq-help-cards { grid-template-columns: minmax(0, 1fr); }
    .fq-q-btn { padding: .95rem 1rem; }
    .fq-a-text { padding: 0 1rem .3rem; }
    .fq-a-foot { margin: 0 1rem 1rem; }
    .fq-group-icon { width: 44px; height: 44px; flex-basis: 44px; font-size: 1rem; }
    .fq-empty-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .fq-a, .js .fq-a-text { transition: none; }
    .fq-empty-icon { animation: none; }
}