/* Cockpit dirigeant : pilote automatique et intelligence client (dense, lisible, thème clair/sombre). */
.pilot-hero { display:flex; align-items:center; gap:14px; padding:14px 16px; margin:0 0 16px; border-radius:var(--radius); border:1px solid var(--success-line); background:var(--success-bg); }
.pilot-hero.warning { border-color:var(--warning-line); background:var(--warning-bg); }
.pilot-hero.danger { border-color:var(--danger-line); background:var(--danger-bg); }
.pilot-hero.off { border-color:var(--line); background:var(--surface-hover, var(--surface)); }
.pilot-hero h2 { margin:0 0 2px; font-size:16px; }
.pilot-hero p { margin:0; font-size:13px; color:var(--muted); }
.pilot-pulse { position:relative; flex:none; display:grid; place-items:center; width:40px; height:40px; border-radius:50%; background:var(--surface); color:var(--success); }
.pilot-hero.warning .pilot-pulse { color:var(--warning); } .pilot-hero.danger .pilot-pulse { color:var(--danger); } .pilot-hero.off .pilot-pulse { color:var(--muted); }
.pilot-pulse svg { width:22px; height:22px; }
.pilot-hero:not(.off) .pilot-pulse::after { content:''; position:absolute; inset:-4px; border-radius:50%; border:2px solid currentColor; opacity:.35; animation:pilotPulse 2.4s ease-out infinite; }
@keyframes pilotPulse { from { transform:scale(.85); opacity:.45; } to { transform:scale(1.25); opacity:0; } }
@media (prefers-reduced-motion: reduce) { .pilot-hero .pilot-pulse::after { animation:none; } }
.pilot-kpis { grid-template-columns:repeat(auto-fit, minmax(148px, 1fr)); }
.pilot-kpis .kpi-label { min-height:2.6em; }
.pilot-kpis .kpi-sub { display:flex; flex-wrap:wrap; gap:4px 6px; align-items:center; }
.pilot-kpis .is-alert { border-color:var(--warning-line); box-shadow:inset 3px 0 0 var(--warning); }
.trend.good { color:var(--success); } .trend.bad { color:var(--danger); } .trend.flat { color:var(--muted); font-weight:500; }
.kpi-btn { text-align:left; cursor:pointer; font:inherit; color:inherit; }
.kpi-btn:hover { border-color:var(--accent-line); } .kpi-btn.on { border-color:var(--accent); box-shadow:inset 3px 0 0 var(--accent); }
.pilot-alerts li { display:flex; align-items:flex-start; gap:10px; padding:10px 14px; border-top:1px solid var(--line); }
.pilot-alerts li:first-child { border-top:0; }
.pilot-alerts li.acked { opacity:.7; }
.pilot-alerts a { color:inherit; }
.pilot-did { display:flex; gap:4px; align-items:center; margin-top:3px; color:var(--accent); }
.pilot-did svg { width:13px; height:13px; flex:none; }
.pilot-alert-side { display:flex; flex-direction:column; align-items:flex-end; gap:6px; flex:none; font-size:12px; color:var(--muted); }
.dot { flex:none; width:9px; height:9px; margin-top:5px; border-radius:50%; background:var(--muted); }
.dot.ok { background:var(--success); } .dot.warn { background:var(--warning); } .dot.bad { background:var(--danger); }
.pilot-gap { display:flex; gap:8px; align-items:center; margin-top:12px; padding:9px 10px; border-radius:var(--radius-sm); background:var(--warning-bg); color:inherit; font-size:13px; text-decoration:none; }
.pilot-gap svg { width:16px; height:16px; color:var(--warning); flex:none; }
.pilot-prio { margin:0 0 8px; padding-left:20px; display:grid; gap:6px; font-size:13.5px; line-height:1.5; }
.pilot-prio li::marker { font-weight:800; color:var(--accent); }
.pilot-lines { margin:0; padding-left:18px; display:grid; gap:4px; font-size:13.5px; line-height:1.5; }
.h-sm { font-size:13px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin:0 0 6px; }
.pilot-sw { display:flex; gap:12px; align-items:flex-start; padding:10px 0; border-top:1px solid var(--line); cursor:pointer; }
.pilot-sw:first-child { border-top:0; padding-top:0; }
.pilot-sw .switch { margin-top:2px; flex:none; }

/* Jauge de santé (anneau) */
.insight-health { --v:70; --c:var(--success); flex:none; display:grid; place-items:center; width:46px; height:46px; border-radius:50%;
  background:radial-gradient(closest-side, var(--surface) 76%, transparent 78% 100%), conic-gradient(var(--c) calc(var(--v) * 1%), var(--line) 0); }
.insight-health b { font-size:13px; }
.insight-health.sm { width:34px; height:34px; } .insight-health.sm b { font-size:11px; }

/* Fiche intelligence dans le panneau de conversation */
.insight-box:empty { display:none; }
.insight { border:1px solid var(--line); border-radius:var(--radius-sm); padding:10px; background:var(--surface); }
.insight.high { border-color:var(--danger-line); box-shadow:inset 3px 0 0 var(--danger); }
.insight.medium { border-color:var(--warning-line); box-shadow:inset 3px 0 0 var(--warning); }
.insight-top { display:flex; gap:10px; align-items:center; }
.insight .badge svg { width:12px; height:12px; margin-right:3px; vertical-align:-2px; }
.insight-action { display:flex; gap:6px; margin:9px 0 0; padding:7px 8px; border-radius:6px; background:var(--accent-bg); font-size:12.5px; line-height:1.45; font-weight:500; }
.insight-action svg { width:14px; height:14px; flex:none; margin-top:2px; color:var(--accent); }
.insight-why { margin:8px 0 0; padding-left:16px; font-size:12px; color:var(--muted); display:grid; gap:2px; }

/* Portefeuille clients */
.ci-table tbody tr { cursor:pointer; }
.ci-table tbody tr:hover, .ci-table tbody tr:focus-visible { background:var(--surface-hover, var(--accent-bg)); outline:none; }
.ci-next { max-width:340px; line-height:1.4; }
.ci-gauge { display:flex; gap:18px; align-items:center; }
.card-head.wrap { flex-wrap:wrap; gap:10px; }
.pager { justify-content:center; gap:10px; padding:10px; }
@media (max-width:720px) {
  .pilot-hero { align-items:flex-start; }
  .pilot-alert-side { display:none; }
  .ci-table th:nth-child(3), .ci-table td:nth-child(3), .ci-table th:nth-child(4), .ci-table td:nth-child(4), .ci-table th:nth-child(6), .ci-table td:nth-child(6) { display:none; }
}

/* Bandeau du pilote sur la vue d'ensemble */
.pilot-strip { display:flex; align-items:center; gap:10px; margin:0 0 16px; padding:10px 14px; border-radius:var(--radius-sm); border:1px solid var(--success-line); background:var(--success-bg); color:inherit; font-size:13.5px; text-decoration:none; }
.pilot-strip:hover { text-decoration:none; filter:brightness(.98); }
.pilot-strip.warning { border-color:var(--warning-line); background:var(--warning-bg); }
.pilot-strip.danger { border-color:var(--danger-line); background:var(--danger-bg); }
.pilot-strip svg { width:18px; height:18px; flex:none; }
