/* Notes pinned to a moment (16/11): the versions page (/) after mockups A2 (desktop) and A1 (phone),
   docs/revue-commentaires-instant-20261116/maquettes/. Loaded by index.html only: app.css, choices.css and revision.css,
   which the published revision pages use, do not change. The video keeps its own format (9:16 or 4:5): the player box is
   as wide as the column and the picture sits in it whole, never cropped. */

:root {
  --st-open: var(--action);
  --st-open-soft: var(--action-soft);
  --st-reopened: #d63c3c;
  --st-reopened-soft: #fde8e7;
  --st-check: #e2a52a;
  --st-check-ink: #9a6609;
  --st-check-soft: #fdf3dc;
  --st-confirmed: #24a06b;
  --st-confirmed-ink: #187655;
  --st-confirmed-soft: #e2f5ec;
}

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

/* ---------- top bar of this page (16/11, review): opaque (nothing shows through while scrolling), on the grid of the
   page below, and saying under which name notes are posted */
.topbar { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
body:has(.nv:not([hidden])) .topbar__inner { max-width: 1320px; }
.top-who { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; min-width: 0; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.top-who[hidden] { display: none; }
.top-who:not([hidden]) + .tabs { margin-left: 4px; }
.top-who__avatar {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--action-soft); color: var(--action); font-size: 14px; font-weight: 700; box-shadow: inset 0 0 0 1px var(--action-line);
}
.top-who__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.top-who__ro { color: var(--muted); font-weight: 500; }
.top-who__in { color: var(--action); white-space: nowrap; }
@media (max-width: 640px) {
  .top-who__name, .top-who__ro { display: none; }
}

/* ---------- head: title, versions, meta */
.nv-head { display: flex; flex-direction: column; gap: 10px; }
.nv-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; overflow-wrap: anywhere; }
.nv-head__row { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; min-width: 0; }
.nv-tabs {
  display: flex; gap: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px;
}
.nv-tabs::-webkit-scrollbar { display: none; }
.nv-tab {
  flex: none; min-height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent;
  font-size: 15px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.nv-tab[aria-pressed="true"] { background: var(--action); color: #fff; }
.nv-tab__ok { margin-left: 5px; font-size: 12px; opacity: 0.85; }
.nv-head__meta { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- player at the video's own format */
.nv-stage { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.nv-player {
  aspect-ratio: auto; width: 100%; height: clamp(300px, 58svh, 760px);
  border-radius: 14px; background: #0c0e14;
}
@supports not (height: 1svh) { .nv-player { height: clamp(300px, 58vh, 760px); } }
.nv-under { display: flex; justify-content: flex-end; min-height: 30px; margin: -4px 0 -8px; }
.nv-made {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 7px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; font-weight: 650;
}
.nv-made[hidden] { display: none; }
.nv-made svg { color: var(--action); }
.nv-made:hover { border-color: var(--action-line); color: var(--ink); }
.nv-compare {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; border-radius: 12px; background: var(--st-check-soft); color: var(--st-check-ink); font-size: 14.5px; font-weight: 600;
}
.nv-compare .btn { background: var(--surface); }

/* ---------- timeline of notes under the player (16/11, review): two lanes for marks closer than a dot, a range drawn from
   its start to its end with both ends marked, label rows below, a dark playhead with a cap */
.nv-rail { position: relative; padding: 0 4px; user-select: none; -webkit-user-select: none; }
.nv-rail__track { position: relative; height: 40px; }
.nv-rail__track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 30px; height: 6px; margin-top: -3px; border-radius: 6px; background: #e3e6ee;
}
.nv-rail__band {
  position: absolute; top: 30px; height: 18px; margin-top: -9px; border-left: 2px solid var(--dot); border-right: 2px solid var(--dot);
  border-radius: 2px; pointer-events: none;
}
.nv-rail__band::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; bottom: 5px; background: var(--dot); opacity: 0.4; }
.nv-rail__now { position: absolute; top: 3px; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink); pointer-events: none; }
.nv-rail__now::after {
  content: ""; position: absolute; top: -3px; left: 50%; width: 0; height: 0; margin-left: -6px;
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid var(--ink);
}
.nv-rail__dot {
  position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; padding: 0; border: 0; background: transparent;
  display: grid; place-items: center; z-index: 1;
}
.nv-rail__dot::after {
  content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--dot, var(--st-open));
  border: 2px solid #fff; box-shadow: 0 1px 3px rgba(25, 29, 43, 0.3); transition: transform 0.15s ease;
}
.nv-rail__dot.is-up::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 2px; height: var(--stem); margin-left: -1px; background: var(--dot); opacity: 0.55;
}
.nv-rail__dot:hover::after, .nv-rail__dot.is-active::after { transform: scale(1.35); }
.nv-rail__labels { position: relative; height: 17px; margin-top: 1px; }
.nv-rail__label {
  position: absolute; top: 0; font-size: 12.5px; line-height: 16px; color: var(--c, var(--muted)); font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.nv-rail__label.is-now { color: var(--ink); font-weight: 700; }
.nv-rail__label.is-edge { color: var(--faint); font-weight: 500; }

/* ---------- composer */
.nv-composer {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px;
}
.nv-composer__title { font-size: 16.5px; font-weight: 650; letter-spacing: -0.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.nv-composer__move { font-size: 13.5px; min-height: 0; padding: 0; margin-left: 6px; }
.nv-composer__area { min-height: 64px; }
@media (min-width: 1000px) { .nv-composer__area { min-height: 48px; } .nv-composer { gap: 10px; } }
.nv-hist .is-undone { color: var(--faint); }
.nv-check { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); cursor: pointer; align-self: flex-start; }
.nv-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--action); }
.nv-near {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--action-soft); border: 1px solid var(--action-line); font-size: 14.5px; color: var(--ink-2);
}
.nv-near__icon {
  flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--muted); color: var(--muted);
  font-size: 11px; font-weight: 700; display: grid; place-items: center; font-style: normal;
}
.nv-near__text { flex: 1; min-width: 0; }
.nv-near__text b { color: var(--ink); font-weight: 650; }
.nv-near__btn { flex: none; color: var(--action); border-color: var(--action-line); }
/* the rule box on the buttons' row (16/11, review: the composer down to Post note in the first screen at 1440x900) */
.nv-composer__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.nv-composer__actions .nv-check { margin-right: auto; align-self: center; }
@media (max-width: 560px) { .nv-composer__actions .nv-check { flex-basis: 100%; } }
.nv-composer__actions .btn { min-width: 112px; }
.nv-off {
  font-size: 14.5px; color: var(--muted); background: var(--surface); border: 1px dashed var(--field); border-radius: var(--radius);
  padding: 14px 16px;
}
.nv-off a, .nv-off button { font-weight: 650; }

