/* ============================================================ accès IA */
.row-main.static { cursor: default; }
.danger-text { color: var(--danger); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, monospace; font-size: 16px; }
.warn { margin: 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--danger) 12%, transparent); font-size: 14px; }

/* ============================================================ thèmes
   Chaque thème redéfinit les couleurs et un motif de fond discret (--pattern).
   Ce fichier est chargé après styles.css : ses règles l'emportent sur le mode sombre. */
html { background: var(--bg); }
body { background: transparent; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--pattern, none); background-size: var(--pattern-size, 120px);
}
.topbar h1::after { content: var(--deco, ""); }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.theme-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; cursor: pointer;
  border: 2px solid transparent; border-radius: 14px; background: var(--card); color: var(--text);
  font-size: 13px; font-weight: 600; text-align: center;
}
.theme-btn.active { border-color: var(--accent); }
.theme-swatch {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 22px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
  background: linear-gradient(135deg, var(--sw1) 0 50%, var(--sw2) 50% 100%);
}

/* ---- Rose fleuri */
[data-theme="rose"] {
  color-scheme: light;
  --bg: #fdeef4; --card: #ffffff; --text: #3d2230; --muted: #8e6577; --line: #f3d3e0;
  --accent: #d6457a; --accent-text: #ffffff; --accent-weak: #fbdbe7; --danger: #b8322e; --late: #c0392b;
  --shadow: 0 1px 3px rgb(214 69 122 / 0.12);
  --deco: " 🌸";
  --pattern-size: 140px;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg opacity='.5'%3E%3Cg transform='translate(30 32)' fill='%23f7a8c4'%3E%3Cellipse ry='8' rx='5' cy='-8'/%3E%3Cellipse ry='8' rx='5' cy='-8' transform='rotate(72)'/%3E%3Cellipse ry='8' rx='5' cy='-8' transform='rotate(144)'/%3E%3Cellipse ry='8' rx='5' cy='-8' transform='rotate(216)'/%3E%3Cellipse ry='8' rx='5' cy='-8' transform='rotate(288)'/%3E%3Ccircle r='4' fill='%23f6c95c'/%3E%3C/g%3E%3Cg transform='translate(104 96) scale(.7)' fill='%23e98bb0'%3E%3Cellipse ry='8' rx='5' cy='-8'/%3E%3Cellipse ry='8' rx='5' cy='-8' transform='rotate(72)'/%3E%3Cellipse ry='8' rx='5' cy='-8' transform='rotate(144)'/%3E%3Cellipse ry='8' rx='5' cy='-8' transform='rotate(216)'/%3E%3Cellipse ry='8' rx='5' cy='-8' transform='rotate(288)'/%3E%3Ccircle r='4' fill='%23fff3b0'/%3E%3C/g%3E%3Cpath d='M98 30c6-6 14-6 18 0-6 6-14 6-18 0z' fill='%23a8d5a2'/%3E%3Cpath d='M28 108c6-6 14-6 18 0-6 6-14 6-18 0z' fill='%23a8d5a2'/%3E%3Ccircle cx='70' cy='66' r='2.5' fill='%23f7a8c4'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---- Noël */
[data-theme="noel"] {
  color-scheme: dark;
  --bg: #133f2f; --card: #1b4d3a; --text: #fff8ec; --muted: #b8d3c4; --line: #2c624c;
  --accent: #ff7a80; --accent-text: #2a0d10; --accent-weak: #4a2a2c; --danger: #ff8a80; --late: #ffb4a8; --danger-bg: #b3261e;
  --shadow: 0 1px 3px rgb(0 0 0 / 0.25);
  --deco: " 🎄";
  --pattern-size: 150px;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'%3E%3Cg stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' fill='none' opacity='.22'%3E%3Cpath d='M30 18v24M18 30h24M21.5 21.5l17 17M38.5 21.5l-17 17M30 18l-3 3M30 18l3 3M30 42l-3-3M30 42l3-3'/%3E%3Cpath d='M112 96v16M104 104h16M106.3 98.3l11.4 11.4M117.7 98.3l-11.4 11.4'/%3E%3C/g%3E%3Cg fill='%23ffffff' opacity='.25'%3E%3Ccircle cx='80' cy='40' r='2'/%3E%3Ccircle cx='54' cy='120' r='2.5'/%3E%3Ccircle cx='132' cy='30' r='1.5'/%3E%3Ccircle cx='12' cy='84' r='1.5'/%3E%3C/g%3E%3Cpath d='M78 69l9 9-9 9-9-9z' fill='%23f6c95c' opacity='.35'/%3E%3Cg opacity='.4' fill='%23e8414a'%3E%3Ccircle cx='130' cy='136' r='4'/%3E%3Ccircle cx='137' cy='131' r='4'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---- Océan */
[data-theme="ocean"] {
  color-scheme: light;
  --bg: #eaf5fa; --card: #ffffff; --text: #12303d; --muted: #5d7f8d; --line: #cfe6ef;
  --accent: #1d7fa6; --accent-text: #ffffff; --accent-weak: #d3ecf5; --danger: #c0392b; --late: #c0392b;
  --shadow: 0 1px 3px rgb(29 127 166 / 0.12);
  --deco: " 🌊";
  --pattern-size: 120px 60px;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60' viewBox='0 0 120 60'%3E%3Cg fill='none' stroke='%239fd0e3' stroke-width='2' opacity='.55' stroke-linecap='round'%3E%3Cpath d='M0 20q15-10 30 0t30 0 30 0 30 0'/%3E%3Cpath d='M-15 48q15-10 30 0t30 0 30 0 30 0 30 0' opacity='.6'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---- Automne */
[data-theme="automne"] {
  color-scheme: light;
  --bg: #fbf1e4; --card: #fffaf3; --text: #3b2616; --muted: #8a6a50; --line: #efdcc4;
  --accent: #c25a1c; --accent-text: #ffffff; --accent-weak: #f6dcc6; --danger: #a8322a; --late: #b03a2e;
  --shadow: 0 1px 3px rgb(194 90 28 / 0.12);
  --deco: " 🍂";
  --pattern-size: 140px;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg opacity='.45'%3E%3Cg transform='translate(34 36) rotate(-30)'%3E%3Cpath d='M0-14C9-7 9 7 0 14-9 7-9-7 0-14z' fill='%23e2955a'/%3E%3Cpath d='M0-12v26' stroke='%23b0602a' stroke-width='1.2'/%3E%3C/g%3E%3Cg transform='translate(104 100) rotate(40) scale(.8)'%3E%3Cpath d='M0-14C9-7 9 7 0 14-9 7-9-7 0-14z' fill='%23d4a03c'/%3E%3Cpath d='M0-12v26' stroke='%239c7420' stroke-width='1.2'/%3E%3C/g%3E%3Cg transform='translate(100 30) rotate(15) scale(.6)'%3E%3Cpath d='M0-14C9-7 9 7 0 14-9 7-9-7 0-14z' fill='%23c25a1c'/%3E%3C/g%3E%3Ccircle cx='40' cy='110' r='4' fill='%238a5a33'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---- Nuit étoilée */
[data-theme="nuit"] {
  color-scheme: dark;
  --bg: #0f1533; --card: #19214a; --text: #eef0ff; --muted: #a3a9d4; --line: #2a3366;
  --accent: #f2c14e; --accent-text: #1b1a10; --accent-weak: #3a3520; --danger: #ff8a80; --late: #ffb4a8; --danger-bg: #b3261e;
  --shadow: none;
  --deco: " ✨";
  --pattern-size: 160px;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='20' cy='30' r='1.2' opacity='.6'/%3E%3Ccircle cx='70' cy='12' r='.8' opacity='.5'/%3E%3Ccircle cx='130' cy='50' r='1.4' opacity='.6'/%3E%3Ccircle cx='96' cy='96' r='.9' opacity='.5'/%3E%3Ccircle cx='40' cy='130' r='1.1' opacity='.55'/%3E%3Ccircle cx='146' cy='140' r='.8' opacity='.45'/%3E%3C/g%3E%3Cpath d='M58 72l2 6 6 2-6 2-2 6-2-6-6-2 6-2z' fill='%23f2c14e' opacity='.45'/%3E%3Cpath d='M120 118l1.5 4 4 1.5-4 1.5-1.5 4-1.5-4-4-1.5 4-1.5z' fill='%23f2c14e' opacity='.35'/%3E%3C/svg%3E");
}
