@font-face{font-family:"Inter";src:url("/assets/fonts/inter-latin.woff2") format("woff2");font-weight:100 900;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter";src:url("/assets/fonts/inter-latin-ext.woff2") format("woff2");font-weight:100 900;font-display:swap;unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
/* Charte Saryon Media */
:root {
  --bg: #0d0d0d; --bg2: #141414; --bg3: #1b1b1b; --line: rgba(255,255,255,.09); --line2: rgba(255,255,255,.16);
  --text: #f2f2f2; --muted: #a1a1a1; --dim: #6b6b6b;
  --accent: #dc343b; --accent2: #ff2b2b; --glow: rgba(220,52,59,.42); --ok: #2fbf71; --warn: #ff2b2b; --danger: #ff2b2b;
  --radius: 18px; --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent2); text-decoration: none; }
[hidden] { display: none !important; }

.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg3); cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: #262a33; border-color: #454b58; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--bg3); color: var(--text); }
.btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.btn.sm { height: 26px; padding: 0 8px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.input { height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--bg); outline: none; width: 100%; }
.input:focus { border-color: var(--accent); }
select.input { padding-right: 8px; }

.topbar { height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--bg2); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -.01em; font-size: 15px; white-space: nowrap; }
.brand .dot { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--accent), #ff4d9d); display: grid; place-items: center; font-size: 11px; color: #fff; }
.spacer { flex: 1; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #fff; color: #111; padding: 10px 16px; border-radius: 8px; font-weight: 500; opacity: 0; transition: .2s; pointer-events: none; z-index: 100; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--bg2); border: 1px solid var(--line2); border-radius: 14px; padding: 24px; width: 100%; max-width: 380px; display: grid; gap: 14px; }
.modal h2 { margin: 0; font-size: 18px; }
.modal p { margin: 0; color: var(--muted); }
.row { display: flex; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }

/* ---------- Dashboard ---------- */
.login { min-height: 100%; display: grid; place-items: center; padding: 16px; }
.login form { width: 100%; max-width: 340px; display: grid; gap: 12px; background: var(--bg2); border: 1px solid var(--line); padding: 28px; border-radius: 14px; }
.login .err { color: var(--danger); font-size: 13px; min-height: 18px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 24px 20px 80px; }
.dash-head { display: flex; align-items: end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.dash-head h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.dash-head .count { color: var(--muted); }
.drop { display: block; border: 1.5px dashed var(--line2); border-radius: 14px; padding: 28px; text-align: center; color: var(--muted); cursor: pointer; transition: .15s; background: var(--bg2); margin-bottom: 20px; }
.drop:hover, .drop.over { border-color: var(--accent); color: var(--text); background: #1a1830; }
.drop strong { color: var(--text); display: block; font-size: 15px; margin-bottom: 4px; }
.drop small { color: var(--dim); }
.uploads { display: grid; gap: 8px; margin-bottom: 20px; }
.up { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: grid; gap: 6px; }
.up .row { justify-content: space-between; font-size: 13px; }
.bar { height: 4px; border-radius: 4px; background: var(--bg3); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.up.done .bar > i { background: var(--ok); }
.up.fail .bar > i { background: var(--danger); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s; }
.card:hover { border-color: var(--line2); }
.thumb { position: relative; aspect-ratio: 16/9; background: #000; display: block; }
.thumb video { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.thumb .badge { position: absolute; top: 8px; left: 8px; }
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11px; font-weight: 600; background: rgba(0,0,0,.7); color: #fff; letter-spacing: .02em; }
.badge.open { background: var(--warn); color: #1d1300; }
.badge.ok { background: rgba(47,191,113,.18); color: var(--ok); }
.card-body { padding: 12px 14px 14px; display: grid; gap: 8px; }
.card-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { color: var(--muted); font-size: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.settings { display: grid; gap: 10px; }
.settings label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.settings .check { display: flex; gap: 8px; align-items: center; color: var(--text); }

/* ---------- Review ---------- */
body.review-page { overflow: hidden; }
.review { display: grid; grid-template-columns: 1fr 380px; height: calc(100% - 56px); }
.topbar .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.topbar select.input { width: auto; height: 32px; }
.stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #000; }
.player { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.player video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.player canvas { position: absolute; pointer-events: none; touch-action: none; }
.player.drawing canvas { pointer-events: auto; cursor: crosshair; }
.player .bigplay { position: absolute; width: 64px; height: 64px; border-radius: 50%; background: rgba(0,0,0,.55); border: 0; display: grid; place-items: center; cursor: pointer; color: #fff; transition: opacity .2s; }
.player.playing .bigplay, .player.drawing .bigplay { opacity: 0; pointer-events: none; }
.draw-tools { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: rgba(20,22,27,.92); border: 1px solid var(--line2); border-radius: 10px; padding: 6px; display: flex; gap: 4px; align-items: center; z-index: 3; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.swatch.on { border-color: #fff; }
.controls { background: var(--bg2); border-top: 1px solid var(--line); padding: 10px 16px 12px; user-select: none; }
.timeline { position: relative; height: 26px; cursor: pointer; touch-action: none; }
.timeline .track { position: absolute; left: 0; right: 0; top: 15px; height: 5px; border-radius: 4px; background: var(--bg3); overflow: hidden; }
.timeline .buffered { position: absolute; top: 0; bottom: 0; left: 0; background: #2d313b; }
.timeline .played { position: absolute; top: 0; bottom: 0; left: 0; background: var(--accent); }
.timeline .head { position: absolute; top: 11px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(108,92,255,.4); pointer-events: none; }
.timeline .hover-tc { position: absolute; bottom: 30px; transform: translateX(-50%); background: #000; color: #fff; font: 11px var(--mono); padding: 3px 6px; border-radius: 4px; pointer-events: none; white-space: nowrap; }
.marker { position: absolute; top: 0; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--warn); border: 2px solid var(--bg2); cursor: pointer; z-index: 2; transition: transform .1s; }
.marker:hover, .marker.sel { transform: scale(1.4); }
.marker.resolved { background: var(--dim); }
.ctrl-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--text); }
.icon-btn:hover { background: var(--bg3); }
.icon-btn svg { width: 18px; height: 18px; }
.tc { font: 13px var(--mono); color: var(--text); padding: 0 8px; white-space: nowrap; }
.tc span { color: var(--dim); }
.ctrl-row select { background: var(--bg3); border: 1px solid var(--line2); border-radius: 6px; height: 28px; padding: 0 4px; font-size: 12px; }
.vol { width: 80px; accent-color: var(--accent); }

.panel { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--bg2); }
.panel-head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.panel-head .row { justify-content: space-between; }
.panel-head h3 { margin: 0; font-size: 14px; }
.tabs { display: flex; gap: 2px; background: var(--bg); padding: 3px; border-radius: 8px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 12px; color: var(--muted); }
.tabs button.on { background: var(--bg3); color: var(--text); }
.comments { flex: 1; overflow-y: auto; padding: 6px 0; }
.comments .empty { padding: 40px 20px; font-size: 13px; }
.cm { padding: 12px 14px; border-left: 3px solid transparent; cursor: pointer; }
.cm:hover { background: rgba(255,255,255,.02); }
.cm.sel { background: rgba(108,92,255,.08); border-left-color: var(--accent); }
.cm.resolved > .cm-main { opacity: .55; }
.cm-head { display: flex; align-items: center; gap: 8px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; flex: none; }
.cm-author { font-weight: 600; font-size: 13px; }
.cm-date { color: var(--dim); font-size: 11px; margin-left: auto; white-space: nowrap; }
.tag { font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 4px; background: rgba(108,92,255,.2); color: var(--accent2); text-transform: uppercase; letter-spacing: .04em; }
.chip { font: 12px var(--mono); background: rgba(255,176,32,.14); color: var(--warn); padding: 1px 6px; border-radius: 4px; cursor: pointer; border: 0; }
.chip.general { background: var(--bg3); color: var(--muted); font-family: var(--font); }
.cm-text { margin: 6px 0 0 34px; white-space: pre-wrap; word-wrap: break-word; }
.cm-text .chip { margin-right: 6px; }
.cm-actions { margin: 6px 0 0 30px; display: flex; gap: 2px; }
.cm-actions .btn { opacity: 0; }
.cm:hover .cm-actions .btn, .cm.sel .cm-actions .btn, .cm-actions .btn.keep { opacity: 1; }
.check-btn.on { color: var(--ok); }
.replies { margin: 8px 0 0 34px; border-left: 1px solid var(--line2); padding-left: 12px; display: grid; gap: 10px; }
.reply .cm-text { margin-left: 34px; }
.reply-form { margin: 8px 0 0 34px; display: grid; gap: 6px; }
.reply-form textarea, .composer textarea { width: 100%; resize: none; border: 1px solid var(--line2); background: var(--bg); border-radius: 8px; padding: 8px 10px; outline: none; min-height: 38px; max-height: 180px; }
.reply-form textarea:focus, .composer textarea:focus { border-color: var(--accent); }
.composer { border-top: 1px solid var(--line); padding: 12px 14px; display: grid; gap: 8px; }
.composer-meta { display: flex; align-items: center; gap: 8px; }
.tc-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: 12px var(--mono); color: var(--warn); }
.tc-toggle input { accent-color: var(--warn); margin: 0; }
.tc-toggle.off { color: var(--dim); }
.composer-foot { display: flex; align-items: center; gap: 8px; }
.whoami { color: var(--muted); font-size: 12px; cursor: pointer; }
.whoami:hover { color: var(--text); }
.hint { color: var(--dim); font-size: 11px; }
.btn.active { border-color: var(--danger); color: var(--danger); }
.state { display: grid; place-items: center; height: 100%; color: var(--muted); text-align: center; padding: 20px; }

@media (max-width: 900px) {
  body.review-page { overflow: auto; }
  .review { display: block; height: auto; }
  .stage { height: auto; }
  .player { aspect-ratio: 16/9; flex: none; }
  .panel { border-left: 0; border-top: 1px solid var(--line); min-height: 60vh; }
  .comments { max-height: none; }
  .vol, .hide-sm { display: none; }
  .topbar { padding: 0 12px; gap: 8px; }
}

/* ---------- Filigrane ---------- */
.wm { position: absolute; overflow: hidden; pointer-events: none; }
.wm-tile { position: absolute; inset: -50%; background: url(/assets/watermark-tile.png) repeat; background-size: 12% auto; transform: rotate(-22deg); opacity: .17; }
/* ---------- Progression des retours ---------- */
.progress { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.progress .row { justify-content: space-between; }
.progress #progTxt { color: var(--text); font-variant-numeric: tabular-nums; }
.pbar { height: 4px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.pbar > i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #a3242a, #ff2b2b); transition: width .4s ease; }
.pbar.done > i { background: var(--ok); }
.done-tag { font-size: 11px; font-weight: 600; color: var(--ok); background: rgba(47,191,113,.14); padding: 2px 8px; border-radius: 999px; }
.btn.validate { width: 100%; justify-content: center; height: 38px; border-color: var(--accent); color: #fff; background: rgba(220,52,59,.12); }
.btn.validate:hover { background: rgba(220,52,59,.25); border-color: var(--accent); }
.sub-badge { font-size: 12px; color: #ffb3b6; }
.card .pbar { margin-top: 2px; }
.danger-zone { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 6px; }
.hint-txt { font-size: 12px; color: var(--dim); margin: -4px 0 0 24px; }

/* ---------- Commentaire vs fin de relecture ---------- */
.kbd { font-size: 11px; opacity: .8; padding: 0 4px; border-radius: 4px; background: rgba(0,0,0,.2); }
.finish { border-top: 1px solid var(--line); padding: 12px 14px 14px; display: grid; gap: 10px; background: rgba(220,52,59,.05); }
.finish-txt { display: grid; gap: 2px; font-size: 13px; }
.finish-txt span { color: var(--muted); font-size: 12px; }

/* ---------- Habillage Saryon ---------- */
body { background: var(--bg); }
body:not(.review-page) { background: radial-gradient(60% 420px at 50% -120px, rgba(220,52,59,.22), transparent 70%) no-repeat, var(--bg); }
.btn { border-radius: 10px; border-color: var(--line); background: rgba(255,255,255,.03); }
.btn:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.25); }
.btn.primary { background: var(--accent); border-color: var(--accent); }
.btn.primary:hover { background: #c32a31; border-color: #c32a31; }
.btn.ghost { background: transparent; border-color: transparent; }
.input { border-radius: 10px; border-color: var(--line); background: #101010; }
.topbar { background: rgba(13,13,13,.85); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.brand img { height: 26px; width: auto; display: block; }
.brand .pill { font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(220,52,59,.6); background: rgba(220,52,59,.18); color: #ffe1e2; }
.login form { border-radius: var(--radius); box-shadow: 0 30px 120px rgba(220,52,59,.18); }
.login .brand { justify-content: center; margin-bottom: 6px; }
.login .brand img { height: 34px; }
.dash-head h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 600; letter-spacing: -.025em; }
.dash-head h1 .red { color: var(--accent2); }
.drop { border-radius: var(--radius); border-color: rgba(255,255,255,.14); }
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(220,52,59,.07); }
.card, .up { border-radius: var(--radius); }
.card:hover { border-color: rgba(220,52,59,.45); }
.thumb { overflow: hidden; }
.badge.open { background: var(--accent); color: #fff; }
.storage { margin-left: auto; min-width: 220px; display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.storage .bar { height: 6px; }
.storage.full .bar > i { background: var(--accent2); }
.storage .bar > i { background: linear-gradient(90deg, #8a1d22, var(--accent)); }
.bar > i { background: var(--accent); }
.marker { background: var(--accent2); box-shadow: 0 0 10px var(--accent2); }
.marker.resolved { box-shadow: none; }
.timeline .played { background: var(--accent); }
.timeline .head { box-shadow: 0 0 0 3px rgba(220,52,59,.45); }
.chip { background: rgba(255,43,43,.14); color: #ff8a8a; }
.tc-toggle { color: #ff8a8a; }
.tc-toggle input { accent-color: var(--accent); }
.tag { background: rgba(220,52,59,.2); color: #ffb3b6; }
.cm.sel { background: rgba(220,52,59,.08); border-left-color: var(--accent); }
.vol { accent-color: var(--accent); }
.player .bigplay { background: var(--accent); width: 72px; height: 72px; box-shadow: 0 10px 40px rgba(0,0,0,.45); }
.modal { border-radius: var(--radius); }
.tabs { border-radius: 10px; }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
@media (max-width: 700px) { .storage { margin-left: 0; width: 100%; } }
@media (max-width: 600px) {
  .ctrl-row { gap: 0; }
  .ctrl-row select, #muteBtn { display: none; }
  .tc { font-size: 12px; padding: 0 4px; }
  .icon-btn { width: 32px; }
}
