// Bergerac Seed & Breeding — variety dataset
// All data from "Catalogue complet Virginie 2026"
// ITB 683 is the national reference (= 100%).

const VARIETIES = [
  {
    code: "ITB 683",
    type: "Virginie de remplissage, type shisha",
    typeShort: "Remplissage / Shisha",
    year: 2003,
    breeder: "Bergerac Seed & Breeding",
    isReference: true,
    headline: "Référence française. Excellent compromis rendement, qualité, alcaloïdes.",
    technician: "Buttage nécessaire afin de limiter les risques de verse. Très bonne aptitude au jaunissement, séchage assez court. Attention sensibilité à l'alternaria.",
    resistances: { chalara: "R", pvy: "R", tmv: "S", oidium: "R", mildiou: "S", orobanche: "S", nematodes: "S" },
    yield: 3890, yieldPct: 100,
    quality: 84, qualityPct: 100,
    flowering: 74, floweringClass: "très précoce",
    duration: 100,
    lodging: "sensible", lodgingScore: -2,
    alkaloids: 1.3, sugars: 19,
    precocity: "tres-precoce",
  },
  {
    code: "ITB 6118",
    type: "Virginie semi-aromatique",
    typeShort: "Semi-aromatique",
    year: 2006,
    breeder: "Bergerac Seed & Breeding",
    headline: "Très bon potentiel aromatique précoce. Facile à gérer au four, bonne capacité de jaunissement.",
    technician: "Variété sujette aux bourgeonnements du bas, surtout en conditions froides de plantation.",
    resistances: { chalara: "R", pvy: "R", tmv: "S", oidium: "S", mildiou: "S", orobanche: "S", nematodes: "R" },
    yield: 3768, yieldPct: 97,
    quality: 82, qualityPct: 98,
    flowering: 74, floweringClass: "très précoce",
    duration: 100,
    lodging: "tolérante", lodgingScore: 1,
    alkaloids: 2.5, sugars: 18,
    precocity: "tres-precoce",
  },
  {
    code: "BSB 6221",
    type: "Virginie de remplissage, type shisha",
    typeShort: "Remplissage / Shisha",
    year: 2024,
    breeder: "Bergerac Seed & Breeding",
    isNew: true,
    headline: "Petite variété précoce avec une haute tolérance à l'orobanche. Rendement limité.",
    technician: "Très bonne aptitude au jaunissement, séchage assez court.",
    resistances: { chalara: "R", pvy: "R", tmv: "S", oidium: "S", mildiou: "S", orobanche: "R", nematodes: "S" },
    yield: 3556, yieldPct: 91,
    quality: 76, qualityPct: 90,
    flowering: 74, floweringClass: "très précoce",
    duration: 100,
    lodging: "tolérant", lodgingScore: 1,
    alkaloids: 1.4, sugars: 19,
    precocity: "tres-precoce",
  },
  {
    code: "BSB 6195",
    type: "Virginie de remplissage, type shisha",
    typeShort: "Remplissage / Shisha",
    year: 2022,
    breeder: "Bergerac Seed & Breeding",
    headline: "Résistante au TMV, très précoce. S'adapte au remplissage ou semi-aromatique.",
    technician: "Plante compacte très tolérante à la verse.",
    resistances: { chalara: "R", pvy: "R", tmv: "R", oidium: "S", mildiou: "S", orobanche: "S", nematodes: "R" },
    yield: 3750, yieldPct: 95,
    quality: 83, qualityPct: 95,
    flowering: 74, floweringClass: "précoce",
    duration: 102,
    lodging: "très tolérant", lodgingScore: 2,
    alkaloids: 1.9, sugars: 14,
    precocity: "precoce",
  },
  {
    code: "BSB 6197",
    type: "Virginie de remplissage, type shisha",
    typeShort: "Remplissage / Shisha",
    year: 2017,
    breeder: "Bergerac Seed & Breeding",
    headline: "Fort potentiel de rendement et de qualité remplissage shisha. Bonne tolérance à la verse.",
    technician: "Très bonne aptitude au jaunissement. Plante assez haute (140cm).",
    resistances: { chalara: "R", pvy: "R", tmv: "S", oidium: "S", mildiou: "S", orobanche: "S", nematodes: "R" },
    yield: 4046, yieldPct: 104,
    quality: 80, qualityPct: 96,
    flowering: 74, floweringClass: "précoce",
    duration: 101,
    lodging: "tolérant", lodgingScore: 1,
    alkaloids: 1.4, sugars: 16,
    precocity: "precoce",
  },
  {
    code: "BSB 6202",
    type: "Virginie de remplissage, type shisha",
    typeShort: "Remplissage / Shisha",
    year: 2019,
    breeder: "Bergerac Seed & Breeding",
    headline: "Résistante TMV. Qualité homogène et rendement stable.",
    technician: "Stable en qualité, en rendement et tolérante au TMV. Peut tendance à être côteuse.",
    resistances: { chalara: "R", pvy: "R", tmv: "R", oidium: "S", mildiou: "S", orobanche: "S", nematodes: "R" },
    yield: 3920, yieldPct: 100,
    quality: 77, qualityPct: 92,
    flowering: 72, floweringClass: "précoce",
    duration: 102,
    lodging: "tolérant", lodgingScore: 1,
    alkaloids: 1.5, sugars: 14,
    precocity: "precoce",
  },
  {
    code: "ITB 678",
    type: "Virginie semi-aromatique",
    typeShort: "Semi-aromatique",
    year: 2009,
    breeder: "Bergerac Seed & Breeding",
    headline: "Aromatique assez précoce avec très bonne aptitude à la mécanisation.",
    technician: "Itinéraire technique à adapter, fumure azotée à maîtriser. Étages hauts à récolter assez mûrs.",
    resistances: { chalara: "R", pvy: "R", tmv: "S", oidium: "S", mildiou: "S", orobanche: "S", nematodes: "R" },
    yield: 3637, yieldPct: 97,
    quality: 75, qualityPct: 99,
    flowering: 73, floweringClass: "précoce/intermédiaire",
    duration: 104,
    lodging: "sensible", lodgingScore: -1,
    alkaloids: 2.1, sugars: 18,
    precocity: "precoce",
  },
  {
    code: "RUBY",
    type: "Virginie de remplissage, type shisha",
    typeShort: "Remplissage / Shisha",
    year: 2019,
    breeder: "Collaboration BSB · NiCoTa",
    coBred: true,
    headline: "Tolérante orobanche. Potentiel de rendement supérieur à BSB 6191.",
    technician: "La meilleure variété tolérante orobanche en rendement et qualité.",
    resistances: { chalara: "R", pvy: "R", tmv: "S", oidium: "S", mildiou: "S", orobanche: "Tol", nematodes: "S" },
    yield: 3702, yieldPct: 95,
    quality: 68, qualityPct: 80,
    flowering: 76, floweringClass: "précoce",
    duration: 103,
    lodging: "tolérant", lodgingScore: 1,
    alkaloids: 1.5, sugars: 18,
    precocity: "precoce",
  },
  {
    code: "BSB 6219",
    type: "Virginie de remplissage, type shisha",
    typeShort: "Remplissage / Shisha",
    year: 2024,
    breeder: "Bergerac Seed & Breeding",
    isNew: true,
    headline: "Semi-tardive. Fort potentiel en poids, potentiel semi-aromatique.",
    technician: "Très bonne aptitude à la mécanisation. Fertilisation à maîtriser. Beau développement sur les feuilles de tête.",
    resistances: { chalara: "R", pvy: "R", tmv: "R", oidium: "S", mildiou: "S", orobanche: "S", nematodes: "S" },
    yield: 3980, yieldPct: 102,
    quality: 80, qualityPct: 88,
    flowering: 75, floweringClass: "intermédiaire",
    duration: 104,
    lodging: "tolérant", lodgingScore: 1,
    alkaloids: 1.4, sugars: 16,
    precocity: "intermediaire",
  },
  {
    code: "ITB 6180",
    type: "Virginie de remplissage, type shisha",
    typeShort: "Remplissage / Shisha",
    year: 2014,
    breeder: "Bergerac Seed & Breeding",
    headline: "Semi-tardive, très fort potentiel en poids.",
    technician: "Très bonne aptitude à la mécanisation. Apparition des bourgeons terminaux assez tard par rapport à l'écimage.",
    resistances: { chalara: "R", pvy: "R", tmv: "S", oidium: "S", mildiou: "S", orobanche: "S", nematodes: "S" },
    yield: 4051, yieldPct: 104,
    quality: 72, qualityPct: 85,
    flowering: 75, floweringClass: "intermédiaire",
    duration: 104,
    lodging: "intermédiaire", lodgingScore: 0,
    alkaloids: 1.8, sugars: 21,
    precocity: "intermediaire",
  },
  {
    code: "BSB 6217",
    type: "Virginie de remplissage, type shisha",
    typeShort: "Remplissage / Shisha",
    year: 2024,
    breeder: "Bergerac Seed & Breeding",
    isNew: true,
    headline: "Semi-tardive, très fort potentiel en poids. Profil de résistances complet.",
    technician: "Très bonne aptitude à la mécanisation. Fertilisation à maîtriser.",
    resistances: { chalara: "R", pvy: "R", tmv: "R", oidium: "R", mildiou: "S", orobanche: "S", nematodes: "S" },
    yield: 4041, yieldPct: 100,
    quality: 84, qualityPct: 100,
    flowering: 75, floweringClass: "intermédiaire",
    duration: 104,
    lodging: "tolérant", lodgingScore: 1,
    alkaloids: 1.9, sugars: 18,
    precocity: "intermediaire",
  },
  {
    code: "BSB 6209",
    type: "Virginie de remplissage, type shisha",
    typeShort: "Remplissage / Shisha",
    year: 2023,
    breeder: "Bergerac Seed & Breeding",
    headline: "Plus fort rendement du catalogue. Résistante TMV avec un très bon niveau de qualité.",
    technician: "Plante de gros volume. Très bon niveau de qualité quand récolté au bon stade de maturité.",
    resistances: { chalara: "R", pvy: "R", tmv: "R", oidium: "S", mildiou: "S", orobanche: "S", nematodes: "Tol" },
    yield: 4511, yieldPct: 116,
    quality: 80, qualityPct: 95,
    flowering: 71, floweringClass: "intermédiaire",
    duration: 105,
    lodging: "tolérante", lodgingScore: 1,
    alkaloids: 2.0, sugars: 14,
    precocity: "intermediaire",
  },
  {
    code: "ITB 6184",
    type: "Virginie de remplissage à semi-aromatique",
    typeShort: "Remplissage / Semi-arom.",
    year: 2016,
    breeder: "Bergerac Seed & Breeding",
    headline: "Excellent compromis qualité-rendement avec résistance TMV.",
    technician: "Bourgeonnement assez tardif par rapport au stade d'écimage. Adapter l'itinéraire pour maîtriser les alcaloïdes.",
    resistances: { chalara: "R", pvy: "R", tmv: "R", oidium: "S", mildiou: "S", orobanche: "S", nematodes: "R" },
    yield: 3990, yieldPct: 102,
    quality: 79, qualityPct: 94,
    flowering: 71, floweringClass: "intermédiaire",
    duration: 105,
    lodging: "intermédiaire", lodgingScore: 0,
    alkaloids: 1.8, sugars: 17,
    precocity: "intermediaire",
  },
  {
    code: "TOPAZ",
    type: "Virginie de remplissage, type shisha",
    typeShort: "Remplissage / Shisha",
    year: 2019,
    breeder: "Collaboration BSB · NiCoTa",
    coBred: true,
    headline: "Semi-tardive. Très fort rendement, tolérante au mildiou.",
    technician: "Idéale sur terrain léger. Attention au contrôle des alcaloïdes et au risque de verse.",
    resistances: { chalara: "R", pvy: "R", tmv: "S", oidium: "S", mildiou: "Tol", orobanche: "S", nematodes: "S" },
    yield: 4053, yieldPct: 104,
    quality: 70, qualityPct: 83,
    flowering: 78, floweringClass: "intermédiaire",
    duration: 105,
    lodging: "sensible", lodgingScore: -1,
    alkaloids: 1.6, sugars: 15,
    precocity: "intermediaire",
  },
  {
    code: "BSB 6218",
    type: "Virginie de remplissage, type shisha",
    typeShort: "Remplissage / Shisha",
    year: 2022,
    breeder: "Bergerac Seed & Breeding",
    headline: "Seule variété du catalogue résistante aux nématodes à kystes et au black shank race 0.",
    technician: "Nouvelle variété à fort développement, profil de résistances unique.",
    resistances: { chalara: "R", pvy: "R", tmv: "S", oidium: "S", mildiou: "S", orobanche: "S", nematodes: "R", cystNema: "R" },
    yield: 3946, yieldPct: 101,
    quality: 80, qualityPct: 95,
    flowering: 74, floweringClass: "intermédiaire",
    duration: 106,
    lodging: "tolérant", lodgingScore: 1,
    alkaloids: 1.1, sugars: 19,
    precocity: "intermediaire",
  },
  {
    code: "ITB 6179",
    type: "Virginie remplissage à semi-aromatique",
    typeShort: "Remplissage / Semi-arom.",
    year: 2015,
    breeder: "Bergerac Seed & Breeding",
    headline: "Variété tardive. Très bon potentiel en poids.",
    technician: "Fertilisation azotée à bien maîtriser. À cultiver en association à une variété précoce. Attention à l'alternaria.",
    resistances: { chalara: "R", pvy: "R", tmv: "R", oidium: "S", mildiou: "S", orobanche: "S", nematodes: "R" },
    yield: 4290, yieldPct: 110,
    quality: 78, qualityPct: 93,
    flowering: 75, floweringClass: "tardive",
    duration: 110,
    lodging: "tolérant", lodgingScore: 1,
    alkaloids: 1.7, sugars: 18,
    precocity: "tardive",
  },
];

