/* =============================================================
   themes.css — Les couleurs des trois thèmes
   -------------------------------------------------------------
   Chaque thème est une liste de « variables » de couleur
   (des noms comme --color-text). Le reste du design utilise
   ces noms : changer de thème = changer les valeurs ici.

   Tous les contrastes texte/fond respectent la norme WCAG AA
   (au moins 4,5 pour 1 pour le texte).
   ============================================================= */

/* ---------- Thème « Omni-système » (thème par défaut) ----------
   Fond sombre, accents violets lumineux, comme l'anneau du logo. */
:root,
[data-theme="omni"] {
  color-scheme: dark;
  --color-bg: #110e18;            /* fond général */
  --color-surface: #1b1726;       /* barre du haut, cartes */
  --color-surface-2: #241f33;     /* boutons, champs */
  --color-paper: #1d1929;         /* les pages de l'agenda */
  --color-paper-edge: #2c2540;    /* bord des pages, reliure */
  --color-text: #ece8f6;          /* texte principal */
  --color-text-muted: #b4aac9;    /* texte secondaire */
  --color-border: #3a3150;        /* séparations discrètes */
  --color-border-strong: #7a6a9e; /* contours des boutons et champs */
  --color-accent: #b18cff;        /* violet lumineux */
  --color-on-accent: #140d24;     /* texte posé sur le violet */
  --color-accent-soft: rgba(177, 140, 255, 0.14);
  --color-focus: #d2bbff;         /* contour de l'élément actif au clavier */
  --color-danger: #ff8f9e;
  --glow: 0 0 0 1px rgba(177, 140, 255, 0.35), 0 0 14px rgba(177, 140, 255, 0.25);
  --logo-glow: drop-shadow(0 0 6px rgba(177, 140, 255, 0.5));
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  /* Papier : texture discrète (grain clair) et ombre près de la reliure. */
  --paper-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --page-fold: rgba(0, 0, 0, 0.35);
  /* Surlignages : fond doux + trait plus marqué (visible même sans distinguer les couleurs). */
  --hl-jaune: #5a4b1e;
  --hl-jaune-edge: #c9a43f;
  --hl-vert: #1f4d38;
  --hl-vert-edge: #56ad84;
  --hl-bleu: #20426a;
  --hl-bleu-edge: #6a9edb;
  --hl-rose: #5c2849;
  --hl-rose-edge: #cf7aab;
}

/* ---------- Thème « Sombre » ----------
   Gris foncés neutres, accent bleu doux. */
[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #17181b;
  --color-surface: #202226;
  --color-surface-2: #2a2d32;
  --color-paper: #25262b;
  --color-paper-edge: #303238;
  --color-text: #e6e4df;
  --color-text-muted: #aaa7a0;
  --color-border: #3b3e45;
  --color-border-strong: #767a83;
  --color-accent: #8cb4e0;
  --color-on-accent: #10161d;
  --color-accent-soft: rgba(140, 180, 224, 0.14);
  --color-focus: #b9d4f2;
  --color-danger: #f09a9a;
  --glow: none;
  --logo-glow: none;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  --paper-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --page-fold: rgba(0, 0, 0, 0.3);
  --hl-jaune: #5a4b1e;
  --hl-jaune-edge: #c9a43f;
  --hl-vert: #1f4d38;
  --hl-vert-edge: #56ad84;
  --hl-bleu: #20426a;
  --hl-bleu-edge: #6a9edb;
  --hl-rose: #5c2849;
  --hl-rose-edge: #cf7aab;
}

/* ---------- Thème « Clair » ----------
   Tons crème et beige plutôt que blanc pur, pour ne pas éblouir. */
[data-theme="light"] {
  color-scheme: light;
  --color-bg: #e4dfd5;
  --color-surface: #efebe3;
  --color-surface-2: #e7e2d8;
  --color-paper: #f6f2e9;
  --color-paper-edge: #ddd5c6;
  --color-text: #2a2621;
  --color-text-muted: #5a5349;
  --color-border: #c9c0b0;
  --color-border-strong: #7d725f;
  --color-accent: #355f80;
  --color-on-accent: #ffffff;
  --color-accent-soft: rgba(53, 95, 128, 0.12);
  --color-focus: #2f5878;
  --color-danger: #a33a3a;
  --glow: none;
  --logo-glow: none;
  --shadow: 0 6px 20px rgba(60, 50, 35, 0.18);
  /* Papier crème : grain brun très léger. */
  --paper-texture: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.27 0 0 0 0 0.15 0 0 0 0.12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --page-fold: rgba(90, 70, 40, 0.16);
  --hl-jaune: #f3dc8a;
  --hl-jaune-edge: #8a6a12;
  --hl-vert: #cce6bd;
  --hl-vert-edge: #3d7a2e;
  --hl-bleu: #c6dcf3;
  --hl-bleu-edge: #2f6aa8;
  --hl-rose: #f2cadb;
  --hl-rose-edge: #a2457a;
}
