/* apps-core 0.1.87 — interrupteur ON/OFF (php/Toggle.php, rules/RULE_TOGGLE_SWITCH.md) : 64 × 32 px, rond blanc 26 px, émeraude. */
.tg{--tg-on:#10B981;--tg-on-halo:rgba(16,185,129,.28);--tg-off:#C9CED6;--tg-off-ink:#374151;--tg-focus:#4A6FD6;display:inline-flex;align-items:center;gap:12px;min-height:44px;cursor:pointer;-webkit-tap-highlight-color:transparent;vertical-align:middle}
html[data-theme="dark"] .tg,html.dark .tg,html.theme-dark .tg{--tg-on:#34D399;--tg-on-halo:rgba(52,211,153,.30);--tg-off:#3B4553;--tg-off-ink:#D5DBE3}
@media (prefers-color-scheme:dark){html:not([data-theme]):not(.light):not(.theme-light) .tg{--tg-on:#34D399;--tg-on-halo:rgba(52,211,153,.30);--tg-off:#3B4553;--tg-off-ink:#D5DBE3}}
/* thème imposé par l'app (prioritaire) : data-tg-theme="light" | "dark" sur <html> ou un parent */
[data-tg-theme="light"]:not(#_) .tg{--tg-on:#10B981;--tg-on-halo:rgba(16,185,129,.28);--tg-off:#C9CED6;--tg-off-ink:#374151}
[data-tg-theme="dark"]:not(#_) .tg{--tg-on:#34D399;--tg-on-halo:rgba(52,211,153,.30);--tg-off:#3B4553;--tg-off-ink:#D5DBE3}
.tg-text{display:grid;gap:2px;min-width:0}.tg-label{font-weight:600}.tg-hint{font-size:.86em;opacity:.85}
.tg-box{position:relative;display:inline-block;flex:0 0 64px;width:64px;height:32px}
.tg-input{position:absolute;inset:-6px;width:calc(100% + 12px);height:calc(100% + 12px);margin:0;opacity:0;cursor:inherit;z-index:1}
.tg-track{position:absolute;inset:0;box-sizing:border-box;border-radius:999px;background:var(--tg-off);transition:background-color .2s ease,box-shadow .2s ease;font:700 11px/32px system-ui,-apple-system,"Segoe UI",sans-serif;letter-spacing:.04em}
.tg-knob{position:absolute;top:3px;left:3px;width:26px;height:26px;border-radius:50%;background:#ffffff;box-shadow:0 1px 3px rgba(0,0,0,.28);transition:transform .2s ease}
.tg-on,.tg-off{position:absolute;top:0;user-select:none}
.tg-on{left:9px;color:#ffffff;text-shadow:0 1px 1px rgba(0,0,0,.25);opacity:0}
.tg-off{right:8px;color:var(--tg-off-ink)}
.tg-input:checked+.tg-track{background:var(--tg-on);box-shadow:0 0 0 4px var(--tg-on-halo),0 0 12px var(--tg-on-halo)}
.tg-input:checked+.tg-track .tg-knob{transform:translateX(32px)}
.tg-input:checked+.tg-track .tg-on{opacity:1}.tg-input:checked+.tg-track .tg-off{opacity:0}
.tg-input:focus-visible+.tg-track{outline:3px solid var(--tg-focus);outline-offset:2px}
.tg.is-disabled,.tg-input:disabled+.tg-track{opacity:.5;cursor:not-allowed}
@media (prefers-reduced-motion:reduce){.tg-track,.tg-knob{transition:none}}