/* ---------- notes */
.nv-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.nv-changes .changes__list li { font-size: 14.5px; }
.nv-notes-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; padding: 4px 2px 0; }
.nv-notes-title { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
.nv-pills { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 14.5px; font-weight: 650; }
.nv-pill { color: var(--c); }
.nv-pill + .nv-pill::before { content: "·"; margin-right: 6px; color: var(--c); }
.nv-approve {
  display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14.5px; color: var(--muted);
}
.nv-approve.is-approved { background: var(--st-confirmed-soft); border-color: #bfe6d3; color: var(--st-confirmed-ink); font-weight: 600; }
.nv-approve .btn--primary:disabled {   /* greyed, still readable (16/11, review) */
  background: var(--surface-2); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); opacity: 1;
}
.nv-notes { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.nv-notes:empty { display: none; }
.nv-note { border-top: 1px solid var(--line-2); }
.nv-note:first-child { border-top: 0; }
.nv-note.is-flash { background: var(--action-soft); }
.nv-note.is-muted { opacity: 0.6; }
.nv-note__row {
  display: grid; grid-template-columns: 28px 76px minmax(0, 1fr) auto 14px; column-gap: 12px; align-items: start;
  padding: 12px 12px 12px 14px; cursor: pointer;
}
.nv-num {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px;
  font-size: 13px; font-weight: 700; background: var(--soft); color: var(--c); box-shadow: inset 0 0 0 1px var(--c);
}
.nv-note__time { font-size: 15px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 2px; }
.nv-note__time.is-unknown { color: var(--faint); font-weight: 500; font-size: 13px; white-space: normal; }
.nv-note__thumb { display: none; }
.nv-note__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nv-note__body { font-size: 15px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.nv-note__meta { font-size: 13px; color: var(--faint); }
.nv-note__meta.nv-rule-phone { color: var(--action); font-weight: 600; }
.nv-note__side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.nv-badge {
  display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px;
  font-size: 13.5px; font-weight: 650; white-space: nowrap; background: var(--soft); color: var(--c);
}
.nv-note__hist { display: none; font-size: 13px; color: var(--muted); line-height: 1.4; }
.nv-note__rule { display: none; max-width: 220px; font-size: 12.5px; font-weight: 600; color: var(--action); }
.nv-note__acts { display: none; gap: 8px; margin-top: 6px; }
.nv-chev { width: 14px; height: 14px; align-self: center; color: var(--faint); transition: transform 0.15s ease; }
.nv-note.is-open .nv-chev { transform: rotate(90deg); }
.nv-note__more { display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px 54px; }
.nv-note__more[hidden] { display: none; }
.nv-hist { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--ink-2); }
.nv-hist li { position: relative; padding-left: 14px; }
.nv-hist li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--field); }
.nv-hist q { quotes: "\201C" "\201D"; color: var(--ink); }
.nv-more__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.nv-reply { display: flex; flex-direction: column; gap: 8px; }
.nv-reply .input { min-height: 64px; }
.nv-reply__acts { display: flex; gap: 8px; justify-content: flex-end; }
.nv-btn-fixed { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }
.nv-btn-wrong { color: var(--action); border-color: var(--action); }

