{"id":1427,"date":"2025-11-30T17:10:36","date_gmt":"2025-11-30T17:10:36","guid":{"rendered":"https:\/\/clubvivremieux.com\/?page_id=1427"},"modified":"2025-11-30T17:13:21","modified_gmt":"2025-11-30T17:13:21","slug":"1427-2","status":"publish","type":"page","link":"https:\/\/clubvivremieux.com\/index.php\/1427-2\/","title":{"rendered":"Testez votre libert\u00e9 financi\u00e8re"},"content":{"rendered":"\n<!-- D\u00e9but du Quiz Libert\u00e9 Financi\u00e8re Styl\u00e9 -->\n<div id=\"quiz-widget\" style=\"max-width:350px; margin:auto; font-family:Arial, sans-serif; border-radius:12px; box-shadow:0 4px 8px rgba(0,0,0,0.1); overflow:hidden;\">\n  <div id=\"quiz-header\" style=\"background:linear-gradient(90deg,#4CAF50,#2196F3); color:white; padding:15px; text-align:center;\">\n    <h3 style=\"margin:0; font-size:18px;\">Testez votre libert\u00e9 financi\u00e8re<\/h3>\n  <\/div>\n  <div id=\"quiz-body\" style=\"padding:15px; background:#f9f9f9;\">\n    <div id=\"quiz\"><\/div>\n    <button id=\"nextBtn\" style=\"margin-top:15px; padding:10px 15px; background:#4CAF50; color:white; border:none; border-radius:5px; cursor:pointer; transition:0.3s;\">Suivant<\/button>\n    <div id=\"result\" style=\"margin-top:15px; font-weight:bold; text-align:center;\"><\/div>\n  <\/div>\n<\/div>\n\n<script>\nconst quizData = [\n  {\n    question: \"Avez-vous un budget mensuel d\u00e9taill\u00e9 ?\",\n    a: \"Oui, je le respecte strictement\",\n    b: \"Partiellement\",\n    c: \"Non, je g\u00e8re au feeling\",\n    correct: \"a\"\n  },\n  {\n    question: \"Avez-vous des revenus passifs (investissements, loyers, etc.) ?\",\n    a: \"Oui, plusieurs sources\",\n    b: \"Quelques-uns\",\n    c: \"Non\",\n    correct: \"a\"\n  },\n  {\n    question: \"\u00c9pargnez-vous r\u00e9guli\u00e8rement une partie de vos revenus ?\",\n    a: \"Oui, syst\u00e9matiquement\",\n    b: \"Parfois\",\n    c: \"Rarement ou jamais\",\n    correct: \"a\"\n  },\n  {\n    question: \"Connaissez-vous vos dettes et g\u00e9rez-vous leur remboursement efficacement ?\",\n    a: \"Oui, tout est sous contr\u00f4le\",\n    b: \"Plus ou moins\",\n    c: \"Non\",\n    correct: \"a\"\n  }\n];\n\nlet currentQuiz = 0;\nlet score = 0;\n\nconst quiz = document.getElementById(\"quiz\");\nconst nextBtn = document.getElementById(\"nextBtn\");\nconst result = document.getElementById(\"result\");\n\nfunction loadQuiz() {\n  const q = quizData[currentQuiz];\n  quiz.innerHTML = `\n    <p style=\"font-weight:bold;\">${q.question}<\/p>\n    <label style=\"display:block; margin:8px 0;\"><input type=\"radio\" name=\"answer\" value=\"a\"> ${q.a}<\/label>\n    <label style=\"display:block; margin:8px 0;\"><input type=\"radio\" name=\"answer\" value=\"b\"> ${q.b}<\/label>\n    <label style=\"display:block; margin:8px 0;\"><input type=\"radio\" name=\"answer\" value=\"c\"> ${q.c}<\/label>\n  `;\n}\n\nfunction getSelected() {\n  const answers = document.getElementsByName(\"answer\");\n  let selected = undefined;\n  answers.forEach((ans) => { if(ans.checked) selected = ans.value; });\n  return selected;\n}\n\nnextBtn.addEventListener(\"mouseover\", () => nextBtn.style.background=\"#2196F3\");\nnextBtn.addEventListener(\"mouseout\", () => nextBtn.style.background=\"#4CAF50\");\n\nnextBtn.addEventListener(\"click\", () => {\n  const answer = getSelected();\n  if(!answer){ alert(\"Veuillez s\u00e9lectionner une r\u00e9ponse.\"); return; }\n  if(answer === quizData[currentQuiz].correct) score++;\n  currentQuiz++;\n  if(currentQuiz < quizData.length){\n    loadQuiz();\n  } else {\n    quiz.innerHTML = \"\";\n    nextBtn.style.display = \"none\";\n    let message = score === quizData.length ? \"F\u00e9licitations ! Vous \u00eates sur la voie de l\u2019ind\u00e9pendance financi\u00e8re !\" :\n                  score >= quizData.length\/2 ? \"Bon d\u00e9but, mais il reste du chemin \u00e0 parcourir.\" :\n                  \"Vous avez encore du travail pour atteindre l\u2019ind\u00e9pendance financi\u00e8re.\";\n    result.innerHTML = `Votre score : ${score} \/ ${quizData.length}<br>${message}`;\n  }\n});\n\nloadQuiz();\n<\/script>\n<!-- Fin du Quiz Libert\u00e9 Financi\u00e8re Styl\u00e9 -->\n\n","protected":false},"excerpt":{"rendered":"<p>Testez votre libert\u00e9 financi\u00e8re Suivant<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1427","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/comments?post=1427"}],"version-history":[{"count":3,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1427\/revisions"}],"predecessor-version":[{"id":1430,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1427\/revisions\/1430"}],"wp:attachment":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/media?parent=1427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}