:root {
  --bg: #0b0b0e;
  --bg-2: #121217;
  --surface: #17171d;
  --surface-2: #202029;
  --line: rgba(255, 255, 255, .08);
  --text: #f3f1ec;
  --muted: #9b99a6;
  --faint: #6c6a77;
  --accent: #ffb547;
  --accent-2: #ff8a3d;
  --accent-ink: #1d1305;
  --danger: #ff6b6b;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .55);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; overflow-x: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.hidden { display: none !important; }
svg.i { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }

/* ---------- En-tête ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: calc(14px + env(safe-area-inset-top)) var(--gutter) 14px;
  background: linear-gradient(to bottom, rgba(11, 11, 14, .96), rgba(11, 11, 14, .82));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; white-space: nowrap; }
.brand svg { width: 30px; height: 30px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 7px 13px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .15s, color .15s; }
.tab:hover { color: var(--text); background: var(--surface); }
.tab.on { color: var(--accent-ink); background: var(--accent); }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 11px; color: var(--faint); pointer-events: none; }
.search input {
  width: 220px; padding: 9px 12px 9px 36px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); outline: none; font-size: 14px; transition: border-color .15s, width .2s;
}
.search input:focus { border-color: rgba(255, 181, 71, .55); width: 260px; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; color: var(--text); background: var(--surface); border: 1px solid var(--line); flex: none; }
.icon-btn:hover { background: var(--surface-2); }
.share-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; white-space: nowrap; }
.share-btn:hover { background: var(--surface-2); }
.share-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.share-btn .dot.on { background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .18); }

/* ---------- Accueil ---------- */
.hero { position: relative; min-height: min(62vh, 560px); display: flex; align-items: flex-end; padding: 0 var(--gutter) 46px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 30%; transform: scale(1.03); }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 4%, rgba(11, 11, 14, .55) 45%, rgba(11, 11, 14, .15) 75%), linear-gradient(to right, rgba(11, 11, 14, .85), rgba(11, 11, 14, 0) 65%); }
.hero-body { position: relative; max-width: 640px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.hero h1 { font-family: var(--display); font-size: clamp(34px, 6vw, 64px); line-height: 1; letter-spacing: -.03em; margin: 0 0 14px; font-weight: 800; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--muted); font-size: 14px; }
.meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); }
.badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: .04em; border: 1px solid rgba(255, 255, 255, .22); color: var(--text); }
.badge.hot { border-color: transparent; background: var(--accent); color: var(--accent-ink); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 22px; border-radius: 999px; font-weight: 650; font-size: 15px; background: var(--surface-2); border: 1px solid var(--line); transition: transform .12s, background .15s; }
.btn:hover { background: #2a2a35; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { background: #ffc266; }
.btn.small { padding: 8px 14px; font-size: 13px; }
.btn.danger { color: var(--danger); }

.section { padding: 8px var(--gutter) 30px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 18px 0 14px; }
.section h2 { font-family: var(--display); font-size: 21px; letter-spacing: -.015em; margin: 0; font-weight: 700; }
.section .count { color: var(--faint); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px 16px; }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 300px); gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.row > * { scroll-snap-align: start; }

