/* ═══════════════════════════════════════════════════════════
   THÈMES

   Ce fichier est chargé APRÈS forge.css sur toutes les pages, et
   forge.css fournit le repli (`:root` = cendre). Un thème n'est donc
   qu'un jeu de variables : pas une feuille à part entière.

   Pourquoi un fichier unique plutôt qu'un thème par page : un
   thème appliqué à une seule page n'est pas un thème. Celui qu'on
   choisit dans le chat doit tenir dans le profil, le classement,
   les badges — sans quoi on change d'ambiance en changeant d'onglet.

   Chaque thème redéfinit UNIQUEMENT les couleurs. Les rayons, les
   polices et les transitions restent celles de forge.css : les
   redéfinir ici ferait diverger les deux fichiers pour rien.
   ════════════════════════════════════════════════════════════ */

/* ── Cendre — le défaut, forge orange ───────────────────── */
[data-theme="cendre"] {
  --bg: #0b0703;
  --bg2: #150d05;
  --panel: #150d05;
  --panel2: #201408;
  --ink: #f6efe3;
  --text: #f6efe3;
  --muted: #b09a83;
  --accent: #ff7a1a;
  --accent2: #ffb054;
  --accent-glow: rgba(255, 122, 26, .35);
  --amber: #ffc75e;
  --ok: #7ed957;
  --err: #ff5c4d;
  --warn: #ffc75e;
  --danger: #ff5c4d;
  --border: rgba(255, 148, 43, .18);
  --border2: rgba(255, 148, 43, .32);
  --hover: rgba(255, 148, 43, .09);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .65);
  --landing-glow: rgba(255, 122, 26, .18);
  --landing-glow2: rgba(255, 199, 94, .10);
  --hint-code: #ffc75e;
  --toast-bg: #150d05;
  --bubble: #1d1207;
  --bubble-border: rgba(255, 148, 43, .14);
  --bubble-mine: #2e1a08;
  --bubble-bob: linear-gradient(145deg, rgba(255, 122, 26, .18), rgba(255, 199, 94, .07));
  --composer-bg: #1d1207;
  --grad: linear-gradient(120deg, #ff5e1a 0%, #ff9426 55%, #ffc75e 120%);
  --grad-soft: linear-gradient(120deg, rgba(255,126,26,.16), rgba(255,199,94,.10));
  --bevel-dark: rgba(20, 8, 0, .38);
  --bevel-light: rgba(255, 255, 255, .28);
}

/* ── AMOLED — noir profond, braises rouges ─────────────── */
[data-theme="amoled"] {
  --bg: #060301;
  --bg2: #120802;
  --panel: #120802;
  --panel2: #1d0f04;
  --ink: #f6efe3;
  --text: #f6efe3;
  --muted: #b09a83;
  --accent: #ff5a1f;
  --accent2: #ffb054;
  --accent-glow: rgba(255, 90, 31, .35);
  --amber: #ffd166;
  --ok: #7ed957;
  --err: #ff5c4d;
  --warn: #ffd166;
  --danger: #ff5c4d;
  --border: rgba(255, 90, 31, .2);
  --border2: rgba(255, 90, 31, .36);
  --hover: rgba(255, 90, 31, .1);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .8);
  --landing-glow: rgba(255, 61, 31, .18);
  --landing-glow2: rgba(255, 209, 102, .12);
  --hint-code: #ffd166;
  --toast-bg: #120802;
  --bubble: #1a0d04;
  --bubble-border: rgba(255, 90, 31, .16);
  --bubble-mine: #341505;
  --bubble-bob: linear-gradient(145deg, rgba(255,61,31,.2), rgba(255,209,102,.08));
  --composer-bg: #1a0d04;
  --grad: linear-gradient(120deg, #ff3d1f 0%, #ff8a1f 55%, #ffd166 120%);
  --grad-soft: linear-gradient(120deg, rgba(255,61,31,.2), rgba(255,209,102,.12));
  --bevel-dark: rgba(10, 4, 0, .5);
  --bevel-light: rgba(255, 255, 255, .22);
}

