{"id":1491,"date":"2025-12-01T12:55:46","date_gmt":"2025-12-01T12:55:46","guid":{"rendered":"https:\/\/clubvivremieux.com\/?page_id=1491"},"modified":"2025-12-01T12:55:46","modified_gmt":"2025-12-01T12:55:46","slug":"tutoriel-rapide-mini-courage","status":"publish","type":"page","link":"https:\/\/clubvivremieux.com\/index.php\/tutoriel-rapide-mini-courage\/","title":{"rendered":"Tutoriel rapide : Mini-courage\u00a0"},"content":{"rendered":"\n<!-- Mini-courage interactive widget \u2013 version anim\u00e9e -->\n<div id=\"miniCourageWidget\" style=\"max-width:450px;margin:30px auto;padding:25px;border:2px solid #4CAF50;border-radius:15px;text-align:center;font-family:sans-serif;background:linear-gradient(135deg,#e0f7fa,#ffffff);box-shadow:0 5px 15px rgba(0,0,0,0.1);\">\n  <h2 style=\"color:#4CAF50;margin-bottom:15px;\">Tutoriel rapide : Mini-courage \ud83d\udcaa<\/h2>\n  <p style=\"font-size:16px;margin-bottom:20px;\">\n    <strong>Astuce mindset :<\/strong><br>\n    Quand tu h\u00e9sites \u2192 fais une micro-action de 30 secondes.<br>\n    \u27a1\ufe0f Le cerveau suit toujours l\u2019action, pas l\u2019inverse.\n  <\/p>\n  <button id=\"startButton\" style=\"background-color:#FF5722;color:white;border:none;padding:12px 25px;border-radius:8px;cursor:pointer;font-size:16px;font-weight:bold;transition:0.3s;\">\n    Je rel\u00e8ve le d\u00e9fi en 30 sec\n  <\/button>\n  <p id=\"timer\" style=\"font-size:22px;margin-top:20px;color:#333;font-weight:bold;\"><\/p>\n  <div id=\"message\" style=\"font-size:18px;color:#4CAF50;font-weight:bold;margin-top:20px;\"><\/div>\n  <canvas id=\"confettiCanvas\" style=\"position:absolute;pointer-events:none;top:0;left:0;width:100%;height:100%;\"><\/canvas>\n<\/div>\n\n<script>\n\/\/ Timer et message\nlet timerInterval;\ndocument.getElementById('startButton').addEventListener('click', function() {\n  clearInterval(timerInterval);\n  let timeLeft = 30;\n  document.getElementById('timer').textContent = `Temps restant : ${timeLeft} s`;\n  document.getElementById('message').textContent = '';\n  \n  timerInterval = setInterval(function() {\n    timeLeft--;\n    document.getElementById('timer').textContent = `Temps restant : ${timeLeft} s`;\n    if(timeLeft <= 0){\n      clearInterval(timerInterval);\n      document.getElementById('timer').textContent = '';\n      document.getElementById('message').textContent = \"Bravo ! Tu as relev\u00e9 le d\u00e9fi \ud83d\udcaa\";\n      launchConfetti();\n    }\n  }, 1000);\n});\n\n\/\/ Confetti\nfunction launchConfetti() {\n  const canvas = document.getElementById('confettiCanvas');\n  const ctx = canvas.getContext('2d');\n  canvas.width = canvas.offsetWidth;\n  canvas.height = canvas.offsetHeight;\n\n  const confettis = [];\n  const colors = ['#FF3D00','#FFEB3B','#4CAF50','#2196F3','#9C27B0'];\n\n  for(let i=0; i<150; i++){\n    confettis.push({\n      x: Math.random()*canvas.width,\n      y: Math.random()*canvas.height - canvas.height,\n      r: Math.random()*6+4,\n      d: Math.random()*15+5,\n      color: colors[Math.floor(Math.random()*colors.length)],\n      tilt: Math.random()*10-10\n    });\n  }\n\n  let angle = 0;\n  function draw() {\n    ctx.clearRect(0,0,canvas.width,canvas.height);\n    confettis.forEach(function(c){\n      ctx.beginPath();\n      ctx.lineWidth = c.r\/2;\n      ctx.strokeStyle = c.color;\n      ctx.moveTo(c.x + c.tilt + c.r\/4, c.y);\n      ctx.lineTo(c.x + c.tilt, c.y + c.tilt + c.r\/4);\n      ctx.stroke();\n\n      c.y += (Math.cos(angle + c.d) + 3 + c.r\/2)\/2;\n      c.x += Math.sin(angle);\n      if(c.y > canvas.height) c.y = -10;\n    });\n    angle += 0.01;\n    requestAnimationFrame(draw);\n  }\n  draw();\n}\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>Tutoriel rapide : Mini-courage \ud83d\udcaa Astuce mindset : Quand tu h\u00e9sites \u2192 fais une micro-action de 30 secondes. \u27a1\ufe0f Le cerveau suit toujours l\u2019action, pas l\u2019inverse. Je rel\u00e8ve le d\u00e9fi en 30 sec<\/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-1491","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1491","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=1491"}],"version-history":[{"count":1,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1491\/revisions"}],"predecessor-version":[{"id":1492,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1491\/revisions\/1492"}],"wp:attachment":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/media?parent=1491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}