INSERT INTO modules (
    internal_code,
    product_id,
    module_type_id,
    sort_order,
    name,
    slug,
    hero_eyebrow,
    hero_icon,
    tagline,
    short_description,
    hero_secondary_cta_label,
    hero_secondary_cta_url,
    presentation,
    problem_statement,
    solution_body,
    process_body,
    cta_label,
    cta_url,
    status,
    featured,
    meta_title,
    meta_description,
    canonical_url,
    published_at,
    created_at,
    updated_at
)
SELECT
    'MOD-WMS-001',
    (SELECT id FROM products WHERE slug = 'win-wms' LIMIT 1),
    (SELECT id FROM module_types WHERE code = 'metier' LIMIT 1),
    1,
    'Gestion des stocks',
    'wms-gestion-stocks',
    'Tronc commun WMS',
    'warehouse',
    'Structurez vos stocks, vos emplacements et vos mouvements dans un environnement WMS relie a Sage 100.',
    'Gestion des stocks constitue le tronc commun de Win@WMS. Le module centralise les informations de stock, d emplacements, de mouvements et de tracabilite utiles au pilotage de l entrepot.',
    'Decouvrir l environnement Win@WMS',
    '/catalogue/modules/?product=win-wms',
    'Gestion des stocks constitue la base commune de l environnement Win@WMS. Il relie la lecture du stock, l organisation de l entrepot, les emplacements, les mouvements et les regles de gestion utiles au quotidien dans un cadre coherent avec Sage 100.',
    'Quand les stocks, les emplacements et les mouvements sont suivis sur des supports disperses, l exactitude diminue, les controles deviennent plus lourds et la visibilite de l entrepot se fragilise. Cette situation limite aussi la qualite des traitements en reception, expedition et inventaire.',
    'Le module apporte un socle commun pour organiser les stocks, les emplacements, les mouvements et la tracabilite dans un environnement WMS unique. Il permet de structurer les regles de stockage, d adresser l entrepot et de relier plus efficacement les operations au socle de gestion Sage 100.',
    'Les donnees de stock sont maintenues dans un cadre commun. Les emplacements, mouvements, regles de picking et actions de rangement ou de reapprovisionnement sont relies a la vie de l entrepot pour offrir une lecture plus fiable et plus exploitable des flux.',
    'Demander une demonstration',
    '/demo/',
    'published',
    0,
    'Gestion des stocks | Tronc commun Win@WMS WININFO',
    'Gestion des stocks constitue le tronc commun de Win@WMS pour structurer les stocks, emplacements, mouvements et la tracabilite avec Sage 100.',
    '/modules/wms-gestion-stocks/',
    CURRENT_TIMESTAMP,
    CURRENT_TIMESTAMP,
    CURRENT_TIMESTAMP
WHERE NOT EXISTS (SELECT 1 FROM modules WHERE slug = 'wms-gestion-stocks');

UPDATE modules
SET
    product_id = (SELECT id FROM products WHERE slug = 'win-wms' LIMIT 1),
    module_type_id = (SELECT id FROM module_types WHERE code = 'metier' LIMIT 1),
    sort_order = 1,
    name = 'Gestion des stocks',
    hero_eyebrow = 'Tronc commun WMS',
    hero_icon = 'warehouse',
    tagline = 'Structurez vos stocks, vos emplacements et vos mouvements dans un environnement WMS relie a Sage 100.',
    short_description = 'Gestion des stocks constitue le tronc commun de Win@WMS. Le module centralise les informations de stock, d emplacements, de mouvements et de tracabilite utiles au pilotage de l entrepot.',
    hero_secondary_cta_label = 'Decouvrir l environnement Win@WMS',
    hero_secondary_cta_url = '/catalogue/modules/?product=win-wms',
    presentation = 'Gestion des stocks constitue la base commune de l environnement Win@WMS. Il relie la lecture du stock, l organisation de l entrepot, les emplacements, les mouvements et les regles de gestion utiles au quotidien dans un cadre coherent avec Sage 100.',
    problem_statement = 'Quand les stocks, les emplacements et les mouvements sont suivis sur des supports disperses, l exactitude diminue, les controles deviennent plus lourds et la visibilite de l entrepot se fragilise. Cette situation limite aussi la qualite des traitements en reception, expedition et inventaire.',
    solution_body = 'Le module apporte un socle commun pour organiser les stocks, les emplacements, les mouvements et la tracabilite dans un environnement WMS unique. Il permet de structurer les regles de stockage, d adresser l entrepot et de relier plus efficacement les operations au socle de gestion Sage 100.',
    process_body = 'Les donnees de stock sont maintenues dans un cadre commun. Les emplacements, mouvements, regles de picking et actions de rangement ou de reapprovisionnement sont relies a la vie de l entrepot pour offrir une lecture plus fiable et plus exploitable des flux.',
    cta_label = 'Demander une demonstration',
    cta_url = '/demo/',
    status = 'published',
    featured = 0,
    meta_title = 'Gestion des stocks | Tronc commun Win@WMS WININFO',
    meta_description = 'Gestion des stocks constitue le tronc commun de Win@WMS pour structurer les stocks, emplacements, mouvements et la tracabilite avec Sage 100.',
    canonical_url = '/modules/wms-gestion-stocks/',
    published_at = COALESCE(published_at, CURRENT_TIMESTAMP),
    updated_at = CURRENT_TIMESTAMP
WHERE slug = 'wms-gestion-stocks'
  AND deleted_at IS NULL;

INSERT INTO module_category (module_id, category_id)
SELECT m.id, c.id
FROM modules m
JOIN categories c ON c.slug = 'logistique'
WHERE m.slug = 'wms-gestion-stocks'
  AND NOT EXISTS (
      SELECT 1 FROM module_category mc WHERE mc.module_id = m.id AND mc.category_id = c.id
  );

INSERT INTO modules (
    internal_code, product_id, module_type_id, sort_order, name, slug, hero_eyebrow, hero_icon, tagline, short_description,
    hero_secondary_cta_label, hero_secondary_cta_url, presentation, problem_statement, solution_body, process_body,
    cta_label, cta_url, status, featured, meta_title, meta_description, canonical_url, published_at, created_at, updated_at
)
SELECT
    'MOD-WMS-002',
    (SELECT id FROM products WHERE slug = 'win-wms' LIMIT 1),
    (SELECT id FROM module_types WHERE code = 'metier' LIMIT 1),
    2,
    'Reception',
    'wms-reception',
    'Module WMS',
    'package',
    'Cadrez vos receptions, controlez les entrees et fiabilisez la mise en stock dans Win@WMS.',
    'Reception structure la prise en charge des marchandises entrantes, des controles et des entrees en stock avec un suivi temps reel relie a votre environnement WMS.',
    'Decouvrir l environnement Win@WMS',
    '/catalogue/modules/?product=win-wms',
    'Reception complete le tronc commun Win@WMS pour encadrer les entrees de marchandises, les pre-receptions et les controles utiles a l integration du stock. Le module aide a fiabiliser les receptions prevues, inattendues ou issues de retours.',
    'Une reception mal cadree genere des ecarts entre le physique et le theorique, ralentit la mise en stock et complique la gestion des anomalies. Les equipes ont besoin d un cadre plus direct pour superviser les entrees et tracer les controles realises.',
    'Le module structure les operations de reception depuis la preparation eventuelle du flux jusqu a l entree en stock. Les controles qualite, quantite, etiquetage et gestion des anomalies peuvent etre relies au traitement WMS pour une lecture plus fiable de la marchandise recue.',
    'Les receptions peuvent etre preparees, supervisees et traitees en temps reel. Les marchandises sont controlees, etiquetees si besoin, puis integrees au stock dans un flux relie au socle Win@WMS et a Sage 100.',
    'Demander une demonstration',
    '/demo/',
    'published',
    0,
    'Reception | Module Win@WMS WININFO',
    'Reception structure les pre-receptions, controles et entrees en stock dans un environnement Win@WMS relie a Sage 100.',
    '/modules/wms-reception/',
    CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
WHERE NOT EXISTS (SELECT 1 FROM modules WHERE slug = 'wms-reception');