const PRECOCITY_GROUPS = [
  { id: "tres-precoce", label: "Très précoce", labelEn: "Very early", range: "≤ 74j" },
  { id: "precoce", label: "Précoce", labelEn: "Early", range: "73 – 74j" },
  { id: "intermediaire", label: "Intermédiaire", labelEn: "Intermediate", range: "71 – 75j" },
  { id: "tardive", label: "Tardive", labelEn: "Late", range: "≥ 75j" },
];

const TYPES = [
  { id: "Remplissage / Shisha", label: "Remplissage / Shisha" },
  { id: "Semi-aromatique", label: "Semi-aromatique" },
  { id: "Remplissage / Semi-arom.", label: "Remplissage / Semi-arom." },
];

const RESISTANCE_KEYS = [
  { id: "chalara", label: "Chalara elegans", short: "Chalara" },
  { id: "pvy", label: "PVY", short: "PVY" },
  { id: "tmv", label: "TMV", short: "TMV" },
  { id: "oidium", label: "Oïdium", short: "Oïdium" },
  { id: "mildiou", label: "Mildiou", short: "Mildiou" },
  { id: "orobanche", label: "Orobanche", short: "Orobanche" },
  { id: "nematodes", label: "Nématodes (M. incognita r1-3)", short: "Nématodes" },
];

