/* ============================================================
   ÉDITEUR DE WORKFLOW · direction F « Atelier » (F-Editeur, F-EditeurJournal, F-EditeurModales, F-EditeurMenus).
   Chargé après workflow-editor.css : il habille les classes .wfe-* (la logique de l'éditeur ne change pas) dans les
   colonnes du shell. Tout est rattaché à #workflow-editor-page / #fSide / #fAside / body pour ne pas toucher le
   harnais de tests, qui charge workflow-editor.css seul.
   Une seule couleur d'accent (#3ECF8E) ; avertissement #E8C46A ; erreur #FF6961.
   ============================================================ */

/* L'élément racine de l'éditeur n'a plus de rendu : ses morceaux vivent dans les colonnes du shell. */
#workflowVisualEditor { display: contents; }
#workflowVisualEditor[hidden] { display: none; }

#appMain:has(#workflow-editor-page.active) { padding: 0; overflow: hidden; }
body:has(#workflow-editor-page.active) #projectCard { display: none; }

#workflow-editor-page:not(.active) { display: none; }
#workflow-editor-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: var(--f-stage);
}

/* ---------- Barre d'outils ---------- */
#workflow-editor-page .wfe-topbar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: auto;
  padding: 12px 16px 12px 20px;
  background: var(--f-bg);
  border-bottom: 1px solid var(--f-line);
  white-space: nowrap;
  flex: none;
  position: relative;
  z-index: 40;
}
#workflow-editor-page .wfe-topbar .btn {
  height: 38px; min-height: 38px; padding: 0 11px; flex: none; display: inline-flex; align-items: center; gap: 8px;
  border: 0; border-radius: 11px; background: var(--f-s4); color: var(--f-text); box-shadow: none; font: 600 13px Inter, sans-serif; cursor: pointer;
}
#workflow-editor-page .wfe-topbar .btn:hover:not(:disabled) { background: var(--f-s3); }
#workflow-editor-page .wfe-topbar .btn.active { background: var(--f-sel); box-shadow: inset 0 0 0 1px var(--f-line-4); }
#workflow-editor-page .wfe-topbar .btn.g { padding: 0 14px; background: var(--f-accent); color: var(--f-bg); }
#workflow-editor-page .wfe-topbar .btn.g:hover:not(:disabled) { background: var(--f-accent); filter: brightness(1.06); }
#workflow-editor-page .wfe-topbar .btn.g .mono { font-weight: 500; }
#workflow-editor-page .wfe-topbar .btn:disabled { opacity: .45; cursor: default; }
#workflow-editor-page .wfe-toolbar-spacer { flex: 1; min-width: 8px; }
#workflow-editor-page .wfe-crumb { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 120px; max-width: 340px; }
#workflow-editor-page .wfe-back,
#workflow-editor-page .wfe-crumb-sep { display: none; }
#workflow-editor-page .wfe-tabs { display: flex; align-items: center; gap: 6px; height: auto; flex: 0 1 auto; min-width: 0; max-width: 300px; overflow: hidden; }
#workflow-editor-page .wfe-tab-item { display: flex; flex: none; align-items: center; height: auto; border: 0; border-radius: 0; background: none; max-width: 240px; padding: 0; }
#workflow-editor-page .wfe-tab-item:hover { background: none; }
#workflow-editor-page .wfe-tab-item.active { background: none; }
#workflow-editor-page .wfe-tab { height: auto; padding: 0; gap: 6px; color: var(--f-muted); font: 700 16px Manrope, sans-serif; background: none; }
#workflow-editor-page .wfe-tab.active { color: var(--f-text); }
#workflow-editor-page .wfe-tab-name { overflow: hidden; text-overflow: ellipsis; }
#workflow-editor-page .wfe-tab-close { opacity: 0; color: var(--f-muted); }
#workflow-editor-page .wfe-tab-item:hover .wfe-tab-close,
#workflow-editor-page .wfe-tab-item:focus-within .wfe-tab-close { opacity: 1; }
#workflow-editor-page .wfe-tab-add { display: none; width: 26px; height: 26px; border: 0; border-radius: 8px; background: none; color: var(--f-muted); cursor: pointer; font-size: 18px; }
#workflow-editor-page .wfe-tab-add:hover { background: var(--f-s2); color: var(--f-text); }
#workflow-editor-page .wfe-tab-add .material-symbols-outlined { display: none; }
#workflow-editor-page .wfe-tab-add::before { content: "+"; }
#workflow-editor-page .wfe-dirty-dot { background: var(--f-warn); }

/* État de sauvegarde = pastille « Brouillon » du board */
#workflow-editor-page .wfe-save-status,
#workflow-editor-page .wfe-unity-chip,
#workflow-editor-page .wfe-credit-warning {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--f-s2);
  color: #C9C9CE;
  font: 400 11px 'Geist Mono', monospace;
  border: 0;
}
#workflow-editor-page .wfe-save-status.dirty { color: var(--f-warn); }
#workflow-editor-page .wfe-save-status.saved { color: #C9C9CE; }
#workflow-editor-page .wfe-unity-chip[data-state="online"] { color: var(--f-accent); background: rgba(62, 207, 142, .14); }
#workflow-editor-page .wfe-unity-chip[data-state]:not([data-state="online"]) { color: var(--f-warn); }
#workflow-editor-page .wfe-credit-warning { color: var(--f-warn); }
#workflow-editor-page .wfe-journal-badge { font: 500 11px 'Geist Mono', monospace; color: var(--f-muted); }
#workflow-editor-page .wfe-toolbar-divider { display: none; }

/* Menu « ⋯ » : sauvegarder, pas à pas, à blanc, effacer */
#workflow-editor-page .wfe-more { position: relative; flex: none; }
#workflow-editor-page .wfe-more > summary { list-style: none; width: 38px; padding: 0; justify-content: center; cursor: pointer; user-select: none; }
#workflow-editor-page .wfe-more > summary::-webkit-details-marker { display: none; }
#workflow-editor-page .wfe-more-menu {
  position: absolute; right: 0; top: 44px; min-width: 200px; z-index: 60;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: var(--f-s2); border: 1px solid var(--f-line-3); border-radius: 14px;
}
#workflow-editor-page .wfe-more-menu .btn { height: 34px; justify-content: flex-start; background: transparent; font-weight: 500; width: 100%; }
#workflow-editor-page .wfe-more-menu .btn:hover:not(:disabled) { background: var(--f-s4); }

/* ---------- Canevas ---------- */
#workflow-editor-page .wfe-canvas-shell { flex: 1; min-height: 0; position: relative; overflow: hidden; display: flex; }
#workflow-editor-page .wfe-canvas {
  flex: 1; min-width: 0; position: relative; overflow: hidden;
  background: var(--f-stage) radial-gradient(var(--f-line) 1px, transparent 1px) 0 0 / 22px 22px;
}
#workflow-editor-page .wfe-empty-hint { color: var(--f-muted); font-size: 13px; }
#workflow-editor-page .wfe-edge-line { stroke-width: 2; }
#workflow-editor-page .wfe-edge-group.selected .wfe-edge-line { stroke: var(--f-accent); stroke-width: 3; }

