]*display:\s*none[^>]*>\s*([^<]+?)\s*<\/div>/i)
+const preheader = preheaderMatch ? preheaderMatch[1].trim() : ''
+
+const design = htmlToUnlayer(innerHtml, { preheader })
+
+// Optional: backup existing .json
+if (fs.existsSync(jsonPath)) {
+ const ts = new Date().toISOString().replace(/[:.]/g, '-').slice(0, 19)
+ fs.copyFileSync(jsonPath, jsonPath.replace(/\.json$/, `.bak-${ts}.json`))
+}
+
+fs.writeFileSync(jsonPath, JSON.stringify(design, null, 2), 'utf8')
+
+console.log(`✓ Converted ${name}.html (${fullHtml.length}b) → ${name}.json (${JSON.stringify(design).length}b)`)
+console.log(` preheader: "${preheader.slice(0, 80)}${preheader.length > 80 ? '…' : ''}"`)
+console.log(` inner HTML: ${innerHtml.length}b in one Custom HTML block`)
diff --git a/services/targo-hub/templates/gift-email-en.json b/services/targo-hub/templates/gift-email-en.json
new file mode 100644
index 0000000..1344dea
--- /dev/null
+++ b/services/targo-hub/templates/gift-email-en.json
@@ -0,0 +1,98 @@
+{
+ "counters": {
+ "u_row": 1,
+ "u_column": 1,
+ "u_content_html": 1
+ },
+ "body": {
+ "id": "BODY-1",
+ "rows": [
+ {
+ "id": "ROW-1",
+ "cells": [
+ 1
+ ],
+ "columns": [
+ {
+ "id": "COL-1",
+ "contents": [
+ {
+ "id": "HTML-1",
+ "type": "html",
+ "values": {
+ "html": "
Just like you, we love stable connections and lasting relationships.
\n \n
\n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n | \n \n \n \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n | \n \n Hi {{firstname}}, \n \n | \n \n \n \n | \n \n Going local — we want to say thanks. \n Just like you, we love stable connections and lasting relationships. \n \n | \n \n \n \n | \n \n Summer's here, and we have a limited-time gift for you. \n \n | \n \n \n \n | \n \n We now offer new plans, up to 3.5 Gbit/s. \n Whether you want more speed, want to beat another offer, or just want to chat — we're right around the corner. \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n | \n \n 🎁 {{amount}} at hundreds of brands \n \n | \n \n \n \n | \n \n ⚡ Instant on activation \n \n | \n \n \n \n | \n \n 🤝 Stay with us {{commitment_months}}+ months \n \n | \n \n \n \n \n \n | \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n | \n \n ✅ Option 1 \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n | \n \n \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n | \n \n 🪂 If you leave before {{commitment_months}} months, the prorated amount is refundable. \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n | \n \n ⏭️ Option 2 \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n | \n \n Do nothing. Your monthly subscription continues as usual — no commitment, no gift card. \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n | \n \n 🤝 Thanks for helping our regional economy thrive! \n \n | \n \n \n \n | \n \n The TARGO team \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n You're getting this email because you're a TARGO customer at {{description}}. \n Got a question? Write to\n support@targo.ca\n or call\n 514 448-0773.\n Support 7 days/week. \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n | \n \n \n \n \n | \n \n \n \n \n \n www.targo.ca\n · 1867 ch. de la rivière, Ste-Clotilde, QC \n © {{year}} TARGO Communications · All rights reserved. \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n
",
+ "hideDesktop": false,
+ "displayCondition": null,
+ "containerPadding": "0px",
+ "_meta": {
+ "htmlID": "u_content_html_1",
+ "htmlClassNames": "u_content_html"
+ },
+ "selectable": true,
+ "draggable": true,
+ "duplicatable": true,
+ "deletable": true,
+ "hideable": true
+ }
+ }
+ ],
+ "values": {
+ "_meta": {
+ "htmlID": "u_column_1",
+ "htmlClassNames": "u_column"
+ }
+ }
+ }
+ ],
+ "values": {
+ "displayCondition": null,
+ "columns": false,
+ "backgroundColor": "",
+ "columnsBackgroundColor": "",
+ "padding": "0px",
+ "anchor": "",
+ "hideDesktop": false,
+ "_meta": {
+ "htmlID": "u_row_1",
+ "htmlClassNames": "u_row"
+ },
+ "selectable": true,
+ "draggable": true,
+ "duplicatable": true,
+ "deletable": true,
+ "hideable": true
+ }
+ }
+ ],
+ "values": {
+ "popupPosition": "center",
+ "popupWidth": "600px",
+ "popupHeight": "auto",
+ "borderRadius": "10px",
+ "contentAlign": "center",
+ "contentVerticalAlign": "center",
+ "contentWidth": "600px",
+ "fontFamily": {
+ "label": "Plus Jakarta Sans",
+ "value": "'Plus Jakarta Sans', sans-serif",
+ "url": "https://fonts.googleapis.com/css?family=Plus+Jakarta+Sans:400,500,600,700"
+ },
+ "textColor": "#1B2E24",
+ "popupBackgroundColor": "#FFFFFF",
+ "backgroundColor": "#F5FAF7",
+ "preheaderText": "Just like you, we love stable connections and lasting relationships.",
+ "linkStyle": {
+ "body": true,
+ "linkColor": "#00C853",
+ "linkHoverColor": "#005026",
+ "linkUnderline": true,
+ "linkHoverUnderline": true
+ },
+ "_meta": {
+ "htmlID": "u_body",
+ "htmlClassNames": "u_body"
+ }
+ }
+ },
+ "schemaVersion": 12
+}
\ No newline at end of file
diff --git a/services/targo-hub/templates/gift-email-fr.json b/services/targo-hub/templates/gift-email-fr.json
new file mode 100644
index 0000000..b3471ab
--- /dev/null
+++ b/services/targo-hub/templates/gift-email-fr.json
@@ -0,0 +1,98 @@
+{
+ "counters": {
+ "u_row": 1,
+ "u_column": 1,
+ "u_content_html": 1
+ },
+ "body": {
+ "id": "BODY-1",
+ "rows": [
+ {
+ "id": "ROW-1",
+ "cells": [
+ 1
+ ],
+ "columns": [
+ {
+ "id": "COL-1",
+ "contents": [
+ {
+ "id": "HTML-1",
+ "type": "html",
+ "values": {
+ "html": "
Comme toi, on aime les connexions stables et les relations durables.
\n \n
\n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n | \n \n \n \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n | \n \n Bonjour {{firstname}}, \n \n | \n \n \n \n | \n \n Tu choisis local, on veut te remercier. \n Comme toi, on aime les connexions stables et les relations durables. \n \n | \n \n \n \n | \n \n Avec l'arrivée de l'été, voici un cadeau pour toi, disponible pour un temps limité. \n \n | \n \n \n \n | \n \n Nous offrons maintenant de nouveaux forfaits, jusqu'à 3.5 Gbit/s. \n Que tu souhaites plus de vitesse, battre une autre offre ou juste nous jaser, on est juste à côté. \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n | \n \n 🎁 {{amount}} chez des centaines de marques \n \n | \n \n \n \n | \n \n ⚡ Instantané à l'activation \n \n | \n \n \n \n | \n \n 🤝 Rester encore {{commitment_months}} mois ou + \n \n | \n \n \n \n \n \n | \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n | \n \n ✅ Option 1 \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n | \n \n \n \n | \n \n \n \n | \n \n \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n | \n \n 🪂 En cas de départ avant {{commitment_months}} mois, le prorata du montant est remboursable. \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n | \n \n ⏭️ Option 2 \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n | \n \n Ne rien faire. Ton abonnement mensuel se poursuit normalement, sans engagement ni carte-cadeau. \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n | \n \n 🤝 Merci de faire rouler l'économie de notre région avec nous ! \n \n | \n \n \n \n | \n \n L'équipe TARGO \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n Tu reçois ce courriel parce que tu es client(e) TARGO à {{description}}. \n Une question ? Écris à\n support@targo.ca\n ou appelle au\n 514 448-0773.\n Support 7j/7. \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n \n
\n \n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n | \n \n \n \n \n | \n \n \n \n \n \n www.targo.ca\n · 1867 ch. de la rivière, Ste-Clotilde, QC \n © {{year}} TARGO Communications · Tous droits réservés. \n \n | \n \n \n \n \n \n \n \n \n | \n
\n \n
\n \n
\n \n \n \n \n \n
",
+ "hideDesktop": false,
+ "displayCondition": null,
+ "containerPadding": "0px",
+ "_meta": {
+ "htmlID": "u_content_html_1",
+ "htmlClassNames": "u_content_html"
+ },
+ "selectable": true,
+ "draggable": true,
+ "duplicatable": true,
+ "deletable": true,
+ "hideable": true
+ }
+ }
+ ],
+ "values": {
+ "_meta": {
+ "htmlID": "u_column_1",
+ "htmlClassNames": "u_column"
+ }
+ }
+ }
+ ],
+ "values": {
+ "displayCondition": null,
+ "columns": false,
+ "backgroundColor": "",
+ "columnsBackgroundColor": "",
+ "padding": "0px",
+ "anchor": "",
+ "hideDesktop": false,
+ "_meta": {
+ "htmlID": "u_row_1",
+ "htmlClassNames": "u_row"
+ },
+ "selectable": true,
+ "draggable": true,
+ "duplicatable": true,
+ "deletable": true,
+ "hideable": true
+ }
+ }
+ ],
+ "values": {
+ "popupPosition": "center",
+ "popupWidth": "600px",
+ "popupHeight": "auto",
+ "borderRadius": "10px",
+ "contentAlign": "center",
+ "contentVerticalAlign": "center",
+ "contentWidth": "600px",
+ "fontFamily": {
+ "label": "Plus Jakarta Sans",
+ "value": "'Plus Jakarta Sans', sans-serif",
+ "url": "https://fonts.googleapis.com/css?family=Plus+Jakarta+Sans:400,500,600,700"
+ },
+ "textColor": "#1B2E24",
+ "popupBackgroundColor": "#FFFFFF",
+ "backgroundColor": "#F5FAF7",
+ "preheaderText": "Comme toi, on aime les connexions stables et les relations durables.",
+ "linkStyle": {
+ "body": true,
+ "linkColor": "#00C853",
+ "linkHoverColor": "#005026",
+ "linkUnderline": true,
+ "linkHoverUnderline": true
+ },
+ "_meta": {
+ "htmlID": "u_body",
+ "htmlClassNames": "u_body"
+ }
+ }
+ },
+ "schemaVersion": 12
+}
\ No newline at end of file