// Commercial map regions (placeholder commercial coverage)
const HEMP_VARIETIES = [
  { code: "BSB-H 01", line: "Fibres longues", lineEn: "Long fibre", yield: "12 t/ha", thc: "< 0.3%", use: "Textile, biomatériaux", useEn: "Textile, biomaterials", year: 2024, isNew: true,
    headline: "Première variété fibre BSB. Tige droite, faible ramification.",
    headlineEn: "First BSB fibre cultivar. Straight stem, low branching." },
  { code: "BSB-H 02", line: "Graines", lineEn: "Grain", yield: "1.4 t/ha", thc: "< 0.3%", use: "Alimentation, huile", useEn: "Food, oil", year: 2025, isNew: true,
    headline: "Productivité graine élevée, bon profil oméga-3/6.",
    headlineEn: "High grain productivity, balanced omega-3/6 profile." },
  { code: "BSB-H 03", line: "Cannabinoïdes", lineEn: "Cannabinoids", yield: "—", thc: "< 0.3%", use: "Pharma, extraction CBD", useEn: "Pharma, CBD extraction", year: 2026, isNew: true,
    headline: "Lignée CBD-dominante, en cours d'inscription.",
    headlineEn: "CBD-dominant line, registration in progress." },
];

const BREEDING_STEPS = [
  { id: "brief", durationMo: 1, label_fr: "Brief technique", label_en: "Technical brief",
    desc_fr: "Cahier des charges : profil agronomique, chimie cible, résistances, débouché.",
    desc_en: "Spec sheet: agronomy, target chemistry, resistances, end-use." },
  { id: "breeding", durationMo: "36–60", label_fr: "Sélection", label_en: "Breeding",
    desc_fr: "Croisements, fixation, multiplication. 4 à 6 cycles selon objectif.",
    desc_en: "Crosses, fixation, multiplication. 4–6 cycles depending on target." },
  { id: "trials", durationMo: "24–36", label_fr: "Essais multi-sites", label_en: "Multi-site trials",
    desc_fr: "Réseau de 25+ sites France, comparatifs vs témoin.",
    desc_en: "25+ trial sites in France, benchmarked vs reference." },
  { id: "release", durationMo: 12, label_fr: "Inscription", label_en: "Release",
    desc_fr: "DHS, VAT, dépôt CTPS. Multiplication semence certifiée.",
    desc_en: "DUS, VCU, CTPS submission. Certified seed multiplication." },
];

