/* Couleurs et commandes de préférence, limitées à /espace/. */
:root{--surface:#fff;--soft:#f5f6f8;--muted:#626b7b;color-scheme:light}
html[data-theme=dark]{--bg:#0b0d11;--surface:#151820;--soft:#20242e;--ink:#f2f3f6;--muted:#b1b8c5;--line:#353b48;--red:#ff7892;--red-dark:#ff9ab0;--gold:#e6c680;color-scheme:dark}
body{transition:background-color .2s,color .2s}
.preferences{display:flex;gap:10px;align-items:center;flex-shrink:0}
.preferences select{font:600 12px/1.4 'Segoe UI',Arial,sans-serif;border:1px solid var(--line);border-radius:8px;padding:9px 8px;background:var(--surface);color:var(--ink);cursor:pointer}
.theme-switch{width:48px;height:28px;border:1px solid var(--line);border-radius:20px;background:var(--soft);position:relative;padding:2px;color:var(--ink)}
.theme-switch span{display:grid;place-items:center;width:22px;height:22px;background:var(--surface);border-radius:50%;box-shadow:0 2px 5px #0002;transition:transform .2s;font-size:15px;line-height:1}
.theme-switch[aria-checked=true] span{transform:translateX(19px)}
.preferences :focus-visible,select:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.topbar{gap:16px}#searchForm{width:min(390px,35vw)}
.sidebar{background:var(--surface)}.sidebar nav>a,.tool-link,.sidebar-note,.breadcrumb,.return,.count,.search-summary{color:var(--muted)}
.sidebar-note b{color:var(--ink)}
html[data-theme=dark] .topbar,html[data-theme=dark] .role-card,html[data-theme=dark] .product-card,html[data-theme=dark] .quick-panel,html[data-theme=dark] .detail-hero,html[data-theme=dark] .resource-panel,html[data-theme=dark] .aside-card,html[data-theme=dark] .result-list,html[data-theme=dark] .empty,html[data-theme=dark] .star,html[data-theme=dark] .day-link,html[data-theme=dark] .top-help,html[data-theme=dark] .menu-button,html[data-theme=dark] .secondary{background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme=dark] #searchForm,html[data-theme=dark] #searchForm button,html[data-theme=dark] .filter,html[data-theme=dark] .nav-count,html[data-theme=dark] .icon-box,html[data-theme=dark] .family-icon{background:var(--soft);color:var(--muted);border-color:var(--line)}
html[data-theme=dark] .sidebar nav>a:hover,html[data-theme=dark] .sidebar nav>a.active,html[data-theme=dark] .filter[aria-current],html[data-theme=dark] .product-card:hover,html[data-theme=dark] .day-link:hover{background:#311c27;color:#ff9ab0;border-color:#6e3348}
html[data-theme=dark] .primary{background:#ba2044;color:#fff}
html[data-theme=dark] .primary:hover{background:#d12a50}
html[data-theme=dark] .role-card p,html[data-theme=dark] .quick-panel>p,html[data-theme=dark] .section-title p,html[data-theme=dark] .resource-panel>p,html[data-theme=dark] .document-title small,html[data-theme=dark] .detail-hero p,html[data-theme=dark] .aside-card p,html[data-theme=dark] .empty,html[data-theme=dark] .loading,html[data-theme=dark] footer{color:var(--muted)}
html[data-theme=dark] .empty b,html[data-theme=dark] .product-card strong,html[data-theme=dark] .role-card h3{color:var(--ink)}
html[data-theme=dark] .text-link,html[data-theme=dark] .day-link strong,html[data-theme=dark] .day-link span{color:#ff9ab0}
html[data-theme=dark] .notice{background:#292318;color:#e6c680;border-color:#5c4b2f}
html[data-theme=dark] .star[aria-pressed=true]{background:#302818;color:#f6d182;border-color:#7b6637}
html[data-theme=dark] .star[aria-pressed=true] svg{fill:#7b6029}
html[data-theme=dark] .brand-symbol{background:#2b303b;color:#fff}
html[data-theme=dark] .skip{background:var(--surface)}
@media(max-width:1100px){.breadcrumb{display:none}#searchForm{width:auto;flex:1;min-width:0}.topbar{padding:0 20px}}
@media(max-width:760px){.topbar{gap:9px;padding:0 12px;height:72px}#searchForm{min-width:0;padding:7px}#searchForm>span,#searchForm>button{display:none}.preferences{gap:6px}.preferences select{padding:7px 4px}.menu-button{flex-shrink:0}.menu-open .topbar{margin-left:0;min-width:0}.menu-open .preferences{display:none}.menu-open .menu-button{margin-left:auto}.menu-open .topbar{z-index:40;background:transparent;pointer-events:none}.menu-open .menu-button{pointer-events:auto}.sidebar{max-width:calc(100vw - 68px);box-shadow:15px 0 80px #0006}.theme-switch{width:46px}.theme-switch[aria-checked=true] span{transform:translateX(17px)}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important}}
