/* capture-corrections.css -- the retouches of « Capture vidéo » (planche Docs/refs/capture-corrections-design.html). */
.cr-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cr-toolbar[hidden], .cr-list[hidden], .cr-tool[hidden] { display: none !important; }
.cr-tool { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--border);
  border-radius: var(--r-pill); background: var(--bg-surface); color: var(--ink-2); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.cr-tool i { font-style: normal; color: var(--ink-muted); }
.cr-tool[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--ink); font-weight: 600; }
.cr-tool[aria-pressed="true"] i { color: var(--primary-hi); }
.cr-tool:disabled { opacity: .4; cursor: default; }
.cr-icon { width: 28px; padding: 0; justify-content: center; }
.cr-grow { flex: 1; }

.cr-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; touch-action: none; }
.cr-tip { position: absolute; z-index: 3; padding: 4px 8px; border-radius: 8px; background: rgba(21,30,45,.86); color: #fff;
  font-size: var(--fs-xs); line-height: 1.35; pointer-events: none; white-space: normal; max-width: min(360px, calc(100% - 8px)); }
.cr-tip span { color: #a9bda0; }

/* Marks on the range bar: retouches (diamonds and their reach), erased and swapped intervals, the selection. */
.cr-marks { position: absolute; inset: 0; pointer-events: none; }
.cr-mark { position: absolute; top: 6px; width: 9px; height: 9px; margin-left: -4.5px; transform: rotate(45deg); border-radius: 2px; pointer-events: auto; }
.cr-mark.point { background: #ffffff; box-shadow: 0 0 0 1px var(--ink-muted); }
.cr-mark.joint { background: #ff8c1a; }
.cr-scope { position: absolute; top: 7px; height: 8px; border-radius: 4px; background: rgba(120,184,74,.22); }
.cr-band { position: absolute; top: 5px; height: 12px; border-radius: 4px; pointer-events: auto; }
.cr-band.erase { background: repeating-linear-gradient(135deg, rgba(214,74,58,.35) 0 4px, transparent 4px 8px); border: 1px solid rgba(214,74,58,.5); }
.cr-band.swap { background: rgba(91,141,239,.25); border: 1px solid rgba(91,141,239,.6); }
.cr-sel { position: absolute; top: 4px; height: 14px; border-radius: 4px; background: rgba(214,74,58,.22); border: 1px solid rgba(214,74,58,.65); pointer-events: none; }
.cr-sel[hidden] { display: none; }

.cr-menu { position: fixed; z-index: 70; width: 280px; padding: 6px; background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: var(--shadow-lg); font-size: var(--fs-sm); }
.cr-menu[hidden] { display: none; }
.cr-menu-h { padding: 2px 6px 6px; font-size: var(--fs-xs); color: var(--ink-muted); }
.cr-menu button { display: grid; grid-template-columns: 18px 1fr; gap: 8px; width: 100%; padding: 6px; border: none; border-radius: 6px;
  background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.cr-menu button:hover, .cr-menu button:focus-visible { background: var(--bg-hover); outline: none; }
.cr-menu i { font-style: normal; color: var(--ink-2); }
.cr-menu small { display: block; font-size: var(--fs-xs); color: var(--ink-muted); }
.cr-menu hr { border: none; height: 1px; background: var(--border-soft); margin: 4px 0; }

.cr-list { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border: 1px solid var(--border-soft); border-radius: var(--r-sm); background: var(--bg-sunken); }
.cr-list-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: var(--fs-sm); padding: 0 2px 2px; }
.cr-hint { font-size: var(--fs-xs); color: var(--ink-muted); }
.cr-link { border: none; background: none; padding: 0; color: var(--primary-hi); font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.cr-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto auto 18px; align-items: center; gap: 8px; padding: 3px 4px; border-radius: 6px; font-size: var(--fs-sm); }
.cr-row:hover { background: var(--bg-surface); }
.cr-ic { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 6px; font-style: normal; font-size: 11px; color: #fff; }
.cr-ic[data-kind="point"] { background: #ffffff; color: #151e2d; box-shadow: 0 0 0 1px var(--border); }
.cr-ic[data-kind="joint"] { background: #ff8c1a; }
.cr-ic[data-kind="erase"] { background: #d64a3a; }
.cr-ic[data-kind="swap"] { background: #5b8def; }
.cr-go { min-width: 0; border: none; background: none; padding: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-go:hover { text-decoration: underline; }
.cr-when { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-2); white-space: nowrap; }
.cr-select { height: 24px; padding: 0 4px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-surface); color: var(--ink-2); font: inherit; font-size: var(--fs-xs); }
.cr-x { border: none; background: none; padding: 0; color: var(--ink-muted); font-size: 15px; cursor: pointer; }
.cr-x:hover { color: var(--danger); }

/* ── Marks above the range bar, on stems (« tirettes »); the time cursor's tab under it, in edit mode ──
   A mark is an upright box: the diamond on top (::before), the stem down to the bar (::after), both centred. */
.cap-trim.cr-editing { padding: 18px 0 16px; }
.cap-trim.cr-editing .cr-marks { top: -18px; bottom: auto; height: 40px; }
.cr-mark { position: absolute; top: 0; width: 12px; height: 27px; margin-left: -6px; transform: none; border-radius: 0; background: none !important; box-shadow: none !important; }
.cr-mark::before { content: ''; position: absolute; left: 2px; top: 0; width: 8px; height: 8px; transform: rotate(45deg); border-radius: 2px; background: currentColor; }
.cr-mark::after { content: ''; position: absolute; left: calc(50% - 0.75px); top: 6px; width: 1.5px; height: 21px; background: currentColor; opacity: .75; }
.cr-mark.point { color: #ffffff; filter: drop-shadow(0 0 1px rgba(21,30,45,.7)); }
.cr-mark.joint { color: #ff8c1a; }
.cap-trim.cr-editing .cr-scope { top: 25px; height: 8px; }
.cr-scope.held { background: rgba(255,140,26,.32); }
.cap-trim.cr-editing .cr-band { top: 2px; height: 10px; }
.cr-band.snap { background: rgba(255,140,26,.28); border: 1px solid rgba(255,140,26,.7); }
.cr-band::after { content: ''; position: absolute; left: -1px; right: -1px; top: 10px; height: 13px;
  border-left: 1.5px solid currentColor; border-right: 1.5px solid currentColor; opacity: .55; }
.cr-band.erase { color: #d64a3a; } .cr-band.swap { color: #5b8def; } .cr-band.snap { color: #ff8c1a; }
.cr-cursor { position: absolute; top: 9px; width: 2px; height: 26px; margin-left: -1px; padding: 0; border: none; background: var(--ink); cursor: ew-resize; }
.cr-cursor::after { content: ''; position: absolute; left: -6px; bottom: -8px; width: 14px; height: 12px; border-radius: 3px 3px 7px 7px; background: var(--ink); }
.cr-cursor:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.cr-cursor[hidden] { display: none; }
.cr-ic[data-kind="snap"] { background: #ff8c1a; }

/* The full-screen button on the video, bottom right, as on YouTube. */
.cr-fs { position: absolute; right: 6px; bottom: 6px; z-index: 2; width: 36px; height: 36px; padding: 6px; border: none; border-radius: 8px;
  background: rgba(21,30,45,.55); color: #fff; cursor: pointer; }
.cr-fs:hover { background: rgba(21,30,45,.8); }
.cr-fs svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.cr-fs:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.cap-pip .cr-fs { display: none; }

/* ── The large panel ── */
.cr-big { position: fixed; inset: 0; z-index: 65; display: flex; align-items: center; justify-content: center; background: rgba(21,30,45,.62); }
.cr-big[hidden] { display: none; }
html.cr-big-open { overflow: hidden; }
.cr-big-panel { display: flex; flex-direction: column; width: 92vw; height: 94vh; outline: none; background: var(--bg-surface); border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl); overflow: hidden; }
.cr-big-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3) var(--s2) var(--s4); border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.cr-big-close { height: 34px; padding: 0 var(--s4); border: none; border-radius: var(--r-pill); background: var(--ink); color: var(--bg-surface);
  font: inherit; font-size: var(--fs-md); font-weight: 600; cursor: pointer; }
.cr-big-close:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.cr-big-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto minmax(0, 1fr) auto;
  gap: var(--s2) var(--s3); padding: var(--s3); }
.cr-big-body > .cr-toolbar { grid-column: 1 / -1; }
.cr-big-body > .cap-player { grid-column: 1; grid-row: 2; min-height: 0; display: flex; align-items: center; justify-content: center; }
.cr-big-body > .cap-player video { width: 100%; height: 100%; max-height: none; }
.cr-big-body > .cap-trim { grid-column: 1; grid-row: 3; }
.cr-big-body > .cr-list { grid-column: 2; grid-row: 2 / span 2; overflow-y: auto; align-self: stretch; }
@media (max-width: 900px) {
  .cr-big-panel { width: 100vw; height: 100dvh; border-radius: 0; }
  .cr-big-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; }
  .cr-big-body > .cr-list { grid-column: 1; grid-row: 4; max-height: 28vh; }
}

/* ── Depth handles in the 3D scene (violet: the depth, along the camera's ray) ── */
.cr-dlayer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.cr-mark.depth { color: #9b78ff; }
.cr-ic[data-kind="depth"] { background: #9b78ff; }
.cr-mark.move3d { color: #9b78ff; }
.cr-ic[data-kind="move3d"] { background: #9b78ff; }

/* ── The selection (yellow) and the interval's start marked with K ── */
.cr-selchip { border-color: #e0b400; background: rgba(255,210,63,.18); color: var(--ink); font-weight: 600; }
.cr-mark-btn span { font-variant-numeric: tabular-nums; }
.cr-marka { position: absolute; top: -4px; width: 3px; height: 30px; margin-left: -1.5px; border-radius: 2px; background: #d64a3a; pointer-events: none; }
.cr-marka[hidden] { display: none; }

/* « Figer la rotation » (green: a hold, not a correction of the points) */
.cr-ic[data-kind="hold"] { background: #2f9e6b; }
.cr-band.hold { background: rgba(47,158,107,.22); border: 1px solid rgba(47,158,107,.6); color: #2f9e6b; }
.cr-menu button:disabled { opacity: .5; cursor: default; background: none; }

/* ── The toolbar on two lines: the tools, then the moves to apply, the hint, the interval's mark and the selection ── */
.cr-toolbar { flex-direction: column; align-items: stretch; gap: 4px; flex-wrap: nowrap; }
.cr-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 28px; }
.cr-line2 .cr-hint2 { min-width: 0; }
.cr-apply { border-color: var(--primary); background: var(--primary); color: #fff; font-weight: 600; }
.cr-apply i { color: #fff; }
.cr-list-sub { padding: 6px 2px 2px; font-size: var(--fs-xs); font-weight: 600; color: #4e8a2c; }
.cr-row.draft { background: rgba(150,204,106,.12); }
.cr-mark.draft { opacity: .6; }
.cr-scope.draft { background: repeating-linear-gradient(90deg, rgba(120,184,74,.3) 0 4px, transparent 4px 7px); }
.cr-ask { width: 260px; }
.cr-menu button:disabled { opacity: .5; cursor: default; background: none; }

/* « Figer les points » (cyan: the detection held still) */
.cr-ic[data-kind="lock"] { background: #1a9fbf; }
.cr-band.lock { background: rgba(26,159,191,.22); border: 1px solid rgba(26,159,191,.6); color: #1a9fbf; }
/* The interval's bar on top of the 3D scene */
.cr-scenebar { position: absolute; top: 8px; left: 8px; z-index: 2; display: flex; gap: 6px; }
.cr-scenebar[hidden] { display: none; }
.cr-scenebar .cr-tool { background: rgba(21,30,45,.72); border-color: rgba(255,255,255,.25); color: #fff; }
.cr-scenebar .cr-tool i { color: #ffd23f; }
/* « Bloquer le pied » (brown: a foot set on the ground) */
.cr-ic[data-kind="foot"] { background: #8a6a3a; }
.cr-band.foot { background: rgba(138,106,58,.22); border: 1px solid rgba(138,106,58,.6); color: #8a6a3a; }
