console.log('salut');
// menu burger open

var burger = document.getElementById("block-burger");
var burgertitle = document.getElementById("block-burger-menu");


burgertitle.addEventListener("click", toggleMenu);

function toggleMenu(event) {
  console.log(event);
  burger.classList.toggle('opened');
}


// faq reponse open

var answers = document.getElementsByClassName("field--name-field-reponse");
var questions = document.getElementsByClassName("field--name-field-question");

for (let i = 0; i < questions.length; i++) {
  const question = questions[i]
  question.addEventListener("click", toggleFaq);
}


function toggleFaq(event) {
  console.log(event);
  for (let i = 0; i < answers.length; i++) {
  const answer = answers[i]
  answer.classList.toggle('opened');}
}
