{"id":1668,"date":"2025-12-03T00:41:37","date_gmt":"2025-12-03T00:41:37","guid":{"rendered":"https:\/\/clubvivremieux.com\/?page_id=1668"},"modified":"2025-12-03T00:43:37","modified_gmt":"2025-12-03T00:43:37","slug":"1668-2","status":"publish","type":"page","link":"https:\/\/clubvivremieux.com\/index.php\/1668-2\/","title":{"rendered":"Quel est votre Karma ?"},"content":{"rendered":"\n<div class=\"karma-quiz-container\">\n  <h2>Quel est votre Karma ?<\/h2>\n  <div id=\"quiz\"><\/div>\n  <button id=\"nextBtn\">Suivant<\/button>\n  <div class=\"progress\" id=\"progress\"><\/div>\n  <div class=\"score\" id=\"scoreDisplay\">Score : 0<\/div>\n  <div id=\"result\" class=\"result\"><\/div>\n<\/div>\n\n<style>\n.karma-quiz-container {\n  max-width: 700px;\n  margin: 20px auto;\n  padding: 20px;\n  background: #fff;\n  border-radius: 10px;\n  box-shadow: 0 4px 15px rgba(0,0,0,0.1);\n  text-align: center;\n  transition: background 0.5s;\n  font-family: Arial, sans-serif;\n}\n.karma-quiz-container h2 {\n  color: #4a90e2;\n}\n.karma-quiz-container .options { list-style: none; padding: 0; }\n.karma-quiz-container .options li { margin-bottom: 10px; }\n.karma-quiz-container .options li label { cursor: pointer; }\n.karma-quiz-container button {\n  background: #4a90e2; color: #fff; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-size: 16px;\n}\n.karma-quiz-container button:hover { background: #357ABD; }\n.karma-quiz-container .progress, .karma-quiz-container .score, .karma-quiz-container .result {\n  margin-top: 10px;\n}\n<\/style>\n\n<script>\nconst questions = [\n  { question: \"1. Quand quelqu'un vous blesse, vous :\", options: [\"Pardonnez imm\u00e9diatement.\", \"Ressentez de la rancune mais essayez d'oublier.\", \"Cherchez \u00e0 vous venger.\"], scores: [3,2,0] },\n  { question: \"2. Vous trouvez un portefeuille dans la rue, vous :\", options: [\"Le rendez \u00e0 son propri\u00e9taire.\", \"Le gardez mais essayez de retrouver le propri\u00e9taire.\", \"Le gardez sans r\u00e9fl\u00e9chir.\"], scores: [3,2,0] },\n  { question: \"3. Vous aidez quelqu'un dans le besoin sans attendre de retour :\", options: [\"Toujours.\", \"Parfois.\", \"Rarement.\"], scores: [3,2,0] },\n  { question: \"4. Vous \u00eates confront\u00e9 \u00e0 une injustice :\", options: [\"Vous intervenez pour corriger.\", \"Vous observez mais restez neutre.\", \"Vous ignorez compl\u00e8tement.\"], scores: [3,1,0] },\n  { question: \"5. Vous parlez des autres derri\u00e8re leur dos :\", options: [\"Jamais.\", \"Parfois sans malveillance.\", \"Souvent et sans remords.\"], scores: [3,2,0] },\n  { question: \"6. Votre objectif principal dans la vie :\", options: [\"Apporter de la positivit\u00e9 autour de vous.\", \"R\u00e9ussir personnellement.\", \"Profiter de la vie sans trop penser aux autres.\"], scores: [3,1,0] },\n  { question: \"7. Vous trouvez qu'il est important de :\", options: [\"Respecter toutes les cr\u00e9atures et la nature.\", \"Avoir un impact minimal sur les autres.\", \"Faire ce que vous voulez.\"], scores: [3,2,0] },\n  { question: \"8. Quand quelqu'un vous demande de l'aide :\", options: [\"Vous aidez volontiers.\", \"Vous aidez si cela ne vous d\u00e9range pas.\", \"Vous refusez souvent.\"], scores: [3,2,0] },\n  { question: \"9. Votre fa\u00e7on de r\u00e9soudre les conflits :\", options: [\"Par le dialogue et la compr\u00e9hension.\", \"En \u00e9vitant ou en compromise.\", \"En confrontant agressivement.\"], scores: [3,2,0] },\n  { question: \"10. Comment d\u00e9cririez-vous votre karma :\", options: [\"Tr\u00e8s positif.\", \"Moyennement positif.\", \"N\u00e9gatif ou incertain.\"], scores: [3,2,0] }\n];\n\nlet currentQuestion = 0;\nlet score = 0;\n\nconst quizContainer = document.getElementById('quiz');\nconst nextBtn = document.getElementById('nextBtn');\nconst resultDiv = document.getElementById('result');\nconst progressDiv = document.getElementById('progress');\nconst scoreDisplay = document.getElementById('scoreDisplay');\nconst container = document.querySelector('.karma-quiz-container');\n\nfunction showQuestion(index) {\n  const q = questions[index];\n  const optionsHtml = q.options.map((opt,i) => \n    `<li><label><input type=\"radio\" name=\"q\" value=\"${q.scores[i]}\"> ${opt}<\/label><\/li>`).join('');\n  quizContainer.innerHTML = `<div class=\"question active\"><p>${q.question}<\/p><ul class=\"options\">${optionsHtml}<\/ul><\/div>`;\n  progressDiv.textContent = `Question ${index+1} sur ${questions.length}`;\n}\n\nfunction updateScoreDisplay() {\n  scoreDisplay.textContent = `Score : ${score}`;\n  if(score >= 25) container.style.background = \"#d4edda\";\n  else if(score >= 18) container.style.background = \"#fff3cd\";\n  else if(score >= 10) container.style.background = \"#ffe5b4\";\n  else container.style.background = \"#f8d7da\";\n}\n\nfunction nextQuestion() {\n  const selected = document.querySelector('input[name=q]:checked');\n  if (!selected) { alert(\"Veuillez s\u00e9lectionner une r\u00e9ponse.\"); return; }\n  score += parseInt(selected.value);\n  updateScoreDisplay();\n  currentQuestion++;\n  if(currentQuestion < questions.length){\n    showQuestion(currentQuestion);\n  } else {\n    showResult();\n  }\n}\n\nfunction showResult() {\n  quizContainer.innerHTML = '';\n  nextBtn.style.display = 'none';\n  progressDiv.style.display = 'none';\n  scoreDisplay.style.display = 'none';\n  let karma;\n  if(score >= 25) karma = \"Votre karma est tr\u00e8s positif \ud83c\udf1f\";\n  else if(score >= 18) karma = \"Votre karma est positif \ud83d\ude42\";\n  else if(score >= 10) karma = \"Votre karma est moyen \ud83d\ude10\";\n  else karma = \"Votre karma est faible \u26a1\";\n  resultDiv.textContent = karma;\n}\n\nshowQuestion(currentQuestion);\nnextBtn.addEventListener('click', nextQuestion);\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>Quel est votre Karma ? Suivant Score : 0<\/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-1668","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1668","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=1668"}],"version-history":[{"count":3,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1668\/revisions"}],"predecessor-version":[{"id":1671,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1668\/revisions\/1671"}],"wp:attachment":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/media?parent=1668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}