.card { display: block; min-width: 0; }
.poster { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: 0 6px 22px rgba(0, 0, 0, .35); transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s; }
.poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.poster .ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 18px; color: rgba(255, 255, 255, .7); background: radial-gradient(120% 120% at 20% 0%, #2b2633, #15151b 60%); }
.poster .corner { position: absolute; top: 9px; right: 9px; display: flex; gap: 5px; }
.poster .corner .badge { background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-color: rgba(255, 255, 255, .18); }
.poster .play-hint { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; background: rgba(0, 0, 0, .28); transition: opacity .2s; }
.poster .play-hint span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 181, 71, .95); color: var(--accent-ink); box-shadow: var(--shadow); }
.poster .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .18); }
.poster .bar i { display: block; height: 100%; background: var(--accent); }
.card:hover .poster { transform: translateY(-4px); box-shadow: var(--shadow); }
.card:hover .poster img { transform: scale(1.05); }
.card:hover .play-hint { opacity: 1; }
.card-title { margin: 10px 2px 3px; font-weight: 650; font-size: 15px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-sub { margin: 0 2px; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty { max-width: 560px; margin: 12vh auto; padding: 0 var(--gutter); text-align: center; color: var(--muted); line-height: 1.6; }
.empty h2 { color: var(--text); font-family: var(--display); }
.empty code { background: var(--surface); padding: 2px 7px; border-radius: 6px; color: var(--text); }
.status-line { display: flex; align-items: center; gap: 10px; padding: 10px var(--gutter) 0; color: var(--muted); font-size: 13px; }

/* ---------- Fiche ---------- */
.detail { position: relative; min-height: 100vh; }
.detail-bg { position: fixed; inset: 0; background-size: cover; background-position: center; filter: blur(2px) brightness(.55); transform: scale(1.04); }
.detail-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 18%, rgba(11, 11, 14, .55) 60%, rgba(11, 11, 14, .25)), linear-gradient(to right, rgba(11, 11, 14, .92), rgba(11, 11, 14, .1) 75%); }
.detail-body { position: relative; padding: calc(70px + env(safe-area-inset-top)) var(--gutter) 60px; max-width: 1100px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-bottom: 16vh; }
.back:hover { color: var(--text); }
.detail h1 { font-family: var(--display); font-size: clamp(34px, 6vw, 60px); line-height: 1.02; letter-spacing: -.03em; margin: 0 0 14px; font-weight: 800; }
.tracks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 34px; }
.panel { background: rgba(23, 23, 29, .78); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.panel h3 { margin: 0 0 10px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.panel li { display: flex; flex-direction: column; font-size: 14px; }
.panel li small { color: var(--faint); font-size: 12px; margin-top: 1px; }
.file-line { margin-top: 18px; font-size: 12px; color: var(--faint); word-break: break-all; }
.episodes { margin-top: 30px; display: grid; gap: 8px; }
.ep { display: grid; grid-template-columns: 160px 1fr auto; gap: 14px; align-items: center; padding: 8px; border-radius: var(--radius); background: rgba(23, 23, 29, .7); border: 1px solid var(--line); }
.ep:hover { background: rgba(32, 32, 41, .9); }
.ep.on { border-color: rgba(255, 181, 71, .55); }
.ep .poster { border-radius: var(--radius-sm); box-shadow: none; }
.ep .t { font-weight: 600; font-size: 15px; }
.ep .s { color: var(--muted); font-size: 13px; margin-top: 3px; }
.ep .d { color: var(--faint); font-size: 13px; padding-right: 8px; }
.season-title { margin: 26px 0 6px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ---------- Connexion ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(80% 60% at 15% 10%, rgba(255, 181, 71, .14), transparent 60%), radial-gradient(70% 60% at 100% 100%, rgba(255, 138, 61, .08), transparent 60%), var(--bg); }
.login-card { width: min(420px, 100%); background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px; padding: 34px 28px; box-shadow: var(--shadow); text-align: center; }
.login-card .brand { justify-content: center; font-size: 24px; margin-bottom: 8px; }
.login-card .brand svg { width: 40px; height: 40px; }
.login-card p { color: var(--muted); margin: 0 0 22px; line-height: 1.5; font-size: 15px; }
.login-card input { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: center; font-size: 18px; letter-spacing: .12em; outline: none; margin-bottom: 12px; }
.login-card input:focus { border-color: rgba(255, 181, 71, .6); }
.login-card .btn { width: 100%; }
.login-card .err { color: var(--danger); font-size: 14px; min-height: 20px; margin-top: 12px; }

/* ---------- Fenêtre de partage ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .15s ease; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.modal h2 { margin: 0 0 4px; font-family: var(--display); font-size: 22px; }
.modal .lead { color: var(--muted); margin: 0 0 18px; font-size: 14px; line-height: 1.5; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 7px; }
.copy { display: flex; gap: 8px; }
.copy input { flex: 1; min-width: 0; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-family: ui-monospace, "SF Mono", Menlo, monospace; outline: none; }
.note { font-size: 13px; color: var(--muted); line-height: 1.5; }
.modal-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

#toast { position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); z-index: 99; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 999px; background: #f3f1ec; color: #111; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Lecteur ---------- */
.player { position: fixed; inset: 0; z-index: 50; background: #000; overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player.idle { cursor: none; }
.p-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, rgba(0, 0, 0, .65), transparent 22%, transparent 62%, rgba(0, 0, 0, .8)); opacity: 1; transition: opacity .3s; }
.player.idle .p-shade, .player.idle .p-top, .player.idle .p-bottom { opacity: 0; pointer-events: none; }
.p-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 14px; padding: calc(16px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) 16px calc(18px + env(safe-area-inset-left)); transition: opacity .3s; }
.p-title { min-width: 0; }
.p-title b { display: block; font-family: var(--display); font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-title span { display: block; color: rgba(255, 255, 255, .65); font-size: 13px; margin-top: 2px; }
.p-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; color: #fff; transition: background .15s, transform .1s; flex: none; }
.p-btn:hover { background: rgba(255, 255, 255, .12); }
.p-btn:active { transform: scale(.92); }
.p-btn svg { width: 26px; height: 26px; fill: currentColor; }
.p-btn.sm svg { width: 22px; height: 22px; }
.p-btn.on { color: var(--accent); }
.p-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 calc(16px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left)); transition: opacity .3s; }
.p-seek { position: relative; height: 26px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.p-track { position: relative; width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); transition: height .15s; }
.p-seek:hover .p-track, .p-seek.drag .p-track { height: 6px; }
.p-buf, .p-played { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.p-buf { background: rgba(255, 255, 255, .35); }
.p-played { background: var(--accent); }
.p-knob { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255, 181, 71, .25); transform: scale(0); transition: transform .15s; }
.p-seek:hover .p-knob, .p-seek.drag .p-knob { transform: scale(1); }
.p-tip { position: absolute; bottom: 26px; padding: 4px 8px; border-radius: 6px; background: rgba(20, 20, 24, .92); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .12s; }
.p-seek:hover .p-tip, .p-seek.drag .p-tip { opacity: 1; }
.p-row { display: flex; align-items: center; gap: 4px; }
.p-time { font-size: 14px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .9); padding: 0 8px; white-space: nowrap; }
.p-spacer { flex: 1; }
.p-vol { display: flex; align-items: center; }
.p-vol input { width: 0; opacity: 0; transition: width .2s, opacity .2s; accent-color: var(--accent); }
.p-vol:hover input, .p-vol input:focus { width: 90px; opacity: 1; margin-right: 6px; }
.p-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.p-spinner { width: 54px; height: 54px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, .18); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.p-flash { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: rgba(0, 0, 0, .5); animation: flash .55s ease forwards; }
.p-flash svg { width: 40px; height: 40px; fill: #fff; }
.p-flash.txt { width: auto; height: auto; padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 18px; }
.p-big { pointer-events: auto; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; background: rgba(255, 181, 71, .95); color: var(--accent-ink); box-shadow: var(--shadow); }
.p-big svg { width: 44px; height: 44px; fill: currentColor; margin-left: 4px; }
.p-subs { position: absolute; left: 6%; right: 6%; bottom: 7%; text-align: center; pointer-events: none; transition: bottom .3s; }
.player:not(.idle) .p-subs { bottom: calc(96px + env(safe-area-inset-bottom)); }
.p-subs span { display: inline; padding: .08em .35em; line-height: 1.42; font-size: calc(var(--sub-scale, 1) * clamp(17px, 2.6vh + 9px, 60px)); font-weight: 600; color: #fff; background: rgba(0, 0, 0, var(--sub-bg, .55)); border-radius: 6px; text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 2px rgba(0, 0, 0, .9); -webkit-box-decoration-break: clone; box-decoration-break: clone; white-space: pre-line; }
.p-menu { position: absolute; right: calc(14px + env(safe-area-inset-right)); bottom: calc(84px + env(safe-area-inset-bottom)); width: min(380px, calc(100vw - 28px)); max-height: min(70vh, 560px); overflow-y: auto; background: rgba(18, 18, 23, .96); border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px; padding: 8px; box-shadow: var(--shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); animation: pop .16s ease; }
.p-menu h4 { margin: 10px 10px 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.p-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 10px; font-size: 14px; color: #e9e7e2; }
.p-opt:hover { background: rgba(255, 255, 255, .07); }
.p-opt .ck { width: 18px; color: var(--accent); flex: none; }
.p-opt .lbl { flex: 1; min-width: 0; }
.p-opt small { display: block; color: var(--faint); font-size: 12px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-opt.sel { color: #fff; font-weight: 600; }
.p-steps { display: flex; align-items: center; gap: 6px; padding: 4px 10px 8px; }
.p-steps button { padding: 6px 11px; border-radius: 8px; background: rgba(255, 255, 255, .08); font-size: 13px; font-weight: 600; }
.p-steps button:hover { background: rgba(255, 255, 255, .15); }
.p-steps button.sel { background: var(--accent); color: var(--accent-ink); }
.p-steps .val { min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); }
.p-divider { height: 1px; background: rgba(255, 255, 255, .08); margin: 6px 4px; }
.p-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 32px)); text-align: center; background: rgba(18, 18, 23, .95); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.p-msg p { color: var(--muted); line-height: 1.5; }
.p-next { position: absolute; right: calc(20px + env(safe-area-inset-right)); bottom: calc(110px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; border-radius: 14px; background: rgba(18, 18, 23, .95); border: 1px solid var(--line); box-shadow: var(--shadow); animation: pop .2s ease; }
.p-next img, .p-next .ph { width: 128px; aspect-ratio: 16/9; border-radius: 8px; object-fit: cover; background: var(--surface-2); }
.p-next small { display: block; color: var(--faint); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.p-next b { display: block; margin: 3px 0 8px; font-size: 15px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flash { 0% { opacity: 0; transform: scale(.8); } 25% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.15); } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 10px 12px; }
  .brand { order: 1; }
  .topbar .right { order: 2; margin-left: auto; display: flex; gap: 8px; }
  .search { order: 3; flex: 1 1 100%; }
  .search input, .search input:focus { width: 100%; }
  .tabs { order: 4; flex: 1 1 100%; }
  .share-btn span.l { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px 12px; }
  .row { grid-auto-columns: minmax(220px, 76vw); }
  .hero { min-height: 52vh; padding-bottom: 30px; }
  .back { margin-bottom: 18vh; }
  .ep { grid-template-columns: 112px 1fr; }
  .ep .d { display: none; }
  .p-vol, .p-skip { display: none; }
  .p-btn { width: 40px; height: 40px; }
  .p-time { font-size: 13px; padding: 0 4px; }
  .p-next { left: 16px; right: 16px; }
  .p-next img, .p-next .ph { width: 96px; }
}
@media (min-width: 761px) { .topbar .right { display: flex; gap: 10px; align-items: center; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Affiches et fiches TMDB ---------- */
.grid.posters { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 26px 18px; }
.poster.tall { aspect-ratio: 2 / 3; }
.poster.tall > img { object-fit: cover; }
.poster .ph-title { position: absolute; inset: auto 0 0 0; padding: 40px 12px 12px; font-family: var(--display); font-weight: 750; font-size: 17px; line-height: 1.15; background: linear-gradient(to top, rgba(0, 0, 0, .85), transparent); }
.hero .overview, .detail .overview { color: rgba(243, 241, 236, .86); font-size: 16px; line-height: 1.6; max-width: 640px; margin: 16px 0 0; }
.overview.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta .rating { color: var(--accent); font-weight: 650; }
.detail-head { display: flex; gap: 34px; align-items: flex-end; }
.detail-poster { width: 220px; flex: none; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); border: 1px solid rgba(255, 255, 255, .08); }
.detail-info { min-width: 0; }
.detail .orig { color: var(--muted); font-size: 15px; margin: -6px 0 12px; font-style: italic; }
.tagline { color: var(--accent); font-style: italic; margin: 14px 0 0; font-size: 15px; }
.credits { display: grid; gap: 6px; margin-top: 16px; font-size: 14px; color: rgba(243, 241, 236, .9); }
.credits span { display: inline-block; min-width: 98px; color: var(--faint); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); font-weight: 550; }
.btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.ep .o { color: var(--faint); font-size: 13px; margin-top: 5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.matches { display: grid; gap: 8px; max-height: 52vh; overflow-y: auto; }
.match { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 8px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.match:hover { border-color: rgba(255, 181, 71, .5); }
.match img, .match .nop { width: 54px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; background: var(--surface-2); flex: none; }
.match b { font-size: 15px; }
.match em { color: var(--muted); font-style: normal; }
.match small { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.match small.ov { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
@media (max-width: 760px) {
  .grid.posters { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 18px 10px; }
  .grid.posters .card-title { font-size: 13px; }
  .grid.posters .card-sub { font-size: 12px; }
  .detail-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .detail-poster { width: 140px; }
  .hero .overview { font-size: 14px; }
}

/* =================== Style Apple TV =================== */
:root {
  --bg: #000;
  --bg-2: #141416;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --line: rgba(255, 255, 255, .1);
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #6e6e73;
  --accent: #f5f5f7;
  --accent-ink: #000;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Inter", sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Inter", sans-serif;
  --glass: rgba(255, 255, 255, .14);
}
body { background: #000; letter-spacing: -.003em; }

/* Barre du haut : transparente sur l'image, verre dépoli au défilement */
.topbar {
  position: fixed; left: 0; right: 0; top: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0));
  border-bottom: 1px solid transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}
.topbar.solid { background: rgba(22, 22, 24, .72); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); border-bottom-color: rgba(255, 255, 255, .08); }
.brand { font-size: 18px; font-weight: 650; }
.brand svg { width: 28px; height: 28px; }
.tabs { flex: 0 1 auto; margin: 0 auto; padding: 4px; gap: 2px; border-radius: 999px; background: rgba(120, 120, 128, .24); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.tab { padding: 6px 16px; color: rgba(245, 245, 247, .82); font-weight: 590; }
.tab:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.tab.on { background: rgba(245, 245, 247, .95); color: #000; }
.search input { background: rgba(120, 120, 128, .24); border-color: transparent; width: 200px; }
.search input:focus { border-color: rgba(255, 255, 255, .35); width: 240px; }
.share-btn { background: rgba(120, 120, 128, .24); border-color: transparent; }
main.nohero { padding-top: 96px; }

/* Grand visuel en tête, en carrousel */
.hero { min-height: min(86vh, 860px); padding: 0; display: block; }
.hero .slide { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 0 var(--gutter) 92px; opacity: 0; pointer-events: none; transition: opacity 1s ease; }
.hero .slide.on { opacity: 1; pointer-events: auto; }
.hero-bg { transform: none; background-position: center 22%; }
.hero .slide.on .hero-bg { animation: kenburns 16s ease-out both; }
.hero-bg::after { background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .55) 32%, rgba(0, 0, 0, 0) 62%), linear-gradient(to right, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0) 58%); }
.hero h1 { font-size: clamp(38px, 6.4vw, 76px); font-weight: 800; letter-spacing: -.035em; text-shadow: 0 4px 30px rgba(0, 0, 0, .35); }
.eyebrow { color: rgba(245, 245, 247, .7); letter-spacing: .08em; font-weight: 650; }
.eyebrow a:hover { text-decoration: underline; }
.hero .overview { max-width: 560px; color: rgba(245, 245, 247, .85); }
.dots { position: absolute; right: var(--gutter); bottom: 98px; display: flex; gap: 8px; z-index: 2; }
.dots button { width: 7px; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .35); transition: width .3s, background .3s; }
.dots button.on { width: 22px; background: #fff; }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }

/* Boutons : pilule blanche + verre */
.btn { border-radius: 12px; padding: 12px 24px; font-weight: 650; border: 0; }
.btn.primary { background: #f5f5f7; color: #000; }
.btn.primary:hover { background: #fff; transform: scale(1.03); }
.btn.glass { background: var(--glass); color: #fff; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.btn.glass:hover { background: rgba(255, 255, 255, .24); }
.badge { border-color: rgba(245, 245, 247, .45); color: rgba(245, 245, 247, .9); border-radius: 4px; font-size: 10.5px; padding: 1px 5px; }
.badge.hot { background: #f5f5f7; color: #000; }

/* Rangées défilantes */
.section { padding: 0 0 14px; }
.section-head { padding: 0 var(--gutter); margin: 26px 0 12px; }
.section h2 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.see-all { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 14px; font-weight: 550; }
.see-all:hover { color: #fff; }
.see-all svg { width: 18px; height: 18px; }
.grid { padding: 0 var(--gutter); }
.hero + .section .section-head, .hero + .shelf-wrap .section-head { margin-top: -54px; position: relative; }
.hero + .shelf-wrap { position: relative; z-index: 1; }
.shelf-box { position: relative; }
.row { padding: 6px var(--gutter) 18px; gap: 18px; scrollbar-width: none; scroll-padding: 0 var(--gutter); }
.row::-webkit-scrollbar { display: none; }
.row.tall { grid-auto-columns: clamp(140px, 13vw, 210px); }
.row.wide { grid-auto-columns: clamp(260px, 26vw, 420px); }
.shelf-nav { position: absolute; top: 6px; bottom: 60px; width: var(--gutter); min-width: 40px; z-index: 3; display: grid; place-items: center; color: #fff; opacity: 0; transition: opacity .2s; background: linear-gradient(to right, rgba(0, 0, 0, .7), transparent); }
.shelf-nav.next { right: 0; background: linear-gradient(to left, rgba(0, 0, 0, .7), transparent); }
.shelf-nav.prev { left: 0; }
.shelf-nav svg { width: 34px; height: 34px; }
.shelf-box:hover .shelf-nav { opacity: 1; }
.shelf-box.at-start .prev, .shelf-box.at-end .next { opacity: 0 !important; pointer-events: none; }

/* Cartes : sans icône, légère élévation au survol */
.poster { border-radius: var(--radius); box-shadow: 0 2px 10px rgba(0, 0, 0, .4); background: #1c1c1e; }
.poster .play-hint { display: none; }
.card:hover .poster { transform: scale(1.045); box-shadow: 0 22px 44px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08); }
.card:hover .poster img { transform: none; }
.card-title { font-size: 14px; font-weight: 550; margin-top: 10px; color: rgba(245, 245, 247, .92); }
.card-sub { font-size: 12.5px; color: var(--faint); }
.poster .bar { left: 10px; right: 10px; bottom: 10px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.poster .bar i { background: #fff; border-radius: 4px; }
.poster .left { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 12px 22px; font-size: 12.5px; font-weight: 600; background: linear-gradient(to top, rgba(0, 0, 0, .75), transparent); }
.poster .corner .badge { background: rgba(0, 0, 0, .5); }
.grid.posters { gap: 28px 18px; }

/* Fiche film : grand fond, texte en bas à gauche */
.detail-bg { filter: none; transform: none; background-position: center 20%; }
.detail-bg::after { background: linear-gradient(to top, #000 22%, rgba(0, 0, 0, .7) 48%, rgba(0, 0, 0, .1) 78%), linear-gradient(to right, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0) 62%); }
.detail-body { max-width: none; padding-top: 44vh; }
.detail-head { display: block; max-width: 760px; }
.detail h1 { font-size: clamp(36px, 5.6vw, 68px); font-weight: 800; letter-spacing: -.035em; }
.tagline { color: rgba(245, 245, 247, .7); }
.panel { background: rgba(28, 28, 30, .72); border-color: rgba(255, 255, 255, .06); border-radius: 14px; }
.ep { background: rgba(28, 28, 30, .6); border-color: transparent; border-radius: 14px; grid-template-columns: 200px 1fr auto; }
.ep:hover { background: rgba(44, 44, 46, .8); }
.ep.on { border-color: rgba(255, 255, 255, .35); }
.season-title { color: #fff; font-size: 20px; letter-spacing: -.02em; text-transform: none; font-weight: 700; }

/* Lecteur : accents blancs */
.p-played, .p-knob { background: #fff; }
.p-knob { box-shadow: 0 0 0 4px rgba(255, 255, 255, .25); }
.p-big { background: rgba(255, 255, 255, .18); color: #fff; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.p-btn.on { color: #fff; background: rgba(255, 255, 255, .16); }
.p-opt .ck { color: #fff; }
.p-steps button.sel { background: #f5f5f7; color: #000; }
.p-menu { background: rgba(30, 30, 32, .82); border-radius: 18px; }
.login { background: radial-gradient(80% 60% at 15% 10%, rgba(255, 255, 255, .08), transparent 60%), #000; }
#toast { background: rgba(245, 245, 247, .95); }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; background: rgba(0, 0, 0, .55); }
  .tabs { margin: 0; }
  .hero { min-height: 72vh; }
  .hero .slide { padding-bottom: 70px; }
  .dots { display: none; }
  .hero + .section .section-head, .hero + .shelf-wrap .section-head { margin-top: -30px; }
  .row.tall { grid-auto-columns: 118px; gap: 12px; }
  .row.wide { grid-auto-columns: 74vw; }
  .shelf-nav { display: none; }
  .detail-body { padding-top: 34vh; }
  .ep { grid-template-columns: 120px 1fr; }
  main.nohero { padding-top: 150px; }
}

/* ---------- Demandes de films ---------- */
.page { max-width: 1100px; margin: 0 auto; padding: 10px var(--gutter) 60px; }
.page-title { font-family: var(--display); font-size: clamp(30px, 4.4vw, 48px); font-weight: 800; letter-spacing: -.03em; margin: 0 0 8px; }
.page-lead { color: var(--muted); margin: 0 0 24px; font-size: 16px; line-height: 1.5; max-width: 640px; }
.page-h2 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin: 38px 0 14px; display: flex; gap: 10px; align-items: baseline; }
.page-h2 .count { color: var(--faint); font-size: 15px; font-weight: 500; }
.page .grid { padding: 0; }
.req-search { position: relative; display: flex; align-items: center; max-width: 560px; margin-bottom: 22px; }
.req-search svg { position: absolute; left: 16px; color: var(--faint); width: 22px; height: 22px; pointer-events: none; }
.req-search input { width: 100%; padding: 15px 18px 15px 48px; border-radius: 14px; border: 1px solid transparent; background: rgba(120, 120, 128, .24); font-size: 17px; outline: none; }
.req-search input:focus { border-color: rgba(255, 255, 255, .35); }
.req-btn { margin-top: 8px; width: 100%; padding: 8px 10px; }
.req-btn svg { width: 16px; height: 16px; }
.req-list { display: grid; gap: 10px; }
.req { display: flex; gap: 16px; padding: 12px; border-radius: 14px; background: rgba(28, 28, 30, .8); border: 1px solid transparent; }
.req.new { border-color: rgba(255, 255, 255, .3); }
.req > img, .req > .nop { width: 64px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; flex: none; background: var(--surface-2); }
.req-body { min-width: 0; flex: 1; }
.req-title { font-weight: 650; font-size: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.req-title em { color: var(--muted); font-style: normal; font-weight: 500; }
.req-who { color: var(--faint); font-size: 13px; margin-top: 4px; }
.req-note { font-size: 14px; color: rgba(245, 245, 247, .85); margin-top: 8px; padding: 8px 10px; background: rgba(255, 255, 255, .05); border-radius: 8px; }
.req-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill { font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: rgba(245, 245, 247, .85); }
.pill.st-added { background: rgba(10, 132, 255, .22); color: #64b5ff; }
.pill.st-refused { background: rgba(255, 69, 58, .16); color: #ff8a80; }
.pill.st-available { background: rgba(48, 209, 88, .2); color: #5be37d; }
.tab-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 99px; background: #ff453a; color: #fff; font-size: 11px; font-weight: 700; }
.input { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); outline: none; font-size: 15px; resize: vertical; }
.input:focus { border-color: rgba(255, 255, 255, .35); }

/* ---------- Comptes, Ma liste ---------- */
.user-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(120, 120, 128, .24); font-size: 14px; font-weight: 600; }
.user-btn:hover { background: rgba(120, 120, 128, .4); }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #5e5ce6, #bf5af2); color: #fff; font-size: 13px; font-weight: 700; }
.card { position: relative; }
.card-x { position: absolute; top: 8px; right: 8px; z-index: 3; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .2s, background .2s; }
.card-x svg { width: 16px; height: 16px; }
.card-x:hover { background: rgba(0, 0, 0, .85); }
.card:hover .card-x, .card-x:focus-visible { opacity: 1; }
@media (hover: none) { .card-x { opacity: 1; } }
.btn svg { width: 20px; height: 20px; }
.page.wide { max-width: none; }
.login-card input + input { margin-top: -2px; }
.login-card .hint { font-size: 13px; color: var(--faint); margin: 14px 0 0; }
@media (max-width: 760px) { .user-btn .l { display: none; } .user-btn { padding: 4px; } }
.login-card input { letter-spacing: normal; text-align: left; font-size: 16px; }
@media (max-width: 1400px) and (min-width: 761px) {
  .topbar { gap: 12px; }
  .tab { padding: 6px 11px; font-size: 13.5px; }
  .search input { width: 150px; }
  .search input:focus { width: 190px; }
  .share-btn span.l, .user-btn .l { display: none; }
  .user-btn { padding: 4px; }
}

/* ---------- Réglages ---------- */
.settings { max-width: 860px; }
.set-card { background: var(--surface-1, rgba(28, 28, 30, .8)); border-radius: 16px; overflow: hidden; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; flex-wrap: wrap; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-title { font-weight: 600; font-size: 15px; }
.set-desc { color: var(--faint); font-size: 13px; margin-top: 3px; max-width: 420px; line-height: 1.45; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: rgba(120, 120, 128, .24); flex-wrap: wrap; }
.seg button { padding: 6px 13px; border-radius: 8px; font-size: 13.5px; font-weight: 550; color: var(--muted); }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--seg-on, #636366); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.set-inline { display: flex; gap: 8px; }
.set-inline .input { width: 220px; }
.user-btn .avatar { flex: none; }


/* ---------- Photos de profil ---------- */
img.avatar { object-fit: cover; background: none; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 14px; }
.avatar-grid button { position: relative; aspect-ratio: 1; border-radius: 50%; padding: 0; transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s; }
.avatar-grid button img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.avatar-grid button:hover { transform: scale(1.07); }
.avatar-grid button.on { box-shadow: 0 0 0 3px #000, 0 0 0 6px #f5f5f7; transform: scale(1.04); }
.set-avatar { padding: 20px; }
.avatar-modal { width: min(520px, 100%); }
.avatar-modal .avatar-grid { grid-template-columns: repeat(4, 1fr); margin: 6px 0 4px; }
.btn[disabled] { opacity: .4; pointer-events: none; }

/* ---------- Marque AkiiraFlix ---------- */
.wordmark { font-family: var(--display); font-weight: 900; font-style: italic; letter-spacing: -.035em; text-transform: none; }
.wordmark b { color: #e3001b; font-weight: 900; }
.brand svg { border-radius: 8px; }
.login-card .wordmark { font-size: 28px; }
.req-reply { margin-top: 8px; padding: 8px 11px; border-radius: 8px; background: rgba(255, 69, 58, .14); color: #ff9b93; font-size: 14px; font-weight: 600; }
.req-reply span { color: var(--faint); font-weight: 500; font-size: 12.5px; margin-left: 6px; }

/* Cœur « Ma liste » sur les affiches */
.card-heart { position: absolute; top: 8px; left: 8px; z-index: 3; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s cubic-bezier(.2, .8, .2, 1), background .2s; }
.card-heart svg { width: 17px; height: 17px; }
.card:hover .card-heart, .card-heart:focus-visible { opacity: 1; transform: scale(1); }
.card-heart:hover { background: rgba(0, 0, 0, .8); }
.card-heart.on { opacity: 1; transform: scale(1); color: #ff375f; }
.card:hover .poster ~ .card-heart, .card-heart { will-change: transform; }
@media (hover: none) { .card-heart { opacity: 1; transform: scale(1); } }

/* Aperçu au survol de la barre de lecture */
.p-preview { position: absolute; bottom: 52px; left: 0; transform: translateX(-50%); padding: 3px; border-radius: 10px; background: rgba(20, 20, 22, .9); box-shadow: 0 10px 30px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .14); opacity: 0; pointer-events: none; transition: opacity .12s; }
.p-preview .pv-img { border-radius: 7px; background-color: #000; background-repeat: no-repeat; }
.player.previewing .p-preview { opacity: 1; }
.player.previewing .p-tip { opacity: 1; }
.pv-time { display: none; text-align: center; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 5px 0 2px; color: #fff; }
.player.touching .pv-time { display: block; }
.player.touching .p-preview { bottom: 78px; }
.player.touching .p-tip { display: none; }
.req { position: relative; }
.req-flag { position: absolute; top: 10px; right: 12px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #ff453a; color: #fff; }

/* ---------- Gestion des comptes ---------- */
.acct-list { display: grid; gap: 10px; }
.acct { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 14px; background: rgba(28, 28, 30, .8); flex-wrap: wrap; }
.avatar.big { width: 52px; height: 52px; font-size: 20px; flex: none; }
.acct-body { flex: 1; min-width: 200px; }
.acct-name { font-weight: 650; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acct-meta { color: var(--faint); font-size: 13px; margin-top: 3px; }
.acct-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.acct-stats b { color: var(--text); font-weight: 650; }
.acct-actions { display: flex; gap: 8px; }
.pill.warn { background: rgba(255, 159, 10, .16); color: #ffb340; }
.btn.danger { color: #ff6961; }
.acct-new .set-inline .input { width: 160px; }
@media (max-width: 760px) { .acct-new .set-inline { flex-wrap: wrap; } .acct-new .set-inline .input { width: 100%; } }

/* ---------- Statistiques d'un compte ---------- */
.acct { position: relative; transition: background .15s; }
.acct:hover { background: rgba(44, 44, 46, .9); }
.acct-link { position: absolute; inset: 0; border-radius: 14px; }
.acct-actions { position: relative; z-index: 1; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.back-link:hover { color: var(--text); }
.back-link svg { width: 18px; height: 18px; }
.stats-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.avatar.huge { width: 84px; height: 84px; font-size: 32px; }
.stats-head .page-title { margin: 0 0 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { background: rgba(28, 28, 30, .8); border-radius: 14px; padding: 16px; }
.stat-v { font-family: var(--display); font-size: 28px; font-weight: 750; letter-spacing: -.02em; }
.stat-l { color: var(--muted); font-size: 13px; margin-top: 2px; }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding: 18px 16px 12px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.bar { width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: linear-gradient(to top, #e3001b, #ff5a4e); }
.bar-v { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.bar-d { font-size: 11px; color: var(--faint); text-transform: uppercase; }
.stats-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.mini-list { display: grid; gap: 8px; }
.mini { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; background: rgba(28, 28, 30, .7); }
.mini img, .mini .nop { width: 40px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; background: var(--surface-2); flex: none; }
.mini-t { font-weight: 600; font-size: 14px; }
.mini-s { color: var(--faint); font-size: 12.5px; margin-top: 3px; display: flex; gap: 8px; align-items: center; }
.genres { display: grid; gap: 10px; }
.genre { display: grid; grid-template-columns: 110px 1fr 60px; gap: 10px; align-items: center; font-size: 14px; }
.genre-bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.genre-bar i { display: block; height: 100%; border-radius: 4px; background: #e3001b; }
.genre em { font-style: normal; color: var(--faint); font-size: 12.5px; text-align: right; }
@media (max-width: 760px) { .stats-cols { grid-template-columns: 1fr; } .chart { gap: 3px; padding: 14px 10px 10px; } .bar-v { display: none; } }

/* ---------- Notes ---------- */
.rate-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 14px; }
.rate-label { color: var(--faint); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.stars { display: inline-flex; flex-direction: row-reverse; }
.stars button { padding: 2px; color: rgba(255, 255, 255, .28); transition: color .12s, transform .12s; }
.stars button svg { width: 24px; height: 24px; }
.stars button.on { color: #ffcc00; }
/* survol : allume l'étoile pointée et les précédentes (ordre inversé) */
.stars:hover button { color: rgba(255, 255, 255, .28); }
.stars button:hover, .stars button:hover ~ button { color: #ffd84d !important; }
.stars button:hover { transform: scale(1.15); }
.rate-sum { color: var(--muted); font-size: 13px; }

/* ---------- Recommandations ---------- */
.reco-modal { width: min(560px, 100%); }
.members-tools { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 42vh; overflow-y: auto; padding: 2px; }
.member { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-align: left; font-weight: 600; font-size: 14px; }
.member .avatar { width: 34px; height: 34px; font-size: 14px; flex: none; }
.member span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .tick { margin-left: auto; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .25); color: transparent; flex: none; }
.member .tick svg { width: 14px; height: 14px; }
.member.on { border-color: rgba(255, 255, 255, .5); background: var(--surface-2); }
.member.on .tick { background: #fff; border-color: #fff; color: #000; }
.dot-new { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff453a; margin-right: 6px; vertical-align: 1px; }

/* ---------- Page Recommandé ---------- */
.reco-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
.reco { position: relative; display: flex; gap: 16px; padding: 12px; border-radius: 16px; background: rgba(28, 28, 30, .8); border: 1px solid transparent; }
.reco.new { border-color: rgba(255, 255, 255, .3); }
.reco-poster img, .reco-poster .nop { width: 96px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; display: block; background: var(--surface-2); }
.reco-body { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.reco-from { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); padding-right: 70px; }
.reco-from .avatar { width: 26px; height: 26px; font-size: 12px; flex: none; }
.reco-from b { color: var(--text); }
.reco-title { font-family: var(--display); font-size: 20px; font-weight: 750; letter-spacing: -.02em; margin-top: 10px; }
.reco-title:hover { text-decoration: underline; }
.reco-msg { margin-top: 8px; font-size: 14px; color: rgba(245, 245, 247, .85); font-style: italic; }
.reco-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; }
.reco-when { margin-left: auto; color: var(--faint); font-size: 12.5px; }
@media (max-width: 760px) { .reco-list { grid-template-columns: 1fr; } .reco-poster img, .reco-poster .nop { width: 76px; } }

/* Coin haut gauche des affiches : note perso + cœur au survol */
.card-tl { position: absolute; top: 8px; left: 8px; z-index: 3; display: flex; align-items: center; gap: 6px; }
.card-tl .card-heart { position: static; }
.card-rate { display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 8px 0 6px; border-radius: 99px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.card-rate svg { width: 13px; height: 13px; fill: #ffcc00; }
.card-tl .card-heart { width: 28px; height: 28px; }
.card-tl .card-heart svg { width: 15px; height: 15px; }
.card-rate .r-mine { display: none; }
.card:hover .card-rate.has-mine { background: #ffcc00; color: #000; }
.card:hover .card-rate.has-mine svg { fill: #000; }
.card:hover .card-rate.has-mine .r-tmdb { display: none; }
.card:hover .card-rate.has-mine .r-mine { display: inline; }
.card-rate.only-mine { display: none; }
.card:hover .card-rate.only-mine { display: inline-flex; }
.card-rate { transition: background .15s, color .15s; }

/* Accueil : deux rangées + « Montrer plus » */
.more-wrap { display: flex; justify-content: center; padding: 18px var(--gutter) 6px; }
.more-btn { padding: 10px 22px; font-size: 14px; }
.more-btn svg { width: 18px; height: 18px; }


/* =================== Animations et finitions =================== */
:root { --ease-out: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1); }

/* Transition de page */
#app.enter > main, #app.enter > .detail .detail-body, #app.enter > .login { animation: pageIn .5s var(--ease-out) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Apparition en cascade */
.rv { opacity: 0; transform: translateY(18px) scale(.985); transition: opacity .55s var(--ease-out) var(--d, 0ms), transform .65s var(--ease-out) var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; }
/* une fois apparue, la carte retrouve ses propres transitions sans délai */
.card.rv.in { transition-delay: 0ms; }

/* Images : brillance pendant le chargement puis fondu */
.poster, .reco-poster, .mini > .nop { background-image: linear-gradient(110deg, #1c1c1e 30%, #2a2a2d 50%, #1c1c1e 70%); background-size: 250% 100%; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.poster img, .reco-poster img, .mini img { opacity: 0; transition: opacity .5s ease, transform .5s var(--ease-out); }
.poster img.ready, .reco-poster img.ready, .mini img.ready { opacity: 1; }
.poster:has(img.ready) { animation: none; background-image: none; }

/* Affiches : inclinaison 3D + reflet qui suit la souris */
.card { perspective: 900px; }
.card .poster { transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0)) scale(var(--sc, 1)); transform-style: preserve-3d; transition: transform .45s var(--ease-out), box-shadow .35s var(--ease-out); will-change: transform; }
.card .poster.tilting { transition: transform .12s linear, box-shadow .35s var(--ease-out); }
.card:hover .poster { --sc: 1.05; --lift: -4px; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift)) scale(var(--sc)); }
.card .poster::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 55%); }
.card:hover .poster::before { opacity: 1; }
.card .poster::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.card-title, .card-sub { transition: color .25s ease, transform .35s var(--ease-out); }
.card:hover .card-title { color: #fff; transform: translateY(2px); }

/* Cœur et étoiles */
.card-heart.pop, .btn.pop { animation: heartPop .5s var(--spring); }
@keyframes heartPop { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }
.card-heart.on.pop svg { animation: heartBeat .6s ease; }
@keyframes heartBeat { 0%, 100% { filter: none; } 30% { filter: drop-shadow(0 0 6px rgba(255, 55, 95, .9)); } }
.stars button.pop { animation: starPop .5s var(--spring); }
@keyframes starPop { 0% { transform: scale(.6) rotate(-20deg); } 60% { transform: scale(1.35) rotate(8deg); } 100% { transform: scale(1); } }

/* Grand visuel : textes en cascade à chaque diapositive */
.hero .slide.on .hero-body > * { animation: heroIn .8s var(--ease-out) both; }
.hero .slide.on .hero-body > :nth-child(1) { animation-delay: .1s; }
.hero .slide.on .hero-body > :nth-child(2) { animation-delay: .18s; }
.hero .slide.on .hero-body > :nth-child(3) { animation-delay: .26s; }
.hero .slide.on .hero-body > :nth-child(4) { animation-delay: .34s; }
.hero .slide.on .hero-body > :nth-child(5) { animation-delay: .42s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(22px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
/* point actif qui se remplit pendant la diapositive */
.dots button { position: relative; overflow: hidden; }
.dots button.on { background: rgba(255, 255, 255, .35); }
.dots button.on::after { content: ""; position: absolute; inset: 0; background: #fff; border-radius: inherit; transform-origin: left; animation: dotFill 8s linear both; }
@keyframes dotFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Pages de films : zoom lent du fond, infos en cascade */
.detail-bg { animation: bgZoom 18s var(--ease-out) both; }
@keyframes bgZoom { from { transform: scale(1.08); } to { transform: scale(1); } }
.detail-info > * { animation: heroIn .7s var(--ease-out) both; }
.detail-info > :nth-child(2) { animation-delay: .06s; }
.detail-info > :nth-child(3) { animation-delay: .12s; }
.detail-info > :nth-child(4) { animation-delay: .18s; }
.detail-info > :nth-child(5) { animation-delay: .24s; }
.detail-info > :nth-child(6) { animation-delay: .3s; }
.detail-info > :nth-child(7) { animation-delay: .36s; }
.detail-info > :nth-child(8) { animation-delay: .42s; }

/* Boutons */
.btn { transition: transform .25s var(--spring), background .2s ease, box-shadow .25s ease; }
.btn.primary:hover { transform: translateY(-1px) scale(1.03); box-shadow: 0 10px 26px rgba(255, 255, 255, .12); }
.btn:active { transform: scale(.95); }
.btn svg { transition: transform .3s var(--spring); }
.more-btn:hover svg, .see-all:hover svg { transform: translateX(4px); }
.btn.primary:hover svg { transform: scale(1.12); }

/* Barre du haut et onglets */
.tab { transition: background .25s ease, color .25s ease, transform .25s var(--spring); }
.tab:active { transform: scale(.94); }
.user-btn, .share-btn { transition: background .2s ease, transform .25s var(--spring); }
.user-btn:hover, .share-btn:hover { transform: translateY(-1px); }
.user-btn:hover .avatar { transform: rotate(-8deg) scale(1.08); }
.avatar { transition: transform .35s var(--spring); }

/* Logo : les phares filent au survol */
.brand svg path[stroke] { transform-box: fill-box; transition: transform .3s ease; }
.brand:hover svg path[stroke] { animation: trail .7s ease-in-out infinite alternate; }
.brand:hover svg path[stroke]:nth-of-type(2) { animation-delay: .12s; }
.brand:hover svg path[stroke]:nth-of-type(3) { animation-delay: .24s; }
@keyframes trail { from { transform: translateX(2px) scaleX(.85); } to { transform: translateX(-4px) scaleX(1.15); } }
.brand svg circle { transform-box: fill-box; transform-origin: center; transition: transform .4s var(--spring); }
.brand:hover svg circle { transform: scale(1.06); }
.brand .wordmark b { display: inline-block; transition: transform .35s var(--spring), text-shadow .3s ease; }
.brand:hover .wordmark b { transform: skewX(-6deg) translateX(1px); text-shadow: 0 0 18px rgba(227, 0, 27, .55); }

/* Fenêtres et notifications : effet ressort */
.modal { animation: modalIn .42s var(--spring) both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
.modal-wrap { animation: fade .25s ease both; }
#toast { transition: opacity .25s ease, transform .45s var(--spring); }
#toast:not(.show) { transform: translate(-50%, 24px) scale(.92); }
.p-menu { animation: modalIn .32s var(--spring) both; transform-origin: bottom right; }

/* Lecteur */
.p-big { transition: transform .35s var(--spring), background .2s ease; }
.p-big:hover { transform: scale(1.08); background: rgba(255, 255, 255, .26); }
.p-btn svg { transition: transform .25s var(--spring); }
.p-btn:hover svg { transform: scale(1.12); }

/* Divers */
.season-title, .page-h2, .section-head h2 { letter-spacing: -.022em; }
.req, .reco, .acct, .ep, .mini { transition: opacity .55s var(--ease-out) var(--d, 0ms), transform .65s var(--ease-out) var(--d, 0ms), background .2s ease, border-color .2s ease; }
.ep:hover, .reco:hover { transform: translateX(3px); }
.set-card, .stat { transition: transform .3s var(--ease-out); }
.stat:hover { transform: translateY(-2px); }
.bar { transform-origin: bottom; animation: barGrow .8s var(--ease-out) both; }
.bar-col:nth-child(n) .bar { animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.genre-bar i { transform-origin: left; animation: barGrowX .9s var(--ease-out) both; }
@keyframes barGrowX { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1 !important; transform: none !important; }
  .card .poster { transform: none !important; }
}
.poster:has(.ph), .poster:not(:has(img)) { animation: none; background-image: none; }

/* Sélecteur de saison */
.seasons { margin-top: 30px; }
.season-picker { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px; margin-bottom: 14px; border-radius: 14px; background: rgba(120, 120, 128, .2); width: max-content; max-width: 100%; }
.season-picker::-webkit-scrollbar { display: none; }
.season-picker button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 16px; border-radius: 10px; font-size: 14.5px; font-weight: 650; color: rgba(245, 245, 247, .75); white-space: nowrap; transition: background .25s ease, color .25s ease, transform .25s var(--spring); }
.season-picker button span { font-size: 11px; font-weight: 500; color: var(--faint); }
.season-picker button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.season-picker button:active { transform: scale(.95); }
.season-picker button.on { background: #f5f5f7; color: #000; }
.season-picker button.on span { color: #48484a; }
.seasons .season-title { margin: 0 0 12px; }
.seasons .season-title .count { color: var(--faint); font-weight: 500; font-size: 15px; }
.episodes[hidden] { display: none; }

/* Rangées défilantes : de la place pour le zoom + soulèvement au survol (sinon le haut est coupé) */
.row { padding-top: 22px; padding-bottom: 26px; margin-top: -16px; margin-bottom: -8px; }
.shelf-nav { top: 22px; bottom: 66px; }

/* ---------- Cœur « Ma liste » : effet au clic ---------- */
/* L'animation passe par « scale » (propriété séparée de transform) pour ne jamais être écrasée par le survol */
.card-heart, .fav-btn .fav-ico { position: relative; }
.card-heart:hover svg { scale: 1.15; }
.card-heart svg, .fav-btn .fav-ico svg { transition: scale .25s var(--spring); }
.card-heart.pop svg, .fav-btn.pop .fav-ico svg { animation: likePop .55s var(--spring); }
.card-heart.unpop svg, .fav-btn.unpop .fav-ico svg { animation: likeUnpop .35s ease; }
@keyframes likePop { 0% { scale: 1; } 25% { scale: .7; } 60% { scale: 1.45; } 100% { scale: 1; } }
@keyframes likeUnpop { 0% { scale: 1; } 40% { scale: .75; } 100% { scale: 1; } }
/* onde rouge qui s'échappe du cœur */
.card-heart::after, .fav-btn .fav-ico::after { content: ""; position: absolute; left: 50%; top: 50%; width: 100%; height: 100%; border-radius: 50%; pointer-events: none; opacity: 0;
  transform: translate(-50%, -50%) scale(.4); box-shadow: 0 0 0 2px #ff375f, 0 0 0 6px rgba(255, 55, 95, .35); }
.fav-btn .fav-ico::after { width: 26px; height: 26px; }
.card-heart.pop::after, .fav-btn.pop .fav-ico::after { animation: likeRing .6s ease-out; }
@keyframes likeRing { 0% { opacity: .9; transform: translate(-50%, -50%) scale(.4); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.9); } }
.card-heart.pop { animation: none; }

/* Bouton cœur des pages de films / séries */
.fav-btn .fav-ico { display: inline-grid; place-items: center; width: 20px; height: 20px; }
.fav-btn .fav-ico svg { width: 20px; height: 20px; }
.fav-btn.on { background: rgba(255, 55, 95, .16); }
.fav-btn.on .fav-ico svg { fill: #ff375f; }
.fav-btn.on:hover { background: rgba(255, 55, 95, .24); }
.fav-btn.pop { animation: none; }
.card-heart.on.pop svg { animation: likePop .55s var(--spring); }


/* ---------- Apparition fluide (remplace la version par transition) ---------- */
/* Animation par keyframes : le délai ne touche que l'apparition, jamais le survol */
.rv { opacity: 0; transform: none; transition: none; }
.rv.in { opacity: 1; animation: revealIn .5s var(--ease-out) var(--d, 0ms) backwards; }
@keyframes revealIn { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
.ep.rv.in { animation-duration: .38s; }
@keyframes revealInEp { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
.ep.rv.in { animation-name: revealInEp; }
/* les transitions de survol retrouvent leur rythme normal */
.ep, .req, .reco, .acct, .mini { transition: background .2s ease, border-color .2s ease, transform .3s var(--ease-out); }
.card.rv.in { transition: none; }

/* Allègements pendant les animations */
.panel, .detail .panel { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(28, 28, 30, .86); }
.ep .poster { animation: none; background-image: none; background-color: #1c1c1e; }
.ep .poster img { transition: opacity .35s ease; }
.detail-bg { will-change: transform; backface-visibility: hidden; }
.ep { contain: layout paint; }
@media (prefers-reduced-motion: reduce) { .rv.in { animation: none; } }
