/* Orbit Flux — styles de l'éditeur de graphe, repris de orbit-canvas/app/templates/editor.html (agents flux de Crew),
   préfixés .fx- et exprimés avec les jetons Waka Orbit déjà communs (static/app.css : --orbit-*, --surface-*, --text-*). */
.fx-root { --fx-yellow: var(--orbit-gold); display: grid; grid-template-rows: 1fr; min-height: 0; height: 100%; font-size: 13px; user-select: none; color: var(--text-primary) }
.fx-root .mono { font-family: var(--font-mono) }
.fx-main { display: grid; grid-template-columns: 232px 1fr 320px; min-height: 0; height: 100% }
@media (max-width: 1100px) { .fx-main { grid-template-columns: 200px 1fr 280px } }
/* palette */
.fx-palette { background: var(--surface-raised); border-right: 1px solid var(--border-default); display: grid; grid-template-rows: auto auto 1fr; min-height: 0 }
.fx-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 10px; border-bottom: 1px solid var(--border-default) }
.fx-pt { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted) }
.fx-pc { font-size: 10px; color: var(--text-muted) }
.fx-search { display: flex; align-items: center; gap: 8px; margin: 10px 12px; padding: 0 10px; background: var(--surface-inset); border: 1px solid var(--border-default) }
.fx-search:focus-within { border-color: var(--orbit-orange) }
.fx-search i { color: var(--text-muted); font-size: 13px }
.fx-search input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--text-primary); font: inherit; font-size: 12.5px; padding: 8px 0; box-shadow: none }
.fx-search .fx-clr { display: none; cursor: pointer } .fx-search .fx-clr.show { display: block }
.fx-palette-list { overflow-y: auto; padding: 4px 0 16px }
.fx-pal-group { margin-top: 6px }
.fx-pal-group-h { display: flex; align-items: center; gap: 8px; padding: 8px 14px 6px; font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); cursor: pointer }
.fx-pal-group-h .bar { flex: 1; height: 1px; background: var(--border-default) }
.fx-pal-group-h .chev { font-size: 10px; transition: transform .15s ease }
.fx-pal-group.collapsed .chev { transform: rotate(-90deg) } .fx-pal-group.collapsed .fx-pal-item { display: none }
.fx-pal-item { display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 10px; padding: 8px 14px; cursor: grab; border-left: 2px solid transparent }
.fx-pal-item:hover { background: var(--surface-hover); border-left-color: var(--orbit-orange) } .fx-pal-item:active { cursor: grabbing }
.fx-pal-item .pic { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--border-default); background: var(--surface-app); font-size: 14px }
.fx-pal-item .plabel { font-size: 12.5px; color: var(--text-primary); font-weight: 500 }
.fx-pal-item .pkind { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em }
.fx-pal-empty { padding: 24px 16px; text-align: center; color: var(--text-muted); font-size: 12px }
.fx-ro .fx-pal-item { cursor: default; opacity: .55 }
/* canevas */
.fx-canvas-wrap { position: relative; overflow: hidden; background: var(--surface-app); min-height: 0 }
.fx-canvas-vp { position: absolute; inset: 0; overflow: hidden; cursor: grab; background-color: var(--surface-app); background-image: radial-gradient(circle, var(--border-default) 1px, transparent 1px); background-size: 24px 24px }
.fx-canvas-vp.panning { cursor: grabbing }
.fx-world { position: absolute; top: 0; left: 0; transform-origin: 0 0; will-change: transform }
.fx-edge-layer { position: absolute; top: 0; left: 0; overflow: visible; pointer-events: none }
.fx-edge-path { fill: none; stroke-width: 1.6; pointer-events: none }
.fx-edge-path.nom { stroke: var(--text-muted) } .fx-edge-path.opt { stroke: var(--text-secondary) } .fx-edge-path.ok { stroke: var(--orbit-green) }
.fx-edge-path.err { stroke: var(--orbit-red); stroke-dasharray: 5 4; opacity: .85 } .fx-edge-path.to { stroke: var(--fx-yellow); stroke-dasharray: 5 4 } .fx-edge-path.def { stroke: var(--orbit-cyan); stroke-dasharray: 2 4 }
.fx-edge-path.sel { stroke: var(--orbit-orange) !important; stroke-width: 2.2; opacity: 1 }
.fx-edge-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer } .fx-edge-hit:hover { stroke: var(--orbit-red); stroke-opacity: .35 }
.fx-edge-arrow { fill: var(--text-muted); pointer-events: none } .fx-edge-arrow.ok { fill: var(--orbit-green) } .fx-edge-arrow.err { fill: var(--orbit-red) } .fx-edge-arrow.to { fill: var(--fx-yellow) } .fx-edge-arrow.def { fill: var(--orbit-cyan) } .fx-edge-arrow.opt { fill: var(--text-secondary) } .fx-edge-arrow.sel { fill: var(--orbit-orange) }
.fx-edge-label { position: absolute; transform: translate(-50%, -50%); font-family: var(--font-mono); font-size: 10px; padding: 1px 6px; background: var(--surface-app); border: 1px solid var(--border-default); color: var(--text-secondary); white-space: nowrap; pointer-events: none }
.fx-node { position: absolute; width: 208px; background: var(--surface-raised); border: 1px solid var(--border-strong); box-shadow: var(--shadow-panel); cursor: grab }
.fx-node:hover { border-color: var(--text-muted) } .fx-node.dragging { cursor: grabbing; z-index: 20 }
.fx-node.selected { border-color: var(--orbit-orange); box-shadow: 0 0 0 1px var(--orbit-orange); z-index: 15 }
.fx-node.error { border-color: var(--orbit-red) } .fx-node.error.selected { box-shadow: 0 0 0 1px var(--orbit-red) } .fx-node.warn .nflag { color: var(--fx-yellow) }
.fx-node.entry { border-left: 3px solid var(--orbit-green) } .fx-node.terminal { border-left: 3px solid var(--orbit-red) }
.fx-node-head { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border-bottom: 1px solid var(--border-default) }
.fx-node-head .nic { width: 22px; height: 22px; display: grid; place-items: center; flex-shrink: 0; border: 1px solid var(--border-default); background: var(--surface-app); font-size: 12px }
.fx-node-head .nti { flex: 1; min-width: 0 }
.fx-node-head .ntype { font-family: var(--font-mono); font-size: 8.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); line-height: 1.1 }
.fx-node-head .ntitle { font-size: 12px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3 }
.fx-node-head .nflag { width: 16px; display: none; place-items: center; color: var(--orbit-red); font-size: 13px; flex-shrink: 0 }
.fx-node.error .nflag, .fx-node.warn .nflag { display: grid }
.fx-node-head .ninfo { width: 16px; display: grid; place-items: center; color: var(--text-muted); font-size: 12px; flex-shrink: 0; cursor: help } .fx-node-head .ninfo:hover { color: var(--orbit-cyan) }
.fx-node-sub { padding: 7px 10px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); border-bottom: 1px solid var(--border-default); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.fx-node-cpt { display: flex; gap: 10px; padding: 6px 10px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-secondary); border-bottom: 1px solid var(--border-default); background: var(--surface-inset) }
.fx-node-cpt span { display: inline-flex; align-items: center; gap: 4px } .fx-node-cpt .bi { color: var(--orbit-orange) }
.fx-node-outs { display: flex; justify-content: space-around; align-items: flex-end; gap: 6px; padding: 7px 8px 12px; min-height: 12px }
.fx-node-out { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--text-secondary); min-width: 0 }
.fx-node-out .olabel { font-family: var(--font-mono); font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px }
.fx-node-out.err .olabel, .fx-node-out.to .olabel, .fx-node-out.def .olabel { color: var(--text-muted) }
.fx-port { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); width: 11px; height: 11px; background: var(--surface-app); border: 1.5px solid var(--text-muted); cursor: crosshair; z-index: 2 }
.fx-port.nom, .fx-port.opt { border-color: var(--text-secondary) } .fx-port.ok { border-color: var(--orbit-green) } .fx-port.err { border-color: var(--orbit-red) } .fx-port.to { border-color: var(--fx-yellow) } .fx-port.def { border-color: var(--orbit-cyan) }
.fx-port.nom.connected, .fx-port.opt.connected { background: var(--text-secondary) } .fx-port.ok.connected { background: var(--orbit-green) } .fx-port.err.connected { background: var(--orbit-red) } .fx-port.to.connected { background: var(--fx-yellow) } .fx-port.def.connected { background: var(--orbit-cyan) }
.fx-port:hover { box-shadow: 0 0 0 3px var(--orbit-orange-line); border-color: var(--orbit-orange) }
.fx-node-out.loose .fx-port { border-style: dashed; border-color: var(--fx-yellow) } .fx-node.error .fx-node-out.loose .fx-port { border-color: var(--orbit-red) }
.fx-node-in { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 11px; height: 11px; background: var(--surface-app); border: 1.5px solid var(--text-muted); z-index: 2 }
.fx-ro .fx-node { cursor: pointer } .fx-ro .fx-port { cursor: default }
.fx-toolbar { position: absolute; left: 14px; bottom: 14px; z-index: 40; display: flex; align-items: stretch; border: 1px solid var(--border-strong); background: var(--surface-raised); box-shadow: var(--shadow-panel) }
.fx-toolbar .fx-ct { width: 32px; height: 30px; display: grid; place-items: center; color: var(--text-secondary); cursor: pointer; border: 0; border-right: 1px solid var(--border-default); background: none; font-size: 14px; padding: 0 }
.fx-toolbar .fx-ct:hover { background: var(--surface-hover); color: var(--text-primary) } .fx-toolbar .fx-ct:last-child { border-right: 0 }
.fx-toolbar .fx-zlevel { min-width: 52px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); border-right: 1px solid var(--border-default) }
.fx-hint { position: absolute; right: 14px; bottom: 14px; z-index: 40; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; background: var(--surface-raised); border: 1px solid var(--border-default); padding: 6px 10px; display: flex; gap: 14px }
.fx-hint b { color: var(--text-secondary) } .fx-ro .fx-hint { display: none }
.fx-minimap { position: absolute; right: 14px; top: 14px; z-index: 40; width: 170px; height: 105px; background: rgba(15, 15, 18, .85); border: 1px solid var(--border-strong); overflow: hidden }
.fx-minimap .mm-node { position: absolute; background: var(--text-secondary) } .fx-minimap .mm-node.entry { background: var(--orbit-green) } .fx-minimap .mm-node.terminal { background: var(--orbit-red) } .fx-minimap .mm-node.selected { background: var(--orbit-orange) }
.fx-minimap .mm-vp { position: absolute; border: 1px solid var(--orbit-orange); background: var(--orbit-orange-dim); pointer-events: none }
.fx-drag-ghost { position: fixed; z-index: 999; pointer-events: none; width: 208px; background: var(--surface-raised); border: 1px solid var(--orbit-orange); box-shadow: var(--shadow-panel); opacity: .9 }
/* problèmes */
.fx-problems { position: absolute; top: 14px; left: 14px; width: 360px; max-height: 60%; overflow: auto; z-index: 60; background: var(--surface-raised); border: 1px solid var(--border-strong); box-shadow: var(--shadow-modal); display: none }
.fx-problems.show { display: block }
.fx-problems .ph { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--border-default); font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted) }
.fx-problems .ph i { cursor: pointer }
.fx-problems .pi { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border-default); cursor: pointer }
.fx-problems .pi:hover { background: var(--surface-hover) } .fx-problems .pi i { color: var(--orbit-red); font-size: 15px } .fx-problems .pi.warn i { color: var(--fx-yellow) } .fx-problems .pi.info i { color: var(--orbit-cyan) }
.fx-problems .pt { color: var(--text-primary); font-weight: 600; font-size: 12.5px } .fx-problems .pn { color: var(--text-muted); font-size: 11.5px; margin-top: 3px }
/* inspecteur */
.fx-inspector { background: var(--surface-raised); border-left: 1px solid var(--border-default); display: grid; grid-template-rows: auto 1fr; min-height: 0; overflow: hidden }
.fx-inspector .insp-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 100%; padding: 40px; text-align: center; color: var(--text-muted); grid-row: 1 / -1 }
.fx-inspector .insp-empty .ic { width: 56px; height: 56px; display: grid; place-items: center; border: 1px dashed var(--border-strong); font-size: 24px }
.fx-inspector .insp-empty .et { font-size: 13px; color: var(--text-secondary) } .fx-inspector .insp-empty .es { font-size: 11.5px; line-height: 1.6; max-width: 200px }
.fx-inspector .insp-head { display: grid; grid-template-columns: 32px 1fr auto auto; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border-default) }
.fx-inspector .ihic { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--border-default); background: var(--surface-app); font-size: 16px }
.fx-inspector .ihtype { font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted) }
.fx-inspector .ihtitle { font-size: 13px; font-weight: 700; color: var(--text-emphasis) }
.fx-inspector .ihx { color: var(--text-muted); cursor: pointer; padding: 6px; font-size: 14px; background: none; border: 0 } .fx-inspector .ihx:hover { color: var(--text-primary) }
.fx-inspector .insp-body { overflow-y: auto; padding: 4px 0 24px; min-height: 0 }
.fx-inspector .insp-section { border-bottom: 1px solid var(--border-default); padding: 14px }
.fx-inspector .insp-section .sh { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between }
.fx-inspector .insp-section .sh .add { color: var(--orbit-orange); cursor: pointer; font-size: 11px; display: inline-flex; align-items: center; gap: 4px }
.fx-inspector .field { margin-bottom: 12px } .fx-inspector .field:last-child { margin-bottom: 0 }
.fx-inspector .field > label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 5px }
.fx-inspector .control, .fx-inspector select.control, .fx-inspector .ta { width: 100%; background: var(--surface-inset); border: 1px solid var(--border-default); color: var(--text-primary); padding: 8px 10px; font-size: 12.5px; font-family: var(--font-sans); outline: none; box-shadow: none; min-height: 0 }
.fx-inspector .ta { font-family: var(--font-mono); font-size: 11.5px; line-height: 1.55; resize: vertical; min-height: 60px }
.fx-inspector .control:focus, .fx-inspector .ta:focus { border-color: var(--orbit-orange) } .fx-inspector .control.mono { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted) }
.fx-inspector .chk-row { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 6px 0; font-size: 12.5px }
.fx-inspector .method-pick { display: flex; border: 1px solid var(--border-default) }
.fx-inspector .method-pick .m { flex: 1; text-align: center; padding: 7px 0; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); cursor: pointer; border-right: 1px solid var(--border-default); background: var(--surface-inset) }
.fx-inspector .method-pick .m:last-child { border-right: 0 } .fx-inspector .method-pick .m.active { background: var(--orbit-orange); color: var(--orbit-white); font-weight: 700 }
.fx-inspector .var-help { font-size: 10.5px; color: var(--text-muted); margin-top: 5px; line-height: 1.5 } .fx-inspector .var-help code, .fx-inspector .var-help b { font-family: var(--font-mono); color: var(--orbit-cyan); font-weight: 500 }
.fx-inspector .chips { display: flex; flex-wrap: wrap; gap: 6px }
.fx-inspector .chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; background: var(--surface-inset); border: 1px solid var(--border-default); font-family: var(--font-mono); font-size: 10.5px; color: var(--text-secondary) }
.fx-inspector .chip .bi.ok { color: var(--orbit-green) } .fx-inspector .chip .bi.err { color: var(--orbit-red) } .fx-inspector .chip .libre { color: var(--fx-yellow) }
.fx-inspector .insp-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px; background: var(--orbit-red-dim); border: 1px solid var(--orbit-red); margin: 10px 14px 0 }
.fx-inspector .insp-note i { color: var(--orbit-red); font-size: 14px; margin-top: 1px } .fx-inspector .insp-note .t { font-size: 11.5px; color: var(--text-secondary); line-height: 1.5 }
.fx-inspector .insp-note.warn { background: rgba(241, 196, 15, .08); border-color: rgba(241, 196, 15, .4) } .fx-inspector .insp-note.warn i { color: var(--fx-yellow) }
.fx-inspector .insp-note.info { background: var(--orbit-orange-dim); border-color: var(--orbit-orange-line) } .fx-inspector .insp-note.info i { color: var(--orbit-orange) }
.fx-inspector .insp-note.regle { background: var(--surface-inset); border-color: var(--border-strong) } .fx-inspector .insp-note.regle i { color: var(--orbit-orange) }
.fx-multi .fx-multi-list { max-height: 180px; overflow: auto; border: 1px solid var(--border-default); border-top: 0; background: var(--surface-inset) }
.fx-multi .fx-multi-list label { display: flex; gap: 8px; align-items: center; padding: 5px 10px; font-size: 12px; cursor: pointer; border-bottom: 1px solid var(--border-default) }
.fx-multi .fx-multi-list label:hover { background: var(--surface-hover) } .fx-multi .fx-multi-list input { width: 14px; height: 14px }