/* Contrôles de zoom */
#workflow-editor-page .wfe-canvas-controls {
  position: absolute; left: 12px; top: 12px; bottom: auto; right: auto; z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px;
  background: var(--f-card); border: 1px solid var(--f-line-3); border-radius: 12px;
}
#workflow-editor-page .wfe-canvas-controls .wfe-icon-btn {
  width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--f-muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
#workflow-editor-page .wfe-canvas-controls .wfe-icon-btn:hover { background: var(--f-s4); color: var(--f-text); }
#workflow-editor-page .wfe-canvas-controls .wfe-icon-btn[aria-pressed="true"] { color: var(--f-accent); }
#workflow-editor-page .wfe-zoom-label { font: 400 10px 'Geist Mono', monospace; color: var(--f-muted); padding: 2px 0; min-width: 28px; text-align: center; }

/* Mini-carte */
#workflow-editor-page .wfe-minimap { position: absolute; right: 18px; top: 18px; z-index: 9; background: var(--f-card); border: 1px solid var(--f-line-3); border-radius: 12px; overflow: hidden; }
#workflow-editor-page .wfe-minimap-toggle { background: var(--f-card); color: var(--f-muted); border: 0; }

/* ---------- Blocs ---------- */
#workflow-editor-page .wfe-node {
  background: var(--f-card);
  border: 1px solid var(--f-line-3);
  border-radius: 16px;
  box-shadow: none;
  color: var(--f-text);
}
#workflow-editor-page .wfe-node:hover { box-shadow: none; border-color: var(--f-line-4); }
#workflow-editor-page .wfe-node.selected { border: 1px solid var(--f-accent); box-shadow: 0 0 0 4px rgba(62, 207, 142, .14); }
#workflow-editor-page .wfe-node-header { height: auto; min-height: 0; padding: 12px 14px 0; background: none; color: var(--f-text); border-radius: 16px 16px 0 0; gap: 8px; align-items: flex-start; }
#workflow-editor-page .wfe-node-heading { display: flex; flex-direction: column; min-width: 0; flex: 1; }
#workflow-editor-page .wfe-node-kicker { font: 400 10px 'Geist Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--f-dim); }
#workflow-editor-page .wfe-node-title { margin: 4px 0 6px; font: 600 14px Inter, sans-serif; color: var(--f-text); white-space: normal; }
#workflow-editor-page .wfe-node-cost { font: 400 11px 'Geist Mono', monospace; color: var(--f-muted); background: none; padding: 0; }
#workflow-editor-page .wfe-node-menu { color: var(--f-dim); }
#workflow-editor-page .wfe-node-status { display: flex; align-items: center; gap: 6px; padding: 0 14px 4px; color: var(--f-dim); font: 400 10.5px 'Geist Mono', monospace; }
#workflow-editor-page .wfe-node-status-text { color: var(--f-dim); }
#workflow-editor-page .wfe-node-ports { padding: 4px 0 10px; }
#workflow-editor-page .wfe-port-row { color: var(--f-muted); font-size: 11px; }
/* Les ports gardent la teinte ET la forme de leur type (texte, nombre, liste, objet) : la couleur seule ne dit pas le type. */
#workflow-editor-page .wfe-port { width: 10px; height: 10px; box-sizing: content-box; background: var(--f-stage); border: 2px solid var(--port-color, var(--f-dim)); }
#workflow-editor-page .wfe-port.connected { background: var(--port-color, var(--f-accent)); }
#workflow-editor-page .wfe-port.input { left: -9px; }
#workflow-editor-page .wfe-port.output { right: -9px; }
#workflow-editor-page .wfe-port[data-port-type="array"]:not(.routing) { border-radius: 2px; }
#workflow-editor-page .wfe-port[data-port-type="object"]:not(.routing) { width: 8px; height: 12px; top: 5px; border-radius: 5px; }
#workflow-editor-page .wfe-port.input[data-port-type="object"]:not(.routing) { left: -7px; }
#workflow-editor-page .wfe-port.output[data-port-type="object"]:not(.routing) { right: -7px; }
#workflow-editor-page .wfe-node-disabled { opacity: .5; }
#workflow-editor-page .wfe-compact-field,
#workflow-editor-page .wfe-node input[type="text"],
#workflow-editor-page .wfe-node input[type="number"],
#workflow-editor-page .wfe-node textarea,
#workflow-editor-page .wfe-node select {
  background: var(--f-input); color: var(--f-text); border: 1px solid var(--f-line-3); border-radius: 8px; font: 400 12px Inter, sans-serif;
}

/* ---------- Palette (colonne gauche) ---------- */
#fSide .wfe-palette {
  flex: 1 1 auto; width: auto; min-height: 0; height: auto;
  background: none; border: 0; padding: 0;
  display: flex; flex-direction: column; gap: 14px; overflow: hidden;
}
#fSide .wfe-palette.collapsed { width: auto; flex-basis: auto; }
#fSide .wfe-palette.collapsed .wfe-search-field,
#fSide .wfe-palette.collapsed .wfe-category-list { display: flex; }
#fSide .wfe-palette-head { display: none; }
#fSide .wfe-search-field {
  display: flex; align-items: center; gap: 6px; flex: none; height: 36px; padding: 0 10px;
  border-radius: 10px; background: var(--f-input); border: 1px solid var(--f-line-2); color: var(--f-dim); font-size: 12px;
}
#fSide .wfe-search-field .material-symbols-outlined { display: none; }
#fSide .wfe-search-field::before { content: "⌕"; font-size: 14px; }
#fSide .wfe-search { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--f-text); font: 400 12px Inter, sans-serif; padding: 0; height: auto; }
#fSide .wfe-search::placeholder { color: var(--f-dim); }
#fSide .wfe-category-list { flex: 1; min-height: 0; overflow: auto; padding: 0; display: flex; flex-direction: column; gap: 14px; }
#fSide .wfe-category { border: 0; }
#fSide .wfe-category-toggle,
#fSide .wfe-subcategory-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0; margin: 0 0 8px; border: 0; background: none; cursor: pointer;
  font: 400 10.5px 'Geist Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--f-dim);
}
#fSide .wfe-category-toggle:hover { color: var(--f-muted); }
#fSide .wfe-category-chevron { display: none; }
#fSide .wfe-category-name { font: inherit; color: inherit; }
#fSide .wfe-category-count { font: inherit; color: inherit; }
#fSide .wfe-subcategory { margin: 10px 0 0; }
#fSide .wfe-category-tools { display: flex; flex-direction: column; }
#fSide .wfe-tool-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; margin: 0 0 6px; border: 0; border-radius: 10px;
  background: var(--f-card); color: var(--f-text); font: 400 13px Inter, sans-serif; text-align: left; cursor: grab;
}
#fSide .wfe-tool-row:hover { background: var(--f-s2); }
#fSide .wfe-tool-dot { width: 13px; height: 13px; flex: none; border-radius: 3px; background: transparent !important; border: 1.8px solid var(--f-accent); }
#fSide .wfe-tool-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#fSide .wfe-tool-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#fSide .wfe-tool-help { display: none; }
#fSide .wfe-tool-grip { display: none; }
#fSide .wfe-tool-cost { margin-left: auto; font: 400 11px 'Geist Mono', monospace; color: var(--f-muted); }

