:root {
  --bg: #1b1d20;
  --bg-2: #222528;
  --bg-3: #2c2f33;
  --bg-4: #383c41;
  --line: rgba(255, 255, 255, 0.08);
  --text: #eceff1;
  --muted: #9aa0a6;
  --dim: #6d7379;
  --accent: #e5a00d;
  --accent-hover: #f5b32a;
  --danger: #e5534b;
  --ok: #3fb950;
  --topbar: 60px;
  --sidebar: 236px;
  --player: 0px;
  --radius: 6px;
  --card: 150px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; }
h1, h2, h3 { margin: 0; font-weight: 600; }
::selection { background: var(--accent); color: #000; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #44494f; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #5a6067; }
::-webkit-scrollbar-track { background: transparent; }

.icon { width: 22px; height: 22px; fill: currentColor; flex: none; }
.icon.sm { width: 18px; height: 18px; }
.icon.lg { width: 28px; height: 28px; }

/* ---------- Structure ---------- */
#app { height: 100%; }
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; grid-template-rows: var(--topbar) 1fr var(--player); height: 100%; }
.shell.collapsed { --sidebar: 72px; }
.topbar {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: var(--bg-2); border-bottom: 1px solid var(--line); z-index: 20;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: 3px; color: var(--text); margin-right: 8px; }
.logo b { color: var(--accent); }
.logo-mark { width: 30px; height: 30px; border-radius: 7px; background: linear-gradient(135deg, #f5b32a, #c77c02); display: grid; place-items: center; color: #111; font-size: 17px; letter-spacing: 0; }
.search { flex: 1; max-width: 560px; position: relative; margin: 0 auto 0 12px; }
.search input {
  width: 100%; height: 38px; border-radius: 20px; border: 1px solid transparent; background: var(--bg-3);
  color: var(--text); padding: 0 16px 0 42px; font-size: 14px; outline: none; transition: border .15s, background .15s;
}
.search input:focus { border-color: var(--accent); background: #26292d; }
.search .icon { position: absolute; left: 13px; top: 9px; color: var(--muted); width: 20px; height: 20px; }
.top-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--muted);
  display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s; position: relative;
}
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.icon-btn.active { color: var(--accent); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #111;
  background: var(--accent); cursor: pointer; border: 0; font-size: 15px; flex: none;
}
.avatar.lg { width: 64px; height: 64px; font-size: 28px; }

.sidebar { background: var(--bg-2); border-right: 1px solid var(--line); overflow-y: auto; overflow-x: hidden; padding: 10px 0 20px; }
.nav-section { padding: 14px 20px 6px; font-size: 11px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; white-space: nowrap; }
.nav-item {
  display: flex; align-items: center; gap: 14px; padding: 9px 20px 9px 22px; color: var(--muted); cursor: pointer; white-space: nowrap;
  border-left: 3px solid transparent; transition: color .12s, background .12s; font-size: 14.5px;
}
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.nav-item.active { color: var(--text); border-left-color: var(--accent); background: rgba(229, 160, 13, .08); }
.nav-item.active .icon { color: var(--accent); }
.nav-item .count { margin-left: auto; font-size: 12px; color: var(--dim); }
.collapsed .nav-item span, .collapsed .nav-item .count, .collapsed .nav-section { display: none; }
.nav-item[draggable="true"] { cursor: grab; }
.nav-item.dragging { opacity: .45; background: rgba(229, 160, 13, .12); cursor: grabbing; }
.collapsed .nav-item { justify-content: center; padding: 12px 0; }

.main { overflow-y: auto; overflow-x: hidden; position: relative; scroll-behavior: auto; }
.page { padding: 24px 36px 60px; min-height: 100%; }
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 18px; border-radius: 4px; border: 0;
  background: var(--bg-4); color: var(--text); cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .15s, transform .1s;
}
.btn:hover { background: #474c52; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: #151515; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.btn.round { width: 44px; height: 44px; padding: 0; border-radius: 50%; justify-content: center; background: rgba(255, 255, 255, .12); }
.btn.round:hover { background: rgba(255, 255, 255, .22); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Hubs / cartes ---------- */
.hub { margin-bottom: 34px; }
.hub-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.hub-head h2 { font-size: 19px; display: flex; align-items: center; gap: 8px; }
.hub-head h2 a:hover { color: var(--accent); }
.hub-nav { display: flex; gap: 4px; }
.hub-nav button { width: 32px; height: 32px; }
.hub-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--card); gap: 18px; overflow-x: auto; overflow-y: hidden;
  scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 6px;
}
.hub-row::-webkit-scrollbar { display: none; }
.hub-row.wide { grid-auto-columns: calc(var(--card) * 1.85); }
.hub-row.square { grid-auto-columns: var(--card); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card), 1fr)); gap: 26px 18px; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(calc(var(--card) * 1.6), 1fr)); }

.card { position: relative; min-width: 0; cursor: pointer; }
.card .thumb {
  position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; background: var(--bg-3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35); transition: box-shadow .15s;
}
.card.square .thumb { aspect-ratio: 1; }
.card.circle .thumb { aspect-ratio: 1; border-radius: 50%; }
.card.wide .thumb { aspect-ratio: 16 / 9; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.card .thumb img.loaded { opacity: 1; }
.card:hover .thumb { box-shadow: 0 0 0 3px var(--accent), 0 4px 14px rgba(0, 0, 0, .5); }
.placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: var(--dim); text-align: center; padding: 12px; font-size: 13px; line-height: 1.25;
  background: linear-gradient(160deg, #31353a, #24272b);
}
.placeholder .icon { width: 40px; height: 40px; opacity: .6; }
.placeholder.book { background: linear-gradient(160deg, #3a3326, #26231d); color: #c8b996; font-family: Georgia, serif; font-size: 14px; }
.placeholder .ph-title { font-weight: 600; color: var(--text); opacity: .85; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card .overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0;
  background: rgba(0, 0, 0, .45); transition: opacity .15s;
}
.card:hover .overlay { opacity: 1; }
.card .play-circle {
  width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #111; display: grid; place-items: center;
  transform: scale(.85); transition: transform .15s; box-shadow: 0 3px 10px rgba(0, 0, 0, .4);
}
.card .play-circle:hover { transform: scale(1); background: var(--accent-hover); }
.card .corner-actions { position: absolute; bottom: 8px; right: 8px; display: flex; gap: 4px; }
.card .corner-actions button {
  width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.card .corner-actions button:hover { background: var(--accent); color: #111; }
.card .corner-actions .icon { width: 17px; height: 17px; }
.unwatched-tri { position: absolute; top: 0; right: 0; width: 0; height: 0; border-style: solid; border-width: 0 26px 26px 0; border-color: transparent var(--accent) transparent transparent; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .6)); }
.badge {
  position: absolute; top: 6px; right: 6px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  background: var(--accent); color: #111; font-size: 12px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}
.badge.done { background: rgba(0, 0, 0, .65); color: var(--accent); padding: 0; width: 26px; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0, 0, 0, .55); }
.progress > div { height: 100%; background: var(--accent); }
.card .meta { padding-top: 8px; }
.card .title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.circle .meta { text-align: center; }
.card .title:hover { color: var(--accent); }

/* ---------- Bibliothèque ---------- */
.lib-bar { display: flex; align-items: center; gap: 6px; margin: -6px 0 22px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 12px; position: sticky; top: -24px; background: var(--bg); z-index: 5; padding-top: 10px; }
.tabs { display: flex; gap: 2px; margin-right: 12px; }
.tab {
  padding: 8px 14px; border-radius: 4px; color: var(--muted); cursor: pointer; font-weight: 600; font-size: 14px; border: 0; background: transparent;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); background: var(--bg-3); }
.tab.active::after { content: ''; display: block; height: 2px; background: var(--accent); margin: 6px -2px -8px; border-radius: 2px; }
.select {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 4px; cursor: pointer;
  background: transparent; border: 0; color: var(--muted); font-weight: 600; font-size: 13.5px;
}
.select:hover, .select.on { background: var(--bg-3); color: var(--text); }
.select.on { color: var(--accent); }
.lib-count { margin-left: auto; color: var(--dim); font-size: 13px; }
.size-slider { width: 90px; accent-color: var(--accent); }
.alpha { position: fixed; right: 4px; top: calc(var(--topbar) + 80px); bottom: calc(var(--player) + 20px); display: flex; flex-direction: column; justify-content: center; z-index: 6; }
.alpha a { font-size: 11px; font-weight: 700; color: var(--dim); padding: 1px 6px; text-align: center; cursor: pointer; }
.alpha a:hover, .alpha a.on { color: var(--accent); }
.alpha a.empty { opacity: .3; pointer-events: none; }
.lib-grid-wrap { padding-right: 18px; }

/* ---------- Menus / popovers ---------- */
.menu {
  position: fixed; z-index: 1000; min-width: 200px; max-width: 320px; max-height: 70vh; overflow-y: auto; padding: 6px 0;
  background: #2b2e32; border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .55); border: 1px solid var(--line);
  animation: pop .12s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 9px 16px; cursor: pointer; color: var(--text); font-size: 14px; white-space: nowrap; }
.menu-item:hover { background: rgba(255, 255, 255, .07); }
.menu-item.checked { color: var(--accent); }
.menu-item .icon { width: 18px; height: 18px; color: var(--muted); }
.menu-item.checked .icon { color: var(--accent); }
.menu-item .right { margin-left: auto; color: var(--dim); font-size: 12px; }
.menu-sep { height: 1px; background: var(--line); margin: 6px 0; }
.menu-label { padding: 8px 16px 4px; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }

/* ---------- Modale ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); z-index: 900; display: grid; place-items: center; animation: fade .15s; padding: 20px; }
@keyframes fade { from { opacity: 0; } }
.modal {
  width: min(640px, 100%); max-height: 88vh; display: flex; flex-direction: column; background: #26292d; border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6); border: 1px solid var(--line);
}
.modal.wide { width: min(900px, 100%); }
.modal-head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 18px; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 20px 22px; overflow-y: auto; min-height: 0; } /* min-height : le contenu défile au lieu de déborder de la fenêtre */
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field .hint { font-size: 12.5px; color: var(--dim); margin-top: 6px; }
.field .hint a { color: var(--accent); }
input.input, select.input, textarea.input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 4px; border: 1px solid #3d4146; background: #1d1f22;
  color: var(--text); font: inherit; outline: none;
}
textarea.input { height: 120px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--accent); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.row { display: flex; gap: 12px; align-items: center; }
.row > .grow { flex: 1; }
.err { color: var(--danger); font-size: 13.5px; margin-top: 8px; }

.toast-wrap { position: fixed; bottom: calc(var(--player) + 20px); left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #33373c; padding: 12px 20px; border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); border-left: 4px solid var(--accent); animation: pop .2s; max-width: 90vw; }
.toast.error { border-left-color: var(--danger); }

/* ---------- Fiche détaillée ---------- */
.detail { position: relative; min-height: 100%; }
/* teinte de la fiche : couleur dominante de l'affiche */
.detail-tint { position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: 0; transition: opacity 1s ease; mix-blend-mode: soft-light; }
.detail.tinted .detail-tint {
  opacity: 1;
  background: radial-gradient(1100px 700px at 20% 0%, rgb(var(--tint-rgb) / .85), transparent 70%),
              linear-gradient(180deg, rgb(var(--tint-rgb) / .55) 0, rgb(var(--tint-rgb) / .2) 900px, transparent 1600px);
}
.detail.tinted::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(900px 500px at 15% 0%, rgb(var(--tint-rgb) / .28), transparent 70%),
              linear-gradient(180deg, rgb(var(--tint-rgb) / .14), transparent 1200px);
}
.detail-content { z-index: 2 !important; }
.detail.tinted .btn.round, .detail.tinted .feature-btn:not(.on) { background: rgb(var(--tint-rgb) / .28); }
.detail.tinted .detail-bg::after {
  background: linear-gradient(to bottom, rgb(var(--tint-rgb) / .12) 0%, rgba(27, 29, 32, .7) 55%, var(--bg) 100%),
              linear-gradient(to right, rgba(27, 29, 32, .85) 0%, rgba(27, 29, 32, .2) 70%);
}
.detail.tinted .section h2 { box-shadow: inset 0 -3px 0 rgb(var(--tint-rgb) / .55); display: inline-block; padding-bottom: 4px; }
.detail.tinted .tech span { background: rgb(var(--tint-rgb) / .22); }
.detail-bg { position: absolute; inset: 0 0 auto 0; height: 92vh; overflow: hidden; z-index: 0; pointer-events: none; }
.detail-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; filter: saturate(1.05); }
.detail-bg img.loaded { opacity: .38; }
.detail-bg.blur img { filter: blur(40px) saturate(1.3); transform: scale(1.2); }
/* Fond animé façon Netflix : la vidéo en pleine luminosité en haut à droite,
   qui s'efface progressivement vers la gauche (texte) et vers le bas */
