/* Positionnement indépendant des quatre identités. Toutes les options restent
   dans le viewport ; sur petits écrans, les côtés deviennent une palette étroite. */
.dock-tools{display:flex;gap:4px;align-items:center;flex:none}
.dock-tools button{min-height:44px;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:8px;padding:7px 10px;display:flex;align-items:center;justify-content:center;gap:7px;font-size:.7rem}
.dock-tools svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.4}
#dock-collapse{min-width:36px;font-size:1.1rem;padding:4px}
:root[data-theme] .theme-lab:has(.dock-tools:not([hidden])) .theme-lab-intro{display:none}
#dock-dialog{width:min(460px,94vw)}.dock-dialog-content{padding:22px}.dock-dialog-content>p{font-size:.875rem;color:var(--muted)}
.dock-position-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-block:22px}
.dock-position-grid button{min-height:50px;border:1px solid var(--line);border-radius:9px;padding:9px;background:var(--bg);color:var(--ink);font-size:.8rem}
.dock-position-grid button[aria-pressed="true"]{border-color:var(--accent);background:var(--accent-soft);box-shadow:inset 0 -2px var(--accent)}
[data-dock="top"]:is(button){grid-column:2}[data-dock="left"]:is(button){grid-column:1}[data-dock="bottom"]:is(button){grid-column:2}[data-dock="original"]:is(button){grid-column:1/-1}
.dock-hint{font-size:.75rem!important}
:root[data-theme] .theme-lab[data-dock]:not([data-dock="original"]){position:fixed;margin:0;z-index:30;max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;box-shadow:0 15px 45px -20px #0008,inset 0 1px #fff5}
:root[data-theme] .theme-lab:is([data-dock="top"],[data-dock="bottom"]){left:50%;right:auto;width:min(1060px,calc(100% - 24px));transform:translateX(-50%);flex-wrap:wrap;justify-content:center}
:root[data-theme] .theme-lab[data-dock="top"]{top:max(12px,env(safe-area-inset-top));bottom:auto}
:root[data-theme] .theme-lab[data-dock="bottom"]{bottom:max(12px,env(safe-area-inset-bottom));top:auto}
:root[data-theme] .theme-lab:is([data-dock="left"],[data-dock="right"]){width:180px;top:50%;bottom:auto;transform:translateY(-50%);flex-direction:column;gap:8px;padding:10px;border-radius:16px}
:root[data-theme] .theme-lab[data-dock="left"]{left:max(12px,env(safe-area-inset-left));right:auto}
:root[data-theme] .theme-lab[data-dock="right"]{right:max(12px,env(safe-area-inset-right));left:auto}
:root[data-theme] .theme-lab:is([data-dock="left"],[data-dock="right"]) .theme-options{display:grid;grid-template-columns:1fr;width:100%;gap:4px}
:root[data-theme] .theme-lab:is([data-dock="left"],[data-dock="right"]) .theme-options>button{width:100%;justify-content:flex-start}
:root[data-theme] .theme-lab[data-dock="center"]{left:50%;top:50%;bottom:auto;right:auto;transform:translate(-50%,-50%);width:min(400px,calc(100% - 24px));flex-direction:column;gap:10px;border-radius:18px;padding:14px}
:root[data-theme] .theme-lab[data-dock="center"] .theme-options{display:grid;grid-template-columns:1fr 1fr;width:100%}
:root[data-theme] .theme-lab[data-collapsed="true"]{width:max-content;max-width:calc(100% - 24px);padding:7px;min-height:0}
.theme-lab[data-collapsed="true"] .theme-options,.theme-lab[data-collapsed="true"] .accent-options{display:none}
@media(max-width:600px){.dock-tools{justify-content:center}.dock-tools button{min-height:44px}.theme-lab .accent-options{width:auto}.theme-lab{justify-content:center}:root[data-theme] .theme-lab:is([data-dock="left"],[data-dock="right"]){width:122px;padding:7px}:root[data-theme] .theme-lab:is([data-dock="left"],[data-dock="right"]) .theme-options>button{flex-direction:row;min-height:44px;padding:5px;font-size:.58rem;gap:5px}:root[data-theme] .theme-lab:is([data-dock="left"],[data-dock="right"]) .theme-swatch{width:25px;height:28px}:root[data-theme] .theme-lab:is([data-dock="left"],[data-dock="right"]) .dock-tools{gap:2px}:root[data-theme] .theme-lab:is([data-dock="left"],[data-dock="right"]) #dock-position{padding:5px;font-size:.6rem;gap:3px}:root[data-theme] .theme-lab:is([data-dock="left"],[data-dock="right"]) #dock-collapse{min-width:25px}:root[data-theme] .theme-lab:is([data-dock="left"],[data-dock="right"]) .accent-options{flex-wrap:wrap;gap:0}:root[data-theme] .theme-lab[data-collapsed="true"]{width:max-content}}
@media(forced-colors:active){.dock-position-grid button[aria-pressed="true"]{outline:2px solid Highlight}}
:root[data-theme] .theme-lab:is([data-dock="left"],[data-dock="right"]) .accent-options{width:100%;min-width:0;flex-wrap:wrap;justify-content:center;box-sizing:border-box}
:root[data-theme] .theme-lab[data-collapsed="true"] .theme-options,:root[data-theme] .theme-lab[data-collapsed="true"] .accent-options{display:none}
@media(max-width:600px){:root[data-theme] .theme-lab:is([data-dock="original"],[data-dock="top"],[data-dock="bottom"]) .theme-options{flex:0 0 100%;width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}:root[data-theme] .theme-lab[data-collapsed="true"] .theme-options{display:none}}
