"""
source_12.py — s12 · GÉOGRAPHIE DU VIRATA — PAYS ↔ CHAKRAS (DCB 1996)
Série SOURCE ANNEXE FIABLE · généré depuis l'analyse gravée (Fable, 12 juil 2026).
RĂšgle : zĂ©ro invention — tout champ provient de la planche ou d'un recoupement datĂ©.
⭐ Source la plus solide des planches s01-s12 (officielle et datée).
"""
from dataclasses import dataclass, field, asdict
import json

# ── SOCLE COMMUN (passe U6b — imbrication, GO Ben 13 juil 2026, 23h29) ────
# socle_corpus.py = clé de voûte du paquet corpus/ (types partagés · registre
# · GRAPHE des jonctions · VERDICTS D1-D6). Loi 2 du contrat : les jonctions
# CANONIQUES entre piùces (dNN/sNN) vivent UNE SEULE FOIS dans GRAPHE — la
# liste locale `jonctions` (cible/nature) reste une NOTE DE LECTURE de la
# planche.
# Loi 3 : aucun verdict recopiĂ© — pointer VERDICTS[id].
ID_CORPUS = "s12"
try:
    from socle_corpus import GRAPHE, VERDICTS, SOURCES as REGISTRE_SOURCES
    JONCTIONS_SOCLE = [j for j in GRAPHE if ID_CORPUS in (j.a, j.b)]
    MODE_ILOT = False
except ImportError:  # exécution isolée : le module reste lisible en ßlot
    GRAPHE, VERDICTS, REGISTRE_SOURCES = [], {}, {}
    JONCTIONS_SOCLE, MODE_ILOT = [], True

@dataclass
class Inscription:
    texte: str
    zone: str
    statut: str = "\U0001f7e2"

@dataclass
class Jonction:
    cible: str
    nature: str

@dataclass
class Source:
    sid: str = "s12"
    titre: str = "GÉOGRAPHIE DU VIRATA — PAYS ↔ CHAKRAS (DCB 1996)"
    type_source: str = "'THE GEOGRAPHY OF THE VIRATA' — page de magazine imprimĂ©e (capture)"
    origine: str = "The Divine Cool Breeze, OCT 1996 (magazine officiel SY) · 'updated by Shri Mataji on 15 August 1996'"
    auteur_shri_mataji: bool = False   # mise à jour attribuée à Elle, mais pas un dessin de Sa main
    fiabilite: str = "\U0001f7e2 SOURCE OFFICIELLE DATÉE (DCB oct. 1996, m-Ă -j attribuĂ©e Ă  Shri Mataji 15/8/1996) · \U0001f7e1 capture indirecte, coquille 'New Zeland'"

    inscriptions: list = field(default_factory=lambda: [
        Inscription("THE GEOGRAPHY OF THE VIRATA", "titre"),
        Inscription("The Divine Cool Breeze, OCT 1996", "référence imprimée"),
        Inscription("This overview of the Geography of Sahaja Yoga was updated by Shri Mataji on "
                    "15 August 1996. All of India is the Sacrum Bone.", "note de bas de page — verbatim"),
        Inscription("New Zeland", "coquille de l'original conservée [sic]", "\U0001f7e1"),
    ])

    correspondances_pays: dict = field(default_factory=lambda: {
        "Sahasrara": "The Himalayas",
        "Super-Ego": "China",
        "Ego": "Russia",
        "Agnya": "Jerusalem, Bethlehem, Palestine",
        "Hamsa": "New York",
        "Vishuddhi (centre)": "Central America",
        "Vishuddhi droit": "North America, Canada, Norway, Sweden, Finland, Denmark",
        "Vishuddhi gauche": "South America, Bulgaria, Romania, Hungary, Czech, Poland",
        "CƓur centre": "Ireland, Calcutta",
        "CƓur droit": "Germany, Japan",
        "CƓur gauche": "England",
        "Atma - Heart Trigger (The Spirit)": "Spain",
        "Jivatma (The Soul)": "Spain",
        "Nabhi (centre)": "Greece, Europe",
        "Nabhi droit": "France (Liver)",
        "Nabhi gauche": "Austria",
        "Swadisthana droit": "France (Liver)",
        "Swadisthana gauche": "Africa, Nepal",
        "Kundalini": "Maharashtra",
        "Mooladhara": "Australia",
        "Mooladhara droit": "New Zeland [sic]",
    })

    caracteristiques: list = field(default_factory=lambda: [
        "le monde comme corps du Virata — chaque pays incarne un centre",
        "donnée forte : l'Inde entiÚre = os sacrum · Kundalini = Maharashtra",
        "centres rares présents : Hamsa, Atma/Jivatma (Espagne dédoublée)",
    ])

    jonctions: list = field(default_factory=lambda: [
        Jonction("d10", "CARTE DES LOKAS — macrocosme, mĂȘme logique d'incarnation gĂ©ographique"),
        Jonction("d04", "carte-mùre — complùte le microcosme par le macrocosme"),
        Jonction("s11", "Hamsa/Atma — centres rares communs aux deux planches"),
        Jonction("s05", "sacrum — 'All of India is the Sacrum Bone' recoupe l'os triangulaire"),
    ])

    en_attente: list = field(default_factory=lambda: [
        "\U0001f7e1 retrouver le numéro DCB oct. 1996 original (vérification premiÚre main)",
    ])

    def rapport(self) -> str:
        etat_socle = ("ßlot (socle_corpus non chargé)" if MODE_ILOT
                      else f"imbriquĂ© — {len(JONCTIONS_SOCLE)} jonction(s) canoniques au GRAPHE")
        return "\n".join([
            f"[{self.sid}] {self.titre}",
            f"  origine : {self.origine}",
            f"  de la main de Shri Mataji : {self.auteur_shri_mataji}",
            f"  fiabilité : {self.fiabilite}",
            f"  correspondances : {len(self.correspondances_pays)} · jonctions : {len(self.jonctions)}",
            f"  SOCLE : {etat_socle}",
        ])

    def to_json(self) -> str:
        data = asdict(self)
        data["id_corpus"] = ID_CORPUS
        data["jonctions_canoniques"] = [asdict(j) for j in JONCTIONS_SOCLE]
        data["mode_ilot"] = MODE_ILOT
        return json.dumps(data, ensure_ascii=False, indent=2)

if __name__ == "__main__":
    print(Source().rapport())