/* ── Infrastructure (intégré, natif au dashboard, suit body.light-theme) ──
   Classes préfixées ix-/wf-/mind-. Utilise UNIQUEMENT les variables du dashboard. */

.ix-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 22px; border-bottom: 1px solid var(--border); }
.ix-tab {
  padding: 10px 18px; border-radius: 9px 9px 0 0; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--muted);
  background: transparent; border: 1px solid transparent; border-bottom: none;
  font-family: inherit; transition: all .15s;
}
.ix-tab:hover { color: var(--text); }
.ix-tab.active { color: var(--text); background: var(--card); border-color: var(--border); }
.ix-view { display: none; }
.ix-view.active { display: block; animation: ixfade .25s ease; }
@keyframes ixfade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.ix-lead { color: var(--muted); font-size: 13.5px; max-width: 880px; line-height: 1.65; margin-bottom: 24px; }
.ix-lead b { color: var(--text); }
.ix-sec { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin: 28px 0 14px; }
.ix-sec:first-child { margin-top: 0; }

.ix-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.ix-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 13px;
  padding: 18px 20px; border-left: 4px solid var(--ix, var(--accent));
}
.ix-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 3px; display: flex; align-items: center; gap: 8px; }
.ix-card .ix-tag { font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; margin-left: auto; }
.ix-card ul { list-style: none; margin-top: 11px; }
.ix-card li { padding: 5px 0 5px 17px; position: relative; line-height: 1.5; font-size: 12.5px; color: var(--text); }
.ix-card li::before { content: ''; position: absolute; left: 0; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--ix, var(--accent)); }
.ix-card li b { color: var(--text); }
.ix-m { font-family: ui-monospace, 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--blue); }

.ix-pill { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 9px; border-radius: 20px; margin-left: 4px; }
.ix-pill.green { background: color-mix(in srgb, var(--green) 20%, transparent); color: var(--green); }
.ix-pill.red { background: color-mix(in srgb, var(--red) 20%, transparent); color: var(--red); }
.ix-pill.orange { background: color-mix(in srgb, var(--orange) 22%, transparent); color: var(--orange); }

/* ── Canvas commun : SVG des raccordements DERRIÈRE, nœuds DEVANT, dans un « monde » transformable ── */
.ix-canvas { position: relative; overflow-x: auto; overflow-y: hidden; padding: 8px 4px 26px; }
.ix-world { position: relative; transform-origin: 0 0; width: max-content; will-change: transform; }
.ix-edges { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 0; overflow: visible; }
.ix-edges path.edge { fill: none; stroke: var(--accent); stroke-width: 2; opacity: .6; }
.ix-edges .ix-arrowhead { fill: var(--accent); opacity: .85; }
.ix-nodes { position: relative; z-index: 1; }

/* ── Canvas PAN/ZOOM (workflow n8n) : pas de scrollbar, on déplace au curseur ── */
.ix-canvas.pan { overflow: hidden; height: 60vh; min-height: 420px; cursor: grab; user-select: none; touch-action: none; padding: 0; }
.ix-canvas.pan.grabbing { cursor: grabbing; }
.ix-canvas.pan .ix-world { padding: 16px; }
.ix-zoom {
  position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; gap: 6px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 5px;
}
.ix-zoom button {
  width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 15px; font-weight: 700; cursor: pointer;
  display: grid; place-items: center; font-family: inherit; line-height: 1;
}
.ix-zoom button:hover { border-color: var(--accent); color: var(--accent); }
.ix-zoom button.reset { font-size: 12px; width: auto; padding: 0 9px; }
.ix-hint { position: absolute; bottom: 10px; left: 14px; z-index: 3; font-size: 11px; color: var(--muted); pointer-events: none; }

/* ── Carte mentale (2 niveaux : racine → branches → sous-nœuds) ── */
.mind-flow { display: flex; align-items: center; gap: 64px; min-width: max-content; }
.mind-root {
  flex-shrink: 0; background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-weight: 700; font-size: 15px; padding: 17px 22px; border-radius: 14px;
  box-shadow: 0 8px 26px -10px var(--accent); text-align: center; line-height: 1.3;
}
.mind-root small { display: block; font-weight: 500; font-size: 11px; opacity: .85; margin-top: 4px; }
.mind-branches { display: flex; flex-direction: column; gap: 18px; }
.mind-row { display: flex; align-items: center; gap: 48px; }
.mind-node {
  background: var(--card); border: 1px solid var(--border);
  border-left: 4px solid var(--ix, var(--accent)); border-radius: 11px; padding: 11px 15px;
  min-width: 178px; flex-shrink: 0;
}
.mind-node .t { font-weight: 700; font-size: 12.5px; display: flex; align-items: center; gap: 7px; }
.mind-leaves { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.mind-leaf { font-size: 11px; color: var(--muted); padding-left: 13px; position: relative; line-height: 1.4; }
.mind-leaf::before { content: '·'; position: absolute; left: 3px; color: var(--ix, var(--accent)); font-weight: 700; }
.mind-kids { display: flex; flex-direction: column; gap: 8px; }
.mind-kid {
  background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--ix, var(--accent));
  border-radius: 9px; padding: 7px 12px; font-size: 11.5px; font-weight: 600; min-width: 168px; flex-shrink: 0;
}
.mind-kid small { display: block; font-weight: 400; color: var(--muted); font-size: 10.5px; margin-top: 2px; }

/* ── Workflow (n8n) : stages gauche→droite, raccordements bézier SVG ── */
.wf-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; font-size: 12px; color: var(--muted); }
.wf-legend span { display: flex; align-items: center; gap: 6px; }
.wf-dot { width: 10px; height: 10px; border-radius: 3px; }
.wf-flow { display: flex; align-items: center; gap: 52px; min-width: max-content; }
.wf-stage { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.wf-node {
  width: 170px; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 13px; border-top: 3px solid var(--ix, var(--accent));
  transition: transform .15s, box-shadow .15s;
}
.wf-node:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px var(--ix, var(--accent)); }
.wf-node .h { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 12.5px; }
.wf-node .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; background: color-mix(in srgb, var(--ix, var(--accent)) 18%, transparent); flex-shrink: 0; }
.wf-node .d { font-size: 10.5px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.wf-node .d code { color: var(--blue); font-size: 10px; }
.wf-slabel { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); text-align: center; margin-bottom: 4px; }

.ix-note {
  margin-top: 22px; background: var(--card); border: 1px solid var(--border);
  border-left: 4px solid var(--green); border-radius: 12px; padding: 15px 18px;
  font-size: 12.5px; color: var(--text); line-height: 1.6; max-width: 920px;
}
.ix-note b { color: var(--green); }
