/* ═══════════════════════════════════════════════════════════════════════════
   ga-caption.css — LISIBILITÉ DES TRANSCRIPTIONS DE VOCAUX (.voice-caption)
   Créé le 2026-08-07 après un double défaut trouvé le même jour :
     • ADMIN  : texte quasi-noir rgba(20,15,5,.72) sur bulle SOMBRE  → foncé/foncé
     • CLIENT : la règle .bubble.user-msg n'a JAMAIS matché (le DOM rend .msg.user)
                donc ivoire sur bulle DORÉE CLAIRE                   → clair/clair

   ⚠️ PIÈGE CENTRAL — `.msg.user` veut dire l'INVERSE des deux côtés :
        côté CLIENT : mes propres messages      → bulle DORÉE CLAIRE
        côté ADMIN  : les messages de la cliente → bulle SOMBRE
      Aucun sélecteur ne peut les distinguer seul. D'où `body[data-surface]`,
      posé dans index.html (client) et admin/index.html (admin).
      Si ce marqueur disparaît, les couleurs s'inversent : le gardien le vérifie.

   Ce fichier ne sert QU'À ÇA et est chargé APRÈS les feuilles principales (donc
   gagnant en cascade). Scellé chattr +i, surveillé par
   /root/giri-guards/caption-guard.sh (cron */15) qui le restaure depuis son
   canonical, et mesuré sur les PIXELS par contraste-guard.sh (SOLEIL, quotidien).
   ⛔ Ne jamais éditer le fichier servi : éditer le canonical, le gardien déploie.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Défaut : bulle SOMBRE (message reçu) → texte ivoire clair ────────────── */
.voice-caption{
  color:#F3E4C4 !important;
  background:rgba(201,169,97,.13) !important;
  border-left:2px solid rgba(201,169,97,.6) !important;
  font-size:13.5px; line-height:1.5; font-style:italic;
}

/* ── Bulle DORÉE CLAIRE (message envoyé) → texte sombre sur voile blanc ───── */
body[data-surface="client"] .msg.user .voice-caption,   /* client : MES messages */
.bubble.is-mine .voice-caption,                          /* admin  : MES messages */
.bubble.user-msg .voice-caption, .bubble.me .voice-caption{ /* anciens sélecteurs, au cas où */
  color:#1A1206 !important;
  background:rgba(255,255,255,.58) !important;
  border-left-color:rgba(120,90,30,.55) !important;
}

/* ── THÈME CLAIR : la bulle reçue devient claire → le texte doit foncer ───── */
[data-theme="light"] .msg.agent .voice-caption,
[data-theme="light"] .bubble:not(.is-mine) .voice-caption,
html[data-theme="light"] .voice-caption{
  color:rgba(30,22,8,.88) !important;
  background:rgba(142,109,44,.09) !important;
  border-left-color:rgba(142,109,44,.5) !important;
}
/* ...mais la bulle envoyée reste dorée même en thème clair : on la repose */
[data-theme="light"] body[data-surface="client"] .msg.user .voice-caption,
body[data-surface="client"][data-theme="light"] .msg.user .voice-caption,
[data-theme="light"] .bubble.is-mine .voice-caption{
  color:#1A1206 !important;
  background:rgba(255,255,255,.58) !important;
  border-left-color:rgba(120,90,30,.55) !important;
}
