/* ==========================================================================
   Stellion — couche de correspondance PROVISOIRE (refonte visuelle, étape 1)

   Les écrans pas encore refaits utilisent les anciennes variables (--bg-base,
   --text-heading, --dnd…). Elles pointent ici vers les jetons de tokens.css,
   pour que toute l'app passe d'un coup sur la nouvelle palette, les nouvelles
   polices et les deux thèmes noir / blanc.

   Ce fichier ne contient AUCUNE valeur propre, sauf --accent-rgb (voir plus bas).
   Il disparaît à l'étape de nettoyage, quand plus aucun écran ne s'en sert.
   ========================================================================== */

:root {
  /* Fonds */
  --bg-darker: var(--bg);
  --bg-darkest: var(--bg);
  --bg-base: var(--bg);
  --bg-main: var(--bg);
  --bg-primary: var(--bg);
  --bg-dark: var(--surface);
  --bg-surface: var(--surface);
  --bg-panel: var(--surface);
  --bg-card: var(--surface);
  --bg-2: var(--surface);
  --bg-elevated: var(--surface-2);
  --bg-hover: var(--surface-2);
  --bg-input: var(--surface-2);
  --bg-3: var(--surface-2);
  --glass-bg: var(--surface);
  --glass-border: var(--border);

  /* Textes : l'ancien « texte discret » (2,4:1) est remonté au niveau --text-muted (AA) */
  --text-heading: var(--text);
  --text-main: var(--text);
  --text-normal: var(--text);
  --text-primary: var(--text);
  --text-secondary: var(--text-muted);
  --text-subtle: var(--text-muted);

  /* Vert : un seul vert, celui de tokens.css */
  --accent-light: var(--accent);
  --accent-hover: var(--accent);
  --accent-dim: var(--accent-soft);
  --accent-glass: var(--accent-soft);
  --accent-glow: var(--accent-soft);
  /* L'ambre n'existe plus dans la nouvelle identité */
  --accent2: var(--accent);
  --accent2-glass: var(--accent-soft);

  /* États */
  --dnd: var(--danger);
  --warning: var(--danger);
  --idle: var(--text-muted);
  --like-active: var(--like);

  /* Ombres : seulement pour ce qui flotte */
  --shadow-sm: none;
  --shadow-md: var(--shadow-float);
  --shadow-lg: var(--shadow-menu);

  /* Arrondis : --radius-sm/md/lg existent déjà dans tokens.css (10, 12, 14 px) */
  --radius: var(--radius-md);

  /* Polices : une police d'interface, une à chasse fixe */
  --font-heading: var(--font-sans);
  --font-body: var(--font-sans);
  --font-feed: var(--font-sans);

  /* Bulles de messages privés */
  --bubble-sent-bg: var(--bubble-mine);
  --bubble-sent-text: var(--on-bubble-mine);
  --bubble-received-bg: var(--bubble-theirs);
  --bubble-received-text: var(--text);
  --bubble-timestamp: var(--text-muted);

  /* Seule valeur propre : composantes RVB du vert, pour les anciens rgba(var(--accent-rgb), …)
     des sondages. Mêmes couleurs que --accent dans tokens.css. Disparaît avec le sondage unique. */
  --accent-rgb: 63, 213, 131;
}

:root[data-theme="blanc"] {
  --accent-rgb: 18, 112, 63;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --accent-rgb: 18, 112, 63;
  }
}
