/* Validation des médias — thème sombre, cohérent avec l'app d'upload. */
:root {
  --bg: #14110d;
  --bg2: #1d1812;
  --panel: #221c15;
  --line: #34291d;
  --txt: #efe7da;
  --muted: #a89a85;
  --accent: #c9a227;
  --keep: #4caf6a;
  --drop: #e2574c;
  --none: #8b8170;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--txt);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }

/* ---------- Connexion ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.card.login, .login .card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 32px; width: 100%; max-width: 420px;
}
.login h1 { margin: 0 0 4px; font-size: 22px; }
.login .sub { color: var(--muted); margin: 0 0 20px; }
.login label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.login input {
  width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg2); color: var(--txt); font-size: 15px;
}
.login button {
  width: 100%; padding: 12px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--accent); color: #1a1408; font-weight: 700; font-size: 15px;
}
.login button:disabled { opacity: .6; cursor: default; }
.msg { margin: 14px 0 0; font-size: 14px; min-height: 18px; }
.msg.ok { color: var(--keep); }
.msg.err { color: var(--drop); }

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px; background: rgba(20,17,13,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; }
.brand .org { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 6px; }
.who { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.forget { font-size: 12px; }

/* ---------- Application ---------- */
.app { padding: 14px 16px 60px; max-width: 1500px; margin: 0 auto; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--bg2); color: var(--txt);
  padding: 7px 12px; border-radius: 999px; cursor: pointer; font-size: 13px;
}
.chip b { color: var(--accent); margin-left: 4px; }
.chip.on { background: var(--accent); color: #1a1408; border-color: var(--accent); }
.chip.on b { color: #1a1408; }
.filters2 { display: flex; gap: 8px; }
.filters2 select, .ghost {
  background: var(--bg2); color: var(--txt); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px; font-size: 13px; cursor: pointer;
}

.progress { position: relative; height: 26px; margin: 12px 0; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line); overflow: hidden; }
.progress .bar { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--accent), #e0c14e); opacity: .25; }
.progress span { position: relative; display: block; line-height: 26px; padding: 0 12px; font-size: 12px; color: var(--muted); }

/* ---------- Grille ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; }
.empty { color: var(--muted); padding: 40px; text-align: center; }
.card {
  background: var(--bg2); border: 2px solid var(--line); border-radius: 12px; overflow: hidden;
  cursor: pointer; transition: transform .08s, border-color .15s;
}
.card:hover { transform: translateY(-2px); }
.card.v-keep { border-color: rgba(76,175,106,.6); }
.card.v-drop { border-color: rgba(226,87,76,.6); }
.card.v-none { border-color: var(--line); }
.thumb { position: relative; aspect-ratio: 1; background: #0e0c09; display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ph { font-size: 40px; color: #3a3228; }
.vidthumb { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(circle at center, #2a2218, #0e0c09); }
.vidthumb .play { font-size: 30px; color: var(--accent); }
.tag { position: absolute; left: 6px; bottom: 6px; font-size: 10px; background: rgba(0,0,0,.6); padding: 2px 6px; border-radius: 5px; color: #fff; }
.mine { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; }
.mine-keep { background: var(--keep); }
.mine-drop { background: var(--drop); }
.mine-none { background: var(--none); }
.meta { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; font-size: 12px; }
.counts { display: flex; gap: 8px; font-style: normal; }
.counts i { font-style: normal; display: inline-flex; align-items: center; gap: 2px; }
.counts .k { color: var(--keep); }
.counts .d { color: var(--drop); }
.counts .n { color: var(--none); }
.counts .k::before { content: "✓"; }
.counts .d::before { content: "✕"; }
.counts .n::before { content: "–"; }
.miss { color: var(--accent); font-size: 11px; }
.forced { color: var(--accent); }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; display: flex; background: rgba(8,6,4,.96); }
.lightbox.hidden { display: none; }
.lb-stage { flex: 1; display: grid; place-items: center; padding: 20px; min-width: 0; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 92dvh; border-radius: 8px; }
.lb-panel { width: 340px; flex-shrink: 0; background: var(--panel); border-left: 1px solid var(--line); padding: 18px; overflow-y: auto; }
.lb-close { position: absolute; top: 12px; right: 356px; z-index: 2; background: rgba(0,0,0,.5); color: #fff; border: 0; width: 38px; height: 38px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.45); color: #fff; border: 0; width: 46px; height: 80px; font-size: 34px; cursor: pointer; }
.lb-prev { left: 8px; border-radius: 0 8px 8px 0; }
.lb-next { right: 348px; border-radius: 8px 0 0 8px; }

.p-head { margin-bottom: 14px; }
.p-title { font-weight: 700; word-break: break-all; }
.p-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.votebar { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.votebar-2 { grid-template-columns: 1fr 1fr; }
.vbtn { padding: 11px 6px; border: 1px solid var(--line); background: var(--bg2); color: var(--txt); border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 600; }
.vbtn.keep.sel { background: var(--keep); border-color: var(--keep); color: #fff; }
.vbtn.drop.sel { background: var(--drop); border-color: var(--drop); color: #fff; }
.vbtn.none.sel { background: var(--none); border-color: var(--none); color: #fff; }
.p-hint { color: var(--muted); font-size: 11px; margin: 8px 0 14px; }

.verdict { padding: 9px 11px; border-radius: 8px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.verdict small { display: block; font-weight: 400; opacity: .8; margin-top: 2px; }
.verdict.keep { background: rgba(76,175,106,.15); color: var(--keep); }
.verdict.drop { background: rgba(226,87,76,.15); color: var(--drop); }
.verdict.pending { background: var(--bg2); color: var(--muted); }

.voters { list-style: none; margin: 0 0 12px; padding: 0; }
.vr { display: flex; justify-content: space-between; padding: 6px 9px; border-radius: 7px; font-size: 13px; margin-bottom: 4px; background: var(--bg2); }
.vr b { font-weight: 600; }
.vr-keep b { color: var(--keep); }
.vr-drop b { color: var(--drop); }
.vr-none b { color: var(--none); }
.vr.empty { color: var(--muted); justify-content: center; }
.missing { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.missing span { color: var(--accent); }

.forcebar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; font-size: 12px; color: var(--muted); }
.fbtn { padding: 6px 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--txt); border-radius: 7px; cursor: pointer; font-size: 12px; }
.fbtn.clear { color: var(--accent); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  max-width: 90vw; padding: 12px 18px; border-radius: 10px; font-size: 14px; font-weight: 600;
  background: #2a2218; color: var(--txt); border: 1px solid var(--line);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #3a1d1a; border-color: var(--drop); color: #ffd9d4; }
.toast.ok { background: #1c2e22; border-color: var(--keep); color: #d4f5df; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .lightbox { flex-direction: column; }
  .lb-stage { padding: 8px; flex: 0 0 auto; }
  .lb-stage img, .lb-stage video { max-height: 50dvh; }
  .lb-panel { width: 100%; flex: 1 1 auto; border-left: 0; border-top: 1px solid var(--line); }
  .lb-close { right: 12px; }
  .lb-next { right: 8px; top: 25%; }
  .lb-prev { top: 25%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
@media (max-width: 560px) {
  .topbar { padding: 10px 12px; gap: 8px; }
  .brand { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand .org { display: none; }
  .who { gap: 8px; flex-shrink: 0; }
  .app { padding: 12px 12px 60px; }
  .toolbar { gap: 8px; }
  .chips { gap: 6px; }
  .chip { padding: 6px 10px; font-size: 12px; }
  .filters2 { width: 100%; }
  .filters2 select { flex: 1; min-width: 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
  .progress span { font-size: 11px; }
}
