{"id":1305,"date":"2025-11-29T21:18:02","date_gmt":"2025-11-29T21:18:02","guid":{"rendered":"https:\/\/clubvivremieux.com\/?page_id=1305"},"modified":"2025-11-29T21:18:59","modified_gmt":"2025-11-29T21:18:59","slug":"1305-2","status":"publish","type":"page","link":"https:\/\/clubvivremieux.com\/index.php\/1305-2\/","title":{"rendered":"Tu ne controle plus rien ?"},"content":{"rendered":"\n<div id=\"autotest\" style=\"max-width:700px;margin:auto;font-family:Arial,sans-serif;border:2px solid #f0f0f0;padding:25px;border-radius:15px;box-shadow:0 6px 20px rgba(0,0,0,0.1);background:#fff;\">\n  <h2 style=\"text-align:center;color:#4a90e2;margin-bottom:20px;\">Auto-test interactif<\/h2>\n\n  <!-- Progression g\u00e9n\u00e9rale -->\n  <div id=\"progress\" style=\"background:#e0e0e0;border-radius:10px;overflow:hidden;margin-bottom:20px;height:20px;\">\n    <div id=\"progress-bar\" style=\"height:100%;width:0%;background:#4a90e2;transition:width 0.5s;\"><\/div>\n  <\/div>\n\n  <!-- Conteneur questions -->\n  <div id=\"question-container\" style=\"margin-bottom:20px;\"><\/div>\n\n  <!-- Bouton Suivant -->\n  <button id=\"next-btn\" style=\"background:#4a90e2;color:white;padding:12px 25px;border:none;border-radius:10px;cursor:pointer;font-size:16px;transition:0.3s;\">Suivant<\/button>\n\n  <!-- R\u00e9sultats -->\n  <div id=\"result\" style=\"display:none;margin-top:25px;padding:20px;background:#f0f8ff;border-radius:12px;\">\n    <button id=\"restart-btn\" style=\"background:#50c878;color:white;padding:10px 20px;border:none;border-radius:8px;cursor:pointer;margin-bottom:15px;transition:0.3s;\">Recommencer le test<\/button>\n    <div id=\"result-details\"><\/div>\n  <\/div>\n<\/div>\n\n<script>\nconst questions = [\n  {q:\"Quand tu as un probl\u00e8me, que fais-tu en premier ?\", a:\"Analyse logique\", b:\"Demande conseil\", c:\"Ignore pour voir\", d:\"Agis vite\"},\n  {q:\"Ton activit\u00e9 pr\u00e9f\u00e9r\u00e9e le week-end ?\", a:\"Sport\", b:\"Lecture\", c:\"Sorties entre amis\", d:\"Jeux vid\u00e9o\"},\n  {q:\"Comment g\u00e8res-tu le stress ?\", a:\"M\u00e9ditation\", b:\"Organisation\", c:\"\u00c9viter le stress\", d:\"D\u00e9compresser en activit\u00e9s fun\"},\n  {q:\"Quelle est ta priorit\u00e9 dans la vie ?\", a:\"Carri\u00e8re\", b:\"Famille\", c:\"Amiti\u00e9s\", d:\"Loisirs\"},\n  {q:\"Pr\u00e9f\u00e8res-tu travailler en groupe ou seul ?\", a:\"Seul\", b:\"Groupe restreint\", c:\"Grand groupe\", d:\"Peu importe\"},\n  {q:\"Comment d\u00e9crirais-tu ton style de communication ?\", a:\"Direct\", b:\"Diplomate\", c:\"Humour\", d:\"R\u00e9serv\u00e9\"},\n  {q:\"Si tu gagnais 1 million demain, que ferais-tu en premier ?\", a:\"Investir\", b:\"Voyager\", c:\"Aider famille\/amis\", d:\"F\u00eater\"},\n  {q:\"Ton niveau de curiosit\u00e9 est\u2026\", a:\"Tr\u00e8s \u00e9lev\u00e9\", b:\"Moyen\", c:\"Faible\", d:\"Variable\"},\n  {q:\"Comment prends-tu une d\u00e9cision importante ?\", a:\"Analyse\", b:\"Instinct\", c:\"Avis d\u2019autrui\", d:\"Rapide et spontan\u00e9\"},\n  {q:\"Quelle est ta relation avec le changement ?\", a:\"Facile\", b:\"Lent mais positif\", c:\"R\u00e9sistant\", d:\"S\u00e9lectif\"},\n  {q:\"Quand tu rencontres quelqu\u2019un de nouveau, tu\u2026\", a:\"Positif et bavard\", b:\"Observateur\", c:\"Timide\", d:\"Sociable mais prudent\"},\n  {q:\"Comment te motives-tu ?\", a:\"Objectifs pr\u00e9cis\", b:\"Inspiration\", c:\"R\u00e9compenses\", d:\"Pression externe\"},\n  {q:\"Quelle est ta fa\u00e7on pr\u00e9f\u00e9r\u00e9e d\u2019apprendre ?\", a:\"Lecture\", b:\"Pratique\", c:\"\u00c9change\", d:\"Vid\u00e9os\/Multim\u00e9dia\"},\n  {q:\"Si tu as une id\u00e9e, tu\u2026\", a:\"La mets en \u0153uvre rapidement\", b:\"La planifie\", c:\"La teste petit \u00e0 petit\", d:\"Attends confirmation\"},\n  {q:\"Comment \u00e9values-tu ton \u00e9quilibre vie pro \/ vie perso ?\", a:\"Tr\u00e8s bon\", b:\"Correct\", c:\"Mauvais\", d:\"\u00c0 am\u00e9liorer\"}\n];\n\nconst answerColors = {a:\"#4a90e2\", b:\"#50c878\", c:\"#f5a623\", d:\"#e94e77\"};\nlet current = 0;\nlet scores = {a:0, b:0, c:0, d:0};\n\nconst container = document.getElementById(\"question-container\");\nconst resultDiv = document.getElementById(\"result\");\nconst resultDetails = document.getElementById(\"result-details\");\nconst nextBtn = document.getElementById(\"next-btn\");\nconst progressBar = document.getElementById(\"progress-bar\");\nconst restartBtn = document.getElementById(\"restart-btn\");\n\nfunction showQuestion() {\n  const q = questions[current];\n  container.innerHTML = `<p style=\"font-weight:bold;font-size:18px;margin-bottom:15px;\">${q.q}<\/p>\n    <div style=\"display:flex;flex-direction:column;gap:10px;\">\n      <button class=\"answer-btn\" data-value=\"a\" style=\"padding:10px;border:none;border-radius:8px;cursor:pointer;background:${answerColors.a};color:white;transition:0.3s;\">${q.a}<\/button>\n      <button class=\"answer-btn\" data-value=\"b\" style=\"padding:10px;border:none;border-radius:8px;cursor:pointer;background:${answerColors.b};color:white;transition:0.3s;\">${q.b}<\/button>\n      <button class=\"answer-btn\" data-value=\"c\" style=\"padding:10px;border:none;border-radius:8px;cursor:pointer;background:${answerColors.c};color:white;transition:0.3s;\">${q.c}<\/button>\n      <button class=\"answer-btn\" data-value=\"d\" style=\"padding:10px;border:none;border-radius:8px;cursor:pointer;background:${answerColors.d};color:white;transition:0.3s;\">${q.d}<\/button>\n    <\/div>`;\n  progressBar.style.width = `${(current\/questions.length)*100}%`;\n\n  document.querySelectorAll(\".answer-btn\").forEach(btn=>{\n    btn.addEventListener(\"click\", ()=>{\n      scores[btn.dataset.value]++;\n      btn.style.transform = \"scale(1.05)\";\n      btn.style.opacity = \"0.8\";\n      setTimeout(()=>{\n        current++;\n        if(current<questions.length){\n          showQuestion();\n        } else {\n          showResult();\n        }\n      },300);\n    });\n  });\n}\n\nfunction showResult() {\n  container.style.display = \"none\";\n  nextBtn.style.display = \"none\";\n  progressBar.style.width = `100%`;\n\n  const max = Object.keys(scores).reduce((a,b)=>scores[a]>scores[b]?a:b);\n  const descriptions = {\n    a:\"Profil Analytique : Tu r\u00e9fl\u00e9chis avant d\u2019agir et tu prends des d\u00e9cisions logiques.\",\n    b:\"Profil Social : Tu valorises les relations et les \u00e9motions dans tes choix.\",\n    c:\"Profil Cr\u00e9atif : Tu explores, exp\u00e9rimentes et cherches de nouvelles perspectives.\",\n    d:\"Profil Aventurier : Tu es spontan\u00e9, aime le changement et l\u2019action imm\u00e9diate.\"\n  };\n\n  \/\/ Affichage final avec barres de progression par type\n  let bars = \"\";\n  Object.keys(scores).forEach(k=>{\n    const pct = Math.round((scores[k]\/questions.length)*100);\n    bars += `<div style=\"margin:5px 0;\"><strong style=\"color:${answerColors[k]}\">${k} :<\/strong>\n      <div style=\"background:#e0e0e0;border-radius:8px;overflow:hidden;height:18px;margin-top:3px;\">\n        <div style=\"width:${pct}%;background:${answerColors[k]};height:100%;transition:width 0.5s;\"><\/div>\n      <\/div>\n      <span>${scores[k]} r\u00e9ponses (${pct}%)<\/span>\n    <\/div>`;\n  });\n\n  resultDetails.innerHTML = `<h3 style=\"color:#4a90e2;\">Profil principal : ${max}<\/h3>\n    <p>${descriptions[max]}<\/p>\n    <h4>Scores d\u00e9taill\u00e9s :<\/h4>${bars}`;\n  resultDiv.style.display = \"block\";\n}\n\n\/\/ Red\u00e9marrage du test\nrestartBtn.addEventListener(\"click\", ()=>{\n  current = 0;\n  scores = {a:0, b:0, c:0, d:0};\n  resultDiv.style.display = \"none\";\n  container.style.display = \"block\";\n  nextBtn.style.display = \"inline-block\";\n  showQuestion();\n});\n\nshowQuestion();\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>Auto-test interactif Suivant Recommencer le test<\/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-1305","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1305","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=1305"}],"version-history":[{"count":2,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1305\/revisions"}],"predecessor-version":[{"id":1307,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1305\/revisions\/1307"}],"wp:attachment":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/media?parent=1305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}