/**
 * Toggle FAQ accordéon — utilisé sur les guides piliers et les pages avec FAQ.
 * Chaque .faq-question contient aria-expanded + aria-controls vers la .faq-answer.
 */
document.querySelectorAll('.faq-question').forEach(function (btn) {
  btn.addEventListener('click', function () {
    var expanded = this.getAttribute('aria-expanded') === 'true';
    this.setAttribute('aria-expanded', String(!expanded));
    var answer = document.getElementById(this.getAttribute('aria-controls'));
    answer.setAttribute('aria-hidden', String(expanded));
    if (expanded) { answer.setAttribute('hidden', ''); } else { answer.removeAttribute('hidden'); }
  });
});