UPDATE modules
SET
    product_id = (SELECT id FROM products WHERE slug = 'win-wms' LIMIT 1),
    module_type_id = (SELECT id FROM module_types WHERE code = 'metier' LIMIT 1),
    sort_order = 2,
    name = 'Reception',
    hero_eyebrow = 'Module WMS',
    hero_icon = 'package',
    tagline = 'Cadrez vos receptions, controlez les entrees et fiabilisez la mise en stock dans Win@WMS.',
    short_description = 'Reception structure la prise en charge des marchandises entrantes, des controles et des entrees en stock avec un suivi temps reel relie a votre environnement WMS.',
    hero_secondary_cta_label = 'Decouvrir l environnement Win@WMS',
    hero_secondary_cta_url = '/catalogue/modules/?product=win-wms',
    presentation = 'Reception complete le tronc commun Win@WMS pour encadrer les entrees de marchandises, les pre-receptions et les controles utiles a l integration du stock. Le module aide a fiabiliser les receptions prevues, inattendues ou issues de retours.',
    problem_statement = 'Une reception mal cadree genere des ecarts entre le physique et le theorique, ralentit la mise en stock et complique la gestion des anomalies. Les equipes ont besoin d un cadre plus direct pour superviser les entrees et tracer les controles realises.',
    solution_body = 'Le module structure les operations de reception depuis la preparation eventuelle du flux jusqu a l entree en stock. Les controles qualite, quantite, etiquetage et gestion des anomalies peuvent etre relies au traitement WMS pour une lecture plus fiable de la marchandise recue.',
    process_body = 'Les receptions peuvent etre preparees, supervisees et traitees en temps reel. Les marchandises sont controlees, etiquetees si besoin, puis integrees au stock dans un flux relie au socle Win@WMS et a Sage 100.',
    cta_label = 'Demander une demonstration',
    cta_url = '/demo/',
    status = 'published',
    featured = 0,
    meta_title = 'Reception | Module Win@WMS WININFO',
    meta_description = 'Reception structure les pre-receptions, controles et entrees en stock dans un environnement Win@WMS relie a Sage 100.',
    canonical_url = '/modules/wms-reception/',
    published_at = COALESCE(published_at, CURRENT_TIMESTAMP),
    updated_at = CURRENT_TIMESTAMP
WHERE slug = 'wms-reception'
  AND deleted_at IS NULL;

INSERT INTO module_category (module_id, category_id)
SELECT m.id, c.id
FROM modules m
JOIN categories c ON c.slug = 'logistique'
WHERE m.slug = 'wms-reception'
  AND NOT EXISTS (
      SELECT 1 FROM module_category mc WHERE mc.module_id = m.id AND mc.category_id = c.id
  );

INSERT INTO modules (
    internal_code, product_id, module_type_id, sort_order, name, slug, hero_eyebrow, hero_icon, tagline, short_description,
    hero_secondary_cta_label, hero_secondary_cta_url, presentation, problem_statement, solution_body, process_body,
    cta_label, cta_url, status, featured, meta_title, meta_description, canonical_url, published_at, created_at, updated_at
)
SELECT
    'MOD-WMS-003',
    (SELECT id FROM products WHERE slug = 'win-wms' LIMIT 1),
    (SELECT id FROM module_types WHERE code = 'metier' LIMIT 1),
    3,
    'Expeditions',
    'wms-expeditions',
    'Module WMS',
    'truck',
    'Preparez, ordonnancez et expediez vos commandes avec un pilotage WMS relie a Sage 100.',
    'Expeditions couvre la preparation de commandes, le guidage des preparateurs, le choix transporteur et les documents ou etiquettes utiles au depart des flux.',
    'Decouvrir l environnement Win@WMS',
    '/catalogue/modules/?product=win-wms',
    'Expeditions complete Win@WMS pour organiser la preparation de commandes et la sortie des flux. Le module regroupe les logiques de picking, ordonnancement, expedition, transport et emission documentaire dans un environnement relie au stock.',
    'Quand la preparation et l expedition ne reposent pas sur un cadre commun, les parcours se degradent, les priorites sont moins lisibles et les erreurs de sortie augmentent. La coordination entre stock, commandes, transport et documents devient plus lourde a maintenir.',
    'Le module structure les traitements de preparation et d expedition avec des modes operatoires adaptes aux contraintes de l entrepot. Il permet d organiser les priorites, de guider les preparateurs, de traiter les reliquats et de relier les sorties de stock aux etiquettes, BL et flux transport utiles.',
    'Les commandes sont ordonnancees, preparees puis expediees selon le mode de traitement retenu. Les etiquettes, documents, choix transporteur et operations de chargement peuvent s integrer au flux global pour fiabiliser les sorties de stock.',
    'Demander une demonstration',
    '/demo/',
    'published',
    0,
    'Expeditions | Module Win@WMS WININFO',
    'Expeditions couvre preparation, picking, transporteur, etiquettes et documents de sortie dans un environnement Win@WMS relie a Sage 100.',
    '/modules/wms-expeditions/',
    CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
WHERE NOT EXISTS (SELECT 1 FROM modules WHERE slug = 'wms-expeditions');

UPDATE modules
SET
    product_id = (SELECT id FROM products WHERE slug = 'win-wms' LIMIT 1),
    module_type_id = (SELECT id FROM module_types WHERE code = 'metier' LIMIT 1),
    sort_order = 3,
    name = 'Expeditions',
    hero_eyebrow = 'Module WMS',
    hero_icon = 'truck',
    tagline = 'Preparez, ordonnancez et expediez vos commandes avec un pilotage WMS relie a Sage 100.',
    short_description = 'Expeditions couvre la preparation de commandes, le guidage des preparateurs, le choix transporteur et les documents ou etiquettes utiles au depart des flux.',
    hero_secondary_cta_label = 'Decouvrir l environnement Win@WMS',
    hero_secondary_cta_url = '/catalogue/modules/?product=win-wms',
    presentation = 'Expeditions complete Win@WMS pour organiser la preparation de commandes et la sortie des flux. Le module regroupe les logiques de picking, ordonnancement, expedition, transport et emission documentaire dans un environnement relie au stock.',
    problem_statement = 'Quand la preparation et l expedition ne reposent pas sur un cadre commun, les parcours se degradent, les priorites sont moins lisibles et les erreurs de sortie augmentent. La coordination entre stock, commandes, transport et documents devient plus lourde a maintenir.',
    solution_body = 'Le module structure les traitements de preparation et d expedition avec des modes operatoires adaptes aux contraintes de l entrepot. Il permet d organiser les priorites, de guider les preparateurs, de traiter les reliquats et de relier les sorties de stock aux etiquettes, BL et flux transport utiles.',
    process_body = 'Les commandes sont ordonnancees, preparees puis expediees selon le mode de traitement retenu. Les etiquettes, documents, choix transporteur et operations de chargement peuvent s integrer au flux global pour fiabiliser les sorties de stock.',
    cta_label = 'Demander une demonstration',
    cta_url = '/demo/',
    status = 'published',
    featured = 0,
    meta_title = 'Expeditions | Module Win@WMS WININFO',
    meta_description = 'Expeditions couvre preparation, picking, transporteur, etiquettes et documents de sortie dans un environnement Win@WMS relie a Sage 100.',
    canonical_url = '/modules/wms-expeditions/',
    published_at = COALESCE(published_at, CURRENT_TIMESTAMP),
    updated_at = CURRENT_TIMESTAMP
WHERE slug = 'wms-expeditions'
  AND deleted_at IS NULL;

INSERT INTO module_category (module_id, category_id)
SELECT m.id, c.id
FROM modules m
JOIN categories c ON c.slug = 'logistique'
WHERE m.slug = 'wms-expeditions'
  AND NOT EXISTS (
      SELECT 1 FROM module_category mc WHERE mc.module_id = m.id AND mc.category_id = c.id
  );

