{
  "version": "1.0.0",
  "roadmap_ref": "04_roadmap/ROADMAP_8_WEEKS_OR_LESS.md · Sprint 4 l.49 « Frontend Console : 5 portails (Ventes/Construction/Achat/Compta/Direction) »",
  "description": "Spec machine-lisible des 5 portails rôle rendus en Workspaces ERPNext v15 natifs. La source de vérité des DocTypes et des rôles reste le contrat RBAC (rbac_50_roles.json) : ce fichier ne fait QUE la mise en page (cartes, raccourcis, thème). Un invariant refuse tout DocType absent des permissions_cibles du portail (anti-invention #6) et impose la couverture exhaustive.",
  "generated_from": "rbac_50_roles.json (permissions_cibles + portail par rôle)",
  "brand": {
    "note": "Tokens de marque luxury dark+doré (CLAUDE.md #4). Appliqués par la couche thème desk (Website Theme / CSS custom) déposée par l'agent Frontend sur le VPS — HORS de ce worker (#8). Repris ici pour le hand-off, jamais fabriqués.",
    "fond": {"valeur": "#0a0a12", "source": "CLAUDE.md #4"},
    "accent": {"valeur": "#f0b429", "source": "CLAUDE.md #4"},
    "polices": [
      {"valeur": "Fraunces", "source": "CLAUDE.md #4"},
      {"valeur": "Cormorant Garamond", "source": "CLAUDE.md #4"}
    ]
  },
  "palette_note": "Chaque portail porte un `accent_desk` = nom de couleur de la palette native Frappe (Workspace Shortcut.color / Workspace.indicator_color). C'est un libellé COSMÉTIQUE reproductible (le desk n'accepte pas un hex arbitraire par raccourci) ; le doré réel de la marque vit dans `brand.accent` et s'applique par le thème. Idem pour `icon` (jeu d'icônes desk Frappe v15).",
  "portails": [
    {
      "key": "ventes",
      "label": "OTO Ventes",
      "icon": "sell",
      "accent_desk": "Yellow",
      "sequence_id": 1,
      "raccourcis": ["Lead", "Opportunity", "Quotation", "Sales Order"],
      "cartes": [
        {"titre": "Pipeline commercial", "doctypes": ["Lead", "Opportunity", "Quotation", "Sales Order"]},
        {"titre": "Clients & encaissements", "doctypes": ["Customer", "Sales Invoice", "Payment Entry"]},
        {"titre": "Apres-vente & conformite", "doctypes": ["Issue", "CONFOTUR Application"]},
        {"titre": "Marketing & web", "doctypes": ["Publiciste Log", "Web Page"]}
      ]
    },
    {
      "key": "construction",
      "label": "OTO Construction",
      "icon": "project",
      "accent_desk": "Orange",
      "sequence_id": 2,
      "raccourcis": ["Project", "Task", "Faisabilité", "Quality Inspection"],
      "cartes": [
        {"titre": "Chantier & projet", "doctypes": ["Project", "Task", "Timesheet"]},
        {"titre": "Faisabilite & plans", "doctypes": ["Faisabilité", "File"]},
        {"titre": "Approvisionnement chantier", "doctypes": ["Material Request", "Purchase Order", "Item"]},
        {"titre": "Qualite", "doctypes": ["Quality Inspection"]}
      ]
    },
    {
      "key": "achat",
      "label": "OTO Achat",
      "icon": "buying",
      "accent_desk": "Cyan",
      "sequence_id": 3,
      "raccourcis": ["Material Request", "Request for Quotation", "Purchase Order", "Supplier"],
      "cartes": [
        {"titre": "Cycle achat", "doctypes": ["Material Request", "Request for Quotation", "Purchase Order", "Purchase Receipt"]},
        {"titre": "Fournisseurs", "doctypes": ["Supplier", "Contact"]},
        {"titre": "Stock & articles", "doctypes": ["Item", "Stock Entry"]}
      ]
    },
    {
      "key": "compta",
      "label": "OTO Compta",
      "icon": "accounting",
      "accent_desk": "Green",
      "sequence_id": 4,
      "raccourcis": ["Journal Entry", "Payment Entry", "Sales Invoice", "Purchase Invoice"],
      "cartes": [
        {"titre": "Grand livre", "doctypes": ["Account", "GL Entry", "Journal Entry", "Cost Center"]},
        {"titre": "Clients & fournisseurs", "doctypes": ["Sales Invoice", "Purchase Invoice", "Payment Entry"]},
        {"titre": "Tresorerie & budget", "doctypes": ["Bank Transaction", "Budget"]},
        {"titre": "Paie", "doctypes": ["Employee", "Salary Slip"]}
      ]
    },
    {
      "key": "direction",
      "label": "OTO Direction",
      "icon": "organization",
      "accent_desk": "Purple",
      "sequence_id": 5,
      "raccourcis": ["Faisabilité", "Sales Order", "Journal Entry", "Project"],
      "cartes": [
        {"titre": "Commercial (vue direction)", "doctypes": ["Lead", "Opportunity", "Quotation", "Sales Order", "Sales Invoice"]},
        {"titre": "Operations & projets", "doctypes": ["Project", "Task", "Faisabilité"]},
        {"titre": "Finance (vue direction)", "doctypes": ["Journal Entry", "Payment Entry", "Purchase Invoice", "Purchase Order"]},
        {"titre": "Legal & conformite", "doctypes": ["Contract", "CONFOTUR Application"]}
      ]
    }
  ]
}
