/* ═══════════════════════════════════════
   PROCESS NODE — prefix pn-
   Source: auto_process.html (maquette V2)
   ═══════════════════════════════════════ */

/* ══ CONTEXT OVERRIDE ═════════════════
   Strip .pn card styling when embedded
   inside a node-element (prevent double-card).
   Same pattern as .node-field-basse-temp:
   let the node-system handle padding,
   opacity, pointer-events naturally.
   ═══════════════════════════════════════ */

.node-field-process-auto .pn {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

/* ══ STANDALONE CARD (maquette context) ═ */
.pn {
  background: #0e1015;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
  overflow: hidden;
}

/* ══ PLACEHOLDER ════════════════════════ */
.pn-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 20px 14px;
  color: #8a919e; font-size: 12px;
  opacity: 0.7;
}

/* ══ COLLAPSED (connecté mais fermé) ════ */
.pn-collapsed {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px;
  cursor: pointer;
  transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.pn-collapsed:hover { background: rgba(255,255,255,0.03); }

.pn-col-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(107,159,199,0.1), rgba(107,159,199,0.04));
  border: 1px solid rgba(107,159,199,0.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 15px;
}

.pn-col-body { flex: 1; min-width: 0; }
.pn-col-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; font-weight: 600; color: #f0f0f0;
  letter-spacing: 0.2px;
}
.pn-col-sub {
  font-size: 11px; color: #555b69;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.pn-col-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px; font-weight: 700; color: #6b9fc7;
  line-height: 1; flex-shrink: 0;
}
.pn-col-count-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 7px; letter-spacing: 0.8px;
  text-transform: uppercase; color: #555b69;
  text-align: center;
}

.pn-col-chevron {
  color: #555b69; font-size: 14px;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0; opacity: 0.4;
}

/* ══ EXPANDED ═══════════════════════════ */
.pn-expanded { padding: 0; }

.pn-exp-header {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.pn-exp-header::after {
  content: ''; position: absolute;
  bottom: -1px; left: 14px; right: 14px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(107,159,199,0.15), transparent);
}

.pn-exp-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, rgba(107,159,199,0.12), rgba(107,159,199,0.04));
  border: 1px solid rgba(107,159,199,0.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 13px;
}
.pn-exp-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; font-weight: 600; color: #6b9fc7;
  flex: 1;
}
.pn-exp-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; color: #555b69;
  letter-spacing: 0.5px;
}

/* ══ STEPS LIST ═════════════════════════ */
.pn-steps {
  padding: 6px 10px 10px;
  display: flex; flex-direction: column; gap: 3px;
}

/* Single step */
.pn-s {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid transparent;
  transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Step main row */
.pn-s-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 12px;
  background: #13161d;
  position: relative;
}

/* Number pill */
.pn-s-num {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: rgba(107,159,199,0.08);
  border: 1px solid rgba(107,159,199,0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 700;
  color: #6b9fc7;
  margin-top: 1px;
}

/* Step content */
.pn-s-content { flex: 1; min-width: 0; }

.pn-s-action {
  font-size: 12.5px; color: #f0f0f0;
  line-height: 1.65; margin-bottom: 0;
}

/* Inline highlights */
.pn-s-action .h {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600; font-size: 11.5px;
  color: #6b9fc7;
}
.pn-s-action .t {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600; font-size: 11.5px;
  color: #c7a14e;
}
.pn-s-action .d {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600; font-size: 11.5px;
  color: #f0f0f0;
}

/* Duration tag (right aligned) */
.pn-s-dur {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 600;
  color: #555b69; letter-spacing: 0.3px;
  flex-shrink: 0; margin-top: 3px;
  padding: 2px 6px;
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
}

/* ══ CONTEXTUAL TIP ═════════════════════ */
.pn-s-tip {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 7px 12px 9px 44px;
  background: rgba(199,161,78,0.07);
  border-top: 1px solid rgba(199,161,78,0.15);
}
.pn-s-tip-icon {
  font-size: 10px; flex-shrink: 0; margin-top: 1px;
  opacity: 0.7;
}
.pn-s-tip-text {
  font-size: 11px; color: #c7a14e;
  line-height: 1.55; opacity: 0.85;
}

/* Info tip variant (blue) */
.pn-s-tip.info {
  background: rgba(107,159,199,0.08);
  border-top-color: rgba(107,159,199,0.15);
}
.pn-s-tip.info .pn-s-tip-text {
  color: #6b9fc7; opacity: 0.75;
}

/* Process note (grey, for technique tips) */
.pn-s-tip.note {
  background: rgba(255,255,255,0.015);
  border-top-color: rgba(255,255,255,0.06);
}
.pn-s-tip.note .pn-s-tip-text {
  color: #555b69;
}

/* ══ BLOCKER OVERLAY ════════════════════ */
.pn-blocker {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px;
  margin: 6px 10px 10px;
  background: rgba(180, 70, 70, 0.06);
  border: 1px solid rgba(180, 70, 70, 0.15);
  border-radius: 6px;
}
.pn-blocker-icon { font-size: 16px; flex-shrink: 0; }
.pn-blocker-body { flex: 1; }
.pn-blocker-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700;
  color: #c75f5f; letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.pn-blocker-msg {
  font-size: 12px; color: rgba(199,120,120,0.8);
  line-height: 1.6;
}
.pn-blocker-action {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 8px; padding: 4px 10px;
  background: rgba(180,70,70,0.08);
  border: 1px solid rgba(180,70,70,0.15);
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 600;
  color: #c79a7a; letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.pn-blocker-action:hover {
  background: rgba(180,70,70,0.12);
  color: #e8d5a3;
}
