{"id":1537,"date":"2025-12-01T22:45:14","date_gmt":"2025-12-01T22:45:14","guid":{"rendered":"https:\/\/clubvivremieux.com\/?page_id=1537"},"modified":"2025-12-01T22:48:59","modified_gmt":"2025-12-01T22:48:59","slug":"1537-2","status":"publish","type":"page","link":"https:\/\/clubvivremieux.com\/index.php\/1537-2\/","title":{"rendered":"Quel film de No\u00ebl correspond \u00e0 ton humeur ?"},"content":{"rendered":"\n<div id=\"christmas-quiz\" style=\"max-width:700px;margin:auto;padding:25px;background:#fff8f0;border:2px solid #e53935;border-radius:20px;font-family:sans-serif;text-align:center;box-shadow:0 8px 15px rgba(0,0,0,0.2);\">\n  <h2 style=\"color:#b71c1c;font-size:26px;margin-bottom:20px;\">\ud83c\udf84 Quel film de No\u00ebl correspond \u00e0 ton humeur ? \ud83c\udfac<\/h2>\n  <div id=\"questions\"><\/div>\n  <button id=\"submitQuiz\" style=\"margin-top:20px;padding:12px 25px;font-size:18px;background:#b71c1c;color:white;border:none;border-radius:10px;cursor:pointer;transition:all 0.3s;\">Voir mon r\u00e9sultat<\/button>\n  <div id=\"result\" style=\"margin-top:25px;padding:20px;background:#ffe6e6;border-radius:15px;font-weight:bold;opacity:0;transform:scale(0.9);transition:all 0.6s;\"><\/div>\n<\/div>\n\n<style>\n  #submitQuiz:hover {\n    background:#d32f2f;\n    transform:scale(1.05);\n  }\n  #questions label:hover {\n    color:#b71c1c;\n    cursor:pointer;\n  }\n  #result img {\n    border:3px solid #b71c1c;\n    box-shadow:0 4px 12px rgba(0,0,0,0.3);\n  }\n<\/style>\n\n<script>\nconst questions = [\n  {q:\"Quel est ton \u00e9tat d\u2019esprit actuel ?\", a:\"Com\u00e9die\", b:\"Classique\", c:\"Romance\", d:\"Familial\"},\n  {q:\"Quel type de soir\u00e9e de No\u00ebl pr\u00e9f\u00e8res-tu ?\", a:\"Com\u00e9die\", b:\"Classique\", c:\"Romance\", d:\"Familial\"},\n  {q:\"Quel \u00e9l\u00e9ment de No\u00ebl t\u2019attire le plus ?\", a:\"Com\u00e9die\", b:\"Classique\", c:\"Romance\", d:\"Familial\"},\n  {q:\"Quel personnage de No\u00ebl es-tu ?\", a:\"Com\u00e9die\", b:\"Classique\", c:\"Romance\", d:\"Familial\"},\n  {q:\"Quelle ambiance musicale pr\u00e9f\u00e8res-tu pour No\u00ebl ?\", a:\"Com\u00e9die\", b:\"Classique\", c:\"Romance\", d:\"Familial\"}\n];\n\nconst results = {\n  \"Com\u00e9die\": {\n    text: \"\ud83d\ude02 Tu veux rire et profiter des f\u00eates sans prise de t\u00eate !\",\n    films: \"Exemples : Maman, j\u2019ai rat\u00e9 l\u2019avion !, Bad Santa, Le Grinch\",\n    img: \"https:\/\/i.imgur.com\/xO2XJ6X.jpg\"\n  },\n  \"Classique\": {\n    text: \"\ud83c\udf81 Tu es nostalgique et appr\u00e9cies les traditions.\",\n    films: \"Exemples : La vie est belle, Miracle sur la 34e rue, Le No\u00ebl de Charlie Brown\",\n    img: \"https:\/\/i.imgur.com\/0k9H7Yv.jpg\"\n  },\n  \"Romance\": {\n    text: \"\ud83d\udc96 Tu es sentimental(e) et sensible \u00e0 la magie des histoires d\u2019amour.\",\n    films: \"Exemples : Love Actually, The Holiday, Un No\u00ebl \u00e0 New York\",\n    img: \"https:\/\/i.imgur.com\/6l2g2gN.jpg\"\n  },\n  \"Familial\": {\n    text: \"\u2728 Tu aimes la magie, l\u2019action et les histoires qui \u00e9merveillent petits et grands.\",\n    films: \"Exemples : Elf, Le P\u00f4le Express, La Reine des Neiges\",\n    img: \"https:\/\/i.imgur.com\/HTq8Rmn.jpg\"\n  }\n};\n\n\/\/ G\u00e9n\u00e9ration des questions avec animation\nconst container = document.getElementById('questions');\nquestions.forEach((q,i)=>{\n  container.innerHTML += `<p style=\"font-weight:bold;margin-top:15px;font-size:16px;\">${q.q}<\/p>\n  <label style=\"display:block;margin:6px 0;transition:all 0.3s;\"><input type=\"radio\" name=\"q${i}\" value=\"a\"> ${q.a}<\/label>\n  <label style=\"display:block;margin:6px 0;transition:all 0.3s;\"><input type=\"radio\" name=\"q${i}\" value=\"b\"> ${q.b}<\/label>\n  <label style=\"display:block;margin:6px 0;transition:all 0.3s;\"><input type=\"radio\" name=\"q${i}\" value=\"c\"> ${q.c}<\/label>\n  <label style=\"display:block;margin:6px 0;transition:all 0.3s;\"><input type=\"radio\" name=\"q${i}\" value=\"d\"> ${q.d}<\/label>`;\n});\n\n\/\/ Calcul du r\u00e9sultat avec effet magique\ndocument.getElementById('submitQuiz').onclick = function(){\n  let tally = {\"Com\u00e9die\":0,\"Classique\":0,\"Romance\":0,\"Familial\":0};\n  questions.forEach((q,i)=>{\n    const selected = document.querySelector(`input[name=q${i}]:checked`);\n    if(selected) {\n      const val = selected.nextSibling.textContent.trim();\n      tally[val]++;\n    }\n  });\n  const winner = Object.keys(tally).reduce((a,b)=>tally[a]>=tally[b]?a:b);\n  const resDiv = document.getElementById('result');\n\n  \/\/ Animation d'apparition\n  resDiv.style.opacity = 0;\n  resDiv.style.transform = \"scale(0.8)\";\n  setTimeout(()=>{\n    resDiv.innerHTML = `\n      <h3 style=\"color:#b71c1c;font-size:20px;\">${results[winner].text}<\/h3>\n      <img decoding=\"async\" src=\"${results[winner].img}\" alt=\"${winner}\" style=\"width:100%;max-width:320px;border-radius:12px;margin:12px 0;animation:float 1s ease-out;\">\n      <p style=\"font-size:15px;margin-top:8px;\">${results[winner].films}<\/p>\n      <p style=\"margin-top:10px;\">Partage ton r\u00e9sultat : \n        <a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=\"+encodeURIComponent(location.href) target=\"_blank\" style=\"color:#3b5998;\">Facebook<\/a> | \n        <a href=\"https:\/\/twitter.com\/intent\/tweet?text=\"+encodeURIComponent('Mon film de No\u00ebl est '+winner+' !') target=\"_blank\" style=\"color:#1da1f2;\">Twitter<\/a>\n      <\/p>`;\n    resDiv.style.opacity = 1;\n    resDiv.style.transform = \"scale(1)\";\n  }, 200);\n};\n\n\/\/ Animation flottante des images\nconst style = document.createElement('style');\nstyle.innerHTML = `\n@keyframes float {\n  0% {transform: translateY(-10px);}\n  50% {transform: translateY(5px);}\n  100% {transform: translateY(0);}\n}\n`;\ndocument.head.appendChild(style);\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>\ud83c\udf84 Quel film de No\u00ebl correspond \u00e0 ton humeur ? \ud83c\udfac Voir mon r\u00e9sultat<\/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-1537","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1537","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=1537"}],"version-history":[{"count":3,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1537\/revisions"}],"predecessor-version":[{"id":1540,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1537\/revisions\/1540"}],"wp:attachment":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/media?parent=1537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}