INSERT INTO modules (
    internal_code, product_id, module_type_id, sort_order, name, slug, hero_eyebrow, hero_icon, tagline, short_description,
    hero_secondary_cta_label, hero_secondary_cta_url, presentation, problem_statement, solution_body, process_body,
    cta_label, cta_url, status, featured, meta_title, meta_description, canonical_url, published_at, created_at, updated_at
)
SELECT
    'MOD-WMS-004',
    (SELECT id FROM products WHERE slug = 'win-wms' LIMIT 1),
    (SELECT id FROM module_types WHERE code = 'metier' LIMIT 1),
    4,
    'Inventaire',
    'wms-inventaire',
    'Module WMS',
    'scan-line',
    'Realisez vos inventaires WMS avec comptages, controles et integration vers Sage 100.',
    'Inventaire structure les comptages, double comptages, controles de valorisation et integrations utiles pour suivre les ecarts et fiabiliser vos campagnes d inventaire.',
    'Decouvrir l environnement Win@WMS',
    '/catalogue/modules/?product=win-wms',
    'Inventaire complete Win@WMS pour gerer les campagnes d inventaire complet ou partiel avec une logique de comptage, consolidation et integration adaptee a la vie de l entrepot. Le module peut s appuyer sur la mobilite, le multi-sites et le multi-utilisateurs.',
    'Un inventaire mal cadre immobilise les equipes, complique la consolidation des comptages et rend plus difficile l analyse des ecarts. Les operations ont besoin d un cadre fiable pour compter, comparer et reintegrer les resultats dans la gestion.',
    'Le module structure les campagnes d inventaire avec des mecanismes de comptage, double comptage, consolidation et controle de valorisation. Il permet de fiabiliser les operations tout en maintenant un lien clair avec les donnees utiles a Sage 100.',
    'Les campagnes peuvent etre lancees selon le perimetre retenu, les comptages sont consolides puis compares au theorique. Les ecarts sont controles, traces et reintegres dans la gestion selon les regles definies dans votre environnement.',
    'Demander une demonstration',
    '/demo/',
    'published',
    0,
    'Inventaire | Module Win@WMS WININFO',
    'Inventaire structure les comptages, consolidations et integrations de stock dans un environnement Win@WMS relie a Sage 100.',
    '/modules/wms-inventaire/',
    CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
WHERE NOT EXISTS (SELECT 1 FROM modules WHERE slug = 'wms-inventaire');

UPDATE modules
SET
    product_id = (SELECT id FROM products WHERE slug = 'win-wms' LIMIT 1),
    module_type_id = (SELECT id FROM module_types WHERE code = 'metier' LIMIT 1),
    sort_order = 4,
    name = 'Inventaire',
    hero_eyebrow = 'Module WMS',
    hero_icon = 'scan-line',
    tagline = 'Realisez vos inventaires WMS avec comptages, controles et integration vers Sage 100.',
    short_description = 'Inventaire structure les comptages, double comptages, controles de valorisation et integrations utiles pour suivre les ecarts et fiabiliser vos campagnes d inventaire.',
    hero_secondary_cta_label = 'Decouvrir l environnement Win@WMS',
    hero_secondary_cta_url = '/catalogue/modules/?product=win-wms',
    presentation = 'Inventaire complete Win@WMS pour gerer les campagnes d inventaire complet ou partiel avec une logique de comptage, consolidation et integration adaptee a la vie de l entrepot. Le module peut s appuyer sur la mobilite, le multi-sites et le multi-utilisateurs.',
    problem_statement = 'Un inventaire mal cadre immobilise les equipes, complique la consolidation des comptages et rend plus difficile l analyse des ecarts. Les operations ont besoin d un cadre fiable pour compter, comparer et reintegrer les resultats dans la gestion.',
    solution_body = 'Le module structure les campagnes d inventaire avec des mecanismes de comptage, double comptage, consolidation et controle de valorisation. Il permet de fiabiliser les operations tout en maintenant un lien clair avec les donnees utiles a Sage 100.',
    process_body = 'Les campagnes peuvent etre lancees selon le perimetre retenu, les comptages sont consolides puis compares au theorique. Les ecarts sont controles, traces et reintegres dans la gestion selon les regles definies dans votre environnement.',
    cta_label = 'Demander une demonstration',
    cta_url = '/demo/',
    status = 'published',
    featured = 0,
    meta_title = 'Inventaire | Module Win@WMS WININFO',
    meta_description = 'Inventaire structure les comptages, consolidations et integrations de stock dans un environnement Win@WMS relie a Sage 100.',
    canonical_url = '/modules/wms-inventaire/',
    published_at = COALESCE(published_at, CURRENT_TIMESTAMP),
    updated_at = CURRENT_TIMESTAMP
WHERE slug = 'wms-inventaire'
  AND deleted_at IS NULL;

INSERT INTO module_category (module_id, category_id)
SELECT m.id, c.id
FROM modules m
JOIN categories c ON c.slug = 'logistique'
WHERE m.slug = 'wms-inventaire'
  AND NOT EXISTS (
      SELECT 1 FROM module_category mc WHERE mc.module_id = m.id AND mc.category_id = c.id
  );

INSERT INTO modules (
    internal_code, product_id, module_type_id, sort_order, name, slug, hero_eyebrow, hero_icon, tagline, short_description,
    hero_secondary_cta_label, hero_secondary_cta_url, presentation, problem_statement, solution_body, process_body,
    cta_label, cta_url, status, featured, meta_title, meta_description, canonical_url, published_at, created_at, updated_at
)
SELECT
    'MOD-WMS-005',
    (SELECT id FROM products WHERE slug = 'win-wms' LIMIT 1),
    (SELECT id FROM module_types WHERE code = 'metier' LIMIT 1),
    5,
    'Magasin / Vente directe',
    'wms-magasin-vente-directe',
    'Module WMS',
    'briefcase-business',
    'Gerez vos sorties comptoir et ventes directes dans un flux WMS relie a Sage 100.',
    'Magasin / Vente directe structure les expeditions sans commande, devis, BL, factures et operations comptoir dans un environnement WMS relie a la gestion commerciale.',
    'Decouvrir l environnement Win@WMS',
    '/catalogue/modules/?product=win-wms',
    'Magasin / Vente directe complete Win@WMS pour couvrir les scenarios de vente comptoir, expeditions sans commande et traitements directs relies a Sage 100. Le module aide a encadrer les operations rapides tout en gardant un lien clair avec la gestion commerciale.',
    'Les ventes directes et sorties comptoir ont besoin d un traitement rapide sans sortir du cadre de gestion. Sans outil adapte, la qualite des informations, les tarifs et la continute documentaire peuvent se fragiliser au fil des operations.',
    'Le module structure les traitements directs de magasin avec saisie mobile, devis, BL, facture, gestion des tarifs et signatures utiles au flux. La solution permet de relier ces usages de terrain au socle Win@WMS et a Sage 100 sans multiplier les ruptures de traitement.',
    'Les operations peuvent etre saisies directement, documentees puis reintegrees dans le cadre de gestion commerciale. Les clients comptoir, tarifs, remises et documents utiles restent ainsi lies au meme environnement de travail.',
    'Demander une demonstration',
    '/demo/',
    'published',
    0,
    'Magasin / Vente directe | Module Win@WMS WININFO',
    'Magasin / Vente directe couvre ventes comptoir, expeditions sans commande et documents directs dans un environnement Win@WMS relie a Sage 100.',
    '/modules/wms-magasin-vente-directe/',
    CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
WHERE NOT EXISTS (SELECT 1 FROM modules WHERE slug = 'wms-magasin-vente-directe');

