/* Étiquettes de masquage : même rendu que dans le logiciel Sovra
   (badge encadré, fond teinté, une couleur par catégorie).
   Teintes reprises de web/src/index.css (--e-*) du logiciel. */
:root {
  --e-personnalise: 34 64% 50%;
  --e-personne: 34 64% 50%;
  --e-organisation: 34 64% 50%;
  --e-lieu: 34 64% 50%;
  --e-date: 34 64% 50%;
  --e-iban: 34 64% 50%;
  --e-email: 34 64% 50%;
  --e-telephone: 34 64% 50%;
  --e-montant: 34 64% 50%;
  --e-reference: 34 64% 50%;
}

/* Police du logiciel pour toutes les étiquettes, y compris les gabarits
   invisibles qui fixent la largeur : posée en CSS dès le premier rendu. */
span.font-mono.rounded-\[5px\].border,
span.font-mono.rounded-\[6px\].border,
span.font-mono.bg-token {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  /* Taille fixe : identique partout, quel que soit le texte autour. */
  font-size: 12px !important;
  line-height: 18px !important;
  box-sizing: border-box !important;
  height: 20px !important;
  vertical-align: baseline;
  letter-spacing: 0 !important;
  padding: 0 5px !important;
  border-radius: 4px !important;
}

span.bg-token[data-teinte] {
  background-color: hsl(var(--teinte) / 0.18) !important;
  border-color: hsl(var(--teinte) / 0.5) !important;
}

/* Les étiquettes « en ligne » ignorent la hauteur : bloc en ligne. */
span.font-mono.rounded-\[6px\].border:not(.inline-grid):not(.inline-flex):not(.grid):not(.flex),
span.font-mono.rounded-\[5px\].border:not(.inline-grid):not(.inline-flex):not(.grid):not(.flex) {
  display: inline-block !important;
}

/* Contraste : texte noir sur fond clair, texte blanc sur fond sombre
   (teintes plus lumineuses, comme le thème sombre du logiciel). */
span.bg-token[data-fond="clair"] { color: #13213a !important; }
span.bg-token[data-fond="sombre"] {
  color: #f4f2ee !important;
  --e-personnalise: 34 64% 50%;
  --e-personne: 34 64% 50%;
  --e-organisation: 34 64% 50%;
  --e-lieu: 34 64% 50%;
  --e-date: 34 64% 50%;
  --e-iban: 34 64% 50%;
  --e-email: 34 64% 50%;
  --e-telephone: 34 64% 50%;
  --e-montant: 34 64% 50%;
  --e-reference: 34 64% 50%;
}
span.bg-token[data-fond="sombre"][data-teinte] {
  background-color: hsl(var(--teinte) / 0.26) !important;
  border-color: hsl(var(--teinte) / 0.65) !important;
}
