/* Vue Signature (capture OCR) + éditeur G-code. */

.capture-card { display: flex; flex-direction: column; gap: 14px; }

.capture-zone {
  position: relative;
  min-height: 190px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: var(--muted); cursor: pointer;
  text-align: center; padding: 24px;
}
.capture-zone p { font-weight: 600; color: var(--text-2); }
.capture-zone svg { color: var(--primary); }
.capture-zone .corner {
  position: absolute; width: 22px; height: 22px;
  border: 2.5px solid var(--primary); opacity: .55;
}
.corner.tl { top: 10px; left: 10px; border-right: 0; border-bottom: 0; border-top-left-radius: 6px; }
.corner.tr { top: 10px; right: 10px; border-left: 0; border-bottom: 0; border-top-right-radius: 6px; }
.corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; border-bottom-left-radius: 6px; }
.corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; border-bottom-right-radius: 6px; }

.photo-thumb .page-no {
  position: absolute; left: 4px; bottom: 4px;
  background: rgba(16, 24, 40, .65); color: #fff;
  font-size: 11px; font-weight: 600;
  padding: 1px 7px; border-radius: 999px;
}

/* ── Éditeur G-code ── */
.ocr-warning {
  display: flex; align-items: center; gap: 10px;
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 13.5px; font-weight: 500;
}

.editor-wrap {
  position: relative;
  height: min(58vh, 560px);
}
.editor-hl, .editor-ta {
  position: absolute; inset: 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  padding: 12px 14px 12px 54px;
  white-space: pre;
  overflow: auto;
  tab-size: 4;
}
.editor-hl {
  background: #fafafa;
  color: var(--text);
  pointer-events: none;
  margin: 0;
}
.editor-ta {
  background: transparent;
  color: transparent;
  caret-color: var(--text);
  border: 0; resize: none; outline: none;
  -webkit-text-fill-color: transparent;
}
.editor-hl .eline { position: relative; min-height: 1.7em; counter-increment: eline; }
.editor-hl .eline::before {
  content: attr(data-n);
  position: absolute; left: -42px; width: 34px;
  text-align: right;
  color: var(--faint); font-size: 11.5px;
}
.editor-hl .eline.doubt { background: var(--danger-soft); box-shadow: inset 3px 0 0 var(--danger); }
.tk-comment { color: var(--faint); font-style: italic; }
.tk-block { color: var(--muted); }
.tk-g { color: var(--primary); font-weight: 600; }
.tk-val { color: var(--warn); }
.tk-kw { color: #7c3aed; font-weight: 600; }
.tk-doubt { color: var(--danger); font-weight: 700; }