UPDATE modules
SET
    product_id = (SELECT id FROM products WHERE slug = 'win-wms' LIMIT 1),
    module_type_id = (SELECT id FROM module_types WHERE code = 'metier' LIMIT 1),
    sort_order = 5,
    name = 'Magasin / Vente directe',
    hero_eyebrow = 'Module WMS',
    hero_icon = 'briefcase-business',
    tagline = 'Gerez vos sorties comptoir et ventes directes dans un flux WMS relie a Sage 100.',
    short_description = 'Magasin / Vente directe structure les expeditions sans commande, devis, BL, factures et operations comptoir dans un environnement WMS relie a la gestion commerciale.',
    hero_secondary_cta_label = 'Decouvrir l environnement Win@WMS',
    hero_secondary_cta_url = '/catalogue/modules/?product=win-wms',
    presentation = 'Magasin / Vente directe complete Win@WMS pour couvrir les scenarios de vente comptoir, expeditions sans commande et traitements directs relies a Sage 100. Le module aide a encadrer les operations rapides tout en gardant un lien clair avec la gestion commerciale.',
    problem_statement = 'Les ventes directes et sorties comptoir ont besoin d un traitement rapide sans sortir du cadre de gestion. Sans outil adapte, la qualite des informations, les tarifs et la continute documentaire peuvent se fragiliser au fil des operations.',
    solution_body = 'Le module structure les traitements directs de magasin avec saisie mobile, devis, BL, facture, gestion des tarifs et signatures utiles au flux. La solution permet de relier ces usages de terrain au socle Win@WMS et a Sage 100 sans multiplier les ruptures de traitement.',
    process_body = 'Les operations peuvent etre saisies directement, documentees puis reintegrees dans le cadre de gestion commerciale. Les clients comptoir, tarifs, remises et documents utiles restent ainsi lies au meme environnement de travail.',
    cta_label = 'Demander une demonstration',
    cta_url = '/demo/',
    status = 'published',
    featured = 0,
    meta_title = 'Magasin / Vente directe | Module Win@WMS WININFO',
    meta_description = 'Magasin / Vente directe couvre ventes comptoir, expeditions sans commande et documents directs dans un environnement Win@WMS relie a Sage 100.',
    canonical_url = '/modules/wms-magasin-vente-directe/',
    published_at = COALESCE(published_at, CURRENT_TIMESTAMP),
    updated_at = CURRENT_TIMESTAMP
WHERE slug = 'wms-magasin-vente-directe'
  AND deleted_at IS NULL;

INSERT INTO module_category (module_id, category_id)
SELECT m.id, c.id
FROM modules m
JOIN categories c ON c.slug = 'logistique'
WHERE m.slug = 'wms-magasin-vente-directe'
  AND NOT EXISTS (
      SELECT 1 FROM module_category mc WHERE mc.module_id = m.id AND mc.category_id = c.id
  );

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Stock en temps reel', 'Lecture actualisee des quantites et mouvements utiles au pilotage quotidien du stock.', 'chart-column', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-gestion-stocks'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 1);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Emplacements et adressage', 'Organisation des emplacements, nommage et recherche multicriteres dans l entrepot.', 'map-pinned', 2, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-gestion-stocks'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 2);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Mouvements et rangement', 'Mise en stock, transferts, regularisations et mouvements relies dans un cadre commun.', 'workflow', 3, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-gestion-stocks'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 3);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Picking et reapprovisionnement', 'Aide au picking, valeurs min et max et logique de reapprovisionnement guide.', 'route', 4, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-gestion-stocks'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 4);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Codes-barres et tracabilite', 'Gestion des codes-barres, lots, numeros de serie et informations utiles a la tracabilite.', 'scan-line', 5, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-gestion-stocks'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 5);

UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Stock en temps reel', ci.body = 'Lecture actualisee des quantites et mouvements utiles au pilotage quotidien du stock.', ci.icon = 'chart-column'
WHERE m.slug = 'wms-gestion-stocks' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 1;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Emplacements et adressage', ci.body = 'Organisation des emplacements, nommage et recherche multicriteres dans l entrepot.', ci.icon = 'map-pinned'
WHERE m.slug = 'wms-gestion-stocks' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 2;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Mouvements et rangement', ci.body = 'Mise en stock, transferts, regularisations et mouvements relies dans un cadre commun.', ci.icon = 'workflow'
WHERE m.slug = 'wms-gestion-stocks' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 3;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Picking et reapprovisionnement', ci.body = 'Aide au picking, valeurs min et max et logique de reapprovisionnement guide.', ci.icon = 'route'
WHERE m.slug = 'wms-gestion-stocks' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 4;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Codes-barres et tracabilite', ci.body = 'Gestion des codes-barres, lots, numeros de serie et informations utiles a la tracabilite.', ci.icon = 'scan-line'
WHERE m.slug = 'wms-gestion-stocks' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 5;

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Exactitude des stocks', 'Le tronc commun aide a fiabiliser la lecture theorique et physique du stock.', 'shield-check', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-gestion-stocks'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 1);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Visibilite de l entrepot', 'Les emplacements, mouvements et regles de stockage sont mieux lisibles pour les equipes.', 'warehouse', 2, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-gestion-stocks'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 2);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Base commune pour les flux', 'Reception, expeditions et inventaire s appuient sur un meme cadre de stock et de tracabilite.', 'layers-3', 3, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-gestion-stocks'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 3);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Module combinable', 'Activez Gestion des stocks dans votre environnement Win@WMS et combinez-le avec les autres modules de la meme solution selon vos flux logistiques.', 'puzzle', 4, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-gestion-stocks'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 4);

UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Exactitude des stocks', ci.body = 'Le tronc commun aide a fiabiliser la lecture theorique et physique du stock.', ci.icon = 'shield-check'
WHERE m.slug = 'wms-gestion-stocks' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 1;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Visibilite de l entrepot', ci.body = 'Les emplacements, mouvements et regles de stockage sont mieux lisibles pour les equipes.', ci.icon = 'warehouse'
WHERE m.slug = 'wms-gestion-stocks' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 2;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Base commune pour les flux', ci.body = 'Reception, expeditions et inventaire s appuient sur un meme cadre de stock et de tracabilite.', ci.icon = 'layers-3'
WHERE m.slug = 'wms-gestion-stocks' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 3;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Module combinable', ci.body = 'Activez Gestion des stocks dans votre environnement Win@WMS et combinez-le avec les autres modules de la meme solution selon vos flux logistiques.', ci.icon = 'puzzle'
WHERE m.slug = 'wms-gestion-stocks' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 4;

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Gestion des stocks constitue-t-il le tronc commun Win@WMS ?', 'Oui. Ce module porte le socle commun de stock, emplacements, mouvements et tracabilite sur lequel s appuient les autres briques Win@WMS.', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-gestion-stocks'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 1);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Le module prend-il en charge les emplacements ?', 'Oui. Il structure l adressage, les emplacements, les recherches et les mouvements utiles a la vie de l entrepot.', 2, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-gestion-stocks'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 2);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'La solution est-elle reliee a Sage 100 ?', 'Oui. La logique WMS reste construite pour travailler avec Sage 100 et maintenir un lien clair avec la gestion commerciale.', 3, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-gestion-stocks'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 3);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Peut-on ajouter ensuite les autres modules WMS ?', 'Oui. Reception, expeditions, inventaire ou magasin peuvent venir completer le tronc commun selon vos besoins.', 4, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-gestion-stocks'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 4);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Gestion des stocks peut-il etre combine avec d autres modules Win@WMS ?', 'Oui. Gestion des stocks s integre dans l environnement Win@WMS et peut etre utilise avec les autres modules de la meme solution selon vos flux logistiques.', 5, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-gestion-stocks'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 5);

UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Gestion des stocks constitue-t-il le tronc commun Win@WMS ?', ci.body = 'Oui. Ce module porte le socle commun de stock, emplacements, mouvements et tracabilite sur lequel s appuient les autres briques Win@WMS.'
WHERE m.slug = 'wms-gestion-stocks' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 1;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Le module prend-il en charge les emplacements ?', ci.body = 'Oui. Il structure l adressage, les emplacements, les recherches et les mouvements utiles a la vie de l entrepot.'
WHERE m.slug = 'wms-gestion-stocks' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 2;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'La solution est-elle reliee a Sage 100 ?', ci.body = 'Oui. La logique WMS reste construite pour travailler avec Sage 100 et maintenir un lien clair avec la gestion commerciale.'
WHERE m.slug = 'wms-gestion-stocks' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 3;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Peut-on ajouter ensuite les autres modules WMS ?', ci.body = 'Oui. Reception, expeditions, inventaire ou magasin peuvent venir completer le tronc commun selon vos besoins.'
WHERE m.slug = 'wms-gestion-stocks' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 4;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Gestion des stocks peut-il etre combine avec d autres modules Win@WMS ?', ci.body = 'Oui. Gestion des stocks s integre dans l environnement Win@WMS et peut etre utilise avec les autres modules de la meme solution selon vos flux logistiques.'
WHERE m.slug = 'wms-gestion-stocks' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 5;

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'final_cta', 'Parler de votre organisation WMS', '{"eyebrow":"CTA final","body":"Parlons de votre entrepot, de vos flux de stock et de vos besoins de pilotage pour verifier comment le tronc commun Win@WMS peut s integrer a votre organisation.","cta_label":"Demander une demonstration","cta_url":"/demo/","secondary_cta_label":"Decouvrir les modules Win@WMS","secondary_cta_url":"/catalogue/modules/?product=win-wms"}', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-gestion-stocks'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'final_cta');
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Parler de votre organisation WMS',
    ci.body = '{"eyebrow":"CTA final","body":"Parlons de votre entrepot, de vos flux de stock et de vos besoins de pilotage pour verifier comment le tronc commun Win@WMS peut s integrer a votre organisation.","cta_label":"Demander une demonstration","cta_url":"/demo/","secondary_cta_label":"Decouvrir les modules Win@WMS","secondary_cta_url":"/catalogue/modules/?product=win-wms"}'