/* ---------- Barre « Décrire une étape à ajouter… » ---------- */
#workflow-editor-page .wfe-ai { width: 520px; max-width: calc(100% - 36px); bottom: 18px; }
#workflow-editor-page .wfe-ai-bar { background: #17181B; border: 1px solid var(--f-line-4); border-radius: 16px; padding: 6px 8px 6px 14px; box-shadow: none; color: var(--f-muted); }
#workflow-editor-page .wfe-ai-bar:hover { border-color: var(--f-line-4); }
#workflow-editor-page .wfe-ai-bar:focus-within { border-color: var(--f-accent); box-shadow: none; }
#workflow-editor-page .wfe-ai-input { color: var(--f-text); font: 400 13px Inter, sans-serif; }
#workflow-editor-page .wfe-ai-input::placeholder { color: var(--f-muted); }
#workflow-editor-page .wfe-ai-icon-btn { color: var(--f-muted); }
#workflow-editor-page .wfe-ai-send:not(:disabled) { background: var(--f-accent); color: var(--f-bg); }

/* L'état d'Unity tient dans l'espace du titre : une pastille ronde suffit (le texte reste dans l'info-bulle). */
#workflow-editor-page .wfe-unity-chip { width: 8px; height: 8px; padding: 0; font-size: 0; background: var(--f-warn); }
#workflow-editor-page .wfe-unity-chip[data-state="online"] { background: var(--f-accent); }

/* ---------- Blocs : mise en page de F-Editeur (catégorie, titre, coût, état) ---------- */
#workflow-editor-page .wfe-node-header { position: relative; display: block; padding: 12px 14px 0; }
#workflow-editor-page .wfe-node-heading { display: flex; flex-direction: column; gap: 0; }
#workflow-editor-page .wfe-node-kicker { line-height: 14px; }
#workflow-editor-page .wfe-node-title { display: block; margin: 2px 0 0; padding-right: 22px; line-height: 18px; font-size: 14px; font-weight: 600; }
#workflow-editor-page .wfe-node-cost { position: absolute; top: 12px; right: 30px; }
#workflow-editor-page .wfe-node-status { position: absolute; left: 14px; right: 14px; top: 50px; height: 14px; padding: 0; gap: 6px; font: 400 11px 'Geist Mono', monospace; color: var(--f-muted); }
#workflow-editor-page .wfe-node-status-dot { width: 7px; height: 7px; background: var(--f-s4); }
#workflow-editor-page .wfe-node-menu { position: absolute; top: 8px; right: 6px; width: 24px; height: 24px; padding: 0; border: 0; background: none; color: var(--f-muted); opacity: 0; border-radius: 8px; }
#workflow-editor-page .wfe-node:hover .wfe-node-menu,
#workflow-editor-page .wfe-node.selected .wfe-node-menu,
#workflow-editor-page .wfe-node-menu:focus-visible { opacity: 1; }
#workflow-editor-page .wfe-node-menu:hover { background: var(--f-s4); color: var(--f-text); }
#workflow-editor-page .wfe-node-compact .wfe-node-header { display: flex; align-items: center; height: 100%; padding: 0 28px 0 14px; gap: 10px; }
#workflow-editor-page .wfe-node-compact .wfe-node-kicker { display: none; }
#workflow-editor-page .wfe-node-compact .wfe-node-title { margin: 0; padding: 0; }
#workflow-editor-page .wfe-port-label { color: var(--f-muted); }
#workflow-editor-page .wfe-port-type { font-family: 'Geist Mono', monospace; color: var(--f-dim); margin-left: 4px; }
#workflow-editor-page .wfe-outputs-toggle { border: 0; background: none; color: var(--f-dim); font: 400 10.5px 'Geist Mono', monospace; letter-spacing: .06em; text-transform: uppercase; padding: 0; cursor: pointer; }
#workflow-editor-page .wfe-outputs-divider { border-top: 1px solid var(--f-line); }

/* ---------- Colonne de droite : l'inspecteur du bloc sélectionné (.insp du board) ---------- */
#fAside .wfe-inspector {
  flex: 1 1 auto; width: auto; min-height: 0; height: auto; transform: none; overflow: auto;
  display: flex; flex-direction: column; gap: 10px; padding: 18px; margin: 0;
  background: none; border: 0; box-shadow: none; transition: none; backdrop-filter: none;
}
#fAside .wfe-inspector.closed { width: auto; flex-basis: auto; overflow: auto; border: 0; }
#fAside .wfe-inspector.closed:empty::before {
  content: "Bloc sélectionné"; display: block; margin-bottom: 8px;
  font: 400 10.5px 'Geist Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--f-dim);
}
#fAside .wfe-inspector.closed:empty::after { content: "Clique sur un bloc du canevas pour régler ses paramètres."; display: block; color: var(--f-muted); font-size: 13px; line-height: 19px; }
#fAside .wfe-pane-tabs { display: none; }
#fAside .wfe-inspector-head { display: flex; flex-direction: column; gap: 6px; }
#fAside .wfe-inspector-category { order: -1; margin: 0; font: 400 10.5px 'Geist Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--f-dim); }
#fAside .wfe-inspector h3 { margin: 0; font: 700 18px Manrope, sans-serif; color: var(--f-text); letter-spacing: -.01em; }
#fAside .wfe-inspector-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
#fAside .wfe-inspector-tab { height: 28px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--f-muted); font: 500 12px Inter, sans-serif; cursor: pointer; }
#fAside .wfe-inspector-tab:hover { color: var(--f-text); }
#fAside .wfe-inspector-tab.is-on { background: var(--f-s2); color: var(--f-text); }
#fAside .wfe-inspector-inner { padding: 0; display: flex; flex-direction: column; gap: 10px; }
#fAside .wfe-inspector-desc { margin: 0; color: var(--f-muted); font-size: 13px; line-height: 19px; }
#fAside .wfe-inspector-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
#fAside .wfe-inspector-field > span { font: 400 12px Inter, sans-serif; color: var(--f-text-2); }
#fAside .wfe-inspector-field input,
#fAside .wfe-inspector-field select,
#fAside .wfe-inspector-field textarea,
#fAside .wfe-inspector input[type="text"],
#fAside .wfe-inspector input[type="number"],
#fAside .wfe-inspector select,
#fAside .wfe-inspector textarea {
  width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--f-line-3); border-radius: 11px;
  background: var(--f-card); color: var(--f-text-body); font: 400 13px Inter, sans-serif; box-shadow: none;
}
#fAside .wfe-inspector textarea { padding: 10px 12px; line-height: 19px; resize: vertical; }
#fAside .wfe-inspector input:focus, #fAside .wfe-inspector select:focus, #fAside .wfe-inspector textarea:focus { border-color: var(--f-accent); outline: 0; }
#fAside .wfe-inspector input[type="checkbox"] { width: auto; min-height: 0; accent-color: var(--f-accent); }
#fAside .wfe-inspector-section { margin: 8px 0 0; font: 400 10.5px 'Geist Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--f-dim); }
#fAside .wfe-inspector-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; }
#fAside .wfe-inspector .btn { height: 38px; padding: 0 16px; border: 0; border-radius: 11px; background: var(--f-s4); color: var(--f-text); font: 600 13px Inter, sans-serif; cursor: pointer; }
#fAside .wfe-inspector-foot .wfe-inspector-delete { color: var(--f-error); }

