{"id":1806,"date":"2025-12-05T01:42:53","date_gmt":"2025-12-05T01:42:53","guid":{"rendered":"https:\/\/clubvivremieux.com\/?page_id=1806"},"modified":"2025-12-05T01:47:11","modified_gmt":"2025-12-05T01:47:11","slug":"outil-dorientation-personnalise","status":"publish","type":"page","link":"https:\/\/clubvivremieux.com\/index.php\/outil-dorientation-personnalise\/","title":{"rendered":"Outil d\u2019Orientation Personnalis\u00e9"},"content":{"rendered":"\n<?php\n\/*\nPlugin Name: Ikigai Interactif Professionnel\nDescription: G\u00e9n\u00e8re un questionnaire interactif avec r\u00e9sum\u00e9 intelligent et export PDF.\nVersion: 1.0\nAuthor: ChatGPT\n*\/\n\n\/\/ --- S\u00e9curit\u00e9 ---\nif (!defined('ABSPATH')) exit;\n\n\/\/ --- Shortcode pour afficher l'outil ---\nfunction ikigai_interactif_shortcode() {\n    ob_start(); ?>\n\n<div id=\"ikigai-container\" style=\"max-width:800px;margin:auto;background:white;padding:30px;border-radius:12px;box-shadow:0 4px 12px rgba(0,0,0,0.1);font-family:Arial, sans-serif;\">\n    <h1 style=\"text-align:center;\">D\u00e9finis ton projet professionnel<\/h1>\n    <p>R\u00e9ponds aux questions dans les 4 zones pour g\u00e9n\u00e9rer ton analyse personnalis\u00e9e.<\/p>\n\n    <h2>1. Ce que j&rsquo;aime<\/h2>\n    <textarea id=\"aime\" style=\"width:100%;height:100px;margin:10px 0;\"><\/textarea>\n\n    <h2>2. Ce pour quoi je suis dou\u00e9<\/h2>\n    <textarea id=\"doues\" style=\"width:100%;height:100px;margin:10px 0;\"><\/textarea>\n\n    <h2>3. Ce dont le monde a besoin<\/h2>\n    <textarea id=\"besoin\" style=\"width:100%;height:100px;margin:10px 0;\"><\/textarea>\n\n    <h2>4. Ce qui peut \u00eatre r\u00e9mun\u00e9r\u00e9<\/h2>\n    <textarea id=\"remunere\" style=\"width:100%;height:100px;margin:10px 0;\"><\/textarea>\n\n    <button onclick=\"genererIkigai()\" style=\"padding:12px 25px;background:#4CAF50;color:white;border:none;border-radius:8px;font-size:18px;cursor:pointer;display:block;margin:auto;\">G\u00e9n\u00e9rer mon analyse<\/button>\n\n    <div id=\"resultat\" style=\"display:none;background:#e8f5e9;padding:20px;border-radius:10px;margin-top:20px;\"><\/div>\n    <button id=\"exportPDF\" onclick=\"exportPDF()\" style=\"display:none;margin-top:10px;padding:10px 20px;border:none;border-radius:8px;background:#333;color:white;cursor:pointer;\">Exporter en PDF<\/button>\n<\/div>\n\n<script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/jspdf\/2.5.1\/jspdf.umd.min.js\"><\/script>\n<script>\nfunction genererIkigai() {\n    const aime = document.getElementById('aime').value.trim();\n    const doues = document.getElementById('doues').value.trim();\n    const besoin = document.getElementById('besoin').value.trim();\n    const remunere = document.getElementById('remunere').value.trim();\n\n    if (!aime || !doues || !besoin || !remunere) {\n        alert(\"Merci de remplir les 4 sections.\");\n        return;\n    }\n\n    const suggestions = analyserMetiers(aime, doues, besoin, remunere);\n\n    const resultatHTML = `\n        <h3>R\u00e9sum\u00e9 automatique<\/h3>\n        <p>${genererResume(aime, doues, besoin, remunere)}<\/p>\n\n        <h3>Suggestions de m\u00e9tiers possibles<\/h3>\n        <ul>${suggestions.map(m => `<li>${m}<\/li>`).join('')}<\/ul>\n    `;\n\n    document.getElementById('resultat').innerHTML = resultatHTML;\n    document.getElementById('resultat').style.display = \"block\";\n    document.getElementById('exportPDF').style.display = \"block\";\n}\n\nfunction genererResume(aime, doues, besoin, remunere) {\n    return `Tu aimes : ${aime}. Tu es dou\u00e9 pour : ${doues}. Le monde a besoin de : ${besoin}. Et cela peut \u00eatre r\u00e9mun\u00e9r\u00e9 via : ${remunere}. Cela indique que tu peux t'\u00e9panouir dans un r\u00f4le qui combine passion, comp\u00e9tence, impact et durabilit\u00e9.`;\n}\n\nfunction analyserMetiers(aime, doues, besoin, remunere) {\n    const keywords = (aime + ' ' + doues + ' ' + besoin + ' ' + remunere).toLowerCase();\n    const metiers = [];\n\n    if (keywords.includes('aider') || keywords.includes('accompagner')) metiers.push('Coach professionnel');\n    if (keywords.includes('entreprise') || keywords.includes('business')) metiers.push('Consultant \/ Formateur');\n    if (keywords.includes('\u00e9crire') || keywords.includes('r\u00e9daction')) metiers.push('R\u00e9dacteur \/ Copywriter');\n    if (keywords.includes('design') || keywords.includes('creatif')) metiers.push('Designer \/ Graphiste');\n    if (keywords.includes('digital') || keywords.includes('web')) metiers.push('Sp\u00e9cialiste marketing digital');\n    if (keywords.includes('social') || keywords.includes('psychologie')) metiers.push('Travailleur social \/ Conseiller');\n    if (keywords.includes('tech') || keywords.includes('programmation')) metiers.push('D\u00e9veloppeur Web');\n\n    return metiers.length ? metiers : ['Aucun m\u00e9tier d\u00e9tect\u00e9 automatiquement \u2014 ton profil semble unique !'];\n}\n\nfunction exportPDF() {\n    const { jsPDF } = window.jspdf;\n    const doc = new jsPDF();\n    const texte = document.getElementById('resultat').innerText;\n    const lignes = doc.splitTextToSize(texte, 180);\n    doc.text(lignes, 10, 10);\n    doc.save('analyse-ikigai.pdf');\n}\n<\/script>\n\n<?php\n    return ob_get_clean();\n}\nadd_shortcode('ikigai_interactif', 'ikigai_interactif_shortcode');\n\n?>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1806","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1806","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=1806"}],"version-history":[{"count":3,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1806\/revisions"}],"predecessor-version":[{"id":1809,"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/pages\/1806\/revisions\/1809"}],"wp:attachment":[{"href":"https:\/\/clubvivremieux.com\/index.php\/wp-json\/wp\/v2\/media?parent=1806"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}