/* 360 Operations · identidad compartida. Solo presentación; sin cambios de flujo. */
:root {
 --ui-bg:#f3f6fa; --ui-surface:#ffffff; --ui-fg:#172033;
 --ui-border:#dbe3ee; --ui-muted:#64748b; --ui-blue:#2563eb;
 --ops-soft:#f8fafc; --ops-link:#1d4ed8; --ops-shadow:0 4px 18px rgba(15,23,42,.07);
 --bg:var(--ui-bg); --panel:var(--ui-surface); --text:var(--ui-fg);
 --muted:var(--ui-muted); --line:var(--ui-border);
 --360-bg:var(--ui-bg); --360-card:var(--ui-surface); --360-text:var(--ui-fg);
 --360-muted:var(--ui-muted); --360-border:var(--ui-border);
 color-scheme:light;
}
html[data-360-theme="dark"] {
 --ui-bg:#0f172a; --ui-surface:#1e293b; --ui-fg:#e2e8f0;
 --ui-border:#475569; --ui-muted:#b6c5d8; --ops-soft:#26364e; --ops-link:#93c5fd;
 --ops-shadow:0 4px 18px rgba(0,0,0,.16); color-scheme:dark;
}
html {background:var(--ui-bg);color:var(--ui-fg);font-family:Inter,"Segoe UI",system-ui,Arial,sans-serif}
body {background:var(--ui-bg)!important;color:var(--ui-fg)!important;font-family:Inter,"Segoe UI",system-ui,Arial,sans-serif!important;line-height:1.5}
button,input,select,textarea {font-family:inherit!important}
h1,h2,h3,.app-title {letter-spacing:-.02em;line-height:1.25}
h1 {font-size:26px} h2 {font-size:21px} h3 {font-size:17px}
body :is(.muted,.app-muted,.desc,.time,.event .time,.kpi-label,.kpi-note,.topbar-sub,.user-role,small) {color:var(--ui-muted)!important}
body a {color:var(--ops-link)}
/* Bandeau de navigation : conserve sa structure et ses liens. */
body :is(.top,body>header:not(.card)) {background:#17213a!important;color:#fff!important;border-bottom:3px solid #ed8b23;padding:14px 18px;box-shadow:0 2px 10px #0f172a18}
body :is(.top,body>header) :is(a,b,strong,h1,h2,h3,small,#who) {color:#fff!important}
body :is(.top,body>header) :is(button,.btn) {background:#25344b!important;color:#fff!important;border-color:#60728c!important}
/* Surfaces : exclut les voiles modaux et conserve les grilles et états masqués. */
body :is(.card,.app-card,.content-card,.dashboard-card,.period-card,.module-card,.module,.eq,.hero,.block,.grupo-cis,.auth-card,.admin-modal-box,.modal .box,.admin-accordion) {
 background-color:var(--ui-surface)!important;color:var(--ui-fg)!important;
 border-color:var(--ui-border)!important;border-radius:14px!important;box-shadow:var(--ops-shadow);
}
body :is(.module,.eq,.auth-card) {border:1px solid var(--ui-border)}
body :is(.panel,.box):not(.modal):not(.admin-modal) {background-color:var(--ui-surface)!important;color:var(--ui-fg)!important;border-color:var(--ui-border)!important;border-radius:14px;box-shadow:var(--ops-shadow)}
body .kpi {background-color:var(--ui-surface)!important;color:var(--ui-fg)!important;border-color:var(--ui-border)!important;border-radius:14px;box-shadow:var(--ops-shadow)}
body .kpi::after {background:var(--ops-soft)}
body :is(.topbar,.head,main>header,.presentation,.load,.item) {background-color:var(--ui-surface)!important;color:var(--ui-fg)!important;border-color:var(--ui-border)!important}
body :is(.toolbar,.loadhead,.presentations,.permission-module,.photo) {background-color:var(--ops-soft)!important;color:var(--ui-fg)!important;border-color:var(--ui-border)!important}
body :is(.panel-head,.period-head,.dashboard-card-head,.period-metric,.answer,.checkrow,.item,.entry,.tag,.presentation-actions,.accordion-body) {border-color:var(--ui-border)!important}
/* Même traitement des champs, sans toucher les cases, radios, scans ou caméras. */
body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]),select,textarea) {
 background:var(--ui-surface)!important;color:var(--ui-fg)!important;border:1px solid var(--ui-border)!important;
 border-radius:9px!important;min-height:42px;padding:10px 12px;
}
body input::placeholder,body textarea::placeholder {color:var(--ui-muted);opacity:1}
body :is(input,select,textarea):focus-visible {border-color:var(--ui-blue)!important;outline:3px solid #2563eb40!important;outline-offset:1px}
body label {color:inherit}
/* La couleur sémantique des actions prime sur la couleur principale. */
body :is(button,.btn):not(.theme360-toggle):not(.module):not(.eq):not(.head):not(.chip):not([data-cis-kpi]):not([data-recep-kpi]):not(.nav button) {
 border-radius:9px;font-weight:650;min-height:42px;
}
body :is(button,.btn):not(.theme360-toggle):not(.module):not(.eq):not(.head):not(.chip):not(.nav button):not(.nav-super):not(.nav-sub):not(.logout-btn):not([data-cis-kpi]):not([data-recep-kpi]) {
 background-color:var(--ui-blue);color:#fff;border-color:var(--ui-blue);
}
body :is(button,.btn):is(.secondary,.soft,.ghost,.gray,.dark,.logout) {background-color:var(--ops-soft)!important;color:var(--ui-fg)!important;border:1px solid var(--ui-border)!important}
body :is(button,.btn):is(.danger,.red,.bad) {background-color:#b91c1c!important;color:#fff!important;border-color:#b91c1c!important}
body :is(button,.btn):is(.green,.ok,.success) {background-color:#15803d!important;color:#fff!important;border-color:#15803d!important}
body :is(button,.btn).primary {background-color:#2563eb!important;color:#fff!important;border-color:#2563eb!important}
body :is(button,.btn):disabled {opacity:.5;cursor:not-allowed;filter:none}
body .block>button.head {background:transparent!important;color:var(--ui-fg)!important}
body .options button {background:var(--ui-surface)!important;color:var(--ui-fg)!important;border-color:var(--ui-border)!important}
body :is(table th,thead) {background:var(--ops-soft)!important;color:var(--ui-muted)!important}
body :is(table td,table th) {border-color:var(--ui-border)!important}
body table td {color:var(--ui-fg)}
body tbody tr:hover {background:var(--ops-soft)}
body :is(.dashboard-card-title,.dashboard-number,.period-value,.period-head,.user-name,.topbar-title) {color:var(--ui-fg)!important}
body :is(.dashboard-card-sub,.dashboard-note,.period-label) {color:var(--ui-muted)!important}
html:not([data-360-theme="dark"]) body :is(.warn,.etapa) {color:#92400e}
html[data-360-theme="dark"] body .etapa {color:#bfdbfe}
body:has(#lista) details>summary {color:var(--ops-link)!important}
body :is(.tablewrap,.table-wrap,.scroll,.table) {overflow-x:auto}
body .theme360-toggle {min-height:44px}
@media(max-width:700px) {
 h1 {font-size:23px} h2 {font-size:19px}
 body :is(.top,body>header:not(.card)) {padding:12px}
 body :is(input,select,textarea) {font-size:16px}
 body :is(button,.btn):not(.nav button) {min-height:44px}
 body {padding-bottom:72px}
}
@media(prefers-reduced-motion:reduce) {body * {scroll-behavior:auto!important}}