/* ---------- Journal d'exécution : panneau sous le canevas (F-EditeurJournal) ---------- */
#workflow-editor-page .wfe-canvas-shell { flex-direction: column; }
#workflow-editor-page .wfe-canvas { flex: 1 1 auto; }
#workflow-editor-page .wfe-journal-panel {
  position: static; flex: none; height: 250px; width: auto; max-height: 250px; display: flex; flex-direction: column;
  padding: 12px 20px; background: var(--f-bg); border: 0; border-top: 1px solid var(--f-line-2); border-radius: 0; box-shadow: none; overflow: hidden;
  font: 400 12px 'Geist Mono', monospace; color: #B6B6BA; transform: none;
}
#workflow-editor-page .wfe-journal-panel[hidden] { display: none; }
#workflow-editor-page .wfe-pane-tabs-slot { display: none; }
#workflow-editor-page .wfe-journal-header { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; padding: 0; border: 0; background: none; }
#workflow-editor-page .wfe-journal-title { margin: 0; font: 600 12px Inter, sans-serif; color: var(--f-text); }
#workflow-editor-page .wfe-journal-summary { margin-left: auto; color: var(--f-muted); font: 400 12px Inter, sans-serif; }
#workflow-editor-page .wfe-journal-filters { display: flex; gap: 4px; }
#workflow-editor-page .wfe-journal-filter { height: 24px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--f-muted); font: 500 11px Inter, sans-serif; cursor: pointer; }
#workflow-editor-page .wfe-journal-filter[aria-pressed="true"] { background: var(--f-s2); color: var(--f-text); }
#workflow-editor-page .wfe-journal-count { font-family: 'Geist Mono', monospace; color: var(--f-dim); margin-left: 3px; }
#workflow-editor-page .wfe-journal-count.is-error { color: var(--f-error); }
#workflow-editor-page .wfe-journal-runs-link { color: var(--f-muted); font: 400 11px Inter, sans-serif; text-decoration: underline; text-underline-offset: 2px; }
#workflow-editor-page .wfe-journal-close { width: 26px; height: 26px; border: 0; border-radius: 8px; background: none; color: var(--f-muted); cursor: pointer; }
#workflow-editor-page .wfe-journal-close:hover { background: var(--f-s2); color: var(--f-text); }
#workflow-editor-page .wfe-journal-body { flex: 1; min-height: 0; margin: 0; padding: 0; list-style: none; overflow: auto; }
#workflow-editor-page .wfe-journal-empty { padding: 8px 0; color: var(--f-dim); font: 400 12px Inter, sans-serif; }
#workflow-editor-page .wfe-journal-step { display: flex; align-items: flex-start; gap: 14px; padding: 4px 0; margin: 0; border: 0; background: none; color: #B6B6BA; }
#workflow-editor-page .wfe-journal-main { flex: 1; min-width: 0; }
#workflow-editor-page .wfe-journal-head { display: flex; align-items: center; gap: 14px; }
#workflow-editor-page .wfe-journal-time { width: 64px; color: var(--f-dim); order: -1; }
#workflow-editor-page .wfe-journal-meta { margin-left: auto; display: flex; gap: 10px; color: #B6B6BA; }
#workflow-editor-page .wfe-journal-status { color: var(--f-muted); }
#workflow-editor-page .wfe-journal-status-failed .wfe-journal-status,
#workflow-editor-page .wfe-journal-error-line { color: var(--f-error); }
#workflow-editor-page .wfe-journal-toggle { border: 0; background: none; color: var(--f-muted); cursor: pointer; }
#workflow-editor-page .wfe-journal-section { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: var(--f-card); }
#workflow-editor-page .wfe-journal-section .btn { height: 26px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--f-s4); color: var(--f-text); font: 500 11px Inter, sans-serif; }
/* Le journal ouvert pousse la barre de l'assistant et les contrôles au-dessus de lui (ils sont posés sur le canevas). */
#workflow-editor-page .wfe-canvas-shell:has(.wfe-journal-panel:not([hidden])) .wfe-ai { bottom: 268px; }
#workflow-editor-page .wfe-follow-run { position: absolute; left: 18px; bottom: 18px; z-index: 12; }

