/* ====================================
   Variables Communes Themes
   ==================================== */

/* Variables de base heritees du Design System principal */
:root {
    /* Ces variables seront surchargees par chaque theme */
    --theme-bg-primary: #ffffff;
    --theme-bg-secondary: #f5f5f7;
    --theme-text-primary: #1a1a1a;
    --theme-text-secondary: #6b6f80;
    --theme-border-color: #e3e4e9;
    --theme-card-bg: #ffffff;
    --theme-sidebar-bg: #1a1a2e;
    --theme-sidebar-text: #ffffff;
    --theme-accent: #705ec8;
}

/* Fix racine UX-012 : les tokens derives (campaign/tokens.css) sont declares
   au :root et referencent --theme-* qui n'est defini que sur body.theme-*.
   Resolus sur <html>, ils restent figes sur les valeurs light (#ffffff /
   #1a1a1a) et n'heritent jamais la valeur du theme actif -> cards, textes et
   bordures illisibles en dark-blue / dark-red. On redeclare ces tokens sur
   body : ils se resolvent alors la ou --theme-* porte la valeur du theme.
   Light reste identique (body.theme-light fixe les memes valeurs). */
body {
    --bg-card: var(--theme-card-bg, #ffffff);
    --text-primary: var(--theme-text-primary, #1a1a1a);
    --text-secondary: var(--theme-text-secondary, #6b6f80);
    --border: var(--theme-border-color, #e3e4e9);
    --bg-primary: var(--theme-bg-primary, #f5f5f7);
}

/* Transitions pour changement de theme fluide */
body {
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}

.theme-transition * {
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease !important;
}
