{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://oto.dtp/schemas/faisabilite/brief.schema.json",
  "title": "Brief d'entrée du générateur Faisabilité 4 volets",
  "description": "Données projet SOURCÉES fournies au générateur. Le générateur ne fabrique aucun chiffre (#6) : tout champ absent devient un placeholder et rétrograde le statut. Les paramètres canoniques (3%/8.5%/52% · USD+DOP · Cardnet · Letter US) ne figurent PAS ici — ils sont imposés par le générateur.",
  "type": "object",
  "required": ["projet"],
  "additionalProperties": true,
  "properties": {
    "projet": { "type": "string", "pattern": "^P0[1-9]$", "description": "Code projet canonique (P01..P09) · domaine ancré sur CLAUDE.md §Projets." },
    "nom": { "type": "string" },
    "synthetique": { "type": "boolean", "description": "true = fixture de test, jamais publiable." },
    "sources": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Références archives justifiant les chiffres (axe Traçabilité §7)."
    },
    "masterplan": {
      "type": "object",
      "properties": {
        "localisation": { "type": "string" },
        "terrain_m2": { "type": ["number", "null"] },
        "terrain_tareas": { "type": ["number", "null"] },
        "zonage": { "type": "string" },
        "nb_unites": { "type": ["integer", "null"] },
        "nb_phases": { "type": ["integer", "null"] },
        "cos": { "type": "string" },
        "acces": { "type": "string" },
        "ref_plan_masse": { "type": "string" },
        "phasage": { "type": "string" }
      }
    },
    "architecture": {
      "type": "object",
      "properties": {
        "parti_archi": { "type": "string" },
        "nb_batiments": { "type": ["integer", "null"] },
        "nb_niveaux": { "type": ["integer", "null"] },
        "ref_rendus": { "type": "string" },
        "taux_conversion": {
          "type": "object",
          "properties": {
            "taux": { "type": ["number", "null"] },
            "date": { "type": "string" },
            "source": { "type": "string" }
          }
        },
        "typologies": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "nom": { "type": "string" },
              "quantite": { "type": ["integer", "null"] },
              "surface_interieure_m2": { "type": ["number", "null"] },
              "surface_terrasse_m2": { "type": ["number", "null"] },
              "surface_totale_m2": { "type": ["number", "null"] },
              "prix_usd": { "type": ["number", "null"] },
              "prix_dop": { "type": ["number", "null"] }
            }
          }
        }
      }
    },
    "paysage": {
      "type": "object",
      "properties": {
        "concept_paysage": { "type": "string" },
        "amenities": { "type": "array", "items": { "type": "string" } },
        "services_inclus": { "type": "array", "items": { "type": "string" } },
        "experience": { "type": "string" },
        "durabilite": { "type": "string" }
      }
    },
    "ingenierie": {
      "type": "object",
      "properties": {
        "structure": { "type": "string" },
        "reseaux": { "type": "string" },
        "contraintes_site": { "type": "string" },
        "cout_construction_usd": { "type": ["number", "null"] },
        "revenu_brut_usd": { "type": ["number", "null"] },
        "marge_pct": { "type": ["number", "null"] },
        "regime_fiscal": { "type": "string" }
      }
    },
    "commercial": {
      "type": "object",
      "description": "Chaînes libres commerciales, langue par langue. Le générateur 4 volets consomme le FR (positionnement §40_llm_outputs) ; le générateur bancable consomme FR/EN/ES pour la section Positionnement du dossier bancable. Une langue absente reste un placeholder (jamais traduite automatiquement · #6).",
      "properties": {
        "positionnement_fr": { "type": "string" },
        "positionnement_en": { "type": "string" },
        "positionnement_es": { "type": "string" }
      }
    },
    "rendus": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "fichier": { "type": "string" },
          "vue": { "type": "string" },
          "hero": { "type": "boolean" }
        }
      }
    }
  }
}
