:root {
  --bg: #0f1115;
  --bg-2: #161a21;
  --bg-3: #1f242d;
  --line: #2a303b;
  --text: #eceef2;
  --muted: #9aa3b2;
  --accent: #f0a33a;
  --accent-ink: #1a1206;
  --danger: #ef5d5d;
  --ok: #4cc38a;
  --radius: 10px;
  --sidebar: 232px;
  --topbar: 60px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img { display: block; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
svg.i { width: 20px; height: 20px; flex: none; }

/* ---------------------------------------------------------------- Boutons & formulaires */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg-3); cursor: pointer; white-space: nowrap; font-weight: 500;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: #283040; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.btn.primary:hover { background: #ffb44f; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: rgba(239, 93, 93, .12); border-color: var(--danger); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 16px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: transparent; cursor: pointer; color: var(--text);
}
.icon-btn:hover { background: rgba(255, 255, 255, .08); }

label.field { display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
input[type=text], input[type=url], input[type=password], input[type=search], input:not([type]), select {
  height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); outline: none; width: 100%;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240, 163, 58, .2); }
.form-error { color: var(--danger); font-size: 14px; min-height: 20px; }
.form-grid { display: grid; gap: 14px; }
.form-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.form-row > * { flex: 1 1 180px; }
.form-row > .btn { flex: 0 0 auto; }

