{
  "contract_version": "gab_022_contract_v1",
  "gab_id": "GAB-022",
  "canonical_name": "RewardVisualCelebration",
  "module_owner": "EdTechPlayKit",
  "renderer_key": "text_cta",
  "required_fields": [
    "gab_id",
    "reward_id",
    "kicker",
    "title",
    "body"
  ],
  "optional_fields": [
    "icon",
    "highlight",
    "primary_cta",
    "footer_note"
  ],
  "field_types": {
    "gab_id": "string — doit valoir 'GAB-022'",
    "reward_id": "string — identifiant unique de l'instance de célébration",
    "kicker": "string — libellé court affiché en surtitre (ex: 'Défi terminé')",
    "title": "string — titre principal de la célébration (ex: 'Bravo chef !')",
    "body": "string — message de contexte (ex: 'Tu as terminé le défi Pythagore.')",
    "icon": "string — emoji ou code icône affiché dans le trophée (défaut: '🏆')",
    "highlight": "string|null — texte mis en valeur optionnel (non affiché si null)",
    "primary_cta": "object{label:string, icon:string, action:string} — bouton replay",
    "footer_note": "string — note de bas de carte (ex: séparation affichage/XP)"
  },
  "constraints": [
    "Le moteur d'animation (confettis, pop trophée) est structurel — il ne varie pas selon l'instance.",
    "PlayKit affiche uniquement. L'attribution du XP est déléguée au GamificationAdapter.",
    "primary_cta est facultatif ; si absent, un libellé par défaut 'Rejouer' est utilisé.",
    "icon est facultatif ; si absent, le trophée affiche '🏆' par défaut.",
    "BLOCKED si title absent, body absent ou gab_id absent."
  ],
  "blocked_conditions": [
    "gab_id absent",
    "title absent",
    "body absent"
  ],
  "accessibility": [
    "keyboard_navigable",
    "focus_visible",
    "prefers_reduced_motion",
    "bouton replay accessible au clavier"
  ],
  "qa_cases": [
    { "case": "instance conforme", "expected": "rendu complet avec animation confettis + pop trophée au chargement" },
    { "case": "title absent", "expected": "BLOCKED listant 'title absent'" },
    { "case": "body absent", "expected": "BLOCKED listant 'body absent'" },
    { "case": "instance externe injectée", "expected": "le rendu change sans modifier le HTML" },
    { "case": "primary_cta absent", "expected": "bouton affiché avec libellé par défaut 'Rejouer'" },
    { "case": "clic replay", "expected": "animation confettis + pop trophée rejouée" },
    { "case": "responsive 375/768/1024", "expected": "aucun débordement horizontal, trophée redimensionné sur mobile" }
  ],
  "traceability": {
    "derived_from_core_gab": "GAB-022",
    "note": "Ce schema VALIDE l'instance. Le contrat pédagogique complet (input_contract/validation_logic/feedback_scoring_logic) vit dans le CORE-GAB officiel, pas ici (évite la duplication)."
  }
}