WHERE m.slug = 'wms-gestion-stocks' AND ci.owner_type = 'module' AND ci.item_type = 'final_cta';
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'environment_modules_block', 'Composez votre environnement Win@WMS', '{"body":"Associez le tronc commun WMS aux autres modules Win@WMS afin de structurer vos flux de reception, expedition, inventaire et magasin dans un meme environnement.","limit":6}', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-gestion-stocks'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'environment_modules_block');
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Composez votre environnement Win@WMS',
    ci.body = '{"body":"Associez le tronc commun WMS aux autres modules Win@WMS afin de structurer vos flux de reception, expedition, inventaire et magasin dans un meme environnement.","limit":6}'
WHERE m.slug = 'wms-gestion-stocks' AND ci.owner_type = 'module' AND ci.item_type = 'environment_modules_block';

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Pre-reception', 'Preparation des flux entrants avant reception physique afin de mieux cadrer les traitements.', 'file-text', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-reception'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 1);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Controles qualite et quantite', 'Verification des receptions, lecture codes-barres et traitement des anomalies.', 'shield-check', 2, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-reception'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 2);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Entree en stock temps reel', 'Integration directe des receptions dans le stock WMS selon le traitement retenu.', 'chart-column', 3, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-reception'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 3);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Etiquetage palettes et colis', 'Edition d etiquettes utiles a la reception depuis le poste ou l appareil mobile selon les usages.', 'package', 4, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-reception'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 4);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Retours et receptions inattendues', 'Prise en charge des retours clients, anomalies ou receptions non prevues dans le flux standard.', 'workflow', 5, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-reception'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 5);

UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Pre-reception', ci.body = 'Preparation des flux entrants avant reception physique afin de mieux cadrer les traitements.', ci.icon = 'file-text'
WHERE m.slug = 'wms-reception' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 1;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Controles qualite et quantite', ci.body = 'Verification des receptions, lecture codes-barres et traitement des anomalies.', ci.icon = 'shield-check'
WHERE m.slug = 'wms-reception' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 2;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Entree en stock temps reel', ci.body = 'Integration directe des receptions dans le stock WMS selon le traitement retenu.', ci.icon = 'chart-column'
WHERE m.slug = 'wms-reception' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 3;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Etiquetage palettes et colis', ci.body = 'Edition d etiquettes utiles a la reception depuis le poste ou l appareil mobile selon les usages.', ci.icon = 'package'
WHERE m.slug = 'wms-reception' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 4;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Retours et receptions inattendues', ci.body = 'Prise en charge des retours clients, anomalies ou receptions non prevues dans le flux standard.', ci.icon = 'workflow'
WHERE m.slug = 'wms-reception' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 5;

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Receptions plus fiables', 'Les entrees sont mieux controlees et les anomalies plus visibles pour les equipes.', 'shield-check', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-reception'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 1);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Integration rapide au stock', 'Les marchandises peuvent etre integrees plus vite dans le stock disponible selon le flux retenu.', 'chart-column', 2, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-reception'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 2);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Meilleure visibilite terrain', 'La supervision en temps reel aide a suivre l avancement et les ecarts de reception.', 'eye', 3, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-reception'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 3);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Module combinable', 'Activez Reception dans votre environnement Win@WMS et combinez-le avec les autres modules de la meme solution selon vos flux entrants.', 'puzzle', 4, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-reception'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 4);

UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Receptions plus fiables', ci.body = 'Les entrees sont mieux controlees et les anomalies plus visibles pour les equipes.', ci.icon = 'shield-check'
WHERE m.slug = 'wms-reception' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 1;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Integration rapide au stock', ci.body = 'Les marchandises peuvent etre integrees plus vite dans le stock disponible selon le flux retenu.', ci.icon = 'chart-column'
WHERE m.slug = 'wms-reception' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 2;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Meilleure visibilite terrain', ci.body = 'La supervision en temps reel aide a suivre l avancement et les ecarts de reception.', ci.icon = 'eye'
WHERE m.slug = 'wms-reception' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 3;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Module combinable', ci.body = 'Activez Reception dans votre environnement Win@WMS et combinez-le avec les autres modules de la meme solution selon vos flux entrants.', ci.icon = 'puzzle'
WHERE m.slug = 'wms-reception' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 4;

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Le module couvre-t-il les pre-receptions ?', 'Oui. Reception peut structurer les flux prevus en amont afin de mieux preparer le traitement physique.', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-reception'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 1);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Peut-on traiter des retours ou receptions inattendues ?', 'Oui. Le module peut aussi prendre en charge des retours clients et des receptions non prevues dans le flux standard.', 2, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-reception'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 2);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Les etiquettes reception sont-elles prevues ?', 'Oui. Le module couvre l edition d etiquettes utiles a la reception selon les usages retenus dans votre organisation.', 3, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-reception'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 3);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Le stock est-il mis a jour en temps reel ?', 'Le module est pense pour integrer les receptions dans un flux WMS temps reel selon le parametage retenu.', 4, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-reception'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 4);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Reception peut-il etre combine avec d autres modules Win@WMS ?', 'Oui. Reception s integre dans l environnement Win@WMS et peut etre utilise avec les autres modules de la meme solution selon vos flux entrants.', 5, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-reception'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 5);

UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Le module couvre-t-il les pre-receptions ?', ci.body = 'Oui. Reception peut structurer les flux prevus en amont afin de mieux preparer le traitement physique.'
WHERE m.slug = 'wms-reception' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 1;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Peut-on traiter des retours ou receptions inattendues ?', ci.body = 'Oui. Le module peut aussi prendre en charge des retours clients et des receptions non prevues dans le flux standard.'
WHERE m.slug = 'wms-reception' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 2;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Les etiquettes reception sont-elles prevues ?', ci.body = 'Oui. Le module couvre l edition d etiquettes utiles a la reception selon les usages retenus dans votre organisation.'
WHERE m.slug = 'wms-reception' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 3;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Le stock est-il mis a jour en temps reel ?', ci.body = 'Le module est pense pour integrer les receptions dans un flux WMS temps reel selon le parametage retenu.'
WHERE m.slug = 'wms-reception' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 4;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Reception peut-il etre combine avec d autres modules Win@WMS ?', ci.body = 'Oui. Reception s integre dans l environnement Win@WMS et peut etre utilise avec les autres modules de la meme solution selon vos flux entrants.'
WHERE m.slug = 'wms-reception' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 5;

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'final_cta', 'Parler de vos flux de reception', '{"eyebrow":"CTA final","body":"Parlons de vos flux entrants, de vos controles et de votre organisation de mise en stock pour verifier comment Reception peut s integrer a votre environnement Win@WMS.","cta_label":"Demander une demonstration","cta_url":"/demo/","secondary_cta_label":"Decouvrir les modules Win@WMS","secondary_cta_url":"/catalogue/modules/?product=win-wms"}', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-reception'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'final_cta');
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Parler de vos flux de reception',
    ci.body = '{"eyebrow":"CTA final","body":"Parlons de vos flux entrants, de vos controles et de votre organisation de mise en stock pour verifier comment Reception peut s integrer a votre environnement Win@WMS.","cta_label":"Demander une demonstration","cta_url":"/demo/","secondary_cta_label":"Decouvrir les modules Win@WMS","secondary_cta_url":"/catalogue/modules/?product=win-wms"}'
