:root {
  --radius: 10px;
  --pad: clamp(16px, 4vw, 56px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15px/1.5 "Inter", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; }

/* ---------- Marque / boutons ---------- */
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand.big { font-size: 30px; }
.brand-mark { display: block; flex-shrink: 0; width: 28px; height: auto; }
.brand.big .brand-mark { width: 40px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 8px; font-weight: 600; transition: transform .12s, background .15s, opacity .15s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--text); color: #111; }
.btn.primary:hover { background: #fff; opacity: .88; }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: rgba(255,255,255,.12); backdrop-filter: blur(8px); }
.btn.ghost:hover { background: rgba(255,255,255,.2); }
.btn.wide { width: 100%; }
.btn svg, .icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); transition: background .15s; }
.icon-btn:hover { background: rgba(255,255,255,.22); }

/* ---------- Connexion ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; }
.login-bg { position: fixed; inset: 0; background:
  radial-gradient(60% 50% at 15% 10%, rgb(var(--accent-rgb) / .22), transparent 70%),
  radial-gradient(50% 50% at 90% 90%, rgba(120,90,220,.22), transparent 70%), var(--bg); }
.login-card { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; position: relative; width: min(460px, 100%); background: rgb(var(--bg2-rgb) / .82); backdrop-filter: blur(20px); border: 1px solid var(--line); border-radius: 18px; padding: 34px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.login-card > .muted { margin: 6px 0 22px; }
.tabs { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 10px; margin-bottom: 18px; }
.tab { flex: 1; padding: 9px; border-radius: 7px; color: var(--muted); font-weight: 600; }
.tab.active { background: var(--bg-3); color: var(--text); }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.form input { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; color: var(--text); outline: none; width: 100%; }
.form input:focus { border-color: var(--accent); }
.form select { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; color: var(--text); outline: none; width: 100%; font: inherit; }
.form select:focus { border-color: var(--accent); }
.form input.bad { border-color: #ff7b72; }
.adv { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.adv summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; user-select: none; }
.adv summary:hover, .adv[open] summary { color: var(--text); }
.adv[open] summary { margin-bottom: 14px; }
.adv-badge { margin-left: 8px; padding: 2px 8px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 11px; }
.adv p { margin: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.error { color: #ff7b72; min-height: 20px; margin: 12px 0 0; font-size: 14px; }
.profiles { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.profiles:empty { display: none; }
.profile { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; background: var(--bg-3); border: 1px solid var(--line); border-radius: 999px; }
.profile:hover { border-color: var(--accent); }
.profile .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #111; }
.profile .rm { color: var(--muted); padding: 0 4px; }
.profile .rm:hover { color: #ff7b72; }

/* ---------- Navigation ---------- */
.nav { position: fixed; z-index: 30; inset: 0 0 auto 0; height: 68px; display: flex; align-items: center; gap: 36px; padding: 0 var(--pad); background: linear-gradient(rgb(var(--bg-rgb) / .85), transparent); transition: background .25s; }
.nav.solid { background: rgb(var(--bg-rgb) / .94); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.06); }
.links { display: flex; gap: 22px; white-space: nowrap; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.links a { color: var(--text-2); font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.links a:hover { color: #fff; }
.links a.active { color: #fff; border-color: var(--accent); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.search { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.08); border: 1px solid transparent; border-radius: 999px; padding: 7px 14px; transition: .2s; }
.search:focus-within { border-color: var(--accent); background: rgba(0,0,0,.6); }
.search svg { width: 17px; height: 17px; fill: var(--muted); }
.search input { background: none; border: 0; outline: none; width: 190px; transition: width .3s cubic-bezier(.2,.8,.2,1); }
.search:focus-within input { width: 240px; }
.search-x { color: var(--muted); font-size: 12px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.search-x:hover { color: var(--text); background: rgba(255,255,255,.12); }
.avatar { width: 36px; height: 36px; border-radius: 9px; font-weight: 800; color: #111; }

/* ---------- Hero ---------- */
.hero { position: relative; height: min(78vh, 720px); min-height: 440px; overflow: hidden; }
.hero-slide { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 0 var(--pad) 90px; opacity: 0; visibility: hidden; transition: opacity 1.2s ease, visibility 0s 1.2s; }
.hero-slide.on { opacity: 1; visibility: visible; z-index: 1; transition: opacity 1.2s ease; }
/* Lent zoom « Ken Burns » sur l'image et texte qui monte en fondu à chaque changement de titre */
.hero-slide.on .hero-art { animation: kenburns 18s ease-out both; }
#main:not(.still) .hero-slide.on:not(.still) .hero-body > * { animation: textUp .8s cubic-bezier(.2,.7,.2,1) both; }
.hero-slide.on .hero-body > :nth-child(2) { animation-delay: .08s; }
.hero-slide.on .hero-body > :nth-child(3) { animation-delay: .16s; }
.hero-slide.on .hero-body > :nth-child(4) { animation-delay: .24s; }
.hero-slide.on .hero-body > :nth-child(5) { animation-delay: .32s; }
@keyframes kenburns { from { transform: scale(1.0); } to { transform: scale(1.07); } }
@keyframes textUp { from { opacity: 0; transform: translateY(18px); } }
.hero-dots { position: absolute; z-index: 3; left: var(--pad); bottom: 60px; display: flex; gap: 6px; }
.hero-dots button { padding: 10px 0; background: none; border: 0; cursor: pointer; }
.hero-dots i { display: block; width: 30px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.28); overflow: hidden; }
.hero-dots i::after { content: ""; display: block; height: 100%; width: 0; background: var(--accent); }
.hero-dots .on i::after { animation: heroFill 15s linear forwards; }
body:has(#modal:not(.hidden)) .hero-dots .on i::after, body:has(#player:not(.hidden)) .hero-dots .on i::after { animation-play-state: paused; }
.hero-arrow { position: absolute; z-index: 3; top: 50%; width: 52px; height: 96px; display: grid; place-items: center; color: rgba(255,255,255,.85); filter: drop-shadow(0 2px 8px rgba(0,0,0,.75)); opacity: 0; pointer-events: none; transform: translateY(-50%); transition: opacity .35s, transform .3s cubic-bezier(.2,.8,.2,1), color .2s; }
.hero-arrow svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero-arrow.l { left: max(4px, calc(var(--pad) - 52px)); } .hero-arrow.r { right: max(4px, calc(var(--pad) - 52px)); }
.hero:hover .hero-arrow { opacity: 1; pointer-events: auto; }
.hero-arrow:hover { color: var(--accent); }
.hero-arrow.l:hover { transform: translateY(-50%) translateX(-4px); } .hero-arrow.r:hover { transform: translateY(-50%) translateX(4px); }
@media (hover: none) { .hero-arrow { display: none; } }
@keyframes heroFill { to { width: 100%; } }
.hero-art { position: absolute; inset: 0; overflow: hidden; }
.hero-art .layer { position: absolute; inset: 0; background-size: cover; background-position: center 20%; }
.hero-art .layer.img { opacity: 0; transition: opacity 1.1s ease; }
.hero-art .layer.img.ok { opacity: 1; }
.hero-art .layer.blur { filter: blur(38px) saturate(1.3); transform: scale(1.25); }
/* Fondu de l'image vers le fond : dégradés à plusieurs paliers (plus doux qu'un dégradé linéaire simple) */
.hero-slide::after { content: ""; position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(90deg, rgb(var(--bg-rgb) / .94) 0%, rgb(var(--bg-rgb) / .82) 18%, rgb(var(--bg-rgb) / .55) 38%, rgb(var(--bg-rgb) / .22) 58%, rgb(var(--bg-rgb) / .06) 72%, transparent 85%),
  linear-gradient(0deg, var(--bg) 0%, rgb(var(--bg-rgb) / .92) 9%, rgb(var(--bg-rgb) / .7) 20%, rgb(var(--bg-rgb) / .38) 33%, rgb(var(--bg-rgb) / .12) 46%, transparent 58%),
  linear-gradient(180deg, rgb(var(--bg-rgb) / .55) 0%, transparent 22%); }
.hero-poster { position: absolute; z-index: 1; right: var(--pad); bottom: 90px; height: 62%; aspect-ratio: 2/3; border-radius: 14px; object-fit: cover; box-shadow: 0 30px 80px rgba(0,0,0,.6); opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .9s ease, transform 1.2s cubic-bezier(.2,.7,.2,1); }
.hero-poster.ok { opacity: 1; transform: none; }
.hero-body { position: relative; z-index: 2; max-width: 620px; }
.hero-tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.hero h1 { font-size: clamp(32px, 5vw, 62px); line-height: 1.02; letter-spacing: -0.03em; margin: 0 0 14px; text-wrap: balance; }
.hero p { color: var(--text-2); margin: 0 0 22px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; color: var(--text-2); font-size: 14px; margin-bottom: 14px; }
.meta .star { color: var(--accent); font-weight: 700; }
.pill { border: 1px solid rgba(255,255,255,.3); border-radius: 5px; padding: 1px 7px; font-size: 12px; }

/* ---------- Rangées ---------- */
.page { padding-top: 96px; }
.page-head { padding: 0 var(--pad); margin-bottom: 8px; }
.page-head h1 { font-size: 30px; letter-spacing: -0.02em; margin: 0 0 14px; }
.rows { position: relative; z-index: 3; margin-top: -60px; padding-bottom: 60px; }
.page .rows { margin-top: 0; }
.row { margin-bottom: 30px; position: relative; }
.row h2 { font-size: 18px; margin: 0 0 10px; padding: 0 var(--pad); display: flex; align-items: baseline; gap: 10px; }
.row h2 small { color: var(--muted); font-weight: 500; font-size: 13px; }
.row h2 a { margin-left: auto; font-size: 13px; color: var(--muted); font-weight: 500; }
.row h2 a:hover { color: var(--accent); }
.strip { display: flex; gap: 12px; overflow-x: auto; scroll-behavior: smooth; padding: 8px var(--pad) 14px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
/* Flèches : pastille ronde posée sur le fondu des affiches, visible seulement s'il reste quelque chose à faire défiler */
/* Flèches : simple chevron fin, sans fond, qui se glisse légèrement vers le sens du défilement */
.row-arrow { position: absolute; top: calc(50% + 14px); width: 40px; height: 64px; z-index: 4; display: grid; place-items: center; color: rgba(255,255,255,.85); filter: drop-shadow(0 2px 6px rgba(0,0,0,.7)); opacity: 0; pointer-events: none; transform: translateY(-50%); transition: opacity .3s, transform .3s cubic-bezier(.2,.8,.2,1), color .2s; }
.row-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.row.can-l:hover .row-arrow.l, .row.can-r:hover .row-arrow.r { opacity: 1; pointer-events: auto; }
.row-arrow.l { left: max(4px, calc(var(--pad) - 44px)); } .row-arrow.r { right: max(4px, calc(var(--pad) - 44px)); }
.row-arrow:hover { color: var(--accent); }
.row-arrow.l:hover { transform: translateY(-50%) translateX(-3px); } .row-arrow.r:hover { transform: translateY(-50%) translateX(3px); }
@media (hover: none) { .row-arrow { display: none; } }

/* ---------- Cartes ---------- */
.card { flex: 0 0 auto; width: clamp(130px, 13vw, 190px); text-align: left; border-radius: var(--radius); transition: transform .35s cubic-bezier(.2,.8,.2,1); position: relative; }
.card:hover, .card:focus-visible { transform: scale(1.06); z-index: 2; outline: none; }
.card .art { position: relative; aspect-ratio: 2/3; border-radius: var(--radius); overflow: hidden; background: var(--bg-3); box-shadow: 0 6px 20px rgba(0,0,0,.4); transition: box-shadow .35s; }
.card:hover .art, .card:focus-visible .art { box-shadow: 0 0 0 2px var(--accent), 0 14px 40px rgba(0,0,0,.6); }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .5s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.card:hover img.ok { transform: scale(1.04); }
.card.live:hover img.ok { transform: none; }
/* Images en fondu : invisibles tant qu'elles chargent (le dégradé + le titre restent visibles) */
.card img, .tile-art img, .logo-btn img, .chan-logo img, .li-logo img, .ep .th img { opacity: 0; }
.card img.ok, .tile-art img.ok, .logo-btn img.ok, .chan-logo img.ok, .li-logo img.ok, .ep .th img.ok { opacity: 1; }
.tile-art img, .logo-btn img, .chan-logo img, .li-logo img, .ep .th img { transition: opacity .5s ease; }
.card.live img { background: var(--tile); }
.card .ph { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 12px; font-weight: 700; font-size: 15px; line-height: 1.15; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.card .name { margin-top: 8px; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .sub { font-size: 12px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .qbadge { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.72); border: 1px solid rgba(255,255,255,.25); border-radius: 4px; padding: 0 5px; font-size: 10px; font-weight: 800; letter-spacing: .04em; }
.card .in-list { position: absolute; right: 8px; bottom: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.card .in-list svg { width: 14px; height: 14px; fill: var(--accent-ink); }
.card.live .qbadge { display: none; }
.card .badge { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.72); border-radius: 5px; padding: 1px 6px; font-size: 11px; font-weight: 700; color: var(--accent); }
.card.live, .card.wide { width: clamp(180px, 17vw, 250px); }
.card.live .art, .card.wide .art { aspect-ratio: 16/9; }
.card.live img { object-fit: contain; padding: 14%; }
.card.live .ph { align-items: center; justify-content: center; text-align: center; }
.card .live-dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 0 3px rgba(255,77,77,.25); }
.card .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.25); }
.card .bar i { display: block; height: 100%; background: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(130px, 13vw, 190px), 1fr)); gap: 22px 14px; padding: 8px var(--pad) 60px; }
.grid.live { grid-template-columns: repeat(auto-fill, minmax(clamp(180px, 17vw, 250px), 1fr)); }
.grid .card { width: auto; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px var(--pad) 16px; scrollbar-width: none; scroll-behavior: smooth; }
.chip small { opacity: .6; font-size: 11px; margin-left: 3px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; font-weight: 500; transition: background .2s, color .2s, border-color .2s; }
.chip:hover { border-color: #555; }
.chip.active { background: var(--text); color: #111; border-color: var(--text); }
.empty { padding: 80px var(--pad); text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 20px; margin-bottom: 6px; }

/* ---------- Fiche ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.72); backdrop-filter: blur(6px); overflow-y: auto; padding: 40px 16px; animation: fade .3s ease both; }
.modal-box { position: relative; width: min(900px, 100%); margin: 0 auto; background: var(--bg-2); border-radius: 16px; overflow: hidden; box-shadow: 0 40px 120px rgba(0,0,0,.7); animation: rise .45s cubic-bezier(.2,.8,.2,1) both; }
.modal.closing { animation: fadeOut .24s ease forwards; pointer-events: none; }
.modal.closing .modal-box { animation: sink .24s ease forwards; }
.close { position: absolute; z-index: 5; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.65); }
.close:hover { background: #000; }
.m-hero { position: relative; height: 380px; display: flex; align-items: flex-end; padding: 28px 32px; overflow: hidden; }
.m-hero .hero-art .layer { background-position: center 25%; }
.m-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg-2) 0%, rgb(var(--bg2-rgb) / .88) 12%, rgb(var(--bg2-rgb) / .55) 32%, rgb(var(--bg2-rgb) / .2) 55%, transparent 75%); }
.m-hero > div:last-child { position: relative; z-index: 2; }
.m-hero h2 { font-size: 34px; letter-spacing: -0.02em; margin: 0 0 14px; line-height: 1.05; }
.m-body { padding: 8px 32px 32px; }
.m-body p { color: var(--text-2); margin: 0 0 14px; }
.m-facts { color: var(--muted); font-size: 13px; }
.m-facts b { color: var(--text-2); font-weight: 500; }
.seasons { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 12px; }
.ep { display: flex; gap: 16px; align-items: center; width: 100%; text-align: left; padding: 12px; border-radius: 10px; border-bottom: 1px solid var(--line); }
.ep { transition: background .2s; }
.ep:hover { background: var(--bg-3); }
.ep .n { width: 26px; text-align: center; color: var(--muted); font-size: 18px; flex: 0 0 auto; }
.ep .th { flex: 0 0 auto; width: 130px; aspect-ratio: 16/9; border-radius: 6px; background: var(--bg-3); position: relative; overflow: hidden; }
.ep .th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.eps .ep { animation: itemIn .45s cubic-bezier(.2,.7,.2,1) both; }
.ep .th .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.25); }
.ep .th .bar i { display: block; height: 100%; background: var(--accent); }
.ep .t { font-weight: 600; }
.ep .d { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Lecteur ---------- */
.player { position: fixed; inset: 0; z-index: 80; background: #000; animation: fade .35s ease both; }
.player.closing { animation: fadeOut .32s ease forwards; pointer-events: none; }
.player video { width: 100%; height: 100%; background: #000; opacity: 0; transition: opacity .7s ease; }
.player.ready video { opacity: 1; }
.p-spin { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .3s .15s; }
.player.loading .p-spin { opacity: 1; }
.player:has(#player-msg:not(.hidden)) .p-spin { display: none; }
.player-ui { position: absolute; inset: 0; pointer-events: none; transition: opacity .3s; }
.player.idle .player-ui { opacity: 0; }
.player.idle { cursor: none; }
.player-top { pointer-events: auto; display: flex; align-items: center; gap: 16px; padding: 18px 24px 60px; background: linear-gradient(rgba(0,0,0,.8), transparent); }
.player-title { font-size: 18px; font-weight: 700; }
.zap { margin-left: auto; display: flex; gap: 8px; }
.player-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; pointer-events: none; }
.player-msg > div { max-width: 480px; background: rgb(var(--bg2-rgb) / .9); padding: 22px 26px; border-radius: 14px; border: 1px solid var(--line); }

/* ---------- Divers ---------- */
.loader { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--muted); animation: fade .3s ease both; }
.loader.closing { animation: fadeOut .45s ease forwards; pointer-events: none; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 30px; transform: translate(-50%, 20px); background: var(--text); color: #111; padding: 10px 18px; border-radius: 999px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(28px) scale(.985); } }
@keyframes sink { to { opacity: 0; transform: translateY(18px) scale(.985); } }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes itemIn { from { opacity: 0; transform: translateY(12px); } }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 820px) {
  .nav { gap: 14px; height: auto; flex-wrap: wrap; padding-top: 12px; padding-bottom: 8px; }
  .links { order: 3; width: 100%; overflow-x: auto; gap: 18px; white-space: nowrap; }
  .search input { width: 110px; }
  .hero-poster { display: none; }
  .page { padding-top: 120px; }
  .m-hero { height: 280px; padding: 20px; }
  .m-body { padding: 8px 20px 24px; }
  .ep .th { width: 96px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- TV en direct ---------- */
.live-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.live-head h1 { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pulse { width: 11px; height: 11px; border-radius: 50%; background: #ff4d4d; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,77,77,.6); } 100% { box-shadow: 0 0 0 12px rgba(255,77,77,0); } }
.mych h3 { margin: 0 0 4px; padding: 0 var(--pad); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.logo-btn { flex: 0 0 auto; width: 104px; height: 68px; border-radius: 12px; position: relative; overflow: hidden; border: 1px solid var(--line); transition: transform .15s, border-color .15s; }
.logo-btn:hover { transform: translateY(-3px); border-color: var(--accent); }
.logo-btn span { position: absolute; inset: 0; display: grid; place-items: center; padding: 6px; font-size: 12px; font-weight: 700; line-height: 1.1; }
.logo-btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12px; background: var(--tile); }
.grid.tiles { grid-template-columns: repeat(auto-fill, minmax(clamp(220px, 21vw, 300px), 1fr)); gap: 26px 16px; }
.tile { cursor: pointer; border-radius: 12px; outline: none; min-width: 0; }
.tile-art { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,.4); transition: transform .2s, box-shadow .2s; }
.tile:hover .tile-art, .tile:focus-visible .tile-art { transform: scale(1.03); box-shadow: 0 0 0 2px var(--accent), 0 14px 40px rgba(0,0,0,.6); }
.tile-art .ph { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 14px; font-weight: 800; font-size: 19px; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.tile-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 13% 22%; background: radial-gradient(circle at 50% 40%, var(--bg-3), var(--bg-2)); }
.tile-live { position: absolute; top: 10px; left: 10px; background: #e53935; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; }
.tile-fav { position: absolute; z-index: 2; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 15px; opacity: 0; transition: opacity .15s; }
.tile:hover .tile-fav, .tile-fav.on, .tile-fav:focus-visible { opacity: 1; }
.tile-fav.on { color: var(--accent); }
.tile-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.35); opacity: 0; transition: opacity .2s; pointer-events: none; }
.tile-play svg { width: 46px; height: 46px; fill: #fff; background: rgba(0,0,0,.55); border-radius: 50%; padding: 11px 9px 11px 13px; }
.tile:hover .tile-play { opacity: 1; }
.bar { height: 4px; background: rgba(255,255,255,.22); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.tile-art .bar { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 0; }
.tile-body { padding: 10px 2px 0; min-width: 0; }
.tile-ch { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .e-now { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.no-epg .e-now { color: var(--muted); font-weight: 500; font-size: 13px; }
.tile .e-time, .tile .e-next { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.live-info.swap { animation: textUp .45s cubic-bezier(.2,.7,.2,1); }
.live-info { position: absolute; left: 24px; bottom: 104px; display: flex; gap: 16px; align-items: center; max-width: min(560px, 70vw); padding: 14px 18px; border-radius: 14px; background: rgb(var(--bg2-rgb) / .78); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.08); }
.li-logo { flex: 0 0 auto; width: 84px; height: 56px; border-radius: 9px; position: relative; overflow: hidden; }
.li-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8px; background: var(--tile); }
.live-info > div:last-child { min-width: 0; }
.li-ch { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.live-info .e-now { font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); margin: 3px 0; }
.li-row .bar { flex: 1; min-width: 120px; }
.live-info .e-next { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chan-panel { position: absolute; top: 0; right: 0; bottom: 96px; width: min(360px, 86vw); display: flex; flex-direction: column; background: rgb(var(--bg2-rgb) / .9); backdrop-filter: blur(16px); border-left: 1px solid rgba(255,255,255,.08); border-bottom-left-radius: 14px; pointer-events: auto; transform: translateX(100%); transition: transform .25s; }
.player.panel .chan-panel { transform: none; }
.player.panel .zap { margin-right: min(360px, 86vw); }
.chan-head { padding: 84px 18px 10px; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
#chan-list { overflow-y: auto; padding: 0 8px 12px; }
.chan { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 9px 10px; border-radius: 10px; }
.chan:hover { background: rgba(255,255,255,.08); }
.chan.cur { background: rgb(var(--accent-rgb) / .16); box-shadow: inset 3px 0 0 var(--accent); }
.chan-logo { flex: 0 0 auto; width: 62px; height: 42px; border-radius: 7px; position: relative; overflow: hidden; }
.chan-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6px; background: var(--tile); }
.chan-txt { min-width: 0; flex: 1; display: grid; gap: 3px; }
.chan-txt b, .chan-txt .e-now { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chan-txt b { font-size: 14px; }
.chan-txt .e-now { font-size: 12.5px; color: var(--muted); }
.chan-txt .bar { height: 3px; }

/* ---------- Commandes du direct (remplacent la barre du navigateur) ---------- */
.live-ctl { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 24px 14px; pointer-events: auto; background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.lc-seek { position: relative; padding: 9px 0; cursor: pointer; touch-action: none; }
.lc-track { position: relative; height: 4px; border-radius: 4px; background: rgba(255,255,255,.25); transition: height .12s, margin .12s; }
.lc-seek:hover .lc-track, .lc-seek.drag .lc-track { height: 6px; margin: -1px 0; }
#lc-fill { display: block; height: 100%; width: 100%; border-radius: 4px; background: #e53935; }
#lc-thumb { position: absolute; top: 50%; left: 100%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #e53935; box-shadow: 0 0 0 3px rgba(229,57,53,.3); transition: transform .12s; }
.lc-seek:hover #lc-thumb, .lc-seek.drag #lc-thumb { transform: scale(1.25); }
/* En retard sur le direct : la barre passe en blanc, le rouge est réservé au « vrai » direct */
.live-ctl.behind #lc-fill, .live-ctl.behind #lc-thumb { background: var(--text); }
.live-ctl.behind #lc-thumb { box-shadow: 0 0 0 3px rgba(255,255,255,.2); }
.lc-tip { position: absolute; bottom: 24px; transform: translateX(-50%); padding: 3px 8px; border-radius: 6px; background: rgb(var(--bg2-rgb) / .92); border: 1px solid rgba(255,255,255,.1); font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; }
.lc-seek:hover .lc-tip, .lc-seek.drag .lc-tip { opacity: 1; }
.lc-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.lc-space { flex: 1; }
.lc-live { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; transition: background .15s; }
.lc-live:hover { background: rgba(255,255,255,.22); }
.lc-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.lc-live.on { background: rgba(229,57,53,.2); cursor: default; }
.lc-live.on i { background: #ff4d4d; animation: pulse 1.6s infinite; }
.lc-time { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text-2); }
.lc-vol { width: 90px; accent-color: var(--text); cursor: pointer; }
@media (max-width: 820px) { .lc-vol { display: none; } .live-ctl { padding: 24px 14px 10px; } }

/* ---------- Transitions de page ---------- */
#main.enter > * { animation: viewIn .5s cubic-bezier(.2,.7,.2,1) both; }
#main:not(.still) .grid > .card, #main:not(.still) .grid > .tile, #main:not(.still) .rows > .row { animation: itemIn .55s cubic-bezier(.2,.7,.2,1) both; }
#app { animation: fade .5s ease both; }
.toast { transition: opacity .3s, transform .35s cubic-bezier(.2,.8,.2,1); }
/* Bords des rangées en fondu : les affiches disparaissent en douceur au lieu d'être coupées net */
/* Fondu des affiches sur les bords : seulement du côté où la rangée continue, et il glisse en douceur */
@property --fl { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --fr { syntax: '<length>'; inherits: false; initial-value: 0px; }
.row > .strip { --fl: 0px; --fr: 0px; -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,.6) calc(var(--fl) * .4), #000 var(--fl), #000 calc(100% - var(--fr)), rgba(0,0,0,.6) calc(100% - var(--fr) * .4), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, rgba(0,0,0,.6) calc(var(--fl) * .4), #000 var(--fl), #000 calc(100% - var(--fr)), rgba(0,0,0,.6) calc(100% - var(--fr) * .4), transparent 100%); transition: --fl .35s ease, --fr .35s ease; }
.row.can-l > .strip { --fl: calc(var(--pad) + 28px); }
.row.can-r > .strip { --fr: calc(var(--pad) + 28px); }
.catbar .chips { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--pad), #000 calc(100% - var(--pad)), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 var(--pad), #000 calc(100% - var(--pad)), transparent 100%); }

/* ---------- Filtres (collants sous la barre de navigation) ---------- */
.filters { position: sticky; top: calc(var(--nav-h, 68px) - 1px); z-index: 20; padding-top: 6px; margin-bottom: 6px; background: linear-gradient(var(--bg) 0%, var(--bg) 78%, rgb(var(--bg-rgb) / 0)); }
.filters:empty { display: none; }
.sec-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.sec-head h1 { margin-bottom: 10px; }
.catbar { position: relative; display: flex; align-items: center; gap: 0; padding-left: var(--pad); }
.catbar .chips { flex: 1; min-width: 0; padding: 2px var(--pad) 12px 18px; }
.catbar .cat-open { margin-bottom: 10px; background: var(--bg-2); border-color: var(--line); font-weight: 600; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catbar .cat-open.has { border-color: var(--accent); color: var(--accent); }
.catpop { position: absolute; z-index: 25; top: calc(100% - 4px); left: var(--pad); width: min(440px, calc(100vw - 2 * var(--pad))); max-height: min(62vh, 560px); display: flex; flex-direction: column; gap: 8px; padding: 12px; background: rgb(var(--bg2-rgb) / .97); backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: popIn .22s cubic-bezier(.2,.8,.2,1) both; transform-origin: top left; }
.catpop.closing { animation: popOut .16s ease forwards; }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@keyframes popOut { to { opacity: 0; transform: translateY(-6px) scale(.98); } }
.catpop-list { overflow-y: auto; display: grid; gap: 2px; padding-right: 4px; }
.catpop-list button { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--text-2); transition: background .15s; }
.catpop-list button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catpop-list button small { color: var(--muted); font-variant-numeric: tabular-nums; }
.catpop-list button:hover { background: rgba(255,255,255,.07); }
.catpop-list button[hidden] { display: none; }
.catpop-list button.active { background: rgb(var(--accent-rgb) / .14); color: var(--accent); }
.catpop-none { margin: 4px 6px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 var(--pad) 14px; }
.field { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; transition: border-color .2s, background .2s; }
.field:focus-within { border-color: var(--accent); background: var(--bg-deep); }
.field svg { width: 16px; height: 16px; fill: var(--muted); flex: 0 0 auto; }
.field input { flex: 1; min-width: 0; background: none; border: 0; outline: none; padding: 9px 0; color: var(--text); }
.field.grow { flex: 1 1 240px; max-width: 420px; }
.field-x { color: var(--muted); font-size: 12px; padding: 4px; }
.field-x:hover { color: var(--text); }
.sel { display: flex; align-items: center; gap: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 0 4px 0 12px; font-size: 13px; color: var(--muted); }
.sel:focus-within { border-color: var(--accent); }
.sel select { appearance: none; -webkit-appearance: none; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%239a98a6' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 4px center / 18px; border: 0; outline: none; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; padding: 9px 26px 9px 0; cursor: pointer; }
.sel select option { background: var(--bg-2); color: var(--text); }
.toolbar .chip { padding: 8px 14px; }
.link { color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; padding: 6px 4px; }
.link:hover { color: var(--accent); }
.cat-hits { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 var(--pad) 16px; font-size: 13px; }

/* ---------- Squelettes de chargement (fiche) ---------- */
.ep-skel, .txt-skel { display: grid; gap: 10px; margin-top: 20px; }
.ep-skel i, .txt-skel i { display: block; height: 72px; border-radius: 10px; background: linear-gradient(90deg, var(--bg-3) 0%, var(--line) 50%, var(--bg-3) 100%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
.txt-skel { margin: 0 0 14px; gap: 8px; }
.txt-skel i { height: 13px; border-radius: 6px; }
.txt-skel i:last-child { width: 60%; }
.m-body .meta, .m-body > p, .m-facts { animation: fade .5s ease both; }

@media (max-width: 820px) {
  .search input, .search:focus-within input { width: 110px; }
  .field.grow { flex-basis: 100%; max-width: none; }
  .catbar .cat-open { max-width: 150px; }
}
@media (prefers-reduced-motion: reduce) { .hero-art .layer.img, .card img, .player video { transition: none !important; } }

/* ---------- Téléchargements ---------- */
.ep-dl { margin-left: auto; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; transition: background .2s, color .2s; }
.ep-dl:hover { background: rgba(255,255,255,.12); color: var(--text); }
.ep-dl svg, .chip svg { width: 20px; height: 20px; fill: currentColor; flex: 0 0 auto; }
.ep-dl.on, .ep-dl.done, .btn.done { color: var(--accent); }
.ep-dl.err, .btn.err { color: #ff8a7a; }
.chip.dl-season { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.chip.dl-season svg { width: 16px; height: 16px; }
.dl-note { padding: 0 var(--pad); margin: -6px 0 10px; overflow-wrap: anywhere; }
.dls { padding: 0 var(--pad) 60px; max-width: 1100px; }
.dl { display: flex; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.dl .th { flex: 0 0 auto; width: 64px; aspect-ratio: 2/3; border-radius: 6px; position: relative; overflow: hidden; }
.dl .th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dl-main { flex: 1; min-width: 0; display: grid; gap: 8px; }
.dl-main .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-info { color: var(--muted); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.dl.error .dl-info { color: #ff8a7a; }
.dl.paused .bar i, .dl.queued .bar i { background: var(--muted); }
.dl-act { display: flex; gap: 8px; flex: 0 0 auto; }
.dl-act .btn { padding: 8px 14px; font-size: 13px; }
@media (max-width: 640px) { .dl { flex-wrap: wrap; } .dl-main { flex-basis: calc(100% - 80px); } .dl-act { width: 100%; } }

/* Acteurs cliquables (fiche) et page filmographie */
.person { display: inline; padding: 0; color: var(--text-2); font: inherit; text-decoration: underline dotted rgba(255,255,255,.35); text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.person:hover { color: var(--accent); text-decoration-color: currentColor; }
.person-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.person-head h1 { margin: 0; }
.person-head .btn { align-self: center; }
.person-head p { flex-basis: 100%; margin: 0 0 10px; }
.person-wait { animation: pulseTxt 1.4s ease-in-out infinite alternate; }
@keyframes pulseTxt { from { opacity: .45; } to { opacity: 1; } }
.page > .ep-skel { margin: 0 var(--pad); }

/* Menus déroulants (Trier, Année) : même style que le panneau des catégories */
.dd { position: relative; }
.dd-btn { cursor: pointer; padding: 0 8px 0 12px; height: 37px; transition: border-color .2s, background .2s; }
.dd-btn:hover { border-color: #555; }
.dd-btn.open { border-color: var(--accent); background: var(--bg-deep); }
.dd-btn b { color: var(--text); font-weight: 600; }
.dd-btn svg { width: 18px; height: 18px; fill: var(--muted); transition: transform .2s; }
.dd-btn.open svg { transform: rotate(180deg); fill: var(--accent); }
.dd-menu { position: absolute; z-index: 25; top: calc(100% + 6px); left: 0; min-width: 100%; width: max-content; max-height: min(50vh, 380px); overflow-y: auto; display: grid; gap: 2px; padding: 6px; background: rgb(var(--bg2-rgb) / .97); backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.6); animation: popIn .2s cubic-bezier(.2,.8,.2,1) both; transform-origin: top left; }
.dd-menu.closing { animation: popOut .16s ease forwards; }
.dd-menu button { display: flex; align-items: center; justify-content: space-between; gap: 18px; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--text-2); font-size: 13px; white-space: nowrap; transition: background .15s; }
.dd-menu button:hover { background: rgba(255,255,255,.07); }
.dd-menu button.active { background: rgb(var(--accent-rgb) / .14); color: var(--accent); }
.dd-menu button svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Choix de la langue audio et des sous-titres ---------- */
#trk-btn { margin-left: auto; padding: 9px 16px; font-size: 14px; }
#trk-btn + .zap { margin-left: 0; }
.trk { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); animation: fade .2s ease both; }
.trk.closing { animation: fadeOut .16s ease forwards; pointer-events: none; }
.trk-box { width: min(440px, 100%); max-height: min(82vh, 640px); overflow-y: auto; padding: 22px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 90px rgba(0,0,0,.7); }
.trk-box h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.01em; }
.trk-box p { margin: 0; }
.trk-h { margin: 18px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.trk-list { display: grid; gap: 2px; }
.trk-list button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--text-2); transition: background .15s; }
.trk-list button span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.trk-list button small { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.trk-list button svg { margin-left: auto; flex: 0 0 auto; width: 18px; height: 18px; fill: currentColor; }
.trk-list button:hover { background: rgba(255,255,255,.07); }
.trk-list button.active { background: rgb(var(--accent-rgb) / .14); color: var(--accent); }
.trk-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
video::cue { background: rgba(0,0,0,.6); }

/* ---------- Versions d'un titre (VF, VOSTFR…) ---------- */
.vers { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.vers > .muted { font-size: 13px; margin-right: 4px; }

/* ---------- Avertissement : fichier incomplet chez le fournisseur ---------- */
.warn { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; background: rgba(255,138,122,.1); border: 1px solid rgba(255,138,122,.35); color: #ffcfc8; font-size: 14px; line-height: 1.45; }
.warn b { display: block; color: #ff8a7a; margin-bottom: 2px; }

/* Film lu dans une autre langue : même barre que le direct, sans le bouton « direct » */
.live-ctl.vod #lc-live { display: none; }

/* ---------- Sauts de ±10 s ---------- */
.lc-skip svg { width: 24px; height: 24px; }
.lc-skip text { font: 800 7px/1 system-ui, sans-serif; fill: currentColor; }
/* Double tape au doigt : pas de zoom ni de délai du navigateur sur l'image */
.player video { touch-action: manipulation; }
.p-skip { position: absolute; top: 50%; z-index: 1; width: 112px; height: 112px; margin-top: -56px; border-radius: 50%; display: grid; place-items: center; align-content: center; gap: 2px; background: rgba(0,0,0,.45); pointer-events: none; opacity: 0; transition: opacity .35s; }
.p-skip.l { left: 12%; }
.p-skip.r { right: 12%; }
.p-skip svg { width: 30px; height: 30px; fill: #fff; }
.p-skip b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.p-skip.on { opacity: 1; transition: none; animation: skipPop .3s ease; }
@keyframes skipPop { from { transform: scale(.82); } to { transform: none; } }
@media (max-width: 820px) { .p-skip { width: 92px; height: 92px; margin-top: -46px; } .p-skip.l { left: 7%; } .p-skip.r { right: 7%; } }
@media (prefers-reduced-motion: reduce) { .p-skip.on { animation: none; } }

/* ---------- Recommandations : avis sur la fiche, « % pour vous », titres similaires ---------- */
.rate { display: inline-flex; gap: 6px; }
.rate-btn { width: 46px; height: 46px; padding: 0; border-radius: 50%; }
.rate-btn svg { width: 21px; height: 21px; transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.rate-btn:hover svg { transform: scale(1.12); }
/* (plus précis que les boutons des thèmes : l'avis choisi doit se voir quel que soit le thème) */
html[data-theme] .btn.rate-btn { padding: 0; }
html[data-theme] .btn.rate-btn.on, html[data-theme] .btn.rate-btn.on:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); text-shadow: none; }
.rate-btn.on svg { animation: ratePop .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes ratePop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.meta .match { color: #46d369; font-weight: 700; }
.m-similar { --pad: 32px; padding-bottom: 12px; }
.m-similar .row { margin-bottom: 8px; }
.m-similar .card { width: clamp(118px, 15vw, 150px); }
@media (max-width: 820px) { .m-similar { --pad: 20px; } .rate-btn { width: 42px; height: 42px; } }

/* Avis à la fin d'un film */
.ratepop-box { width: min(520px, 100%); }
.rp-head { display: flex; align-items: center; gap: 16px; }
.rp-head .trk-h { margin-top: 0; }
.rp-art { position: relative; flex: none; width: 62px; aspect-ratio: 2/3; border-radius: 8px; overflow: hidden; background: var(--bg-3); }
.rp-art img { width: 100%; height: 100%; object-fit: cover; }
.rp-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 22px; }
.rp-btn { display: grid; justify-items: center; gap: 9px; padding: 16px 6px 13px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line); color: var(--text-2); font-size: 13px; font-weight: 600; transition: background .15s, border-color .15s, color .15s; }
.rp-btn svg { width: 28px; height: 28px; fill: currentColor; transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
.rp-btn:hover, .rp-btn.tv-focus { border-color: var(--accent); color: var(--text); }
.rp-btn:hover svg, .rp-btn.tv-focus svg { transform: scale(1.15); }
@media (max-width: 460px) { .rp-list { grid-template-columns: repeat(2, 1fr); } }