.detail-loop {
  position: absolute; top: 0; right: 0; width: min(78%, 1400px); aspect-ratio: 16 / 9; max-height: 92vh;
  object-fit: cover; object-position: 50% 30%; z-index: 1; pointer-events: none;
  opacity: 0; transition: opacity 1.6s ease;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .55) 22%, #000 48%), linear-gradient(to bottom, #000 55%, transparent 98%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .55) 22%, #000 48%), linear-gradient(to bottom, #000 55%, transparent 98%);
  mask-composite: intersect;
}
.detail-loop.loaded { opacity: 1; }
/* l'image fixe disparaît quand la vidéo démarre ; la teinte reste discrète */
.detail.has-loop .detail-bg img { opacity: 0 !important; transition: opacity 1.6s ease; }
.detail.has-loop .detail-tint { opacity: .45; }
.detail.has-loop::before { opacity: .6; }
/* lisibilité du texte posé sur la vidéo */
.detail.has-loop .detail-info { text-shadow: 0 1px 3px rgba(0, 0, 0, .85), 0 0 18px rgba(0, 0, 0, .6); }
.detail.has-loop .detail-info .summary { color: #eceff1; }
.detail-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(27, 29, 32, .2) 0%, rgba(27, 29, 32, .75) 55%, var(--bg) 100%), linear-gradient(to right, rgba(27, 29, 32, .85) 0%, rgba(27, 29, 32, .2) 70%); }
.detail-content { position: relative; z-index: 1; padding: 36px 48px 60px; }
.detail-top { display: flex; gap: 40px; align-items: flex-start; }
.detail-poster { width: 280px; flex: none; border-radius: 6px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); background: var(--bg-3); position: relative; aspect-ratio: 2 / 3; }
.detail-poster.square { aspect-ratio: 1; width: 300px; }
.detail-poster.wide { aspect-ratio: 16 / 9; width: 420px; }
.detail-poster.circle { border-radius: 50%; aspect-ratio: 1; width: 240px; }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; min-width: 0; padding-top: 6px; }
.detail-info .crumbs { color: var(--muted); font-size: 15px; margin-bottom: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.detail-info .crumbs a:hover { color: var(--accent); text-decoration: underline; }
.detail-info h1 { font-size: 36px; line-height: 1.15; margin-bottom: 6px; }
.detail-info .orig { color: var(--muted); font-size: 15px; margin-bottom: 6px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 15px; margin: 8px 0 16px; align-items: center; }
.facts .pill { border: 1px solid rgba(255, 255, 255, .3); border-radius: 3px; padding: 0 6px; font-size: 12px; font-weight: 700; color: var(--text); }
.facts .star { color: var(--accent); display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.actions { display: flex; gap: 10px; align-items: center; margin: 20px 0 22px; flex-wrap: wrap; }
.actions .btn.primary { height: 44px; padding: 0 24px; font-size: 15px; }
.tagline { font-style: italic; color: var(--muted); font-size: 16px; margin-bottom: 10px; }
.summary { font-size: 15.5px; line-height: 1.6; max-width: 900px; color: #d9dde0; }
.summary.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.more-link { color: var(--accent); cursor: pointer; font-weight: 600; font-size: 13px; margin-top: 4px; display: inline-block; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin-top: 22px; font-size: 14.5px; max-width: 900px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.tech { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.tech span { background: rgba(255, 255, 255, .08); border-radius: 3px; padding: 3px 9px; font-size: 12.5px; font-weight: 600; color: #c9ced2; }
.section { margin-top: 44px; }
.section h2 { font-size: 20px; margin-bottom: 14px; }
.cast-row { display: grid; grid-auto-flow: column; grid-auto-columns: 130px; gap: 16px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.person { text-align: center; }
.person .ph { width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 8px; overflow: hidden; background: var(--bg-3); display: grid; place-items: center; color: var(--dim); font-size: 30px; font-weight: 700; }
.person .ph img { width: 100%; height: 100%; object-fit: cover; }
.person .n { font-weight: 600; font-size: 13.5px; }
.person .r { color: var(--muted); font-size: 12.5px; }

.ep-list { display: flex; flex-direction: column; gap: 4px; }
.ep { display: flex; gap: 20px; padding: 14px; border-radius: 6px; cursor: pointer; align-items: flex-start; transition: background .12s; }
.ep:hover { background: rgba(255, 255, 255, .05); }
.ep .ep-thumb { width: 260px; flex: none; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; position: relative; background: var(--bg-3); }
.ep .ep-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep .ep-thumb .overlay { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; background: rgba(0, 0, 0, .4); transition: opacity .15s; }
.ep:hover .ep-thumb .overlay { opacity: 1; }
.ep .ep-body { flex: 1; min-width: 0; }
.ep .ep-title { font-size: 16px; font-weight: 600; display: flex; gap: 10px; align-items: baseline; }
.ep .ep-num { color: var(--muted); font-weight: 600; font-size: 14px; flex: none; }
.ep .ep-meta { color: var(--muted); font-size: 13px; margin: 3px 0 6px; }
.ep .ep-sum { color: #c7ccd0; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ep .ep-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.ep:hover .ep-actions { opacity: 1; }

.tracks { width: 100%; border-collapse: collapse; margin-top: 10px; }
.tracks tr { cursor: pointer; }
.tracks td { padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tracks tr:hover td { background: rgba(255, 255, 255, .04); }
.tracks tr.playing td { color: var(--accent); }
.tracks .n { width: 44px; color: var(--muted); text-align: right; }
.tracks .d { width: 70px; color: var(--muted); text-align: right; }
.tracks .a { color: var(--muted); }
.tracks .disc td { color: var(--muted); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: 1px; padding-top: 18px; cursor: default; }
.tracks tr.disc:hover td { background: none; }
.tracks .act { width: 40px; opacity: 0; }
.tracks tr:hover .act { opacity: 1; }

/* ---------- Lecteur vidéo ---------- */
.vplayer { position: fixed; inset: 0; background: #000; z-index: 1500; display: flex; align-items: center; justify-content: center; user-select: none; }
.vplayer video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.vplayer.hide-ui { cursor: none; }
.vp-top, .vp-bottom { position: absolute; left: 0; right: 0; transition: opacity .25s; z-index: 3; }
.vplayer.hide-ui .vp-top, .vplayer.hide-ui .vp-bottom { opacity: 0; pointer-events: none; }
.vp-top { top: 0; display: flex; align-items: center; gap: 14px; padding: 18px 24px 50px; background: linear-gradient(rgba(0, 0, 0, .75), transparent); }
.vp-top .t1 { font-size: 18px; font-weight: 600; }
.vp-top .t2 { font-size: 14px; color: #bbb; }
.vp-bottom { bottom: 0; padding: 60px 24px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); }
.vp-seek { position: relative; height: 18px; cursor: pointer; display: flex; align-items: center; margin-bottom: 4px; }
.vp-seek .rail { position: absolute; left: 0; right: 0; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); transition: height .1s; }
.vp-seek:hover .rail { height: 6px; }
.vp-seek .buf { position: absolute; left: 0; height: 100%; background: rgba(255, 255, 255, .35); border-radius: 2px; }
.vp-seek .cur { position: absolute; left: 0; height: 100%; background: var(--accent); border-radius: 2px; }
.vp-seek .knob { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); top: 50%; transform: translate(-50%, -50%) scale(0); transition: transform .1s; }
.vp-seek:hover .knob { transform: translate(-50%, -50%) scale(1); }
.vp-seek .tip { position: absolute; bottom: 22px; transform: translateX(-50%); background: rgba(0, 0, 0, .85); padding: 3px 8px; border-radius: 3px; font-size: 13px; display: none; pointer-events: none; }
.vp-seek:hover .tip { display: block; }
.vp-ctrls { display: flex; align-items: center; gap: 6px; }
.vp-ctrls .icon-btn { color: #eee; width: 44px; height: 44px; }
.vp-ctrls .icon-btn .icon { width: 26px; height: 26px; }
.vp-ctrls .icon-btn.big .icon { width: 34px; height: 34px; }
.vp-time { font-size: 14px; color: #ddd; margin: 0 10px; font-variant-numeric: tabular-nums; }
.vp-vol { width: 90px; accent-color: var(--accent); }
.vp-spacer { flex: 1; }
.vp-center { position: absolute; z-index: 2; pointer-events: none; }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .15); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.spinner.sm { width: 22px; height: 22px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.vp-subs { position: absolute; left: 5%; right: 5%; bottom: 8%; text-align: center; z-index: 2; pointer-events: none; transition: bottom .25s; }
.vplayer:not(.hide-ui) .vp-subs { bottom: 150px; }
.vp-subs span { display: inline; background: rgba(0, 0, 0, .55); color: #fff; font-size: clamp(18px, 2.6vw, 38px); line-height: 1.35; padding: 2px 10px; border-radius: 3px; white-space: pre-line; text-shadow: 0 1px 2px #000; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.vp-panel { position: absolute; right: 24px; bottom: 90px; width: 330px; max-height: 65vh; overflow-y: auto; background: rgba(28, 30, 33, .97); border-radius: 8px; z-index: 4; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); padding: 8px 0; }
.vp-panel h4 { margin: 0; padding: 10px 18px 6px; font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; }
.vp-next { position: absolute; right: 30px; bottom: 120px; z-index: 4; width: 360px; background: rgba(28, 30, 33, .96); border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); display: flex; gap: 12px; padding: 12px; align-items: center; }
.vp-next img { width: 140px; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; background: var(--bg-3); }
.vp-next .t { font-size: 13px; color: var(--muted); }
.vp-next .n { font-weight: 600; margin: 2px 0 8px; }
.vp-skip {
  position: absolute; right: 30px; bottom: 120px; z-index: 5; display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 6px; cursor: pointer; font: inherit; font-size: 16px; font-weight: 600;
  color: #fff; background: rgba(20, 21, 24, .82); border: 2px solid rgba(255, 255, 255, .85); backdrop-filter: blur(6px);
  animation: pop .2s ease-out; transition: background .15s, color .15s;
}
.vp-skip:hover, .vp-skip:focus { background: #fff; color: #111; outline: none; }
.vplayer.hide-ui .vp-skip { bottom: 60px; }
.vp-info { position: absolute; left: 24px; top: 80px; z-index: 4; background: rgba(0, 0, 0, .8); padding: 12px 16px; border-radius: 6px; font: 12.5px/1.6 Consolas, monospace; color: #ddd; white-space: pre; }
.vp-flash { position: absolute; z-index: 3; width: 90px; height: 90px; border-radius: 50%; background: rgba(0, 0, 0, .55); display: grid; place-items: center; animation: flash .6s forwards; pointer-events: none; }
.vp-flash .icon { width: 44px; height: 44px; }
@keyframes flash { from { opacity: 1; transform: scale(.9); } to { opacity: 0; transform: scale(1.25); } }

/* ---------- Lecteur audio ---------- */
.aplayer {
  grid-column: 1 / -1; height: var(--player); background: #26292d; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(200px, 1fr) minmax(320px, 2fr) minmax(200px, 1fr); align-items: center; padding: 0 16px; gap: 16px; z-index: 30;
}
.shell.has-player { --player: 84px; }
.ap-track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ap-track img, .ap-track .ap-ph { width: 56px; height: 56px; border-radius: 4px; object-fit: cover; background: var(--bg-3); flex: none; cursor: pointer; }
.ap-track .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-track .a { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ap-track .a:hover { color: var(--accent); }
.ap-center { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ap-btns { display: flex; align-items: center; gap: 6px; }
.ap-btns .icon-btn { color: #ddd; }
.ap-btns .play { width: 42px; height: 42px; background: #fff; color: #111; }
.ap-btns .play:hover { background: var(--accent); color: #111; }
.ap-seek { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ap-seek .vp-seek { flex: 1; margin: 0; }
.ap-right { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.queue-panel { position: fixed; right: 0; top: var(--topbar); bottom: var(--player); width: 380px; background: #232629; border-left: 1px solid var(--line); z-index: 25; display: flex; flex-direction: column; box-shadow: -10px 0 30px rgba(0, 0, 0, .4); }
.queue-panel .qh { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.queue-panel .ql { overflow-y: auto; flex: 1; }
.qi { display: flex; align-items: center; gap: 12px; padding: 8px 18px; cursor: pointer; }
.qi:hover { background: rgba(255, 255, 255, .05); }
.qi.cur .qt { color: var(--accent); }
.qi img, .qi .qph { width: 40px; height: 40px; border-radius: 3px; object-fit: cover; background: var(--bg-3); flex: none; }
.qi .qt { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qi .qa { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Liseuse ---------- */
.reader { position: fixed; inset: 0; z-index: 1400; display: flex; flex-direction: column; background: #f6f1e7; color: #222; }
.reader.dark { background: #16181a; color: #ccc; }
.reader.sepia { background: #f1e5c9; color: #3b2f1e; }
.reader.light { background: #fafafa; color: #222; }
.rd-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid rgba(128, 128, 128, .25); transition: opacity .2s; }
.rd-bar .icon-btn { color: inherit; opacity: .75; }
.rd-bar .icon-btn:hover { opacity: 1; background: rgba(128, 128, 128, .15); color: inherit; }
.rd-title { font-weight: 600; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.rd-stage { flex: 1; position: relative; display: flex; align-items: stretch; min-height: 0; }
.rd-view { flex: 1; min-width: 0; }
.rd-nav { width: 70px; flex: none; display: grid; place-items: center; cursor: pointer; opacity: .35; transition: opacity .15s; color: inherit; border: 0; background: transparent; }
.rd-nav:hover { opacity: .9; }
.rd-foot { display: flex; align-items: center; gap: 14px; padding: 8px 16px 12px; font-size: 13px; }
.rd-page {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: 22px; cursor: pointer;
  border: 1px solid rgba(128, 128, 128, .35); background: rgba(128, 128, 128, .12); color: inherit; font-weight: 600; font-size: 14px;
}
.rd-page:hover, .rd-page:focus { background: var(--accent); border-color: var(--accent); color: #111; outline: none; }
.rd-where { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; opacity: .75; }
.rd-chap { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-pct { font-weight: 700; }
.rd-nav { opacity: .55; }
.rd-tts {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 4; display: flex; align-items: center; gap: 4px;
  padding: 6px 8px 6px 16px; border-radius: 26px; background: rgba(28, 30, 33, .94); color: #eceff1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35); border: 1px solid rgba(229, 160, 13, .5); animation: pop .2s ease-out;
}
.rd-tts .icon-btn { color: #eceff1; opacity: 1; width: 38px; height: 38px; }
.rd-tts .icon-btn:hover { background: rgba(255, 255, 255, .12); }
.rd-tts-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; margin-right: 6px; color: var(--accent); }
.rd-tts-btn { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .2); background: transparent; color: #eceff1; cursor: pointer; font-weight: 600; font-size: 13px; }
.rd-tts-btn:hover { background: rgba(255, 255, 255, .12); }
.rd-toc { position: absolute; left: 0; top: 0; bottom: 0; width: 340px; overflow-y: auto; background: inherit; border-right: 1px solid rgba(128, 128, 128, .3); z-index: 3; padding: 10px 0; box-shadow: 10px 0 30px rgba(0, 0, 0, .15); }
.rd-toc a { display: block; padding: 8px 20px; cursor: pointer; font-size: 14px; }
.rd-toc a:hover { background: rgba(128, 128, 128, .15); }
.rd-toc a.sub { padding-left: 38px; font-size: 13px; opacity: .85; }
.reader .menu { color: var(--text); }

/* ---------- Divers ---------- */
.empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty .icon { width: 64px; height: 64px; opacity: .4; margin-bottom: 12px; }
.empty h2 { color: var(--text); margin-bottom: 8px; font-size: 20px; }
.center-load { display: grid; place-items: center; padding: 120px 0; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 20% -10%, rgba(229, 160, 13, .18), transparent), radial-gradient(900px 500px at 110% 110%, rgba(229, 160, 13, .1), transparent), #141518; overflow-y: auto; }
.auth-box { width: min(400px, 100%); background: #222528; padding: 34px 32px; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); border: 1px solid var(--line); }
.auth-box .logo { justify-content: center; margin: 0 0 22px; font-size: 30px; }
.auth-box .logo-mark { width: 42px; height: 42px; font-size: 24px; border-radius: 10px; }
.auth-box h2 { text-align: center; font-size: 18px; margin-bottom: 20px; font-weight: 500; color: var(--muted); }
.auth-box .btn { width: 100%; justify-content: center; height: 44px; margin-top: 8px; }

.settings { display: grid; grid-template-columns: 230px 1fr; gap: 30px; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; align-self: start; }
.settings-nav a { padding: 10px 14px; border-radius: 4px; color: var(--muted); cursor: pointer; font-weight: 600; }
.settings-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.settings-nav a.active { color: var(--text); background: var(--bg-3); box-shadow: inset 3px 0 var(--accent); }
.settings-body { max-width: 860px; }
.settings-body h2 { font-size: 22px; margin-bottom: 18px; }
.settings-body h3 { font-size: 16px; margin: 26px 0 12px; }
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 20px 22px; margin-bottom: 18px; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-weight: 600; }
.list-row .s { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task { padding: 10px 0; border-bottom: 1px solid var(--line); }
.task .bar { height: 4px; background: var(--bg-4); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.task .bar div { height: 100%; background: var(--accent); transition: width .4s; }
.task .d { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
code, .mono { font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; background: rgba(255, 255, 255, .07); padding: 2px 6px; border-radius: 3px; }
.notice { background: rgba(229, 160, 13, .1); border: 1px solid rgba(229, 160, 13, .35); padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.notice a { color: var(--accent); font-weight: 600; }
.match-item { display: flex; gap: 14px; padding: 10px; border-radius: 6px; cursor: pointer; }
.match-item:hover { background: rgba(255, 255, 255, .06); }
.match-item img, .match-item .mph { width: 64px; aspect-ratio: 2/3; object-fit: cover; border-radius: 3px; background: var(--bg-3); flex: none; }
.match-item .s { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fs-list { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 4px; }
.fs-list div { padding: 8px 12px; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.fs-list div:hover { background: rgba(255, 255, 255, .06); }
.search-page .hub-row { grid-auto-columns: 140px; }

.home-hello { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }
.home-hello h1 { font-size: 22px; font-weight: 700; }

/* ---------- Bandeau « à la une » ---------- */
.hero {
  position: relative; margin: -24px -36px 26px; height: clamp(230px, 32vh, 360px); overflow: hidden; background: #111;
}
.hero-layers, .hero-img, .hero-layer { position: absolute; inset: 0; }
/* les visages sont presque toujours dans le haut des images de fond : on cadre sur le tiers supérieur */
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; opacity: 0; transition: opacity 1.2s ease; will-change: transform, opacity; }
.hero-img.on { opacity: 1; }
.hero-img.pan-right { animation: hero-pan-r 18s linear forwards; transform-origin: 50% 22%; }
.hero-img.pan-left { animation: hero-pan-l 18s linear forwards; transform-origin: 50% 22%; }
@keyframes hero-pan-r { from { transform: scale(1.01) translateX(-.6%); } to { transform: scale(1.05) translateX(.6%); } }
@keyframes hero-pan-l { from { transform: scale(1.05) translateX(.6%); } to { transform: scale(1.01) translateX(-.6%); } }
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(20, 21, 24, .92) 0%, rgba(20, 21, 24, .55) 40%, rgba(20, 21, 24, 0) 70%),
              linear-gradient(0deg, var(--bg) 0%, rgba(27, 29, 32, 0) 35%);
}
.hero-info { position: absolute; left: 40px; bottom: 28px; max-width: min(560px, 55%); z-index: 2; }
.hero-info.in > * { animation: hero-in .6s ease both; }
.hero-info.in > *:nth-child(2) { animation-delay: .05s; }
.hero-info.in > *:nth-child(3) { animation-delay: .1s; }
.hero-info.in > *:nth-child(4) { animation-delay: .15s; }
.hero-info.in > *:nth-child(5) { animation-delay: .2s; }
@keyframes hero-in { from { opacity: 0; transform: translateY(14px); } }
.hero-kicker { color: var(--accent); font-weight: 800; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.hero-title { font-size: clamp(22px, 2.6vw, 36px); line-height: 1.1; font-weight: 800; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); margin-bottom: 10px; }
.hero-logo { display: block; max-width: min(380px, 100%); max-height: 96px; width: auto; height: auto; object-fit: contain; object-position: left bottom; margin: 0 0 12px; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .6)); }
.hero-facts { color: #d0d4d8; font-size: 15px; display: flex; gap: 14px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.hero-star { color: var(--accent); font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.hero-sum { color: #dfe3e6; font-size: 14px; line-height: 1.5; margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-btns .btn { height: 38px; padding: 0 18px; font-size: 14px; }
.hero-ghost { background: rgba(255, 255, 255, .16); backdrop-filter: blur(6px); }
.hero-ghost:hover { background: rgba(255, 255, 255, .28); }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: rgba(0, 0, 0, .35); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .2s, background .2s;
}
.hero:hover .hero-arrow { opacity: 1; }
.hero-arrow:hover { background: var(--accent); color: #111; }
.hero-arrow.left { left: 12px; }
.hero-arrow.right { right: 12px; }
.hero-dots { position: absolute; right: 36px; bottom: 30px; display: flex; gap: 8px; z-index: 3; }
.hero-dot { width: 10px; height: 10px; border-radius: 5px; border: 0; padding: 0; background: rgba(255, 255, 255, .35); cursor: pointer; transition: width .3s, background .3s; }
.hero-dot.on { width: 28px; background: var(--accent); }

.feature-btn { height: 44px; border-radius: 22px; background: rgba(255, 255, 255, .12); }
.feature-btn .icon { color: var(--muted); }
.feature-btn.on { background: linear-gradient(180deg, #ffd56b, #e5a00d 60%, #c98507); color: #2b1c00; box-shadow: 0 2px 0 #8a5a00, 0 3px 8px rgba(0, 0, 0, .4); }
.feature-btn.on .icon { color: #2b1c00; }
.hero-poster { position: absolute; right: 8%; top: 50%; transform: translateY(-50%); height: 84%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); z-index: 1; opacity: 0; transition: opacity 1s; }
.hero-poster.square { aspect-ratio: 1; }
.hero-poster.on { opacity: 1; }
.hero-img.blurfill { filter: blur(28px) saturate(1.3) brightness(.7); }
.hero.home { margin: -24px -36px 30px; }

/* ---------- Bandeau défilant « Ce mois-ci » (accueil) ---------- */
.ticker {
  display: flex; align-items: stretch; height: 38px; margin: -24px -36px 0; overflow: hidden; white-space: nowrap; font-size: 13.5px;
  background: linear-gradient(180deg, #13284a, #0c1a33); border-top: 1px solid #c9921c; border-bottom: 1px solid #c9921c;
  box-shadow: inset 0 1px 0 rgba(255, 214, 120, .25), 0 4px 12px rgba(0, 0, 0, .35); position: relative; z-index: 2;
}
.ticker + .hero.home { margin-top: 0; }
.ticker + :not(.hero) { margin-top: 24px; }
.tk-label {
  flex: none; display: grid; place-items: center; padding: 0 16px; font-weight: 800; letter-spacing: 1px; cursor: default;
  background: linear-gradient(180deg, #e9b949, #c9921c 60%, #a8700a); color: #2b1c00;
  box-shadow: inset 0 1px 0 rgba(255, 240, 190, .6), 6px 0 10px rgba(0, 0, 0, .45); position: relative; z-index: 1;
}
.tk-window { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; display: flex; align-items: center; }
.tk-window::-webkit-scrollbar { display: none; }
.tk-group { display: flex; align-items: center; justify-content: space-around; flex: 1; min-width: max-content; padding: 0 8px; }
.tk-item { display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; height: 38px; color: inherit; }
.tk-item:hover .tk-name { text-decoration: underline; }
.tk-sep { color: #c9921c; font-weight: 800; }
.tk-name { font-weight: 800; letter-spacing: .4px; color: #eceff1; }
.tk-num { font-weight: 900; color: #ffcf5a; text-shadow: 0 1px 0 #b97f0f, 0 2px 0 #6b4500, 0 3px 4px rgba(0, 0, 0, .6); }

/* ---------- Menu : couleurs du tableau, chiffres or en relief ---------- */
.nav-item.lib span:not(.count) { color: #eceff1; }
.nav-item.lib .count {
  margin-left: auto; font-size: 15px; font-weight: 900; color: #ffcf5a; letter-spacing: .3px;
  text-shadow: 0 1px 0 #d39a1c, 0 2px 0 #8a5a00, 0 3px 4px rgba(0, 0, 0, .7);
}

/* ---------- Télécommande (Android TV) ---------- */
.tv *:focus { outline: none; }
.tv .card:focus .thumb { box-shadow: 0 0 0 4px var(--accent), 0 8px 24px rgba(0, 0, 0, .6); transform: scale(1.06); }
.tv .card .thumb { transition: transform .15s, box-shadow .15s; }
.tv .card:focus .overlay { opacity: 1; }
.tv .card:focus .title { color: var(--accent); }
.tv a:focus, .tv button:focus, .tv .ep:focus, .tv .tracks tr:focus td, .tv .menu-item:focus, .tv .match-item:focus, .tv .qi:focus, .tv .person:focus, .tv .fs-list div:focus {
  box-shadow: 0 0 0 3px var(--accent); background-color: rgba(229, 160, 13, .15); border-radius: 6px;
}
.tv .nav-item:focus { color: var(--text); background: rgba(229, 160, 13, .18); box-shadow: inset 3px 0 var(--accent); border-radius: 0; }
.tv .vp-ctrls .icon-btn:focus { background: var(--accent); color: #111; }
.tv input:focus { box-shadow: 0 0 0 3px var(--accent); }

@media (max-width: 900px) {
  :root { --sidebar: 0px; --card: 120px; }
  /* le menu latéral est masqué (ou flottant) : le contenu prend toute la largeur */
  .shell { grid-template-columns: 1fr; }
  .main { grid-column: 1 / -1; }
  .shell.mobile-nav .sidebar { position: fixed; left: 0; top: var(--topbar); bottom: 0; width: 250px; z-index: 40; box-shadow: 10px 0 30px rgba(0, 0, 0, .5); }
  .sidebar { display: none; }
  .shell.mobile-nav .sidebar { display: block; }
  .page { padding: 16px 16px 60px; }
  .hero, .hero.home { margin: -16px -16px 20px; height: 260px; }
  .ticker + .hero.home { margin-top: 0; }
  .hero-info { left: 16px; right: 16px; bottom: 50px; max-width: none; }
  .hero-sum { -webkit-line-clamp: 2; }
  .hero-dots { right: 16px; bottom: 18px; }
  .ticker { margin: -16px -16px 0; }
  .ticker + :not(.hero) { margin-top: 16px; }
  .logo span.txt { display: none; }
  .detail-content { padding: 20px 16px 40px; }
  .detail-top { flex-direction: column; gap: 20px; }
  .detail-poster, .detail-poster.square { width: 180px; }
  .detail-poster.wide { width: 100%; }
  .detail-info h1 { font-size: 26px; }
  .ep .ep-thumb { width: 140px; }
  .aplayer { grid-template-columns: 1fr auto; }
  .ap-right { display: none; }
  .ap-center .ap-seek { display: none; }
  .settings { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; overflow-x: auto; position: static; }
  .alpha { display: none; }
  .vp-panel { right: 8px; left: 8px; width: auto; }
  .vp-vol { display: none; }
  .queue-panel { width: 100%; }
}

/* ---------- « Qui regarde ? » (admin) ---------- */
.watch-btn { position: relative; }
.watch-btn .wb-count:empty { display: none; }
.watch-btn .wb-count {
  position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: linear-gradient(180deg, #ffcf4d, #e5a00d); color: #1b1d20; font: 700 11px/17px "Segoe UI", system-ui, sans-serif; text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .5), 0 0 0 2px var(--bg);
}
.watch-btn.live { color: var(--accent); }
.watch-btn.live svg { animation: wb-pulse 2.4s ease-in-out infinite; }
@keyframes wb-pulse { 50% { filter: drop-shadow(0 0 6px rgba(229, 160, 13, .8)); } }
.watch-panel {
  position: fixed; top: calc(var(--topbar) + 6px); right: 14px; z-index: 900; width: min(460px, calc(100vw - 28px));
  max-height: calc(100vh - var(--topbar) - 30px); display: flex; flex-direction: column;
  background: rgba(30, 32, 36, .97); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px rgba(0, 0, 0, .6);
  backdrop-filter: blur(14px); overflow: hidden; animation: wp-in .16s ease-out;
}
@keyframes wp-in { from { opacity: 0; transform: translateY(-6px); } }
.wp-head { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px 10px; font-size: 15px; }
.wp-n { color: var(--muted); font-size: 13px; }
.wp-body { overflow-y: auto; padding: 0 12px 6px; display: flex; flex-direction: column; gap: 10px; }
.wp-body > .spinner { margin: 24px auto; }
.wp-empty { padding: 30px 10px 34px; text-align: center; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.wp-empty svg { width: 34px; height: 34px; opacity: .35; }
.wp-more { padding: 10px 16px 13px; color: var(--muted); font-size: 13px; text-decoration: none; border-top: 1px solid var(--line); }
.wp-more:hover { color: var(--accent); }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; }

.wcard { position: relative; border-radius: 10px; overflow: hidden; background: var(--bg-3); isolation: isolate; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.wc-bg { position: absolute; inset: -20px; background-size: cover; background-position: center 30%; filter: blur(14px) saturate(1.3) brightness(.45); transform: scale(1.1); z-index: -1; }
.wcard::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20, 22, 25, .55), rgba(20, 22, 25, .2)); }
.wc-in { display: flex; gap: 12px; padding: 12px; align-items: stretch; }
.wc-left { flex: 0 0 auto; }
.wc-poster { width: 74px; height: 111px; object-fit: cover; border-radius: 6px; display: block; box-shadow: 0 6px 16px rgba(0, 0, 0, .55); background: var(--bg-4); }
.wc-poster.ph { display: grid; place-items: center; color: var(--dim); }
.wc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wc-who { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.wc-who b { color: var(--text); }
.wc-av { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; flex: none; }
.wc-state { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 12px; padding: 1px 7px 1px 4px; border-radius: 10px; }
.wc-state.on { color: #7ee2a0; background: rgba(63, 185, 80, .16); }
.wc-state.off { color: #ffd479; background: rgba(229, 160, 13, .16); }
.wc-state svg { width: 14px; height: 14px; }
.wc-title { font-size: 15.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.wc-sub { font-size: 13px; color: #c9cdd2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.wc-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: #d6d9dd; background: rgba(255, 255, 255, .09); padding: 2px 7px; border-radius: 4px; white-space: nowrap; }
.wc-tag svg { width: 13px; height: 13px; opacity: .85; }
.wc-tag.remote { color: #9fd4ff; background: rgba(31, 155, 209, .2); }
.wc-tag.warn { color: #ffcf7a; background: rgba(229, 160, 13, .18); }
.wc-prog { margin-top: auto; padding-top: 6px; }
.wc-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.wc-fill { height: 100%; background: linear-gradient(90deg, #e5a00d, #ffcf4d); border-radius: 2px; transition: width 1s linear; }
.wcard.paused .wc-fill { background: #9aa0a6; }
.wc-times { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.wc-stop { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; opacity: 0; transition: opacity .15s; background: rgba(0, 0, 0, .45); }
.wcard:hover .wc-stop { opacity: 1; }
.wcard:hover .wc-state { margin-right: 26px; }
@media (max-width: 600px) { .wgrid { grid-template-columns: 1fr; } .wc-poster { width: 60px; height: 90px; } }

/* ---------- livres en 3D ---------- */
.book3d {
  --w: 200px; --h: calc(var(--w) * 1.5); --t: calc(var(--w) * var(--k, .2));
  position: relative; width: var(--w); height: var(--h); transform-style: preserve-3d; flex: none;
}
.book3d > div { position: absolute; backface-visibility: hidden; }
.b3-front { inset: 0; transform: translateZ(calc(var(--t) / 2)); border-radius: 1px 4px 4px 1px; overflow: hidden; background: #2c2f33; }
.b3-front > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.b3-front::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(90deg, rgba(0, 0, 0, .38) 0, rgba(255, 255, 255, .16) 2.5%, rgba(0, 0, 0, .08) 5%, transparent 11%),
              linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .1) 48%, transparent 58%);
}
.b3-back { inset: 0; transform: rotateY(180deg) translateZ(calc(var(--t) / 2)); border-radius: 4px 1px 1px 4px; background: #2a241c center / cover; overflow: hidden; }
.b3-back p { position: absolute; left: 8%; right: 8%; bottom: 7%; margin: 0; font: 11.5px/1.45 Georgia, serif; color: rgba(255, 255, 255, .88); text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.b3-spine {
  width: var(--t); height: var(--h); left: calc(50% - var(--t) / 2); transform: rotateY(-90deg) translateZ(calc(var(--w) / 2));
  background: #3a2616 left center / auto 100%; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.b3-spine b {
  writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: 86%;
  font: 600 clamp(7px, calc(var(--t) * .36), 13px)/1 Georgia, serif; color: rgba(255, 255, 255, .93); letter-spacing: .4px; text-shadow: 0 1px 2px rgba(0, 0, 0, .8);
}
.b3-spine::before, .b3-spine::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: rgba(229, 160, 13, .75); }
.b3-spine::before { top: 7%; } .b3-spine::after { bottom: 7%; }
.b3-pages {
  width: calc(var(--t) - 3px); height: calc(var(--h) - 4px); top: 2px; left: calc(50% - (var(--t) - 3px) / 2);
  transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - 2px));
  background: repeating-linear-gradient(90deg, #f3ecdc 0 1px, #d6ccb6 1px 2px); box-shadow: inset 0 0 5px rgba(0, 0, 0, .25);
}
.b3-top, .b3-bottom {
  width: calc(var(--w) - 4px); height: calc(var(--t) - 3px); left: 0; top: calc(50% - (var(--t) - 3px) / 2);
  background: repeating-linear-gradient(0deg, #f3ecdc 0 1px, #d6ccb6 1px 2px);
}
.b3-top { transform: rotateX(90deg) translateZ(calc(var(--h) / 2 - 2px)); }
.b3-bottom { transform: rotateX(-90deg) translateZ(calc(var(--h) / 2 - 2px)); }

/* dans les grilles et rangées */
.card.book-card .book-thumb {
  container-type: inline-size; overflow: visible; background: none; box-shadow: none; border-radius: 0;
  perspective: 900px; display: flex; align-items: flex-end; justify-content: center;
}
.card.book-card:hover .book-thumb, .card.book-card:hover .b3-cover { box-shadow: none; }
.book-card .book3d { --w: 80cqw; margin-bottom: 5px; transform: rotateY(24deg) rotateX(2deg); transition: transform .55s cubic-bezier(.2, .8, .2, 1); }
.book-card:hover .book3d, .tv .book-card:focus .book3d { transform: translateY(-8px) rotateY(-3deg) rotateX(1deg) scale(1.05); }
.book-card .b3-cover { position: absolute; inset: 0; aspect-ratio: auto; background: transparent; border-radius: 0; z-index: 2; overflow: hidden; }
.book-card:hover .b3-front { box-shadow: 0 0 0 2px var(--accent); }
.book-thumb::before {
  content: ""; position: absolute; left: 14%; right: 4%; bottom: -1px; height: 12px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .65), transparent); transition: opacity .5s;
}
.book-card:hover .book-thumb::before { opacity: .45; }
.tv .card.book-card:focus .thumb { transform: none; box-shadow: none; }
/* bibliothèque Livres : planche de bois sous chaque rangée */
.grid.shelf { row-gap: 34px; }
.grid.shelf .book-thumb::after {
  content: ""; position: absolute; left: -9px; right: -9px; bottom: -13px; height: 13px; z-index: -1;
  background: linear-gradient(180deg, #8a5a33, #6b4325 45%, #4a2d18); box-shadow: 0 12px 18px rgba(0, 0, 0, .45), inset 0 2px 0 rgba(255, 255, 255, .16);
}
.grid.shelf .card .meta { padding-top: 20px; }

/* fiche d'un livre : grand livre qu'on fait tourner */
.detail-poster.book3d-wrap { overflow: visible; background: none; box-shadow: none; aspect-ratio: auto; border-radius: 0; container-type: inline-size; }
.b3-stage { position: relative; aspect-ratio: 2 / 3.15; perspective: 1300px; display: grid; place-items: center; cursor: grab; touch-action: pan-y; user-select: none; }
.b3-stage.grabbing { cursor: grabbing; }
.b3-stage .book3d { --w: 78cqw; }
.b3-floor { position: absolute; bottom: 0; left: 12%; right: 12%; height: 26px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent); pointer-events: none; }

/* ---------- écran de démarrage ---------- */
.splash { position: fixed; inset: 0; z-index: 5000; background: #000; overflow: hidden; cursor: pointer; }
.sp-video, .sp-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sp-video { object-fit: cover; }
.splash.sp-3d .sp-video { visibility: hidden; } /* le canvas 3D redessine la vidéo avec le logo */
.sp-logo2d { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%) scale(1.06); display: flex; align-items: center; gap: 2.2vw; opacity: 0; transition: opacity .3s, transform .5s; pointer-events: none; }
.sp-logo2d.show { opacity: 1; transform: translate(-50%, -50%); }
.sp-logo2d .sp-mark { width: 11vw; height: 11vw; border-radius: 22%; display: grid; place-items: center; font: 900 7.4vw/1 "Segoe UI", system-ui, sans-serif; color: #141210;
  background: linear-gradient(135deg, #ffd56a, #f5b32a 40%, #c77c02); box-shadow: 0 0 40px rgba(255, 120, 20, .6); }
.sp-logo2d .sp-word { font: 900 10.5vw/1 "Segoe UI", system-ui, sans-serif; letter-spacing: .06em; color: #f4f1ea; text-shadow: 0 0 30px rgba(255, 110, 20, .7), 0 -6px 24px rgba(255, 80, 0, .5); }
.sp-logo2d .sp-word b { color: #ffcf4d; }
.sp-skip { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .3); font-size: 12px; letter-spacing: .5px; opacity: 0; animation: sp-fadein .6s 1s forwards; }
@keyframes sp-fadein { to { opacity: 1; } }
.splash.out { animation: sp-out .4s ease forwards; }
.splash.out-fast { animation: sp-out .25s ease forwards; }
@keyframes sp-out { to { opacity: 0; } }

/* ---------- paramètres : point rouge (connexions à vérifier) ---------- */
.settings-btn { position: relative; }
.settings-btn.alert::after { content: ""; position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--bg), 0 0 8px rgba(229, 83, 75, .8); animation: wb-pulse 2s infinite; }

/* ---------- journal des connexions ---------- */
.ll-stats { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px; }
.ll-stats > div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; min-width: 120px; }
.ll-stats b { font-size: 22px; color: var(--text); line-height: 1.2; }
.ll-stats .warn b { color: var(--danger); } .ll-stats .info b { color: #6cc4f0; }
.ll-period { color: var(--dim); font-size: 12px; margin-left: 6px; }
.panel.ll { padding-top: 6px; }
.ll-day { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--dim); margin: 16px 0 6px; }
.ll-day:first-child { margin-top: 6px; }
.ll-row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 6px; }
.ll-row:hover { background: rgba(255, 255, 255, .03); }
.ll-row.new { background: rgba(229, 83, 75, .08); }
.ll-time { width: 44px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.ll-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--ok); box-shadow: 0 0 6px rgba(63, 185, 80, .6); }
.ll-row.bad .ll-dot { background: var(--danger); box-shadow: 0 0 6px rgba(229, 83, 75, .7); }
.ll-row.info .ll-dot { background: #6cc4f0; box-shadow: 0 0 6px rgba(108, 196, 240, .6); }
.ll-row .t { font-size: 14px; }
.ll-row .s { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ll-row .s .icon { width: 14px; height: 14px; }
.ll-tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; color: #9fd4ff; background: rgba(31, 155, 209, .2); }

/* ---------- sauvegardes ---------- */
.bk-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.bk-head .t { font-size: 15px; font-weight: 600; }
.bk-head .s { color: var(--muted); font-size: 13px; }
.bk-state { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.bk-state.ok { background: rgba(63, 185, 80, .16); color: var(--ok); }
.bk-state.warn { background: rgba(229, 160, 13, .16); color: var(--accent); }
.bk-tag { font-size: 11px; margin-left: 8px; padding: 1px 7px; border-radius: 9px; background: rgba(255, 255, 255, .08); color: var(--muted); font-weight: 400; }
.check-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- collections ---------- */
.collage { position: absolute; inset: 0; display: grid; gap: 2px; background: #111; }
.collage.n1 { grid-template-columns: 1fr; }
.collage.n2 { grid-template-columns: 1fr 1fr; }
.collage.n3, .collage.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.collage.n3 img:first-child { grid-row: span 2; }
.collage img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.detail-poster .collage { border-radius: inherit; overflow: hidden; }
.coll-badge {
  position: absolute; top: 6px; left: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 12px;
  background: rgba(0, 0, 0, .72); color: var(--accent); font-size: 12px; font-weight: 700; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); z-index: 1;
}
.coll-badge .icon { width: 14px; height: 14px; }

/* ---------- doublons : chemins des fichiers ---------- */
.dups { display: flex; flex-direction: column; gap: 14px; max-width: 1200px; }
.dups-intro { color: var(--muted); margin: 0 0 4px; }
.dups-group { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.dups-head { display: flex; align-items: center; gap: 14px; }
.dups-poster img, .dups-ph { width: 52px; height: 78px; object-fit: cover; border-radius: 4px; display: grid; place-items: center; background: var(--bg-3); color: var(--dim); box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.dups-title { font-size: 16px; font-weight: 700; }
.dups-title span { color: var(--muted); font-weight: 400; }
.dups-n { color: var(--accent); font-size: 13px; }
.dups-list { display: flex; flex-direction: column; gap: 8px; }
.dups-copy { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: rgba(0, 0, 0, .15); display: grid; gap: 6px; }
.dups-copy.best { border-color: rgba(229, 160, 13, .45); background: rgba(229, 160, 13, .06); }
.dups-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.dups-tags .tag { font-size: 11.5px; padding: 2px 8px; border-radius: 4px; background: rgba(255, 255, 255, .08); color: #d6d9dd; display: inline-flex; align-items: center; gap: 4px; }
.dups-tags .tag.best { background: rgba(229, 160, 13, .2); color: var(--accent); font-weight: 600; }
.dups-tags .tag.dim { color: var(--muted); background: none; padding-left: 2px; }
.dups-tags .tag .icon { width: 13px; height: 13px; }
.dups-path { font: 12.5px/1.45 Consolas, "Cascadia Mono", monospace; word-break: break-all; user-select: text; color: #c9cdd2; }
.dups-path .dir { color: var(--muted); }
.dups-path b { color: #fff; font-weight: 600; }
.dups-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.dups-actions .dups-del { margin-left: auto; }
.modal p { white-space: pre-line; word-break: break-all; }

/* ---------- modifier : jaquette ---------- */
.pe { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.pe-preview { width: 130px; aspect-ratio: 2 / 3; flex: none; border-radius: 6px; overflow: hidden; background: var(--bg-3); cursor: pointer; position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .45); outline: 2px dashed transparent; outline-offset: 3px; transition: outline-color .15s, opacity .15s; }
.pe-preview.square { aspect-ratio: 1; }
.pe-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pe-preview:hover, .pe-preview.drop { outline-color: var(--accent); }
.pe-preview.busy { opacity: .45; }
.pe-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--dim); font-size: 12px; }
.pe-side { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.pe-side > label { font-weight: 600; margin-bottom: 2px; }
.pe-hint { color: var(--muted); font-size: 12.5px; margin: 0 0 10px; }
.pe-side .row { width: 100%; }
.pe-status { color: var(--ok); font-size: 12.5px; }

/* ---------- choix de jaquette ---------- */
.pp-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.pp-status { color: var(--muted); font-size: 12.5px; }
.pp-hint { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.pp-empty { color: var(--muted); padding: 20px 0; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; max-height: 62vh; overflow-y: auto; padding: 2px; }
.pp-cell { position: relative; padding: 0; border: 0; border-radius: 6px; overflow: hidden; aspect-ratio: 2 / 3; background: var(--bg-3); cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .4); transition: transform .15s, box-shadow .15s; }
.pp-cell:hover { transform: translateY(-3px); box-shadow: 0 0 0 3px var(--accent), 0 8px 18px rgba(0, 0, 0, .5); }
.pp-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-src { position: absolute; left: 4px; bottom: 4px; font-size: 10.5px; padding: 1px 6px; border-radius: 3px; background: rgba(0, 0, 0, .7); color: #ddd; }

/* ---------- outils ---------- */
.tools-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tools-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg-2); color: var(--muted); cursor: pointer; font: inherit; }
.tools-tab:hover { color: var(--text); }
.tools-tab.on { background: rgba(229, 160, 13, .15); border-color: rgba(229, 160, 13, .5); color: var(--accent); }
.tl-intro { color: var(--muted); margin: 0 0 12px; font-size: 13.5px; }
.tl-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.tl-list { display: flex; flex-direction: column; gap: 6px; }
.tl-row { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; }
.tl-row.done { opacity: .55; }
.tl-row.rn { cursor: pointer; align-items: flex-start; }
.tl-row.rn input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.tl-row .t { font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.tl-row .t a:hover { color: var(--accent); }
.tl-row .s { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tl-row .dim { color: var(--muted); font-weight: 400; }
.tl-ph, .tl-img { width: 40px; height: 60px; border-radius: 4px; background: var(--bg-3); display: grid; place-items: center; color: var(--dim); flex: none; object-fit: cover; }
.tl-tag { font-size: 11px; font-weight: 400; padding: 1px 7px; border-radius: 4px; background: rgba(255, 255, 255, .08); color: #cfd3d7; }
.tl-tag.warn { background: rgba(229, 160, 13, .18); color: var(--accent); }
.tl-tag.ok { background: rgba(63, 185, 80, .16); color: #7ee2a0; }
.tl-badge { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 12px; white-space: nowrap; flex: none; }
.tl-badge.bad { background: rgba(229, 83, 75, .2); color: #ff8a83; }
.tl-badge.warn { background: rgba(229, 160, 13, .18); color: var(--accent); }
.tl-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tl-path { font: 12px/1.4 Consolas, monospace; color: #c9cdd2; word-break: break-all; margin-top: 3px; }
.tl-path .dir { color: var(--muted); }
.rn-change { font: 12.5px/1.45 Consolas, monospace; word-break: break-all; margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.rn-from { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(229, 83, 75, .6); }
.rn-arrow { color: var(--accent); }
.rn-to { color: #b8f0c8; }

/* ================= MODE TV (façon Plex) ================= */
.tvm { position: fixed; inset: 0; z-index: 850; /* sous les fenêtres (900), menus, lecteurs (1400-1500) et messages (2000) */ background: #0b0c0e; color: #f2f2f2; overflow: hidden; font-size: clamp(13px, 1.05vw, 30px); user-select: none; cursor: default; }
.tvm-bg { position: absolute; inset: 0; }
.tvm-bg-img { position: absolute; inset: 0; background-size: cover; background-position: center 20%; opacity: 0; transition: opacity .9s ease; transform: scale(1.03); }
.tvm-bg-img.on { opacity: 1; animation: tvm-drift 30s ease-in-out infinite alternate; }
@keyframes tvm-drift { to { transform: scale(1.09) translateX(-1.5%); } }
.tvm-shade { position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11, 12, 14, .97) 0%, rgba(11, 12, 14, .82) 30%, rgba(11, 12, 14, .25) 62%, rgba(11, 12, 14, .1) 100%),
              linear-gradient(0deg, #0b0c0e 38%, rgba(11, 12, 14, .55) 62%, rgba(11, 12, 14, 0) 85%); }
.tvm-main { position: absolute; left: 7vw; right: 0; top: 0; bottom: 0; }

/* menu de gauche */
.tvm-nav { position: absolute; left: 0; top: 0; bottom: 0; width: 5.2vw; z-index: 5; padding: 3.5vh .6vw; display: flex; flex-direction: column; gap: .5vh;
  background: linear-gradient(90deg, rgba(11, 12, 14, .85), rgba(11, 12, 14, 0)); transition: width .25s ease, background .25s; overflow: hidden; }
.tvm-nav.open { width: 19vw; background: rgba(14, 15, 18, .97); box-shadow: 1vw 0 3vw rgba(0, 0, 0, .7); }
.tvm-logo { display: flex; align-items: center; gap: .8vw; font-weight: 800; letter-spacing: .25em; font-size: 1.35em; margin: 0 .5vw 4vh; white-space: nowrap; }
.tvm-logo .logo-mark { width: 2.4vw; height: 2.4vw; border-radius: .5vw; font-size: 1.1em; flex: none; }
.tvm-logo b { color: var(--accent); }
.tvm-logo .txt { opacity: 0; transition: opacity .2s; }
.tvm-nav.open .tvm-logo .txt { opacity: 1; }
.tvm-nav-it { display: flex; align-items: center; gap: 1.2vw; padding: 1.1vh 1.1vw; border-radius: .6vw; white-space: nowrap; color: #b9bcc0; font-size: 1.1em; }
.tvm-nav-it .icon { width: 1.9vw; height: 1.9vw; flex: none; }
.tvm-nav-it span { opacity: 0; transition: opacity .2s; }
.tvm-nav.open .tvm-nav-it span { opacity: 1; }
.tvm-nav-it.focus { background: var(--accent); color: #111; font-weight: 700; }

/* en-tête */
.tvm-hero { position: absolute; top: 8vh; left: 0; width: 48vw; min-height: 30vh; }
.tvm-hero h1 { font-size: 3.4em; line-height: 1.05; margin: 0 0 1.6vh; font-weight: 800; text-shadow: 0 .3vw 1.2vw rgba(0, 0, 0, .7); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tvm-logo-img { max-height: 15vh; max-width: 32vw; object-fit: contain; object-position: left bottom; display: block; margin-bottom: 2vh; filter: drop-shadow(0 .3vw .8vw rgba(0, 0, 0, .7)); }
.tvm-facts { display: flex; flex-wrap: wrap; gap: .5vw 1.2vw; align-items: center; color: #d4d6d9; font-size: 1.05em; margin-bottom: 1.6vh; }
.tvm-facts span + span::before { content: ""; display: inline-block; width: .3em; height: .3em; border-radius: 50%; background: rgba(255, 255, 255, .45); margin-right: 1.2vw; vertical-align: middle; }
.tvm-rating { color: var(--accent); font-weight: 700; display: inline-flex; align-items: center; gap: .3em; }
.tvm-rating::before { display: none !important; }
.tvm-rating .icon { width: 1.1em; height: 1.1em; }
.tvm-sum { color: #c9ccd0; line-height: 1.45; margin: 0; max-width: 44vw; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }
.tvm-query { font-size: 3em !important; min-height: 1.1em; display: flex !important; align-items: center; }
.tvm-query .ph { color: rgba(255, 255, 255, .35); font-weight: 400; }
.tvm-query .caret { display: inline-block; width: .08em; height: .95em; background: var(--accent); margin-left: .1em; animation: tvm-blink 1s steps(1) infinite; }
@keyframes tvm-blink { 50% { opacity: 0; } }

/* rangées */
.tvm-rows-wrap { position: absolute; left: 0; right: 0; top: 49vh; bottom: 0; overflow: hidden; padding-top: 1vh; }
.tvm.detail .tvm-rows-wrap { top: 52vh; }
.tvm-rows { transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.tvm-row { margin-bottom: 3.2vh; opacity: .55; transition: opacity .3s; }
.tvm-row.active { opacity: 1; }
.tvm-row h3 { font-size: 1.3em; font-weight: 700; margin: 0 0 1.2vh; color: #fff; }
.tvm-track-wrap { overflow: visible; }
.tvm-track { display: flex; gap: 1.2vw; padding: .9vw 0 .4vw .2vw; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.tvm-card { flex: none; width: 10.6vw; }
.tvm-card.wide { width: 20vw; }
.tvm-card.square { width: 12vw; }
.tvm-thumb { position: relative; aspect-ratio: 2 / 3; border-radius: .45vw; overflow: hidden; background: #222428; box-shadow: 0 .4vw 1.2vw rgba(0, 0, 0, .55); transition: transform .2s ease, box-shadow .2s; }
.tvm-card.wide .tvm-thumb { aspect-ratio: 16 / 9; }
.tvm-card.square .tvm-thumb { aspect-ratio: 1; }
.tvm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tvm-ph { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: .8vw; color: #8b8f94; font-size: .9em; background: linear-gradient(160deg, #2b2e33, #1d1f23); }
.tvm-card.focus .tvm-thumb { transform: scale(1.08); box-shadow: 0 0 0 .22vw var(--accent), 0 1vw 2.5vw rgba(0, 0, 0, .8); z-index: 2; }
.tvm-ct { margin-top: 1.1vh; font-size: .95em; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #e9e9e9; }
.tvm-cs { font-size: .8em; color: #9a9ea3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tvm-card.focus .tvm-ct { color: var(--accent); }
.tvm-prog { position: absolute; left: 0; right: 0; bottom: 0; height: .35vw; background: rgba(0, 0, 0, .6); }
.tvm-prog div { height: 100%; background: var(--accent); }
.tvm-badge { position: absolute; top: .4vw; left: .4vw; background: rgba(0, 0, 0, .75); color: var(--accent); font-weight: 700; font-size: .8em; padding: .1em .6em; border-radius: 1em; }

/* boutons et clavier */
.tvm-buttons .tvm-track, .tvm-keyboard .tvm-track { padding: .6vw 0 .2vw; gap: .9vw; }
.tvm-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: .6vw; padding: 1.3vh 1.8vw; border-radius: 3em; background: rgba(255, 255, 255, .13); color: #f0f0f0; font-weight: 600; font-size: 1.05em; transition: transform .15s, background .15s; backdrop-filter: blur(6px); }
.tvm-btn .icon { width: 1.4em; height: 1.4em; }
.tvm-btn.primary { background: rgba(229, 160, 13, .25); }
.tvm-btn.focus { background: var(--accent); color: #111; transform: scale(1.06); box-shadow: 0 .5vw 1.5vw rgba(229, 160, 13, .35); }
.tvm-keyboard { margin-bottom: .8vh; opacity: .8; }
.tvm-keyboard .tvm-track { gap: .45vw; }
.tvm-keyboard .tvm-btn { width: 3.1vw; height: 3.1vw; padding: 0; border-radius: .5vw; font-size: 1.15em; }
.tvm-keyboard .tvm-btn.wide { width: auto; padding: 0 1.4vw; }
.tvm-loading { display: grid; place-items: center; height: 30vh; }

/* horloge, lecteur musique */
.tvm-clock { position: absolute; top: 3.5vh; right: 3vw; font-size: 1.5em; font-weight: 600; color: #e6e6e6; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); z-index: 4; }
.tvm-player { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; }
.tvm-player:empty { display: none; }

/* vidéo ou livre ouvert : l'interface TV est masquée derrière (et ne consomme plus rien) */
body:has(> .vplayer) .tvm, body:has(> .reader) .tvm { visibility: hidden; }
body:has(> .vplayer) .tvm-bg-img.on { animation: none; }

/* ---------- partages du NAS injoignables ---------- */
.nas-banner { position: fixed; top: calc(var(--topbar) + 10px); left: 50%; transform: translateX(-50%); z-index: 860; width: min(900px, calc(100vw - 32px));
  display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px 12px 16px; border-radius: 10px; background: rgba(60, 20, 18, .96); border: 1px solid rgba(229, 83, 75, .6);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .55); color: #f3dcda; animation: nas-in .25s ease-out; backdrop-filter: blur(8px); }
@keyframes nas-in { from { opacity: 0; transform: translate(-50%, -8px); } }
/* téléphone : le texte passe sous l'icône et les boutons, sur toute la largeur, et défile s'il est long */
@media (max-width: 600px) {
  .nas-banner { flex-wrap: wrap; gap: 8px 10px; max-height: 60vh; overflow-y: auto; }
  .nas-banner .btn { margin-left: auto; }
  .nas-banner .nas-txt { order: 3; flex: 1 1 100%; }
}
.nas-ic { font-size: 22px; line-height: 1; color: #ff8a83; }
.nas-txt { flex: 1; min-width: 0; font-size: 13.5px; }
.nas-txt b { color: #fff; font-size: 14.5px; display: block; margin-bottom: 3px; }
.nas-line { margin: 2px 0; word-break: break-all; }
.nas-line code { font-family: Consolas, monospace; color: #fff; background: rgba(0, 0, 0, .3); padding: 0 5px; border-radius: 3px; }
.nas-hint { color: #d9b4b0; font-size: 12.5px; margin-top: 4px; }
.card.offline .thumb img, .card.offline .b3-front img { filter: grayscale(1) brightness(.55); }
.off-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; white-space: nowrap; background: rgba(60, 20, 18, .92); color: #ffb0aa;
  border: 1px solid rgba(229, 83, 75, .6); font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 12px; }
.nas-paths { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 2px 0; }
.nas-path { font: 12.5px Consolas, monospace; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.nas-path i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 5px rgba(63, 185, 80, .7); }
.nas-path.off { color: #ff8a83; }
.nas-path.off i { background: var(--danger); box-shadow: 0 0 6px rgba(229, 83, 75, .8); }

/* ---------- tambour « Ce mois-ci » (barre du haut) ---------- */
.topbar .search { margin-right: 0; }
.month-drum { margin: 0 auto; display: flex; align-items: center; height: 40px; flex: 0 1 380px; min-width: 0; cursor: pointer; user-select: none;
  border-radius: 10px; overflow: hidden; background: #08090a; box-shadow: inset 0 0 0 1px rgba(229, 160, 13, .28), 0 4px 12px rgba(0, 0, 0, .45); }
.month-drum[hidden] { display: none; }
.md-label { flex: none; align-self: stretch; display: grid; place-items: center; padding: 0 12px; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; color: #1b1d20;
  background: linear-gradient(180deg, #ffd55e, #e5a00d 55%, #b57c06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset -1px 0 0 rgba(0, 0, 0, .35); }
.md-window { --md-h: 40px; --md-r: 20px; position: relative; flex: 1; min-width: 0; height: var(--md-h); perspective: 300px; }
.md-window::before, .md-window::after { content: ""; position: absolute; left: 0; right: 0; height: 13px; z-index: 2; pointer-events: none; }
.md-window::before { top: 0; background: linear-gradient(#08090a, rgba(8, 9, 10, 0)); }
.md-window::after { bottom: 0; background: linear-gradient(rgba(8, 9, 10, 0), #08090a); }
.md-drum { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.7, 0, .3, 1); }
.md-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 12px; backface-visibility: hidden;
  background: linear-gradient(180deg, #1c1e22, #2d3036 50%, #1c1e22); white-space: nowrap; overflow: hidden; }
.md-face .icon { width: 19px; height: 19px; color: #e5a00d; flex: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .8)); }
.md-name { font-weight: 700; color: #eceff1; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); }
.md-name.dim { color: var(--muted); font-weight: 400; }
.md-num { font-size: 19px; font-weight: 900; color: #ffd55e; text-shadow: 0 1px 0 #d39a0a, 0 2px 0 #b07f05, 0 3px 0 #8a6303, 0 5px 6px rgba(0, 0, 0, .8); }
.month-drum:hover { box-shadow: inset 0 0 0 1px rgba(229, 160, 13, .6), 0 4px 14px rgba(229, 160, 13, .15); }
@media (max-width: 1100px) { .month-drum { flex-basis: 280px; } .md-label { padding: 0 8px; letter-spacing: .5px; } }
@media (max-width: 760px) { .month-drum { display: none; } }
.topbar .search { flex: 0 1 440px; }
.month-drum { flex: 0 0 340px; }
.md-label { white-space: nowrap; padding: 0 14px; }
@media (max-width: 1250px) { .month-drum { flex-basis: 280px; } .topbar .search { flex-basis: 320px; } }

/* ---------- Menu des bibliothèques : plaques dorées (113 + ombre dorée vers le haut) ---------- */
.lib-group { padding: 4px 14px 2px 16px; }
.lib-plate { display: flex; align-items: stretch; height: 38px; margin: 0 0 9px; border-radius: 9px; overflow: hidden; cursor: pointer; color: #eceff1;
  background: #08090a; box-shadow: inset 0 0 0 1px rgba(229, 160, 13, .25), 0 3px 8px rgba(0, 0, 0, .5); transition: transform .2s ease, box-shadow .2s ease; }
.lp-ic { width: 38px; flex: none; display: grid; place-items: center; color: #1b1d20; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #ffd55e, #e5a00d 55%, #b57c06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5); }
.lp-ic .icon { width: 19px; height: 19px; position: relative; z-index: 1; }
.lp-ic::after { content: ""; position: absolute; top: -50%; bottom: -50%; width: 13px; left: -22px; background: rgba(255, 255, 255, .7); transform: rotate(25deg); filter: blur(2px);
  animation: lp-shine 3.2s ease-in-out infinite; animation-delay: calc(var(--i, 0) * .2s); }
@keyframes lp-shine { 0%, 60% { left: -22px; } 100% { left: 56px; } }
.lp-bd { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: linear-gradient(180deg, #1c1e22, #2d3036 50%, #1c1e22); }
.lp-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-num { margin-left: auto; font-size: 15px; font-weight: 900; color: #ffd55e; letter-spacing: .2px; white-space: nowrap;
  text-shadow: 0 1px 0 #d39a0a, 0 2px 0 #b07f05, 0 3px 0 #8a6303, 0 4px 5px rgba(0, 0, 0, .8); }
.lib-plate:hover, .tv .lib-plate:focus { transform: translate(4px, 4px);
  box-shadow: inset 0 0 0 1px rgba(229, 160, 13, .6), -4px -4px 0 #e5a00d, -8px -8px 0 rgba(229, 160, 13, .35); outline: none; }
.lib-plate.active { box-shadow: inset 0 0 0 1px rgba(255, 213, 94, .95), 0 0 14px rgba(229, 160, 13, .35); }
.lib-plate.active .lp-bd { background: linear-gradient(180deg, #2d2410, #4a3a12 50%, #2d2410); }
.lib-plate.active:hover { box-shadow: inset 0 0 0 1px rgba(255, 213, 94, .95), -4px -4px 0 #e5a00d, -8px -8px 0 rgba(229, 160, 13, .35); }
.lib-plate[draggable="true"] { cursor: grab; }
.lib-plate.dragging { opacity: .45; cursor: grabbing; }
.collapsed .lib-group { padding: 4px 0; display: flex; flex-direction: column; align-items: center; }
.collapsed .lib-plate { width: 40px; }
.collapsed .lp-bd { display: none; }
.collapsed .lp-ic { width: 40px; }
@media (prefers-reduced-motion: reduce) { .lp-ic::after { animation: none; } }

/* ---------- Mes statistiques ---------- */
.st-filters { margin-left: auto; display: flex; gap: 8px; }
.st-filters select.input { width: auto; min-width: 150px; }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 22px; }
.st-tile { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-top: 3px solid var(--c, var(--accent)); border-radius: 8px; padding: 14px 16px; }
.st-tile-v { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1.1; }
.st-tile-l { color: var(--muted); font-size: 13px; margin-top: 4px; }
.st-tile-s { color: var(--dim); font-size: 12px; margin-top: 2px; }
.st-box { background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; margin-bottom: 18px; min-width: 0; }
.st-box h3 { font-size: 15px; margin: 0 0 12px; color: var(--text); }
.st-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.st-two > .st-box { margin-bottom: 18px; }
.st-chart .st-bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; }
.st-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; }
.st-stack { display: flex; flex-direction: column-reverse; border-radius: 4px 4px 0 0; overflow: hidden; min-height: 2px; background: rgba(255, 255, 255, .06); }
.st-stack > div { min-height: 1px; }
.st-x { text-align: center; font-size: 11px; color: var(--dim); margin-top: 6px; white-space: nowrap; height: 14px; }
.st-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.st-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.st-mini { display: flex; align-items: flex-end; gap: 3px; height: 110px; }
.st-mcol { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; }
.st-mbar { background: rgba(255, 255, 255, .18); border-radius: 3px 3px 0 0; }
.st-mcol.best .st-mbar { background: var(--accent); }
.st-rank { list-style: none; margin: 0; padding: 0; }
.st-rank li { display: flex; align-items: center; gap: 12px; padding: 6px 4px; border-radius: 6px; cursor: pointer; }
.st-rank li:hover { background: rgba(255, 255, 255, .05); }
.st-n { width: 20px; text-align: right; color: var(--dim); font-weight: 700; font-size: 13px; flex: none; }
.st-rank img, .st-noimg { width: 34px; height: 50px; object-fit: cover; border-radius: 4px; flex: none; background: rgba(255, 255, 255, .06); }
.st-rank img.round { height: 34px; border-radius: 50%; }
.st-rt { flex: 1; min-width: 0; }
.st-rn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.st-rd { color: var(--muted); font-size: 12px; }
.st-rb { height: 3px; background: rgba(255, 255, 255, .06); border-radius: 2px; margin-top: 5px; }
.st-rb > div { height: 100%; background: var(--accent); border-radius: 2px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card), 1fr)); gap: 18px 14px; }
.st-note { color: var(--dim); font-size: 12px; display: flex; gap: 6px; align-items: center; margin-top: 10px; }
@media (max-width: 900px) { .st-two { grid-template-columns: 1fr; } .st-filters { margin-left: 0; } }

/* ---------- bande-annonce ---------- */
.trailer-layer { z-index: 1600; }
.trailer-layer iframe { width: 100%; height: 100%; border: 0; background: #000; }
.trailer-layer .tr-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  background: linear-gradient(rgba(0, 0, 0, .7), transparent); pointer-events: none; transition: opacity .3s; }
.trailer-layer .tr-top button { pointer-events: auto; }
.trailer-layer .tr-t { font-weight: 600; font-size: 17px; }
.trailer-layer .tr-name { color: var(--muted); font-size: 13px; }

/* ---------- mise à jour de l'appli ---------- */
.upd-card { position: fixed; right: 18px; bottom: calc(18px + var(--player)); z-index: 1400; display: flex; gap: 14px; max-width: 380px;
  background: #26292d; border: 1px solid rgba(229, 160, 13, .45); border-radius: 10px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-size: 13px; color: var(--muted); }
.upd-card b { display: block; color: var(--text); font-size: 14px; margin-bottom: 4px; }
.upd-status:empty { display: none; }
.upd-status { margin-top: 6px; color: var(--accent); }
.upd-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
@media (max-width: 600px) { .upd-card { left: 12px; right: 12px; max-width: none; } }
/* ---------- version de l'appli à côté du logo ---------- */
.logo-ver { font-size: 11px; font-weight: 600; letter-spacing: 0; color: var(--dim); align-self: flex-end; margin: 0 0 4px -4px; }
.logo-ver:empty { display: none; }
@media (max-width: 600px) { .logo-ver { display: none; } }

/* ---------- qui est connecté ? ---------- */
.conn-panel .wp-body { gap: 4px; }
.cn-row { display: flex; gap: 12px; padding: 10px 8px; border-radius: 8px; opacity: .6; }
.cn-row.on { opacity: 1; background: rgba(255, 255, 255, .03); }
.cn-av { position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #111; }
.cn-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--dim); border: 2px solid #26292d; }
.cn-row.on .cn-dot { background: var(--ok); }
.cn-main { min-width: 0; flex: 1; display: grid; gap: 4px; }
.cn-who { display: flex; align-items: baseline; gap: 8px; }
.cn-when { color: var(--muted); font-size: 12px; }
.cn-doing { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cn-sep { color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 10px 8px 2px; }
/* ---------- demandes de films / séries ---------- */
.rq-hub .hub-head h2 .icon { color: var(--accent); }
.rq-row { display: grid; grid-auto-flow: column; grid-auto-columns: var(--card); gap: 14px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.rq-row > .spinner { margin: 20px; }
.rq-card { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rq-card.have { opacity: .7; }
.rq-poster { position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; background: rgba(255, 255, 255, .05); }
.rq-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rq-poster.sm { width: 54px; flex: none; }
.rq-noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--dim); }
.rq-kind { position: absolute; top: 6px; left: 6px; background: rgba(0, 0, 0, .7); font-size: 11px; padding: 2px 7px; border-radius: 4px; }
.rq-t { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.rq-y { color: var(--muted); font-size: 12px; font-weight: 400; }
.rq-card .btn { justify-content: center; margin-top: 2px; }
.rq-none { color: var(--muted); padding: 10px 0; }
.rq-free { margin-top: 8px; }
.rq-form { display: grid; gap: 4px; min-width: min(420px, 80vw); }
.rq-form textarea.input { height: 80px; }
.rq-what { margin: 0 0 8px; color: var(--muted); }
.rq-msg { color: var(--danger); min-height: 18px; font-size: 13px; }
.rq-intro { color: var(--muted); font-size: 13px; margin: -6px 0 18px; }
.rq-list { display: grid; gap: 10px; max-width: 900px; }
.rq-item { display: flex; gap: 14px; align-items: center; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.rq-item.closed, .rq-item.refused { opacity: .6; }
.rq-body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.rq-title { font-weight: 600; }
.rq-meta { color: var(--muted); font-size: 13px; }
.rq-note { color: var(--dim); font-size: 13px; font-style: italic; }
.rq-side { display: flex; align-items: center; gap: 10px; flex: none; }
.rq-status { font-size: 12px; padding: 4px 10px; border-radius: 20px; background: rgba(229, 160, 13, .15); color: var(--accent); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.rq-status.done { background: rgba(63, 185, 80, .15); color: var(--ok); }
.rq-status.refused, .rq-status.closed { background: rgba(255, 255, 255, .06); color: var(--muted); }
.rq-news .logo-mark { font-size: 16px; }
.rq-news-item { display: block; color: var(--text); text-decoration: none; margin-top: 2px; }
.rq-news-item:hover { color: var(--accent); }
@media (max-width: 600px) { .rq-item { flex-wrap: wrap; } .rq-side { width: 100%; justify-content: flex-end; } }
/* ---------- accueil : demandes en attente | validées, sur une ligne ---------- */
.rqh-line { display: flex; gap: 18px; align-items: stretch; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.rqh-part { display: flex; flex-direction: column; gap: 8px; flex: none; }
.rqh-sep { width: 1px; flex: none; background: var(--line); margin: 26px 2px 30px; }
.rqh-head { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.rqh-head .icon { color: var(--accent); }
.rqh-n { background: rgba(229, 160, 13, .18); color: var(--accent); border-radius: 10px; padding: 0 7px; font-size: 12px; font-weight: 700; }
.rqh-sub { color: var(--dim); font-size: 12px; }
.rqh-row { display: flex; gap: 12px; }
.rqh-tile { width: calc(var(--card) * .8); display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; }
.rqh-tile:hover .rq-poster { box-shadow: 0 0 0 3px var(--accent); }
.rqh-cell { display: flex; flex-direction: column; }
.rqh-by { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: calc(var(--card) * .8); }
.rqh-tile.mine + .rqh-by { color: var(--accent); }
.rqh-badge { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; display: inline-flex; align-items: center; gap: 3px; }
.rqh-badge .icon { width: 12px; height: 12px; }
.rqh-badge.wait { background: rgba(26, 20, 6, .85); color: #ffd55e; }
.rqh-badge.ok { background: rgba(10, 30, 14, .85); color: #6fdc85; }
.rqh-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px dashed rgba(255, 255, 255, .25); background: transparent; color: var(--muted); font-size: 12px; text-align: center; }
.rqh-add .icon { width: 26px; height: 26px; color: var(--accent); }
.rqh-empty { color: var(--dim); font-size: 13px; padding: 30px 10px; width: calc(var(--card) * 1.6); }
/* ---------- demandes : suggestions et infos ---------- */
.rq-sug { display: grid; gap: 4px; margin-top: 6px; max-height: 300px; overflow-y: auto; }
.rq-sug:empty { display: none; }
.rq-sug-item { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 6px; background: rgba(255, 255, 255, .04); border: 0; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.rq-sug-item:hover { background: rgba(229, 160, 13, .14); }
.rq-sug-item img, .rq-sug-item .rq-noimg { width: 30px; height: 45px; object-fit: cover; border-radius: 3px; flex: none; }
.rq-sug-t { flex: 1; min-width: 0; display: grid; }
.rq-sug-t b { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-sug-t small { color: var(--muted); font-size: 12px; }
.rq-sug-s { font-size: 12px; color: var(--accent); white-space: nowrap; }
.rq-what { display: flex; gap: 14px; align-items: flex-start; margin: 0 0 10px; color: var(--muted); }
.rq-what img { width: 80px; border-radius: 6px; flex: none; }
.rq-what b { color: var(--text); font-weight: 600; }
.rq-what p { margin: 6px 0 0; font-size: 13px; line-height: 1.45; max-height: 7.3em; overflow: hidden; }
.rq-sum { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* ---------- modifier une demande ---------- */
.rqe { display: grid; gap: 6px; width: min(760px, 86vw); }
.rqe-cols { display: flex; gap: 18px; align-items: flex-start; margin-top: 6px; }
.rqe-img { width: 170px; flex: none; display: grid; gap: 8px; }
.rqe-prev { width: 170px; }
.rqe-fields { flex: 1; min-width: 0; display: grid; gap: 2px; }
.rqe-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rqe textarea.input { height: 90px; }
.rqe textarea.rqe-note { height: 54px; }
.rqe-ok { display: flex; align-items: center; gap: 6px; color: var(--ok); font-size: 13px; padding: 6px 2px; }
@media (max-width: 640px) { .rqe-cols { flex-direction: column; } .rqe-img, .rqe-prev { width: 140px; } }
.rqe .rq-sug { max-height: 210px; }
.rq-what p, .rqe p { word-break: normal; white-space: normal; }

/* ---------- recherche vocale ---------- */
.search .voice-btn { position: absolute; right: 5px; top: 4px; width: 30px; height: 30px; color: var(--muted); }
.search .voice-btn .icon { position: static; width: 20px; height: 20px; color: inherit; }
.search:has(.voice-btn) input { padding-right: 40px; }
.search .voice-btn:hover { color: var(--accent); }
.voice-layer { position: fixed; inset: 0; z-index: 2000; background: rgba(10, 11, 13, .88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; cursor: pointer; animation: fade .15s; }
.voice-mic { width: 96px; height: 96px; border-radius: 50%; background: var(--accent); color: #151515; display: grid; place-items: center; animation: voicePulse 1.4s ease-out infinite; }
.voice-mic .icon { width: 44px; height: 44px; }
@keyframes voicePulse { 0% { box-shadow: 0 0 0 0 rgba(229, 160, 13, .6); } 100% { box-shadow: 0 0 0 34px rgba(229, 160, 13, 0); } }
.voice-t { font-size: 22px; font-weight: 600; }
.voice-heard { font-size: 26px; color: var(--accent); min-height: 34px; text-align: center; padding: 0 20px; }
.voice-hint { color: var(--dim); font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .voice-mic { animation: none; } }
/* ---------- aperçu au survol de la barre de lecture ---------- */
.vp-seek .vp-thumb { position: absolute; bottom: 24px; transform: translateX(-50%); display: none; pointer-events: none; border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 6px 24px rgba(0, 0, 0, .6); background-color: #000; background-repeat: no-repeat; }
.vp-seek.has-thumb .tip { bottom: 30px; z-index: 1; }
.vp-seek.scrubbing .tip { display: block; }
.vp-seek.scrubbing .knob { transform: translate(-50%, -50%) scale(1); }