WHERE m.slug = 'wms-reception' AND ci.owner_type = 'module' AND ci.item_type = 'final_cta';
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'environment_modules_block', 'Composez votre environnement Win@WMS', '{"body":"Associez Reception aux autres modules Win@WMS afin de relier vos flux entrants, votre stock et vos controles dans un meme environnement.","limit":6}', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-reception'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'environment_modules_block');
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Composez votre environnement Win@WMS',
    ci.body = '{"body":"Associez Reception aux autres modules Win@WMS afin de relier vos flux entrants, votre stock et vos controles dans un meme environnement.","limit":6}'
WHERE m.slug = 'wms-reception' AND ci.owner_type = 'module' AND ci.item_type = 'environment_modules_block';

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Ordonnancement des commandes', 'Gestion des priorites et organisation des vagues de preparation selon vos contraintes.', 'list', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-expeditions'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 1);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Preparation de commandes', 'Modes pick and pack, pick then pack et guidage des preparateurs dans l entrepot.', 'route', 2, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-expeditions'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 2);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Gestion lots et substitutions', 'Prise en compte FIFO LIFO, reliquats, articles de substitution et multi-livraisons.', 'layers-3', 3, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-expeditions'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 3);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Transporteurs et etiquettes', 'Selection transporteur, etiquettes palettes colis et documents d expedition utiles au flux.', 'truck', 4, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-expeditions'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 4);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Chargement et notifications', 'Gestion du chargement, BL, packing list, notifications et demandes d enlevement transporteur.', 'file-text', 5, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-expeditions'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 5);

UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Ordonnancement des commandes', ci.body = 'Gestion des priorites et organisation des vagues de preparation selon vos contraintes.', ci.icon = 'list'
WHERE m.slug = 'wms-expeditions' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 1;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Preparation de commandes', ci.body = 'Modes pick and pack, pick then pack et guidage des preparateurs dans l entrepot.', ci.icon = 'route'
WHERE m.slug = 'wms-expeditions' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 2;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Gestion lots et substitutions', ci.body = 'Prise en compte FIFO LIFO, reliquats, articles de substitution et multi-livraisons.', ci.icon = 'layers-3'
WHERE m.slug = 'wms-expeditions' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 3;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Transporteurs et etiquettes', ci.body = 'Selection transporteur, etiquettes palettes colis et documents d expedition utiles au flux.', ci.icon = 'truck'
WHERE m.slug = 'wms-expeditions' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 4;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Chargement et notifications', ci.body = 'Gestion du chargement, BL, packing list, notifications et demandes d enlevement transporteur.', ci.icon = 'file-text'
WHERE m.slug = 'wms-expeditions' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 5;

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Parcours de preparation optimises', 'Les preparateurs sont mieux guides et les priorites plus lisibles dans l entrepot.', 'route', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-expeditions'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 1);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Moins d erreurs en sortie', 'La coordination entre stock, preparation et expedition est mieux structuree.', 'shield-check', 2, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-expeditions'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 2);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Lien plus propre avec le transport', 'Le choix transporteur, les etiquettes et documents s inserent dans le meme flux de travail.', 'truck', 3, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-expeditions'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 3);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Module combinable', 'Activez Expeditions dans votre environnement Win@WMS et combinez-le avec les autres modules de la meme solution selon vos flux sortants.', 'puzzle', 4, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-expeditions'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 4);

UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Parcours de preparation optimises', ci.body = 'Les preparateurs sont mieux guides et les priorites plus lisibles dans l entrepot.', ci.icon = 'route'
WHERE m.slug = 'wms-expeditions' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 1;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Moins d erreurs en sortie', ci.body = 'La coordination entre stock, preparation et expedition est mieux structuree.', ci.icon = 'shield-check'
WHERE m.slug = 'wms-expeditions' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 2;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Lien plus propre avec le transport', ci.body = 'Le choix transporteur, les etiquettes et documents s inserent dans le meme flux de travail.', ci.icon = 'truck'
WHERE m.slug = 'wms-expeditions' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 3;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Module combinable', ci.body = 'Activez Expeditions dans votre environnement Win@WMS et combinez-le avec les autres modules de la meme solution selon vos flux sortants.', ci.icon = 'puzzle'
WHERE m.slug = 'wms-expeditions' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 4;

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'La preparation de commandes fait-elle partie du module ?', 'Oui. La preparation est integree a Expeditions avec les logiques de picking, ordonnancement et guidage des preparateurs.', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-expeditions'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 1);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Le module gere-t-il plusieurs modes de preparation ?', 'Oui. Il peut couvrir differentes strategies de preparation comme pick and pack ou pick then pack selon votre organisation.', 2, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-expeditions'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 2);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Le choix transporteur est-il prevu ?', 'Oui. Le module peut integrer selection transporteur, etiquettes et documents utiles au flux de sortie.', 3, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-expeditions'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 3);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Le module prend-il en charge reliquats et substitutions ?', 'Oui. Les reliquats, substitutions et autres cas de sortie peuvent etre cadres dans le traitement expedition.', 4, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-expeditions'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 4);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Expeditions peut-il etre combine avec d autres modules Win@WMS ?', 'Oui. Expeditions s integre dans l environnement Win@WMS et peut etre utilise avec les autres modules de la meme solution selon vos flux sortants.', 5, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-expeditions'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 5);

UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'La preparation de commandes fait-elle partie du module ?', ci.body = 'Oui. La preparation est integree a Expeditions avec les logiques de picking, ordonnancement et guidage des preparateurs.'
WHERE m.slug = 'wms-expeditions' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 1;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Le module gere-t-il plusieurs modes de preparation ?', ci.body = 'Oui. Il peut couvrir differentes strategies de preparation comme pick and pack ou pick then pack selon votre organisation.'
WHERE m.slug = 'wms-expeditions' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 2;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Le choix transporteur est-il prevu ?', ci.body = 'Oui. Le module peut integrer selection transporteur, etiquettes et documents utiles au flux de sortie.'
WHERE m.slug = 'wms-expeditions' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 3;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Le module prend-il en charge reliquats et substitutions ?', ci.body = 'Oui. Les reliquats, substitutions et autres cas de sortie peuvent etre cadres dans le traitement expedition.'
WHERE m.slug = 'wms-expeditions' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 4;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Expeditions peut-il etre combine avec d autres modules Win@WMS ?', ci.body = 'Oui. Expeditions s integre dans l environnement Win@WMS et peut etre utilise avec les autres modules de la meme solution selon vos flux sortants.'
WHERE m.slug = 'wms-expeditions' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 5;

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'final_cta', 'Parler de vos flux d expedition', '{"eyebrow":"CTA final","body":"Parlons de vos modes de preparation, de vos transporteurs et de vos flux de sortie pour verifier comment Expeditions peut s integrer a votre environnement Win@WMS.","cta_label":"Demander une demonstration","cta_url":"/demo/","secondary_cta_label":"Decouvrir les modules Win@WMS","secondary_cta_url":"/catalogue/modules/?product=win-wms"}', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-expeditions'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'final_cta');
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Parler de vos flux d expedition',
    ci.body = '{"eyebrow":"CTA final","body":"Parlons de vos modes de preparation, de vos transporteurs et de vos flux de sortie pour verifier comment Expeditions peut s integrer a votre environnement Win@WMS.","cta_label":"Demander une demonstration","cta_url":"/demo/","secondary_cta_label":"Decouvrir les modules Win@WMS","secondary_cta_url":"/catalogue/modules/?product=win-wms"}'
WHERE m.slug = 'wms-expeditions' AND ci.owner_type = 'module' AND ci.item_type = 'final_cta';
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'environment_modules_block', 'Composez votre environnement Win@WMS', '{"body":"Associez Expeditions aux autres modules Win@WMS afin de relier preparation, stock, transport et documents dans un meme environnement.","limit":6}', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-expeditions'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'environment_modules_block');
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Composez votre environnement Win@WMS',
    ci.body = '{"body":"Associez Expeditions aux autres modules Win@WMS afin de relier preparation, stock, transport et documents dans un meme environnement.","limit":6}'
