/* ============================================================
   IAutonomy Strategy — design system theme-aware
   Mode clair par défaut, mode sombre via [data-theme="dark"]
   Palette inspirée des grandes apps SaaS modernes (Linear, Vercel, Arc)
   ============================================================ */

/* ── Polices ──────────────────────────────────────────────────── */
/* Playfair Display = titres éditoriaux (Vision, headers de vue)
   DM Sans = UI principale
   Space Grotesk = numéros, badges, monospaced-but-readable */

/* ── Variables — mode CLAIR par défaut ────────────────────────── */
:root,
[data-theme="light"] {
  /* Surfaces */
  --bg-app:           #FAFAF7;
  --bg-surface:       #FFFFFF;
  --bg-elevated:      #FFFFFF;
  --bg-overlay:       #F4F5F2;
  --bg-card:          #FFFFFF;
  --bg-input:         #FFFFFF;
  --bg-hover:         rgba(0, 0, 0, 0.025);

  /* Bordures */
  --border:           rgba(15, 17, 23, 0.07);
  --border-strong:    rgba(15, 17, 23, 0.14);
  --border-cyan:      rgba(37, 99, 235, 0.4);

  /* Texte */
  --text-primary:     #0A0B0F;
  --text-secondary:   #4A4F58;
  --text-muted:       #71757D;
  --text-hint:        #A0A4AB;
  --text-on-accent:   #FFFFFF;

  /* Accents */
  --accent:           #2563EB;
  --accent-hover:     #1D4ED8;
  --accent-soft:      rgba(37, 99, 235, 0.08);
  --accent-strong:    rgba(37, 99, 235, 0.16);
  --cyan:             #2563EB;     /* alias pour rétro-compat avec ancien code */
  --cyan-soft:        rgba(37, 99, 235, 0.08);

  /* Statuts */
  --planifie:         #2563EB;
  --en-cours:         #D97706;
  --atteint:          #059669;
  --retard:           #DC2626;
  --suspendu:         #6B7280;

  /* Priorités */
  --critique:         #DC2626;
  --elevee:           #EA580C;
  --normale:          #CA8A04;
  --faible:           #6B7280;

  /* Effets */
  --shadow-sm:        0 1px 2px rgba(0,0,0,0.04);
  --shadow:           0 4px 12px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:        0 8px 24px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:        0 24px 64px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
  --shadow-glow:      0 0 0 4px rgba(37, 99, 235, 0.08);

  /* Specific UI */
  --sidebar-bg:       #FFFFFF;
  --sidebar-border:   rgba(15, 17, 23, 0.06);
  --scrim:            rgba(15, 17, 23, 0.35);

  /* Radii */
  --radius-sm:        6px;
  --radius:           10px;
  --radius-lg:        14px;
  --radius-xl:        20px;
  --radius-full:      999px;

  color-scheme: light;
}

/* ── Variables — mode SOMBRE ──────────────────────────────────── */
[data-theme="dark"] {
  --bg-app:           #0B0D12;
  --bg-surface:       #131720;
  --bg-elevated:      #1A1F2A;
  --bg-overlay:       #0E1218;
  --bg-card:          #161B25;
  --bg-input:         #0F1218;
  --bg-hover:         rgba(255, 255, 255, 0.035);

  --border:           rgba(255, 255, 255, 0.07);
  --border-strong:    rgba(255, 255, 255, 0.14);
  --border-cyan:      rgba(96, 165, 250, 0.4);

  --text-primary:     #F4F5F8;
  --text-secondary:   #B4B9C3;
  --text-muted:       #8B91A0;
  --text-hint:        #5F6573;
  --text-on-accent:   #FFFFFF;

  --accent:           #60A5FA;
  --accent-hover:     #93C5FD;
  --accent-soft:      rgba(96, 165, 250, 0.12);
  --accent-strong:    rgba(96, 165, 250, 0.22);
  --cyan:             #60A5FA;
  --cyan-soft:        rgba(96, 165, 250, 0.12);

  --planifie:         #60A5FA;
  --en-cours:         #FBBF24;
  --atteint:          #34D399;
  --retard:           #F87171;
  --suspendu:         #9CA3AF;

  --critique:         #F87171;
  --elevee:           #FB923C;
  --normale:          #FCD34D;
  --faible:           #9CA3AF;

  --shadow-sm:        0 1px 2px rgba(0,0,0,0.4);
  --shadow:           0 4px 16px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:        0 8px 32px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.3);
  --shadow-lg:        0 24px 64px rgba(0,0,0,0.6), 0 4px 12px rgba(0,0,0,0.4);
  --shadow-glow:      0 0 0 4px rgba(96, 165, 250, 0.15);

  --sidebar-bg:       #0E1218;
  --sidebar-border:   rgba(255, 255, 255, 0.06);
  --scrim:            rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

