Outil interactif

Simulateur Budget + Durée

Estime le coût total et la durée de ton permis de conduire en Belgique selon ta région et ta filière. Découvre les frais cachés et optimise ton budget.

2h 20h
⚠️ Frais cachés à prévoir
Coût total estimé
€0

💡 Conseils pour économiser

Voir le détail complet des prix →

Durée totale estimée 0 semaines

Voir les démarches administratives →

Comparaison visuelle

Coût total
Libre
Auto-école
Durée
Libre
Auto-école

Lire le comparatif détaillé →

'); printWin.document.write(summary.html); printWin.document.write(''); printWin.document.close(); printWin.focus(); printWin.print(); }); document.getElementById('btn-copy').addEventListener('click', function () { var btn = this; var summary = generateSummary(); if (navigator.clipboard) { navigator.clipboard.writeText(summary.text).then(function () { btn.classList.add('copied'); btn.querySelector('svg').nextSibling.textContent = ' Copi\u00e9 !'; setTimeout(function () { btn.classList.remove('copied'); btn.querySelector('svg').nextSibling.textContent = ' Copier le r\u00e9sum\u00e9'; }, 2000); }); } }); function generateSummary() { var data = PRICES[state.region][state.filiere]; var items = data.items; var total = 0; var lines = []; var htmlRows = ''; items.forEach(function (item) { var c = item.isAePrice ? state.aePrice : item.cost; total += c; lines.push(item.label + ' : ' + c + ' \u20ac'); htmlRows += '' + item.label + '' + c + '\u00a0\u20ac'; }); var regionLabel = state.region === 'wallonie' ? 'Wallonie' : 'Bruxelles'; var filiereLabel = state.filiere === 'libre' ? 'Fili\u00e8re libre' : 'Auto-\u00e9cole'; var h = state.hours; var practiceHours = state.filiere === 'libre' ? DURATIONS.practice_libre : DURATIONS.practice_ae; var totalWeeks = Math.ceil(DURATIONS.theorie_study / h) + Math.ceil(DURATIONS.tpr_prep / h) + DURATIONS.admin_weeks + Math.ceil(practiceHours / h); var months = Math.round(totalWeeks / 4.33); var durText = totalWeeks + ' semaines'; if (months >= 2) durText += ' (~' + months + ' mois)'; var text = 'BUDGET PERMIS DE CONDUIRE - BELGIQUE\n'; text += '======================================\n'; text += 'R\u00e9gion : ' + regionLabel + '\n'; text += 'Fili\u00e8re : ' + filiereLabel + '\n'; text += 'Disponibilit\u00e9 : ' + state.hours + 'h/semaine\n\n'; text += 'D\u00c9TAIL DES CO\u00dbTS\n'; text += '-------------------\n'; text += lines.join('\n') + '\n\n'; text += 'TOTAL : ' + total + ' \u20ac\n'; text += 'DUR\u00c9E ESTIM\u00c9E : ' + durText + '\n\n'; text += 'G\u00e9n\u00e9r\u00e9 sur permis-online.be'; var html = '

Budget Permis de Conduire - Belgique

'; html += '

R\u00e9gion : ' + regionLabel + ' | Fili\u00e8re : ' + filiereLabel + ' | Disponibilit\u00e9 : ' + state.hours + 'h/semaine

'; html += '

D\u00e9tail des co\u00fbts

'; html += '' + htmlRows + '
'; html += '

Total : ' + total + '\u00a0\u20ac

'; html += '

Dur\u00e9e estim\u00e9e

'; html += '

' + durText + '

'; html += '

G\u00e9n\u00e9r\u00e9 sur permis-online.be

