/* Astren Orchestrator — console. Tokens : maquette docs/design/orchestrator (sombre par défaut)
   + Aurora (docs/design/aurora/specs/aurora-design-spec.md §2.4) pour le thème clair. */
:root {
  --primary: #7C5CFC; --primary-2: #6A4AE8; --primary-grad: linear-gradient(140deg, #7C5CFC, #9D7BFF); --logo-grad: linear-gradient(140deg, #7C5CFC, #EC4899);
  --bg: #F7F7FA; --surface: #FFFFFF; --surface-2: #FBFAFE; --surface-sidebar: #FBFBFD; --surface-pill: #F3F3F7; --surface-inset: #F5F4F9;
  --tint: #F3EEFF; --tint-border: #E6DBFF; --rail: #ECE9F6;
  --text: #1A1A22; --text-2: #5C5C66; --text-3: #9A9AA4; --text-4: #A9A9B4; --text-section: #8A8A94;
  --border: #EEEDF4; --border-strong: #E6E6EC; --border-hair: #F2F1F7;
  --input-bg: #FFFFFF; --input-border: #E6E6EC;
  --term-bg: #16121F; --term-fg: #D5D3E0; --code-bg: #F4F2FB;
  --ok: #16A34A; --ok-bg: #E8F8EE; --ok-dot: #22C55E;
  --info: #2563EB; --info-bg: #E7F0FE; --info-dot: #3B82F6;
  --warn: #B45309; --warn-bg: #FEF3DC; --warn-dot: #F59E0B;
  --danger: #DC2626; --danger-bg: #FDECEC; --danger-dot: #EF4444;
  --muted-bg: #F1F1F4; --muted-dot: #B6B6C0;
  --shadow-primary: 0 8px 16px -8px rgba(124, 92, 252, .7);
  --shadow-card: 0 10px 30px -24px rgba(20, 10, 50, .35);
  --radius-card: 16px; --radius: 11px; --radius-sm: 9px;
  --sb-w: 248px; --sb-w-closed: 84px;
  --scroll-thumb: #D8D5E4; --scroll-thumb-hover: #B9B3D6; --scroll-thumb-dark: #3A3A4A; --scroll-thumb-dark-hover: #55556A;
  --q-panel: #FCFBFF; --q-accent: #6D5BD0; --q-card: #FFFFFF; --q-hov: #F6F5FA; --q-sel: #F3EEFF; --q-brd: #F0EFF5; --q-brd-hov: #D9CEFB; --q-brd-sel: #E0D4FF;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
[data-theme="dark"] {
  --bg: #15151D; --surface: #1E1E2A; --surface-2: #24242F; --surface-sidebar: #1A1A24; --surface-pill: #2A2A38; --surface-inset: #1A1A24;
  --tint: #2A2546; --tint-border: #3E3566; --rail: #2A2A38;
  --text: #ECEBF3; --text-2: #C9C7D6; --text-3: #8E8EA4; --text-4: #7A7A90; --text-section: #8E8EA4;
  --border: #2A2A38; --border-strong: #353546; --border-hair: #24242F;
  --input-bg: #1A1A24; --input-border: #353546;
  --term-bg: #0F0F16; --code-bg: #1A1A24;
  --ok: #34D399; --ok-bg: #0F2A20; --info: #60A5FA; --info-bg: #0F1E36; --warn: #FBBF24; --warn-bg: #2E2410;
  --danger: #F87171; --danger-bg: #351A1A; --muted-bg: #2A2A38; --muted-dot: #5C5C70;
  --shadow-card: 0 10px 30px -24px rgba(0, 0, 0, .6);
  --scroll-thumb: #353546; --scroll-thumb-hover: #4F4F66; --scroll-thumb-dark: #2E2E3C; --scroll-thumb-dark-hover: #45455A;
  --q-panel: #191922; --q-accent: #C4B5FD; --q-card: #1E1E2A; --q-hov: #2A2A38; --q-sel: #24242F; --q-brd: #2E2E3C; --q-brd-hov: #5B4FB8; --q-brd-sel: #6E5CA8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; } a:hover { color: var(--primary-2); }
/* Scrollbars : fines, arrondies, piste invisible, pouce aux couleurs de la console (Chromium / WebKit + Firefox) */
/* Firefox : propriétés standard. Pas dans Chromium : dès qu'elles sont posées, il ignore ::-webkit-scrollbar et dessine sa barre à flèches. */
@supports not selector(::-webkit-scrollbar) { * { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; } .term, .q-code, .json { scrollbar-color: var(--scroll-thumb-dark) transparent; } }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; } ::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; min-height: 36px; }
::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-thumb-hover); }
::-webkit-scrollbar-thumb:active { background-color: var(--primary); }
/* Fonds sombres (terminaux, JSON) : pouce visible quel que soit le thème */
.term::-webkit-scrollbar-thumb, .q-code::-webkit-scrollbar-thumb, .json::-webkit-scrollbar-thumb { background-color: var(--scroll-thumb-dark); }
.term::-webkit-scrollbar-thumb:hover, .q-code::-webkit-scrollbar-thumb:hover, .json::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-thumb-dark-hover); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
code, .mono { font-family: var(--mono); font-size: 12px; }
.hidden { display: none !important; }
.muted { color: var(--text-3); } .small { font-size: 12px; } .section-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-section); }
.error { color: var(--danger); font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; } .grow { flex: 1; } .right { margin-left: auto; }
.wrap { flex-wrap: wrap; }