const PUBLICATIONS = [
  { year: 2024, title: "Black shank resistance in Virginia tobacco: 25 years of field data from Aquitaine", journal: "Tobacco Science", authors: "Pelletier J., Lemaire C." },
  { year: 2023, title: "Reducing nicotine through marker-assisted selection: results on 4 Virginia lines", journal: "Theoretical and Applied Genetics", authors: "BSB R&D, INRAE Bordeaux" },
  { year: 2022, title: "Hemp breeding for fibre quality in temperate climates", journal: "Industrial Crops & Products", authors: "Pelletier J., Durand M." },
  { year: 2021, title: "Combining PVY and orobanche resistance in burley × virginia crosses", journal: "CORESTA Bulletin", authors: "BSB R&D" },
];

// Commercial map regions (placeholder commercial coverage)
const COMMERCIAL_REGIONS = [
  { id: "fr-sw", label: "France · Sud-Ouest", contact: "Pierre Marsac", x: 18, y: 52, primary: true },
  { id: "fr-cw", label: "France · Centre-Ouest", contact: "Élise Foucher", x: 22, y: 42, primary: true },
  { id: "es", label: "Espagne · Extremadura", contact: "Carlos Ruiz", x: 14, y: 62 },
  { id: "it", label: "Italie · Campania", contact: "Marco Bellini", x: 32, y: 60 },
  { id: "gr", label: "Grèce · Macédoine", contact: "Nikos Pappas", x: 44, y: 64 },
  { id: "tr", label: "Turquie · Égée", contact: "Mehmet Yıldız", x: 52, y: 62 },
  { id: "bg", label: "Bulgarie", contact: "Stoyan Petrov", x: 44, y: 56 },
];

Object.assign(window, {
  VARIETIES, PRECOCITY_GROUPS, TYPES, RESISTANCE_KEYS, COMMERCIAL_REGIONS,
  HEMP_VARIETIES, BREEDING_STEPS, PUBLICATIONS,
});
