:root {
  --bg: #141414; --panel: #181818; --card: #2f2f2f; --text: #fff; --muted: #b3b3b3; --dim: #777;
  --red: #e1182d; --green: #46d369; --gold: #f5c518;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif; }
body { overflow-x: hidden; }
body.lock { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
:focus { outline: none; }
.splash { display: grid; place-items: center; height: 100vh; color: var(--muted); font-size: 20px; }

/* ── Barre de navigation ── */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: 68px; padding: 0 4%; display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, rgba(0,0,0,.8), rgba(0,0,0,0)); transition: background .3s; }
.nav.solid { background: var(--bg); }
.nav-l, .nav-r { display: flex; align-items: center; gap: 6px; }
.logo { font-weight: 900; font-size: 28px; letter-spacing: 1.5px; color: var(--red); margin-right: 22px; }
.nav nav { display: flex; gap: 4px; }
.nav nav button { padding: 8px 14px; border-radius: 999px; font-size: 14px; color: #e5e5e5; transition: background .2s, color .2s; }
.nav nav button:hover { color: var(--muted); }
.nav nav button.on { background: rgba(255,255,255,.14); color: #fff; font-weight: 700; }
.nav nav button:focus { box-shadow: 0 0 0 2px #fff; }
.nav nav .quizlink { margin-left: 10px; font-weight: 700; color: #fff; background: linear-gradient(90deg, rgba(225,24,45,.55), rgba(255,160,0,.45)); }
.ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; }
.ico:hover, .ico:focus { background: rgba(255,255,255,.14); }
.sbox { display: flex; align-items: center; border: 1px solid transparent; border-radius: 4px; }
.sbox.open { background: rgba(0,0,0,.8); border-color: #fff; }
.sbox input { width: 0; padding: 0; border: 0; background: none; color: #fff; font: inherit; font-size: 14px; transition: width .25s; }
.sbox.open input { width: 240px; padding: 8px 10px 8px 0; }
.avatar { width: 34px; height: 34px; border-radius: 4px; background: linear-gradient(135deg, #3a7bd5, #7b4397); display: grid; place-items: center; font-size: 20px; margin-left: 8px; }
.pill { font-size: 12px; background: rgba(255,255,255,.12); color: #ddd; padding: 6px 12px; border-radius: 999px; }

/* ── Billboard ── */
.hero { position: relative; height: min(86vh, 820px); min-height: 520px; overflow: hidden; }
.hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center 20%; }
.hero::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(77deg, rgba(0,0,0,.85) 0, rgba(0,0,0,0) 80%), linear-gradient(0deg, var(--bg) 0, rgba(20,20,20,0) 38%); }
.hero-in { position: absolute; z-index: 2; left: 4%; bottom: 26%; width: min(46%, 640px); display: grid; gap: 14px; }
.hero h1 { margin: 0; font-size: clamp(34px, 4.6vw, 72px); line-height: 1.02; font-weight: 900; text-shadow: 2px 4px 14px rgba(0,0,0,.6); }
.hero-meta, .dm-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; color: #d2d2d2; font-size: 16px; }
.match { color: var(--green); font-weight: 700; }
.cert { border: 1px solid rgba(255,255,255,.45); padding: 0 6px; font-size: 13px; color: #ddd; }
.reasons { display: flex; gap: 8px; flex-wrap: wrap; }
.reasons span { font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.14); }
.hero p { margin: 0; font-size: 18px; line-height: 1.4; text-shadow: 1px 2px 6px rgba(0,0,0,.7); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-act { display: flex; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.herocert { position: absolute; z-index: 2; right: 0; bottom: 28%; background: rgba(51,51,51,.6); border-left: 3px solid #dcdcdc; padding: 9px 44px 9px 14px; font-size: 18px; }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 10px 28px; border-radius: 4px; font-size: 19px; font-weight: 700; background: rgba(109,109,110,.7); color: #fff; text-decoration: none; transition: transform .15s, background .15s; }
.btn:hover { background: rgba(109,109,110,.4); }
.btn.light { background: #fff; color: #000; } .btn.light:hover { background: rgba(255,255,255,.75); }
.btn.red { background: var(--red); } .btn.red:hover { background: #f1344a; }
.btn:focus { outline: none; } .btn:focus-visible { box-shadow: 0 0 0 2px #fff; transform: scale(1.05); }
.btn.sm { padding: 8px 18px; font-size: 15px; }
.circ { width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); background: rgba(42,42,42,.6); font-size: 18px; display: grid; place-items: center; transition: border-color .15s, transform .15s; }
.circ:hover { border-color: #fff; } .circ:focus { border-color: #fff; box-shadow: 0 0 0 2px #fff; transform: scale(1.1); }

/* ── Rangées ── */
.rows { position: relative; z-index: 3; margin-top: -9vw; padding-bottom: 80px; }
.rows.flat { margin-top: 0; padding-top: 90px; }
.shelf h2 { margin: 0 4% 0; font-size: clamp(17px, 1.45vw, 23px); font-weight: 700; color: #e5e5e5; }
.rw { position: relative; }
.row { display: flex; gap: 6px; overflow-x: auto; padding: 26px 4% 46px; scroll-behavior: smooth; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.arr { position: absolute; top: 26px; bottom: 46px; width: 4%; z-index: 6; background: rgba(20,20,20,.5); font-size: 42px; opacity: 0; transition: opacity .2s; }
.arr.l { left: 0; } .arr.r { right: 0; }
.rw:hover .arr { opacity: 1; } .arr:hover { background: rgba(20,20,20,.75); }
.card { position: relative; flex: 0 0 auto; width: clamp(130px, 13.2vw, 220px); aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: var(--card); padding: 0; text-align: left;
  transition: transform .25s ease .08s, box-shadow .2s; }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card:hover, .card:focus { transform: scale(1.16); z-index: 5; box-shadow: 0 0 0 2px #fff, 0 16px 44px rgba(0,0,0,.85); }
.card .ov { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 10px 10px; background: linear-gradient(0deg, rgba(0,0,0,.95), rgba(0,0,0,0)); opacity: 0; transition: opacity .2s; display: grid; gap: 4px; }
.card:hover .ov, .card:focus .ov { opacity: 1; }
.card .ov b { font-size: 13px; line-height: 1.2; }
.card .mm { display: flex; gap: 8px; font-size: 12px; color: #d2d2d2; }
.tag { position: absolute; top: 6px; left: 6px; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 3px; background: rgba(0,0,0,.72); }
.tag.rated { color: var(--gold); }
.bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.25); }
.bar i { display: block; height: 100%; background: var(--red); }
.t10 { display: flex; align-items: flex-end; flex: 0 0 auto; }
.t10 .num { font-size: clamp(110px, 14vw, 200px); font-weight: 900; line-height: .78; color: var(--bg); -webkit-text-stroke: 3px #6d6d6e; letter-spacing: -.1em; margin-right: -.1em; position: relative; z-index: 1; }
.t10 .card { width: clamp(100px, 9.6vw, 160px); }
.promo { margin: 22px 4% 0; padding: 22px 28px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  background: linear-gradient(90deg, #4a0d17, #1f2233); }
.promo b { display: block; font-size: 22px; margin-bottom: 4px; } .promo span { color: #d0d0d8; }

/* ── Grilles (Ma liste, Mes notes, Recherche) ── */
.grid-view { padding: 100px 4% 60px; }
.grid-view h2 { font-size: 30px; margin: 0 0 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, clamp(130px, 13.2vw, 220px)); gap: 40px 8px; }
.grid .card { width: 100%; }
.empty { color: var(--muted); padding: 40px 0; font-size: 18px; }
.tabs { display: flex; gap: 8px; margin-bottom: 26px; }
.tabs button { padding: 8px 18px; border-radius: 999px; background: #2a2a2a; font-weight: 700; }
.tabs button.on { background: #fff; color: #000; }

/* ── Fenêtres ── */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.72); overflow-y: auto; display: flex; justify-content: center; align-items: flex-start; padding: 2.2em 0; animation: fade .2s; }
.modal.center { align-items: center; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { position: relative; width: min(850px, 94vw); background: var(--panel); border-radius: 8px; box-shadow: 0 6px 60px rgba(0,0,0,.9); overflow: hidden; margin: auto 0; }
.sheet.dm { margin: 0; }
.x { position: absolute; top: 14px; right: 14px; z-index: 8; width: 36px; height: 36px; border-radius: 50%; background: var(--panel); font-size: 16px; }
.x:focus, .x:hover { box-shadow: 0 0 0 2px #fff; }

.dm-hero { position: relative; aspect-ratio: 16 / 9; }
.dm-hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.dm-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--panel) 0, rgba(24,24,24,0) 55%); }
.dm-in { position: absolute; z-index: 2; left: 48px; right: 48px; bottom: 30px; }
.dm-in h1 { margin: 0 0 18px; font-size: clamp(30px, 4vw, 50px); line-height: 1.02; font-weight: 900; text-shadow: 2px 3px 12px rgba(0,0,0,.6); }
.dm-act { display: flex; gap: 10px; align-items: center; }
.dm-body { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; padding: 0 48px 24px; }
.dm-meta { margin-bottom: 14px; }
.dm-body .syn { margin: 0 0 16px; font-size: 16px; line-height: 1.5; }
.dm-r { font-size: 14px; display: grid; gap: 12px; align-content: start; line-height: 1.5; }
.dm-r .k { color: var(--dim); }
.yours { background: #222; border-radius: 8px; padding: 14px 18px; display: grid; gap: 12px; }
.yours .yl { font-size: 13px; color: var(--muted); font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.stars { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.star { font-size: 30px; line-height: 1; padding: 0 1px; color: #4a4a4a; transition: transform .1s, color .1s; }
.star.on { color: var(--gold); }
.star:hover, .star:focus { transform: scale(1.25); }
.star:focus { filter: drop-shadow(0 0 6px #fff); }
.stars.big .star { font-size: 46px; padding: 0 2px; }
.sval { margin-left: 12px; font-size: 14px; color: var(--muted); min-width: 170px; }
.seg { display: inline-flex; border-radius: 999px; background: #333; padding: 3px; width: fit-content; }
.seg button { padding: 7px 18px; border-radius: 999px; font-weight: 700; color: #bbb; }
.seg button.on { background: #fff; color: #000; }
.seg button:focus { box-shadow: 0 0 0 2px var(--red); }
.link { color: var(--muted); text-decoration: underline; font-size: 13px; padding: 4px 6px; }
.dm-more { padding: 0 48px 44px; }
.dm-more h3 { font-size: 24px; margin: 26px 0 14px; }
.grid.sim { grid-template-columns: repeat(4, 1fr); gap: 34px 12px; }
.scores { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.score { background: #2a2a2a; border-radius: 8px; padding: 8px 14px; display: grid; }
.score b { font-size: 20px; } .score span { font-size: 11px; color: var(--muted); font-weight: 700; }
.facts { display: grid; gap: 6px; font-size: 14px; } .facts .k { color: var(--dim); }
.cast { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.person { width: 92px; display: grid; justify-items: center; text-align: center; gap: 3px; }
.person .ph { position: relative; width: 78px; height: 78px; border-radius: 50%; overflow: hidden; background: linear-gradient(160deg, #3b3b5c, #1c1c2e); display: grid; place-items: center; font-weight: 800; color: #fff9; }
.person .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.person b { font-size: 12px; line-height: 1.2; } .person small { font-size: 11px; color: var(--muted); line-height: 1.2; }
.kws { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.kws span { font-size: 12px; color: var(--muted); background: #2a2a2a; padding: 4px 10px; border-radius: 999px; }

/* Après visionnage */
.sheet.rp { width: min(780px, 94vw); padding: 44px 40px; text-align: center; }
.rp h2 { margin: 0 0 6px; font-size: 32px; } .rp p { margin: 0 0 22px; color: var(--muted); }
.rp .stars { justify-content: center; } .rp .sval { width: 100%; text-align: center; margin: 12px 0 0; }
.rp .actions { margin-top: 22px; display: flex; justify-content: center; gap: 10px; }

/* Quiz « Affiner mon profil » */
.sheet.qz { width: min(940px, 94vw); }
.qhead { display: flex; align-items: center; gap: 16px; padding: 16px 24px; background: #0e0e0e; }
.qbar { flex: 0 0 240px; height: 8px; border-radius: 99px; background: #333; overflow: hidden; }
.qbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), #ff9d00); transition: width .4s; }
.qhead span { flex: 1; color: var(--muted); font-size: 14px; }
.qbody { display: grid; grid-template-columns: 250px 1fr; gap: 30px; padding: 30px; min-height: 420px; }
.qbody img { width: 250px; border-radius: 6px; box-shadow: 0 10px 40px #000a; background: #2a2a2a; aspect-ratio: 2/3; object-fit: cover; }
.qq small { color: var(--red); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.qq h2 { margin: 6px 0 8px; font-size: 32px; line-height: 1.12; }
.qq .meta { color: var(--muted); margin-bottom: 10px; }
.qq p { color: #ddd; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.qa { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.qq .stars { margin-top: 18px; }
.qhint { color: var(--dim); font-size: 13px; margin-top: 18px; }
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 34px 30px 10px; }
.duelq { padding: 28px 30px 0; font-size: 30px; font-weight: 800; text-align: center; }
.tile { border-radius: 12px; padding: 54px 20px; font-size: 30px; font-weight: 800; background: linear-gradient(135deg, #2c2c40, #1a1a26); display: grid; gap: 10px; place-items: center; transition: transform .15s, box-shadow .15s; }
.tile .e { font-size: 64px; }
.tile:hover, .tile:focus { transform: scale(1.04); box-shadow: 0 0 0 2px #fff; }
.qfoot { text-align: center; padding: 14px 0 28px; }

/* Réglages / bande-annonce */
.sheet.settings { width: min(560px, 94vw); padding: 34px; display: grid; gap: 12px; }
.settings h2 { margin: 0; }
.settings label { display: grid; gap: 4px; font-weight: 700; font-size: 14px; color: var(--muted); }
.settings input { padding: 12px 14px; border-radius: 6px; border: 1px solid #555; background: #333; color: #fff; font: inherit; }
.settings input:focus { border-color: #fff; }
.err { color: #ff8a9d; font-weight: 700; min-height: 1.2em; }
.settings .actions, .trailer .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sheet.trailer { width: min(1000px, 94vw); padding: 24px; display: grid; gap: 12px; }
.ratio { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.ratio iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hint { color: var(--muted); font-size: 13px; margin: 0; }

/* Lecteur */
.player { position: fixed; inset: 0; z-index: 80; background: #000; display: grid; }
.player video { width: 100%; height: 100%; background: #000; }
.player .close, .player .compatbtn, .player .fsbtn { position: absolute; top: 18px; z-index: 2; background: rgba(0,0,0,.65); padding: 10px 16px; border-radius: 999px; font-weight: 700; opacity: 0; transition: opacity .2s; }
.player .close { left: 22px; } .player .fsbtn { right: 22px; } .player .compatbtn { right: 170px; }
.player:hover .close, .player:hover .compatbtn, .player:hover .fsbtn, .player .close:focus, .player .compatbtn:focus, .player .fsbtn:focus { opacity: 1; }
.player .perr { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 40px; color: var(--muted); font-size: 18px; }
.perr code { background: rgba(255,255,255,.12); padding: 2px 8px; border-radius: 6px; }
.cbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 18px 24px; background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.8)); }
.cbar[hidden] { display: none; }
.cbar button { background: rgba(255,255,255,.18); padding: 8px 14px; border-radius: 6px; font-weight: 700; }
.cbar button:hover { background: #fff; color: #111; }
.cbar .cprog { flex: 1; accent-color: var(--red); }
.ctime { font-variant-numeric: tabular-nums; min-width: 110px; text-align: right; }

.toast { position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%); z-index: 90; background: #fff; color: #111; padding: 13px 24px; border-radius: 4px; font-weight: 700; box-shadow: 0 12px 40px rgba(0,0,0,.7); }

.kicker { font-size: 14px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: #ffb74d; }
.profile { padding: 96px 0 60px; }
.profile > h2 { margin: 0 4% 18px; font-size: 34px; }
.pmeter { margin: 0 4% 22px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pmeter .qbar { flex: 0 0 300px; }
.tiles { margin: 0 4% 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile2 { background: #1f1f1f; border-radius: 10px; padding: 16px 18px; display: grid; gap: 4px; }
.tile2 b { font-size: 28px; } .tile2 span { color: var(--muted); font-size: 13px; }
.pgrid { margin: 0 4%; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.psec { background: #1a1a1a; border-radius: 10px; padding: 16px 18px; }
.psec.wide { margin: 14px 4% 0; }
.psec h3 { margin: 0 0 10px; font-size: 18px; }
.pl { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--dim); margin: 10px 0 4px; font-weight: 700; }
.pbar { display: grid; grid-template-columns: 130px 1fr 26px; align-items: center; gap: 8px; margin: 4px 0; font-size: 13px; }
.pbar .pk { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar i { display: block; height: 8px; border-radius: 99px; background: #2c2c2c; position: relative; overflow: hidden; }
.pbar i::after { content: ""; position: absolute; inset: 0; width: var(--w); border-radius: 99px; background: var(--green); }
.pbar.avoid i::after { background: var(--red); }
.pbar .pn { color: var(--dim); text-align: right; }
.hist { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.hcol { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); }
.hcol i { width: 100%; background: var(--gold); border-radius: 3px 3px 0 0; min-height: 2px; }
.gchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gchip { padding: 8px 14px; border-radius: 999px; background: #2a2a2a; font-weight: 600; font-size: 14px; border: 2px solid transparent; }
.gchip small { font-weight: 700; margin-left: 4px; }
.gchip.love { background: #12331c; border-color: var(--green); }
.gchip.avoid { background: #3a1217; border-color: var(--red); }
.gchip:focus, .gchip:hover { box-shadow: 0 0 0 2px #fff; }
.profile .shelf { margin-top: 14px; }

.hero .bg.blur { filter: blur(40px) brightness(.55); transform: scale(1.25); }
.hero-poster { position: absolute; z-index: 1; right: 9%; top: 15%; height: 62%; border-radius: 6px; box-shadow: 0 20px 70px rgba(0,0,0,.8); }

.vtitle { margin: 0 4%; font-size: 34px; }
.ep { display: grid; grid-template-columns: 44px 1fr 36px; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 14px 16px; border-bottom: 1px solid #333; border-radius: 6px; }
.ep:hover, .ep:focus { background: #2a2a2a; box-shadow: 0 0 0 2px #fff; }
.ep .en { font-size: 24px; color: var(--muted); text-align: center; }
.ep .ei { display: grid; gap: 3px; }
.ep .ei small { color: var(--muted); } .ep .ei em { color: var(--muted); font-style: normal; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bar2 { height: 4px; background: #444; border-radius: 99px; overflow: hidden; margin-top: 4px; } .bar2 i { display: block; height: 100%; background: var(--red); }
.epp { font-size: 20px; opacity: .7; }
/* Billboard optimisé : tout reste visible quelle que soit la taille de l'écran */
.hero { display: flex; align-items: flex-end; padding: 96px 4% 15vh; }
.hero-in { position: relative; left: auto; bottom: auto; width: min(52%, 700px); gap: 10px; }
.hero h1 { font-size: clamp(28px, 3.6vw, 58px); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.05; }
.hero p { -webkit-line-clamp: 3; font-size: clamp(14px, 1.2vw, 18px); }
.reasons { max-height: 64px; overflow: hidden; }
.reasons span { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.hero-meta { font-size: 15px; }
.btn { font-size: clamp(15px, 1.3vw, 19px); padding: 9px 22px; }
.rows { margin-top: -10vh; }
.vtitle { margin-bottom: 18px; }

.chgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; }
.chan { background: #1f1f1f; border-radius: 10px; padding: 16px 12px; display: grid; justify-items: center; gap: 8px; text-align: center; transition: transform .15s, background .15s; }
.chan:hover, .chan:focus { background: #2c2c2c; transform: scale(1.05); box-shadow: 0 0 0 2px #fff; }
.chan .cn { font-weight: 700; font-size: 14px; } .chan small { color: var(--gold); font-size: 12px; }
.logo2 { position: relative; width: 84px; height: 84px; border-radius: 14px; background: linear-gradient(135deg, #34345a, #1a1a2a); display: grid; place-items: center; overflow: hidden; }
.logo2 b { font-size: 24px; color: #fff9; } .logo2 img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; }
.logo2.big { width: 96px; height: 96px; flex: 0 0 auto; }
.lsearch { width: min(420px, 100%); padding: 10px 14px; border-radius: 6px; border: 1px solid #555; background: #2a2a2a; color: #fff; font: inherit; }
.chead { display: flex; align-items: center; gap: 20px; padding: 30px 40px 6px; flex-wrap: wrap; } .chead h2 { margin: 0 0 4px; font-size: 30px; } .chead .btn { margin-left: auto; }
.tag2 { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: #333; white-space: nowrap; }
.tag2.live { background: var(--red); } .tag2.dim { opacity: .6; }
.ep.dimmed { opacity: .55; cursor: default; }
.ltitle { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); z-index: 2; background: rgba(0,0,0,.65); padding: 8px 16px; border-radius: 999px; font-weight: 700; }
#epg .ep { grid-template-columns: 78px 1fr auto; } #epg .ep .en { font-size: 18px; }

.noimg { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; font-weight: 800; font-size: 15px; line-height: 1.2; color: #ddd; background: linear-gradient(160deg, #3a3a52, #1b1b28); }
.covbox { padding: 30px 34px; } .covbox h2 { margin: 0 0 14px; font-size: 24px; }
.covrow { display: flex; gap: 10px; } .covrow input { flex: 1; padding: 11px 14px; border-radius: 6px; border: 1px solid #555; background: #333; color: #fff; font: inherit; }
.covrow input:focus { border-color: #fff; }
.covgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; margin-top: 12px; max-height: 340px; overflow-y: auto; padding: 4px; }
.cov { display: grid; gap: 4px; border-radius: 6px; padding: 0; text-align: left; }
.cov img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 6px; background: #2a2a2a; }
.cov small { font-size: 11px; color: var(--muted); line-height: 1.2; }
.cov:hover img, .cov:focus img { box-shadow: 0 0 0 2px #fff; }
.oldsrv { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: #b00020; color: #fff; padding: 10px 16px; text-align: center; font-weight: 700; } .oldsrv code { background: rgba(0,0,0,.35); padding: 2px 6px; border-radius: 4px; }
.covgrid.wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } .covgrid.wide .cov img { aspect-ratio: 16/9; }

.shead { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 4%; }
.shead h2 { margin: 0; }
.seeall { font-size: 14px; font-weight: 700; color: #e5e5e5; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.1); white-space: nowrap; transition: background .15s; }
.seeall:hover, .seeall:focus { background: #fff; color: #000; box-shadow: 0 0 0 2px #fff; }
.catpage h2 small { font-size: 18px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.catpage .back { margin-bottom: 8px; font-size: 14px; }
.filters { display: grid; gap: 8px; margin-bottom: 26px; }
.frow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .fl { width: 70px; color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.frow .gchip { padding: 6px 12px; font-size: 13px; }

.score.ac{background:#1d3a2a}.score.ac small{font-size:12px;opacity:.7}.acact{display:flex;gap:12px;align-items:center;width:100%}.acform{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.acform input{background:#2a2a2a;border:1px solid #555;color:#fff;border-radius:6px;padding:6px;width:56px}

/* Bouton « retirer » sur les cartes de « À reprendre » */
.cw { position: relative; flex: 0 0 auto; display: flex; }
.cw:hover, .cw:focus-within { z-index: 7; }
.cw .rm { position: absolute; top: 6px; right: 6px; z-index: 8; width: 30px; height: 30px; border-radius: 50%; padding: 0; line-height: 30px; text-align: center; font-size: 15px; font-weight: 700;
  color: #fff; background: rgba(0,0,0,.78); border: 1px solid rgba(255,255,255,.55); opacity: 0; transition: opacity .15s, background .15s; }
.cw:hover .rm, .cw:focus-within .rm { opacity: 1; }
.cw .rm:hover, .cw .rm:focus { background: var(--red, #e50914); border-color: #fff; opacity: 1; }
@media (hover: none) { .cw .rm { opacity: .9; } }

/* Choix d'une version à la lecture */
.vlist { display: grid; gap: 10px; margin-top: 16px; min-width: min(420px, 80vw); }
.vlist .btn { justify-content: flex-start; text-align: left; }

.sheet.trailer > .actions:first-of-type { padding-right: 48px; }
.sheet.trailer .x { top: 12px; right: 12px; }

.vlist .vbtn { display: grid; gap: 3px; padding: 12px 16px; }
.vlist .vbtn b { font-size: 15px; }
.vlist .vsub { font-size: 12px; font-weight: 400; opacity: .75; white-space: normal; }
.vlist .btn.light .vsub { opacity: .65; }

/* Lecteur : tout s'efface après 3 s d'inactivité (voir autoHideControls) */
.player:not(.idle) .close, .player:not(.idle) .compatbtn, .player:not(.idle) .fsbtn, .player:not(.idle) .fmtbtn, .player:not(.idle) .syncbox { opacity: 1; }
.player .cbar, .player .ltitle { transition: opacity .3s; }
.player.idle .close, .player.idle .compatbtn, .player.idle .fsbtn, .player.idle .fmtbtn, .player.idle .fmtmenu, .player.idle .syncbox, .player.idle .cbar, .player.idle .ltitle { opacity: 0 !important; pointer-events: none; }
.player.idle, .player.idle video { cursor: none; }

/* Profils : « Qui regarde ? » */
.avatar { width: 34px; height: 34px; border-radius: 6px; display: grid; place-items: center; font-size: 20px; line-height: 1; padding: 0; margin-left: 8px; background: #5b4bdb; transition: transform .15s, box-shadow .15s; }
.avatar:hover, .avatar:focus { transform: scale(1.08); box-shadow: 0 0 0 2px #fff; }
.whois { position: fixed; inset: 0; z-index: 120; background: var(--bg, #141414); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px; padding: 30px; overflow: auto; }
.whois h1 { font-size: clamp(30px, 4.4vw, 56px); font-weight: 500; margin: 0; }
.plist { display: flex; flex-wrap: wrap; gap: clamp(16px, 2.6vw, 38px); justify-content: center; max-width: 1100px; }
.pcard { display: grid; justify-items: center; gap: 10px; width: clamp(110px, 12vw, 170px); padding: 0; color: #b3b3b3; background: none; border: 0; text-align: center; }
.pcard .pav { width: 100%; aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; font-size: clamp(48px, 6vw, 84px); position: relative; border: 3px solid transparent; transition: border-color .15s, transform .15s; }
.pcard .pav.plus { background: #2a2a2a; color: #b3b3b3; font-size: clamp(40px, 5vw, 70px); }
.pcard .pn { font-size: clamp(15px, 1.4vw, 20px); }
.pcard small { opacity: .6; font-size: 12px; margin-top: -6px; }
.pcard:hover, .pcard:focus { color: #fff; outline: none; }
.pcard:hover .pav, .pcard:focus .pav { border-color: #fff; transform: scale(1.04); }
.pcard.cur .pn { color: #fff; font-weight: 700; }
.pcard .pen { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.55); border-radius: 5px; font-style: normal; font-size: 34px; color: #fff; }
.pfoot { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.pform { display: grid; gap: 18px; justify-items: center; width: min(520px, 92vw); }
.pform .pav.big { width: 120px; height: 120px; border-radius: 10px; display: grid; place-items: center; font-size: 66px; }
.pform input { width: 100%; padding: 14px 16px; font-size: 20px; border-radius: 6px; background: #333; color: #fff; border: 2px solid transparent; text-align: center; }
.pform input:focus { outline: none; border-color: #fff; }
.pgrid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pgrid .gchip { font-size: 24px; padding: 6px 10px; }
.pgrid .sw { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; padding: 0; }
.pgrid .sw.on, .pgrid .sw:focus { border-color: #fff; outline: none; }

/* Chaînes : roue crantée, mises en forme */
.gchip.gear { background: #333; }
.lbar { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.lbar .lsearch { flex: 1 1 280px; max-width: 480px; }
.lay { display: flex; gap: 8px; flex-wrap: wrap; }
.lay .gchip { padding: 6px 12px; font-size: 13px; }
.chgrid.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.chgrid.c6 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.chgrid.c7 { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.chgrid.c6 .chan, .chgrid.c7 .chan { padding: 12px 6px; }
.chgrid.c6 .logo2 { width: 72px; height: 72px; } .chgrid.c7 .logo2 { width: 60px; height: 60px; }
.chgrid.c7 .chan .cn, .chgrid.c6 .chan .cn { font-size: 12px; overflow-wrap: anywhere; }
.chgrid.list { grid-template-columns: 1fr; gap: 6px; }
.chgrid.list .chan { grid-template-columns: 52px 1fr auto; justify-items: start; align-items: center; text-align: left; padding: 8px 14px; gap: 14px; border-radius: 8px; }
.chgrid.list .chan:hover, .chgrid.list .chan:focus { transform: none; }
.chgrid.list .logo2 { width: 48px; height: 48px; border-radius: 10px; } .chgrid.list .logo2 b { font-size: 16px; }
.chgrid.list .chan .cn { font-size: 16px; }
@media (max-width: 900px) { .chgrid.c4, .chgrid.c5, .chgrid.c6, .chgrid.c7 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sheet.lcfg { padding: 28px; width: min(900px, 94vw); max-height: 88vh; overflow: auto; }
.sheet.lcfg h2 { margin: 0 40px 6px 0; }
.lcats .gchip { text-align: left; }

.legend { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 4px 0 12px; font-size: 13px; }
.legend .lg { padding: 4px 10px; border-radius: 999px; font-weight: 700; border: 2px solid transparent; }
.legend .lg.on { background: #12331c; border-color: var(--green); }
.legend .lg.off { background: #3a1217; border-color: var(--red); }
.legend .lg.cnt { color: var(--muted, #aaa); font-weight: 400; }
.gchip.off { opacity: .75; text-decoration: line-through; text-decoration-thickness: 1px; }

/* Avatar : images de films / séries */
.avatar { background-size: cover; background-position: center 22%; }
.pimgs { width: 100%; display: grid; gap: 10px; justify-items: center; max-height: 38vh; overflow: auto; padding: 4px; }
.pimgs h3 { margin: 6px 0 0; font-size: 14px; color: var(--muted, #aaa); font-weight: 600; justify-self: start; }
.pthumbs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pth { width: 68px; height: 68px; border-radius: 8px; background-size: cover; background-position: center 22%; border: 3px solid transparent; padding: 0; background-color: #222; transition: transform .12s; }
.pth:hover, .pth:focus { border-color: #fff; transform: scale(1.08); outline: none; }
.pth.on { border-color: var(--green, #46d369); }
.whois { overflow: auto; }

/* Notes côte à côte : TMDB, IMDb, Rotten Tomatoes, Metascore, AlloCiné sur une même ligne */
.scores { align-items: flex-start; }
.acbox { display: grid; gap: 6px; justify-items: start; align-content: start; }
.acbox .acact { width: auto; font-size: 13px; }
.acbox:has(.acform) { flex-basis: 100%; }

/* Notes en petit au survol des cartes */
.card .rts { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 11px; color: #e6e6e6; line-height: 1.2; }
.card .rt i { font-style: normal; font-weight: 700; font-size: 9.5px; letter-spacing: .02em; text-transform: uppercase; color: #9a9a9a; margin-right: 2px; }
.card .rt:first-child { color: #f5c518; }
.card .rt:first-child i { color: #c9a31a; }

/* Têtes d'affiche */
.src{font-weight:400;font-size:.6em;opacity:.55;margin-left:.5em;letter-spacing:.04em}
.castrow{display:flex;gap:14px;overflow-x:auto;padding:4px 2px 12px;scroll-snap-type:x proximity}
.acard{flex:0 0 118px;background:none;border:0;color:inherit;text-align:center;cursor:pointer;scroll-snap-align:start;font:inherit;padding:4px;border-radius:12px}
.acard .ph{display:block;width:104px;height:104px;margin:0 auto 8px;border-radius:50%;overflow:hidden;background:#2a2a33;position:relative}
.acard .ph>span{position:absolute;inset:0;display:grid;place-items:center;font-size:1.6rem;opacity:.6}
.acard .ph img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.acard b{display:block;font-size:.85rem;line-height:1.2}
.acard small{display:block;font-size:.75rem;opacity:.6;margin-top:2px}
.acard:hover,.acard:focus-visible{background:rgba(255,255,255,.08);outline:none}
.acard:focus-visible .ph{box-shadow:0 0 0 2px #fff}
.actorm{max-width:980px}
.ahead{display:flex;gap:24px;align-items:flex-start;margin-bottom:12px}
.aph{flex:0 0 160px;height:230px;border-radius:12px;overflow:hidden;background:#2a2a33;display:grid;place-items:center;font-size:2.4rem}
.aph img{width:100%;height:100%;object-fit:cover}
.ameta{display:flex;flex-wrap:wrap;gap:6px 16px;opacity:.7;font-size:.9rem;margin:4px 0 10px}
.abio{line-height:1.5;opacity:.9;max-width:62ch}
.afilms{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:14px}
.afilm{background:none;border:0;color:inherit;text-align:left;font:inherit;padding:0;cursor:pointer;border-radius:8px}
.afilm img{display:block;width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:8px;background:#2a2a33}
.afilm b{display:block;font-size:.8rem;margin-top:5px;line-height:1.2}
.afilm small{opacity:.6;font-size:.72rem}
.afilm.off{opacity:.55;cursor:default}
button.afilm:hover img,button.afilm:focus-visible img{box-shadow:0 0 0 2px #fff}
button.afilm:focus-visible{outline:none}
@media(max-width:700px){.ahead{flex-direction:column}}
.actorm{padding:36px 44px 44px}
.actorm .x{top:18px;right:18px}
.actorm .ahead{margin-bottom:28px}
.actorm h3{margin:30px 0 14px}
.actorm .afilms{gap:18px}
.actorm .hint{margin:12px 0}
.castrow{padding:4px 6px 14px}
#cast{margin:8px 0 22px}
@media(max-width:700px){.actorm{padding:24px 18px 28px}}
.studios{flex-wrap:wrap}
.studios .gchip small{opacity:.6}
.afilm .ap{display:block;position:relative}
.afilm .play{position:absolute;right:6px;bottom:6px;width:26px;height:26px;border-radius:50%;background:#e50914;color:#fff;font-style:normal;font-size:11px;display:grid;place-items:center;box-shadow:0 2px 8px rgba(0,0,0,.5)}
.afilm.off img{filter:grayscale(.5)}
.swhy small{display:block;margin-top:4px;font-size:.72rem;opacity:.65;max-width:150px}
.pimgs .frow2{margin:0 0 14px;text-align:left}
.pimgs .frow2 h4{margin:0 0 8px;font-size:.95rem;opacity:.85}
.pthumbs.left{justify-content:flex-start}
.pth.face{width:72px;height:72px;border-radius:50%;background-position:center 18%}
.pth.scene{width:96px;height:96px;border-radius:12px;background-position:center}
.ftiles{display:flex;gap:12px;overflow-x:auto;padding:6px 4vw 18px;scroll-snap-type:x proximity}
.ftile{flex:0 0 auto;position:relative;width:150px;height:84px;border-radius:12px;border:2px solid transparent;background:#1c1c24;color:#fff;display:grid;place-items:center;padding:8px;cursor:pointer;scroll-snap-align:start;overflow:hidden;font:inherit}
.ftile.studio{background:#f1f1f4}
.ftile.studio img{max-width:100%;max-height:100%;object-fit:contain}
.ftile.studio .fl2{color:#222}
.ftile.studio img+.fl2{position:absolute;left:-9999px}
.ftile.saga{width:64px;height:96px;padding:0}
.ftile.saga img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.ftile.saga .fl2{position:absolute;left:0;right:0;bottom:0;font-size:.62rem;background:linear-gradient(transparent,rgba(0,0,0,.85));padding:14px 3px 3px;line-height:1.1;opacity:0}
.ftile.saga:hover .fl2,.ftile.saga:focus-visible .fl2{opacity:1}
.ftile.saga:not(:has(img)) .fl2{opacity:1;position:static;background:none;padding:4px;font-size:.75rem}
.ftile small{position:absolute;top:4px;right:6px;font-size:.65rem;background:rgba(0,0,0,.65);color:#fff;border-radius:8px;padding:0 5px}
.ftile.all{width:auto;padding:0 18px;height:44px;align-self:center}
.ftile:hover,.ftile:focus-visible{border-color:#fff;outline:none}
.ftile.on{border-color:#e50914}
.qtabs{display:flex;gap:8px;padding:14px 24px 0;background:#0e0e0e}
.qtab{background:#222;color:#ddd;border:0;border-radius:99px;padding:8px 18px;font:inherit;font-weight:600;cursor:pointer}
.qtab.on{background:#fff;color:#111}
.qtab:focus-visible{outline:2px solid #fff;outline-offset:2px}
.player .fmtbtn{position:absolute;top:18px;right:420px;z-index:2;background:rgba(0,0,0,.65);padding:10px 16px;border-radius:999px;font-weight:700;opacity:0;transition:opacity .2s}
.player .syncbox{position:absolute;bottom:92px;right:22px;z-index:2;display:flex;align-items:center;gap:6px;background:rgba(0,0,0,.7);padding:8px 12px;border-radius:999px;font-size:13px;opacity:0;transition:opacity .2s}
.player .syncbox button{background:rgba(255,255,255,.14);border-radius:99px;padding:6px 10px;font-weight:600}
.player .syncbox button:hover,.player .syncbox button:focus-visible{background:#fff;color:#111;outline:none}
.player .syncbox .sv{min-width:62px;text-align:center}
.player:hover .fmtbtn,.player:hover .syncbox{opacity:1}
.player video{transform-origin:center}
.player{overflow:hidden}
.card .eplab{position:absolute;left:0;right:0;bottom:0;z-index:2;padding:22px 10px 8px;font-size:.78rem;font-weight:700;line-height:1.2;text-align:left;background:linear-gradient(transparent,rgba(0,0,0,.92));white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.card .eplab i{font-style:normal;color:#e50914;margin-right:3px}
.card .bar{z-index:3}
.player .syncbox em{font-size:11px;opacity:.65;font-style:normal;margin:0 2px}
.player .syncbox{flex-wrap:wrap;max-width:min(92vw,720px);justify-content:flex-end}
.player .fmtmenu{position:absolute;top:66px;right:420px;z-index:3;background:rgba(18,18,18,.96);border:1px solid #333;border-radius:14px;padding:6px;display:flex;flex-direction:column;min-width:220px;box-shadow:0 10px 30px rgba(0,0,0,.6)}
.player .fmtmenu[hidden]{display:none}
.player .fmtmenu button{background:none;color:#eee;text-align:left;padding:10px 14px;border-radius:10px;font-weight:600;font-size:14px}
.player .fmtmenu button.on::before{content:'✓ ';color:#46d369}
.player .fmtmenu button:hover,.player .fmtmenu button:focus-visible{background:#fff;color:#111;outline:none}
.player{place-items:center}
/* Vidéo toujours centrée au milieu de l'écran (haut = bas, gauche = droite), indépendamment de la mise en page */
.player { display: block; }
.player video { position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: auto; object-position: center center; max-width: none; }
.chgrid.c4{grid-template-columns:repeat(4,minmax(0,1fr))}
.chgrid.c4 .logo2{width:110px;height:110px}
.chgrid.c4 .chan .cn{font-size:15px}
/* logo présent : plus de fond ni d'initiales derrière */
.logo2.haslogo{background:none;overflow:visible}
.logo2.haslogo img{inset:0;width:100%;height:100%}
.logo2 img + b{display:none}
/* logo foncé : carte claire */
.chan.lightbg{background:#ececf1;color:#15151a}
.chan.lightbg .cn{color:#15151a}
.chan.lightbg small{color:#8a5a00}
.chan.lightbg:hover,.chan.lightbg:focus{background:#fff}
svg.logo{height:34px;width:auto;margin-right:22px;display:block;filter:drop-shadow(0 2px 6px rgba(0,0,0,.45))}
.qscores{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 4px}
.qs{display:inline-flex;align-items:baseline;gap:6px;background:rgba(255,255,255,.09);border-radius:8px;padding:6px 10px}
.qs b{color:#46d369;font-size:1.05rem}
.qs i{font-style:normal;font-size:.75rem;opacity:.7}
img.logo{height:30px;width:auto;margin-right:22px;display:block}
/* Notes alignées sur une seule ligne : TMDB, AlloCiné presse, AlloCiné spectateurs ; liens « fiche / corriger » dessous */
.scores { align-items: stretch; }
.acbox { display: contents; }
.scores .score { align-content: center; min-width: 96px; }
.acbox .acact { flex-basis: 100%; order: 5; margin-top: -2px; }
.acbox .acform { flex-basis: 100%; order: 5; }
.chw{position:relative;display:block}
.chw .chan{width:100%;height:100%}
.favb{position:absolute;top:6px;right:6px;z-index:2;width:30px;height:30px;border-radius:50%;background:rgba(0,0,0,.45);color:#fff;font-size:16px;line-height:1;opacity:.55;transition:opacity .15s,transform .15s}
.chw:hover .favb,.favb:focus-visible,.favb.on{opacity:1}
.favb.on{color:#ffc933}
.favb:hover,.favb:focus-visible{transform:scale(1.15);outline:2px solid #fff}
.chgrid.list .favb{top:50%;right:12px;transform:translateY(-50%)}
.chgrid.list .favb:hover,.chgrid.list .favb:focus-visible{transform:translateY(-50%) scale(1.15)}
.chan.lightbg + .favb{background:rgba(0,0,0,.25);color:#222}.chan.lightbg + .favb.on{color:#e0a000}
/* Survol des cartes : contour rouge, et assez de marge pour que l'agrandissement ne soit jamais coupé */
.row { padding: 44px 4% 60px; margin: -18px 0 -14px; }
.card:hover, .card:focus { box-shadow: 0 0 0 2px #e50914, 0 16px 44px rgba(0,0,0,.85); outline: none; }
.card:focus-visible { box-shadow: 0 0 0 2px #e50914, 0 16px 44px rgba(0,0,0,.85); }
.grid { padding-top: 12px; }
/* toutes les cartes de chaînes restent foncées */
.chan.lightbg{background:#1f1f1f;color:inherit}.chan.lightbg:hover,.chan.lightbg:focus{background:#2c2c2c}.chan.lightbg .cn{color:inherit}.chan.lightbg small{color:var(--gold)}
.chan.lightbg + .favb{background:rgba(0,0,0,.45);color:#fff}.chan.lightbg + .favb.on{color:#ffc933}
.fsort{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}
.fsort .chip{padding:7px 14px;border-radius:18px;background:#2a2a2a;color:#ddd;border:1px solid transparent;cursor:pointer;font-size:.9rem}
.fsort .chip.on{background:#fff;color:#000}
.fsort .chip:focus-visible{outline:2px solid #e50914}

.ftiles{scrollbar-width:none;-ms-overflow-style:none}
.ftiles::-webkit-scrollbar{display:none}
.ftile.saga{width:150px;height:84px;padding:10px;background:#1c1c24}
.ftile.saga img{position:static;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain}
.ftile.saga .fl2{opacity:0}
.ftile.saga img+.fl2{position:absolute;left:-9999px}

.ftile.studio img,.ftile.saga img{position:absolute;inset:10px;width:calc(100% - 20px);height:calc(100% - 20px);max-width:none;max-height:none;object-fit:contain;object-position:center}
.ftile.saga{background:#f1f1f4}
.ftile.saga .fl2{color:#222}
.ftile.studio:not(:has(img)) .fl2,.ftile.saga:not(:has(img)) .fl2{opacity:1;position:static;background:none;padding:4px;font-size:.85rem;font-weight:700;text-align:center;line-height:1.2;color:#222}
#enrichfab{position:fixed;right:20px;bottom:20px;left:auto;width:auto;max-width:calc(100vw - 40px);z-index:60;box-shadow:0 6px 20px rgba(0,0,0,.6);background:#2b2b2b;border:1px solid #555}
#enrichfab:hover,#enrichfab:focus-visible{background:#e50914;border-color:#e50914}
#enrichfab[hidden]{display:none}
.shead{position:relative;z-index:5}
.card .flag{position:absolute;top:6px;right:6px;font-size:20px;line-height:1;text-shadow:0 1px 4px rgba(0,0,0,.8);z-index:2;pointer-events:none}

.ftile.badge{width:auto;min-width:150px;height:44px;align-self:center;padding:0 22px;border-radius:999px;font-weight:800;letter-spacing:.06em;font-size:.85rem;white-space:nowrap}
.ftile.badge.gold{background:linear-gradient(135deg,#e7c06a,#b8862b);color:#1a1205;border-color:#e7c06a}
.ftile.badge.kids{background:#1a1a1a;color:#fff;border-color:#444;letter-spacing:.02em;font-weight:600}
.ftile.badge.kids b{font-weight:800}
.ftile.badge small{position:static;margin-left:10px;background:rgba(0,0,0,.35)}
.ftile.badge{display:flex;align-items:center;justify-content:center}
.ftile.badge.adult{min-width:90px;background:#2a0f12;color:#fff;border-color:#7a1c24;letter-spacing:.04em}
.ftile.saga{background:#16161d}
.ftile.saga .fl2,.ftile.saga:not(:has(img)) .fl2{color:#fff}
.ftile.saga{background:#34343f}
.ftile:not(.studio):not(.badge):not(.all){background:#34343f}
.ftile.on,.ftile.badge.on,.ftile.badge.kids.on,.ftile.badge.adult.on,.ftile.badge.gold.on{border-color:#e50914;box-shadow:0 0 0 2px #e50914,0 0 18px rgba(229,9,20,.55);transform:scale(1.04)}
.ftile.badge.kids.on,.ftile.badge.adult.on{background:#e50914;color:#fff}
.ftile.badge.gold.on{filter:brightness(1.1)}
.t10 .num{font-size:clamp(64px,7.5vw,112px);-webkit-text-stroke:2px #6d6d6e;letter-spacing:-.06em;margin-right:-.06em;line-height:.8}
.t10:first-child .num{color:#e50914;-webkit-text-stroke:2px #ff4a52;text-shadow:0 0 18px rgba(229,9,20,.45)}
.ftiles{scroll-snap-type:none;overscroll-behavior-x:contain}
.ftile{scroll-snap-align:none}

/* Hero en diaporama */
.hero.slider{display:block;padding:0}
.hero.slider .hb{position:absolute;inset:0;opacity:0;transition:opacity .9s ease}
.hero.slider .hb.on{opacity:1}
.hero.slider .hslide{position:absolute;inset:0;z-index:3;display:flex;align-items:flex-end;padding:96px 4% 15vh;opacity:0;transition:opacity .7s ease;pointer-events:none}
.hero.slider .hslide.on{opacity:1;pointer-events:auto}
.harr{position:absolute;z-index:4;top:50%;transform:translateY(-50%);width:44px;height:80px;border-radius:6px;background:rgba(0,0,0,.35);color:#fff;font-size:34px;opacity:0;transition:opacity .2s,background .2s}
.harr.l{left:8px}.harr.r{right:8px}
.hero.slider:hover .harr,.harr:focus-visible{opacity:1}
.harr:hover{background:rgba(0,0,0,.7)}
.hdots{position:absolute;z-index:4;left:4%;bottom:9vh;display:flex;gap:8px}
.hdots button{width:26px;height:4px;border-radius:2px;background:rgba(255,255,255,.35);padding:0;transition:background .2s,width .2s}
.hdots button.on{background:#e50914;width:42px}
.hdots button:hover,.hdots button:focus-visible{background:#fff;outline:none}
.prov{margin:14px 0}
.prov .k{color:#9a9a9a;display:block;margin-bottom:6px}
.provrow{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:6px 0}
.provrow small{width:78px;color:#9a9a9a;font-size:.72rem}
.provrow img{width:38px;height:38px;border-radius:9px;object-fit:cover}
.prov .src{display:block;color:#777;font-size:.68rem;margin-top:4px}
.harr{display:none}
.hdots{left:auto;right:4%;bottom:18vh;gap:12px}
.hdots button{width:40px;height:8px;border-radius:4px;background:rgba(255,255,255,.4)}
.hdots button.on{width:72px;background:#e50914}

/* Titre cliquable, langue, sous-titres */
.player .ptitle{position:absolute;top:18px;left:50%;transform:translateX(-50%);z-index:2;max-width:min(30vw,480px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:rgba(0,0,0,.65);padding:10px 20px;border-radius:999px;font-weight:800;font-size:16px;opacity:0;transition:opacity .2s}
.player .ptitle:hover,.player .ptitle:focus-visible{background:#fff;color:#111;outline:none}
.player .langbtn,.player .subbtn{position:absolute;top:18px;z-index:2;background:rgba(0,0,0,.65);padding:10px 16px;border-radius:999px;font-weight:700;opacity:0;transition:opacity .2s}
.player .langbtn{right:580px}.player .subbtn{right:720px}
.player:hover .ptitle,.player:hover .langbtn,.player:hover .subbtn,.player:not(.idle) .ptitle,.player:not(.idle) .langbtn,.player:not(.idle) .subbtn{opacity:1}
.player.idle .ptitle,.player.idle .langbtn,.player.idle .subbtn,.player.idle .trkmenu{opacity:0 !important;pointer-events:none}
.player .langbtn:hover,.player .subbtn:hover,.player .langbtn:focus-visible,.player .subbtn:focus-visible{background:#fff;color:#111;outline:none}
.player .trkmenu{position:absolute;top:66px;z-index:3;background:rgba(18,18,18,.96);border:1px solid #333;border-radius:14px;padding:6px;display:flex;flex-direction:column;min-width:240px;max-height:60vh;overflow:auto;box-shadow:0 10px 30px rgba(0,0,0,.6)}
.player .langmenu{right:580px}.player .submenu{right:720px}
.player .trkmenu[hidden]{display:none}
.player .trkmenu button{background:none;color:#eee;text-align:left;padding:10px 14px;border-radius:10px;font-weight:600;font-size:14px}
.player .trkmenu button small{opacity:.6;font-weight:500;margin-left:6px}
.player .trkmenu button:disabled{opacity:.5}
.player .trkmenu button.on::before{content:'✓ ';color:#46d369}
.player .trkmenu button:not(:disabled):hover,.player .trkmenu button:focus-visible{background:#fff;color:#111;outline:none}
/* Fondu du hero vers le fond de page */
.hero::before{content:"";position:absolute;left:0;right:0;bottom:-1px;height:46%;z-index:3;pointer-events:none;
  background:linear-gradient(to bottom,rgba(20,20,20,0) 0%,rgba(20,20,20,.35) 30%,rgba(20,20,20,.72) 58%,rgba(20,20,20,.92) 80%,var(--bg) 100%)}
.ktabs{margin-bottom:6px}
.tabrow{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:6px}
.tabrow .tabs,.tabrow .ktabs{margin:0}

.kwchip{background:rgba(255,255,255,.12);color:#fff;border-radius:999px;padding:3px 11px;font-size:.85rem;margin:2px 2px;cursor:pointer;transition:background .15s}
.kwchip:hover,.kwchip:focus-visible{background:#fff;color:#111;outline:none}
.yours .seg .rv{margin-left:6px}
.yours .seg .rv.on{background:#fff;color:#111}
.ftile.badge.rewatch{background:linear-gradient(135deg,#3b5bdb,#1c3aa9);color:#fff;border-color:#5c7cfa}
.yours .seg .rv.on{background:#3b5bdb;color:#fff}

/* ═════ Mode télé (Android TV / Xgimi) : html.tv ═════ */
html.tv { scroll-padding-top: 100px; scroll-padding-bottom: 60px; }
html.tv *:not(video):not(input) { pointer-events: none; }          /* plus de survol « fantôme » : tout passe par la télécommande */
html.tv video { background: #000; pointer-events: auto; }
html.tv video::-webkit-media-controls-overlay-play-button,
html.tv video::-webkit-media-controls-start-playback-button { display: none !important; }
html.tv body { cursor: none; }
html.tv .nav nav button:focus { box-shadow: 0 0 0 2px #fff; background: rgba(255,255,255,.22); }
html.tv .ico:focus { box-shadow: 0 0 0 2px #fff; }
html.tv .nav nav button, html.tv .nav .quizlink { white-space: nowrap; }
html.tv [data-f]:focus-visible:not(.card):not(.btn):not(.circ) { outline: 2px solid #fff; outline-offset: 2px; }
html.tv .player [data-f]:focus, html.tv .player button:focus { box-shadow: 0 0 0 2px #fff; background: rgba(255,255,255,.3); }
html.tv .cbar button:focus { box-shadow: 0 0 0 2px #fff; }

/* ── Télé : fiches et fenêtres en pleine largeur, boutons et textes plus compacts ── */
html.tv #enrichfab { display: none !important; }
html.tv .modal { padding: 0; }
html.tv .sheet { width: 100vw !important; max-width: none; min-height: 100vh; border-radius: 0; margin: 0; box-shadow: none; }
html.tv .sheet.rp, html.tv .sheet.settings, html.tv .sheet.trailer, html.tv .sheet.lcfg, html.tv .sheet.qz { width: min(1100px, 94vw) !important; min-height: 0; border-radius: 10px; margin: auto; }
html.tv .sheet.lcfg { max-height: 92vh; }
html.tv .dm-hero { aspect-ratio: 21 / 8; }
html.tv .dm-in { left: 56px; right: 56px; bottom: 22px; }
html.tv .dm-in h1 { font-size: clamp(26px, 3.2vw, 44px); margin-bottom: 12px; }
html.tv .dm-body { grid-template-columns: 1.7fr 1fr; gap: 36px; padding: 6px 56px 24px; }
html.tv .dm-body .syn { font-size: 17px; line-height: 1.55; }
html.tv .dm-r { font-size: 15px; }
html.tv .dm-more { padding: 0 56px 44px; }
html.tv .dm-more h3 { font-size: 22px; }
html.tv .btn { font-size: 16px; padding: 9px 20px; gap: 8px; border-radius: 6px; }
html.tv .btn.sm { font-size: 14px; padding: 7px 14px; }
html.tv .hero-act { gap: 10px; }
html.tv .hero-act .btn, html.tv .dm-act .btn { white-space: nowrap; }
html.tv .dm-act { flex-wrap: wrap; gap: 10px; }
html.tv .circ { width: 38px; height: 38px; font-size: 16px; }
html.tv .sheet .x { top: 14px; right: 20px; width: 40px; height: 40px; font-size: 18px; }
html.tv .kwchip { font-size: 14px; padding: 4px 12px; }
html.tv .nav nav button { font-size: 15px; padding: 8px 15px; }

/* ── Télé : fluidité (pas d'animations ni de flou coûteux) ── */
html.tv *, html.tv *::before, html.tv *::after { transition: none !important; animation-duration: .01s !important; scroll-behavior: auto !important; }
html.tv .hero .bg.blur { filter: brightness(.5); transform: none; }
html.tv .card, html.tv .card img { will-change: auto; }
html.tv .sheet, html.tv .modal { box-shadow: none; }

/* ── Télé : lecteur à la télécommande ── */
html.tv .player .fsbtn, html.tv .player .fmtbtn { display: none; }
html.tv .player .close, html.tv .player .langbtn, html.tv .player .subbtn, html.tv .player .compatbtn, html.tv .player .ptitle { font-size: 15px; padding: 8px 14px; top: 22px; }
html.tv .player .close { left: 40px; }
html.tv .player .langbtn { left: 150px; right: auto; }
html.tv .player .subbtn { left: 270px; right: auto; }
html.tv .player .compatbtn { right: 40px; }
html.tv .player .ptitle { max-width: 28vw; }
html.tv .player .syncbox { bottom: 100px; right: 40px; font-size: 14px; padding: 6px 10px; }
html.tv .player .syncbox button { font-size: 14px; padding: 6px 10px; }
html.tv .cbar { padding: 14px 40px 22px; gap: 12px; }
html.tv .cbar button { font-size: 16px; padding: 9px 16px; }
html.tv .cbar .ctime { font-size: 16px; min-width: 120px; text-align: right; }
html.tv .cbar .cprog { height: 8px; }
html.tv .cbar [data-f]:focus, html.tv .cbar button:focus { background: #fff; color: #111; box-shadow: 0 0 0 2px #fff; }
html.tv .cbar .cprog:focus { outline: 2px solid #fff; outline-offset: 4px; }
html.tv .player .close:focus, html.tv .player .langbtn:focus, html.tv .player .subbtn:focus, html.tv .player .compatbtn:focus, html.tv .player .ptitle:focus, html.tv .player .syncbox button:focus, html.tv .trkmenu button:focus { background: #fff; color: #111; opacity: 1; }

/* barre de lecture maison aussi dans le navigateur (flèches du clavier) */
.cbar [data-f]:focus, .cbar button:focus { background: #fff; color: #111; box-shadow: 0 0 0 2px #fff; outline: none; }
.cbar .cprog:focus { outline: 2px solid #fff; outline-offset: 4px; }
.player .close:focus, .player .langbtn:focus, .player .subbtn:focus, .player .compatbtn:focus, .player .ptitle:focus, .player .syncbox button:focus, .trkmenu button:focus { background: #fff; color: #111; opacity: 1; outline: none; }

/* 7 affiches par ligne (TV + navigateur desktop) */
:root { --tvgap: 8px; --tvcard: calc((92vw - 16px - 6 * var(--tvgap)) / 7); }
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(7, 1fr); gap: 34px var(--tvgap); }
  .grid.sim { grid-template-columns: repeat(6, 1fr); }
  .grid .card { width: 100%; }
  .row { gap: var(--tvgap); }
  .row .card, .row .cw .card { width: var(--tvcard); }
  .row .t10 .card { width: calc(var(--tvcard) * .8); }
}

/* ── Fiche film / série : compacte, image nette, dégradé sous le titre ── */
.sheet.dm { width: min(1080px, 96vw); }
.dm-hero { aspect-ratio: 21 / 8; max-height: 40vh; width: 100%; background: #111; overflow: hidden; }
.dm-hero .bg { background-position: center 25%; }
.dm-hero.nobd .bg { filter: blur(26px) saturate(1.15) brightness(.8); transform: scale(1.35); opacity: .55; }
.dm-hero::after { background:
  linear-gradient(0deg, var(--panel) 0, rgba(24,24,24,.92) 14%, rgba(24,24,24,.55) 38%, rgba(24,24,24,0) 72%),
  linear-gradient(90deg, rgba(24,24,24,.75) 0, rgba(24,24,24,0) 55%); }
.dm-in { left: 36px; right: 36px; bottom: 16px; }
.dm-in h1 { font-size: clamp(22px, 2.6vw, 36px); margin: 0 0 10px; text-shadow: 0 2px 14px rgba(0,0,0,.8); }
.dm-act { flex-wrap: wrap; gap: 8px; }
.dm-act .btn { font-size: 14px; padding: 7px 16px; white-space: nowrap; }
.dm-body { grid-template-columns: 1.8fr 1fr; gap: 28px; padding: 6px 36px 18px; }
.dm-meta { font-size: 14px; margin-bottom: 8px; }
.dm-body .syn { font-size: 15px; line-height: 1.5; margin: 0 0 12px; }
.dm-r { font-size: 13px; gap: 8px; }
.dm-more { padding: 0 36px 32px; }
.dm-more h3 { font-size: 19px; margin: 18px 0 10px; }
html.tv .dm-hero { aspect-ratio: 21 / 7.5; max-height: 36vh; }
html.tv .dm-in { left: 48px; right: 48px; bottom: 14px; }
html.tv .dm-in h1 { font-size: clamp(22px, 2.6vw, 34px); margin-bottom: 8px; }
html.tv .dm-body { padding: 6px 48px 18px; gap: 30px; }
html.tv .dm-body .syn { font-size: 15px; }
html.tv .dm-r { font-size: 13px; }
html.tv .dm-more { padding: 0 48px 36px; }
html.tv .dm-more h3 { font-size: 19px; }
html.tv .dm-act .btn { font-size: 14px; padding: 7px 16px; }

/* Fiche : bloc « Votre avis » compact + titres similaires sur 6 colonnes */
.dm .yours { padding: 10px 14px; margin-top: 10px; border-radius: 8px; }
.dm .yours .yl { font-size: 11px; margin-bottom: 6px; }
.dm .yours .seg { padding: 2px; }
.dm .yours .seg button { padding: 4px 12px; font-size: 13px; }
.dm .yours .stars { gap: 0; margin-top: 6px; }
.dm .yours .star, .dm .yours .stars.big .star { font-size: 20px; padding: 0 1px; }
.dm .yours .sval, .dm .yours .hint { font-size: 12px; margin: 4px 0 0; }
.dm .scores .score { padding: 6px 12px; }
.dm .scores .score b { font-size: 17px; }
.dm .scores .score span { font-size: 10px; }
.dm .grid.sim, html.tv .dm .grid.sim { grid-template-columns: repeat(6, 1fr); gap: 20px 8px; }
.dm .yours { gap: 6px; }
.dm .yours .sval { min-width: 0; margin-left: 8px; font-size: 12px; }
.dm .yours .stars { align-items: center; }

/* Fiche : textes encore plus petits */
.dm-in h1, html.tv .dm-in h1 { font-size: clamp(20px, 2.2vw, 30px); }
.dm-act .btn, html.tv .dm-act .btn { font-size: 13px; padding: 6px 14px; }
.dm-meta, .dm-meta span { font-size: 12.5px; }
.dm-body .syn, html.tv .dm-body .syn { font-size: 13px; line-height: 1.45; }
.dm-body .hint { font-size: 12px; }
.dm-r, html.tv .dm-r { font-size: 12px; gap: 6px; line-height: 1.4; }
.dm-more h3, html.tv .dm-more h3 { font-size: 16px; margin: 14px 0 8px; }
.dm-more, .dm-more .facts, .dm-more .kws span { font-size: 12px; }
.dm .person b { font-size: 12px; } .dm .person small { font-size: 11px; }
.dm .card .ct, .dm .card .ctitle { font-size: 11px; }

/* Télé : pas de liens de réglage (couverture, image de fond, AlloCiné) dans les fiches */
html.tv .dm-r > div:has([data-act="cover"]),
html.tv .dm-r > div:has(a[href*="allocine.fr/rechercher"]),
html.tv .dm [data-act="cover"],
html.tv .dm a[href*="allocine.fr/rechercher"] { display: none !important; }
html.tv .acact, html.tv .acact .link, html.tv .dm [data-act="acedit"], html.tv .dm [data-act="acretry"], html.tv .scores a.link { display: none !important; }

/* « Votre avis » : Vu / Pas vu / À revoir à gauche, étoiles à droite */
.dm .yours { grid-template-columns: auto 1fr; align-items: center; column-gap: 22px; }
.dm .yours > .yl, .dm .yours > .hint, .dm .yours > div:not(.stars) { grid-column: 1 / -1; }
.dm .yours > .seg { grid-column: 1; margin: 0; }
.dm .yours > .stars { grid-column: 2; margin: 0; flex-wrap: nowrap; justify-content: flex-end; }
.dm .yours .sval { white-space: nowrap; }
.dm .yours > .hint { display: none !important; }
.dm .yours > .seg { grid-row: 2; align-self: center; }
.dm .yours > .stars { grid-row: 2; align-self: center; justify-content: flex-start; }
.dm-r .nl { color: #fff; font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 3px; padding: 0 1px; font-size: inherit; }
.dm-r .nl:hover { text-decoration-color: #fff; }
.dm-r .nl:focus { background: #fff; color: #111; outline: none; border-radius: 3px; text-decoration: none; }
.dm .yours > div.seg { grid-column: 1; grid-row: 2; align-self: center; }
.dm .yours > div.stars { grid-column: 2; grid-row: 2; align-self: center; justify-self: start; justify-content: flex-start; flex-wrap: nowrap; }

/* Barre du haut : jamais de retour à la ligne, éléments compacts */
.nav, .nav-l, .nav-r, .nav nav { flex-wrap: nowrap; }
.nav nav button, .nav .quizlink, .nav-r button { white-space: nowrap; flex: 0 0 auto; }
.nav nav { gap: 2px; }
.nav nav button { padding: 7px 12px; }
.sbox.open input { width: clamp(120px, 14vw, 240px); }
@media (max-width: 1500px) { .nav .quizlink .ql { display: none; } .nav nav .quizlink { margin-left: 6px; padding: 7px 11px; } }
@media (max-width: 1100px) { .nav nav button { padding: 7px 9px; font-size: 13px; } .nav .logo, .nav .brand { max-width: 110px; } }
html.tv .nav nav button { padding: 7px 12px; }
html.tv .nav .quizlink .ql { display: none; }
html.tv .sbox.open input { width: 150px; }

/* Page personne (acteur / réalisateur) : plus compacte */
.actorm { padding: 22px 28px 26px !important; }
.actorm h2 { font-size: 22px; margin: 0 0 4px; }
.actorm .ahead { gap: 18px; margin-bottom: 14px; }
.actorm .aph { flex-basis: 110px; height: 160px; border-radius: 8px; }
.actorm .ameta { font-size: 12px; margin: 2px 0 6px; }
.actorm .abio { font-size: 12.5px; line-height: 1.45; max-width: none; }
.actorm .link { font-size: 12px; }
.actorm h3 { font-size: 16px; margin: 16px 0 8px; }
.actorm h3 .src { font-size: 11px; }
.actorm .afilms { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 12px 10px; }
.actorm .afilm b { font-size: 11px; margin-top: 4px; }
.actorm .afilm small { font-size: 10px; }
.actorm .afilm .play { width: 20px; height: 20px; font-size: 9px; right: 4px; bottom: 4px; }
.actorm .hint { font-size: 12px; margin: 8px 0; }
.actorm .x { top: 12px; right: 12px; width: 30px; height: 30px; font-size: 14px; }

/* Télé : aucun lien externe (TMDB, AlloCiné…) dans les fiches et pages de personnes */
html.tv .dm a[target="_blank"], html.tv .actorm a[target="_blank"], html.tv .actorm a[href^="http"], html.tv .dm a[href^="http"] { display: none !important; }

/* Page personne : photo plus grande, 6 films par ligne */
.actorm .aph { flex-basis: 170px; height: 245px; border-radius: 10px; }
.actorm .afilms { grid-template-columns: repeat(6, 1fr); gap: 16px 12px; }
.actorm .afilm b { font-size: 12px; }
.actorm .afilm small { font-size: 11px; }
.sheet.actorm { width: min(1080px, 96vw); max-width: none; }
.kws .kwc { font-size: 12px; color: var(--muted); background: #2a2a2a; padding: 4px 10px; border-radius: 999px; }
.kws .kwc:hover, .kws .kwc:focus { background: #fff; color: #111; outline: none; }
html.tv .dm-more, html.tv .modal { padding-bottom: 40px; }

/* Bandes-annonces : vidéo la plus grande possible, boutons compacts toujours visibles */
.sheet.trailer, html.tv .sheet.trailer { width: min(1500px, 97vw) !important; padding: 12px 18px 14px; gap: 8px; max-height: 98vh; margin: auto; }
.sheet.trailer .actions b { font-size: 15px; }
.sheet.trailer .ratio { width: min(100%, calc((100vh - 120px) * 16 / 9)); margin: 0 auto; }
.sheet.trailer .actions { justify-content: center; gap: 8px; }
.sheet.trailer .actions:first-of-type { justify-content: flex-start; }
.sheet.trailer .btn.sm { font-size: 13px; padding: 6px 14px; white-space: nowrap; }
.sheet.trailer .hint { display: none; }
.sheet.trailer .x { top: 8px; right: 10px; width: 30px; height: 30px; font-size: 14px; }
.sheet.trailer > .actions:first-of-type { padding-right: 44px; }
html.tv .sheet.trailer a[target="_blank"] { display: none !important; }

/* Têtes d'affiche : plus petites, focus rouge sobre, rien n'est coupé */
.castrow { padding: 10px 14px 14px; gap: 10px; scroll-padding-left: 14px; scroll-snap-type: none; }
.acard { flex: 0 0 92px; padding: 6px 4px 8px; border-radius: 10px; }
.acard .ph { width: 68px; height: 68px; margin-bottom: 5px; }
.acard b { font-size: 11.5px; }
.acard small { font-size: 10.5px; }
.acard:hover, .acard:focus, .acard:focus-visible { background: rgba(229,9,20,.22); outline: none !important; box-shadow: inset 0 0 0 2px #e50914; }
.acard:focus .ph, .acard:focus-visible .ph, .acard:hover .ph { box-shadow: 0 0 0 2px #e50914; }
html.tv [data-f].acard:focus-visible, html.tv [data-f].acard:focus { outline: none !important; }
html.tv .acard { flex-basis: 92px; }
/* Contours fins partout */
.card:hover, .card:focus, .card:focus-visible { transform: scale(1.08); box-shadow: 0 0 0 2px #e50914, 0 10px 28px rgba(0,0,0,.8); }
html.tv .card:focus, html.tv .card:focus-visible { transform: scale(1.05); box-shadow: 0 0 0 2px #e50914; }
.btn:focus-visible { transform: scale(1.03); }

/* Focus plus discret */
.acard:hover, .acard:focus, .acard:focus-visible { background: rgba(229,9,20,.16); box-shadow: inset 0 0 0 1px rgba(229,9,20,.9); }
.acard:focus .ph, .acard:focus-visible .ph, .acard:hover .ph { box-shadow: none; }
.card:hover, .card:focus, .card:focus-visible, html.tv .card:focus, html.tv .card:focus-visible { box-shadow: 0 0 0 1.5px #e50914, 0 8px 24px rgba(0,0,0,.7); }
.btn:focus-visible, .tile:focus, .chan:focus, .cov:focus img, button.afilm:focus-visible img { box-shadow: 0 0 0 1.5px #fff; }
html.tv .nav nav button:focus, html.tv .ico:focus { box-shadow: 0 0 0 1.5px #fff; }
html.tv [data-f]:focus-visible:not(.card):not(.btn):not(.circ) { outline-width: 1.5px; outline-offset: 1px; }
.ftiles { justify-content: flex-start; scroll-padding-left: 4vw; padding-left: 4%; padding-right: 4%; }
.ftile.all { margin: 0; }
/* La barre est déjà dans .grid-view (marge 4 %) : pas de marge en plus, bord gauche aligné sur le titre et les affiches */
.grid-view .ftiles { padding-left: 0 !important; padding-right: 0 !important; scroll-padding-left: 0; }

/* Têtes d'affiche : exactement 7 personnes visibles, le reste défile */
.castrow { gap: 10px; }
.acard, html.tv .acard { flex: 0 0 calc((100% - 6 * 10px) / 7); min-width: 0; }
.acard .ph { width: 78px; height: 78px; }
.acard b { overflow-wrap: anywhere; }
.acard, html.tv .acard { flex: 0 0 calc((100% - 7 * 10px) / 7.5); }

/* Fiche : ligne année · durée et slogan */
.dm-meta { gap: 8px; align-items: center; margin-bottom: 6px; }
.dm-meta > span:not(.cert):not(.match) + span:not(.cert):not(.match)::before,
.dm-meta > .match + span:not(.cert)::before { content: "·"; margin-right: 8px; color: #777; font-weight: 700; }
.dm-body .hint:first-of-type, .dm-body > div > p.hint { color: #e50914; font-style: italic; font-size: 13.5px; font-weight: 600; margin: 2px 0 8px; letter-spacing: .1px; }

/* Fiche série : têtes d'affiche et épisodes rapprochés */
.dm-body { align-items: start; }
.dm-castwrap { padding-bottom: 0 !important; }
.dm-castwrap #cast { margin: 0; }
.dm-castwrap #cast h3 { margin: 6px 0 4px; }
.dm-more h3 { margin-top: 10px; }
.dm-more .tabs { margin-bottom: 8px; }

/* bouton mise à jour du contenu */
.syncbtn svg{display:block}
.syncbtn.spin svg{animation:hfspin .9s linear infinite!important}
@keyframes hfspin{to{transform:rotate(360deg)}}
html.tv .syncbtn.spin svg{animation-duration:.9s!important}
/* indicateurs du hero plus épais */
.hdots{gap:12px}
.hdots button{height:12px!important;border-radius:6px!important;width:44px!important;background:rgba(255,255,255,.45)!important}
.hdots button.on{width:80px!important;background:#e50914!important}
.hdots button:hover,.hdots button:focus-visible{background:#fff!important}

/* dernière carte d'une ligne : « Voir tous… » */
.card.endcard{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;padding:12px;background:linear-gradient(160deg,#262626,#161616);border:1.5px dashed rgba(255,255,255,.28);color:#e5e5e5}
.endcard .ec-ico{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:rgba(255,255,255,.12);font-size:30px;line-height:1;padding-bottom:4px}
.endcard b{font-size:clamp(12px,1.05vw,16px);line-height:1.2}
.endcard .ec-n{font-size:clamp(11px,.9vw,14px);color:#a3a3a3;line-height:1.2}
.endcard:hover,.endcard:focus{border-color:#e50914;color:#fff}
.endcard:hover .ec-ico,.endcard:focus .ec-ico{background:#e50914}

/* loader de démarrage */
.splash{display:grid;place-items:center;min-height:70vh;font-size:0}
.loader{width:56px;height:56px;border-radius:50%;border:5px solid rgba(255,255,255,.14);border-top-color:#e50914;animation:hfspin .85s linear infinite!important}

/* recherche ouverte : la loupe devient une croix */
#sbox .x-ico{display:none}
#sbox.open .s-ico{display:none}
#sbox.open .x-ico{display:block}
/* recherche plein écran + complétion */
#sov{position:fixed;inset:0;z-index:300;background:rgba(10,10,10,.97);overflow-y:auto;padding:5vh 6vw 8vh;animation:sovin .15s ease-out}
@keyframes sovin{from{opacity:0}to{opacity:1}}
.sv-bar{display:flex;align-items:center;gap:16px;border-bottom:2px solid rgba(255,255,255,.3);padding:6px 4px 12px;max-width:1100px;margin:0 auto}
.sv-bar:focus-within{border-color:#e50914}
.sv-bar>svg{flex:none;color:#bbb}
#sovq{flex:1;min-width:0;background:none;border:0;outline:0;color:#fff;font:inherit;font-size:clamp(24px,3.2vw,42px);font-weight:600;-webkit-appearance:none;appearance:none}
#sovq::-webkit-search-cancel-button{display:none}
#sovq::placeholder{color:#777;font-weight:500}
.sv-x{flex:none;width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.1);color:#fff}
.sv-x:hover,.sv-x:focus{background:#fff;color:#000;outline:none}
.sv-res{max-width:1100px;margin:22px auto 0}
.sv-h{font-size:14px;letter-spacing:.06em;text-transform:uppercase;color:#9a9a9a;margin:18px 0 12px}
.sv-g{display:flex;flex-wrap:wrap;gap:10px}
.sv-g button{padding:8px 16px;border-radius:999px;background:rgba(255,255,255,.1);color:#eee;font-size:16px;font-weight:600}
.sv-g button:hover,.sv-g button:focus{background:#fff;color:#000;outline:none}
.sv-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 18px}
.sv-i{display:flex;align-items:center;gap:14px;padding:8px;border-radius:8px;background:rgba(255,255,255,.04);text-align:left;color:#eee;min-width:0}
.sv-i:hover,.sv-i:focus{background:rgba(255,255,255,.14);outline:2px solid #e50914;outline-offset:-2px}
.sv-p{flex:none;width:52px;aspect-ratio:2/3;border-radius:4px;overflow:hidden;background:#222;display:block}
.sv-p img{width:100%;height:100%;object-fit:cover;display:block}
.sv-t{display:flex;flex-direction:column;gap:3px;min-width:0}
.sv-t b{font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sv-t small{color:#9a9a9a;font-size:14px}
.sv-all{display:block;margin:22px 0 0;padding:12px 20px;border-radius:8px;background:#e50914;color:#fff;font-size:17px;font-weight:700}
.sv-all:hover,.sv-all:focus{background:#fff;color:#000;outline:none}
html.tv #sov{padding:4vh 4vw}
html.tv .sv-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (max-width:700px){.sv-grid{grid-template-columns:1fr}}