/* ---------- connexion ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 20% -10%, rgba(124, 92, 252, .18), transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px; box-shadow: var(--shadow-card); display: grid; gap: 12px; }
.login-card h1 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin-top: 6px; }
.login-card input[type="password"] { width: 100%; padding: 11px 13px; border-radius: var(--radius); border: 1.5px solid var(--input-border); background: var(--input-bg); outline: none; }
.login-card input[type="password"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 92, 252, .18); }
.check { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }

/* ---------- shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sb-w); flex: none; background: var(--surface-sidebar); border-right: 1px solid var(--border); padding: 22px 16px 24px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; transition: width .3s ease, padding .3s ease; }
.app.sb-closed .sidebar { width: var(--sb-w-closed); padding: 22px 12px 24px; }
.app.sb-closed .brand-text, .app.sb-closed .caret, .app.sb-closed .nav .label, .app.sb-closed .nav .hdr span, .app.sb-closed .svc-mini .txt { display: none; }
.app.sb-closed .nav a { justify-content: center; padding-left: 0; padding-right: 0; }
/* Logo + bouton de repli (maquette : en ligne quand la sidebar est ouverte, empilés quand elle est repliée) */
.sb-top { display: flex; align-items: center; gap: 11px; padding: 0 8px 16px; }
.app.sb-closed .sb-top { flex-direction: column; gap: 10px; padding: 0 0 16px; }
.brand { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.brand strong { display: block; font-size: 16px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.brand small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .03em; line-height: 1.2; color: var(--text-3); white-space: nowrap; }
.brand-lg { gap: 12px; } .brand-lg strong { font-size: 18px; }
.logo-tile { width: 40px; height: 40px; border-radius: 12px; background: var(--logo-grad); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 18px -6px rgba(124, 92, 252, .6); flex: none; }
.logo-tile svg { display: block; } .brand-lg .logo-tile { width: 44px; height: 44px; border-radius: 13px; }
.sb-toggle { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text-3); display: flex; align-items: center; justify-content: center; font-size: 11px; flex: none; }
.sb-toggle:hover { color: var(--text); border-color: var(--tint-border); }
/* Sélecteur d'instance : menu en surimpression (ne pousse pas la nav), masqué quand la sidebar est repliée */
.inst-wrap { position: relative; margin-bottom: 18px; }
.app.sb-closed .inst-wrap { display: none; }
.inst-card { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.inst-card:hover { border-color: var(--tint-border); }
.inst-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok-dot); box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); flex: none; animation: pulse 1.8s ease infinite; }
.inst-dot.off { background: var(--muted-dot); box-shadow: none; animation: none; }
.inst-card strong { font-size: 13px; } .inst-card small { font-size: 11px; color: var(--text-3); display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { color: var(--text-4); margin-left: auto; }
.inst-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: 0 16px 36px -16px rgba(40, 20, 90, .35); }
.inst-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--text); font-size: 13px; border-bottom: 1px solid var(--border-hair); }
.inst-menu a:last-child { border-bottom: none; } .inst-menu a:hover { background: var(--tint); }
.inst-menu .cur { background: var(--tint); } .inst-menu small { color: var(--text-3); font-size: 11px; display: block; }
/* Navigation (maquette : hauteurs fixes 40 / 27 px, pastille active qui glisse avec rebond sous les liens) */
.nav { display: flex; flex-direction: column; gap: 3px; position: relative; }
.nav-pill { position: absolute; left: 0; right: 0; top: 0; height: 40px; border-radius: var(--radius); background: var(--primary); box-shadow: var(--shadow-primary); z-index: 0; opacity: 0; pointer-events: none; transition: transform .6s cubic-bezier(.5, 1.65, .4, .9); }
.nav .hdr { height: 27px; display: flex; align-items: flex-end; padding: 0 13px 4px; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; color: var(--text-3); white-space: nowrap; overflow: hidden; position: relative; z-index: 1; }
.app.sb-closed .nav .hdr { align-items: center; justify-content: center; padding: 0; }
.app.sb-closed .nav .hdr::before { content: ""; width: 24px; height: 1px; background: var(--border-strong); }
.nav a { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 13px; border-radius: var(--radius); color: var(--text-2); font-weight: 500; font-size: 14px; white-space: nowrap; position: relative; z-index: 1; transition: color .3s ease, background-color .15s ease; }
.nav a:hover { color: var(--text); background: var(--surface-pill); }
.nav a.active { color: #fff; font-weight: 600; background: transparent; }
.nav .ico { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; flex: none; }
.nav .ico svg { display: block; }
.nav .alert { position: absolute; right: 13px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger-dot); animation: pulseR 1.6s ease infinite; }
.app.sb-closed .nav .ico { position: relative; }
.app.sb-closed .nav .alert { right: -5px; top: -4px; }
/* Bas de la sidebar : thème, carte Services, déconnexion */
.sb-bottom { margin-top: auto; display: flex; flex-direction: column; }
.theme-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 16px 10px 14px; color: var(--text-2); font-weight: 600; font-size: 12.5px; white-space: nowrap; text-align: left; }
.app.sb-closed .theme-row { justify-content: center; padding-left: 0; padding-right: 0; }
.theme-switch { width: 42px; height: 23px; border-radius: 999px; background: #D8D5E4; position: relative; flex: none; transition: background .15s; }
.theme-switch .knob { position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #FAFAFA; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--primary); transition: left .15s; }
.theme-switch.on { background: var(--primary); } .theme-switch.on .knob { left: 21px; }
.svc-card-mini { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 13px; transition: padding .3s ease; }
.app.sb-closed .svc-card-mini { padding: 13px 6px; }
.sb-section { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.svc-mini { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.svc-mini li { display: flex; align-items: center; justify-content: center; gap: 8px; }
.svc-mini .name { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-mini .ver { color: var(--text-3); font-family: var(--mono); font-size: 11px; white-space: nowrap; }
.svc-mini .dot.failed { animation: pulseR 1.6s ease infinite; }
.logout { display: flex; align-items: center; gap: 8px; padding: 12px 10px 0; font-size: 12px; color: var(--text-3); text-align: left; }
.logout:hover { color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-dot); flex: none; }
.dot.active { background: var(--ok-dot); box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); animation: pulse 1.8s ease infinite; }
.dot.degraded, .dot.activating { background: var(--warn-dot); } .dot.failed { background: var(--danger-dot); box-shadow: 0 0 0 3px rgba(239, 68, 68, .2); }
.dot.inactive, .dot.missing, .dot.planned, .dot.unknown { background: var(--muted-dot); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.banner { background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--border); padding: 9px 28px; font-size: 13px; display: flex; gap: 12px; align-items: center; }
.view { padding: 28px 32px 48px; max-width: 1480px; width: 100%; margin: 0 auto; animation: viewIn .4s ease both; }   /* centrée : les pages à largeur bornée (Services, Système, Diagnostics) le restent sur grand écran */
/* Changement de page (classe posée par route()) : les cartes de la première grille arrivent en cascade, comme dans la maquette */
.view.enter :is(.view > .grid, .sys-page > .grid, .svc-list, .diag-rows) > *, .view.enter .svc-site { animation: viewIn .45s ease both; }
.view.enter :is(.view > .grid, .sys-page > .grid, .svc-list, .diag-rows) > :nth-child(1) { animation-delay: .05s; }
.view.enter :is(.view > .grid, .sys-page > .grid, .svc-list, .diag-rows) > :nth-child(2) { animation-delay: .12s; }
.view.enter :is(.view > .grid, .sys-page > .grid, .svc-list, .diag-rows) > :nth-child(3) { animation-delay: .19s; }
.view.enter :is(.view > .grid, .sys-page > .grid, .svc-list, .diag-rows) > :nth-child(4) { animation-delay: .26s; }
.view.enter :is(.view > .grid, .sys-page > .grid, .svc-list, .diag-rows) > :nth-child(5) { animation-delay: .33s; }
.view.enter :is(.view > .grid, .sys-page > .grid, .svc-list, .diag-rows) > :nth-child(6) { animation-delay: .40s; }
.view.enter :is(.view > .grid, .sys-page > .grid, .svc-list, .diag-rows) > :nth-child(7) { animation-delay: .47s; }
.view.enter :is(.view > .grid, .sys-page > .grid, .svc-list, .diag-rows) > :nth-child(n+8) { animation-delay: .54s; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; } .page-head p { color: var(--text-3); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- composants ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 18px; box-shadow: var(--shadow-card); }
.card h3 { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.card .sub { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.tile { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 17px; flex: none; background: var(--tint); color: var(--primary); }
.tile.warn { background: var(--warn-bg); color: var(--warn); } .tile.info { background: var(--info-bg); color: var(--info); } .tile.ok { background: var(--ok-bg); color: var(--ok); } .tile.danger { background: var(--danger-bg); color: var(--danger); }
.grid { display: grid; gap: 16px; } .grid-2 { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); } .grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; box-shadow: none; animation: none; }
.pill-active { background: var(--ok-bg); color: var(--ok); } .pill-active .dot { background: var(--ok-dot); }
.pill-degraded, .pill-activating, .pill-deactivating, .pill-reloading, .pill-warn { background: var(--warn-bg); color: var(--warn); } .pill-degraded .dot, .pill-activating .dot, .pill-warn .dot { background: var(--warn-dot); }
.pill-failed, .pill-error { background: var(--danger-bg); color: var(--danger); } .pill-failed .dot, .pill-error .dot { background: var(--danger-dot); }
.pill-inactive, .pill-missing, .pill-planned, .pill-unknown, .pill-muted { background: var(--muted-bg); color: var(--text-2); } .pill-inactive .dot, .pill-missing .dot, .pill-planned .dot, .pill-unknown .dot { background: var(--muted-dot); }
.pill-info { background: var(--info-bg); color: var(--info); } .pill-info .dot { background: var(--info-dot); }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.chip { display: inline-block; padding: 2px 8px; border-radius: 8px; background: var(--surface-pill); color: var(--text-2); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.chip.prod { background: var(--tint); color: var(--primary); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 10px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 600; font-size: 13px; transition: transform .08s, box-shadow .15s; }
.btn:hover { border-color: var(--primary); color: var(--primary); } .btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; border-color: var(--border-strong) !important; color: var(--text-3) !important; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--shadow-primary); } .btn-primary:hover { background: var(--primary-2); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; } .btn-danger:hover { color: #fff; filter: brightness(.95); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); } .btn-ghost:hover { background: var(--surface-pill); border-color: transparent; color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; } .btn-block { width: 100%; justify-content: center; }
.btn.on { background: var(--tint); border-color: var(--tint-border); color: var(--primary); }
select, input[type="text"], input[type="search"], input[type="number"] { padding: 7px 10px; border-radius: 9px; border: 1.5px solid var(--input-border); background: var(--input-bg); outline: none; font-size: 13px; }
select:focus, input:focus { border-color: var(--primary); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-section); padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 9px 10px; border-bottom: 1px solid var(--border-hair); vertical-align: top; }
tr:last-child td { border-bottom: none; }
.empty { padding: 28px; text-align: center; color: var(--text-3); border: 1.5px dashed var(--border-strong); border-radius: var(--radius-card); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; }
.stat .l { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-4); } .stat .v { font-size: 14px; font-weight: 700; margin-top: 2px; }
.stat.hi { background: var(--tint); border-color: var(--tint-border); } .stat.hi .v { color: var(--primary); } .stat.hi .l { color: #9B86E0; }
.bar { height: 8px; border-radius: 999px; background: var(--rail); overflow: hidden; } .bar > span { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
.list { display: flex; flex-direction: column; } .list > li { list-style: none; padding: 10px 0; border-bottom: 1px solid var(--border-hair); display: flex; gap: 12px; align-items: flex-start; } .list > li:last-child { border-bottom: none; }

/* ---------- Services (handoff docs/design/orchestrator/services-power, 2026-10-09) : bandeau « CE SITE », puis une
   carte par agent dont le bouton power ⏻ porte l'état dans son anneau (plein = actif, moitié = démarrage, trois quarts
   = échec, vide = arrêté ; orange si la file est en pause), Restart et Kill en satellites, alerte d'échec, pied à
   interrupteurs + liens Logs / Détails, panneaux Détails et Logs dépliés dans la carte. Valeurs du thème sombre =
   handoff ; le thème clair reprend les tokens Aurora correspondants. ---------- */
.svc-page { max-width: 1080px; margin: 0 auto;
  --sv-line: #EEEDF4; --sv-line-bad: #F6D9D9; --sv-muted: #8A8A94; --sv-sub: #8A8A94; --sv-ghost: #B6B6C0; --sv-text-2: #5C5C66;
  --sv-rail: #ECE9F6; --sv-off: #E6E6EC; --sv-off-fg: #8A8A94; --sv-panel: #FBFAFE; --sv-alert-bg: #FDECEC; --sv-alert-fg: #DC2626;
  --sv-ok: #16A34A; --sv-bad: #DC2626; --sv-amber: #B45309; --sv-lilac: #7C5CFC; --sv-lilac-2: #6A4AE8; --sv-tint: #F3EEFF; }
[data-theme="dark"] .svc-page {
  --sv-line: #2E2E3C; --sv-line-bad: #6E4A4A; --sv-muted: #9A9AA4; --sv-sub: #8A8A94; --sv-ghost: #5C5C72; --sv-text-2: #D6D6DE;
  --sv-rail: #2A2A38; --sv-off: #2A2A38; --sv-off-fg: #9A9AA4; --sv-panel: #24242F; --sv-alert-bg: rgba(251, 94, 94, .14); --sv-alert-fg: #FB7185;
  --sv-ok: #4ADE80; --sv-bad: #FB7185; --sv-amber: #FCD34D; --sv-lilac: #A78BFA; --sv-lilac-2: #C4B5FD; --sv-tint: #2B2740; }
.svc-list { display: flex; flex-direction: column; gap: 14px; }
.svc-card, .svc-site { background: var(--surface); border: 1px solid var(--sv-line); border-radius: 18px; padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.svc-site { border-color: var(--tint-border); padding: 16px 22px; margin-bottom: 18px; gap: 14px; }
.svc-card.is-failed { border-color: var(--sv-line-bad); }
/* ton de l'état, porté par la carte (anneau, pastille, libellé, bouton power) */
.st-on { --sv-dot: #22C55E; --sv-fg: var(--sv-ok); }
.st-degraded, .st-starting, .st-stopping { --sv-dot: #F59E0B; --sv-fg: var(--sv-amber); }
.st-failed { --sv-dot: #FB5E5E; --sv-fg: var(--sv-bad); }
.st-off { --sv-dot: var(--muted-dot); --sv-fg: var(--sv-muted); }
.svc-top { display: flex; align-items: center; gap: 18px; }
/* bloc power 96 × 96 : anneau de fond, anneau d'état (r = 43 → périmètre 270), bouton 74 px, satellites 30 px */
.svc-power { position: relative; width: 96px; height: 96px; flex: none; }
.svc-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.svc-ring circle { fill: none; stroke-width: 5; }
.svc-ring .rail { stroke: var(--sv-rail); }
.svc-ring .arc { stroke: var(--sv-dot); stroke-linecap: round; stroke-dasharray: 270; transition: stroke-dashoffset .6s ease, stroke .3s; }
.svc-card.is-paused .svc-ring .arc { stroke: #F59E0B; }
.svc-pbtn { position: absolute; inset: 11px; border-radius: 50%; background: var(--sv-off); color: var(--sv-off-fg); display: flex; align-items: center; justify-content: center; transition: background .25s, box-shadow .25s, color .25s; }
.svc-pbtn svg, .svc-sat svg { display: block; }
.st-on .svc-pbtn { background: #16A34A; color: #fff; box-shadow: 0 10px 24px -10px rgba(22, 163, 74, .8); }
:is(.st-degraded, .st-starting, .st-stopping) .svc-pbtn { background: #F59E0B; color: #fff; }
.st-failed .svc-pbtn { background: #FB5E5E; color: #fff; box-shadow: 0 10px 24px -10px rgba(251, 94, 94, .8); }
.svc-pbtn:not(:disabled):hover { background: #16A34A; color: #fff; box-shadow: 0 10px 24px -10px rgba(22, 163, 74, .75); }   /* prévient : va démarrer */
:is(.st-on, .st-degraded) .svc-pbtn:not(:disabled):hover { background: #DC4C4C; box-shadow: 0 10px 24px -10px rgba(239, 68, 68, .85); }   /* va arrêter */
.svc-pbtn:disabled { cursor: not-allowed; }
.svc-sat { position: absolute; right: -6px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface); color: #fff; display: flex; align-items: center; justify-content: center; transition: background .15s, filter .15s; }
.svc-sat-restart { top: -4px; background: #7C5CFC; } .svc-sat-restart:not(:disabled):hover { background: #6A4AE8; }
.st-starting .svc-sat-restart svg { animation: spin 1s linear infinite; }
.svc-sat-kill { bottom: -4px; background: #FB5E5E; } .svc-sat-kill:not(:disabled):hover { filter: brightness(1.1); }
.svc-sat:disabled { background: var(--sv-off); color: #6E6E7A; cursor: not-allowed; }
/* bloc texte : nom · badge instance · statut, description, liens mono, chiffres */
.svc-id { flex: 1; min-width: 0; }
.svc-name { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; } .svc-name b { font-size: 17px; font-weight: 800; color: var(--text); } .svc-site .svc-name b { font-size: 15px; }
.svc-av { width: 26px; height: 26px; border-radius: 8px; object-fit: cover; display: block; flex: none; }
.svc-logo { width: 38px; height: 38px; border-radius: 11px; box-shadow: none; } .svc-logo svg { width: 18px; height: 18px; }
.svc-inst { font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: var(--muted-bg); color: var(--text-2); }
.svc-inst.prod { background: var(--sv-tint); color: var(--sv-lilac-2); }
.svc-chip { font-size: 9.5px; font-weight: 800; letter-spacing: .05em; color: var(--primary); background: var(--tint); padding: 3px 8px; border-radius: 999px; }
.svc-st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--sv-fg); }
.svc-st .dot { background: var(--sv-dot); }
.st-on .svc-st .dot { animation: pulse 1.8s ease infinite; } .st-failed .svc-st .dot { animation: pulseR 1.6s ease infinite; }
.svc-meta { font-size: 12px; color: var(--sv-muted); }
.svc-role { font-size: 12px; color: var(--sv-muted); margin-top: 4px; }
.svc-unit { font-size: 11.5px; color: var(--sv-sub); font-family: var(--mono); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.svc-unit .sep { color: var(--sv-ghost); }
.svc-unit a { color: var(--sv-muted); text-decoration: underline dotted; text-underline-offset: 3px; text-decoration-color: var(--sv-ghost); cursor: pointer; }
.svc-unit a:hover { color: var(--sv-lilac-2); text-decoration-color: var(--sv-lilac); }
.svc-nums { display: flex; gap: 18px; margin-top: 12px; font-size: 12px; color: var(--sv-muted); flex-wrap: wrap; }
.svc-nums b { color: var(--text); font-weight: 800; } .svc-nums b.mono { font-size: 12px; }
.svc-note { font-size: 12.5px; color: var(--warn); margin-top: 10px; }
/* alerte d'échec (ou avertissement santé) et tâche de déploiement en cours */
.svc-alert { background: var(--sv-alert-bg); border: 1px solid var(--sv-line-bad); border-radius: 10px; padding: 9px 12px; display: flex; gap: 9px; align-items: center; flex-wrap: wrap; font-family: var(--mono); font-size: 12px; color: var(--sv-alert-fg); line-height: 1.5; }
.svc-alert::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #EF4444; flex: none; }
.svc-alert .hint { font-family: var(--font); font-weight: 700; margin-left: auto; white-space: nowrap; }
.svc-alert.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn-dot) 35%, transparent); } .svc-alert.warn::before { background: #F59E0B; }
.svc-task { color: var(--info); background: var(--info-bg); border-radius: 10px; padding: 8px 12px; font-size: 12.5px; } .svc-task a { font-weight: 700; }
/* pied : interrupteurs, Mettre à jour, liens Logs / Détails */
.svc-foot { display: flex; align-items: center; gap: 16px; font-size: 12px; font-weight: 600; color: var(--sv-text-2); border-top: 1px solid var(--sv-line); padding-top: 12px; flex-wrap: wrap; }
.svc-foot .tgl { gap: 7px; font-size: 12px; color: inherit; }
.tgl { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.tgl .sw { width: 36px; height: 20px; border-radius: 999px; background: #D8D5E4; position: relative; flex: none; transition: background .15s; }
[data-theme="dark"] .tgl .sw { background: #3A3A4A; }
.tgl .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.tgl.on .sw { background: var(--primary); } .tgl.tgl-warn.on .sw { background: #F59E0B; } .tgl.on .sw::after { left: 18px; }
.tgl:disabled { opacity: .45; cursor: not-allowed; }
.svc-foot .right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.svc-link { font-weight: 700; color: var(--sv-muted); cursor: pointer; white-space: nowrap; } .svc-link:hover { color: var(--text); }
.svc-link-logs { color: var(--sv-lilac); } .svc-link-logs:hover { color: var(--sv-lilac-2); }
.sbtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); border-radius: 9px; padding: 8px 14px; font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: border-color .15s, color .15s, filter .15s; }
.sbtn:hover { border-color: var(--primary); color: var(--primary); }
.sbtn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; } .sbtn-primary:hover { color: #fff; background: var(--primary-2); }
.sbtn-upd { border-color: var(--primary); background: var(--tint); color: var(--primary); font-weight: 700; }
.sbtn-quiet { color: var(--text-3); }
.sbtn:disabled { opacity: .45; cursor: not-allowed; filter: none; } .sbtn:disabled:hover { border-color: var(--border-strong); color: var(--text-2); }
.sbtn-primary:disabled:hover { color: #fff; border-color: transparent; background: var(--primary); }
.svc-foot .sbtn, .svc-detail-acts .sbtn { padding: 5px 11px; font-size: 11.5px; border-radius: 8px; }
/* panneau Détails */
.svc-detail { background: var(--sv-panel); border: 1px solid var(--sv-line); border-radius: 14px; padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.svc-kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); row-gap: 7px; column-gap: 16px; font-size: 12.5px; line-height: 1.4; margin: 0; }
.svc-kv dt { color: var(--sv-sub); } .svc-kv dd { font-family: var(--mono); font-size: 12.5px; color: var(--text); overflow-wrap: anywhere; }
.svc-kv dd.ok { color: var(--sv-ok); } .svc-kv dd.bad { color: var(--sv-bad); } .svc-kv dd.amber { color: var(--sv-amber); }
.svc-detail-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .svc-detail-acts:empty { display: none; }
.svc-detail-note { font-size: 11px; color: var(--sv-sub); line-height: 1.5; } .svc-detail-note code { font-size: 11px; color: var(--sv-muted); }
/* panneau Logs : console toujours sombre, quel que soit le thème */
.svc-logs { background: #16121F; border: 1px solid #2E2E3C; border-radius: 14px; overflow: hidden; }
.svc-logs-h { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid #2E2E3C; font-family: var(--mono); font-size: 11px; color: #8A8A94; flex-wrap: wrap; }
.svc-logs-h .dollar { color: #5C5C72; }
.svc-logs-h .live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: #4ADE80; }
.svc-logs-h .live .dot { width: 6px; height: 6px; background: #22C55E; animation: pulse 1.8s ease infinite; }
.svc-logs-h .live.off { color: #8A8A94; } .svc-logs-h .live.off .dot { background: #6E6E7A; animation: none; box-shadow: none; }
.svc-logs-h a { color: #8A8A94; } .svc-logs-h a:hover { color: #C4B5FD; }
.svc-term { margin: 0; font-family: var(--mono); font-size: 11px; line-height: 1.85; color: #C8C8D4; padding: 10px 14px; overflow: auto; max-height: 150px; white-space: pre-wrap; word-break: break-word; }
.svc-term .ts { color: #5C5C72; } .svc-term .l-error { color: #FB5E5E; } .svc-term .l-warn { color: #FCD34D; } .svc-term .l-debug { color: #7D8597; } .svc-term .sys { color: #6EE7B7; font-style: italic; }
.svc-term::-webkit-scrollbar-thumb { background-color: var(--scroll-thumb-dark); } .svc-term::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-thumb-dark-hover); }
@supports not selector(::-webkit-scrollbar) { .svc-term { scrollbar-color: var(--scroll-thumb-dark) transparent; } }
@media (max-width: 560px) { .svc-top { flex-wrap: wrap; } .svc-foot .right { margin-left: 0; } }

/* ---------- Système (maquette) : grille 1080 px à deux colonnes, cartes sans ombre ---------- */
.sys-page { max-width: 1080px; margin: 0 auto; }
.sys-grid { grid-template-columns: 1fr 1fr; gap: 18px; } .sys-grid > .span { grid-column: 1 / -1; }
@media (max-width: 1100px) { .sys-grid { grid-template-columns: 1fr; } }
.sys-page .card { padding: 20px 22px; border-radius: 18px; box-shadow: none; } .sys-page .card-head { align-items: center; margin-bottom: 18px; }
.sys-page .card-head .tile { width: 38px; height: 38px; font-size: 16px; }
.sys-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.sys-name { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--text); }
.sys-w + .sys-w { margin-top: 13px; } .sys-wh { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.sys-bars { display: flex; gap: 6px; } .sys-bars span { flex: 1; height: 8px; border-radius: 4px; background: var(--rail); }
.sys-total { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; } .sys-total b { font-size: 30px; font-weight: 800; line-height: 1; } .sys-total span { font-size: 13px; color: var(--text-3); }
.sys-q { display: flex; align-items: center; gap: 8px; min-height: 24px; font-size: 12.5px; color: var(--text-2); } .sys-q + .sys-q { margin-top: 7px; }
.sys-q > b { color: var(--text); min-width: 52px; } .sys-q .sys-dot { width: 7px; height: 7px; }
.sys-qbtn { margin-left: auto; width: 26px; height: 22px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-3); font-size: 9px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sys-qbtn:hover { border-color: var(--primary); color: var(--primary); }
.sys-pause { border-radius: 9px; padding: 7px 13px; font-size: 12px; font-weight: 700; box-shadow: none; } .sys-pause.paused { background: var(--ok); border-color: var(--ok); } .sys-pause.paused:hover { background: var(--ok); filter: brightness(.95); }
.sys-api + .sys-api { margin-top: 14px; } .sys-apih { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 5px; font-size: 13px; } .sys-api .bar { height: 6px; }
.sys-v { display: flex; justify-content: space-between; align-items: center; gap: 10px; } .sys-v + .sys-v { margin-top: 9px; }
.sys-v .sys-name { font-size: 12.5px; font-weight: 500; color: var(--text-2); } .sys-v .sys-dot { width: 7px; height: 7px; }
.sys-ver { font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: var(--text); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; } .sys-ver i { font-style: normal; font-weight: 500; color: var(--muted-dot); }
.sys-tag { font-family: var(--font); font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px; margin-left: 2px; } .sys-tag.ok { color: var(--ok); background: var(--ok-bg); } .sys-tag.warn { color: var(--warn); background: var(--warn-bg); }
.sys-err { display: flex; align-items: flex-start; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--border-hair); } .sys-err:last-child { border-bottom: none; padding-bottom: 2px; }
.sys-ag { font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; margin-top: 1px; flex: none; min-width: 54px; text-align: center; }
.sys-errm { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; } .sys-errm strong { color: #E06A6A; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.sys-errt { font-size: 11px; color: var(--text-4); margin-top: 2px; font-family: var(--mono); }
.sys-ok { display: flex; align-items: center; gap: 9px; padding: 10px 2px 2px; color: var(--ok); font-size: 13px; font-weight: 600; } .sys-ok .dot { animation: none; box-shadow: none; }

/* terminal */
.term { background: var(--term-bg); color: var(--term-fg); border-radius: 12px; padding: 12px 14px; font-family: var(--mono); font-size: 12px; line-height: 1.55; height: 60vh; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.term .ts { color: #8E8EA4; } .term .l-error { color: #F87171; } .term .l-warn { color: #FCD34D; } .term .l-info { color: #9FB0C8; } .term .l-debug { color: #7D8597; }
.term .sys { color: #6EE7B7; font-style: italic; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }

/* modal */
.modal-scrim { position: fixed; inset: 0; background: rgba(20, 18, 30, .55); display: grid; place-items: center; z-index: 50; animation: fade .15s ease both; }
.modal { width: min(520px, 92vw); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px; box-shadow: 0 40px 90px -30px rgba(20, 10, 50, .6); animation: viewIn .2s ease both; }
.modal h3 { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.modal .cmd { margin: 12px 0; padding: 9px 11px; background: var(--code-bg); border-radius: 9px; font-family: var(--mono); font-size: 12px; }
.modal p { color: var(--text-2); font-size: 13px; line-height: 1.5; }
.modal .prodwarn { margin-top: 10px; padding: 8px 10px; border-radius: 9px; background: var(--danger-bg); color: var(--danger); font-size: 12.5px; font-weight: 600; }
.modal .foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 18px; }
.modal-wide { width: min(680px, 94vw); }
.modal .field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); font-weight: 600; } .modal .field select { width: 100%; }
.modal .commits { margin-top: 12px; padding: 10px 12px; background: var(--code-bg); border-radius: 9px; max-height: 160px; overflow: auto; }
.steps { list-style: none; display: flex; flex-direction: column; gap: 4px; margin-top: 12px; max-height: 50vh; overflow: auto; }
.steps .step { display: flex; align-items: baseline; gap: 10px; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); font-size: 12.5px; }
.steps .st { font-family: var(--mono); font-size: 11px; font-weight: 700; min-width: 70px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.steps .step.cur { background: var(--tint); } .steps .step.cur .st { color: var(--primary); } .steps .step.cur .st::before { content: "⟳ "; display: inline-block; animation: spin 1.2s linear infinite; }
.steps .step.ok .st { color: var(--ok); } .steps .step.ko { background: var(--danger-bg); } .steps .step.ko .st { color: var(--danger); }
@keyframes spin { to { transform: rotate(360deg); } }

/* toasts */
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 11px; padding: 10px 14px; box-shadow: var(--shadow-card); font-size: 13px; max-width: 420px; animation: fu .25s ease both; }
.toast.ok { border-left-color: var(--ok-dot); } .toast.err { border-left-color: var(--danger-dot); } .toast.warn { border-left-color: var(--warn-dot); }

/* historique */
/* Instances (maquette) : colonne de 1000 px, cartes en grille ; un agent suivi par ligne ; actions en pied de carte */
.instp { max-width: 1000px; margin: 0 auto; } .instp .page-head p { max-width: 700px; line-height: 1.5; }
.instp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: stretch; }
.instp-card { padding: 20px 22px; border-radius: 18px; box-shadow: none; display: flex; flex-direction: column; }
.instp-card.cur { border-color: var(--tint-border); }
.instp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; } .instp-head .dot { width: 10px; height: 10px; }
.instp-name { flex: 1; font-size: 16px; font-weight: 800; color: var(--text); }
.instp-cur { font-size: 9.5px; font-weight: 800; letter-spacing: .05em; color: var(--primary); background: var(--tint); padding: 3px 8px; border-radius: 999px; }
.instp-url { font-family: var(--mono); font-size: 12px; color: var(--text-2); margin-bottom: 14px; overflow-wrap: anywhere; }
.instp-kv { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.instp-kv > div { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; } .instp-kv span { color: var(--text-section); }
.instp-kv b { font-weight: 700; color: var(--text); text-align: right; overflow-wrap: anywhere; } .instp-kv b.mono { font-family: var(--mono); }
.instp-kv b.t-ok { color: var(--ok); } .instp-kv b.t-warn { color: var(--warn); } .instp-kv b.t-danger { color: var(--danger); } .instp-kv b.t-muted { color: var(--text-2); }
.instp-agents { display: flex; flex-direction: column; gap: 7px; padding-top: 12px; margin-bottom: 16px; border-top: 1px solid var(--border-hair); font-size: 12.5px; }
.instp-agents > span { color: var(--text-section); }
.instp-ag { display: flex; align-items: center; gap: 8px; } .instp-ag .dot { flex: none; } .instp-ag b { flex: 1; font-weight: 700; color: var(--text); }
.instp-ag .mono { font-family: var(--mono); font-weight: 700; color: var(--text); } .instp-ag-st { color: var(--text-3); }
.instp-ag.none { color: var(--text-3); }
.instp-foot { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.instp-open { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); border-radius: 10px; padding: 9px 14px; font-size: 13px; font-weight: 600; transition: background .15s, color .15s; white-space: nowrap; }
.instp-open:hover { background: var(--surface-2); color: var(--text); }
.instp-act { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.instp-act.go { background: var(--primary); border-color: var(--primary); color: #fff; } .instp-act.go:hover { background: var(--primary-2); }
.instp-act.stop { color: var(--danger); } .instp-act.stop:hover { background: var(--danger-bg); } .instp-act:disabled { opacity: .55; cursor: default; }
.instp-note { margin-top: 16px; line-height: 1.5; }
.hist-filters { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hist-filters button { padding: 6px 12px; border-radius: 999px; background: var(--surface-pill); color: var(--text-2); font-size: 12px; font-weight: 600; transition: background .15s, color .15s; }
.hist-filters button:hover { color: var(--text); } .hist-filters button.on { background: var(--text); color: var(--bg); }
/* Historique (maquette) : colonne de 1000 px, une carte de lignes heure · icône · « qui a fait quoi » · résultat */
.hist-page { max-width: 1000px; margin: 0 auto; }
.hist-card { padding: 6px 22px; border-radius: 18px; box-shadow: none; }
.hist-row { display: grid; grid-template-columns: 118px 32px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border-hair); }
.hist-row:last-child { border-bottom: 0; }
.hist-time { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.hist-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.hist-ico.t-ok, .hist-st.t-ok { background: var(--ok-bg); color: var(--ok); } .hist-ico.t-warn, .hist-st.t-warn { background: var(--warn-bg); color: var(--warn); }
.hist-ico.t-danger, .hist-st.t-danger { background: var(--danger-bg); color: var(--danger); } .hist-ico.t-info { background: var(--info-bg); color: var(--info); }
.hist-ico.t-tint { background: var(--tint); color: var(--primary); } .hist-ico.t-sync { background: color-mix(in srgb, var(--q-accent) 14%, transparent); color: var(--q-accent); }
.hist-ico.t-muted, .hist-st.t-muted { background: var(--muted-bg); color: var(--text-2); }
.hist-what { font-size: 13px; color: var(--text); line-height: 1.45; overflow-wrap: anywhere; } .hist-what strong { font-weight: 700; }
.hist-tgt { display: inline-flex; align-items: center; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; vertical-align: middle; background: var(--muted-bg); color: var(--text-2); }
.hist-tgt.mono { font-family: var(--mono); font-weight: 600; }
.hist-detail { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); margin-top: 2px; overflow-wrap: anywhere; }
.hist-st { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.hist-empty { padding: 18px 0; } .hist-total { text-align: right; margin-top: 10px; }
@media (max-width: 720px) { .hist-row { grid-template-columns: 32px minmax(0, 1fr) auto; } .hist-time { grid-column: 2 / -1; grid-row: 2; } }
.res-ok { color: var(--ok); font-weight: 700; } .res-error { color: var(--danger); font-weight: 700; } .res-warn { color: var(--warn); font-weight: 700; }

/* ---------- Diagnostics (maquette) : colonne de 1000 px de cartes-lignes, résultat du diagnostic global, logs ---------- */
.diag-page { max-width: 1000px; margin: 0 auto; } .diag-page .card { box-shadow: none; border-radius: 16px; }
.diag-rows { display: flex; flex-direction: column; gap: 12px; }
.drow { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.drow.top { align-items: flex-start; } .drow.danger { border-color: color-mix(in srgb, var(--danger) 22%, var(--border)); }
.drow .tile { width: 38px; height: 38px; font-size: 16px; } .drow > .grow { min-width: 0; }
.drow .dt { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .drow .ds { font-size: 12.5px; color: var(--text-3); margin-top: 1px; line-height: 1.5; }
.dout { flex-basis: 100%; min-width: 0; font-size: 12.5px; }   /* résultat sous la ligne, pleine largeur */ .dout:empty { display: none; }
.dok { background: var(--ok-bg); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); border-radius: 9px; padding: 8px 12px; font-size: 12px; color: var(--ok); font-weight: 600; } .dok a { color: var(--ok); text-decoration: underline; }
.dctl { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex: none; max-width: 340px; } .dctl > select { width: 230px; }
.dchips { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.dchip { padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--surface); color: var(--text-2); border: 1px solid var(--border-strong); }
.dchip.on { color: var(--c); border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.dbtns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; max-width: 340px; }
.dbtns button { border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); border-radius: 8px; padding: 6px 11px; font-size: 11.5px; font-weight: 600; } .dbtns button:hover { border-color: var(--primary); color: var(--primary); }
.diag-result { margin-top: 18px; padding: 18px 20px; } .drh { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; font-size: 13px; } .drh b { font-weight: 800; } .drh .muted { font-size: 12px; } .drh .sys-dot { width: 9px; height: 9px; }
.diag-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; } @media (max-width: 900px) { .diag-grid { grid-template-columns: 1fr; } }
.dcheck { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.dcheck .mk { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; } .dcheck .mk.ok { background: var(--ok-bg); color: var(--ok); } .dcheck .mk.ko { background: var(--danger-bg); color: var(--danger); } .dcheck .mk.na { background: var(--muted-bg); color: var(--text-3); }
.dcheck .lb { flex: 1 1 auto; min-width: 45%; font-size: 12.5px; font-weight: 600; } .dcheck .dd { flex: 0 1 auto; min-width: 0; font-size: 11.5px; color: var(--text-3); text-align: right; overflow-wrap: anywhere; }
.diag-logs { margin-top: 26px; } .diag-logs h3 { font-size: 17px; font-weight: 800; margin-bottom: 12px; }
.log-bar { padding: 14px 16px; margin-bottom: 12px; display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.log-bar label { display: flex; flex-direction: column; gap: 4px; } .log-bar label.grow { flex: 1; min-width: 160px; } .log-bar label > span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-4); }
.log-bar .check { flex-direction: row; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; } .log-bar input[type="text"] { width: 100%; } .log-bar .row { padding-bottom: 1px; }
.btn-ico { padding: 8px 12px; }
.diag-term { height: auto; min-height: 120px; max-height: 420px; font-size: 11px; line-height: 1.85; padding: 16px 18px; }

/* diag */
.diag-list li { align-items: center; } .diag-install { flex: none; white-space: nowrap; } .diag-mark { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.diag-mark.ok { background: var(--ok-bg); color: var(--ok); } .diag-mark.ko { background: var(--danger-bg); color: var(--danger); } .diag-mark.na { background: var(--muted-bg); color: var(--text-3); }

/* ---------- pages agents (phase 5) ---------- */
textarea { padding: 7px 10px; border-radius: 9px; border: 1.5px solid var(--input-border); background: var(--input-bg); outline: none; font: inherit; font-size: 13px; color: inherit; width: 100%; resize: vertical; } textarea:focus { border-color: var(--primary); }
input[type="color"] { width: 30px; height: 26px; padding: 0; border: 1px solid var(--input-border); border-radius: 6px; background: none; }
.check.small { font-size: 12px; }
.seg { display: inline-flex; background: var(--surface-pill); border-radius: 10px; padding: 3px; }
.seg button { padding: 5px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--text-3); } .seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.tabs button { padding: 9px 14px; font-size: 13px; font-weight: 700; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); } .tabs button:disabled { opacity: .45; cursor: not-allowed; }
.tabs .cnt { font-size: 10.5px; font-weight: 700; color: var(--text-4); background: var(--surface-pill); border-radius: 999px; padding: 1px 7px; } .tabs .cnt:empty { display: none; }
.achip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--c, var(--primary)); } .achip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--primary)); }
.err-line { margin-top: 6px; padding: 6px 9px; border-radius: 8px; background: var(--danger-bg); color: var(--danger); font-family: var(--mono); font-size: 12px; white-space: pre-wrap; word-break: break-word; }
/* ---------- File d'attente (maquette) : liste à gauche, détail du job à droite, chacun avec son défilement ---------- */
.app.is-split .main { height: 100vh; }
.app.is-split .view { flex: 1; min-height: 0; padding: 0; max-width: none; display: grid; grid-template-columns: minmax(420px, 40%) minmax(0, 1fr); overflow: hidden; }
.q-left { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); border-right: 1px solid var(--border); }
[data-theme="dark"] .q-left { background: var(--bg); }
.q-down { margin: 12px 24px 0; display: flex; align-items: center; gap: 9px; background: var(--danger-bg); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); border-radius: 10px; padding: 9px 12px; font-size: 12px; font-weight: 600; color: var(--danger); }
.q-down a { color: var(--danger); font-weight: 700; white-space: nowrap; } .q-down .dot { animation: none; box-shadow: none; }
.q-head { padding: 20px 24px 12px; display: flex; flex-direction: column; gap: 12px; }
.q-titlebar { display: flex; align-items: center; gap: 10px; } .q-titlebar h3 { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.q-mode { margin-left: auto; position: relative; display: flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--surface-pill); flex: none; cursor: pointer; }
/* pastille de l'interrupteur : glisse sous l'icône de la vue active */
.q-mode::before { content: ""; position: absolute; top: 3px; left: 3px; width: 28px; height: 24px; border-radius: 7px; background: var(--surface); box-shadow: 0 1px 3px rgba(20, 20, 40, .12); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.q-mode.dense::before { transform: translateX(30px); }
.q-mode button { position: relative; z-index: 1; width: 28px; height: 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center; color: var(--text-3); transition: color .2s; }
.q-mode button.on { color: var(--text); }
.q-filters { display: flex; align-items: center; gap: 8px; position: relative; }
.q-search { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-4); font-size: 12.5px; }
.q-search:focus-within { border-color: var(--primary); }
.q-search input { flex: 1; min-width: 0; width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; outline: 0; color: var(--text); font-size: 12.5px; }
.q-search #q-count { font-size: 11.5px; font-weight: 600; color: var(--text-3); white-space: nowrap; flex: none; }
.q-sel { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px 5px 6px; min-height: 32px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 12.5px; font-weight: 600; flex: none; white-space: nowrap; }
#q-sel-status { padding: 5px 9px; }
.q-sel.on, .q-sel.open { border-color: var(--primary); } .q-caret { color: var(--text-4); font-size: 11px; }
.q-stack { display: inline-flex; align-items: center; } .q-stack img { border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1.5px var(--surface); } .q-stack img + img { margin-left: -7px; }
.q-ring { border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1.5px var(--c); flex: none; }
.q-sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--t-dot); flex: none; } .q-sdot.all { background: #fff; box-shadow: 0 0 0 1px var(--muted-dot); }
.q-menu { position: absolute; top: 42px; right: 0; z-index: 20; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 6px; min-width: 190px; box-shadow: 0 10px 25px rgba(20, 20, 40, .12); display: flex; flex-direction: column; gap: 2px; animation: fade .12s ease both; }
.q-menu button { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--text); text-align: left; white-space: nowrap; }
.q-menu button:hover { background: var(--surface-pill); } .q-menu button.on { background: var(--tint); } .q-menu button:disabled { opacity: .5; cursor: not-allowed; }
.q-menu .n { margin-left: auto; padding-left: 12px; font-size: 11px; color: var(--text-3); }
.q-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 20px 18px; }
.q-ghead { display: flex; align-items: center; gap: 8px; padding: 10px 0 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--q-accent); }
.q-ghead span { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-4); font-family: var(--mono); font-size: 11px; }
.q-more { text-align: center; padding: 8px 0 4px; }
/* tons de statut (jobs) */
.tone-ok { --t-dot: var(--ok-dot); --t-fg: var(--ok); --t-bg: var(--ok-bg); } .tone-info { --t-dot: var(--info-dot); --t-fg: var(--info); --t-bg: var(--info-bg); }
.tone-warn { --t-dot: var(--warn-dot); --t-fg: var(--warn); --t-bg: var(--warn-bg); } .tone-error { --t-dot: var(--danger-dot); --t-fg: var(--danger); --t-bg: var(--danger-bg); }
.tone-muted { --t-dot: var(--muted-dot); --t-fg: var(--text-2); --t-bg: var(--muted-bg); }
/* vue Standard : chronologie */
.q-tl { position: relative; min-width: 0; } .q-tl::before { content: ""; position: absolute; left: 58px; top: 24px; bottom: 31px; width: 2px; background: var(--rail); }
.q-tlrow { position: relative; z-index: 1; display: grid; grid-template-columns: 46px 26px minmax(0, 1fr); align-items: center; margin-bottom: 9px; min-width: 0; cursor: pointer; }
.q-when { text-align: right; padding-right: 8px; line-height: 1.25; } .q-when b { display: block; font-size: 11.5px; font-weight: 700; color: var(--text-2); } .q-when small { display: block; font-size: 9.5px; color: var(--text-4); }
.q-node { display: flex; justify-content: center; }
.q-node span { width: 26px; height: 26px; border-radius: 50%; background: var(--t-bg); border: 1.5px solid var(--t-dot); color: var(--t-fg); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px var(--surface); }
[data-theme="dark"] .q-node span { box-shadow: 0 0 0 3px var(--bg); }
.q-card { display: flex; align-items: center; gap: 8px; min-width: 0; margin-left: 10px; padding: 10px 12px; border-radius: 10px; background: var(--q-card); border: 1px solid var(--q-brd); transition: background .15s, border-color .15s; }
.q-tlrow:hover .q-card { background: var(--q-hov); border-color: var(--q-brd-hov); } .q-tlrow.sel .q-card { background: var(--q-sel); border-color: var(--q-brd-sel); }
.q-card img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; flex: none; display: block; }
.q-card .grow { min-width: 90px; } .q-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-sub { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-pill { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--t-bg); color: var(--t-fg); flex: none; white-space: nowrap; }
/* vue Dense : une ligne par job */
.q-drow { display: grid; grid-template-columns: 44px 16px minmax(0, 1fr) minmax(0, .75fr) 44px 8px; gap: 10px; align-items: center; padding: 7px 8px; margin: 0 -8px; border-radius: 7px; cursor: pointer; transition: background .15s; }
.q-drow:hover { background: var(--q-hov); } .q-drow.sel { background: var(--q-sel); }
.q-drow .t { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text-2); } .q-drow .g { display: flex; justify-content: center; color: var(--text-3); }
.q-drow .n { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-drow .u { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .q-drow .a { font-size: 11px; font-weight: 700; }
.q-drow .d { width: 8px; height: 8px; border-radius: 50%; background: var(--t-dot); }
/* panneau de détail */
.q-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow-y: auto; background: var(--q-panel); animation: slR .55s cubic-bezier(.22, 1, .36, 1) .1s both; }
.q-pempty { margin: auto; padding: 40px; color: var(--text-3); font-size: 13px; text-align: center; }
.q-pbody { padding: 16px 20px; }
.q-phead { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 16px; }
.q-phead .grow { min-width: 0; } .q-phead h4 { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-phead p { font-size: 11px; color: var(--text-4); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .q-phead .err-line { margin-top: 8px; }
.q-pmeta { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; flex-wrap: wrap; }
.q-agchip { display: inline-flex; align-items: center; gap: 6px; background: var(--ag-tint); color: var(--ag); font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; }
.ag-stella { --ag: #9333EA; --ag-tint: #F3EEFF; } .ag-solan { --ag: #6D5BD0; --ag-tint: #EEE9FF; } .ag-nova { --ag: #EA580C; --ag-tint: #FFF1E6; }
[data-theme="dark"] .ag-stella { --ag: #D8B4FE; --ag-tint: #24242F; } [data-theme="dark"] .ag-solan { --ag: #C4B5FD; --ag-tint: #24242F; } [data-theme="dark"] .ag-nova { --ag: #FDBA74; --ag-tint: #4A2416; }
.q-pstatus { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--t-fg); }
.q-pstatus .dot { background: var(--t-dot); box-shadow: none; animation: none; }
.q-pacts { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.q-pacts .btn { border-radius: 9px; padding: 7px 13px; font-size: 12px; font-weight: 700; }
.q-btn-cancel { border: 1px solid #E5484D; color: #E5484D; border-radius: 9px; padding: 7px 13px; font-size: 12px; font-weight: 700; white-space: nowrap; } .q-btn-cancel:hover { background: color-mix(in srgb, #E5484D 10%, transparent); }
.q-mets { padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--border); }
.q-met { flex: 1; min-width: 88px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; }
.q-met .l { font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-4); margin-bottom: 3px; } .q-met .v { font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.q-met.hi { background: var(--tint); border-color: var(--tint-border); } .q-met.hi .l { color: #9B86E0; } .q-met.hi .v { color: var(--primary); }
.q-pipe { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.q-plabel, .q-sec-h span:first-child { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-section); }
.q-plabel { margin-bottom: 13px; }
.q-metro { position: relative; height: 88px; margin: 4px 26px 0; }
.q-rail { position: absolute; left: 0; right: 0; top: 34px; height: 6px; border-radius: 3px; background: var(--rail); }
.q-fill { position: absolute; left: 0; top: 34px; height: 6px; border-radius: 3px; transition: width .4s ease; }
.q-station { position: absolute; top: 26px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
.q-sdisc { width: 22px; height: 22px; border-radius: 50%; background: var(--s-dot); color: #fff; display: flex; align-items: center; justify-content: center; transition: box-shadow .15s; }
.q-station.sel .q-sdisc, .q-station:hover .q-sdisc { box-shadow: 0 0 0 3px var(--primary); }
.q-slbl { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 1px; white-space: nowrap; line-height: 1.15; } .q-slbl.above { bottom: 28px; } .q-slbl.below { top: 28px; }
.q-slbl b { font-size: 8px; font-weight: 600; letter-spacing: -.01em; color: var(--text); } .q-slbl small { font-size: 8px; color: var(--text-4); font-family: var(--mono); }
.st-done { --s-dot: #22C55E; --s-bg: #EAF9F0; --s-fg: #16A34A; } .st-active { --s-dot: #3B82F6; --s-bg: #E9F2FF; --s-fg: #2563EB; }
.st-error { --s-dot: #EF4444; --s-bg: #FEEEEE; --s-fg: #DC2626; } .st-pending { --s-dot: #E6E6EC; --s-bg: #F6F5FA; --s-fg: #B6B6C0; }
[data-theme="dark"] .st-done { --s-bg: #0F2A20; } [data-theme="dark"] .st-active { --s-bg: #0F1E36; } [data-theme="dark"] .st-error { --s-bg: #351A1A; } [data-theme="dark"] .st-pending { --s-dot: #3A3A4A; --s-bg: #24242F; --s-fg: #6E6E7A; }
.q-station.st-pending .q-sdisc { color: var(--text-4); } .q-station.st-pending .q-slbl b { color: var(--text-4); }
.q-station.st-active .q-sdisc { animation: pulseB 1.6s ease-out infinite; }
.q-sec { border-bottom: 1px solid var(--border); } .q-sec:last-child { border-bottom: 0; }
.q-sec-h { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 13px 20px; text-align: left; } .q-sec-h span:last-child { font-size: 11px; color: var(--text-3); }
.q-sec-h:hover span:first-child { color: var(--text); }
.q-sec-b { padding: 2px 20px 16px; display: flex; flex-direction: column; gap: 10px; }
.q-stephead { display: flex; align-items: center; gap: 11px; }
.q-stephead b { display: block; font-size: 13.5px; } .q-stephead small { display: block; font-size: 10.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .q-stephead .grow { min-width: 0; }
.q-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--s-bg); border: 1.5px solid var(--s-dot); color: var(--s-fg); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: none; }
.q-steppill { font-size: 10px; font-weight: 700; color: var(--s-fg); background: var(--s-bg); padding: 4px 10px; border-radius: 999px; flex: none; }
.q-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .q-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.q-grid3 .mono { font-size: 11px; font-weight: 600; }
.q-lbl { font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-4); margin-bottom: 4px; }
.q-code { margin: 0; font-family: var(--mono); font-size: 10.5px; line-height: 1.6; background: var(--term-bg); color: #C8C8D4; border-radius: 9px; padding: 10px 12px; overflow: auto; white-space: pre-wrap; word-break: break-word; max-height: 320px; }
.j-k { color: #C9B8FF; } .j-s { color: #7FE6A8; } .j-b { color: #8FBEFF; } .j-n { color: #F2C04A; } .j-p { color: #8E8EA4; }
.q-file { display: flex; align-items: center; gap: 11px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; } .q-file .grow { min-width: 0; }
.q-ext { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 800; letter-spacing: .02em; flex: none; background: var(--fx-bg); color: var(--fx); }
.fx-doc { --fx: #7C5CFC; --fx-bg: #F2EEFF; } .fx-pdf { --fx: #EF4444; --fx-bg: #FDECEC; } .fx-audio { --fx: #6B7280; --fx-bg: #F1F1F4; } .fx-json { --fx: #16A34A; --fx-bg: #E8F8EE; } .fx-zip { --fx: #B45309; --fx-bg: #FEF3DC; } .fx-other { --fx: #EA580C; --fx-bg: #FFF1E6; }
[data-theme="dark"] .q-ext { background: color-mix(in srgb, var(--fx) 18%, transparent); }
.q-fn { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .q-fs { font-size: 10px; color: var(--text-3); }
.q-dl { width: 28px; height: 28px; border-radius: 8px; background: var(--tint); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 13px; flex: none; }
.q-model { display: inline-block; font-size: 12px; font-weight: 700; color: var(--primary); background: var(--tint); padding: 5px 11px; border-radius: 8px; }
.q-psrc { font-size: 11px; color: var(--text-3); margin-top: 5px; line-height: 1.45; } .q-psrc.warn { color: var(--warn, #B45309); }
.q-pextra { font-size: 11.5px; color: var(--text-2); line-height: 1.55; white-space: pre-line; }
.q-prompt { font-size: 11.5px; color: var(--text-2); line-height: 1.6; white-space: pre-line; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 11px 13px; max-height: 260px; overflow: auto; }
.q-kv { display: flex; flex-direction: column; } .q-kv > div { display: flex; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border-hair); font-size: 12px; } .q-kv > div:last-child { border-bottom: 0; }
.q-kv span { color: var(--text-3); min-width: 130px; flex: none; } .q-kv b { font-weight: 600; overflow-wrap: anywhere; }
.q-term { height: auto; max-height: 320px; min-height: 120px; font-size: 11px; line-height: 1.85; border-radius: 11px; padding: 13px 15px; }
@media (max-width: 1180px) {
  .app.is-split .main { height: auto; } .app.is-split .view { display: block; overflow: visible; }
  .q-left { border-right: 0; border-bottom: 1px solid var(--border); } .q-list { max-height: 60vh; } .q-panel { min-height: 50vh; }
}
@media (max-width: 560px) { .q-filters { flex-wrap: wrap; } .q-search { flex-basis: 100%; } .q-grid2, .q-grid3 { grid-template-columns: 1fr; } }
.dtabs { display: flex; gap: 4px; margin: 12px 0 10px; border-bottom: 1px solid var(--border); } .dtabs button { padding: 7px 12px; font-size: 12.5px; font-weight: 700; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; } .dtabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
.dpane { max-height: 48vh; overflow: auto; }
.psteps { list-style: none; display: flex; flex-direction: column; gap: 4px; } .pstep { padding: 8px 10px; border-radius: 9px; background: var(--surface-2); font-size: 12.5px; }
.pdot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted-dot); flex: none; } .pstep.ok .pdot { background: var(--ok-dot); } .pstep.error .pdot { background: var(--danger-dot); } .pstep.active .pdot { background: var(--info-dot); box-shadow: 0 0 0 3px rgba(59, 130, 246, .2); animation: pulse 1.6s ease infinite; }
.pstep.error { background: var(--danger-bg); } .pstep.active { background: var(--tint); }
.json { margin-top: 6px; padding: 8px 10px; background: var(--code-bg); border-radius: 8px; font-family: var(--mono); font-size: 11.5px; white-space: pre-wrap; word-break: break-word; max-height: 300px; overflow: auto; color: var(--text-2); }
.form { display: flex; flex-direction: column; }
.frow { display: grid; grid-template-columns: minmax(200px, 1.2fr) minmax(180px, 1fr); gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--border-hair); align-items: start; } .frow:last-of-type { border-bottom: none; }
.flab label { font-weight: 700; font-size: 13px; } .fhelp { color: var(--text-3); font-size: 11.5px; margin-top: 2px; line-height: 1.4; } .fin select, .fin input[type="text"], .fin input[type="number"] { width: 100%; }
.conn-card.inactive { opacity: .7; } .conn-card code { font-size: 11px; background: var(--code-bg); padding: 1px 5px; border-radius: 5px; }
.diag-mark.warn { background: var(--warn-bg); color: var(--warn); }
.tl { position: relative; height: 8px; border-radius: 999px; background: var(--rail); margin-top: 6px; overflow: hidden; }
.tl .seg { position: absolute; top: 0; bottom: 0; background: var(--muted-dot); } .tl .seg.active, .tl .seg.degraded, .tl .seg.activating, .tl .seg.reloading { background: var(--ok-dot); } .tl .seg.degraded { background: var(--warn-dot); } .tl .seg.failed { background: var(--danger-dot); } .tl .seg.inactive, .tl .seg.missing { background: var(--muted-dot); }
.spark { display: block; }
.fed-card.site { border-color: var(--tint-border); background: linear-gradient(180deg, var(--tint) 0%, var(--surface) 70px); } .fed-card table td { border-bottom: 1px solid var(--border-hair); }
@media (max-width: 700px) { .frow { grid-template-columns: 1fr; } }

/* ---------- Réglages (maquette) : onglets Général / agents, cartes tuile + titre + lignes libellé / contrôle ---------- */
.set-page { max-width: 1180px; margin: 0 auto; }
.set-dirty { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--warn); margin-right: 6px; }
.set-dirty .dot { background: var(--warn-dot); animation: none; box-shadow: none; }
.set-page .page-head .btn { border-radius: 11px; padding: 9px 15px; border-width: 1px; color: var(--text-2); } .set-page .page-head .btn-primary { padding: 9px 18px; font-weight: 700; color: #fff; }
.set-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 13px; background: var(--surface-pill); margin-bottom: 22px; }
.set-tab { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--text-3); white-space: nowrap; transition: color .15s, background .15s; }
.set-tab:hover { color: var(--text); }
.set-tab.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(20, 20, 40, .12); }
.set-tab .ag-tile { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; font-weight: 800; line-height: 1; background: var(--ag-tint, var(--tint)); color: var(--ag, var(--primary)); flex: none; }
.set-tab.off { color: var(--text-4); } .set-tab.off .ag-tile { opacity: .5; filter: grayscale(1); } .set-tab.off::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--danger-dot); margin-left: 2px; }
.set-tab .chip { font-size: 9.5px; padding: 1px 6px; }
.ag-tile { position: relative; overflow: hidden; } .ag-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
[data-theme="dark"] .set-tab .ag-tile, [data-theme="dark"] .set-agent .ag-tile { background: color-mix(in srgb, var(--ag, var(--primary)) 18%, transparent); }
.set-agent { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.set-agent .ag-tile { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 800; line-height: 1; background: var(--ag-tint, var(--tint)); color: var(--ag, var(--primary)); }
.set-agent b { font-size: 17px; font-weight: 800; } .set-agent .role { font-size: 12.5px; color: var(--text-section); } .set-agent .unit { margin-left: auto; font-size: 11px; color: var(--text-4); }
.set-stack { display: flex; flex-direction: column; gap: 14px; }
.set-stack > * { animation: viewIn .45s ease both; }
.set-stack > :nth-child(1) { animation-delay: .05s; } .set-stack > :nth-child(2) { animation-delay: .12s; } .set-stack > :nth-child(3) { animation-delay: .19s; } .set-stack > :nth-child(4) { animation-delay: .26s; }
.set-stack > :nth-child(5) { animation-delay: .33s; } .set-stack > :nth-child(6) { animation-delay: .40s; } .set-stack > :nth-child(n+7) { animation-delay: .47s; }
.set-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px 22px; }
.set-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.set-card-head .tile { width: 38px; height: 38px; font-size: 16px; line-height: 1; }
.set-card-title { font-size: 15px; font-weight: 800; } .set-card-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.set-row { display: flex; align-items: flex-start; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border-hair); }
.set-row:last-child { padding-bottom: 4px; }
.set-row.set-col { flex-direction: column; gap: 10px; } .set-row.set-col .set-ctl { width: 100%; }
.set-lab { flex: 1; min-width: 0; } .set-lab label { font-size: 13.5px; font-weight: 700; } .set-lab .chip { margin-left: 8px; vertical-align: 1px; }
.set-help { font-size: 12px; color: var(--text-3); line-height: 1.5; margin-top: 2px; } .set-help .mono { font-size: 11.5px; color: var(--text-2); }
.set-ctl { flex: none; display: flex; align-items: center; gap: 8px; margin-top: 2px; max-width: 100%; }
.set-ctl input[type="text"], .set-ctl input[type="number"], .set-ctl select, .set-ctl textarea { border: 1px solid var(--input-border); border-radius: 9px; padding: 9px 12px; font-size: 13px; color: var(--text); background: var(--input-bg); }
.set-ctl input[type="number"] { width: 110px; text-align: center; }
.set-ctl input[type="text"] { width: 220px; } .set-ctl input[type="text"].tz { width: 160px; text-align: center; } .set-ctl input[type="text"].mono { font-family: var(--mono); font-size: 12.5px; width: 300px; }
.set-ctl select { width: 190px; padding: 8px 10px; font-size: 12.5px; }
.set-ctl textarea { height: 100px; border-radius: 10px; padding: 12px 14px; font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--text-2); }
.set-ctl input:focus, .set-ctl select:focus, .set-ctl textarea:focus { border-color: var(--primary); }
/* interrupteur 42 × 23 de la maquette (réglages booléens de la console) */
.set-sw .sw { width: 42px; height: 23px; } .set-sw .sw::after { width: 19px; height: 19px; } .set-sw.on .sw::after { left: 21px; }
/* combo env / on / off (agents) : badge de la valeur effective + choix + menu */
.cmb { position: relative; width: 215px; }
.cmb-btn { display: flex; align-items: center; gap: 8px; width: 100%; border: 1px solid var(--input-border); border-radius: 9px; padding: 8px 11px; background: var(--input-bg); text-align: left; color: var(--text); }
.cmb.open .cmb-btn, .cmb-btn:hover { border-color: var(--primary); }
.cmb-badge { font-size: 9.5px; font-weight: 800; padding: 2px 7px; border-radius: 5px; flex: none; }
.cmb-badge.on { color: var(--ok); background: var(--ok-bg); } .cmb-badge.off { color: var(--danger); background: var(--danger-bg); }
.cmb-lbl { flex: 1; min-width: 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cmb-caret { color: var(--text-4); font-size: 10px; }
.cmb-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 11px; box-shadow: 0 16px 36px -16px rgba(40, 20, 90, .35); padding: 5px; z-index: 30; animation: fade .12s ease both; }
.cmb-menu button { display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; color: var(--text); text-align: left; }
.cmb-menu button:hover { background: var(--surface-pill); } .cmb-menu button.on { background: var(--tint); } .cmb-menu .ck { width: 13px; color: var(--primary); font-size: 11px; flex: none; }
/* aperçu long d'un réglage (prompt système de Stella) : replié, dépliable, bloc mono encadré et défilant */
.set-more { width: 100%; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; } .set-more.open { grid-template-rows: 1fr; }
.set-more-in { overflow: hidden; min-height: 0; } .set-more:not(.open) .set-more-in { visibility: hidden; transition: visibility 0s .3s; }
.set-pre { margin: 0; max-height: 360px; overflow: auto; padding: 12px 14px; border-radius: 10px; background: var(--term-bg); color: var(--term-fg); border: 1px solid var(--border); font-family: var(--mono); font-size: 11.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.set-more-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 8px; border: 1px dashed var(--border-strong); border-radius: 9px; font-size: 12px; font-weight: 600; color: var(--text-3); transition: background .15s, color .15s; }
.set-more-btn:hover { background: var(--surface-2); color: var(--text); } .set-more-btn .chev { display: inline-block; font-size: 10px; transition: transform .3s ease; } .set-more-btn.open .chev { transform: rotate(180deg); }
.set-foot { padding: 2px 4px; line-height: 1.5; } .set-foot code { font-size: 11.5px; }
.empty.error { color: var(--danger); }
@media (max-width: 700px) {
  .set-row { flex-direction: column; gap: 10px; } .set-ctl { width: 100%; flex-wrap: wrap; }
  .set-ctl input[type="text"], .set-ctl input[type="text"].mono, .set-ctl select, .cmb { width: 100%; max-width: 360px; }
}

@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); } 50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, .06); } }
@keyframes pulseR { 0%, 100% { box-shadow: 0 0 0 3px rgba(239, 68, 68, .2); } 50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, .06); } }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fu { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes slR { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: none; } }
@keyframes pulseB { 0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, .5); } 70% { box-shadow: 0 0 0 7px rgba(59, 130, 246, 0); } }
@media (max-width: 860px) {
  .sidebar { position: fixed; z-index: 40; height: 100vh; }
  .app:not(.sb-closed) .main { margin-left: var(--sb-w); } .app.sb-closed .main { margin-left: var(--sb-w-closed); }
  .view { padding: 18px 16px 40px; }
}

/* ---------- Stella › Modèles DOCX (maquette « Modèles de compte-rendu ») ---------- */
.agent-badge { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .05em; color: var(--c, var(--primary)); background: var(--tint); padding: 3px 8px; border-radius: 999px; margin-bottom: 6px; }
.page-intro { font-size: 13px; color: var(--text-3); line-height: 1.6; max-width: 780px; margin: -8px 0 22px; }
[data-stagger] > * { animation: viewIn .45s ease both; }
[data-stagger] > :nth-child(1) { animation-delay: .05s; } [data-stagger] > :nth-child(2) { animation-delay: .12s; } [data-stagger] > :nth-child(3) { animation-delay: .19s; }
[data-stagger] > :nth-child(4) { animation-delay: .26s; } [data-stagger] > :nth-child(5) { animation-delay: .33s; } [data-stagger] > :nth-child(6) { animation-delay: .40s; } [data-stagger] > :nth-child(n+7) { animation-delay: .47s; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.tpl-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 3px; }
.tpl-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 15px; font-weight: 800; } .tpl-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Zone Logo de la carte : aperçu (fond blanc, comme dans le DOCX) ou emplacement vide, bouton d'envoi, dépôt par glisser-déposer */
.tpl-logo-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 14px; border: 1px dashed var(--border-strong); border-radius: 10px; transition: border-color .15s, background .15s, opacity .15s; }
.tpl-logo-row.drag { border-color: var(--primary); background: var(--tint); }
.tpl-logo-row.busy { opacity: .55; pointer-events: none; }
.tpl-logo-box { width: 58px; height: 38px; flex: none; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 7px; background: #fff; border: 1px solid var(--border-strong); }
.tpl-logo-box img { width: 100%; height: 100%; object-fit: contain; }
.tpl-logo-box.empty { background: var(--surface-inset); color: var(--text-3); }
.tpl-logo-l { font-size: 12px; font-weight: 700; } .tpl-logo-d { font-size: 10.5px; color: var(--text-3); line-height: 1.4; }
.tpl-logo-row .btn-sm { padding: 6px 10px; font-size: 11.5px; white-space: nowrap; }
.tpl-default { font-size: 9.5px; font-weight: 800; letter-spacing: .05em; color: var(--primary); background: var(--tint); padding: 3px 9px; border-radius: 999px; flex: none; }
.tpl-slug { font-size: 11px; color: var(--text-3); margin-bottom: 16px; }
.tpl-desc { font-size: 12px; color: var(--text-2); line-height: 1.5; margin: -10px 0 14px; }
.tpl-theme { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; } .tpl-theme .mono { color: var(--text-2); }
.tpl-swatches { display: flex; gap: 5px; } .tpl-sw { width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, .08); }
.tpl-acts { display: flex; gap: 6px; flex-wrap: wrap; } .tpl-acts .btn-sm { padding: 6px 11px; font-size: 11.5px; }
.btn-tint { background: var(--tint); border-color: var(--tint); color: var(--primary); font-weight: 700; } .btn-tint:hover { background: var(--tint-border); border-color: var(--tint-border); color: var(--primary); }
.btn-ghost-danger { border-color: transparent; background: transparent; color: #F08585; } .btn-ghost-danger:hover { border-color: transparent; background: var(--danger-bg); color: var(--danger); }
/* Éditeur plein écran : formulaire à gauche, aperçu en direct à droite */
.modal.modal-editor { width: min(1180px, 96vw); height: min(88vh, 860px); padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.tpl-ed-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--border); flex: none; } .tpl-ed-head h3 { font-size: 16px; }
.tpl-ed-x { font-size: 22px; line-height: 1; color: var(--muted-dot); padding: 0 4px; } .tpl-ed-x:hover { color: var(--text); }
.tpl-ed-body { flex: 1; display: grid; grid-template-columns: 1fr 46%; min-height: 0; }
.tpl-ed-form { overflow-y: auto; padding: 24px 26px; border-right: 1px solid var(--border); }
.tpl-ed-sec { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-4); margin-bottom: 14px; }
.tpl-ed-form > * + .tpl-ed-sec { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border-hair); }
.tpl-ed-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tpl-ed-field { display: block; margin-bottom: 14px; } .tpl-ed-field > span { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.tpl-ed-field input, .tpl-ed-field textarea { width: 100%; border-radius: 10px; padding: 10px 12px; font-size: 13px; } .tpl-ed-field textarea { resize: vertical; font-size: 12.5px; color: var(--text-2); }
.tpl-ed-field input[readonly] { color: var(--text-3); background: var(--surface-pill); }
.tpl-ed-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border-hair); } .tpl-ed-row:last-of-type { border-bottom: none; }
.tpl-ed-l { font-size: 13px; font-weight: 700; } .tpl-ed-d { font-size: 11.5px; color: var(--text-3); line-height: 1.4; }
.tpl-ed-swatch { width: 36px; height: 28px; border-radius: 7px; border: 1px solid var(--input-border); overflow: hidden; position: relative; flex: none; cursor: pointer; }
.tpl-ed-swatch input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); border: none; padding: 0; cursor: pointer; }
.tpl-ed-hex { width: 92px; text-align: right; } .tpl-ed-font { width: 150px; text-align: right; }
.tpl-ed-logo { display: flex; align-items: center; gap: 8px; } .tpl-ed-logo img { width: 44px; height: 30px; object-fit: contain; background: #fff; border: 1px solid var(--border-strong); border-radius: 7px; }
.tpl-ed-preview { overflow-y: auto; background: #EFEDF6; padding: 18px; } [data-theme="dark"] .tpl-ed-preview { background: #111118; }
.tpl-ed-pvhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-section); }
.tpl-ed-pvstate { letter-spacing: 0; text-transform: none; font-weight: 700; } .tpl-ed-pvstate.ok { color: var(--ok); } .tpl-ed-pvstate.busy { color: var(--warn); }
/* La feuille reste blanche quel que soit le thème de la console : elle imite le DOCX */
.tpl-sheet { background: #fff; color: #111; border-radius: 6px; box-shadow: 0 10px 30px -16px rgba(20, 10, 50, .4); padding: 30px 32px; font-size: 10.5px; line-height: 1.45; }
.tpl-sheet .logo { display: block; margin: 0 auto 8px; width: 120px; max-height: 70px; object-fit: contain; }
.tpl-sheet .t { text-align: center; font-size: 20px; font-weight: 800; line-height: 1.2; } .tpl-sheet .st { text-align: center; font-size: 8.5px; margin: 4px 0 18px; }
.tpl-sheet .h { font-size: 13px; font-weight: 800; margin: 16px 0 6px; padding-bottom: 3px; border-bottom: 1.5px solid; } .tpl-sheet .h2 { font-size: 11.5px; font-weight: 800; margin: 10px 0 2px; }
.tpl-sheet p { margin: 0 0 6px; color: inherit; font-size: inherit; line-height: inherit; } .tpl-sheet ul, .tpl-sheet ol { margin: 0 0 6px 18px; } .tpl-sheet li { margin-bottom: 2px; }
.tpl-sheet table { width: 100%; border-collapse: collapse; font-size: 9.5px; margin-bottom: 8px; } .tpl-sheet td { padding: 4px 7px; vertical-align: middle; }
.tpl-sheet .kpi td { text-align: center; } .tpl-sheet .kpi .v { font-size: 15px; font-weight: 800; } .tpl-sheet .kpi .l { font-size: 8.5px; }
.tpl-sheet .co { padding: 6px 9px; margin-bottom: 6px; border: 1px solid; border-left-width: 3px; }
.tpl-sheet .quote { padding: 4px 10px; margin: 0 0 6px; font-size: 11px; } .tpl-sheet .hr { border-bottom: 1px solid; margin: 8px 0; }
.tpl-ed-foot { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); flex: none; }
@media (max-width: 900px) { .tpl-ed-body { display: block; overflow-y: auto; } .tpl-ed-form { border-right: none; } .tpl-ed-grid2 { grid-template-columns: 1fr; } }