'; return { text: text, html: html }; } /* ---- Render ---- */ function render() { renderBudget(); renderTimeline(); renderComparatif(); } /* ---- Pie chart helper ---- */ function renderPieChart(items) { var total = 0; items.forEach(function (i) { total += i.cost; }); if (total === 0) { pieSvg.innerHTML = ''; pieLegend.innerHTML = ''; return; } var svgNS = 'http://www.w3.org/2000/svg'; pieSvg.innerHTML = ''; pieLegend.innerHTML = ''; var cx = 100, cy = 100, r = 85; var circumference = 2 * Math.PI * r; var offset = 0; items.forEach(function (item, idx) { if (item.cost === 0) return; var pct = item.cost / total; var dashLen = pct * circumference; var dashGap = circumference - dashLen; var circle = document.createElementNS(svgNS, 'circle'); circle.setAttribute('cx', cx); circle.setAttribute('cy', cy); circle.setAttribute('r', r); circle.setAttribute('fill', 'none'); circle.setAttribute('stroke', COLORS[idx % COLORS.length]); circle.setAttribute('stroke-width', '28'); circle.setAttribute('stroke-dasharray', dashLen + ' ' + dashGap); circle.setAttribute('stroke-dashoffset', -offset); circle.style.transition = 'stroke-dasharray .5s ease, stroke-dashoffset .5s ease'; pieSvg.appendChild(circle); offset += dashLen; /* Legend */ var legendItem = document.createElement('div'); legendItem.className = 'po-pie-legend-item'; legendItem.innerHTML = '' + '' + item.label + '' + '' + item.cost + '\u00a0\u20ac'; pieLegend.appendChild(legendItem); }); } /* Budget tab */ function renderBudget() { var data = PRICES[state.region][state.filiere]; var items = data.items; var maxCost = 0; var total = 0; var pieItems = []; items.forEach(function (i) { var c = i.isAePrice ? state.aePrice : i.cost; if (c > maxCost) maxCost = c; total += c; pieItems.push({ label: i.label, cost: c }); }); renderPieChart(pieItems); var html = ''; items.forEach(function (item, idx) { var c = item.isAePrice ? state.aePrice : item.cost; var pct = maxCost > 0 ? (c / maxCost) * 100 : 0; var displayCost = c === 0 ? 'Gratuit' : c + '\u00a0\u20ac'; var tooltipHtml = ''; if (item.tooltip) { tooltipHtml = '?' + item.tooltip + ''; } html += '
' + '' + item.label + tooltipHtml + '' + '
' + '' + displayCost + '' + '
'; }); budgetTable.innerHTML = html; budgetTotal.textContent = total + '\u00a0\u20ac'; budgetTotal.style.animation = 'none'; void budgetTotal.offsetWidth; budgetTotal.style.animation = 'poFadeIn .35s ease'; if (state.filiere === 'auto-ecole') { budgetRangeLabel.textContent = 'Tarif auto-\u00e9cole ajustable avec le curseur'; } else { budgetRangeLabel.textContent = 'Frais administratifs uniquement'; } /* Hidden costs */ var hc = HIDDEN_COSTS[state.filiere]; var hcHtml = ''; hc.forEach(function (item) { hcHtml += '
' + item.label + '' + item.cost + '
'; }); hiddenCostsGrid.innerHTML = hcHtml; /* Savings tips */ renderSavingsTips(total); } /* Savings Tips */ function renderSavingsTips(total) { var tips = []; var examCost = state.region === 'bruxelles' ? 19 : 17; var pratiqueCost = state.region === 'bruxelles' ? 46 : 41; tips.push({ icon: '\ud83c\udfaf', text: 'Passe l\u2019examen th\u00e9orique du premier coup pour \u00e9conomiser ' + examCost + '\u00a0\u20ac par tentative suppl\u00e9mentaire.' }); tips.push({ icon: '\ud83d\ude97', text: 'R\u00e9ussis la pratique du premier coup : chaque tentative co\u00fbte ' + pratiqueCost + '\u00a0\u20ac suppl\u00e9mentaire.' }); if (state.filiere === 'auto-ecole') { tips.push({ icon: '\ud83d\udcb0', text: 'Compare au moins 3 auto-\u00e9coles dans ta r\u00e9gion. Les \u00e9carts de prix peuvent atteindre 400 - 600\u00a0\u20ac.' }); tips.push({ icon: '\ud83d\udcc5', text: 'R\u00e9vise le code en autonome avant de commencer : moins d\u2019heures n\u00e9cessaires en auto-\u00e9cole.' }); } else { tips.push({ icon: '\ud83d\udcd6', text: 'Utilise des apps gratuites de code pour t\u2019entra\u00eener et \u00e9viter un repassage.' }); tips.push({ icon: '\ud83d\udc65', text: 'Trouve un guide patient et disponible : plus tu roules r\u00e9guli\u00e8rement, plus vite tu seras pr\u00eat(e).' }); } tips.push({ icon: '\ud83d\udcf8', text: 'Fais tes photos d\u2019identit\u00e9 dans un photomaton plut\u00f4t qu\u2019en studio : environ 5 - 10\u00a0\u20ac d\u2019\u00e9conomie.' }); var html = ''; tips.forEach(function (tip) { html += '
' + tip.icon + '' + tip.text + '
'; }); savingsList.innerHTML = html; } /* Timeline tab - Gantt chart */ function renderTimeline() { var h = state.hours; var practiceHours = state.filiere === 'libre' ? DURATIONS.practice_libre : DURATIONS.practice_ae; var theorieWeeks = Math.ceil(DURATIONS.theorie_study / h); var tprWeeks = Math.ceil(DURATIONS.tpr_prep / h); var adminWeeks = DURATIONS.admin_weeks; var practiceWeeks = Math.ceil(practiceHours / h); var examWeek = 1; var totalWeeks = theorieWeeks + tprWeeks + adminWeeks + practiceWeeks + examWeek; var tprLabel = state.region === 'bruxelles' ? 'Premiers secours' : 'TPR'; var tprTooltip = state.region === 'bruxelles' ? 'Formation brevet de premiers secours (gratuite)' : 'Pr\u00e9paration au test de perception des risques'; var phases = [ { label: 'Th\u00e9orie', weeks: theorieWeeks, start: 0, barClass: 'bar-theorie', tooltip: '\u00c9tude du code de la route : ' + DURATIONS.theorie_study + 'h \u00e0 ' + h + 'h/sem.' }, { label: tprLabel, weeks: tprWeeks, start: theorieWeeks, barClass: 'bar-tpr', tooltip: tprTooltip + ' : ' + DURATIONS.tpr_prep + 'h \u00e0 ' + h + 'h/sem.' }, { label: 'D\u00e9marches admin.', weeks: adminWeeks, start: theorieWeeks + tprWeeks, barClass: 'bar-admin', tooltip: 'Demande du permis provisoire \u00e0 la commune' }, { label: 'Pratique', weeks: practiceWeeks, start: theorieWeeks + tprWeeks + adminWeeks, barClass: 'bar-pratique', tooltip: practiceHours + 'h de conduite \u00e0 ' + h + 'h/sem.' }, { label: 'Examen', weeks: examWeek, start: theorieWeeks + tprWeeks + adminWeeks + practiceWeeks, barClass: 'bar-examen', tooltip: 'Passage de l\u2019examen pratique' } ]; var html = ''; phases.forEach(function (phase) { var leftPct = (phase.start / totalWeeks) * 100; var widthPct = (phase.weeks / totalWeeks) * 100; html += '
' + '' + phase.label + '' + '
' + '
' + phase.weeks + ' sem.' + '
' + phase.tooltip + '
' + '
' + '
' + '
'; }); /* Scale */ html += '
'; html += 'Semaine 0'; var midWeek = Math.round(totalWeeks / 2); html += 'Sem. ' + midWeek + ''; html += 'Sem. ' + totalWeeks + ''; html += '
'; ganttChart.innerHTML = html; var months = Math.round((totalWeeks - examWeek) / 4.33); var durText = (totalWeeks - examWeek) + ' semaines'; if (months >= 2) durText += ' (~' + months + ' mois)'; durationTotal.textContent = durText; } /* Comparatif tab */ function renderComparatif() { var h = state.hours; var region = state.region; function calcTotal(reg, fil) { var t = 0; PRICES[reg][fil].items.forEach(function (i) { t += i.isAePrice ? state.aePrice : i.cost; }); return t; } function calcWeeks(fil) { var practice = fil === 'libre' ? DURATIONS.practice_libre : DURATIONS.practice_ae; return Math.ceil(DURATIONS.theorie_study / h) + Math.ceil(DURATIONS.tpr_prep / h) + DURATIONS.admin_weeks + Math.ceil(practice / h); } var libreTotal = calcTotal(region, 'libre'); var libreWeeks = calcWeeks('libre'); var aeTotal = calcTotal(region, 'auto-ecole'); var aeWeeks = calcWeeks('auto-ecole'); var maxCost = Math.max(libreTotal, aeTotal); var maxWeeks = Math.max(libreWeeks, aeWeeks); /* Animated bars */ requestAnimationFrame(function () { document.getElementById('libre-cost-bar').style.width = (libreTotal / maxCost * 100) + '%'; document.getElementById('ae-cost-bar').style.width = (aeTotal / maxCost * 100) + '%'; document.getElementById('libre-dur-bar').style.width = (libreWeeks / maxWeeks * 100) + '%'; document.getElementById('ae-dur-bar').style.width = (aeWeeks / maxWeeks * 100) + '%'; }); document.getElementById('libre-cost-val').textContent = libreTotal + '\u00a0\u20ac'; document.getElementById('ae-cost-val').textContent = aeTotal + '\u00a0\u20ac'; var libreMonths = Math.round(libreWeeks / 4.33); var aeMonths = Math.round(aeWeeks / 4.33); document.getElementById('libre-dur-val').textContent = libreWeeks + ' sem.' + (libreMonths >= 2 ? ' (~' + libreMonths + ' mois)' : ''); document.getElementById('ae-dur-val').textContent = aeWeeks + ' sem.' + (aeMonths >= 2 ? ' (~' + aeMonths + ' mois)' : ''); /* Cards */ var libreHighlight = state.filiere === 'libre'; var aeHighlight = state.filiere === 'auto-ecole'; comparatifGrid.innerHTML = buildCompareCard('Fili\u00e8re libre', libreTotal, libreWeeks, ['Moins cher', 'Plus flexible', 'Plus d\u2019autonomie'], ['N\u00e9cessite un guide', 'Autonomie requise', 'Plus de d\u00e9marches'], libreHighlight ) + buildCompareCard('Auto-\u00e9cole', aeTotal, aeWeeks, ['Encadrement pro', 'Moniteur agr\u00e9\u00e9', 'V\u00e9hicule fourni'], ['Plus cher', 'Moins flexible', 'Horaires fix\u00e9s'], aeHighlight ); /* Verdict */ var savings = aeTotal - libreTotal; var timeDiff = libreWeeks - aeWeeks; var verdictHtml = '