/* ---------- Menus contextuels, mentions, commandes « / » (F-EditeurMenus) ---------- */
body .wfe-context, body .wfe-flyout, body .wfe-link-menu, body .wfe-marks-menu {
  background: var(--f-s2); border: 1px solid var(--f-line-3); border-radius: 14px; padding: 6px; box-shadow: 0 24px 50px -12px #000; color: #D6D6DA; font: 400 13px Inter, sans-serif;
}
body .wfe-context button, body .wfe-flyout button, body .wfe-link-menu-item, body .wfe-marks-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: 9px;
  background: none; color: #D6D6DA; font: 400 13px Inter, sans-serif; text-align: left; cursor: pointer;
}
body .wfe-context button:hover, body .wfe-flyout button:hover, body .wfe-link-menu-item:hover, body .wfe-marks-menu button:hover { background: var(--f-s4); }
body .wfe-context kbd, body .wfe-flyout kbd, body .wfe-ai-menu kbd { font: 400 11px 'Geist Mono', monospace; color: var(--f-dim); background: none; border: 0; padding: 0; }
body .wfe-ai-panel, body .wfe-ai-menu { background: var(--f-s2); border: 1px solid var(--f-line-3); border-radius: 14px; box-shadow: 0 24px 50px -12px #000; color: #D6D6DA; }
body .wfe-ai-menu-item, body .wfe-ai-mention-item { display: flex; align-items: center; justify-content: space-between; min-height: 36px; padding: 0 10px; border-radius: 9px; color: #D6D6DA; font: 400 13px Inter, sans-serif; }
body .wfe-ai-menu-item:hover, body .wfe-ai-menu-item.is-active, body .wfe-ai-mention-item:hover, body .wfe-ai-mention-item.is-active { background: var(--f-s4); }
body .wfe-ai-mention-section, body .wfe-ai-menu-head { padding: 6px 10px 4px; font: 400 10px 'Geist Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--f-dim); }

/* ---------- Barre « Décrire une étape à ajouter… » : au centre du canevas, 520 px ---------- */
#workflow-editor-page .wfe-ai { left: 50%; bottom: 18px; width: 520px; max-width: calc(100% - 36px); transform: translateX(-50%); }
#workflow-editor-page .wfe-ai-spark { display: none; }
#workflow-editor-page .wfe-ai-bar { align-items: center; min-height: 46px; }
#workflow-editor-page .wfe-ai-input { min-height: 28px; padding: 0; background: transparent; }
#workflow-editor-page .wfe-ai-cmds { font: 400 11px 'Geist Mono', monospace; background: var(--f-s4); color: #C9C9CE; padding: 2px 6px; border-radius: 6px; order: 5; }
#workflow-editor-page .wfe-ai-send { height: 30px; width: auto; padding: 0 10px; border-radius: 9px; font: 600 12px Inter, sans-serif; }
#workflow-editor-page .wfe-ai-send:disabled { display: none; }
#workflow-editor-page .wfe-canvas-controls { z-index: 12; }

/* ---------- Anatomie du bloc : la géométrie suit workflow-editor.js (ports à 68 px, rangées de 22 px) ---------- */
#workflow-editor-page .wfe-node-ports { position: absolute; left: 0; right: 0; top: 68px; padding: 0; pointer-events: none; }
#workflow-editor-page .wfe-port-row { height: 22px; padding: 0; pointer-events: none; }
#workflow-editor-page .wfe-port { pointer-events: auto; top: 6px; }
#workflow-editor-page .wfe-node .wfe-port-row > .wfe-port-label { flex: 1 1 0; min-width: 0; max-width: none; margin: 0 14px; font: 400 12px/22px Inter, sans-serif; color: var(--f-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Le champ d'une entrée se pose dans la rangée (le board n'a pas de champ flottant à gauche du bloc). */
#workflow-editor-page .wfe-port-row.has-field > .wfe-port-label { flex: 0 0 auto; max-width: 124px; margin-right: 8px; }
#workflow-editor-page .wfe-port-field {
  position: static; right: auto; top: auto; flex: 1 1 auto; min-width: 0; width: auto; height: 22px; margin: 0 14px 0 0; padding: 0;
  display: flex; align-items: center; background: none; border: 0; box-shadow: none; pointer-events: auto;
}
#workflow-editor-page .wfe-port-field::before, #workflow-editor-page .wfe-port-field::after { content: none; }
#workflow-editor-page .wfe-port-field-control {
  width: 100%; min-width: 0; height: 22px; padding: 0 7px; border: 1px solid var(--f-line-3); border-radius: 7px;
  background: var(--f-input); color: var(--f-text-body); font: 400 11.5px Inter, sans-serif; box-shadow: none;
}
#workflow-editor-page .wfe-port-field-control:focus { border-color: var(--f-accent); outline: 0; }
#workflow-editor-page .wfe-port-field-control.is-toggle { width: 16px; height: 16px; padding: 0; accent-color: var(--f-accent); }
#workflow-editor-page .gs-trigger.wfe-port-field-control { display: flex; align-items: center; justify-content: space-between; gap: 4px; text-align: left; cursor: pointer; }
#workflow-editor-page .wfe-compact-value { flex: 1; min-width: 0; display: block; }
#workflow-editor-page .wfe-compact-field { width: 100%; height: 26px; padding: 0 8px; }
#workflow-editor-page .wfe-minimap.is-collapsed { width: auto; height: auto; padding: 0; }
#workflow-editor-page .wfe-minimap-toggle { width: 34px; height: 34px; }
#workflow-editor-page .wfe-minimap.is-collapsed .wfe-minimap-canvas { display: none; }

/* ---------- Fenêtres de l'éditeur : lancement, partage, livraison, publication, déclencheur (F-EditeurModales) ---------- */
body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) .shell-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0; margin: 0; border: 0; background: none; }
body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) .shell-dialog-title { font: 700 22px Manrope, sans-serif; letter-spacing: -.01em; color: var(--f-text); }
body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) .icon-btn { width: 30px; height: 30px; border: 0; border-radius: 9px; background: transparent; color: var(--f-muted); font-size: 18px; line-height: 1; cursor: pointer; }
body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) .icon-btn:hover { background: var(--f-s4); color: var(--f-text); }
body .wfe-launch-dialog, body .wfe-share-dialog, body .wfe-contract-dialog, body .wfe-trigger-dialog { width: 560px; padding: 22px; gap: 16px; background: var(--f-card); }
body .wfe-launch-body, body .wfe-share-body, body .wfe-contract-body, body .wfe-trigger-body { display: flex; flex-direction: column; gap: 14px; padding: 0; }
body .wfe-launch-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0; }
body .wfe-modal-tabs { display: flex; gap: 4px; padding: 0; }
body .wfe-modal-tab { height: 32px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--f-text-2); font: 500 13px Inter, sans-serif; cursor: pointer; }
body .wfe-modal-tab:hover { color: var(--f-text); }
body .wfe-modal-tab.is-on { background: var(--f-text); color: var(--f-bg); }
body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) .wfe-inspector-desc { margin: 0; color: var(--f-muted); font-size: 13px; line-height: 19px; }
body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) .wfe-launch-field, body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) .wfe-inspector-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) .wfe-launch-label, body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) .wfe-inspector-field > span { font: 400 12px Inter, sans-serif; color: var(--f-text-2); }
body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) .wfe-launch-field.is-switch { flex-direction: row; align-items: center; gap: 10px; }
body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) input[type="text"], body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) input[type="number"], body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) input[type="search"],
body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) input[type="url"], body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) input[type="password"], body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) input[type="time"],
body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) select, body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) textarea {
  width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--f-line-3); border-radius: 11px;
  background: var(--f-input); color: var(--f-text-body); font: 400 13px Inter, sans-serif; box-shadow: none;
}
body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) textarea { padding: 10px 12px; line-height: 19px; }
body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) input:focus, body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) select:focus, body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) textarea:focus { border-color: var(--f-accent); outline: 0; }
body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) input[type="checkbox"] { width: auto; min-height: 0; accent-color: var(--f-accent); }
body .wfe-launch-error { margin: 0; color: var(--f-error); font-size: 13px; }
body .wfe-share-form { display: flex; align-items: flex-end; gap: 8px; }
body .wfe-share-form .wfe-inspector-field { flex: 1; }
body .wfe-trigger-panel { display: flex; flex-direction: column; gap: 12px; }
#workflow-editor-page .wfe-save-status { max-width: 136px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }

/* ---------- Recette partagée : page hors application (F-PartagePublic) ---------- */
.shared-stage {
  position: relative; height: 330px; overflow: hidden; border-radius: 20px; border: 1px solid var(--f-line-2);
  background: var(--f-stage) radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 22px 22px;
}
.shared-graph { display: block; width: 100%; height: 100%; max-height: none; }
.shared-edge { fill: none; stroke: rgba(62, 207, 142, .55); stroke-width: 2; }
.shared-edge.is-order { stroke-dasharray: 6 4; }
.shared-node rect { fill: var(--f-card); stroke: var(--f-line-3); stroke-width: 1; }
.shared-node.is-disabled { opacity: .5; }
.shared-node-kind { fill: var(--f-dim); font: 400 10px 'Geist Mono', monospace; letter-spacing: .08em; text-transform: uppercase; }
.shared-node-title { fill: var(--f-text); font: 600 14px Inter, sans-serif; }
.shared-node-cost { fill: var(--f-muted); font: 400 11px 'Geist Mono', monospace; }
.shared-port { fill: var(--f-s4); stroke: var(--f-stage); stroke-width: 2; }
.shared-port.is-out { fill: var(--f-accent); }
.f.is-bare #appMain { padding: 0; }
.au .lg { background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; text-shadow: none; isolation: auto; }
.au .lg::before { display: none; }
#shared-page .card { border: 0; box-shadow: none; background: var(--f-card); border-radius: 16px; padding: 16px; }
#fAside .wfe-inspector-foot { flex-wrap: wrap; }
#fAside .wfe-inspector-foot .wfe-toolbar-spacer { display: none; }
#fAside .wfe-inspector-foot .wfe-inspector-delete { margin-left: auto; }

/* La palette et l'inspecteur restent dans les colonnes du shell quand on quitte l'éditeur : on les masque hors de sa page. */
body:not(:has(#workflow-editor-page.active)) #fSide > .wfe-palette,
body:not(:has(#workflow-editor-page.active)) #fAside > .wfe-inspector { display: none; }

/* Focus au clavier (accessibilité) : l'anneau vert, partout dans l'éditeur. */
#workflow-editor-page :focus-visible, #fSide .wfe-palette :focus-visible, #fAside .wfe-inspector :focus-visible,
body :is(.wfe-launch-dialog, .wfe-share-dialog, .wfe-contract-dialog, .wfe-trigger-dialog, .dp-dialog) :focus-visible, body .wfe-ai :focus-visible { outline: 2px solid var(--f-accent); outline-offset: 2px; }
#workflow-editor-page .wfe-node:focus-visible { outline-offset: 3px; }

/* Dans la zone des ports (qui laisse passer le pointeur vers le fond), les commandes restent cliquables. */
#workflow-editor-page .wfe-node-ports button, #workflow-editor-page .wfe-node-ports input, #workflow-editor-page .wfe-node-ports select,
#workflow-editor-page .wfe-node-ports textarea, #workflow-editor-page .wfe-port-field, #workflow-editor-page .wfe-outputs-toggle { pointer-events: auto; }
/* Un fil s'épaissit sous le pointeur ; les blocs sont peints par-dessus (pas d'ombre sur le board : le trait suffit). */
#workflow-editor-page .wfe-edge-group:hover .wfe-edge-line { stroke-width: 3.5; }

/* Mini-carte : 140 x 100 sous 1400 px de large, 200 x 140 au-dessus (le calcul du dessin suit workflow-editor.js). */
#workflow-editor-page .wfe-minimap-canvas { width: 200px; height: 140px; }
@media (max-width: 1399px) { #workflow-editor-page .wfe-minimap-canvas { width: 140px; height: 100px; } }

/* ---------- État d'exécution d'un bloc : le point vert du board (rouge en échec, ambre en attente) ---------- */
#workflow-editor-page .wfe-run-badge {
  position: absolute; top: 12px; right: 12px; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 9px;
  background: var(--f-accent); font-size: 0; line-height: 0; color: transparent; box-shadow: none;
}
#workflow-editor-page .wfe-node[data-run-state="failure"] > .wfe-run-badge { background: var(--f-error); }
#workflow-editor-page .wfe-node[data-run-state="waiting"] > .wfe-run-badge { background: var(--f-warn); }
#workflow-editor-page .wfe-node[data-run-state="skipped"] > .wfe-run-badge, #workflow-editor-page .wfe-node[data-run-state="cancelled"] > .wfe-run-badge { background: var(--f-dim); }
#workflow-editor-page .wfe-node[data-run-state="failure"] { border-color: rgba(255, 105, 97, .6); }
#workflow-editor-page .wfe-node[data-run-state="running"] { border-color: var(--f-accent); }

/* ---------- Notifications de l'éditeur : le toast du board (en bas à droite, point d'état coloré) ---------- */
body .wfe-toast {
  position: fixed; left: auto; right: 20px; bottom: 20px; transform: none; z-index: 100004; min-width: 300px; max-width: 420px;
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--f-line-3);
  background: var(--f-s2); color: var(--f-text); box-shadow: 0 20px 40px -12px #000; font: 500 13px Inter, sans-serif;
}
body .wfe-toast::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 9px; background: var(--f-accent); }
body .wfe-toast.error { background: var(--f-s2); color: var(--f-text); border-color: rgba(255, 105, 97, .4); }
body .wfe-toast.error::before { background: var(--f-error); }

/* ---------- Ce qu'un bloc dit de son exécution : état, durée, erreur, résumé du résultat, aperçu ---------- */
#workflow-editor-page .wfe-node[data-run-state="success"] .wfe-node-status-dot { background: var(--f-accent); }
#workflow-editor-page .wfe-node[data-run-state="running"] .wfe-node-status { color: var(--f-accent); }
#workflow-editor-page .wfe-node[data-run-state="running"] .wfe-node-status-dot { background: var(--f-accent); }
#workflow-editor-page .wfe-node[data-run-state="waiting"] .wfe-node-status { color: var(--f-warn); }
#workflow-editor-page .wfe-node[data-run-state="waiting"] .wfe-node-status-dot { background: var(--f-warn); }
#workflow-editor-page .wfe-node[data-run-state="failure"] .wfe-node-status { color: var(--f-error); }
#workflow-editor-page .wfe-node[data-run-state="failure"] .wfe-node-status-dot { background: var(--f-error); }
#workflow-editor-page .wfe-node[data-run-state="skipped"] .wfe-node-status-dot { background: var(--f-dim); }
#workflow-editor-page .wfe-node-status-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#workflow-editor-page .wfe-node-progress { display: none; position: absolute; left: 14px; right: 14px; top: 64px; height: 2px; border-radius: 2px; background: var(--f-line-3); overflow: hidden; }
#workflow-editor-page .wfe-node[data-run-state="running"] .wfe-node-progress { display: block; }
#workflow-editor-page .wfe-node-progress::after { content: ""; display: block; width: 43%; height: 100%; background: var(--f-accent); }
#workflow-editor-page .wfe-run-timer { position: absolute; right: 14px; top: 50px; font: 400 11px 'Geist Mono', monospace; color: var(--f-muted); }
#workflow-editor-page .wfe-run-error {
  position: absolute; left: 14px; right: 14px; top: 50px; height: 14px; padding: 0 0 0 14px; margin: 0; border: 0; background: none; text-align: left;
  color: var(--f-error); font: 400 11px/14px 'Geist Mono', monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
}
#workflow-editor-page .wfe-node-preview {
  position: absolute; right: 14px; top: 48px; max-width: 46%; height: 18px; padding: 0; border: 0; background: none; text-align: right;
  font: 400 11px 'Geist Mono', monospace; color: var(--f-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
}
#workflow-editor-page .wfe-node-preview:hover { color: var(--f-text); }
#workflow-editor-page .wfe-node-media {
  position: absolute; left: 10px; right: 10px; box-sizing: border-box; overflow: hidden; display: flex; align-items: center; gap: 8px;
  border-radius: 10px; background: var(--f-stage); border: 1px solid var(--f-line-2); color: var(--f-text-2); cursor: pointer;
}
#workflow-editor-page .wfe-node-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
#workflow-editor-page .wfe-node-media[data-kind="lines"], #workflow-editor-page .wfe-node-media[data-kind="table"] { flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 6px 8px; gap: 2px; }
#workflow-editor-page .wfe-media-lines { margin: 0; font: 400 11px/1.4 'Geist Mono', monospace; white-space: pre; overflow: hidden; text-overflow: ellipsis; color: var(--f-text-2); }
#workflow-editor-page .wfe-media-table { border-collapse: collapse; font: 400 11px/1.35 'Geist Mono', monospace; width: 100%; table-layout: fixed; }
#workflow-editor-page .wfe-media-table th { text-align: left; color: var(--f-dim); font-weight: 500; border-bottom: 1px solid var(--f-line-2); }
#workflow-editor-page .wfe-media-table th, #workflow-editor-page .wfe-media-table td { padding: 1px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#workflow-editor-page .wfe-media-more { font-size: 10px; color: var(--f-dim); }
#workflow-editor-page .wfe-media-name { font: 400 12px 'Geist Mono', monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#workflow-editor-page .wfe-media-load { all: unset; box-sizing: border-box; width: 100%; padding: 0 10px; font: 400 12px Inter, sans-serif; color: var(--f-text-2); cursor: pointer; text-align: center; }
#workflow-editor-page .wfe-media-load:disabled { cursor: default; color: var(--f-dim); }
#workflow-editor-page .wfe-node-rename { width: calc(100% - 28px); height: 24px; padding: 0 6px; border: 1px solid var(--f-accent); border-radius: 7px; background: var(--f-input); color: var(--f-text); font: 600 14px Inter, sans-serif; outline: 0; }
#workflow-editor-page .wfe-field-hint { position: absolute; top: calc(100% + 2px); right: 0; z-index: 3; width: max-content; max-width: 200px; padding: 2px 8px; border-radius: 7px; background: var(--f-warn-bg); border: 1px solid rgba(232, 196, 106, .4); color: var(--f-warn); font: 400 11px Inter, sans-serif; }
#workflow-editor-page .wfe-node-pin { font: 400 10px 'Geist Mono', monospace; color: var(--f-muted); }
#workflow-editor-page .wfe-node-disabled-chip { position: absolute; top: 12px; right: 56px; font: 400 10px 'Geist Mono', monospace; background: var(--f-s4); color: var(--f-text-2); border-radius: 6px; padding: 1px 5px; }
#workflow-editor-page .wfe-ghost { border-radius: 16px; border: 2px dashed var(--f-accent); background: var(--f-accent-12); }
#workflow-editor-page .wfe-selection-box { border: 1px dashed var(--f-accent); background: var(--f-accent-12); }

