/*
 * Couleurs d'O'jolie (charte) :
 *   Ivoire lumineux #FFFDF7 (fond principal) · Beige crème #F8EBD3 (fonds secondaires) · Pêche doux #F8C2A7 (dégradés, accents)
 *   Corail poudré #F29A8B (boutons, détails) · Rose nude #D96F7F (petits accents) · Framboise #A92F57 (titres, éléments importants)
 *   Or doux #D7AA67 (bordures, icônes, ornements)
 * Texte des boutons corail en framboise très foncée : lisible (contraste suffisant), le blanc ne l'est pas sur ce corail.
 * Clair par défaut ; sombre selon le système ou le bouton « Thème » (attribut data-theme sur <html>).
 */
:root {
  color-scheme: light;
  --ivory: #fffdf7;
  --cream: #f8ebd3;
  --peach: #f8c2a7;
  --coral: #f29a8b;
  --nude: #d96f7f;
  --raspberry: #a92f57;
  --gold: #d7aa67;

  --bg: var(--ivory);
  --surface: #ffffff;
  --surface-2: #fffaf1;
  --surface-3: #fbf1e1;
  --text: #3a2229;
  --muted: #7a5f66;
  --subtle: #a08a8f;
  --border: #f0e2c9;
  --border-strong: #e3c99c;
  --title: var(--raspberry);
  --brand: var(--coral);
  --brand-hover: #ec8676;
  --brand-soft: #fde9e1;
  --brand-text: #8e2549;
  --on-brand: #3d1424;
  --accent: var(--gold);
  --accent-soft: #f8ecd6;
  --accent-text: #7d5a1e;
  --ok: #3f8f5f;
  --ok-soft: #e3f3e8;
  --ok-text: #2c6b45;
  --danger: #c0392b;
  --danger-soft: #fbe3df;
  --danger-text: #a12a1e;
  --violet-soft: #f7e1e6;
  --violet-text: #a92f57;
  --warn-bg: #fdf4e3;
  --warn-border: #e3c99c;
  --warn-text: #6e4c14;
  --sidebar-bg: var(--cream);
  --sidebar-active: #fde2d6;
  --note-bg: #fffaf1;
  --scrollbar: #e3c99c;
  /* Graphique recettes / dépenses : paire validée (daltonisme, contraste) en clair et en sombre. */
  --series-in: #b23a62;
  --series-out: #d2a45c;
  --hero-from: var(--peach);
  --hero-to: var(--coral);
  --shadow-sm: 0 1px 2px rgb(169 47 87 / 0.05);
  --shadow: 0 2px 6px rgb(169 47 87 / 0.07), 0 1px 2px rgb(169 47 87 / 0.04);
  --shadow-lg: 0 18px 44px rgb(90 30 50 / 0.16), 0 2px 6px rgb(90 30 50 / 0.06);
  --radius: 14px;
  --radius-sm: 9px;
  --focus: 0 0 0 3px rgb(242 154 139 / 0.5);
  --ease: 0.15s ease;
  --font-title: 'Cormorant Garamond', 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-family: 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #1c1316;
    --surface: #251a1e;
    --surface-2: #2b1f23;
    --surface-3: #35262b;
    --text: #f6e9e3;
    --muted: #c9aeb3;
    --subtle: #9a8085;
    --border: #3f2e33;
    --border-strong: #6b5338;
    --title: #f2a3b6;
    --brand: var(--coral);
    --brand-hover: var(--peach);
    --brand-soft: #4a2a2c;
    --brand-text: #fbc9bd;
    --on-brand: #3d1424;
    --accent-soft: #3d3020;
    --accent-text: #e9c88f;
    --ok: #6fcf94;
    --ok-soft: #1b3326;
    --ok-text: #9fe0b7;
    --danger: #f08070;
    --danger-soft: #3f1c1a;
    --danger-text: #f7a99d;
    --violet-soft: #48222f;
    --violet-text: #f2a3b6;
    --warn-bg: #33281a;
    --warn-border: #6b5338;
    --warn-text: #f0d7a8;
    --sidebar-bg: #221719;
    --sidebar-active: #4a2a2c;
    --note-bg: #2b1f23;
    --scrollbar: #6b5338;
    --series-in: #d96585;
    --series-out: #a2742c;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow: 0 1px 3px rgb(0 0 0 / 0.35);
    --shadow-lg: 0 16px 40px rgb(0 0 0 / 0.55);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #1c1316;
  --surface: #251a1e;
  --surface-2: #2b1f23;
  --surface-3: #35262b;
  --text: #f6e9e3;
  --muted: #c9aeb3;
  --subtle: #9a8085;
  --border: #3f2e33;
  --border-strong: #6b5338;
  --title: #f2a3b6;
  --brand: var(--coral);
  --brand-hover: var(--peach);
  --brand-soft: #4a2a2c;
  --brand-text: #fbc9bd;
  --on-brand: #3d1424;
  --accent-soft: #3d3020;
  --accent-text: #e9c88f;
  --ok: #6fcf94;
  --ok-soft: #1b3326;
  --ok-text: #9fe0b7;
  --danger: #f08070;
  --danger-soft: #3f1c1a;
  --danger-text: #f7a99d;
  --violet-soft: #48222f;
  --violet-text: #f2a3b6;
  --warn-bg: #33281a;
  --warn-border: #6b5338;
  --warn-text: #f0d7a8;
  --sidebar-bg: #221719;
  --sidebar-active: #4a2a2c;
  --note-bg: #2b1f23;
  --scrollbar: #6b5338;
  --series-in: #d96585;
  --series-out: #a2742c;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow: 0 1px 3px rgb(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px rgb(0 0 0 / 0.55);
}