/* ---------------------------------------------------------------- Connexion */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(240, 163, 58, .18), transparent 60%),
              radial-gradient(900px 500px at 110% 110%, rgba(90, 120, 255, .12), transparent 60%), var(--bg);
}
.login-card {
  width: min(380px, 100%); background: rgba(22, 26, 33, .85); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 16px; padding: 32px 28px; display: grid; gap: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.login-card .brand { justify-content: center; font-size: 26px; margin-bottom: 8px; }
.login-card .brand svg { width: 38px; height: 38px; }

/* ---------------------------------------------------------------- Structure */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: .3px; }
.brand svg { width: 30px; height: 30px; }
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--topbar); z-index: 30;
  display: flex; align-items: center; gap: 16px; padding: 0 16px;
  background: rgba(15, 17, 21, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.topbar .brand { width: calc(var(--sidebar) - 70px); }
.menu-toggle { display: none; }
.search { flex: 1; max-width: 520px; position: relative; }
.search input { padding-left: 38px; background: var(--bg-2); border-radius: 20px; }
.search svg { position: absolute; left: 12px; top: 10px; color: var(--muted); }
.spacer { flex: 1; }
.user-menu { position: relative; }
.activity { display: flex; align-items: center; gap: 6px; cursor: default; }
.activity .act {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px;
  background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.activity .act b { color: var(--text); font-variant-numeric: tabular-nums; }
.activity .act.warn { color: var(--accent); border-color: rgba(240, 163, 58, .4); }
.activity .act.warn b { color: var(--accent); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #e0662c); color: var(--accent-ink);
}
.dropdown {
  position: absolute; right: 0; top: 46px; min-width: 220px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}
.dropdown .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 6px;
  background: none; border: 0; cursor: pointer; text-align: left;
}
.dropdown a:hover, .dropdown button:hover { background: var(--bg-3); }

.sidebar {
  position: fixed; top: var(--topbar); bottom: 0; left: 0; width: var(--sidebar); z-index: 20;
  background: var(--bg); border-right: 1px solid var(--line); overflow-y: auto; padding: 14px 10px;
}
.nav-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: #c9ced8;
  font-weight: 500;
}
.nav a:hover { background: var(--bg-2); color: var(--text); }
.nav a.active { background: var(--bg-3); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav a .count { margin-left: auto; font-size: 12px; color: var(--muted); }
.nav .empty { padding: 8px 12px; color: var(--muted); font-size: 13.5px; }

main#view { margin-left: var(--sidebar); padding: calc(var(--topbar) + 24px) 32px 48px; min-height: 100vh; }
.page-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 26px; }
.page-head .meta { color: var(--muted); }
.toolbar { display: flex; gap: 10px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.toolbar input { width: 220px; }
.toolbar select { width: auto; }
/* Tri et filtres d'une bibliothèque */
.sortbox { display: flex; }
.sortbox select { border-radius: 8px 0 0 8px; }
.sortbox .dir-btn { height: 40px; width: 40px; padding: 0; justify-content: center; border-radius: 0 8px 8px 0; border-left: 0; }
.btn.on { border-color: var(--accent); color: var(--accent); }
.count-pill:not(:empty) { margin-left: 2px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px 24px; padding: 16px 18px; margin: -8px 0 22px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.facet-name { font-size: 12px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 8px; align-items: baseline; }
.facet-name .link { text-transform: none; letter-spacing: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 15px; border: 1px solid var(--line); background: var(--bg-3); cursor: pointer; font-size: 13.5px; white-space: nowrap; }
.chip:hover { border-color: #3a4352; background: #283040; }
.chip span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chip.on { background: rgba(240, 163, 58, .16); border-color: var(--accent); color: var(--text); }
.chip.on span { color: var(--accent); }
.chip.zero:not(.on) { opacity: .45; }
.chip.more { background: transparent; color: var(--muted); border-style: dashed; }
.chip svg { margin-right: -3px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -8px 0 20px; }
button.link { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; font-size: 13.5px; }
button.link:hover { text-decoration: underline; }
@media (max-width: 860px) { .toolbar { margin-left: 0; width: 100%; } .toolbar input { flex: 1 1 100%; width: auto; } .filters { grid-template-columns: 1fr; } }
.loading, .empty-state { color: var(--muted); padding: 60px 0; text-align: center; }
.empty-state h2 { color: var(--text); margin: 0 0 8px; }
.empty-state .btn { margin-top: 16px; }
.spinner {
  width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- Rangées & grilles */
.row { margin-bottom: 34px; }
.row-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.row-head h2 { margin: 0; font-size: 19px; }
.row-head a { color: var(--muted); font-size: 14px; }
.row-head a:hover { color: var(--accent); }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 160px; gap: 18px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.shelf.wide { grid-auto-columns: 280px; }
.shelf > * { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 18px; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.card { display: block; min-width: 0; }
.card .poster {
  position: relative; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--bg-3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35); transition: transform .15s, box-shadow .15s;
}
.card.landscape .poster { aspect-ratio: 16 / 9; }
.card.square .poster { aspect-ratio: 1; }
.card:hover .poster, .card:focus-visible .poster { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--accent), 0 10px 24px rgba(0, 0, 0, .5); }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center;
  background: linear-gradient(160deg, hsl(var(--h) 45% 32%), hsl(calc(var(--h) + 40) 45% 14%));
  font-weight: 700; font-size: 15px; line-height: 1.25; color: rgba(255, 255, 255, .9); text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
  overflow: hidden;
}
.card .play-hover {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; background: rgba(0, 0, 0, .35); transition: opacity .15s;
}
.card .play-hover span { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.card:hover .play-hover, .episode .thumb:hover .play-hover { opacity: 1; }
.episode .play-hover { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; background: rgba(0, 0, 0, .35); transition: opacity .15s; }
.episode .play-hover span { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.badge {
  position: absolute; top: 6px; right: 6px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink); font-size: 12.5px; font-weight: 700; display: grid; place-items: center;
}
.badge.ok { background: var(--ok); color: #06210f; padding: 0; }
.bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0, 0, 0, .6); }
.bar i { display: block; height: 100%; background: var(--accent); }
.dur { position: absolute; left: 6px; bottom: 9px; padding: 2px 6px; border-radius: 4px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 12px; font-weight: 600; }
.vbadge ~ .dur { bottom: 35px; }
/* Actions rapides : bouton « ⋯ » de l'affiche et son menu */
.qa-btn {
  position: absolute; right: 6px; bottom: 8px; z-index: 3; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff; background: rgba(0, 0, 0, .72);
  opacity: 0; transition: opacity .12s, background .12s; backdrop-filter: blur(4px);
}
.card:hover .qa-btn, .card:focus-within .qa-btn, .qa-btn.open { opacity: 1; }
.qa-btn:hover, .qa-btn.open { background: var(--accent); color: var(--accent-ink); }
.qa-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (hover: none) { .qa-btn { opacity: .9; } }
html.tv .qa-btn { display: none; }
.wl-item .qa-btn { bottom: 40px; }
.qa-menu {
  position: fixed; z-index: 72; min-width: 210px; max-width: calc(100vw - 16px); padding: 5px; border-radius: 10px;
  background: var(--bg-2, #171a21); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0, 0, 0, .6);
}
.qa-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 7px;
  background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.qa-menu button:hover, .qa-menu button:focus-visible { background: var(--bg-3); outline: none; }
.qa-loading { padding: 9px 10px; color: var(--muted); font-size: 14px; }
.qa-menu.has-scope { width: 274px; }
.qa-scope { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px; max-height: 136px; overflow-y: auto; }
.qa-menu .qa-scope button {
  position: relative; flex: none; justify-content: center; width: 38px; height: 57px; padding: 0; overflow: hidden;
  border-radius: 5px; background: var(--bg-3); outline: 2px solid transparent; outline-offset: -2px; opacity: .72;
}
.qa-menu .qa-scope .qa-all { width: 44px; font-size: 12.5px; font-weight: 700; }
.qa-menu .qa-scope button:hover, .qa-menu .qa-scope button:focus-visible { opacity: 1; outline-color: var(--muted); }
.qa-menu .qa-scope button.on { opacity: 1; outline-color: var(--accent); }
.qa-menu .qa-scope .qa-all.on { background: var(--accent); color: var(--accent-ink); }
.qa-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.qa-thumb b { font-size: 13px; color: var(--muted); }
.qa-thumb i { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #2fa66a; color: #fff; }
.qa-scope-name { padding: 3px 8px 7px; border-bottom: 1px solid var(--line); margin-bottom: 4px; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-count { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.dup-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.dup-tools input { flex: 0 1 280px; min-width: 0; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-3); color: var(--text); font: inherit; }
.dup-tools select { height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-3); color: var(--text); font: inherit; }
.lg-tools select { width: auto; flex: 0 1 220px; }
.lg-tabs { margin: 4px 0 14px; }
.lg-table td { padding: 8px 10px; font-size: 14px; }
.lg-table .lg-when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dup-item { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.dup-item summary { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; cursor: pointer; list-style: none; }
.dup-item summary::-webkit-details-marker { display: none; }
.dup-item summary:hover { background: var(--bg-3); }
.dup-poster { position: relative; flex: none; width: 36px; height: 54px; border-radius: 4px; overflow: hidden; background: var(--bg-3); }
.dup-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dup-main { flex: 1; min-width: 0; }
.dup-sub { display: block; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dup-size { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.dup-body { padding: 10px 14px 14px; border-top: 1px solid var(--line); }
.dup-body h3 { margin: 14px 0 4px; font-size: 14px; }
.dup-body ul { list-style: none; margin: 8px 0 0; padding: 0; }
.dup-body li { padding: 7px 0; border-top: 1px solid var(--line); }
.dup-body li:first-child { border-top: 0; }
.dup-file { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 14px; }
.dup-file strong { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.dup-tags { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 13px; }
.dup-body .path { color: var(--muted); font-size: 12.5px; word-break: break-all; }
.card-title { margin-top: 8px; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- Fiche (film / série) */
.hero { position: relative; margin: calc(-24px) -32px 28px; padding: 40px 32px 32px; min-height: 380px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 20%; filter: blur(2px) brightness(.45); transform: scale(1.05); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(15, 17, 21, .75) 45%, rgba(15, 17, 21, .35) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 40%); }
.hero-inner { position: relative; z-index: 1; display: flex; gap: 32px; align-items: flex-end; }
.hero .poster-lg { width: 220px; flex: none; aspect-ratio: 2 / 3; position: relative; border-radius: 10px; overflow: hidden; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); background: var(--bg-3); }
.hero .poster-lg img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero h1 { font-size: 36px; margin: 0 0 6px; line-height: 1.1; }
.hero .facts { color: #c9ced8; display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.hero .facts span + span::before { content: "•"; margin-right: 14px; color: var(--muted); }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .file { margin-top: 18px; color: var(--muted); font-size: 13px; word-break: break-all; }
.crumb { color: var(--muted); font-size: 14px; margin-bottom: 10px; display: inline-block; }
.crumb:hover { color: var(--accent); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tabs button {
  background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--muted); font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
/* Saisons d'une série, façon étagère d'affiches */
.row-title { font-size: 19px; margin: 0 0 12px; scroll-margin-top: calc(var(--topbar) + 16px); }
.seasons { margin-bottom: 26px; padding-top: 4px; }
.facts .only-season { color: var(--accent); font-weight: 700; }
.season-item { position: relative; min-width: 0; }
.season-card { display: block; width: 100%; background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.season-seen {
  position: absolute; top: 6px; left: 6px; z-index: 3; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff; background: rgba(0, 0, 0, .72);
  opacity: 0; transition: opacity .12s, background .12s; backdrop-filter: blur(4px);
}
.season-item:hover .season-seen, .season-item:focus-within .season-seen { opacity: 1; }
.season-seen:hover { background: var(--accent); color: var(--accent-ink); }
.season-seen.on { background: var(--ok); color: #06210f; }
.season-seen:focus-visible { opacity: 1; outline: 2px solid var(--accent); outline-offset: 1px; }
@media (hover: none) { .season-seen { opacity: .9; } }
.season-card.active .poster { box-shadow: 0 0 0 2px var(--accent); }
.season-card.active .card-title { color: var(--accent); }
.episodes { display: grid; gap: 10px; }
.episode {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 18px; align-items: center; padding: 10px;
  border-radius: var(--radius); background: var(--bg-2); border: 1px solid transparent;
}
.episode:hover { border-color: var(--line); background: #1a1f27; }
.episode .thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--bg-3); }
.episode .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.episode .num { color: var(--accent); font-weight: 700; font-size: 13px; }
.episode .t { font-weight: 600; margin: 2px 0; }
.episode .f { color: var(--muted); font-size: 12.5px; word-break: break-all; }
.episode .ep-actions { display: flex; gap: 4px; }
.episode.watched .t { color: var(--muted); }

/* ---------------------------------------------------------------- Photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.photo-grid button {
  position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 4px; overflow: hidden;
  background: var(--bg-3); cursor: zoom-in;
}
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.photo-grid button:hover img { transform: scale(1.05); }
.photo-grid .vid { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .65); border-radius: 4px; padding: 2px 6px; font-size: 12px; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .94); display: grid; place-items: center; }
.lightbox img, .lightbox video { max-width: 94vw; max-height: 88vh; object-fit: contain; }
.lightbox .lb-close { position: absolute; top: 14px; right: 14px; }
.lightbox .lb-download { position: absolute; top: 14px; right: 62px; }
.lightbox .lb-prev, .lightbox .lb-next { position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; background: rgba(255, 255, 255, .08); }
.lightbox .lb-prev { left: 14px; }
.lightbox .lb-next { right: 14px; }
.lightbox .lb-caption { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 13.5px; }

/* ---------------------------------------------------------------- Téléchargement */
.dl-file { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; overflow-wrap: anywhere; }
.dl-warn { padding: 10px 12px; border-radius: 10px; background: rgba(239, 93, 93, .12); border: 1px solid rgba(239, 93, 93, .35); color: var(--text); font-size: 14px; line-height: 1.45; }
.dl-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-label { margin-bottom: 8px; font-size: 13.5px; }
.dl-note { margin: 0; font-size: 13.5px; }
label.radio.dl-new { margin-top: 10px; }

/* ---------------------------------------------------------------- Lecteur */
body.playing .topbar, body.playing .sidebar { display: none; }
body.playing main#view { margin: 0; padding: 0; }
.player { position: fixed; inset: 0; background: #000; z-index: 50; }
.player video { width: 100%; height: 100%; background: #000; }
.player-top {
  position: absolute; inset: 0 0 auto 0; display: flex; align-items: center; gap: 12px; padding: 16px 20px 40px;
  background: linear-gradient(rgba(0, 0, 0, .75), transparent); transition: opacity .3s; pointer-events: none;
}
.player-top > * { pointer-events: auto; }
.player.idle .player-top { opacity: 0; }
.player-top .pt-title { font-weight: 700; font-size: 18px; }
.player-top .pt-sub { color: #c9ced8; font-size: 14px; }
.player-msg, .next-overlay {
  position: absolute; right: 24px; bottom: 90px; background: rgba(22, 26, 33, .95); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px; max-width: 420px; display: grid; gap: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
}
.player-msg.center { left: 50%; right: auto; top: 50%; bottom: auto; transform: translate(-50%, -50%); text-align: center; }
/* Lecture anticipée (bon 30) : choix et attente entre deux chapitres. */
.avance-msg { width: min(440px, calc(100% - 32px)); display: grid; gap: 10px; z-index: 6; }
.player .player-msg.center.avance-msg { bottom: auto; max-height: calc(100% - 140px); overflow-y: auto; }
.avance-msg .av-opts { display: grid; gap: 6px; margin-top: 4px; }
.avance-msg .av-opts .btn, .avance-msg > .btn { justify-self: center; }
.avance-msg .av-note { font-size: .88em; margin-bottom: 6px; }
.av-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.vlc-url { width: 100%; }
.av-bar span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.next-overlay .row2 { display: flex; gap: 8px; }
/* Génériques : bouton visible même quand le bandeau est masqué. */
.skip-btn, .skip-note {
  position: absolute; right: 24px; bottom: 90px; z-index: 3; display: inline-flex; align-items: center; gap: 10px;
  background: rgba(240, 242, 246, .94); color: #14171c; border: 0; border-radius: 8px; padding: 11px 18px; font: inherit; font-weight: 700;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .55); animation: skip-in .2s ease-out;
}
.skip-btn { cursor: pointer; }
.skip-btn:hover, .skip-btn:focus-visible { background: #fff; outline: 3px solid var(--accent); outline-offset: 2px; }
.skip-note { background: rgba(22, 26, 33, .95); color: var(--text); border: 1px solid var(--line); font-weight: 600; padding: 8px 10px 8px 16px; }
.skip-btn.hidden, .skip-note.hidden { display: none; }
/* Diffusion sur la télé : télécommande à la place de la vidéo */
.icon-btn.on { color: var(--accent); }
.player.casting #chap-bar, .player.casting .skip-btn, .player.casting .skip-note, .player.casting .pv-tip, .player.casting #fs-btn { display: none; }
.player.casting .player-top { opacity: 1; z-index: 3; }
.cast-screen { position: absolute; inset: 0; z-index: 2; display: grid; place-items: safe center; padding: 96px 16px 16px; overflow-y: auto; background: var(--bg) center / cover no-repeat; }
.cast-screen.hidden { display: none; }
.cast-box { width: min(560px, 100%); display: flex; flex-direction: column; gap: 10px; text-align: center; }
.cast-device { color: var(--accent); font-weight: 600; }
.cast-title { font-size: 26px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.cast-state { min-height: 20px; }
.cast-bar { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; font-size: 14px; }
.cast-bar input, .cast-vol input { flex: 1; min-width: 0; padding: 0; accent-color: var(--accent); border: 0; background: none; box-shadow: none; }
.cast-btns { display: flex; justify-content: center; align-items: center; gap: 18px; }
.cast-btns .icon-btn { width: 48px; height: 48px; }
.cast-btns .cast-main { width: 60px; height: 60px; background: var(--accent); color: var(--accent-ink); border-radius: 50%; }
.cast-btns .cast-main:hover { background: var(--accent); filter: brightness(1.08); }
.cast-vol { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); max-width: 300px; width: 100%; margin: 0 auto 6px; }
.air-note { position: absolute; left: 16px; bottom: 76px; z-index: 2; padding: 6px 12px; border-radius: 8px; background: rgba(22, 26, 33, .95); border: 1px solid var(--line); font-size: 14px; font-weight: 600; pointer-events: none; }
.air-note.hidden { display: none; }
.player-msg:not(.hidden) ~ .skip-btn, .player-msg:not(.hidden) ~ .skip-note { bottom: 200px; }
.player.has-chapters .skip-btn, .player.has-chapters .skip-note { bottom: 110px; }
.player.has-chapters .player-msg:not(.hidden) ~ .skip-btn, .player.has-chapters .player-msg:not(.hidden) ~ .skip-note { bottom: 220px; }
html.tv .skip-btn, html.tv .skip-note { bottom: 120px; right: 40px; font-size: 20px; padding: 14px 24px; }
html.tv .player-msg:not(.hidden) ~ .skip-btn, html.tv .player-msg:not(.hidden) ~ .skip-note { bottom: 230px; }
@keyframes skip-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .skip-btn, .skip-note { animation: none; } }
#mk-panel .row2 { display: flex; flex-wrap: wrap; gap: 8px; }

/* Chapitres : barre découpée juste au-dessus des commandes natives du lecteur. */
.chap-bar { position: absolute; left: 16px; right: 16px; bottom: 64px; display: flex; gap: 2px; height: 6px; transition: opacity .3s, height .15s; z-index: 1; }
.chap-bar:hover { height: 10px; }
.chap-bar::before { content: ''; position: absolute; inset: -8px 0; } /* zone de survol plus large que le trait */
.chap-bar { touch-action: none; }
.player.idle .chap-bar { opacity: 0; pointer-events: none; }
.chap-seg { position: relative; min-width: 0; height: 100%; padding: 0; border: 0; border-radius: 3px; background: rgba(255, 255, 255, .3); cursor: pointer; overflow: hidden; }
.chap-seg:hover { background: rgba(255, 255, 255, .45); }
.chap-seg:disabled, .chap-bar.locked .chap-seg { cursor: default; }
.chap-lead { min-width: 0; }
.chap-fill, .chap-buf { position: absolute; inset: 0 auto 0 0; width: 0; }
.chap-fill { background: var(--accent); }
.chap-buf { background: rgba(255, 255, 255, .3); }
/* Bulle de survol : vignette (planche en image de fond) et heure. */
.pv-tip {
  position: absolute; bottom: 84px; left: 0; transform: translateX(-50%); display: grid; gap: 4px; max-width: min(260px, calc(100vw - 8px));
  background: rgba(22, 26, 33, .95); border: 1px solid var(--line); border-radius: 8px; padding: 4px; pointer-events: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .6); z-index: 2;
}
.pv-thumb { width: 240px; max-width: 100%; aspect-ratio: 16 / 9; border-radius: 5px; background-color: #000; background-repeat: no-repeat; }
.pv-label { padding: 1px 6px 2px; font-size: 12px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.player.idle .pv-tip { opacity: 0; }
html.tv .pv-tip { bottom: 96px; }
.pv-state { font-weight: 600; margin: 12px 0 2px; }
#pv-panel .row2 { display: flex; flex-wrap: wrap; gap: 8px; }
.player.has-chapters .player-msg, .player.has-chapters .next-overlay { bottom: 110px; }
@media (max-width: 600px) {
  .player-top .pt-tools { flex-wrap: wrap; justify-content: flex-end; }
  .player-top #chap-select { max-width: 160px; }
  .player-top #quality-select { max-width: 130px; }
  .chap-bar { height: 10px; }
  .pv-thumb { width: 160px; }
}

/* ---------------------------------------------------------------- Administration */
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 26px; }
.panel h2 { margin: 0 0 4px; font-size: 19px; }
.panel > p.muted { margin: 0 0 18px; }
.panel h3.prefs-shows { margin: 24px 0 6px; font-size: 15px; }
.table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table td.actions { text-align: right; white-space: nowrap; }
.table td.actions .btn + .btn { margin-left: 6px; }
.table .path { color: var(--muted); font-size: 13px; word-break: break-all; }
.watch-state { font-size: 12px; margin-top: 3px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 600; background: var(--bg-3); }
.pill.accent { background: rgba(240, 163, 58, .15); color: var(--accent); }
.pill.warn { background: rgba(239, 93, 93, .15); color: var(--danger); }
.subhead { font-size: 15px; margin: 6px 0 12px; }

.type-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.type-picker label {
  display: grid; justify-items: center; gap: 6px; padding: 14px 8px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); cursor: pointer; font-weight: 600; color: #c9ced8; transition: border-color .15s, background .15s;
}
.type-picker label svg { width: 26px; height: 26px; }
.type-picker input { position: absolute; opacity: 0; pointer-events: none; }
.type-picker label:has(input:checked) { border-color: var(--accent); background: rgba(240, 163, 58, .1); color: var(--text); }
.type-picker label:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(240, 163, 58, .3); }
.path-input { display: flex; gap: 8px; }

/* ---------------------------------------------------------------- Fenêtres modales & notifications */
.modal-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 16px; }
.modal { width: min(560px, 100%); max-height: 90vh; display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 18px 20px 20px; overflow: auto; display: grid; gap: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.dir-list { border: 1px solid var(--line); border-radius: 8px; height: 320px; overflow: auto; background: var(--bg); }
.dir-list button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; background: none; border: 0;
  border-bottom: 1px solid var(--bg-3); cursor: pointer; text-align: left;
}
.dir-list button:hover { background: var(--bg-3); }
.dir-list svg { color: var(--accent); }
.dir-list .msg { padding: 16px; color: var(--muted); }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; justify-items: center; }
.toast { background: var(--bg-3); border: 1px solid var(--line); padding: 10px 16px; border-radius: 8px; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); animation: pop .2s ease-out; }
.toast.error { border-color: var(--danger); }
.toast.ok { border-color: var(--ok); }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }

/* ---------------------------------------------------------------- Mobile */
@media (max-width: 860px) {
  .menu-toggle { display: inline-grid; }
  .topbar { gap: 8px; padding: 0 10px; }
  .topbar .brand { width: auto; }
  .topbar .brand span { display: none; }
  .activity .act { padding: 4px 8px; }
  .activity .act-label { display: none; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 10px 0 40px rgba(0, 0, 0, .5); }
  body.nav-open .sidebar { transform: none; }
  main#view { margin-left: 0; padding: calc(var(--topbar) + 18px) 16px 40px; }
  .hero { margin: -18px -16px 22px; padding: 24px 16px; }
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero .poster-lg { width: 140px; }
  .hero h1 { font-size: 26px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 16px 12px; }
  .shelf { grid-auto-columns: 120px; }
  .shelf.wide { grid-auto-columns: 220px; }
  .episode { grid-template-columns: 120px 1fr; }
  .episode .ep-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .type-picker { grid-template-columns: repeat(2, 1fr); }
  .toolbar { margin-left: 0; width: 100%; }
  .toolbar input { flex: 1; width: auto; }
  .table thead { display: none; }
  .table tr { display: grid; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 4px 0; }
  .table td.actions { text-align: left; }
  .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 3px; }
}

/* ---------------------------------------------------------------- Lecteur : outils (piste audio, transcodage) */
.player-top .pt-text { min-width: 0; }
.player-top .pt-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.player-top select { width: auto; max-width: 280px; height: 34px; background: rgba(15, 17, 21, .8); }
.player-top .pt-check { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 8px; background: rgba(15, 17, 21, .8); font-size: 13px; cursor: pointer; white-space: nowrap; }
.player-top .pt-check input { width: auto; margin: 0; accent-color: var(--accent); }
.player-top #tc-badge { white-space: nowrap; cursor: help; }
.player-top select:disabled { opacity: .45; cursor: not-allowed; }
.player-top button.pt-check { border: 0; color: inherit; font: inherit; font-size: 13px; }
.player-top button.pt-check.on { background: var(--accent); color: #111; font-weight: 600; }

/* ---------------------------------------------------------------- Lecteur : métriques (super admin) */
.metrics { position: absolute; top: 76px; right: 16px; bottom: 76px; width: min(430px, calc(100vw - 32px)); z-index: 4; overflow-y: auto; padding: 12px 14px; border-radius: 10px; background: rgba(15, 17, 21, .9); border: 1px solid rgba(255, 255, 255, .12); color: #e6e8ee; font-size: 12px; line-height: 1.45; }
.metrics header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.metrics header span { display: inline-flex; gap: 4px; }
.metrics h4 { margin: 12px 0 4px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: #9aa1af; }
.metrics .mx-manual { width: 100%; height: 120px; margin-top: 8px; font: 11px/1.35 monospace; }
.metrics .mx-grid { display: grid; grid-template-columns: minmax(130px, auto) 1fr; gap: 1px 12px; }
.metrics .mx-k { color: #aeb4c0; }
.metrics .mx-v { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metrics .good { color: #6fd08c; }
.metrics .warn { color: #f2b84b; }
.metrics .bad { color: #ff7b72; }
.metrics table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.metrics th, .metrics td { padding: 1px 4px; text-align: right; }
.metrics th { color: #9aa1af; font-weight: 500; }
.metrics .mx-ev { display: grid; grid-template-columns: 58px 54px 1fr; gap: 6px; color: #c9ced8; }
.metrics .mx-ev.gel, .metrics .mx-ev.erreur { color: #ff7b72; }
.metrics .mx-ev.alerte, .metrics .mx-ev.recalage { color: #f2b84b; }

/* ---------------------------------------------------------------- Fiches enrichies (TMDB) */
.hero-text { max-width: 760px; min-width: 0; }
.hero .original { color: var(--muted); margin: -2px 0 10px; font-style: italic; }
.hero .rating { color: var(--accent); font-weight: 700; }
.title-logo { display: block; max-width: min(420px, 100%); max-height: 130px; object-fit: contain; object-position: left; }
.extras:empty { display: none; }
.extras { display: grid; gap: 8px; margin-top: 16px; font-size: 14px; }
.extras .scores { display: flex; flex-wrap: wrap; gap: 8px 16px; font-weight: 600; }
.extras a:hover { color: var(--accent); }
.providers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.provider img { display: block; width: 30px; height: 30px; border-radius: 7px; }
.relations { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.os-results { display: grid; gap: 8px; max-height: 45vh; overflow-y: auto; }
.os-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--bg-3); overflow-wrap: anywhere; }
.os-row .btn { flex: none; }
.service + .service { margin-top: 12px; }
.trakt-code { font-size: 28px; font-weight: 700; letter-spacing: .12em; color: var(--accent); }
.tagline { font-style: italic; color: #c9ced8; margin: 18px 0 6px; }
.overview { margin: 14px 0 0; color: #dde1e8; line-height: 1.6; }
.tagline + .overview { margin-top: 4px; }
.overview.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.credits { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; font-size: 14px; }
.credits .muted { margin-right: 6px; }
.shelf.cast { grid-auto-columns: 120px; }
.person { text-align: center; min-width: 0; }
.person .face { position: relative; width: 100px; height: 100px; margin: 0 auto 8px; border-radius: 50%; overflow: hidden; background: var(--bg-3); display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: 22px; }
.person .face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.person .pn { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .pr { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.episode .o { color: #c3c8d2; font-size: 13.5px; margin: 4px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.episode .ep-text { min-width: 0; }
.match-list { display: grid; gap: 6px; max-height: 420px; overflow: auto; }
.match-list .msg { padding: 16px; color: var(--muted); }
.match-list button {
  display: grid; grid-template-columns: 54px 1fr; gap: 12px; text-align: left; padding: 8px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); cursor: pointer;
}
.match-list button:hover, .match-list button.current { border-color: var(--accent); }
.match-list .mp { position: relative; width: 54px; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: var(--bg-3); }
.match-list .mp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.match-list .mo { color: var(--muted); font-size: 12.5px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 860px) { .person .face { width: 80px; height: 80px; } .shelf.cast { grid-auto-columns: 96px; } }

/* ---------------------------------------------------------------- Droits d'accès aux bibliothèques */
.access-picker { display: grid; gap: 8px; }
.access-picker .radio { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14.5px; }
.access-picker input[type=radio], .lib-checks input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.lib-checks { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 24px; }
.lib-checks label {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--bg); cursor: pointer; font-size: 14px;
}
.lib-checks label:has(input:checked) { border-color: var(--accent); background: rgba(240, 163, 58, .1); }
.lib-checks label:has(input:disabled) { opacity: .45; cursor: default; }
.access-cell { font-size: 14px; }

/* ---------------------------------------------------------------- Listes de lecture */
.pl-pick { display: grid; gap: 6px; max-height: 300px; overflow: auto; }
.pl-pick button {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); cursor: pointer; text-align: left;
}
.pl-pick button:hover { border-color: var(--accent); }
.pl-pick svg { color: var(--accent); }
.list-kinds { display: grid; gap: 6px; }
.group-filter { margin-bottom: 16px; }
.group-verdict { display: flex; align-items: center; gap: 5px; margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.group-verdict.ok { color: var(--ok); }
.group-item.passed .thumb, .group-item.passed .ep-text { opacity: .55; }
.group-item .ep-actions { align-items: center; flex-wrap: wrap; justify-content: flex-end; }
label.radio { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14.5px; }
label.radio input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.icon-btn:disabled { opacity: .3; cursor: default; }

/* ---------------------------------------------------------------- Cinéma */
.cinema-list { display: grid; gap: 12px; }
.cinema-room {
  display: grid; grid-template-columns: 90px 1fr auto; gap: 16px; align-items: center; padding: 12px;
  border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line);
}
.cinema-room:hover { border-color: var(--accent); }
.cinema-room .poster { position: relative; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: var(--bg-3); }
.cinema-room .poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cinema-members { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.cinema-members li { display: flex; align-items: center; gap: 10px; }
.cinema-members li > span:last-child:not(:first-of-type) { margin-left: auto; }
.cinema-members li.off { opacity: .5; }
.cinema-members svg { color: var(--accent); }
.cinema-overlay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, 92vw);
  background: rgba(22, 26, 33, .96); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6); z-index: 5;
}
.cinema-overlay h3 { margin: 0 0 6px; }
.row-head h2 svg { vertical-align: -3px; color: var(--accent); }
#cinema-invites { position: fixed; right: 16px; bottom: 16px; z-index: 65; display: grid; gap: 10px; width: min(320px, calc(100vw - 32px)); }
body.playing #cinema-invites { display: none; }
.cinema-invite { display: grid; gap: 6px; padding: 14px 16px; background: var(--bg-2); border: 1px solid var(--accent); border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); animation: pop .2s ease-out; }
.cinema-invite .row2 { display: flex; gap: 8px; margin-top: 4px; }
.invite-list { display: grid; gap: 2px; max-height: 260px; overflow: auto; }
.invite-list label { display: flex; align-items: center; gap: 10px; padding: 7px 4px; cursor: pointer; }
.invite-list label .muted { margin-left: auto; }
.invite-link { display: flex; gap: 8px; margin-top: 6px; }
.invite-link input { flex: 1; min-width: 0; }
@media (max-width: 860px) { .cinema-room { grid-template-columns: 64px 1fr; } .cinema-room > .btn { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- Révision par Plume */
.rv { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .55); vertical-align: -1px; flex: none; }
.poster .rv { position: absolute; top: 7px; left: 7px; z-index: 2; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
.rv-ok { background: var(--ok); }
.rv-doute { background: #f59e0b; }
.rv-none { background: #7b8494; }
.rv-file { background: #5b8def; opacity: .6; }
.rv-encours { background: #5b8def; animation: rvpulse 1s ease-in-out infinite; }
@keyframes rvpulse { 50% { opacity: .35; } }
.rv-bar { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; margin: -8px 0 18px; padding: 10px 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; }
.rv-counts { display: flex; gap: 18px; flex-wrap: wrap; }
.rv-counts > span, .rv-counts > button { display: inline-flex; align-items: center; gap: 6px; }
.rv-counts > button { font: inherit; color: inherit; background: none; border: 1px solid transparent; border-radius: 999px; padding: 2px 10px; margin: -3px -4px; cursor: pointer; }
.rv-counts > button:hover { border-color: var(--line); }
.rv-counts > button.on { border-color: #f59e0b; background: rgba(245, 158, 11, .12); }
.rv-progress { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; margin: 0; display: inline-block; }
.warn-text { color: #f59e0b; }
.plume-box { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: rgba(22, 26, 33, .7); border: 1px solid var(--line); display: grid; gap: 6px; font-size: 14px; }
.plume-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Suivi d'une série et ordre de visionnage */
.suivi-missing { margin: 2px 0 0; padding-left: 18px; color: var(--muted); }
.suivi-missing strong { color: var(--text, inherit); font-weight: 600; }
.modal.modal-wide { width: min(760px, 100%); }
.pc-head { display: grid; gap: 6px; margin-bottom: 14px; }
.pc-head p { margin: 0; line-height: 1.5; }
.pc-verdict { font-size: 16px; font-weight: 700; }
.pc-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pc-tabs .chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pc-list { display: grid; gap: 6px; }
.pc-row { display: grid; grid-template-columns: 24px 42px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 6px 10px 6px 6px; border: 1px solid transparent; border-radius: 8px; background: var(--bg-3); color: inherit; font: inherit; text-align: left; text-decoration: none; }
a.pc-row:hover, button.pc-row:hover { border-color: var(--accent); cursor: pointer; }
.pc-row.here { border-color: var(--accent); }
.pc-row.seen .pc-poster, .pc-row.seen .pc-title { opacity: .6; }
.pc-n { color: var(--muted); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.pc-poster { position: relative; display: block; width: 42px; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 4px; background: var(--bg-2); font-size: 9px; }
.pc-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pc-text { display: grid; gap: 1px; min-width: 0; }
.pc-title { font-weight: 600; overflow-wrap: anywhere; }
.pc-sub, .pc-why { color: var(--muted); font-size: 12.5px; }
.pc-sub b { font-weight: 600; color: var(--text, inherit); }
.pc-sub b.pc-must { color: var(--accent); }
.pc-state { font-size: 12px; white-space: nowrap; color: var(--muted); }
.pc-state.seen { color: var(--ok); }
.pc-state.have, .pc-state.going { color: var(--accent); }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; }
.pc-wait { display: grid; gap: 12px; justify-items: start; padding: 10px 0; }
@media (max-width: 560px) { .pc-row { grid-template-columns: 20px 36px minmax(0, 1fr); } .pc-poster { width: 36px; } .pc-state { grid-column: 3; } }

/* Correction d'identification : propositions de Plume, lien externe */
.plume-props { display: grid; gap: 6px; }
.plume-props .match-list { max-height: 300px; }
.match-list .pill { font-size: 11px; padding: 1px 7px; vertical-align: 1px; }
.m-none { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.m-none summary { cursor: pointer; font-weight: 600; }
.m-none p { margin: 8px 0; font-size: 13.5px; }
.m-link { display: grid; gap: 8px; }
.plume-box .row2, .m-link .row2 { display: flex; gap: 8px; flex-wrap: wrap; }
.ext-link { margin-top: 10px; width: fit-content; }

/* Formations : regroupement par thème et ressources */
.theme-group { margin-bottom: 34px; }
.theme-group .row-head { flex-wrap: wrap; }
.theme-group .row-head .meta { color: var(--muted); font-size: 14px; }
.theme-group .row-head .btn { margin-left: auto; }
.docs-row { margin-top: 30px; }
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.doc { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; min-width: 0; }
.doc:hover { border-color: var(--accent); }
.doc svg { flex: none; color: var(--accent); }
.doc > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Suggestions « si vous avez aimé » */
.reco { margin-top: 34px; }
.reco .row-head { flex-wrap: wrap; }
.reco .row-head .meta { color: var(--muted); font-size: 14px; }
.reco-toggle { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; cursor: pointer; user-select: none; }
.reco-toggle input { accent-color: var(--accent); width: 16px; height: 16px; cursor: pointer; }
button.card.out { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.card.out .poster img { filter: saturate(.55) brightness(.8); }
.card.out:hover .poster img { filter: none; }
.reco-out { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; background: rgba(0, 0, 0, .72); color: #d9dde5; }

/* ---------------------------------------------------------------- Sagas */
/* Carte d'une saga : affiches empilées derrière la première. */
.card.saga .poster { box-shadow: 4px -4px 0 -1px #3a4150, 8px -8px 0 -2px #272c36, 0 4px 14px rgba(0, 0, 0, .35); }
.card.saga:hover .poster, .card.saga:focus-visible .poster { box-shadow: 0 0 0 2px var(--accent), 4px -4px 0 -1px #3a4150, 8px -8px 0 -2px #272c36, 0 10px 24px rgba(0, 0, 0, .5); }
.card.current .poster { box-shadow: 0 0 0 2px var(--accent); }
.card.current .card-sub { color: var(--accent); }
#saga-all { margin-left: auto; }
.saga-link { color: inherit; text-decoration: underline; text-decoration-color: var(--muted); text-underline-offset: 3px; }
.saga-link:hover { color: var(--accent); text-decoration-color: var(--accent); }
.reco-detail { display: flex; gap: 16px; align-items: flex-start; }
.reco-detail .rp { width: 130px; flex: none; border-radius: 8px; }
.reco-detail .facts { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; margin: 4px 0 10px; }
.reco-detail .facts span + span::before { content: "•"; margin-right: 10px; }
.reco-detail p { margin: 0 0 12px; line-height: 1.5; }
@media (max-width: 560px) { .reco-detail { flex-direction: column; } .reco-detail .rp { width: 110px; } }

/* ---------------------------------------------------------------- Demandes */
.nav a .count.count-pill { color: var(--accent-ink); margin-left: auto; }
.dm-search { position: relative; max-width: 760px; margin-bottom: 14px; }
.dm-search svg { position: absolute; left: 15px; top: 15px; color: var(--muted); pointer-events: none; }
.dm-search input { height: 50px; padding-left: 46px; font-size: 16px; border-radius: 12px; background: var(--bg-2); }
.dm-search input:focus { border-color: var(--accent); }
.dm-list { display: grid; gap: 10px; max-width: 980px; }
.dm-row { display: flex; gap: 14px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); min-width: 0; }
.dm-row.unread { border-color: var(--accent); }
.dm-poster { position: relative; flex: none; width: 62px; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 6px; background: var(--bg-3); }
.dm-poster > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dm-main { flex: 1; min-width: 0; }
.dm-title { font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.dm-sub { font-size: 13px; overflow-wrap: anywhere; }
.dm-text { margin: 5px 0 0; font-size: 13.5px; color: #c9ced8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dm-reply { display: flex; gap: 7px; margin: 7px 0 0; padding: 6px 9px; border-radius: 6px; background: var(--bg-3); font-size: 13.5px; }
.dm-reply svg { flex: none; margin-top: 2px; color: var(--accent); }
.dm-side { flex: none; align-self: center; }
.dm-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.dm-status.ok { background: rgba(76, 195, 138, .16); color: var(--ok); }
.dm-status.accent { background: rgba(240, 163, 58, .15); color: var(--accent); }
.dm-status.warn { background: rgba(239, 93, 93, .15); color: var(--danger); }
.dm-empty { margin: 4px 0 8px; }
.dm-hint { margin: 0; }
.dm-manual { margin: 10px 0 26px; }
.dm-manual.prominent .linklike { color: var(--accent); font-weight: 600; }
.linklike { padding: 4px 0; border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linklike:hover { color: var(--accent); }
.dm-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.dm-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 26px; padding: 12px 14px; max-width: 760px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.dm-cta > svg { color: var(--accent); }
.dm-cta > span { flex: 1 1 180px; }
.dm-cta .btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) {
  .dm-row { flex-wrap: wrap; }
  .dm-main { flex-basis: calc(100% - 76px); }
  .dm-side { width: 100%; display: flex; justify-content: flex-end; }
}

/* ---------------------------------------------------------------- À voir */
.btn.on .i { color: var(--accent); }
.badge.wl { top: auto; bottom: 6px; min-width: 22px; height: 22px; padding: 0; background: rgba(0, 0, 0, .72); color: var(--accent); }
.reco-actions { display: flex; gap: 10px; flex-wrap: wrap; }
/* Coups de cœur */
.cc-people { position: absolute; left: 6px; bottom: 8px; z-index: 2; display: flex; pointer-events: none; }
.cc-people i {
  width: 24px; height: 24px; margin-right: -5px; border-radius: 50%; display: grid; place-items: center;
  font-style: normal; font-size: 11.5px; font-weight: 700; color: #fff;
  background: hsl(var(--h, 30) 55% 38%); border: 2px solid rgba(0, 0, 0, .65);
}
.cc-people i.more { background: rgba(0, 0, 0, .8); font-size: 10px; }
.cc-block { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); max-width: 640px; }
.cc-who { display: flex; align-items: center; gap: 8px; }
.cc-who .i { color: var(--accent); flex: none; }
.cc-notes { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; color: var(--muted); overflow-wrap: anywhere; }
.cc-notes b { color: var(--text); font-weight: 600; }
.cc-form { display: flex; gap: 8px; margin-top: 10px; max-width: 640px; }
.cc-form input { flex: 1; min-width: 0; }
.cc-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; }
.cc-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--line); }
.wl-filters { margin-top: -8px; }
.wl-item { position: relative; min-width: 0; }
.wl-item > .card { width: 100%; }
.wl-item .poster .badge { top: auto; bottom: 10px; }
.wl-remove {
  position: absolute; top: 6px; right: 6px; z-index: 3; width: 28px; height: 28px; border-radius: 50%; border: 0;
  display: grid; place-items: center; background: rgba(0, 0, 0, .72); color: #fff; cursor: pointer; opacity: 0; transition: opacity .15s;
}
.wl-remove:hover { background: var(--danger, #c0392b); }
.wl-item:hover .wl-remove, .wl-remove:focus-visible { opacity: 1; }
@media (hover: none) { .wl-remove { opacity: 1; } }

/* ---------------------------------------------------------------- Pages personnes */
a.person { display: block; cursor: pointer; border-radius: 8px; }
a.person:hover .pn { color: var(--accent); }
a.person:hover .face { box-shadow: 0 0 0 2px var(--accent); }
.credits a:hover { color: var(--accent); text-decoration: underline; }
.person-head { display: flex; align-items: center; gap: 20px; margin: 4px 0 24px; min-width: 0; }
.person-head h1 { margin: 0 0 6px; font-size: 26px; overflow-wrap: anywhere; }
.person-head .meta { color: var(--muted); }
.person-head .person .face { width: 120px; height: 120px; margin: 0; font-size: 30px; }
@media (max-width: 600px) { .person-head { gap: 14px; } .person-head .person .face { width: 84px; height: 84px; font-size: 24px; } .person-head h1 { font-size: 22px; } }
.card .as { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- Mode TV (télécommande) */
/* Sélection bien visible de loin ; les effets réservés au survol suivent aussi la sélection. */
html.tv :focus { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
html.tv .card:focus { outline: none; }
html.tv .card:focus .poster { transform: scale(1.06); box-shadow: 0 0 0 3px var(--accent), 0 14px 30px rgba(0, 0, 0, .6); }
html.tv .card:focus .card-title { color: var(--accent); }
html.tv .card:focus .play-hover, html.tv .episode .thumb:focus .play-hover { opacity: 1; }
html.tv .shelf { padding: 8px 6px 14px; scroll-padding-inline: 40px; }
/* À la télécommande, les barres de défilement ne servent à rien : la sélection fait défiler. */
html.tv, html.tv .shelf, html.tv .sidebar { scrollbar-width: none; }
html.tv::-webkit-scrollbar, html.tv .shelf::-webkit-scrollbar, html.tv .sidebar::-webkit-scrollbar { display: none; }
html.tv .nav a:focus { outline-offset: -3px; }
html.tv .dropdown .tv-state { margin-left: auto; font-size: 12px; color: var(--accent); }
.dropdown .tv-state { margin-left: auto; font-size: 12px; color: var(--muted); }
/* Grand écran vu du canapé : tout un peu plus grand. */
@media (min-width: 1500px) { html.tv body { zoom: 1.2; } }

/* Lecteur : barre de progression pilotée à la télécommande. */
.tv-osd {
  position: absolute; inset: auto 0 0 0; display: flex; align-items: center; gap: 14px; padding: 40px 40px 28px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .8)); font-size: 18px; font-variant-numeric: tabular-nums; transition: opacity .3s;
}
.player.idle .tv-osd { opacity: 0; }
.tv-osd .tv-play { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); flex: none; }
.tv-osd .tv-bar { position: relative; flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.tv-osd .tv-buf, .tv-osd .tv-fill { position: absolute; inset: 0 auto 0 0; width: 0; }
.tv-osd .tv-buf { background: rgba(255, 255, 255, .3); }
.tv-osd .tv-fill { background: var(--accent); }
.tv-osd .tv-hint { color: #c9ced8; font-size: 14px; white-space: nowrap; }
html.tv .player-top { padding: 24px 40px 50px; }
html.tv .player-top .pt-title { font-size: 24px; }
html.tv .player-msg, html.tv .next-overlay { bottom: 120px; right: 40px; }

/* ---------------------------------------------------------------- Photothèques */
.tabs a.tab { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 8px; align-items: center; }
.tabs a.tab:hover { color: var(--text); }
.tabs a.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.nav-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 1px; }
.badge.left { right: auto; left: 6px; }
.small { font-size: 13px; }
.hint { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 16px; }
.hint a, .intro a { color: var(--accent); }
.intro { max-width: 860px; margin: -8px 0 22px; }
.album-desc { margin: 8px 0 0; max-width: 760px; color: #c9ced8; }
/* Privé / public : discret quand c'est privé, impossible à rater quand c'est public */
.vis {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(15, 17, 21, .8); color: #d7dbe3; font-size: 12px; font-weight: 700;
}
.vis.public { border-color: transparent; background: var(--ok); color: #06210f; }
.poster .vis { position: absolute; top: 6px; right: 6px; }
button.vis { cursor: pointer; }
button.vis:hover, button.vis:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.title-vis { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.privacy {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; margin-bottom: 16px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2);
}
.privacy > svg { flex: none; color: var(--muted); }
.privacy strong { margin-right: 4px; }
.privacy a { color: var(--ok); text-decoration: underline; }
.privacy.has-public { border-color: rgba(76, 195, 138, .5); background: rgba(76, 195, 138, .09); }
.privacy.has-public > svg { color: var(--ok); }
.callout {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 16px;
  border-radius: var(--radius); border: 1px solid rgba(240, 163, 58, .35); background: rgba(240, 163, 58, .07);
}
.callout > svg { color: var(--accent); }
.callout > div { flex: 1 1 240px; }
textarea {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text);
  font: inherit; resize: vertical; outline: none;
}
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240, 163, 58, .2); }
input[type=number] { height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); outline: none; }
input.num { width: 80px; height: 34px; }
.field-label { font-size: 13.5px; }

/* Grille : mois, sélection */
.ph-month { margin-bottom: 22px; }
.ph-month h3 { font-size: 16px; margin: 0 0 10px; display: flex; gap: 10px; align-items: baseline; }
.ph-month h3 .link { margin-left: 4px; font-weight: 500; }
.photo-grid button { color: inherit; font: inherit; }
.photo-grid img.broken { display: none; }
.photo-grid .vid { display: inline-flex; align-items: center; gap: 4px; }
.ph-fail span { display: grid; gap: 4px; font-size: 12px; word-break: break-all; }
.ph-fail small { font-weight: 400; opacity: .75; }
.ph-check {
  position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid rgba(255, 255, 255, .85); background: rgba(0, 0, 0, .35); color: transparent; opacity: 0; transition: opacity .12s; cursor: pointer;
}
.photo-grid button:hover .ph-check, .selecting .ph-check { opacity: 1; }
@media (hover: none) { .ph-check { opacity: .9; } }
.photo-grid button.sel { outline: 3px solid var(--accent); outline-offset: -3px; }
.photo-grid button.sel img { transform: scale(.92); }
.photo-grid button.sel .ph-check { opacity: 1; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.selecting .photo-grid button { cursor: pointer; }
.sel-bar {
  position: sticky; bottom: 12px; z-index: 20; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px;
  padding: 10px 14px; border-radius: 12px; background: rgba(31, 36, 45, .97); border: 1px solid var(--accent); box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.sel-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.photo-grid.small { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 4px; }
.photo-grid button.off { opacity: .25; }
.photo-grid button.off::after { content: "retirée"; position: absolute; inset: auto 0 6px; text-align: center; font-size: 12px; font-weight: 700; }

/* Envoi */
.drop-zone {
  display: grid; justify-items: center; gap: 10px; padding: 28px 16px; text-align: center; border-radius: 12px;
  border: 2px dashed var(--line); background: var(--bg); transition: border-color .15s, background .15s;
}
.drop-zone svg { color: var(--accent); }
.drop-zone.over { border-color: var(--accent); background: rgba(240, 163, 58, .08); }
.drop-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.tips { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.upload-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 65; width: min(360px, calc(100vw - 32px)); padding: 12px 14px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.up-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.up-head strong { flex: 1; }
.up-head .icon-btn { width: 32px; height: 32px; }
.up-bar { height: 6px; border-radius: 3px; background: var(--bg-3); overflow: hidden; margin: 6px 0; }
.up-bar i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.up-text { font-size: 13px; color: var(--muted); }
.up-errors { margin-top: 6px; font-size: 12.5px; max-height: 140px; overflow: auto; }
.up-actions { display: flex; gap: 8px; margin-top: 10px; }

/* Ranger dans un album, copier / déplacer */
.album-pick { display: grid; gap: 6px; max-height: 240px; overflow: auto; }
.album-pick label { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; }
.album-pick label:has(input:checked) { border-color: var(--accent); background: rgba(240, 163, 58, .1); }
.album-pick input { accent-color: var(--accent); }
.ap-cover { width: 40px; height: 40px; border-radius: 6px; overflow: hidden; background: var(--bg-3); flex: none; }
.ap-cover img { width: 100%; height: 100%; object-fit: cover; }
.mode-choice { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0; display: grid; gap: 10px; }
.mode-choice legend { padding: 0 6px; font-size: 13.5px; color: var(--muted); }
.mode-opt { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 8px 10px; border-radius: 8px; border: 1px solid transparent; }
.mode-opt:has(input:checked) { border-color: var(--accent); background: rgba(240, 163, 58, .08); }
.mode-opt input { accent-color: var(--accent); width: 16px; height: 16px; margin: 3px 0 0; flex: none; }
.mode-opt span { font-size: 14px; line-height: 1.45; }
.mode-choice p { margin: 0; }
.danger-zone { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.danger-zone p { margin: 0; }

/* Propositions de Plume */
.props { display: grid; gap: 12px; margin-bottom: 18px; }
.prop {
  display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 14px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--line); opacity: .6; transition: opacity .15s, border-color .15s;
}
.prop.on { opacity: 1; border-color: rgba(240, 163, 58, .5); }
.prop-check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 8px 0 0; cursor: pointer; }
.prop-body { display: grid; gap: 6px; min-width: 0; }
.prop-title { font-weight: 700; font-size: 16px; }
.prop-title-fixed { font-weight: 700; font-size: 16px; display: flex; gap: 6px; align-items: center; color: var(--accent); }
.prop-meta { font-size: 13.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.prop-strip { display: flex; gap: 4px; overflow: hidden; }
.prop-strip img { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; flex: none; background: var(--bg-3); }
.prop-strip .more { width: 72px; height: 72px; border-radius: 4px; background: var(--bg-3); display: grid; place-items: center; color: var(--muted); font-weight: 700; flex: none; }
.prop .link { justify-self: start; }
.apply-panel { display: grid; gap: 14px; }
.page-head h1 svg { vertical-align: -3px; color: var(--accent); }

/* Liens de partage */
.link-form .radio { flex-wrap: wrap; }
label.radio input.num { width: 80px; height: 34px; padding: 0 8px; }
.link-form select { width: auto; height: 34px; }
.link-list { display: grid; gap: 10px; }
.link-list .subhead { margin: 4px 0 0; }
.link-row { display: grid; gap: 4px; padding: 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); }
.link-row.fresh { border-color: var(--ok); }
.link-row.off { opacity: .6; }
.link-url { display: flex; gap: 6px; align-items: center; }
.link-url input { flex: 1; min-width: 0; height: 34px; font-size: 13px; }
.link-url .icon-btn { width: 34px; height: 34px; }

/* Page publique d'un album partagé */
.share-page { min-height: 100vh; }
.share-wrap { max-width: 1400px; margin: 0 auto; padding: 18px 16px 40px; }
.share-wrap > .brand { margin-bottom: 22px; font-size: 18px; }
.share-wrap > .brand svg { width: 26px; height: 26px; }
.share-head h1 { font-size: 28px; }
.share-desc { margin: 10px 0 0; max-width: 760px; color: #c9ced8; }
.share-limits { margin: 6px 0 0; font-size: 13px; }
.lightbox .lb-caption { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.lightbox .lb-caption a.btn { color: var(--text); }
.lb-media { display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden; }
.lb-media img { touch-action: none; user-select: none; -webkit-user-select: none; transform-origin: center; will-change: transform; }
.lightbox > button, .lightbox > a, .lb-tools, .lightbox .lb-caption { z-index: 2; }
.lb-tools { position: absolute; top: 14px; left: 14px; display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 10px; background: rgba(20, 22, 28, .72); }
.lb-tools .icon-btn:disabled { opacity: .35; cursor: default; }
.lb-speed { width: auto; min-height: 32px; padding: 3px 6px; border: 0; border-radius: 6px; background: rgba(255, 255, 255, .1); color: var(--text); font-size: 13px; }
.lightbox.lb-zoomed .lb-prev, .lightbox.lb-zoomed .lb-next { opacity: .25; }
.lightbox .lb-close, .lightbox .lb-download, .lightbox .lb-prev, .lightbox .lb-next, .lb-tools, .lightbox .lb-caption { transition: opacity .25s; }
.lightbox.lb-idle { cursor: none; }
.lightbox.lb-idle .lb-close, .lightbox.lb-idle .lb-download, .lightbox.lb-idle .lb-prev, .lightbox.lb-idle .lb-next, .lightbox.lb-idle .lb-tools, .lightbox.lb-idle .lb-caption { opacity: 0; pointer-events: none; }
.lightbox:fullscreen img, .lightbox:fullscreen video { max-width: 100vw; max-height: 100vh; }
.lb-fade > * { animation: lb-fade .6s ease; }
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lb-fade > * { animation: none; } }
.ph-badge { position: absolute; left: 5px; bottom: 5px; padding: 2px 6px; border-radius: 5px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 11px; }
.lb-tools .icon-btn.active { background: rgba(240, 163, 58, .28); color: var(--accent); }
.lb-info { display: none; position: absolute; z-index: 3; top: 0; right: 0; bottom: 0; width: 330px; padding: 18px; overflow-y: auto; background: var(--bg-2); border-left: 1px solid var(--line); color: var(--text); }
.lightbox.lb-with-info .lb-info { display: block; }
.lightbox.lb-with-info { padding-right: 330px; }
.lightbox.lb-with-info .lb-media img, .lightbox.lb-with-info .lb-media video { max-width: calc(96vw - 330px); }
.lightbox.lb-with-info .lb-next { right: 344px; }
.lightbox.lb-with-info .lb-close { right: 344px; }
.lightbox.lb-with-info .lb-download { right: 392px; }
.lightbox.lb-with-info .lb-caption { right: 330px; }
.lightbox.lb-playing.lb-with-info { padding-right: 0; }
.lightbox.lb-playing .lb-info { display: none; }
.lightbox.lb-playing.lb-with-info .lb-media img, .lightbox.lb-playing.lb-with-info .lb-media video { max-width: 94vw; }
.lightbox.lb-playing.lb-with-info .lb-next, .lightbox.lb-playing.lb-with-info .lb-close { right: 14px; }
.lightbox.lb-playing.lb-with-info .lb-caption { right: 0; }
.lb-info h3 { margin: 0 0 12px; font-size: 16px; }
.lb-facts { margin: 0; display: grid; gap: 11px; }
.lb-facts dt { color: var(--muted); font-size: 12px; }
.lb-facts dd { margin: 1px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.lb-facts small { display: block; color: var(--muted); font-size: 12px; }
.lb-facts a { color: var(--accent); font-size: 13px; }
.lb-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.lb-date { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.lb-date label { display: grid; gap: 3px; flex: 1 1 180px; color: var(--muted); font-size: 12px; }
.ph-fav { position: absolute; right: 5px; top: 5px; display: inline-flex; padding: 3px; border-radius: 50%; background: rgba(0, 0, 0, .65); color: var(--accent); }
.ph-fav svg { fill: currentColor; }
.place-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.place-card { display: flex; gap: 12px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.place-cover { flex: none; width: 96px; height: 96px; padding: 0; overflow: hidden; border: 0; border-radius: 6px; background: #000; cursor: pointer; }
.place-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.place-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.place-body .muted { font-size: 13px; }
.place-acts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 6px; }
.place-title { margin: 24px 0 8px; }
@media (max-width: 820px) {
  .lb-info { top: auto; left: 0; width: auto; max-height: 52vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 12px 12px 0 0; }
  .lightbox.lb-with-info { padding-right: 0; }
  .lightbox.lb-with-info .lb-media img, .lightbox.lb-with-info .lb-media video { max-width: 94vw; max-height: 44vh; }
  .lightbox.lb-with-info .lb-media { height: 48%; align-self: start; margin-top: 60px; }
  .lightbox.lb-with-info .lb-next, .lightbox.lb-with-info .lb-close { right: 14px; }
  .lightbox.lb-with-info .lb-caption { display: none; }
}
@media (max-width: 860px) {
  .sel-bar { bottom: 8px; }
  .sel-actions { margin-left: 0; width: 100%; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 3px; }
  .lightbox .lb-prev, .lightbox .lb-next { display: none; }
}

/* ---------------------------------------------------------------- Versions d'un film (doublons) */
.vbadge {
  position: absolute; left: 6px; bottom: 8px; padding: 2px 7px; border-radius: 6px;
  background: rgba(0, 0, 0, .72); color: var(--text); font-size: 11.5px; font-weight: 600; backdrop-filter: blur(4px);
}
.vpick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.vpick-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; font-weight: 600; margin-right: 2px; }
.vchip { height: 34px; padding: 0 13px; font-size: 14px; }
.vchip strong { font-weight: 700; }
.vchip span { font-size: 12.5px; }
.versions { padding-top: 6px; }
.versions h2 { margin: 0 0 4px; font-size: 20px; }
.versions-hint { margin: 0 0 12px; font-size: 13.5px; }
.versions-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.vtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.vtable th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.vtable td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.vtable tbody tr:last-child td { border-bottom: 0; }
.vtable tr.on > td { background: rgba(240, 163, 58, .07); }
.vtable td.diff { color: var(--accent); font-weight: 600; }
.vtable .vname > div { display: flex; align-items: center; gap: 10px; }
.vtable .vact { text-align: right; }
.vtable .vact .btn + .btn { margin-left: 6px; }
.vradio {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: transparent; cursor: pointer;
  display: grid; place-items: center; padding: 0; flex: none; color: var(--accent-ink);
}
.vradio:hover { border-color: var(--accent); }
.vradio.on { background: var(--accent); border-color: var(--accent); }
.vradio svg { width: 13px; height: 13px; stroke-width: 3; }
.vtable tr.vpath > td { background: var(--bg-3); white-space: normal; }
.vpath-box { display: flex; align-items: center; gap: 10px; }
.vpath-box code { flex: 1; min-width: 0; word-break: break-all; font-size: 13px; user-select: all; }
.versions-wrap { container-type: inline-size; }
/* Pas la place pour toutes les colonnes : une fiche par version. */
@container (max-width: 1000px) {
  .vtable thead { display: none; }
  .vtable tr:not(.vpath) { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 16px; padding: 14px; border-bottom: 1px solid var(--line); }
  .vtable tr.on:not(.vpath) { background: rgba(240, 163, 58, .07); }
  .vtable tr:not(.vpath) > td { border: 0; padding: 0; white-space: normal; background: none !important; }
  .vtable td[data-label]::before { content: attr(data-label) " : "; color: var(--muted); font-weight: 400; }
  .vtable .vname, .vtable .vact { grid-column: 1 / -1; }
  .vtable .vact { text-align: left; margin-top: 6px; }
  .vtable tr.vpath { display: block; border-bottom: 1px solid var(--line); }
  .vtable tr.vpath[hidden] { display: none; }
  .vtable tr.vpath > td { display: block; }
}
@media (max-width: 560px) { .vpath-box { flex-direction: column; align-items: stretch; } }

/* Proposition d'installer l'appli (téléphone et tablette) */
.app-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 45;
  display: flex; align-items: center; gap: 10px; max-width: 520px; margin: 0 auto; padding: 10px 8px 10px 12px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
}
.app-banner img { flex: none; border-radius: 10px; }
.app-banner-text { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 13px; line-height: 1.3; }
.app-banner-text span { color: var(--muted); font-size: 12px; }
.app-banner-text ol { margin: 2px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; }
.app-banner .btn { flex: none; }
.app-banner .icon-btn { flex: none; width: 34px; height: 34px; }

/* Livres audio : pochettes carrées, parties sans vignette */
.hero .poster-lg.square { width: 260px; aspect-ratio: 1; }
@media (max-width: 700px) { .hero .poster-lg.square { width: 160px; } }
.book-part { grid-template-columns: 1fr auto; }
.book-part .ep-text { position: relative; padding-bottom: 6px; }
.book-part .bar { border-radius: 2px; }
.book-part.current { border-color: var(--accent); }
.book-part.watched .t { color: var(--muted); }

/* Lecteur des livres audio (bon 28, lot B) : grande pochette sur fond flou, sans écran vidéo */
.player.ecoute { background: var(--bg); overflow-y: auto; display: flex; flex-direction: column; }
.ec-bg { position: fixed; inset: -40px; background: center / cover no-repeat; filter: blur(40px) brightness(.35); transform: scale(1.1); pointer-events: none; }
.ec-top { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 18px calc(4px); }
.ec-crumb { flex: 1; min-width: 0; font-size: 14px; }
.ec-main { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; gap: 48px; padding: 12px 24px 32px; }
.ec-cover { position: relative; flex: none; width: min(380px, 38vw); aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--bg-3); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); }
.ec-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ec-cover .ph { position: absolute; inset: 0; }
.ec-side { width: min(520px, 100%); display: grid; gap: 16px; }
.ec-head h1 { margin: 0; font-size: 26px; line-height: 1.2; }
.ec-author { color: #c9ced8; margin-top: 4px; }
.ec-chap { margin-top: 10px; font-weight: 600; min-height: 1.45em; }
.ec-msg { padding: 10px 14px; border-radius: 10px; background: rgba(22, 26, 33, .9); border: 1px solid var(--line); }
.ec-track { position: relative; height: 22px; }
.ec-bar { position: absolute; left: 0; right: 0; top: 8px; height: 6px; display: flex; gap: 2px; pointer-events: none; }
.ec-seg { position: relative; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .22); min-width: 1px; }
.ec-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); }
.ec-seek { position: absolute; inset: 0; width: 100%; height: 22px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.ec-seek::-webkit-slider-runnable-track { height: 22px; background: transparent; }
.ec-seek::-moz-range-track { height: 22px; background: transparent; }
.ec-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.ec-seek::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; }
.ec-seek:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.ec-times { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: #c9ced8; font-variant-numeric: tabular-nums; margin-top: -8px; }
.ec-ctrls { display: flex; align-items: center; justify-content: center; gap: 14px; }
.ec-ctrls .icon-btn { width: 52px; height: 52px; }
.ec-skip { position: relative; }
.ec-skip span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; font-weight: 700; padding-top: 2px; }
.ec-ctrls .ec-play { width: 72px; height: 72px; background: var(--text); color: var(--bg); }
.ec-ctrls .ec-play:hover { background: #fff; }
.ec-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ec-tools .btn.on { border-color: var(--accent); color: var(--accent); }
.ec-tools #ec-speed { min-width: 70px; font-variant-numeric: tabular-nums; font-weight: 700; }
.ec-speed-now { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 26px; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.ec-speed-now .btn { width: 46px; font-size: 20px; }
.ec-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-body h4 { margin: 16px 0 8px; font-size: 14px; }
.modal-body .small { font-size: 13px; }
.ec-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.ec-list { display: grid; gap: 4px; max-height: 60vh; overflow-y: auto; }
.ec-item { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; width: 100%; text-align: left; padding: 9px 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; }
.ec-item:hover, .ec-item:focus-visible { background: var(--bg-3); }
.ec-item.current { border-color: var(--accent); }
.ec-item.done .ec-t { color: var(--muted); }
.ec-item .ec-n { grid-row: span 2; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 2ch; }
.ec-item .muted { grid-column: 2; font-size: 13px; }
.ec-sig { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 4px; }
.ec-sig .ec-item { grid-template-columns: 1fr; }
.ec-sig .ec-item .muted { grid-column: 1; }
.ec-list > .btn { justify-self: start; margin-bottom: 6px; }
@media (max-width: 800px) {
  .ec-main { flex-direction: column; gap: 18px; justify-content: flex-start; padding: 4px 16px 24px; }
  .ec-cover { width: min(300px, 70vw); }
  .ec-head { text-align: center; }
  .ec-head h1 { font-size: 21px; }
  .ec-ctrls { gap: 6px; }
}

/* Lecteur réduit : l'écoute continue pendant la navigation */
.mini-ecoute {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 46; max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 4px; padding: 8px 8px 10px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .55);
}
.me-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.me-cover { position: relative; flex: none; width: 44px; height: 44px; border-radius: 6px; overflow: hidden; background: var(--bg-3); }
.me-cover img, .me-cover .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.me-cover .ph span { display: none; }
.me-text { min-width: 0; display: grid; line-height: 1.3; }
.me-text strong, .me-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text span { color: var(--muted); font-size: 13px; }
.me-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .1); }
.me-prog span { display: block; height: 100%; width: 0; background: var(--accent); }
body.has-mini main#view { padding-bottom: 96px; }
body.has-mini .app-banner { bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (min-width: 861px) { .mini-ecoute { left: calc(var(--sidebar) + 12px); } }

/* Fiche d'un livre : vérification par le super admin (bon 28, lot C) */
.book-admin { margin: 8px 0 24px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); display: grid; gap: 8px; }
.book-admin .row-head { margin: 0; }
.book-admin h2 { font-size: 17px; margin: 0; }
.book-admin p { margin: 0; }
.book-admin .small, .modal-body .small { font-size: 13px; }
.ol-cands { display: grid; gap: 6px; }
.ol-cand { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; background: var(--bg-3); }
.book-hero .overview { max-width: 720px; }

/* « À écouter ensuite » (bon 29, lot A) */
.lv-row .shelf { align-items: start; }
.lv-tuile { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lv-tuile .card { width: 100%; }
.lv-raison { margin: 0; font-size: 12px; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }
.lv-tuile .btn { align-self: flex-start; padding: 4px 8px; font-size: 12px; height: auto; }
.lv-masque { margin: 0 0 12px; }
.lv-absent .card { cursor: default; }
.lv-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lv-btns .btn { padding: 4px 8px; font-size: 12px; height: auto; }
.lv-btns .link { font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.ec-after { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }

/* Demandes : films… ou livres audio (bon 29, lot B) */
.dm-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.dm-kinds .chip { display: inline-flex; align-items: center; gap: 6px; }