/* Boucles : le bouton qui replie / déplie le cadre se pose dans l'en-tête du bloc, à gauche de son menu. */
#workflow-editor-page .wfe-frame-toggle { position: absolute; top: 8px; right: 30px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--f-muted); cursor: pointer; z-index: 2; display: inline-grid; place-items: center; }
#workflow-editor-page .wfe-frame-toggle:hover { background: var(--f-s4); color: var(--f-text); }

/* Un fil « Après » (ordre d'exécution) est plus fin et pointillé : il ne transporte aucune valeur. */
#workflow-editor-page .wfe-edge-order .wfe-edge-line { stroke-width: 1.25; stroke-dasharray: 6 4; }
#workflow-editor-page .wfe-edge-order:hover .wfe-edge-line { stroke-width: 2.5; }

/* ---------- Bandeaux d'alerte de l'éditeur (F-Etats) : en haut du canevas, au centre ---------- */
#workflow-editor-page .wfe-semantics-notice, #workflow-editor-page .wfe-safety-notice, #workflow-editor-page .wfe-confirm-banner {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 20; width: calc(100% - 120px); max-width: 620px;
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--f-line-4);
  background: var(--f-card); color: var(--f-text); font: 400 12px/17px Inter, sans-serif; box-shadow: 0 24px 50px -12px #000;
}
#workflow-editor-page .wfe-safety-notice .btn, #workflow-editor-page .wfe-semantics-notice .btn, #workflow-editor-page .wfe-confirm-banner .btn {
  height: 30px; padding: 0 12px; border: 0; border-radius: 9px; background: var(--f-s4); color: var(--f-text); font: 600 12px Inter, sans-serif; cursor: pointer;
}
#workflow-editor-page .wfe-confirm-banner .btn.btn-primary, #workflow-editor-page .wfe-safety-notice .btn.btn-primary { background: var(--f-accent); color: var(--f-bg); }
/* Panneau Problèmes / Avertissements / Variables : repliable, avertissements ignorables un par un */
#workflow-editor-page .wfe-problems {
  position: absolute; top: 14px; right: 60px; z-index: 20; width: 340px; max-width: calc(100% - 120px); max-height: calc(100% - 90px);
  display: flex; flex-direction: column; padding: 4px; border-radius: 14px;
  border: 1px solid var(--f-line-3); background: var(--f-card); color: var(--f-text); font: 400 12px/17px Inter, sans-serif; box-shadow: 0 24px 50px -12px #000;
}
#workflow-editor-page .wfe-problems.has-problems { border-color: rgba(255, 105, 97, .35); }
#workflow-editor-page .wfe-problems.has-warnings { border-color: rgba(232, 196, 106, .3); }
#workflow-editor-page .wfe-problems.is-folded { width: auto; }
#workflow-editor-page .wfe-problems-head {
  all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 0 10px;
  border-radius: 10px; cursor: pointer; font: 600 12px Inter, sans-serif; color: var(--f-text);
}
#workflow-editor-page .wfe-problems-head:hover { background: var(--f-s2); }
#workflow-editor-page .wfe-problems-head:focus-visible { outline: 2px solid var(--f-accent); outline-offset: 1px; }
#workflow-editor-page .wfe-problems-dot { width: 8px; height: 8px; border-radius: 9px; flex: none; background: var(--f-dim); }
#workflow-editor-page .wfe-problems-head.has-problems .wfe-problems-dot { background: var(--f-error); }
#workflow-editor-page .wfe-problems-head.has-warnings .wfe-problems-dot { background: var(--f-warn); }
#workflow-editor-page .wfe-problems-head.is-quiet .wfe-problems-dot { background: var(--f-accent); }
#workflow-editor-page .wfe-problems-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#workflow-editor-page .wfe-problems-chevron { width: 14px; height: 14px; flex: none; color: var(--f-muted); }
#workflow-editor-page .wfe-problems-list { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 4px; overflow-y: auto; min-height: 0; }
#workflow-editor-page .wfe-problem-row { display: flex; align-items: flex-start; gap: 2px; border-radius: 10px; }
#workflow-editor-page .wfe-problem-row:hover { background: var(--f-s2); }
#workflow-editor-page .wfe-problem-go {
  all: unset; box-sizing: border-box; flex: 1; min-width: 0; padding: 7px 8px 7px 28px; position: relative; cursor: pointer;
  color: var(--f-text-2); font: 400 12px/17px Inter, sans-serif; overflow-wrap: anywhere; border-radius: 10px;
}
#workflow-editor-page .wfe-problem-go::before {
  content: ''; position: absolute; left: 12px; top: 12px; width: 7px; height: 7px; border-radius: 9px; background: var(--f-error);
}
#workflow-editor-page .wfe-problem-row.is-warning .wfe-problem-go::before { background: var(--f-warn); }
#workflow-editor-page .wfe-problem-go:hover { color: var(--f-text); }
#workflow-editor-page .wfe-problem-go:focus-visible, #workflow-editor-page .wfe-problem-ignore:focus-visible, #workflow-editor-page .wfe-problems-restore:focus-visible,
#workflow-editor-page .wfe-variable-row:focus-visible { outline: 2px solid var(--f-accent); outline-offset: -2px; }
#workflow-editor-page .wfe-problem-ignore {
  all: unset; box-sizing: border-box; flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin: 3px 4px 0 0;
  border-radius: 8px; color: var(--f-muted); cursor: pointer; opacity: 0;
}
#workflow-editor-page .wfe-problem-row:hover .wfe-problem-ignore, #workflow-editor-page .wfe-problem-ignore:focus-visible { opacity: 1; }
#workflow-editor-page .wfe-problem-ignore:hover { background: var(--f-s4); color: var(--f-text); }
#workflow-editor-page .wfe-problem-ignore svg { width: 14px; height: 14px; }
#workflow-editor-page .wfe-problems-ignored {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 4px 2px; padding: 8px 6px 4px;
  border-top: 1px solid var(--f-line); color: var(--f-muted); font: 400 11px 'Geist Mono', monospace;
}
#workflow-editor-page .wfe-problems-restore { all: unset; cursor: pointer; padding: 2px 6px; border-radius: 6px; color: var(--f-accent); font: 600 12px Inter, sans-serif; }
#workflow-editor-page .wfe-problems-restore:hover { background: var(--f-s2); }
#workflow-editor-page .wfe-problems-title {
  margin: 4px 4px 0; padding: 8px 6px 4px; border-top: 1px solid var(--f-line);
  font: 400 10px 'Geist Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--f-dim);
}
#workflow-editor-page .wfe-variable-row {
  all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px;
  border-radius: 10px; cursor: pointer; font: 400 12px Inter, sans-serif;
}
#workflow-editor-page .wfe-variable-row:hover { background: var(--f-s2); }
#workflow-editor-page .wfe-variable-name { font: 500 12px 'Geist Mono', monospace; color: var(--f-text); }
#workflow-editor-page .wfe-variable-value { color: var(--f-muted); font: 400 11px 'Geist Mono', monospace; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: none) { #workflow-editor-page .wfe-problem-ignore { opacity: 1; } }

