{"id":5024,"date":"2025-11-07T00:47:49","date_gmt":"2025-11-06T23:47:49","guid":{"rendered":"https:\/\/www.service-public.pf\/dicp\/?page_id=5024"},"modified":"2026-09-01T05:02:18","modified_gmt":"2026-09-01T03:02:18","slug":"simulateur-repartition-impots","status":"publish","type":"page","link":"https:\/\/www.service-public.pf\/dicp\/simulateur-repartition-impots\/","title":{"rendered":"Simulateur de r\u00e9partition des imp\u00f4ts"},"content":{"rendered":"<div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-1 fusion-flex-container has-pattern-background has-mask-background nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row fusion-flex-align-items-flex-start fusion-flex-content-wrap\" style=\"max-width:1216.8px;margin-left: calc(-4% \/ 2 );margin-right: calc(-4% \/ 2 );\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_1 1_1 fusion-flex-column\" style=\"--awb-bg-size:cover;--awb-width-large:100%;--awb-margin-top-large:0px;--awb-spacing-right-large:1.92%;--awb-margin-bottom-large:20px;--awb-spacing-left-large:1.92%;--awb-width-medium:100%;--awb-order-medium:0;--awb-spacing-right-medium:1.92%;--awb-spacing-left-medium:1.92%;--awb-width-small:100%;--awb-order-small:0;--awb-spacing-right-small:1.92%;--awb-spacing-left-small:1.92%;\" data-scroll-devices=\"small-visibility,medium-visibility,large-visibility\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-justify-content-flex-start fusion-content-layout-column\"><!-- Simulateur \"\u00c0 quoi servent mes imp\u00f4ts ?\" - L\u00e9gendes compl\u00e8tes -->\n<div id=\"simulateur-impots\" style=\"text-align:center;max-width:1000px;width:100%;margin:0 auto;padding:16px;box-sizing:border-box;font-family:system-ui,-apple-system,sans-serif;\">\n  \n  <style>\n    #simulateur-impots * { box-sizing: border-box; }\n    \n    #simulateur-impots h1 {\n      font-size: clamp(1.4rem, 4vw, 1.9rem);\n      margin: 0 0 12px;\n      line-height: 1.3;\n    }\n    \n    #simulateur-impots .intro {\n      font-size: clamp(0.9rem, 2.5vw, 1.05rem);\n      line-height: 1.5;\n      margin: 0 0 20px;\n      color: #333;\n    }\n    \n    #simulateur-impots .input-group {\n      display: flex;\n      flex-wrap: wrap;\n      justify-content: center;\n      align-items: center;\n      gap: 10px;\n      margin: 16px 0;\n    }\n    \n    #simulateur-impots label {\n      font-size: 1rem;\n      width: 100%;\n      margin-bottom: 4px;\n    }\n    \n    #simulateur-impots input[type=\"number\"] {\n      padding: 12px 14px;\n      font-size: 16px;\n      width: 100%;\n      max-width: 240px;\n      border: 1px solid #ccc;\n      border-radius: 6px;\n    }\n    \n    #simulateur-impots button {\n      padding: 12px 24px;\n      font-size: 16px;\n      background: #007cba;\n      color: white;\n      border: none;\n      border-radius: 6px;\n      cursor: pointer;\n      white-space: nowrap;\n    }\n    \n    #simulateur-impots button:hover {\n      background: #006ba1;\n    }\n    \n    #simulateur-impots .chart-wrapper {\n      width: 100%;\n      max-width: 700px;\n      margin: 20px auto 10px;\n      position: relative;\n      height: 420px;\n      max-height: 75vh;\n    }\n    \n    @media (min-width: 600px) {\n      #simulateur-impots .chart-wrapper {\n        height: 480px;\n      }\n    }\n    \n    #simulateur-impots .chart-wrapper canvas {\n      width: 100% !important;\n      height: 100% !important;\n    }\n    \n    #simulateur-impots #legende {\n      display: grid;\n      grid-template-columns: 1fr;\n      gap: 10px;\n      margin-top: 28px;\n      width: 100%;\n    }\n    \n    #simulateur-impots .legende-item {\n      display: flex;\n      align-items: flex-start;\n      padding: 12px;\n      border: 1px solid #ddd;\n      border-radius: 8px;\n      background: #f9f9f9;\n      text-align: left;\n    }\n    \n    #simulateur-impots .legende-item .icon {\n      font-size: 22px;\n      margin-right: 12px;\n      line-height: 1.2;\n      flex-shrink: 0;\n    }\n    \n    #simulateur-impots .legende-item strong {\n      display: block;\n      margin-bottom: 2px;\n      word-break: break-word;\n    }\n    \n    #simulateur-impots .footer-note {\n      font-style: italic;\n      margin-top: 28px;\n      font-size: 0.9rem;\n      color: #555;\n    }\n    \n    @media (min-width: 520px) {\n      #simulateur-impots #legende {\n        grid-template-columns: repeat(2, 1fr);\n      }\n      #simulateur-impots label {\n        width: auto;\n      }\n    }\n    \n    @media (min-width: 780px) {\n      #simulateur-impots #legende {\n        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));\n      }\n    }\n  <\/style>\n\n  <h1>\u00c0 quoi servent mes imp\u00f4ts ?<\/h1>\n  \n  <p class=\"intro\">\n    Explorez la r\u00e9partition de votre contribution et d\u00e9couvrez comment vos imp\u00f4ts\n    soutiennent les services essentiels : h\u00f4pitaux, \u00e9coles, routes, aides sociales,\n    transports, \u00e9quipements publics...\n  <\/p>\n  \n  <div class=\"input-group\">\n    <label for=\"montant\">Indiquez le montant de votre imp\u00f4t (en XPF) :<\/label>\n    <input\n      type=\"number\"\n      id=\"montant\"\n      placeholder=\"Ex : 10000\"\n      min=\"0\"\n      step=\"100\"\n      value=\"10000\"\n    >\n    <span>XPF<\/span>\n    <button type=\"button\" onclick=\"calculerRepartition()\">\n      Voir la r\u00e9partition\n    <\/button>\n  <\/div>\n  \n  <div class=\"chart-wrapper\">\n    <canvas id=\"pieChart\"><\/canvas>\n  <\/div>\n  \n  <div id=\"legende\"><\/div>\n  \n  <p class=\"footer-note\">\n    Le civisme fiscal, notre int\u00e9r\u00eat \u00e0 tous.<br>\n    * Donn\u00e9es issues du compte administratif 2025.\n  <\/p>\n<\/div>\n\n<script src=\"https:\/\/cdn.jsdelivr.net\/npm\/chart.js@4.4.1\/dist\/chart.umd.min.js\"><\/script>\n<script>\nconst missions = [\n  { libelle: 'Environnement', pourcentage: 0.006738044746398413, icon: '\ud83c\udf3f', sous: 'Gestion de la biodiversit\u00e9 et des ressources naturelles' },\n  { libelle: 'Culture et patrimoine', pourcentage: 0.008002247853125309, icon: '\ud83d\udc83\ud83c\udffd', sous: 'Culture et art contemporain' },\n  { libelle: 'Personnel', pourcentage: 0.011829230817514528, icon: '\ud83d\udc65', sous: 'Ressources humaines' },\n  { libelle: 'Tourisme', pourcentage: 0.012972743398364631, icon: '\u2708\ufe0f', sous: '\u00c9quipements et am\u00e9nagements touristiques' },\n  { libelle: 'Moyens internes', pourcentage: 0.022686124584258248, icon: '\u2699\ufe0f', sous: 'Finances, informatique, b\u00e2timents' },\n  { libelle: 'Pouvoirs publics', pourcentage: 0.03290089168700043, icon: '\ud83c\udfdb\ufe0f', sous: 'Gouvernement et institutions' },\n  { libelle: 'D\u00e9veloppement des ressources propres', pourcentage: 0.03909161792445178, icon: '\ud83c\udf4d', sous: 'Agriculture, p\u00eache, perliculture' },\n  { libelle: 'Enseignement', pourcentage: 0.042261956917149235, icon: '\ud83c\udf93', sous: 'Enseignement primaire, secondaire, sup\u00e9rieur' },\n  { libelle: 'Economie g\u00e9n\u00e9rale', pourcentage: 0.036828275009147746, icon: '\ud83d\udcc8', sous: 'R\u00e9gulation et d\u00e9veloppement des entreprises' },\n  { libelle: 'Gestion fiscale', pourcentage: 0.04551922507284323, icon: '\ud83e\uddee', sous: 'Fiscalit\u00e9 indirecte et directe' },\n  { libelle: 'Urbanisme, habitat et foncier', pourcentage: 0.06114833678556502, icon: '\ud83c\udfd7\ufe0f', sous: 'Urbanisme et affaires fonci\u00e8res' },\n  { libelle: 'Travail et emploi', pourcentage: 0.05866738906607972, icon: '\ud83d\udcbc', sous: 'Formation professionnelle et insertion' },\n  { libelle: 'Transports', pourcentage: 0.03770283924787323, icon: '\ud83d\ude9b', sous: 'Transports terrestres, maritimes, a\u00e9riens' },\n  { libelle: 'Sant\u00e9', pourcentage: 0.07539154720625751, icon: '\ud83c\udfe5', sous: 'Offre de sant\u00e9 et pr\u00e9vention' },\n  { libelle: 'R\u00e9seaux et \u00e9quipements structurants', pourcentage: 0.0991301861674408, icon: '\ud83d\udee3\ufe0f', sous: 'R\u00e9seaux routiers, ports, \u00e9nergie' },\n  { libelle: 'Gestion financi\u00e8re', pourcentage: 0.09013571310170396, icon: '\ud83d\udcb0', sous: 'Dette et op\u00e9rations financi\u00e8res' },\n  { libelle: 'Partenariat avec les collectivit\u00e9s', pourcentage: 0.12444128481837043, icon: '\ud83e\udd1d', sous: 'Partenariat avec communes et archipels' },\n  { libelle: 'Vie sociale', pourcentage: 0.1945523455964558, icon: '\ud83d\udc6b', sous: 'Protection de l\u2019enfance, solidarit\u00e9, jeunesse, sports' }\n];\n\nlet chart;\n\nfunction calculerRepartition() {\n  let montant = parseFloat(document.getElementById('montant').value) || 10000;\n  montant = Math.round(montant);\n\n  const parts = missions.map(m => montant * m.pourcentage);\n  let arrondis = parts.map(p => Math.floor(p));\n  let sommeArrondis = arrondis.reduce((a, b) => a + b, 0);\n  let difference = montant - sommeArrondis;\n\n  if (difference > 0) {\n    const restes = parts.map((p, i) => ({\n      reste: p - arrondis[i],\n      index: i\n    }));\n    restes.sort((a, b) => b.reste - a.reste);\n    for (let i = 0; i < difference; i++) {\n      arrondis[restes[i].index]++;\n    }\n  }\n\n  const couleurs = [\n    '#FF6384', '#36A2EB', '#FFCE56', '#4BC0C0', '#9966FF',\n    '#FF9F40', '#C9CBCF', '#E7E9ED', '#F7464A', '#00A0B0',\n    '#C4B5FD', '#7BC225', '#FDBCB4', '#E377C2', '#7F7F7F',\n    '#17BECF', '#BCBD22', '#2E91E5'\n  ];\n\n  const indicesTries = arrondis\n    .map((v, i) => i)\n    .sort((a, b) => arrondis[b] - arrondis[a]);\n\n  const labels = indicesTries.map(i => missions[i].libelle);\n  const dataTriee = indicesTries.map(i => arrondis[i]);\n  const couleursTriees = indicesTries.map(i => couleurs[i]);\n  const missionsTriees = indicesTries.map(i => missions[i]);\n\n  const ctx = document.getElementById('pieChart').getContext('2d');\n  \n  if (chart) {\n    chart.destroy();\n  }\n\n  chart = new Chart(ctx, {\n    type: 'pie',\n    data: {\n      labels: labels,\n      datasets: [{\n        data: dataTriee,\n        backgroundColor: couleursTriees,\n        borderWidth: 1,\n        borderColor: '#fff'\n      }]\n    },\n    options: {\n      responsive: true,\n      maintainAspectRatio: false,\n      plugins: {\n        legend: {\n          display: true,\n          position: 'bottom',\n          labels: {\n            boxWidth: 14,\n            padding: 10,\n            font: {\n              size: 12\n            }\n            \/\/ \u2190 plus de generateLabels = plus de troncature\n          }\n        },\n        tooltip: {\n          callbacks: {\n            label: function(context) {\n              const mission = missionsTriees[context.dataIndex];\n              return mission.libelle + ' : ' +\n                context.parsed.toLocaleString('fr-FR') + ' XPF (' +\n                (mission.pourcentage * 100).toFixed(2) + '%)';\n            }\n          }\n        }\n      }\n    }\n  });\n\n  \/\/ L\u00e9gende en cartes (avec ic\u00f4nes)\n  let html = '';\n  missionsTriees.forEach((m, i) => {\n    html += `\n      <div class=\"legende-item\">\n        <div class=\"icon\">${m.icon}<\/div>\n        <div>\n          <strong>${m.libelle}<\/strong>\n          <small>${dataTriee[i].toLocaleString('fr-FR')} XPF\n          (${(m.pourcentage * 100).toFixed(2)}%)<\/small>\n        <\/div>\n      <\/div>\n    `;\n  });\n  document.getElementById('legende').innerHTML = html;\n}\n\n\/\/ Lancement initial\ncalculerRepartition();\n\nwindow.addEventListener('resize', function() {\n  if (chart) {\n    chart.resize();\n  }\n});\n<\/script><\/div><\/div><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":145,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-5024","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.service-public.pf\/dicp\/wp-json\/wp\/v2\/pages\/5024","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.service-public.pf\/dicp\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.service-public.pf\/dicp\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.service-public.pf\/dicp\/wp-json\/wp\/v2\/users\/145"}],"replies":[{"embeddable":true,"href":"https:\/\/www.service-public.pf\/dicp\/wp-json\/wp\/v2\/comments?post=5024"}],"version-history":[{"count":38,"href":"https:\/\/www.service-public.pf\/dicp\/wp-json\/wp\/v2\/pages\/5024\/revisions"}],"predecessor-version":[{"id":5448,"href":"https:\/\/www.service-public.pf\/dicp\/wp-json\/wp\/v2\/pages\/5024\/revisions\/5448"}],"wp:attachment":[{"href":"https:\/\/www.service-public.pf\/dicp\/wp-json\/wp\/v2\/media?parent=5024"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}