/* FAQ : page classique. Hero braise compact (fil d'Ariane, titre, champ de recherche arrondi),
   puis filtres par catégorie et accordéon de questions sur fond papier, et l'appel final commun (.ps-endcta). */

.fq-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Hero et recherche ---------- */

.fq-hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 56px;
  padding-bottom: 64px;
}

/* Titre : même échelle que les autres pages index (articles, glossaire). */
.ps-page main .fq-title {
  margin: 8px 0 0;
  color: #fff;
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.fq-lead {
  max-width: 34em;
  color: var(--ps-muted-dark);
  font-size: 19px;
}

/* Champ de recherche classique : cadre arrondi, loupe, texte à taille normale. */
.fq-search {
  position: relative;
  max-width: 640px;
  margin-top: 8px;
}

.fq-ico {
  position: absolute;
  top: 50%;
  left: 18px;
  color: #a08a7d;
  transform: translateY(-50%);
  pointer-events: none;
}

.ps-page main .fq-in {
  box-sizing: border-box;
  width: 100%;
  height: 54px;
  padding: 0 18px 0 50px;
  border: 1px solid rgba(255, 138, 76, 0.35);
  border-radius: var(--ps-radius-pill);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.fq-in::placeholder {
  color: #a08a7d;
  opacity: 1;
}

.ps-page main .fq-in:hover {
  border-color: rgba(255, 138, 76, 0.6);
}

.ps-page main .fq-in:focus,
.ps-page main .fq-in:focus-visible {
  border-color: var(--ps-orange-light);
  box-shadow: 0 0 0 3px rgba(244, 81, 30, 0.25);
  outline: none;
}

.fq-in::-webkit-search-cancel-button {
  filter: invert(1);
}

.fq-hint {
  display: inline-grid;
  justify-self: start;
  align-self: flex-start;
  color: var(--ps-orange-light);
  font-family: var(--ps-font-mono);
  font-size: 13px;
}

.fq-hint > * {
  grid-area: 1 / 1;
}

.fq-h {
  opacity: 0;
  animation: fq-h 12s linear infinite;
}

.fq-h1 { animation-delay: -9s; }
.fq-h2 { animation-delay: -6s; }
.fq-h3 { animation-delay: -3s; }

@keyframes fq-h {
  0%,
  22% {
    opacity: 1;
  }

  25%,
  100% {
    opacity: 0;
  }
}

/* ---------- Liste des questions (fond papier) ---------- */

.fq-list {
  display: flex;
  flex-direction: column;
  padding-top: 64px;
  padding-bottom: 96px;
}

/* Colonne de lecture alignée à gauche, comme le hero. */
.fq-list > * {
  max-width: 920px;
}

.fq-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.fq-cat {
  min-height: 40px;
  padding: 6px 16px;
  border: 1px solid #d9c6bb;
  border-radius: var(--ps-radius-pill);
  background: transparent;
  color: var(--ps-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s var(--ps-ease), background-color 0.2s, color 0.2s, border-color 0.2s;
}

.fq-cat:hover {
  transform: translateY(-2px);
  border-color: var(--ps-orange);
}

.fq-cat[aria-pressed="true"] {
  border-color: var(--ps-ink);
  background: var(--ps-ink);
  color: #fff;
}

.fq-cat-n {
  opacity: 0.6;
}

/* Accordéon classique : question à taille de sous-titre, réponse en texte courant.
   Le thème est déjà donné par les filtres : pas de pastille sur chaque question. */
.fq-list .fq-item {
  padding: 0;
  border-top: 1px solid #e3d2c6;
}

.fq-item summary {
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.ps-page main .fq-item .f-qn {
  display: none;
}

.fq-item .f-qx {
  font-size: 24px;
  line-height: 1;
}

.fq-item summary:hover .f-q-text {
  color: var(--ps-orange-dark);
}

.ps-page main .fq-item p {
  max-width: 44em;
  margin: -4px 0 0;
  padding-bottom: 22px;
  font-size: 17px;
  line-height: 1.6;
}

.fq-item[hidden] {
  display: none;
}

/* Quand le filtre masque des questions, la dernière visible garde son filet du bas. */
.fq-list .f-q {
  border-bottom: 0;
}

.fq-list .f-q.is-last {
  border-bottom: 1px solid #e3d2c6;
}

.ps-page .fq-empty {
  padding: 30px 0;
  color: var(--ps-muted-light);
  font-size: 19px;
}

/* ---------- Mobile et mouvement réduit ---------- */

@media (max-width: 900px) {
  .ps-page main .fq-title {
    font-size: clamp(34px, 9vw, 44px);
  }

  .fq-hero {
    padding-top: 32px;
  }

  .fq-item summary {
    flex-wrap: wrap;
    gap: 8px 16px;
  }

  .fq-item .f-q-text {
    flex: 1 1 0;
    min-width: 0;
  }

  .fq-list {
    padding-top: 48px;
    padding-bottom: 72px;
  }

  .fq-item summary {
    font-size: 18px;
  }
}

@media (max-width: 900px), (hover: none) {
  .fq-h {
    animation: none;
  }

  .fq-h0 {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fq-h {
    animation: none;
  }

  .fq-h0 {
    opacity: 1;
  }

  .fq-cat {
    transition: none;
  }

  .fq-cat:hover {
    transform: none;
  }
}