/* ── Reset ────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

html, body { min-height: 100vh; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg-app);
  color: var(--text-primary);
  display: flex;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden { display: none !important; }
.cyan   { color: var(--accent); }

/* ── Sidebar ──────────────────────────────────────────────────── */
.sidebar {
  width: 244px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.brand-logo {
  font-size: 26px;
  display: inline-flex;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.brand-title { font-size: 17px; font-weight: 700; letter-spacing: -0.4px; color: var(--text-primary); }
.brand-sub   {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
  margin-top: 2px;
}

.nav { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; }
.nav-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.12s ease;
  width: 100%;
}
.nav-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.nav-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.nav-ico { font-size: 15px; width: 18px; display: inline-flex; justify-content: center; }

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ghost-btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 14px;
  transition: all 0.12s ease;
}
.ghost-btn:hover { background: var(--bg-hover); border-color: var(--accent); color: var(--accent); }

.hint { font-size: 11px; color: var(--text-hint); text-align: center; }

/* ── Theme toggle ─────────────────────────────────────────────── */
.theme-toggle {
  display: flex;
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
  width: 100%;
}
.theme-toggle button {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 7px;
  padding: 6px 8px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.theme-toggle button.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
.theme-toggle button:not(.active):hover { color: var(--text-secondary); }

/* ── Main ─────────────────────────────────────────────────────── */
.main {
  flex: 1;
  padding: 36px 44px;
  max-width: 1400px;
  width: 100%;
}

.view-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  font-size: 32px;
  letter-spacing: -0.6px;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.view-sub {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 28px;
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--text-muted);
  margin: 28px 0 14px;
}

.placeholder { color: var(--text-hint); padding: 32px 24px; text-align: center; font-size: 14px; }

/* ── Vision block ─────────────────────────────────────────────── */
.vision-block {
  text-align: center;
  padding: 56px 36px 48px;
  margin-bottom: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.vision-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 0%, var(--accent-soft), transparent 60%);
  pointer-events: none;
}
.vision-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 18px;
  position: relative;
}
.vision-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 36px;
  font-weight: 500;
  line-height: 1.22;
  max-width: 880px;
  margin: 0 auto;
  letter-spacing: -0.8px;
  color: var(--text-primary);
  position: relative;
}
.vision-meta {
  margin-top: 26px;
  font-size: 12px;
  color: var(--text-hint);
  position: relative;
}

/* ── Alerts ───────────────────────────────────────────────────── */
.alerts-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.alert {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
}
.alert.warn   { background: rgba(217,119,6,0.10); color: var(--en-cours); border: 1px solid rgba(217,119,6,0.2); }
.alert.danger { background: rgba(220,38,38,0.10); color: var(--retard); border: 1px solid rgba(220,38,38,0.2); }
.alert.ok     { background: rgba(5,150,105,0.10); color: var(--atteint); border: 1px solid rgba(5,150,105,0.2); }

/* ── Axe list (cockpit) ───────────────────────────────────────── */
.axe-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.axe-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}
.axe-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.axe-card-name { font-size: 16px; font-weight: 600; margin-bottom: 10px; color: var(--text-primary); }
.axe-card-bar {
  position: relative;
  height: 6px;
  background: var(--bg-overlay);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.axe-card-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}
.axe-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.axe-card-pct {
  font-family: 'DM Sans', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  min-width: 60px;
  text-align: right;
  letter-spacing: -0.4px;
}

/* ── Map grid ─────────────────────────────────────────────────── */
.map-wrapper { overflow-x: auto; }
.map-grid {
  display: grid;
  grid-template-columns: 160px repeat(3, minmax(280px, 1fr));
  gap: 10px;
  min-width: 1100px;
}
.map-head {
  background: var(--bg-overlay);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  text-align: center;
}
.map-axe-label {
  background: var(--bg-overlay);
  padding: 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  color: var(--text-primary);
}
.map-cell {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.map-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--planifie);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.map-card:hover { background: var(--bg-elevated); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.map-card-title { font-weight: 500; margin-bottom: 4px; line-height: 1.3; color: var(--text-primary); }
.map-card-meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 8px; }
.map-card.s-planifie { border-left-color: var(--planifie); }
.map-card.s-encours  { border-left-color: var(--en-cours); }
.map-card.s-atteint  { border-left-color: var(--atteint); }
.map-card.s-retard   { border-left-color: var(--retard); }
.map-card.s-suspendu { border-left-color: var(--suspendu); }
.map-cell-empty {
  color: var(--text-hint);
  font-size: 12px;
  text-align: center;
  padding: 20px 0;
}

/* ── Axe detail ───────────────────────────────────────────────── */
.axe-selector { margin-bottom: 24px; display: flex; align-items: center; gap: 12px; }
.axe-selector label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.axe-selector select {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-family: inherit;
  font-size: 14px;
  min-width: 260px;
  cursor: pointer;
}
.axe-selector select:focus { border-color: var(--accent); box-shadow: var(--shadow-glow); outline: none; }

