/* Kopilot QG — themes partages (Vert / Sombre / Clair).
   A charger APRES le <style> de la page. La page garde son :root (vert par defaut) ;
   ici on ajoute seulement les overrides Sombre/Clair + le switcher flottant.
   Les tokens sont ceux du tool-template (charte) : --night --panel --panel-2 --line
   --ivory --moss --stone --gold --gold-bright --brass --jungle --ok --warn --bad. */

:root[data-theme="dark"]{
  --night:#0B0C0D; --panel:#141517; --panel-2:#1C1E21; --line:rgba(214,185,140,.13);
  --ivory:#F1EFEB; --moss:rgba(241,239,235,.60); --stone:rgba(241,239,235,.38);
  --gold:#B99154; --gold-bright:#F0C36D; --brass:#CBB89A;
  --jungle:#2E5C46; --ok:#86B79B; --warn:#E0B562; --bad:#E0908A;
  --head-bg:rgba(11,12,13,.92);
}
:root[data-theme="light"]{
  --night:#F1EEE6; --panel:#FFFFFF; --panel-2:#F6F3EB; --line:rgba(28,40,33,.14);
  --ivory:#1B2620; --moss:rgba(27,38,32,.66); --stone:rgba(27,38,32,.46);
  --gold:#8A6220; --gold-bright:#956711; --brass:#77653F;
  --jungle:#2E7D53; --ok:#2E7D53; --warn:#956711; --bad:#C0564E;
  --head-bg:rgba(241,238,230,.9);
}
/* header : les pages ont un fond code en dur (rgba(10,33,26,.92)). On le rebranche
   sur --head-bg hors mode vert pour que Sombre/Clair suivent. */
:root[data-theme="dark"] header,
:root[data-theme="light"] header{ background:var(--head-bg) !important }
/* boutons pleins (fond jungle) : garder un label clair meme en mode Clair */
:root[data-theme="light"] .btn,
:root[data-theme="light"] .btn.log,
:root[data-theme="light"] .form button,
:root[data-theme="light"] .langs button.on,
:root[data-theme="light"] .langtog button.on,
:root[data-theme="light"] .step.done .tk{ color:#F7F3EC !important }
/* fondu doux au changement de theme */
:root[data-theme] body{ transition:background .4s cubic-bezier(.16,1,.3,1),color .4s cubic-bezier(.16,1,.3,1) }

/* switcher flottant (auto-injecte par hq-theme.js) — couleurs fixes, lisible sur tout theme */
.hqtheme{position:fixed;right:14px;bottom:14px;z-index:9999;display:flex;gap:2px;padding:3px;border-radius:999px;background:rgba(16,18,20,.82);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border:1px solid rgba(214,185,140,.28);box-shadow:0 10px 26px -12px rgba(0,0,0,.7)}
.hqtheme button{width:26px;height:26px;border:none;border-radius:50%;background:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0;transition:transform .2s cubic-bezier(.16,1,.3,1)}
.hqtheme button:hover{transform:translateY(-1px)}
.hqt-dot{width:15px;height:15px;border-radius:50%;border:1px solid rgba(255,255,255,.22)}
.hqt-dot.green{background:radial-gradient(circle at 30% 30%,#3C7457,#0A211A)}
.hqt-dot.dark{background:#0b0c0d;border-color:rgba(240,195,109,.5)}
.hqt-dot.light{background:#F3EFE6}
.hqtheme button.on .hqt-dot{box-shadow:0 0 0 2px #F0C36D}
@media print{.hqtheme{display:none}}
