// Contenu « tarifs » du site, généré depuis le catalogue de l'API (backend/src/billing/plans.ts) : // un changement de prix se fait à un seul endroit, puis `node site-src/build.js …`. const path = require('path'); const backend = path.join(__dirname, '..', 'backend'); require(path.join(backend, 'node_modules', 'ts-node')).register({ transpileOnly: true, compilerOptions: { module: 'commonjs' } }); const { PLANS } = require(path.join(backend, 'src', 'billing', 'plans.ts')); const { MODULES } = require(path.join(backend, 'src', 'modules', 'catalog.ts')); /** Fonctions de base de chaque formule (les modules sont listés à part, depuis le catalogue) ; `soon: true` = affichée « Bientôt ». */ const MARKETING = { ESSENTIEL: { intro: null, items: [ { label: 'La carte à vos couleurs, dans Apple Wallet et Google Wallet' }, { label: 'Points ou tampons, récompenses définies par vous' }, { label: 'Solde et récompenses mis à jour en direct dans le Wallet' }, { label: 'App MonEspacePro pour 3 employés' }, { label: 'Anti-triche : plafond, délai, historique par employé' }, { label: 'Affichette de comptoir A5 / A6' }, ], }, PRO: { intro: 'Tout Essentiel, plus :', items: [ { label: 'Employés illimités' }, ], }, RESEAU: { intro: 'Tout Pro, plus :', items: [ { label: 'Une carte commune à tous vos magasins', soon: true }, { label: 'Tableau de bord consolidé', soon: true }, { label: 'Tarif par magasin, à partir de 3 magasins' }, ], }, }; const euros = (cents) => (cents / 100).toLocaleString('fr-FR', { minimumFractionDigits: cents % 100 ? 2 : 0, maximumFractionDigits: 2 }).replace(/ /g, ' '); const plans = Object.values(PLANS); const min = Math.min(...plans.map((p) => p.priceCents.MONTH)); /** Inscription en ligne (application web, voir admin/src/pages/SignupPage.tsx). */ const SIGNUP_URL = '/inscription'; const FROM = `${euros(min)} €`; function planCard(def) { const m = MARKETING[def.plan]; const pro = def.plan === 'PRO'; const perStore = def.plan === 'RESEAU' ? ' / magasin' : ''; const monthlyEquivalent = euros(Math.round(def.priceCents.YEAR / 12)); const saved = euros(def.priceCents.MONTH * 12 - def.priceCents.YEAR); const check = ''; return `
${def.tagline}
${euros(def.priceCents.MONTH)} €/ mois${perStore}
Sans engagement, résiliable à tout moment
Choisir ${def.name}${m.intro}
` : ''}${def.modules.length ? `Modules inclus (${def.modules.length})` : 'Modules'}
${ def.modules.length ? `Aucun module inclus. Besoin d’un module en particulier ? Nous l’ajoutons sur mesure.
' }Modules
Chaque module s’active et se règle séparément : textes des messages, délais, heures d’envoi, points offerts. Un module absent de votre formule peut être ajouté sur mesure.
| Module | ${plans.map((p) => `${p.name} | `).join('')}|
|---|---|---|
| ${m.name}${m.description} | ${plans .map((p) => { const cls = p.plan === 'PRO' ? ' class="col-pro"' : ''; return p.modules.includes(m.id) ? `` : ` | Sur mesure | `; }) .join('')}
Tarif
Commencez simple, passez en Pro quand vous voulez faire revenir vos clients plus souvent. Inscription en ligne, carte prête en quelques minutes, sans engagement.
Prix TTC. TVA non applicable, art. 293 B du CGI. Les fonctions « Bientôt » sont incluses dans la formule dès leur sortie, sans supplément.
Choisissez une formule et le nombre de magasins : le total s’affiche, au mois ou à l’année.
`; const SIMULATOR_PLAN_PICKER = `Formule
Nombre de magasins
`; /** Remplacements par page ; chaque motif doit exister (sinon la maquette a changé : erreur). */ const EDITS = { 'Tarif.dc.html': [ [/Le tarif suit le nombre de magasins : 10 € par mois pour chacun.
', SIMULATOR_INTRO], ['Nombre de magasins
', SIMULATOR_PLAN_PICKER], ['Total mensuel
', 'Total mensuel
'], ['10 €', `${euros(PLANS.PRO.priceCents.MONTH)} €`], ['par mois, sans engagement
', 'par mois, sans engagement
'], ['10 € par magasin, prélevés chaque mois.
', 'Prélevé chaque mois, ou une fois par an avec 2 mois offerts. Carte bancaire ou prélèvement SEPA.
'], ['Non. Le tarif est de 10 € par mois et par magasin, sans frais d’installation et sans commission.
', `Non. Vous payez seulement votre formule, à partir de ${FROM} par mois et par magasin, sans frais d’installation et sans commission.
`], ['Automatiquement, au format PDF, après chaque prélèvement mensuel. La TVA n’est pas applicable (art. 293 B du CGI).
', 'Automatiquement, au format PDF, après chaque prélèvement (mensuel ou annuel). La TVA n’est pas applicable (art. 293 B du CGI).
'], ['10 € par mois et par magasin. Le simulateur ci-dessus calcule le total.
', `Chaque magasin a sa formule. À partir de 3 magasins, la formule Réseau revient à ${euros(PLANS.RESEAU.priceCents.MONTH)} € par mois et par magasin, avec toutes les fonctions Pro. Le simulateur ci-dessus calcule le total.
`], ], 'Main.dc.html': [ ['10 €/mois', `Dès ${euros(min)} €/mois`], [/par mois et par magasin<\/p>/, `
À partir de
\npar mois et par magasin
`], ['10 € par mois et par magasin, sans engagement. Le prélèvement est mensuel et les factures sont automatiques.
', `À partir de ${FROM} par mois et par magasin, sans engagement. Paiement mensuel ou annuel, factures automatiques.
`], ], 'Faq.dc.html': [ ['Le tarif est de 10 € par mois et par magasin.
', `Chaque magasin a sa formule. À partir de 3 magasins, la formule Réseau revient à ${euros(PLANS.RESEAU.priceCents.MONTH)} € par mois et par magasin. Voir les formules.
`], ['10 € par mois et par magasin, sans frais d’installation et sans commission. TVA non applicable, art. 293 B du CGI.
', `Trois formules : Essentiel à ${euros(PLANS.ESSENTIEL.priceCents.MONTH)} €, Pro à ${euros(PLANS.PRO.priceCents.MONTH)} € et Réseau à ${euros(PLANS.RESEAU.priceCents.MONTH)} € par magasin, par mois. Sans frais d’installation, sans commission. TVA non applicable, art. 293 B du CGI. Comparer les formules.
`], ], 'Cgv.dc.html': [ ['Le service est proposé au prix de 10 € par mois et par magasin. TVA non applicable, art. 293 B du CGI.
', 'Le prix dépend de la formule choisie (Essentiel, Pro ou Réseau) et de sa périodicité (mensuelle ou annuelle). Il est indiqué sur la page Tarif et rappelé lors de la souscription. TVA non applicable, art. 293 B du CGI.
'], ], }; function applyPricing(file, body) { for (const [from, to] of EDITS[file] ?? []) { const found = typeof from === 'string' ? body.includes(from) : from.test(body); if (!found) throw new Error(`Tarifs : motif introuvable dans ${file} : ${String(from).slice(0, 80)}`); body = body.replace(from, to); } return body; } const DESCRIPTIONS = { 'Main.dc.html': `La carte de fidélité dématérialisée pour les commerces indépendants : vos clients l'ajoutent à Apple Wallet ou Google Wallet, sans application. Dès ${euros(min)} € par mois, sans engagement.`, 'Tarif.dc.html': `Trois formules sans engagement : Essentiel ${euros(PLANS.ESSENTIEL.priceCents.MONTH)} €, Pro ${euros(PLANS.PRO.priceCents.MONTH)} €, Réseau ${euros(PLANS.RESEAU.priceCents.MONTH)} € par magasin et par mois, sans frais d’installation. Modules inclus selon la formule.`, }; const CSS = [ '.mep .seg button{padding:8px 16px;border-radius:9px;font:inherit;font-weight:700;font-size:15px;color:var(--mu);background:transparent;border:0;cursor:pointer;min-height:40px}', '.mep .seg button.on{background:var(--sf);color:var(--ink)}', '.mep .plans{align-items:stretch}', '.mep .plan{position:relative;display:flex;flex-direction:column;gap:0;transition:transform .2s,box-shadow .2s}', '.mep .plan:hover{transform:translateY(-3px);box-shadow:0 20px 40px -30px rgba(0,0,0,.35)}', '.mep .plan-head h3{font-size:26px;margin:0 0 6px}', '.mep .plan-head .mu{min-height:3em;margin:0}', '.mep .plan-cta{width:100%;margin:20px 0 0;justify-content:center}', '.mep .plan-body{border-top:1px solid var(--bd);margin-top:24px;padding-top:20px;display:flex;flex-direction:column;gap:12px}', '.mep .plan-sub{font-weight:700;margin:8px 0 0}', '.mep .plan-body .fl{margin:0}', '.mep .save-tag{display:inline-block;margin-left:6px;font-size:12px;font-weight:800;padding:2px 8px;border-radius:999px;background:var(--gr);color:#fff;vertical-align:1px}', '.mep .trust{list-style:none;margin:40px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}', '.mep .trust li{display:flex;gap:14px;align-items:flex-start;padding:18px;border-radius:18px;background:var(--sf);border:1px solid var(--bd)}', '.mep .trust strong{display:block;font-size:16px}', '.mep .trust .mu{font-size:14px}', '.mep .trust-ic{flex:none;width:40px;height:40px;border-radius:12px;background:var(--tint);color:var(--grt);display:grid;place-items:center}', '.mep .mod-table .col-pro{background:var(--tint)}', '.mep .mod-table thead .col-pro{color:var(--grt)}', '.mep .hero-h1{font-size:clamp(40px,4.6vw,60px)}', '.mep .hero-trust{list-style:none;margin:24px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:8px 20px;font-size:15px;color:var(--mu)}', '.mep .hero-trust li{display:flex;align-items:center;gap:6px}', '.mep .hero-trust .ico{color:var(--gr)}', '.mep .steps3{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:20px;counter-reset:s}', '.mep .steps3 li{position:relative;padding:28px 24px 24px;border-radius:22px;background:var(--sf);border:1px solid var(--bd)}', '.mep .steps3 h3{margin:16px 0 8px;font-size:21px}', '.mep .steps3 .mu{margin:0;font-size:16px}', '.mep .steps3 .n{width:44px;height:44px;border-radius:50%;background:var(--gr);color:#fff;font-weight:800;font-size:19px;display:grid;place-items:center}', '.mep .plan-pro{border:2px solid var(--gr);box-shadow:0 24px 48px -32px rgba(14,122,102,.6);background:linear-gradient(180deg,var(--tint) 0,var(--sf) 220px)}', '.mep .plan-tag{position:absolute;top:-18px;left:24px;background:var(--gr);color:#fff;border-color:var(--gr)}', '.mep .plan-price{margin:20px 0 0;font-size:52px;font-weight:800;letter-spacing:-.02em;line-height:1.1;margin-top:12px}', '.mep .plan-price small{font-size:17px;font-weight:600;color:var(--mu);margin-left:6px;letter-spacing:0}', '.mep .plan-note{font-size:14px;margin-top:4px;min-height:1.5em}', '.mep .fl .soon{color:var(--mu)}', '.mep .mod-table{overflow-x:auto;border:1px solid var(--bd);border-radius:20px;background:var(--sf)}', '.mep .mod-table table{width:100%;min-width:640px;border-collapse:collapse}', '.mep .mod-table th,.mep .mod-table td{padding:16px 20px;border-bottom:1px solid var(--bd);text-align:center;vertical-align:middle}', '.mep .mod-table tbody tr:last-child>*{border-bottom:0}', '.mep .mod-table thead th{font-size:15px;font-weight:700}', '.mep .mod-table tbody th{text-align:left;font-weight:400;max-width:440px}', '.mep .mod-table tbody th strong{display:block;font-size:17px;margin-bottom:2px}', '.mep .mod-table tbody th .mu{display:block;font-size:14px;line-height:1.45}', '.mep .mod-table td .ico{color:var(--gr);width:22px;height:22px}', '.mep .mod-table td .mu{font-size:13px;white-space:nowrap}', '.mep .mod-table thead th:first-child{text-align:left}', '.mep .soon-tag{display:inline-block;font-size:12px;font-weight:700;padding:2px 8px;border-radius:999px;background:var(--tint);color:var(--grt);margin-left:6px;vertical-align:1px;white-space:nowrap}', ].join('\n'); module.exports = { applyPricing, DESCRIPTIONS, CSS, TARIF_HERO };