/* ============================================================
   FAQ – Cœur de Miel
   Fichier : faq.css
   Chemin thème enfant : /wp-content/themes/astra-child/faq.css
   ============================================================ */

/* Variables */
.cdm-faq {
  --bg:        #ffffff;
  --surface:   #ffffff;
  --border:    #e7e5e4;
  --border-h:  #d6d3d1;
  --text:      #1c1917;
  --muted:     #78716c;
  --dimmed:    #a8a29e;
  --amber:     #d97706;
  --amber-bg:  rgba(217, 119, 6, 0.07);
  --amber-bdr: rgba(217, 119, 6, 0.22);
}

/* Reset scoped */
.cdm-faq *,
.cdm-faq *::before,
.cdm-faq *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

/* Wrapper global */
.cdm-faq {
  font-family: 'Outfit', sans-serif;
  background: #ffffff;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  width: 100%;
  max-width: 100%;
}

/* Force le fond blanc — override Astra */
body,
body.page-template-page-faq,
#page,
#content,
#primary,
#main,
.site-content,
.entry-content,
.ast-separate-container,
.ast-separate-container #primary,
.ast-separate-container #main,
.ast-plain-container,
.ast-container,
.site-main,
.ast-article-post,
article {
  background: #ffffff !important;
  background-color: #ffffff !important;
}

/* ── HERO ── */
.cdm-faq .faq-hero {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 40px 48px;
}

.cdm-faq .faq-hero h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin-bottom: 14px;
  color: var(--text);
}

.cdm-faq .faq-hero p {
  font-size: 0.97rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.65;
}

@media (max-width: 640px) {
  .cdm-faq .faq-hero {
    padding: 48px 24px 32px;
  }
}

/* ── LAYOUT ── */
.cdm-faq .faq-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 40px 80px;
}

/* ── TABS ── */
.cdm-faq .tabs-wrapper {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
  padding: 20px 0 16px;
  margin-bottom: 4px;
}

.cdm-faq .tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.cdm-faq .tab-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 14px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}

.cdm-faq .tab-btn:hover {
  color: var(--text);
  border-color: var(--border-h);
}

.cdm-faq .tab-btn.active {
  color: var(--amber);
  background: var(--amber-bg);
  border-color: var(--amber-bdr);
}

/* ── PANELS ── */
.cdm-faq .faq-panel {
  display: none;
}

.cdm-faq .faq-panel.active {
  display: block;
}

/* ── ACCORDION ── */
.cdm-faq .faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 4px;
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.2s;
}

.cdm-faq .faq-item:hover {
  border-color: var(--border-h);
}

.cdm-faq .faq-item.is-open {
  border-color: var(--border-h);
}

.cdm-faq .faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 18px;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color 0.15s;
}

.cdm-faq .faq-question:hover {
  color: var(--amber);
}

.cdm-faq .faq-item.is-open .faq-question {
  color: var(--amber);
}

.cdm-faq .chevron {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--dimmed);
  transition: transform 0.3s cubic-bezier(.4, 0, .2, 1), color 0.2s;
}

.cdm-faq .faq-item.is-open .chevron {
  transform: rotate(180deg);
  color: var(--amber);
}

.cdm-faq .faq-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(.4, 0, .2, 1);
}

.cdm-faq .faq-item.is-open .faq-body {
  grid-template-rows: 1fr;
}

.cdm-faq .faq-body-inner {
  overflow: hidden;
}

.cdm-faq .faq-answer {
  padding: 14px 18px;
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.cdm-faq .faq-answer strong {
  color: var(--text);
  font-weight: 500;
}

.cdm-faq .faq-answer a {
  color: var(--amber);
  text-underline-offset: 3px;
}