/* ── Flashbang — clair, papier chaud ───────────────────── */
[data-theme="flashbang"] {
  --bg: #fdf6ec;
  --bg2: #f5e8d6;
  --panel: #fffaf2;
  --panel2: #f7ead6;
  --ink: #2b1a08;
  --text: #2b1a08;
  --muted: #8a6a48;
  --accent: #e05a00;
  --accent2: #b34800;
  --accent-glow: rgba(224, 90, 0, .22);
  --amber: #b34800;
  --ok: #2f8a34;
  --err: #c62f1f;
  --warn: #a36a00;
  --danger: #c62f1f;
  --border: rgba(120, 72, 20, .2);
  --border2: rgba(120, 72, 20, .36);
  --hover: rgba(224, 90, 0, .08);
  --shadow: 0 22px 50px -24px rgba(80, 40, 0, .4);
  --landing-glow: rgba(224, 90, 0, .12);
  --landing-glow2: rgba(200, 120, 20, .1);
  --hint-code: #b34800;
  --toast-bg: #fffaf2;
  --bubble: #fffaf2;
  --bubble-border: rgba(120, 72, 20, .18);
  --bubble-mine: #f7e3c8;
  --bubble-bob: linear-gradient(145deg, rgba(224,90,0,.12), rgba(200,120,20,.07));
  --composer-bg: #fffaf2;
  --grad: linear-gradient(120deg, #e05a00 0%, #ef8010 55%, #d99a20 120%);
  --grad-soft: linear-gradient(120deg, rgba(224,90,0,.12), rgba(200,120,20,.08));
  --bevel-dark: rgba(90, 50, 10, .22);
  --bevel-light: rgba(255, 255, 255, .7);
}

/* ── Gris clair — gris chaud, peu coloré ───────────────── */
[data-theme="gris-clair"] {
  --bg: #1a140e;
  --bg2: #241a12;
  --panel: #241a12;
  --panel2: #2f2318;
  --ink: #f2e9dc;
  --text: #f2e9dc;
  --muted: #a99684;
  --accent: #e08a3c;
  --accent2: #f0ad6a;
  --accent-glow: rgba(224, 138, 60, .28);
  --amber: #f0c088;
  --ok: #7ed957;
  --err: #ff5c4d;
  --warn: #f0c088;
  --danger: #ff5c4d;
  --border: rgba(224, 138, 60, .18);
  --border2: rgba(224, 138, 60, .3);
  --hover: rgba(224, 138, 60, .08);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .6);
  --landing-glow: rgba(224, 138, 60, .12);
  --landing-glow2: rgba(240, 173, 106, .08);
  --hint-code: #f0c088;
  --toast-bg: #241a12;
  --bubble: #2a1f15;
  --bubble-border: rgba(224, 138, 60, .14);
  --bubble-mine: #3a2a1a;
  --bubble-bob: linear-gradient(145deg, rgba(224,138,60,.14), rgba(240,173,106,.06));
  --composer-bg: #2a1f15;
  --grad: linear-gradient(120deg, #c9712a 0%, #e08a3c 55%, #f0c088 120%);
  --grad-soft: linear-gradient(120deg, rgba(224,138,60,.14), rgba(240,173,106,.07));
  --bevel-dark: rgba(20, 12, 4, .4);
  --bevel-light: rgba(255, 255, 255, .24);
}

/* ── Nuit — bleu profond, la nuit calme ────────────────── */
[data-theme="nuit"] {
  --bg: #0a0e1a;
  --bg2: #111726;
  --panel: #111726;
  --panel2: #1a2233;
  --ink: #e4ebf7;
  --text: #e4ebf7;
  --muted: #8b9ab5;
  --accent: #5b8cff;
  --accent2: #8ab0ff;
  --accent-glow: rgba(91, 140, 255, .35);
  --amber: #7fb0ff;
  --ok: #4ade80;
  --err: #f87171;
  --warn: #fbbf24;
  --danger: #f87171;
  --border: rgba(91, 140, 255, .2);
  --border2: rgba(91, 140, 255, .36);
  --hover: rgba(91, 140, 255, .1);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .7);
  --landing-glow: rgba(91, 140, 255, .18);
  --landing-glow2: rgba(138, 176, 255, .1);
  --hint-code: #7fb0ff;
  --toast-bg: #111726;
  --bubble: #162034;
  --bubble-border: rgba(91, 140, 255, .16);
  --bubble-mine: #1e2c47;
  --bubble-bob: linear-gradient(145deg, rgba(91,140,255,.18), rgba(138,176,255,.07));
  --composer-bg: #162034;
  --grad: linear-gradient(120deg, #3b6fe0 0%, #5b8cff 55%, #a5c4ff 120%);
  --grad-soft: linear-gradient(120deg, rgba(91,140,255,.16), rgba(138,176,255,.09));
  --bevel-dark: rgba(2, 6, 18, .45);
  --bevel-light: rgba(255, 255, 255, .24);
}

/* ── Forêt — vert sombre, feuillage ────────────────────── */
[data-theme="foret"] {
  --bg: #071410;
  --bg2: #0d2019;
  --panel: #0d2019;
  --panel2: #142c22;
  --ink: #e6f2ea;
  --text: #e6f2ea;
  --muted: #8fb09c;
  --accent: #34d399;
  --accent2: #6ee7b7;
  --accent-glow: rgba(52, 211, 153, .32);
  --amber: #a3e635;
  --ok: #4ade80;
  --err: #f87171;
  --warn: #fbbf24;
  --danger: #f87171;
  --border: rgba(52, 211, 153, .2);
  --border2: rgba(52, 211, 153, .36);
  --hover: rgba(52, 211, 153, .1);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .65);
  --landing-glow: rgba(52, 211, 153, .16);
  --landing-glow2: rgba(167, 243, 208, .1);
  --hint-code: #6ee7b7;
  --toast-bg: #0d2019;
  --bubble: #12281f;
  --bubble-border: rgba(52, 211, 153, .16);
  --bubble-mine: #1a3a2c;
  --bubble-bob: linear-gradient(145deg, rgba(52,211,153,.18), rgba(110,231,183,.07));
  --composer-bg: #12281f;
  --grad: linear-gradient(120deg, #059669 0%, #34d399 55%, #a3e635 120%);
  --grad-soft: linear-gradient(120deg, rgba(52,211,153,.16), rgba(110,231,183,.09));
  --bevel-dark: rgba(2, 14, 10, .45);
  --bevel-light: rgba(255, 255, 255, .24);
}

/* ── Rose — prune sombre, chaud ─────────────────────────── */
[data-theme="rose"] {
  --bg: #170a14;
  --bg2: #211020;
  --panel: #211020;
  --panel2: #2e182c;
  --ink: #f7e7f2;
  --text: #f7e7f2;
  --muted: #b894ab;
  --accent: #f472b6;
  --accent2: #f9a8d4;
  --accent-glow: rgba(244, 114, 182, .32);
  --amber: #fbbf24;
  --ok: #4ade80;
  --err: #fb7185;
  --warn: #fbbf24;
  --danger: #fb7185;
  --border: rgba(244, 114, 182, .22);
  --border2: rgba(244, 114, 182, .38);
  --hover: rgba(244, 114, 182, .1);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .68);
  --landing-glow: rgba(244, 114, 182, .16);
  --landing-glow2: rgba(249, 168, 212, .1);
  --hint-code: #f9a8d4;
  --toast-bg: #211020;
  --bubble: #2a1428;
  --bubble-border: rgba(244, 114, 182, .16);
  --bubble-mine: #3d1c39;
  --bubble-bob: linear-gradient(145deg, rgba(244,114,182,.18), rgba(249,168,212,.07));
  --composer-bg: #2a1428;
  --grad: linear-gradient(120deg, #db2777 0%, #f472b6 55%, #c4b5fd 120%);
  --grad-soft: linear-gradient(120deg, rgba(244,114,182,.16), rgba(196,181,253,.09));
  --bevel-dark: rgba(18, 4, 14, .45);
  --bevel-light: rgba(255, 255, 255, .24);
}

/* ── Menthe — turquoise, frais ─────────────────────────── */
[data-theme="menthe"] {
  --bg: #04161a;
  --bg2: #082227;
  --panel: #082227;
  --panel2: #0d3037;
  --ink: #e2f5f7;
  --text: #e2f5f7;
  --muted: #85b3bb;
  --accent: #2dd4bf;
  --accent2: #7ff0e2;
  --accent-glow: rgba(45, 212, 191, .32);
  --amber: #facc15;
  --ok: #4ade80;
  --err: #fb7185;
  --warn: #facc15;
  --danger: #fb7185;
  --border: rgba(45, 212, 191, .2);
  --border2: rgba(45, 212, 191, .36);
  --hover: rgba(45, 212, 191, .1);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .68);
  --landing-glow: rgba(45, 212, 191, .16);
  --landing-glow2: rgba(127, 240, 226, .1);
  --hint-code: #7ff0e2;
  --toast-bg: #082227;
  --bubble: #0c2a30;
  --bubble-border: rgba(45, 212, 191, .16);
  --bubble-mine: #124048;
  --bubble-bob: linear-gradient(145deg, rgba(45,212,191,.18), rgba(127,240,226,.07));
  --composer-bg: #0c2a30;
  --grad: linear-gradient(120deg, #0d9488 0%, #2dd4bf 55%, #a7f3d0 120%);
  --grad-soft: linear-gradient(120deg, rgba(45,212,191,.16), rgba(167,243,208,.09));
  --bevel-dark: rgba(0, 10, 14, .45);
  --bevel-light: rgba(255, 255, 255, .24);
}

/* ── Ocre — clair, parchemin ───────────────────────────── */
[data-theme="ocre"] {
  --bg: #faf3e3;
  --bg2: #f0e4cc;
  --panel: #fffdf7;
  --panel2: #f4e9d2;
  --ink: #3a2a10;
  --text: #3a2a10;
  --muted: #8a7550;
  --accent: #b57e00;
  --accent2: #8a5f00;
  --accent-glow: rgba(181, 126, 0, .2);
  --amber: #8a5f00;
  --ok: #3f7a2e;
  --err: #b3352a;
  --warn: #8a5f00;
  --danger: #b3352a;
  --border: rgba(138, 95, 0, .22);
  --border2: rgba(138, 95, 0, .4);
  --hover: rgba(181, 126, 0, .09);
  --shadow: 0 22px 50px -24px rgba(90, 65, 15, .35);
  --landing-glow: rgba(181, 126, 0, .1);
  --landing-glow2: rgba(138, 95, 0, .08);
  --hint-code: #8a5f00;
  --toast-bg: #fffdf7;
  --bubble: #fffdf7;
  --bubble-border: rgba(138, 95, 0, .2);
  --bubble-mine: #f0e2c4;
  --bubble-bob: linear-gradient(145deg, rgba(181,126,0,.1), rgba(138,95,0,.06));
  --composer-bg: #fffdf7;
  --grad: linear-gradient(120deg, #a87300 0%, #c99400 55%, #8a5f00 120%);
  --grad-soft: linear-gradient(120deg, rgba(181,126,0,.12), rgba(138,95,0,.07));
  --bevel-dark: rgba(120, 90, 20, .2);
  --bevel-light: rgba(255, 255, 255, .75);
}

/* ── Lilas — clair, violet doux ────────────────────────── */
[data-theme="lilas"] {
  --bg: #f6f4fc;
  --bg2: #eae5f8;
  --panel: #fdfcff;
  --panel2: #efeafb;
  --ink: #241a3d;
  --text: #241a3d;
  --muted: #6f6390;
  --accent: #7c4dff;
  --accent2: #5b32cc;
  --accent-glow: rgba(124, 77, 255, .2);
  --amber: #5b32cc;
  --ok: #2f8a34;
  --err: #c62f1f;
  --warn: #a36a00;
  --danger: #c62f1f;
  --border: rgba(91, 50, 204, .2);
  --border2: rgba(91, 50, 204, .34);
  --hover: rgba(124, 77, 255, .08);
  --shadow: 0 22px 50px -24px rgba(50, 25, 110, .3);
  --landing-glow: rgba(124, 77, 255, .12);
  --landing-glow2: rgba(124, 77, 255, .07);
  --hint-code: #5b32cc;
  --toast-bg: #fdfcff;
  --bubble: #fdfcff;
  --bubble-border: rgba(91, 50, 204, .18);
  --bubble-mine: #e6ddfb;
  --bubble-bob: linear-gradient(145deg, rgba(124,77,255,.1), rgba(91,50,204,.06));
  --composer-bg: #fdfcff;
  --grad: linear-gradient(120deg, #5b32cc 0%, #7c4dff 55%, #c4b5fd 120%);
  --grad-soft: linear-gradient(120deg, rgba(124,77,255,.12), rgba(196,181,253,.07));
  --bevel-dark: rgba(70, 45, 140, .18);
  --bevel-light: rgba(255, 255, 255, .8);
}

/* ── Aube — clair, bleu ciel ────────────────────────────── */
[data-theme="aube"] {
  --bg: #f2f7fc;
  --bg2: #e2ecf7;
  --panel: #fbfdff;
  --panel2: #e9f1fa;
  --ink: #12212f;
  --text: #12212f;
  --muted: #5f7385;
  --accent: #0b78d1;
  --accent2: #075a9e;
  --accent-glow: rgba(11, 120, 209, .18);
  --amber: #075a9e;
  --ok: #1f7a3d;
  --err: #c0392b;
  --warn: #a86a00;
  --danger: #c0392b;
  --border: rgba(11, 120, 209, .2);
  --border2: rgba(11, 120, 209, .34);
  --hover: rgba(11, 120, 209, .07);
  --shadow: 0 22px 50px -24px rgba(20, 60, 100, .28);
  --landing-glow: rgba(11, 120, 209, .1);
  --landing-glow2: rgba(11, 120, 209, .06);
  --hint-code: #075a9e;
  --toast-bg: #fbfdff;
  --bubble: #fbfdff;
  --bubble-border: rgba(11, 120, 209, .18);
  --bubble-mine: #dbe9f7;
  --bubble-bob: linear-gradient(145deg, rgba(11,120,209,.09), rgba(11,120,209,.05));
  --composer-bg: #fbfdff;
  --grad: linear-gradient(120deg, #075a9e 0%, #0b78d1 55%, #7cc4f5 120%);
  --grad-soft: linear-gradient(120deg, rgba(11,120,209,.12), rgba(124,196,245,.07));
  --bevel-dark: rgba(20, 60, 100, .16);
  --bevel-light: rgba(255, 255, 255, .85);
}

/* ── Ardoise — gris neutre, sans couleur ───────────────── */
[data-theme="ardoise"] {
  --bg: #16181c;
  --bg2: #1e2126;
  --panel: #1e2126;
  --panel2: #282c33;
  --ink: #e6e8eb;
  --text: #e6e8eb;
  --muted: #969ba5;
  --accent: #9aa4b2;
  --accent2: #c3cad4;
  --accent-glow: rgba(154, 164, 178, .25);
  --amber: #c3cad4;
  --ok: #7ed957;
  --err: #ff5c4d;
  --warn: #ffc75e;
  --danger: #ff5c4d;
  --border: rgba(255, 255, 255, .1);
  --border2: rgba(255, 255, 255, .2);
  --hover: rgba(255, 255, 255, .06);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .6);
  --landing-glow: rgba(255, 255, 255, .05);
  --landing-glow2: rgba(255, 255, 255, .03);
  --hint-code: #c3cad4;
  --toast-bg: #1e2126;
  --bubble: #24272d;
  --bubble-border: rgba(255, 255, 255, .1);
  --bubble-mine: #33373f;
  --bubble-bob: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  --composer-bg: #24272d;
  --grad: linear-gradient(120deg, #6b7280 0%, #9aa4b2 55%, #d1d5db 120%);
  --grad-soft: linear-gradient(120deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  --bevel-dark: rgba(0, 0, 0, .4);
  --bevel-light: rgba(255, 255, 255, .2);
}

/* ── Contraste — noir et blanc francs ───────────────────
   Accessibilité : contrastes poussés, bordures visibles partout,
   aucune couleur qui porte seule du sens. */
[data-theme="contraste"] {
  --bg: #000000;
  --bg2: #000000;
  --panel: #000000;
  --panel2: #0d0d0d;
  --ink: #ffffff;
  --text: #ffffff;
  --muted: #d4d4d4;
  --accent: #ffdd00;
  --accent2: #ffdd00;
  --accent-glow: rgba(255, 221, 0, .4);
  --amber: #ffdd00;
  --ok: #00e676;
  --err: #ff5252;
  --warn: #ffdd00;
  --danger: #ff5252;
  --border: rgba(255, 255, 255, .55);
  --border2: rgba(255, 255, 255, .8);
  --hover: rgba(255, 255, 255, .16);
  --shadow: 0 0 0 2px rgba(255, 255, 255, .35);
  --landing-glow: rgba(255, 221, 0, .12);
  --landing-glow2: rgba(255, 255, 255, .06);
  --hint-code: #ffdd00;
  --toast-bg: #000000;
  --bubble: #000000;
  --bubble-border: rgba(255, 255, 255, .55);
  --bubble-mine: #1a1a1a;
  --bubble-bob: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
  --composer-bg: #000000;
  --grad: linear-gradient(120deg, #ffdd00 0%, #ffffff 55%, #ffdd00 120%);
  --grad-soft: linear-gradient(120deg, rgba(255,221,0,.16), rgba(255,255,255,.06));
  --bevel-dark: rgba(0, 0, 0, .6);
  --bevel-light: rgba(255, 255, 255, .35);
}

/* ── Or — sombre, doré, solennel ────────────────────────── */
[data-theme="or"] {
  --bg: #0d0b06;
  --bg2: #16130a;
  --panel: #16130a;
  --panel2: #211c0f;
  --ink: #f4ecdc;
  --text: #f4ecdc;
  --muted: #b3a487;
  --accent: #d4af37;
  --accent2: #f0d675;
  --accent-glow: rgba(212, 175, 55, .35);
  --amber: #f0d675;
  --ok: #8fbf4d;
  --err: #e05252;
  --warn: #f0d675;
  --danger: #e05252;
  --border: rgba(212, 175, 55, .22);
  --border2: rgba(212, 175, 55, .4);
  --hover: rgba(212, 175, 55, .1);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .7);
  --landing-glow: rgba(212, 175, 55, .16);
  --landing-glow2: rgba(240, 214, 117, .1);
  --hint-code: #f0d675;
  --toast-bg: #16130a;
  --bubble: #1e1a0f;
  --bubble-border: rgba(212, 175, 55, .18);
  --bubble-mine: #2c2616;
  --bubble-bob: linear-gradient(145deg, rgba(212,175,55,.18), rgba(240,214,117,.07));
  --composer-bg: #1e1a0f;
  --grad: linear-gradient(120deg, #a8862a 0%, #d4af37 55%, #f4e3a1 120%);
  --grad-soft: linear-gradient(120deg, rgba(212,175,55,.16), rgba(240,214,117,.09));
  --bevel-dark: rgba(8, 6, 0, .45);
  --bevel-light: rgba(255, 255, 255, .26);
}
