/* ═══════════════════════════════════════════════════════════════════════
   Captain FAQ — Styles Page Publique /faq + Sidebar Catégories Sticky
   Design clair & moderne harmonisé avec le Home de squale-systeme.com (#009ad0)
   @author CaptainLinux
   ═══════════════════════════════════════════════════════════════════════ */

/* Neutraliser le cadre parasite .card-block du thème sur la page FAQ */
body#module-ps_captainfaq-display #content.card-block,
body.module-ps_captainfaq-display #content.card-block {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* ── Wrapper Principal ── */
.cf-faq-page-wrapper {
    width: 100%;
    max-width: 1360px;
    margin: 0 auto 48px;
    padding: 6px 0 36px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}

/* ── En-tête Clair & Moderne (même style que la section Home) ── */
.cf-faq-hero {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 36px 32px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
    position: relative;
    overflow: hidden;
}

.cf-faq-hero-top {
    margin-bottom: 12px;
}

.cf-faq-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(0, 154, 208, 0.12);
    color: #007aa6;
    border: 1px solid rgba(0, 154, 208, 0.28);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 5px 14px;
    border-radius: 99px;
}

.cf-faq-hero-title {
    color: #0f172a !important;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 10px;
    line-height: 1.25;
}

.cf-faq-hero-subtitle {
    color: #475569;
    font-size: 0.96rem;
    line-height: 1.6;
    max-width: 720px;
    margin: 0 auto 24px;
}

.cf-faq-hero-subtitle strong {
    color: #009ad0;
    font-weight: 800;
}

/* ── Barre de recherche instantanée ── */
.cf-faq-search-box {
    position: relative;
    max-width: 660px;
    margin: 0 auto;
}

.cf-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #009ad0;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.cf-faq-search-input {
    width: 100%;
    padding: 15px 46px 15px 50px;
    border-radius: 12px;
    border: 2px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.cf-faq-search-input::placeholder {
    color: #94a3b8;
}

.cf-faq-search-input:focus {
    border-color: #009ad0;
    box-shadow: 0 0 0 4px rgba(0, 154, 208, 0.16);
}

.cf-faq-search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: #e2e8f0;
    border: none;
    color: #334155;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
}

.cf-faq-search-clear:hover {
    background: #cbd5e1;
}

/* ═══════════════════════════════════════════════════════════════════════
   GRILLE PRINCIPALE + SIDEBAR CATÉGORIES FIXE (STICKY)
   Ne bouge jamais lorsque l'on ouvre ou ferme une réponse à droite
   ═══════════════════════════════════════════════════════════════════════ */
#faqMainRow {
    display: grid !important;
    grid-template-columns: 330px 1fr;
    gap: 28px;
    align-items: start !important;
    margin: 0 !important;
}

#faqMainRow::before,
#faqMainRow::after {
    display: none !important;
}

.faq-sidebar-col {
    align-self: start !important;
    position: sticky !important;
    top: 96px !important;
    z-index: 10;
    width: 100% !important;
    padding: 0 !important;
}

.faq-sidebar {
    position: static !important;
    height: auto !important;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.faq-content-col {
    width: 100% !important;
    padding: 0 !important;
    min-width: 0;
}

@media (max-width: 991.98px) {
    #faqMainRow {
        grid-template-columns: 1fr;
    }
    .faq-sidebar-col {
        position: static !important;
        margin-bottom: 20px;
    }
    .cf-faq-hero {
        padding: 26px 18px;
    }
}

/* ── Navigation des Catégories dans la Sidebar ── */
.faq-sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #334155;
    margin-bottom: 12px;
    padding: 0 6px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.faq-category-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.faq-cat-btn {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 11px;
    padding: 11px 14px;
    color: #1e293b;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.faq-cat-btn-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.faq-cat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s;
}

.faq-cat-btn:hover {
    border-color: #009ad0;
    color: #007aa6;
    transform: translateX(2px);
}

.faq-cat-btn:hover .faq-cat-dot {
    background: #009ad0;
}