.obj-list { display: grid; gap: 10px; }
.obj-row {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.12s ease;
  box-shadow: var(--shadow-sm);
}
.obj-row:hover { border-color: var(--accent); }
.obj-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 12px; }
.obj-row-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.obj-row-meta  { display: flex; gap: 6px; }
.obj-row-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.obj-bar-track {
  height: 8px;
  background: var(--bg-overlay);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.obj-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: var(--radius-full);
}
.obj-bar-val {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  min-width: 140px;
  text-align: right;
  font-weight: 500;
}

/* ── Chips ────────────────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  background: var(--bg-overlay);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.chip.s-planifie { background: rgba(37,99,235,0.10);  color: var(--planifie); border-color: transparent; }
.chip.s-encours  { background: rgba(217,119,6,0.10);  color: var(--en-cours); border-color: transparent; }
.chip.s-atteint  { background: rgba(5,150,105,0.10);  color: var(--atteint);  border-color: transparent; }
.chip.s-retard   { background: rgba(220,38,38,0.10);  color: var(--retard);   border-color: transparent; }
.chip.s-suspendu { background: rgba(107,114,128,0.10);color: var(--suspendu); border-color: transparent; }
.chip.p-critique { background: rgba(220,38,38,0.10);  color: var(--critique); border-color: transparent; }
.chip.p-elevee   { background: rgba(234,88,12,0.10);  color: var(--elevee);   border-color: transparent; }
.chip.p-normale  { background: rgba(202,138,4,0.10);  color: var(--normale);  border-color: transparent; }
.chip.p-faible   { background: rgba(107,114,128,0.10);color: var(--faible);   border-color: transparent; }

[data-theme="dark"] .chip.s-planifie { background: rgba(96,165,250,0.16); }
[data-theme="dark"] .chip.s-encours  { background: rgba(251,191,36,0.16); }
[data-theme="dark"] .chip.s-atteint  { background: rgba(52,211,153,0.16); }
[data-theme="dark"] .chip.s-retard   { background: rgba(248,113,113,0.16); }

/* ── Radar ────────────────────────────────────────────────────── */
.radar-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.radar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.radar-legend-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}
.radar-legend-score {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  color: var(--accent);
}

/* ── Timeline ─────────────────────────────────────────────────── */
.timeline-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
.timeline-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.timeline-row:last-child { border-bottom: none; }
.timeline-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  font-weight: 600;
}
.timeline-track {
  position: relative;
  height: 36px;
  background: var(--bg-overlay);
  border-radius: 8px;
  overflow: visible;
}
.timeline-today {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-soft);
}
.timeline-obj {
  position: absolute;
  top: 4px;
  bottom: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 0 8px;
  font-size: 11px;
  display: flex;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.12s;
  color: var(--text-primary);
}
.timeline-obj:hover { background: var(--bg-elevated); }
.timeline-obj.s-encours { border-color: var(--en-cours); }
.timeline-obj.s-atteint { border-color: var(--atteint); }
.timeline-obj.s-retard  { border-color: var(--retard); }

/* ── Drawer ───────────────────────────────────────────────────── */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(4px);
  z-index: 40;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 500px;
  max-width: 92vw;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.22s ease;
}
.drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  z-index: 1;
  border-radius: var(--radius-sm);
  transition: all 0.12s;
}
.drawer-close:hover { color: var(--text-primary); background: var(--bg-hover); }
.drawer-content { padding: 36px 36px 28px; overflow-y: auto; }

.drawer-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 16px;
  padding-right: 32px;
  letter-spacing: -0.4px;
  color: var(--text-primary);
}
.drawer-section { margin-top: 24px; }
.drawer-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 10px;
}
.drawer-kpi {
  background: var(--bg-overlay);
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid var(--border);
}
.drawer-kpi-name { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.drawer-kpi-vals {
  font-family: 'DM Sans', sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.6px;
}
.drawer-kpi-vals .actuel { color: var(--accent); }
.drawer-kpi-vals .sep    { color: var(--text-hint); margin: 0 8px; font-weight: 400; }
.drawer-kpi-vals .cible  { color: var(--text-primary); }
.drawer-kpi-vals .unite  { color: var(--text-muted); font-size: 16px; margin-left: 6px; font-weight: 500; }

.kpi-edit { display: flex; gap: 8px; margin-top: 14px; align-items: center; }
.kpi-edit input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 14px;
}
.kpi-edit input:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-glow); }
.kpi-edit button {
  background: var(--accent);
  color: var(--text-on-accent);
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s;
}
.kpi-edit button:hover { background: var(--accent-hover); }

.kpi-stale {
  margin-top: 10px;
  font-size: 12px;
  color: var(--en-cours);
  font-weight: 500;
}

.drawer-note {
  background: var(--bg-overlay);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  white-space: pre-wrap;
  border: 1px solid var(--border);
}
.drawer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
  transition: background 0.12s;
}
.drawer-link:hover { background: var(--accent-strong); }

/* ── Responsive light touch ──────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { width: 64px; padding: 16px 8px; }
  .brand-text, .nav-btn span:last-child, .sidebar-footer { display: none; }
  .main { padding: 24px 20px; }
  .vision-text { font-size: 24px; }
  .brand-logo { width: 32px; height: 32px; font-size: 20px; }
}