.st-open { --c: var(--st-open); --soft: var(--st-open-soft); --dot: var(--st-open); }
.st-reopened { --c: var(--st-reopened); --soft: var(--st-reopened-soft); --dot: var(--st-reopened); }
.st-fixed { --c: var(--st-check-ink); --soft: var(--st-check-soft); --dot: var(--st-check); }
.st-fixed .nv-num { color: var(--st-check-ink); box-shadow: inset 0 0 0 1px var(--st-check); }
.st-confirmed { --c: var(--st-confirmed-ink); --soft: var(--st-confirmed-soft); --dot: var(--st-confirmed); }
.st-withdrawn { --c: var(--faint); --soft: var(--line-2); --dot: var(--faint); }

/* ---------- phone (mockup A1): notes under the composer, no thumbnails, one history line under the text */
@media (max-width: 999px) {
  .nv-side { display: contents; }
  .nv-head { order: 1; }
  .nv-stage { order: 2; }
  .nv-changes { order: 3; }
  .nv-player { height: clamp(220px, calc(100svh - 340px), 62svh); }   /* video, timeline and the note field seen together */
  .nv-notes-head { order: 4; }
  .nv-approve { order: 5; }
  .nv-notes { order: 6; margin: 0 calc(-1 * var(--gutter)); border-radius: 0; border-left: 0; border-right: 0; }
  .nv-empty { order: 7; }
  .nv-note__row { grid-template-columns: 28px auto minmax(0, 1fr) auto 14px; }
  .nv-note__more { padding-left: 14px; }
  .nv-pill { font-weight: 600; }
}
@media (max-width: 420px) {
  .nv-note__row { grid-template-columns: 28px minmax(0, 1fr) auto 14px; }
  .nv-note__time { grid-column: 2; grid-row: 1; }
  .nv-note__main { grid-column: 2; grid-row: 2; }
  .nv-note__side { grid-column: 3; grid-row: 1 / span 2; }
  .nv-chev { grid-column: 4; grid-row: 1 / span 2; }
}

/* ---------- desktop (mockup A2): player, timeline and composer on the left, the notes on the right */
@media (min-width: 1000px) {
  .main:has(.nv:not([hidden])) { max-width: 1320px; }
  .nv {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 6fr); column-gap: 28px; row-gap: 14px; align-items: start;
    grid-template-rows: auto 1fr;   /* a short left column (comparing, composer closed) never stretches the title row */
  }
  .nv-head { grid-column: 1; grid-row: 1; }
  .nv-stage { grid-column: 1; grid-row: 2; }
  .nv-side {
    grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 72px;
    max-height: calc(100vh - 88px); overflow-y: auto; overscroll-behavior: contain; padding: 0 2px 8px;
  }
  .nv-title { font-size: 25px; }
  .nv-tab { min-height: 34px; font-size: 14.5px; background: var(--surface-2); }
  .nv-tabs { background: transparent; border: 0; padding: 0; gap: 8px; }
  .nv-tab, .nv-tab + .nv-tab { box-shadow: inset 0 0 0 1px var(--line); }
  .nv-tab[aria-pressed="true"] { background: var(--action-soft); color: var(--action); box-shadow: inset 0 0 0 1px var(--action-line); }
  .nv-player { height: clamp(280px, calc(100vh - 600px), 640px); }   /* player, timeline and composer up to Post note in the first screen */
  .nv-notes-title { font-size: 21px; }
  .nv-pills { gap: 6px; }
  .nv-pill { background: var(--soft); padding: 3px 12px; border-radius: 999px; font-size: 13.5px; }
  .nv-pill + .nv-pill::before { content: none; }
  .nv-note__row { grid-template-columns: 28px 64px minmax(0, 1fr) minmax(120px, auto) 14px; padding: 14px 14px 14px 16px; }
  .nv-note__time { display: none; }
  .nv-note__thumb {
    display: block; width: 64px; height: 72px; border-radius: 8px; object-fit: cover; background: #1b1e27;
  }
  .nv-note__thumb--none { display: grid; place-items: center; color: #8a92a3; font-size: 11px; }
  .nv-note__when { font-size: 15px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
  .nv-note__hist { display: block; }
  .nv-note__rule { display: block; }
  .nv-note__acts { display: flex; }
  .nv-note__more { padding-left: 136px; }
}
@media (max-width: 999px) {
  .nv-note__when { display: none; }
}
@media (max-width: 999px) {
  #composer-title::before { content: attr(data-add); }
  .nv-meta--desk { display: none; }
}
@media (min-width: 1000px) {
  .nv-meta--phone { display: none; }
}

/* 16/11 : the link to the Learnings page, under the notes */
.nv-learnings {
  display: flex; align-items: center; gap: 6px; margin-top: 14px; padding: 10px 12px; min-height: 44px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--action); text-decoration: none;
}
.nv-learnings::after { content: "\203A"; margin-left: auto; font-size: 18px; line-height: 1; }
.nv-learnings:hover { border-color: var(--action-line); background: var(--action-soft); }