⚖️ Notre verdict

'; if (savings > 200) { verdictHtml += '

'; verdictHtml += 'En fili\u00e8re libre, tu \u00e9conomises ' + savings + '\u00a0\u20ac'; if (timeDiff > 0) { verdictHtml += ', mais il te faudra environ ' + timeDiff + ' semaines de plus.'; } else { verdictHtml += ' sans perdre de temps suppl\u00e9mentaire.'; } verdictHtml += ' La fili\u00e8re libre est id\u00e9ale si tu as un guide exp\u00e9riment\u00e9 et que tu es motiv\u00e9(e) \u00e0 travailler en autonomie.'; verdictHtml += '

'; } else { verdictHtml += '

'; verdictHtml += 'Avec un tarif auto-\u00e9cole de ' + state.aePrice + '\u00a0\u20ac, la diff\u00e9rence de prix est de ' + savings + '\u00a0\u20ac.'; if (timeDiff > 0) { verdictHtml += ' L\u2019auto-\u00e9cole est ' + timeDiff + ' semaines plus rapide.'; } verdictHtml += ' Si tu pr\u00e9f\u00e8res un encadrement structur\u00e9 et un v\u00e9hicule fourni, l\u2019auto-\u00e9cole reste un bon investissement.'; verdictHtml += '

'; } verdictSection.innerHTML = verdictHtml; } function buildCompareCard(title, cost, weeks, pros, cons, highlighted) { var months = Math.round(weeks / 4.33); var durationLabel = weeks + ' sem.'; if (months >= 2) durationLabel = '~' + months + ' mois'; var html = '
' + '
' + '' + title + '' + (highlighted ? 'S\u00e9lectionn\u00e9' : '') + '
' + '
' + '
' + cost + '\u00a0\u20acBudget
' + '
' + durationLabel + 'Dur\u00e9e
' + '
' + '
    '; pros.forEach(function (p) { html += '
  • ' + p + '
  • '; }); cons.forEach(function (c) { html += '
  • ' + c + '
  • '; }); html += '
'; return html; } /* ---- Initial render ---- */ render(); })();