/* ---------- Solan › Connexions cloud (maquette) ---------- */
.conn-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.conn-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 15px; }
.conn-kpi .l { font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-4); margin-bottom: 4px; }
.conn-kpi .v { font-size: 20px; font-weight: 800; } .conn-kpi .v small { font-size: 12px; font-weight: 600; color: var(--text-3); }
.conn-kpi.hi { background: var(--tint); border-color: var(--tint-border); } .conn-kpi.hi .l, .conn-kpi.hi .v small { color: #9B86E0; } .conn-kpi.hi .v { color: var(--primary); }
.conn-list { display: flex; flex-direction: column; gap: 12px; }
.conn-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 20px; box-shadow: var(--shadow-card); }
.conn-card.has-error { border-color: #F6D9D9; } [data-theme="dark"] .conn-card.has-error { border-color: #6E4A4A; }
.conn-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.conn-prov { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 9.5px; font-weight: 800; letter-spacing: .02em; flex: none; background: var(--muted-bg); color: var(--text-2); }
.conn-prov.info { background: var(--info-bg); color: var(--info); } .conn-prov.ok { background: var(--ok-bg); color: var(--ok); }
.conn-title { flex: 1; min-width: 200px; } .conn-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; font-weight: 800; }
.conn-name .conn-meta { font-size: 12px; font-weight: 500; color: var(--text-section); } .conn-name .chip { font-size: 9.5px; border-radius: 999px; }
.conn-path { font-size: 11.5px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conn-card .err-line { margin-top: 12px; padding: 9px 12px; border-radius: 10px; border: 1px solid #F6D9D9; } [data-theme="dark"] .conn-card .err-line { border-color: #6E4A4A; }
.conn-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 14px; }
.conn-stats .stat { padding: 8px 11px; } .conn-stats .stat .l { font-size: 9px; letter-spacing: .05em; margin-bottom: 3px; } .conn-stats .stat .v { font-size: 13px; font-weight: 800; margin-top: 0; }
.conn-stats .stat .v small { display: block; font-size: 10.5px; font-weight: 500; color: var(--text-3); } .conn-stats .stat.hi .v small { color: #9B86E0; }
.conn-acts { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; } .conn-acts .btn { border-radius: 9px; padding: 8px 14px; font-size: 12.5px; }
.conn-side { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-3); } .conn-side .tgl { cursor: default; }

/* Solan › Documents, Bases vectorielles, Assistants (phase 9) : tableaux denses dans une carte, identifiants copiables, pagination */
.sol-tools { margin-bottom: 14px; } .sol-tools input[type="search"] { flex: 1; min-width: 220px; }
.page-head .actions input[type="search"] { width: 230px; }
.sol-table { padding: 6px 10px 10px; overflow-x: auto; } .sol-table .card-head { padding: 12px 8px 0; } .sol-table td { vertical-align: middle; }
.sol-name { font-weight: 700; } .sol-path { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
code.copy { cursor: copy; font-family: var(--mono); font-size: 11.5px; padding: 2px 6px; border-radius: 6px; background: var(--code-bg); color: var(--text-2); white-space: nowrap; } code.copy:hover { color: var(--primary); }
.conn-prov.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 8px; }
tr.is-deleted td { opacity: .55; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 12.5px; color: var(--text-3); }
#org-card table { margin-top: 4px; }
.asst-warn { margin-top: 10px; padding: 8px 10px; border-radius: 9px; background: var(--warn-bg); color: var(--warn); font-size: 12.5px; line-height: 1.45; }
.asst-form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.asst-form .field > span { font-weight: 700; } .asst-form .field input, .asst-form .field select, .asst-form .field textarea { width: 100%; font-weight: 500; } .asst-form .field textarea { min-height: 110px; font-family: var(--mono); font-size: 12px; }
.asst-adv { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px 10px; } .asst-adv summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--text-2); }
.asst-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; } .asst-grid .asst-span { grid-column: 1 / 3; }
.sol-tip { display: inline-block; margin-left: 4px; color: var(--text-4); cursor: help; font-weight: 400; }
@media (max-width: 700px) { .asst-grid { grid-template-columns: 1fr; } .asst-grid .asst-span { grid-column: auto; } .sol-path { max-width: 200px; } }