WHERE m.slug = 'wms-expeditions' AND ci.owner_type = 'module' AND ci.item_type = 'environment_modules_block';

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Inventaire complet ou partiel', 'Gestion des campagnes annuelles ou partielles selon le perimetre et le rythme retenus.', 'scan-line', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-inventaire'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 1);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Comptage mobile et multi-utilisateurs', 'Lecture codes-barres, saisies multiples et consolidation des comptages de plusieurs equipes ou sites.', 'smartphone', 2, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-inventaire'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 2);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Double comptage', 'Comparaison de plusieurs releves pour fiabiliser les resultats avant integration.', 'circle-check-big', 3, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-inventaire'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 3);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Valorisation et ecarts', 'Controle des ecarts et prise en compte des regles de valorisation utiles a votre environnement.', 'chart-column', 4, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-inventaire'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 4);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Integration Sage 100', 'Reintegration des mouvements ou ajustements selon les regles de votre gestion commerciale.', 'database', 5, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-inventaire'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 5);

UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Inventaire complet ou partiel', ci.body = 'Gestion des campagnes annuelles ou partielles selon le perimetre et le rythme retenus.', ci.icon = 'scan-line'
WHERE m.slug = 'wms-inventaire' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 1;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Comptage mobile et multi-utilisateurs', ci.body = 'Lecture codes-barres, saisies multiples et consolidation des comptages de plusieurs equipes ou sites.', ci.icon = 'smartphone'
WHERE m.slug = 'wms-inventaire' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 2;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Double comptage', ci.body = 'Comparaison de plusieurs releves pour fiabiliser les resultats avant integration.', ci.icon = 'circle-check-big'
WHERE m.slug = 'wms-inventaire' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 3;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Valorisation et ecarts', ci.body = 'Controle des ecarts et prise en compte des regles de valorisation utiles a votre environnement.', ci.icon = 'chart-column'
WHERE m.slug = 'wms-inventaire' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 4;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Integration Sage 100', ci.body = 'Reintegration des mouvements ou ajustements selon les regles de votre gestion commerciale.', ci.icon = 'database'
WHERE m.slug = 'wms-inventaire' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 5;

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Comptages mieux consolides', 'Les releves multi-sites ou multi-utilisateurs sont mieux cadres dans un meme flux de travail.', 'users', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-inventaire'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 1);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Meilleure lecture des ecarts', 'Le rapprochement entre theorique, comptages et valorisation aide a mieux analyser les differences constatees.', 'chart-column', 2, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-inventaire'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 2);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Integration plus propre dans la gestion', 'Les resultats d inventaire peuvent etre reintegres dans un cadre relie a Sage 100.', 'database', 3, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-inventaire'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 3);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Module combinable', 'Activez Inventaire dans votre environnement Win@WMS et combinez-le avec les autres modules de la meme solution selon vos campagnes de comptage.', 'puzzle', 4, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-inventaire'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 4);

UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Comptages mieux consolides', ci.body = 'Les releves multi-sites ou multi-utilisateurs sont mieux cadres dans un meme flux de travail.', ci.icon = 'users'
WHERE m.slug = 'wms-inventaire' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 1;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Meilleure lecture des ecarts', ci.body = 'Le rapprochement entre theorique, comptages et valorisation aide a mieux analyser les differences constatees.', ci.icon = 'chart-column'
WHERE m.slug = 'wms-inventaire' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 2;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Integration plus propre dans la gestion', ci.body = 'Les resultats d inventaire peuvent etre reintegres dans un cadre relie a Sage 100.', ci.icon = 'database'
WHERE m.slug = 'wms-inventaire' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 3;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Module combinable', ci.body = 'Activez Inventaire dans votre environnement Win@WMS et combinez-le avec les autres modules de la meme solution selon vos campagnes de comptage.', ci.icon = 'puzzle'
WHERE m.slug = 'wms-inventaire' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 4;

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Le module couvre-t-il les inventaires partiels et complets ?', 'Oui. Inventaire peut etre utilise pour des campagnes completes ou partielles selon le perimetre retenu.', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-inventaire'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 1);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Peut-on faire du double comptage ?', 'Oui. Le module peut comparer plusieurs comptages afin de fiabiliser les resultats avant integration.', 2, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-inventaire'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 2);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'La mobilite est-elle prise en charge ?', 'Le module peut s appuyer sur la lecture codes-barres et la mobilite pour faciliter les releves terrain.', 3, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-inventaire'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 3);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Les resultats sont-ils relies a Sage 100 ?', 'Oui. La logique Inventaire est pensee pour conserver un lien clair avec la gestion commerciale et ses ajustements utiles.', 4, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-inventaire'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 4);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Inventaire peut-il etre combine avec d autres modules Win@WMS ?', 'Oui. Inventaire s integre dans l environnement Win@WMS et peut etre utilise avec les autres modules de la meme solution selon vos campagnes de comptage.', 5, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-inventaire'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 5);

UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Le module couvre-t-il les inventaires partiels et complets ?', ci.body = 'Oui. Inventaire peut etre utilise pour des campagnes completes ou partielles selon le perimetre retenu.'
WHERE m.slug = 'wms-inventaire' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 1;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Peut-on faire du double comptage ?', ci.body = 'Oui. Le module peut comparer plusieurs comptages afin de fiabiliser les resultats avant integration.'
WHERE m.slug = 'wms-inventaire' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 2;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'La mobilite est-elle prise en charge ?', ci.body = 'Le module peut s appuyer sur la lecture codes-barres et la mobilite pour faciliter les releves terrain.'
WHERE m.slug = 'wms-inventaire' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 3;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Les resultats sont-ils relies a Sage 100 ?', ci.body = 'Oui. La logique Inventaire est pensee pour conserver un lien clair avec la gestion commerciale et ses ajustements utiles.'
WHERE m.slug = 'wms-inventaire' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 4;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Inventaire peut-il etre combine avec d autres modules Win@WMS ?', ci.body = 'Oui. Inventaire s integre dans l environnement Win@WMS et peut etre utilise avec les autres modules de la meme solution selon vos campagnes de comptage.'
WHERE m.slug = 'wms-inventaire' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 5;

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'final_cta', 'Parler de vos campagnes d inventaire', '{"eyebrow":"CTA final","body":"Parlons de vos comptages, de vos controles et de votre organisation multi-sites pour verifier comment Inventaire peut s integrer a votre environnement Win@WMS.","cta_label":"Demander une demonstration","cta_url":"/demo/","secondary_cta_label":"Decouvrir les modules Win@WMS","secondary_cta_url":"/catalogue/modules/?product=win-wms"}', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-inventaire'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'final_cta');
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Parler de vos campagnes d inventaire',
    ci.body = '{"eyebrow":"CTA final","body":"Parlons de vos comptages, de vos controles et de votre organisation multi-sites pour verifier comment Inventaire peut s integrer a votre environnement Win@WMS.","cta_label":"Demander une demonstration","cta_url":"/demo/","secondary_cta_label":"Decouvrir les modules Win@WMS","secondary_cta_url":"/catalogue/modules/?product=win-wms"}'
WHERE m.slug = 'wms-inventaire' AND ci.owner_type = 'module' AND ci.item_type = 'final_cta';
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'environment_modules_block', 'Composez votre environnement Win@WMS', '{"body":"Associez Inventaire aux autres modules Win@WMS afin de relier vos comptages, votre stock et vos ajustements dans un meme environnement.","limit":6}', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-inventaire'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'environment_modules_block');
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Composez votre environnement Win@WMS',
    ci.body = '{"body":"Associez Inventaire aux autres modules Win@WMS afin de relier vos comptages, votre stock et vos ajustements dans un meme environnement.","limit":6}'
WHERE m.slug = 'wms-inventaire' AND ci.owner_type = 'module' AND ci.item_type = 'environment_modules_block';

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Expedition sans commande', 'Prise en charge des sorties directes sans commande prealable dans le cadre du magasin.', 'workflow', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-magasin-vente-directe'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 1);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Devis BL Facture', 'Generation directe des documents utiles a la vente comptoir et a la sortie magasin.', 'file-text', 2, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-magasin-vente-directe'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 2);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Clients comptoir ou en compte', 'Gestion des scenarios de vente selon le profil client et le contexte de traitement.', 'users', 3, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-magasin-vente-directe'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 3);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Tarifs et remises', 'Application des regles tarifaires et remises dans un cadre relie a Sage 100.', 'chart-column', 4, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-magasin-vente-directe'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 4);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'feature', 'Saisie mobile et signature', 'Traitement direct sur appareil mobile avec collecte des informations utiles a la sortie magasin.', 'smartphone', 5, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-magasin-vente-directe'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'feature' AND ci.sort_order = 5);

UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Expedition sans commande', ci.body = 'Prise en charge des sorties directes sans commande prealable dans le cadre du magasin.', ci.icon = 'workflow'
WHERE m.slug = 'wms-magasin-vente-directe' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 1;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Devis BL Facture', ci.body = 'Generation directe des documents utiles a la vente comptoir et a la sortie magasin.', ci.icon = 'file-text'
WHERE m.slug = 'wms-magasin-vente-directe' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 2;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Clients comptoir ou en compte', ci.body = 'Gestion des scenarios de vente selon le profil client et le contexte de traitement.', ci.icon = 'users'
WHERE m.slug = 'wms-magasin-vente-directe' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 3;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Tarifs et remises', ci.body = 'Application des regles tarifaires et remises dans un cadre relie a Sage 100.', ci.icon = 'chart-column'
WHERE m.slug = 'wms-magasin-vente-directe' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 4;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Saisie mobile et signature', ci.body = 'Traitement direct sur appareil mobile avec collecte des informations utiles a la sortie magasin.', ci.icon = 'smartphone'
WHERE m.slug = 'wms-magasin-vente-directe' AND ci.owner_type = 'module' AND ci.item_type = 'feature' AND ci.sort_order = 5;

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Traitement comptoir plus rapide', 'Les ventes directes et sorties magasin s inserent dans un flux plus fluide et mieux documente.', 'bolt', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-magasin-vente-directe'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 1);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Continuite documentaire', 'Devis, BL et factures restent relies au meme environnement de travail.', 'file-text', 2, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-magasin-vente-directe'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 2);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Cadre tarifaire mieux tenu', 'Les tarifs et remises restent relus dans un environnement relie a Sage 100.', 'shield-check', 3, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-magasin-vente-directe'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 3);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, icon, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'benefit', 'Module combinable', 'Activez Magasin / Vente directe dans votre environnement Win@WMS et combinez-le avec les autres modules de la meme solution selon vos usages comptoir.', 'puzzle', 4, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-magasin-vente-directe'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'benefit' AND ci.sort_order = 4);

UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Traitement comptoir plus rapide', ci.body = 'Les ventes directes et sorties magasin s inserent dans un flux plus fluide et mieux documente.', ci.icon = 'bolt'
WHERE m.slug = 'wms-magasin-vente-directe' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 1;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Continuite documentaire', ci.body = 'Devis, BL et factures restent relies au meme environnement de travail.', ci.icon = 'file-text'
WHERE m.slug = 'wms-magasin-vente-directe' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 2;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Cadre tarifaire mieux tenu', ci.body = 'Les tarifs et remises restent relus dans un environnement relie a Sage 100.', ci.icon = 'shield-check'
WHERE m.slug = 'wms-magasin-vente-directe' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 3;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Module combinable', ci.body = 'Activez Magasin / Vente directe dans votre environnement Win@WMS et combinez-le avec les autres modules de la meme solution selon vos usages comptoir.', ci.icon = 'puzzle'
WHERE m.slug = 'wms-magasin-vente-directe' AND ci.owner_type = 'module' AND ci.item_type = 'benefit' AND ci.sort_order = 4;

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Le module couvre-t-il les expeditions sans commande ?', 'Oui. Magasin / Vente directe prend en charge les sorties directes sans commande dans le cadre des usages comptoir.', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-magasin-vente-directe'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 1);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Les documents commerciaux sont-ils prevus ?', 'Oui. Le module peut couvrir devis, BL et facture selon le scenario retenu dans votre organisation.', 2, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-magasin-vente-directe'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 2);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Le module gere-t-il tarifs et remises ?', 'Oui. Les regles tarifaires et remises peuvent rester gerees dans un cadre compatible avec Sage 100.', 3, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-magasin-vente-directe'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 3);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'La saisie mobile fait-elle partie du flux ?', 'Le module peut integrer des usages mobiles et la collecte de signatures selon le scenario de magasin retenu.', 4, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-magasin-vente-directe'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 4);
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'faq', 'Magasin / Vente directe peut-il etre combine avec d autres modules Win@WMS ?', 'Oui. Magasin / Vente directe s integre dans l environnement Win@WMS et peut etre utilise avec les autres modules de la meme solution selon vos usages comptoir.', 5, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-magasin-vente-directe'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'faq' AND ci.sort_order = 5);

UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Le module couvre-t-il les expeditions sans commande ?', ci.body = 'Oui. Magasin / Vente directe prend en charge les sorties directes sans commande dans le cadre des usages comptoir.'
WHERE m.slug = 'wms-magasin-vente-directe' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 1;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Les documents commerciaux sont-ils prevus ?', ci.body = 'Oui. Le module peut couvrir devis, BL et facture selon le scenario retenu dans votre organisation.'
WHERE m.slug = 'wms-magasin-vente-directe' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 2;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Le module gere-t-il tarifs et remises ?', ci.body = 'Oui. Les regles tarifaires et remises peuvent rester gerees dans un cadre compatible avec Sage 100.'
WHERE m.slug = 'wms-magasin-vente-directe' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 3;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'La saisie mobile fait-elle partie du flux ?', ci.body = 'Le module peut integrer des usages mobiles et la collecte de signatures selon le scenario de magasin retenu.'
WHERE m.slug = 'wms-magasin-vente-directe' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 4;
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Magasin / Vente directe peut-il etre combine avec d autres modules Win@WMS ?', ci.body = 'Oui. Magasin / Vente directe s integre dans l environnement Win@WMS et peut etre utilise avec les autres modules de la meme solution selon vos usages comptoir.'
WHERE m.slug = 'wms-magasin-vente-directe' AND ci.owner_type = 'module' AND ci.item_type = 'faq' AND ci.sort_order = 5;

INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'final_cta', 'Parler de vos usages magasin', '{"eyebrow":"CTA final","body":"Parlons de vos ventes comptoir, de vos documents directs et de vos flux terrain pour verifier comment Magasin / Vente directe peut s integrer a votre environnement Win@WMS.","cta_label":"Demander une demonstration","cta_url":"/demo/","secondary_cta_label":"Decouvrir les modules Win@WMS","secondary_cta_url":"/catalogue/modules/?product=win-wms"}', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-magasin-vente-directe'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'final_cta');
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Parler de vos usages magasin',
    ci.body = '{"eyebrow":"CTA final","body":"Parlons de vos ventes comptoir, de vos documents directs et de vos flux terrain pour verifier comment Magasin / Vente directe peut s integrer a votre environnement Win@WMS.","cta_label":"Demander une demonstration","cta_url":"/demo/","secondary_cta_label":"Decouvrir les modules Win@WMS","secondary_cta_url":"/catalogue/modules/?product=win-wms"}'
WHERE m.slug = 'wms-magasin-vente-directe' AND ci.owner_type = 'module' AND ci.item_type = 'final_cta';
INSERT INTO content_items (owner_type, owner_id, item_type, title, body, sort_order, is_active, created_at, updated_at)
SELECT 'module', m.id, 'environment_modules_block', 'Composez votre environnement Win@WMS', '{"body":"Associez Magasin / Vente directe aux autres modules Win@WMS afin de relier vos sorties comptoir, votre stock et votre gestion commerciale dans un meme environnement.","limit":6}', 1, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
FROM modules m WHERE m.slug = 'wms-magasin-vente-directe'
  AND NOT EXISTS (SELECT 1 FROM content_items ci WHERE ci.owner_type = 'module' AND ci.owner_id = m.id AND ci.item_type = 'environment_modules_block');
UPDATE content_items ci JOIN modules m ON m.id = ci.owner_id
SET ci.title = 'Composez votre environnement Win@WMS',
    ci.body = '{"body":"Associez Magasin / Vente directe aux autres modules Win@WMS afin de relier vos sorties comptoir, votre stock et votre gestion commerciale dans un meme environnement.","limit":6}'
WHERE m.slug = 'wms-magasin-vente-directe' AND ci.owner_type = 'module' AND ci.item_type = 'environment_modules_block';
