/**
 * Tokens du design system, préfixe --mt-.
 *
 * Consomme les --apaba-* du thème agrikole-child (assets/css/tokens.css, SOURCE
 * UNIQUE DE VÉRITÉ, enqueue inconditionnellement) avec un repli littéral, pour
 * rester présentable si le thème change ou n'est pas chargé.
 *
 * ⚠️ Préfixe --mt- obligatoire : redéclarer un nom --apaba-* ici masquerait le
 * global du thème dans toute la page — c'est exactement le bug que porte
 * aujourd'hui le CSS du plugin PPP.
 *
 * ⚠️ Tout est en px : le thème agrikole impose html{font-size:62.5%}, donc
 * 1rem ≈ 10px et les rem sont un piège.
 */

:root {
    /* — Marque — */
    --mt-brand:        var(--apaba-brand,        #1a8781);
    --mt-brand-strong: var(--apaba-brand-strong, #14655f);
    --mt-brand-tint:   var(--apaba-brand-tint,   #e6f2f0);
    --mt-leaf:         var(--apaba-leaf,         #5b8c51);

    /* — Encre & neutres chauds — */
    --mt-ink:          var(--apaba-ink,          #2b3128);
    --mt-ink-soft:     var(--apaba-ink-soft,     #404a3d);
    --mt-text:         var(--apaba-text,         #3c4139);
    --mt-muted:        var(--apaba-muted,        #6c7266);
    --mt-line:         var(--apaba-line,         #e5dfd4);

    /* — Surfaces — */
    --mt-bg:           var(--apaba-bg,           #faf8f5);
    --mt-surface:      var(--apaba-surface,      #ffffff);
    --mt-surface-warm: var(--apaba-surface-warm, #f4efe7);
    --mt-field-bg:     var(--apaba-field-bg,     #ffffff);

    /* — Sémantiques — */
    --mt-ok:           var(--apaba-ok,           #4c8a3f);
    --mt-warn:         var(--apaba-warn,         #b8801e);
    --mt-danger:       var(--apaba-danger,       #b8402d);
    --mt-ok-tint:      #eef6ee;
    --mt-warn-tint:    #fbf3e2;
    --mt-danger-tint:  #fdeeee;

    /* Pluie : le seul bleu du jeu. Il ne porte aucun verdict — il nomme une
       ORIGINE d'eau, à côté du teal de la marque qui nomme l'autre. Choisi
       assez clair pour se détacher du teal, qui en est voisin en teinte ;
       partout où il sert, une hachure double la couleur. */
    --mt-rain:         var(--apaba-rain,         #4f8fc0);
    --mt-rain-tint:    #e8f1f8;

    /* — Rayons — */
    --mt-radius-sm:    var(--apaba-radius-sm,    6px);
    --mt-radius:       var(--apaba-radius,       10px);
    --mt-radius-lg:    var(--apaba-radius-lg,    16px);
    --mt-radius-pill:  var(--apaba-radius-pill,  999px);

    /* — Ombres — */
    --mt-shadow-sm:    var(--apaba-shadow-sm,    0 1px 2px rgba(43, 49, 40, .06));
    --mt-shadow:       var(--apaba-shadow,       0 3px 12px rgba(43, 49, 40, .08));
    --mt-shadow-lg:    var(--apaba-shadow-lg,    0 12px 32px rgba(43, 49, 40, .12));

    /* — Espacement (base 4px) — */
    --mt-space-1: 4px;
    --mt-space-2: 8px;
    --mt-space-3: 12px;
    --mt-space-4: 16px;
    --mt-space-5: 24px;
    --mt-space-6: 32px;

    /* — Typographie (5 crans produit). Corps aligné sur --apaba-fs-body.
       Champ 16px EN DUR : --apaba-fs-field vaut 15px et iOS zoome sous 16.
       Titre 18px : 17 collait au corps 16. */
    --mt-font-body:  var(--apaba-font-body, "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    --mt-fs-micro:  12px;   /* légendes, badges, étiquettes de données. PAS
                              les intitulés : depuis l'abandon du cran capitales,
                              un intitulé (h4, thead, entête de colonne) est du
                              corps 700 en teal. */
    --mt-fs-annex:  13.5px; /* hints, notes, pastilles — jamais un label de champ */
    --mt-fs-body:   var(--apaba-fs-body, 16px); /* texte lu ET labels de formulaire */
    --mt-fs-field:  16px;   /* saisie — iOS */
    --mt-fs-title:  18px;
    --mt-fs-title-lg: 22px;
    /* Chiffres qu'on emporte au champ. `display` = valeur héro d'un résultat
       (.mt-result--hero). `display-lg` = chiffre de tableau de bord (ETP,
       pluie de l'Accueil), réservé au desktop : au champ, la place manque. */
    --mt-fs-display:    28px;
    --mt-fs-display-md: 38px;
    --mt-fs-display-lg: 46px;
}