/* ---------- Très dézoomé (< 35 %) : les blocs deviennent des cartes compactes (nom + état) ---------- */
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-node-kicker,
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-port-label,
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-port-field,
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-node-preview,
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-node-status-text,
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-node-menu,
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-node-progress,
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-run-timer,
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-node-thumb,
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-node-cost,
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-read-field,
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-port.order { display: none; }
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-node:not(.wfe-node-compact) .wfe-node-title { font-size: 20px; line-height: 24px; margin-top: 8px; white-space: normal; }
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-node-status { top: 70px; height: 20px; }
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-node-status-dot { width: 14px; height: 14px; }
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-edge-line { stroke-width: 3; }
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-node-media:not([data-kind="image"]) { display: none; }
#workflow-editor-page .wfe-world.is-zoomed-out .wfe-node-media[data-kind="image"] { display: flex; }

/* ---------- Reprise d'un bloc en échec, pastilles de la barre, fil d'Ariane d'un sous-workflow ---------- */
#workflow-editor-page .wfe-run-resume { position: absolute; top: 46px; right: 14px; height: 20px; padding: 0 9px; border: 0; border-radius: 7px; background: var(--f-s4); color: var(--f-error); font: 600 11px Inter, sans-serif; cursor: pointer; z-index: 2; }
#workflow-editor-page .wfe-node:has(.wfe-run-resume) > .wfe-run-error { right: 96px; }
#workflow-editor-page .wfe-node-compact .wfe-run-resume { display: none; }
#workflow-editor-page .wfe-dry-chip, #workflow-editor-page .wfe-saved-chip { display: inline-block; padding: 3px 9px; border-radius: 99px; background: var(--f-s2); font: 400 11px 'Geist Mono', monospace; white-space: nowrap; }
#workflow-editor-page .wfe-dry-chip { color: var(--f-warn); }
#workflow-editor-page .wfe-saved-chip { color: var(--f-accent); }
#workflow-editor-page .wfe-breadcrumb { position: absolute; top: 12px; left: 56px; z-index: 28; display: flex; align-items: center; gap: 6px; max-width: 60%; padding: 5px 8px; border: 1px solid var(--f-line-3); border-radius: 10px; background: var(--f-card); }
#workflow-editor-page .wfe-breadcrumb-step { all: unset; cursor: pointer; color: var(--f-text-2); font: 400 13px Inter, sans-serif; padding: 2px 4px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
#workflow-editor-page .wfe-breadcrumb-step:hover, #workflow-editor-page .wfe-breadcrumb-step:focus-visible { color: var(--f-text); background: var(--f-s2); }
#workflow-editor-page .wfe-breadcrumb-sep { color: var(--f-dim); }
#workflow-editor-page .wfe-breadcrumb-current { font: 600 13px Inter, sans-serif; color: var(--f-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