.faq-cat-btn.is-active {
    background: linear-gradient(135deg, #009ad0 0%, #0284c7 100%);
    border-color: #009ad0;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 154, 208, 0.28);
}

.faq-cat-btn.is-active .faq-cat-dot {
    background: #ffffff;
    transform: scale(1.2);
}

.faq-cat-count {
    background: #f1f5f9;
    color: #007aa6;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 99px;
    flex-shrink: 0;
}

.faq-cat-btn.is-active .faq-cat-count {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

/* ── Carte Support Technique intégrée dans la Sidebar (style Home) ── */
.faq-sidebar-support {
    margin-top: 18px;
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    border-radius: 13px;
    padding: 20px 18px;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.faq-sidebar-support-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0, 154, 208, 0.22);
    border: 1px solid rgba(0, 154, 208, 0.45);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.faq-sidebar-support h4 {
    color: #ffffff !important;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.faq-sidebar-support p {
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 0.8rem;
    line-height: 1.55;
    margin: 0 0 14px;
}

.faq-sidebar-support-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    background: linear-gradient(135deg, #009ad0 0%, #0284c7 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 0.84rem;
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.faq-sidebar-support-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 154, 208, 0.45);
    color: #ffffff !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   GROUPES DE QUESTIONS & ACCORDÉONS (MÊME DESIGN QUE LA SECTION HOME)
   ═══════════════════════════════════════════════════════════════════════ */
.faq-category-group {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 26px;
    margin-bottom: 24px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.faq-group-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.faq-group-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: linear-gradient(135deg, #009ad0 0%, #0284c7 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 154, 208, 0.28);
}

.faq-group-titles {
    flex: 1;
    min-width: 200px;
}

.faq-group-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a !important;
    margin: 0;
}

.faq-group-desc {
    font-size: 0.84rem;
    color: #64748b;
    margin: 3px 0 0;
}

.faq-group-badge {
    background: rgba(0, 154, 208, 0.12);
    color: #007aa6;
    border: 1px solid rgba(0, 154, 208, 0.25);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 99px;
}

/* ── Cartes Accordéons Questions / Réponses ── */
.faq-accordion-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.faq-item-card.is-open {
    border-color: #009ad0;
    box-shadow: 0 8px 24px rgba(0, 154, 208, 0.14);
}

.faq-item-question-btn {
    width: 100%;
    background: none;
    border: none;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    text-align: left;
    font-size: 0.96rem;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    line-height: 1.4;
}

.faq-q-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.faq-q-num {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #009ad0;
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.faq-item-card.is-open .faq-q-num {
    background: #009ad0;
    color: #ffffff;
}

.faq-q-text {
    color: #0f172a;
    font-weight: 700;
}

.faq-item-card.is-open .faq-q-text {
    color: #007aa6;
}

.faq-q-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s ease, background 0.2s, color 0.2s;
}

.faq-item-card.is-open .faq-q-arrow {
    transform: rotate(180deg);
    background: #009ad0;
    color: #ffffff;
}

.faq-item-answer-wrap {
    display: none;
    padding: 0 20px 18px 58px;
    border-top: 1px solid #f1f5f9;
}

@media (max-width: 575.98px) {
    .faq-item-answer-wrap {
        padding: 0 16px 16px 16px;
    }
    .faq-category-group {
        padding: 18px 16px;
    }
}

.faq-item-card.is-open .faq-item-answer-wrap {
    display: block;
}

.faq-item-answer-body {
    padding-top: 14px;
    font-size: 0.92rem;
    line-height: 1.68;
    color: #334155;
}

.faq-item-answer-body p {
    margin: 0 0 8px;
    color: #334155;
}

.faq-item-answer-body p:last-child {
    margin-bottom: 0;
}

.faq-item-answer-body ul,
.faq-item-answer-body ol {
    margin: 8px 0;
    padding-left: 20px;
}

.faq-item-answer-body strong {
    color: #0f172a;
}

/* Surlignage <mark> de la recherche live */
.faq-item-card mark.cf-highlight {
    background: #fef08a;
    color: #0f172a;
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 700;
}

/* ── Footer Vote Utilité + Copier Lien ── */
.faq-item-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.faq-helpful-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.faq-helpful-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-right: 4px;
}

.faq-vote-btn,
.faq-copy-link-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s;
}

.faq-vote-btn:hover,
.faq-copy-link-btn:hover {
    border-color: #009ad0;
    color: #009ad0;
    background: #f0f9ff;
}

.faq-vote-btn.is-voted {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
    cursor: default;
}

/* ── Aucun résultat ── */
.faq-no-results {
    text-align: center;
    padding: 44px 24px;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 16px;
}

.faq-reset-search-btn {
    margin-top: 12px;
    background: linear-gradient(135deg, #009ad0 0%, #0284c7 100%);
    color: #ffffff;
    border: none;
    border-radius: 9px;
    padding: 10px 22px;
    font-weight: 700;
    cursor: pointer;
}
