{# Reusable pricing card macro (v7.0). FlexiHub style — recommended tier gets a grad-bg outer border (1.5px gradient frame). Args: slug : URL-safe identifier (goes into href, NOT piped through | safe — autoescape protects URL) name : Display name (piped through | safe — entity-free expected: "Cloud BASIC", "DictIA LOCAL"…) target : Target audience tagline — piped through | safe (may contain entities) features : List of feature strings, each piped through | safe (may contain   entities) badge : Top eyebrow chip text above the title — e.g. 'Cloud · Souverain QC' or 'Local · 100% hors-ligne' recommended : If True, wraps the card in grad-bg gradient frame + RECOMMANDÉ badge setup : One-shot setup price NUMBER (CAD, no NBSP) — None to hide. Cloud Basic/Essentiel = None, Cloud Pro = 485, DictIA Local = 5998. monthly : Monthly recurring price NUMBER (CAD, no NBSP) — None for DictIA Local (one-shot only). yearly_renewal : Year-2+ renewal NUMBER (CAD, no NBSP) — only for DictIA Local (500$/an dès An 2). capacity_audio : Capacity chip (audio hours / month) — e.g. '~165 h audio/mois' capacity_storage : Capacity chip (storage) — e.g. '100 Go' gpu : GPU chip — e.g. 'NVIDIA L4 partagé' cta_label : Button text — e.g. 'Démarrer en Cloud', 'Configurer DictIA Local' cta_url : Base URL for the CTA — slug appended (NOT piped through | safe — URL injection guard) The numeric `setup` / `monthly` / `yearly_renewal` are formatted server-side with French (fr-CA) thousands separator (NBSP) — `5998` → `5 998 $`. This avoids requiring callers to remember OQLF NBSP conventions for every price string. Note: pre-launch hygiene (LPC art. 219) — CTA wording is supplied by the caller (`cta_label`) so we no longer hardcode "Réserver" everywhere. #} {# Format an integer like 5998 → '5 998' (OQLF thousands separator) #} {%- macro fmt_price(n) -%} {%- set s = n | string -%} {%- if s | length > 3 -%}{{ s[:-3] }} {{ s[-3:] }}{%- else -%}{{ s }}{%- endif -%} {%- endmacro -%} {%- macro pricing_card(slug, name, target, features, badge=None, recommended=False, setup=None, monthly=None, yearly_renewal=None, capacity_audio=None, capacity_storage=None, gpu=None, cta_label='Choisir ce forfait', cta_url='/checkout') -%} {%- endmacro -%}