:root {
  /* Identité « Nocturne » — encre profonde + accent doux (champagne), utilisé avec parcimonie */
  --accent: #d9c290;
  --accent-soft: rgba(217, 194, 144, 0.15);
  --accent-line: rgba(217, 194, 144, 0.5);
  --accent-2: #8aa0c0;
  --on-accent: #2a2310;
  --red: var(--accent);       /* compat anciennes règles */
  --red-glow: var(--accent);

  --bg: #0a0d12;
  --bg-2: #0e131a;
  --text: #eef1f7;
  --muted: #98a3b4;
  --dim: #5e6979;

  /* Surfaces (verre allégé, plus épuré) */
  --glass: rgba(20, 24, 32, 0.5);
  --glass-strong: rgba(13, 17, 23, 0.82);
  --glass-brd: rgba(255, 255, 255, 0.09);
  --glass-hi: rgba(255, 255, 255, 0.15);
  --blur: 18px;

  --rail-w: 72px;
  --nav-h: 64px;
  --radius: 14px;
  --radius-lg: 22px;
  --gap: 12px;
  --gutter: clamp(22px, 4.5vw, 76px);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { display: block; }
.ic { width: 22px; height: 22px; fill: currentColor; flex: 0 0 auto; }
::-webkit-scrollbar { width: 0; height: 0; }

/* Fond apaisé : voile très discret, statique */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60% 42% at 12% -6%, rgba(217, 194, 144, 0.06), transparent 68%),
    radial-gradient(52% 46% at 96% 4%, rgba(138, 160, 192, 0.05), transparent 70%);
}

/* Utilitaire verre */
.glass {
  background: var(--glass); backdrop-filter: blur(var(--blur)) saturate(180%); -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  border: 1px solid var(--glass-brd);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* ---------------- Gates ---------------- */
.gate { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px; }
.gate-card {
  width: 100%; max-width: 380px; border-radius: var(--radius-lg); padding: 40px 32px; text-align: center;
  background: var(--glass-strong); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--glass-brd); box-shadow: inset 0 1px 0 var(--glass-hi), 0 30px 80px rgba(0,0,0,0.6);
}
.gate-logo { font-weight: 900; letter-spacing: 1px; font-size: 32px; margin-bottom: 18px; background: linear-gradient(120deg, #fff, var(--red)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gate-card h1 { font-size: 24px; margin: 0 0 22px; }
.gate-card input {
  width: 100%; padding: 15px 16px; margin-bottom: 14px; font-size: 16px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--glass-brd); border-radius: 12px; color: var(--text);
}
.gate-card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,194,144,0.30); }
.gate-card button[type="submit"] {
  width: 100%; padding: 15px; background: var(--accent); color: var(--on-accent);
  font-size: 16px; font-weight: 700; border-radius: 12px; transition: transform 0.15s, filter 0.15s;
}
.gate-card button[type="submit"]:hover { filter: brightness(1.1); transform: translateY(-1px); }
.gate-error { color: #ff6b6b; min-height: 20px; margin-top: 12px; font-size: 14px; }
.setup-card { max-width: 460px; }
.setup-card p, .setup-card ol { color: var(--muted); line-height: 1.9; }
/* Connexion / inscription + apporte ton abonnement */
.auth-tabs { display: flex; gap: 6px; background: rgba(255,255,255,0.05); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.auth-tab { flex: 1; padding: 10px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); transition: 0.15s; }
.auth-tab.on { background: var(--glass-strong); color: #fff; box-shadow: inset 0 1px 0 var(--glass-hi); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input { width: 100%; }
.xsetup-sub { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0 0 18px; text-align: left; }
.xs-logout { margin-top: 16px; color: var(--dim); font-size: 13px; background: none; }
.xs-logout:hover { color: #fff; }
.setup-card code { background: rgba(255,255,255,0.1); color: #fff; padding: 2px 7px; border-radius: 6px; }

/* ---------------- Navigation : barre du haut en verre, pilule centrée ---------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: calc(var(--nav-h) + var(--safe-top));
  padding: var(--safe-top) clamp(14px, 3.5vw, 40px) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: linear-gradient(180deg, rgba(10,13,18,0.55), transparent); transition: background 0.3s var(--ease);
}
.nav.solid { background: linear-gradient(180deg, rgba(10,13,18,0.88), rgba(10,13,18,0.35)); }
.nav-l, .nav-r { flex: 1 1 0; display: flex; align-items: center; min-width: 0; }
.nav-r { justify-content: flex-end; }
.nav-links {
  flex: 0 0 auto; display: flex; align-items: center; gap: 2px; padding: 6px;
  border-radius: 999px;
  background: var(--glass-strong); backdrop-filter: blur(var(--blur)) saturate(180%); -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  border: 1px solid var(--glass-brd); box-shadow: inset 0 1px 0 var(--glass-hi), 0 8px 28px rgba(0,0,0,0.35);
}
.nav-links a {
  display: flex; align-items: center; gap: 6px; color: #cfd3df; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap; padding: 8px 16px; border-radius: 999px; transition: color 0.18s, background 0.18s;
}
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: var(--accent); background: var(--accent-soft); }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; color: #fff; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--glass-brd); box-shadow: inset 0 1px 0 var(--glass-hi); transition: background 0.15s; }
.icon-btn:hover { background: rgba(255,255,255,0.16); }
.avatar { width: 42px; height: 42px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--glass-brd); color: #fff; font-weight: 700; font-size: 15px; display: grid; place-items: center; box-shadow: inset 0 1px 0 var(--glass-hi); }

/* ---------------- Héro ---------------- */
.hero { position: relative; width: 100%; aspect-ratio: 16 / 8; max-height: 86vh; min-height: 560px; overflow: hidden; }
#hero-shuffle { display: none; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s var(--ease); }
.hero-slide.on { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.hero-fade-b { position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 0%, var(--bg) 7%, rgba(10,13,18,0.85) 17%, rgba(10,13,18,0.4) 33%, rgba(10,13,18,0.12) 50%, transparent 72%); }
.hero-fade-l { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,13,18,0.85) 0%, rgba(10,13,18,0.25) 40%, transparent 66%); }
.hero-content { position: absolute; left: var(--gutter); bottom: clamp(80px, 17vh, 160px); max-width: min(640px, 82vw); z-index: 3; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border: 1px solid var(--glass-brd); }
.hero-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red-glow); }
.hero-title { font-size: clamp(30px, 5.2vw, 62px); font-weight: 900; line-height: 1.02; margin: 0 0 14px; text-shadow: 0 4px 24px rgba(0,0,0,0.6); }
.hero-meta { display: flex; gap: 12px; color: #dfe3ee; font-size: 14px; margin-bottom: 14px; font-weight: 600; flex-wrap: wrap; }
.hero-meta .star { color: #ffce3a; }
.hero-desc { font-size: clamp(14px, 1.4vw, 18px); color: #e3e6ef; line-height: 1.5; margin: 0 0 22px; text-shadow: 0 1px 10px rgba(0,0,0,0.7); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 28px; border-radius: 14px; font-size: 16px; font-weight: 700; transition: transform 0.12s var(--spring), filter 0.15s, background 0.15s; }
.btn:active { transform: scale(0.96); }
.btn-play { background: #fff; color: #0b0b0f; box-shadow: 0 6px 22px rgba(255,255,255,0.18); }
.btn-play:hover { filter: brightness(0.92); }
.btn-glass { background: rgba(255,255,255,0.12); backdrop-filter: blur(12px); color: #fff; border: 1px solid var(--glass-brd); box-shadow: inset 0 1px 0 var(--glass-hi); }
.btn-glass:hover { background: rgba(255,255,255,0.2); }
.btn-red { background: var(--accent); color: var(--on-accent); }
.btn-red:hover { filter: brightness(1.08); }
.hero-dots { position: absolute; right: var(--gutter); bottom: clamp(80px, 17vh, 160px); z-index: 3; display: flex; gap: 8px; }
.hero-dot { width: 9px; height: 9px; border-radius: 999px; background: rgba(255,255,255,0.35); cursor: pointer; transition: all 0.3s var(--ease); }
.hero-dot.on { background: var(--red); width: 26px; box-shadow: 0 0 12px var(--red-glow); }

/* ---------------- Rangées ---------------- */
.rows { position: relative; z-index: 4; margin-top: -3vh; padding-bottom: calc(60px + var(--safe-bottom)); }
.rows.no-hero { margin-top: calc(var(--nav-h) + var(--safe-top) + 26px); }
.chips { position: sticky; top: calc(var(--nav-h) + var(--safe-top)); z-index: 30; display: flex; gap: 8px; overflow-x: auto; padding: 12px var(--gutter); scrollbar-width: none; }
.chips.hidden { display: none !important; }
.chip { flex: 0 0 auto; padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #d4d8e3; cursor: pointer; white-space: nowrap; background: rgba(255,255,255,0.07); border: 1px solid var(--glass-brd); backdrop-filter: blur(10px); transition: all 0.2s; }
.chip:hover { background: rgba(255,255,255,0.14); }
.chip.on { background: rgba(255,255,255,0.16); color: #fff; border-color: transparent; font-weight: 700; }
.row { margin: 0 0 18px; animation: fadeup 0.34s var(--ease) both; }
@keyframes fadeup { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.row-title { font-size: clamp(15px, 1.4vw, 22px); font-weight: 800; margin: 0 0 2px; padding: 0 var(--gutter); color: #eef0f6; letter-spacing: 0.2px; display: flex; align-items: baseline; gap: 12px; }
.see-all { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 1px; opacity: 0.65; transition: opacity 0.15s, color 0.15s; white-space: nowrap; }
.see-all .ic { width: 15px; height: 15px; }
.see-all:hover { opacity: 1; color: #fff; }
.row-scroller { display: flex; gap: var(--gap); overflow-x: auto; scroll-behavior: smooth; padding: 18px var(--gutter) 12px; scrollbar-width: none; }
.row-wrap { position: relative; }
.row-arrow { position: absolute; top: 4px; bottom: 4px; width: var(--gutter); z-index: 6; display: none; place-items: center; color: #fff; background: linear-gradient(90deg, rgba(10,13,18,0.85), transparent); }
.row-arrow.right { right: 0; background: linear-gradient(270deg, rgba(10,13,18,0.85), transparent); }
.row-arrow.left { left: 0; }
.row-arrow .ic { width: 30px; height: 30px; }
@media (hover: hover) { .row-wrap:hover .row-arrow { display: grid; } }

/* Guide TV */
.guide-chip { color: #fff; font-weight: 700; }
.guide-chip .ic { width: 15px; height: 15px; }
.guide-head { display: flex; align-items: center; gap: 14px; padding: 8px var(--gutter) 16px; flex-wrap: wrap; }
.guide-head h2 { font-size: 20px; font-weight: 800; margin: 0; }
.guide-head select { margin-left: auto; background: rgba(255,255,255,0.08); border: 1px solid var(--glass-brd); color: #fff; border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600; max-width: 60vw; }
.guide-list { padding: 0 var(--gutter); display: flex; flex-direction: column; gap: 6px; }
.guide-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 14px; cursor: pointer; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); transition: background 0.15s; }
.guide-row:hover { background: rgba(255,255,255,0.07); }
.guide-logo { flex: 0 0 auto; width: 64px; height: 44px; display: grid; place-items: center; background: rgba(255,255,255,0.05); border-radius: 8px; overflow: hidden; }
.guide-logo img { max-width: 90%; max-height: 90%; object-fit: contain; }
.guide-prog { flex: 1; min-width: 0; }
.guide-name { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.g-now { font-size: 13px; color: #e6e8ef; }
.g-now b { font-weight: 700; }
.g-now.muted { color: var(--dim); }
.g-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.g-bar { height: 4px; border-radius: 999px; background: rgba(255,255,255,0.15); margin: 6px 0 4px; overflow: hidden; max-width: 280px; }
.g-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--red-glow)); }
.g-next { font-size: 12px; color: var(--muted); }

/* Guide TV en GRILLE (façon décodeur) : chaînes en lignes, horaires en colonnes, programmes en blocs */
.epg { position: relative; overflow: auto; margin: 4px var(--gutter) 0; height: calc(100vh - 205px); border-radius: 16px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.02); -webkit-overflow-scrolling: touch; }
.epg .epg-head { display: flex; position: sticky; top: 0; z-index: 6; height: 42px; }
.epg .epg-corner { flex: 0 0 176px; position: sticky; left: 0; z-index: 7; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: capitalize; background: var(--glass-strong); backdrop-filter: blur(14px); border-right: 1px solid rgba(255,255,255,0.09); border-bottom: 1px solid rgba(255,255,255,0.09); }
.epg .epg-times { display: flex; background: var(--glass-strong); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,0.09); }
.epg .epg-time { flex: 0 0 auto; box-sizing: border-box; min-width: 0; display: flex; align-items: center; padding-left: 10px; font-size: 12px; font-weight: 600; color: var(--muted); border-left: 1px solid rgba(255,255,255,0.08); font-variant-numeric: tabular-nums; }
.epg .epg-rows { position: relative; }
.epg .epg-row { display: flex; height: 66px; }
.epg .epg-chan { flex: 0 0 176px; position: sticky; left: 0; z-index: 5; display: flex; align-items: center; gap: 9px; padding: 0 12px; cursor: pointer; background: #0e131a; border-right: 1px solid rgba(255,255,255,0.09); border-bottom: 1px solid rgba(255,255,255,0.05); transition: background 0.15s; }
.epg .epg-chan:hover { background: rgba(255,255,255,0.06); }
.epg .epg-logo { flex: 0 0 auto; width: 46px; height: 34px; display: grid; place-items: center; background: rgba(255,255,255,0.06); border-radius: 6px; overflow: hidden; }
.epg .epg-logo img { max-width: 92%; max-height: 92%; object-fit: contain; }
.epg .epg-chan span { font-size: 12.5px; font-weight: 600; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.epg .epg-track { position: relative; border-bottom: 1px solid rgba(255,255,255,0.05); }
.epg .epg-prog { position: absolute; top: 5px; bottom: 5px; box-sizing: border-box; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.07); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; justify-content: center; gap: 2px; transition: background 0.12s; }
.epg .epg-prog:hover { background: rgba(255,255,255,0.11); }
.epg .epg-prog.on { background: rgba(217,194,144,0.2); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-line); }
.epg .epg-prog.on b { color: #f7ecd2; }
.epg .epg-prog b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epg .epg-prog .pt { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.epg .epg-prog.on .pt { color: var(--accent); }
.epg .epg-empty { padding: 10px 14px; font-size: 12px; color: var(--dim); white-space: nowrap; }
.epg .epg-nowline { position: absolute; top: 0; bottom: 0; left: calc(176px + var(--nl, 0px)); width: 2px; background: var(--accent); z-index: 4; pointer-events: none; box-shadow: 0 0 10px var(--accent); }
/* fiche info d'un programme (au clic) */
.epg-info { text-align: left; }
.epg-info .ei-time { font-size: 12.5px; color: var(--muted); margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.epg-info .ei-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.epg-info .ei-desc { font-size: 14px; color: var(--muted); line-height: 1.5; margin-bottom: 16px; max-height: 30vh; overflow-y: auto; }
.epg-info .ei-watch { background: var(--accent); color: var(--on-accent); width: 100%; justify-content: center; margin-bottom: 8px; }
@media (max-width: 680px) { .epg { height: calc(100dvh - 250px); margin: 4px 10px 0; } .epg .epg-corner, .epg .epg-chan { flex-basis: 132px; } .epg .epg-nowline { left: calc(132px + var(--nl, 0px)); } }

/* Cartes */
.card { position: relative; flex: 0 0 auto; width: clamp(155px, 22vw, 260px); aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: rgba(255,255,255,0.04); cursor: pointer; transition: transform 0.3s var(--spring); will-change: transform; border: 1px solid rgba(255,255,255,0.06); }
.card img { width: 100%; height: 100%; object-fit: cover; }
.card .card-logo { width: 100%; height: 100%; display: grid; place-items: center; padding: 14px; background: rgba(255,255,255,0.04); }
.card .card-logo img { width: auto; max-width: 78%; max-height: 64%; object-fit: contain; }
.card-fallback { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; padding: 10px; background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)); font-weight: 700; font-size: 14px; color: #ccc; }
.card-grad { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 45%); pointer-events: none; }
.card-meta { position: absolute; left: 10px; right: 10px; bottom: 8px; z-index: 2; pointer-events: none; }
.card-name { font-size: 13px; font-weight: 700; line-height: 1.2; text-shadow: 0 1px 6px #000; }
.card-epg { font-size: 11px; color: #cdd2dd; margin-top: 3px; min-height: 13px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.card-live { position: absolute; top: 8px; left: 8px; z-index: 3; display: inline-flex; align-items: center; gap: 4px; background: rgba(10,12,16,0.72); color: #fff; backdrop-filter: blur(8px); border: 1px solid var(--glass-brd); font-size: 9.5px; font-weight: 800; letter-spacing: 0.5px; padding: 3px 7px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.card-live::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
.card-rating { position: absolute; top: 8px; left: 8px; z-index: 4; display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #ffce3a; background: rgba(10,10,14,0.7); backdrop-filter: blur(8px); border: 1px solid var(--glass-brd); box-shadow: 0 2px 8px rgba(0,0,0,0.45); }
.card-badge { position: absolute; top: 8px; right: 8px; z-index: 4; width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.card-badge .ic { width: 15px; height: 15px; }
.card-badge.done { background: var(--accent); color: var(--on-accent); }
.card-badge.prog { background: rgba(20,20,28,0.7); backdrop-filter: blur(8px); border: 1px solid var(--glass-brd); color: #fff; }
.card-badge.prog .ic { width: 12px; height: 12px; }
.card-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,0.25); z-index: 3; }
.card-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--red), var(--red-glow)); }
/* Films/séries : affiche propre + titre dessous */
.card.poster { aspect-ratio: auto; width: clamp(120px, 15vw, 180px); overflow: visible; background: transparent; border: 0; border-radius: 0; }
.card-media { position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.06); transition: box-shadow 0.25s, border-color 0.25s; }
/* placeholder shimmer en attendant l'affiche TMDB (jamais l'image provider d'abord) */
.card-ph { width: 100%; height: 100%; background: linear-gradient(100deg, rgba(255,255,255,0.04) 30%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.card-img-in { opacity: 0; transition: opacity 0.4s var(--ease); }
.card-img-in.on { opacity: 1; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-cap { padding: 8px 2px 0; }
.card.poster .card-name { position: static; font-size: 12.5px; font-weight: 600; color: #cfd3df; line-height: 1.3; text-shadow: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: hover) {
  .card.poster:hover { transform: scale(1.06) translateY(-4px); box-shadow: none; }
  .card.poster:hover .card-media { box-shadow: 0 18px 44px rgba(0,0,0,0.6); border-color: var(--glass-hi); }
  .card.poster:hover .card-name { color: #fff; }
}

/* Survol : actions rapides en verre */
.card-actions { position: absolute; inset: auto 8px 8px 8px; z-index: 4; display: flex; gap: 6px; opacity: 0; transform: translateY(6px); transition: all 0.2s var(--ease); }
.qa { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; color: #fff; background: rgba(20,20,28,0.6); backdrop-filter: blur(12px); border: 1px solid var(--glass-brd); }
.qa .ic { width: 16px; height: 16px; }
.qa.play { background: #fff; color: #0b0b0f; }
.qa.on { color: var(--red); }
@media (hover: hover) {
  .card:hover { transform: scale(1.07) translateY(-4px); z-index: 8; box-shadow: 0 18px 44px rgba(0,0,0,0.6); border-color: var(--glass-hi); }
}

/* ---------------- Focus télécommande / clavier (D-pad) — classe .navfocus posée par le JS ---------------- */
.navfocus { outline: none; }
.card.navfocus { z-index: 10; transform: scale(1.08) translateY(-4px); }
.card.poster.navfocus { transform: scale(1.06) translateY(-4px); }
.card.poster.navfocus .card-media { box-shadow: 0 0 0 3px var(--accent), 0 18px 44px rgba(0,0,0,0.65); border-color: var(--accent); }
.card:not(.poster).navfocus { box-shadow: 0 0 0 3px var(--accent), 0 18px 44px rgba(0,0,0,0.65); border-color: var(--accent); }
.sim-card.navfocus { transform: scale(1.07); box-shadow: 0 0 0 3px var(--accent); }
.nav-links a.navfocus, #nav-settings.navfocus, .icon-btn.navfocus, .avatar.navfocus, .btn.navfocus,
.chip.navfocus, .season-chip.navfocus, .round-btn.navfocus, .play-pill.navfocus, .sheet-btn.navfocus,
.hist-item.navfocus, .guide-row.navfocus, .ap-btn.navfocus, .ep-more.navfocus, .bn-item.navfocus {
  box-shadow: 0 0 0 3px var(--accent); color: #fff;
}
.episode.navfocus { box-shadow: 0 0 0 2px var(--accent); border-color: var(--accent); }

/* Top 10 */
.row.top10 .row-scroller { align-items: flex-end; }
.top10-item { display: flex; align-items: flex-end; flex: 0 0 auto; }
.top10-rank { font-size: clamp(70px, 9vw, 120px); font-weight: 900; line-height: 0.78; color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,0.35); margin-right: -18px; z-index: 1; }
.top10-item .card { width: clamp(110px, 13vw, 160px); }
.top10-item .card-cap { display: none; }
.top10-rank { align-self: flex-end; }

/* ---------------- Page de recherche dédiée ---------------- */
.search-page { position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; background: rgba(10,13,18,0.92); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); }
.search-head { display: flex; align-items: center; gap: 12px; padding: calc(14px + var(--safe-top)) var(--gutter) 14px; }
.search-field { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 50px; border-radius: 16px; background: rgba(255,255,255,0.08); border: 1px solid var(--glass-brd); box-shadow: inset 0 1px 0 var(--glass-hi); }
.search-field .ic { width: 20px; height: 20px; color: var(--muted); }
.search-field input { flex: 1; background: none; border: 0; outline: none; color: #fff; font-size: 16px; }
/* masque la croix native (WebKit) — on garde notre propre bouton ✕ */
.search-field input[type="search"]::-webkit-search-cancel-button,
.search-field input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.sp-x { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; color: var(--muted); background: rgba(255,255,255,0.08); }
.sp-x .ic { width: 14px; height: 14px; }
.sp-cancel { color: var(--text); font-size: 15px; font-weight: 600; padding: 8px; white-space: nowrap; }
.sp-body { flex: 1; overflow-y: auto; padding: 6px var(--gutter) calc(40px + var(--safe-bottom)); }

.sp-hist-head { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 12px; }
.sp-hist-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.sp-hist-head button { color: var(--muted); font-size: 13px; font-weight: 600; }
.sp-hist { display: flex; flex-direction: column; gap: 2px; }
.hist-item { display: flex; align-items: center; gap: 12px; padding: 13px 6px; border-radius: 12px; cursor: pointer; transition: background 0.15s; }
.hist-item:hover { background: rgba(255,255,255,0.06); }
.hist-item .ic { width: 18px; height: 18px; color: var(--dim); flex: 0 0 auto; }
.hist-item span { flex: 1; font-size: 15px; }
.hist-item .rm { color: var(--dim); width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; }
.hist-item .rm .ic { width: 13px; height: 13px; }

.sp-tabs { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; top: 0; padding: 8px 0 14px; background: linear-gradient(180deg, rgba(10,13,18,0.95) 70%, transparent); z-index: 2; }
.sp-section { margin-bottom: 26px; }
.sp-section h3 { font-size: 16px; font-weight: 800; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.sp-section h3 .cnt { color: var(--dim); font-size: 13px; font-weight: 600; }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(130px, 14vw, 180px), 1fr)); gap: 18px 14px; }
.sp-grid.live { grid-template-columns: repeat(auto-fill, minmax(clamp(165px, 20vw, 220px), 1fr)); }
.sp-grid .card { width: 100%; }
.sr-empty { color: var(--muted); text-align: center; padding: 70px 20px; }

/* ---------------- Vue catégorie ---------------- */
.cat-head { display: flex; align-items: center; gap: 14px; padding: 0 var(--gutter) 18px; }
.cat-head h2 { margin: 0; font-size: clamp(20px,2.6vw,30px); font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-back { flex: 0 0 auto; }
.cat-head select { margin-left: auto; background: rgba(255,255,255,0.08); border: 1px solid var(--glass-brd); color: #fff; border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600; max-width: 52vw; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(110px, 13vw, 162px), 1fr)); gap: 18px 12px; padding: 0 var(--gutter) calc(48px + var(--safe-bottom)); }
.cat-grid.live { grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 20vw, 210px), 1fr)); }
.cat-grid .card { width: 100%; }
.cat-sentinel { grid-column: 1 / -1; height: 1px; }

/* ---------------- Lecteur ---------------- */
.player { position: fixed; inset: 0; z-index: 200; background: #000; display: flex; flex-direction: column; }
/* curseur masqué quand le lecteur est inactif (contrôles cachés) */
.player.idle, .player.idle * { cursor: none; }
/* pendant le chargement : on masque le transport central pour ne pas qu'il chevauche le spinner */
.player.loading .pc-center { opacity: 0; pointer-events: none; }
.player-top { position: absolute; top: 0; left: 0; right: 0; z-index: 4; display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-top)) 14px 30px; color: #fff; background: linear-gradient(180deg, rgba(0,0,0,0.85), transparent); }
.player-top span.ptitle { font-weight: 700; font-size: 17px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-top .pbtns { display: flex; gap: 6px; }
#video { width: 100%; flex: 1; min-height: 0; background: #000; }
.player-loading { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; color: #fff; background: rgba(0,0,0,0.5); pointer-events: none; }
.player-loading span { font-size: 14px; color: var(--muted); }
.spinner { width: 46px; height: 46px; border: 3px solid rgba(255,255,255,0.2); border-top-color: var(--red); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Surcouche de contrôle custom */
.player-ui { position: absolute; inset: 0; z-index: 3; pointer-events: none; transition: opacity 0.25s var(--ease); }
.player-ui.hide { opacity: 0; }
.player-ui .player-top, .player-ui .pctrls, .player-ui .pc-center, .player-ui .skip-intro, .player-ui .next-ep { pointer-events: auto; }
/* Transport central : −10 / lecture / +10 au milieu de l'écran */
.pc-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: clamp(24px, 7vw, 56px); }
.pc-cbtn { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 999px; color: #fff; font-size: 15px; font-weight: 700; background: rgba(18,20,28,0.5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--glass-brd); box-shadow: inset 0 1px 0 var(--glass-hi); transition: background 0.15s, filter 0.15s; }
.pc-cbtn:hover { background: rgba(255,255,255,0.18); }
.pc-cbtn .ic { width: 30px; height: 30px; }
.pc-cplay { width: 78px; height: 78px; background: rgba(255,255,255,0.14); }
.pc-cplay .ic { width: 38px; height: 38px; }
.skip-intro { position: absolute; right: max(clamp(16px,2vw,32px), env(safe-area-inset-right)); bottom: calc(150px + var(--safe-bottom)); display: inline-flex; align-items: center; gap: 6px; padding: 12px 20px; border-radius: 999px; font-size: 15px; font-weight: 700; color: #0b0b0f; background: rgba(255,255,255,0.92); box-shadow: 0 8px 24px rgba(0,0,0,0.4); animation: slideup 0.3s var(--spring); }
.skip-intro .ic { width: 16px; height: 16px; }
.next-ep { position: absolute; right: max(clamp(16px,2vw,32px), env(safe-area-inset-right)); bottom: calc(150px + var(--safe-bottom)); display: inline-flex; align-items: center; gap: 6px; padding: 12px 20px; border-radius: 999px; font-size: 15px; font-weight: 700; color: #fff; background: var(--glass-strong); backdrop-filter: blur(16px); border: 1px solid var(--glass-brd); box-shadow: 0 8px 24px rgba(0,0,0,0.4); animation: slideup 0.3s var(--spring); }
.next-ep .ic { width: 16px; height: 16px; }
/* Barre de contrôle flottante en verre (liquid glass) */
.pctrls { position: absolute; left: max(clamp(10px,2vw,28px), env(safe-area-inset-left)); right: max(clamp(10px,2vw,28px), env(safe-area-inset-right)); bottom: calc(14px + var(--safe-bottom)); padding: 13px clamp(14px,2vw,20px); border-radius: 22px; background: var(--glass-strong); backdrop-filter: blur(26px) saturate(180%); -webkit-backdrop-filter: blur(26px) saturate(180%); border: 1px solid var(--glass-brd); box-shadow: inset 0 1px 0 var(--glass-hi), 0 18px 44px rgba(0,0,0,0.55); display: flex; flex-direction: column; gap: 11px; }
.pc-seekrow { display: flex; align-items: center; gap: 12px; }
.pc-time { color: #d7dbe6; font-size: 12.5px; font-variant-numeric: tabular-nums; min-width: 44px; }
.pc-time:last-child { text-align: right; }
.pc-seek { flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.22); cursor: pointer; }
.pc-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); box-shadow: 0 1px 6px rgba(0,0,0,0.5); }
.pc-seek::-moz-range-thumb { width: 15px; height: 15px; border: 0; border-radius: 50%; background: var(--accent); }
.pc-btns { display: flex; align-items: center; gap: 7px; }
.pc-btn { display: grid; place-items: center; height: 42px; min-width: 42px; padding: 0 12px; border-radius: 999px; color: #fff; font-size: 14px; font-weight: 700; background: rgba(255,255,255,0.08); border: 1px solid var(--glass-brd); transition: background 0.15s, filter 0.15s; }
.pc-btn:hover { background: rgba(255,255,255,0.18); }
.pc-btn.on { color: var(--accent); }
.pc-btn.disabled { opacity: 0.3; pointer-events: none; }
.pc-btn.lbl { font-weight: 600; font-size: 13px; }
.pc-btn .ic { width: 20px; height: 20px; }
.pc-spacer { flex: 1; }
.pc-menu { position: absolute; bottom: calc(132px + var(--safe-bottom)); right: max(clamp(16px,2vw,32px), env(safe-area-inset-right)); min-width: 220px; max-height: 50vh; overflow-y: auto; padding: 8px; border-radius: 16px; z-index: 5; background: var(--glass-strong); backdrop-filter: blur(24px) saturate(180%); border: 1px solid var(--glass-brd); box-shadow: 0 20px 50px rgba(0,0,0,0.6); animation: slideup 0.2s var(--spring); pointer-events: auto; }
.pc-menu .mh { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 8px 12px 6px; }
.pc-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: 10px; font-size: 14px; cursor: pointer; color: #fff; }
.pc-opt:hover { background: rgba(255,255,255,0.1); }
.pc-opt.on { color: var(--red); font-weight: 700; }
.pc-opt .ic { width: 16px; height: 16px; }
@media (max-width: 560px) { .pc-btn.lbl { font-size: 12.5px; padding: 0 11px; } }

.player-epg { background: rgba(10,10,14,0.92); backdrop-filter: blur(20px); padding: 16px clamp(16px,4vw,40px) calc(18px + var(--safe-bottom)); max-height: 40vh; overflow-y: auto; border-top: 1px solid var(--glass-brd); }
.player-epg h3 { margin: 0 0 8px; font-size: 16px; }
.epg-item { display: flex; gap: 14px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.07); }
.epg-item:last-child { border: 0; }
.epg-time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; min-width: 56px; }
.epg-now .epg-time, .epg-now .epg-t { color: var(--red); }
.epg-t { font-size: 14px; font-weight: 600; }
.epg-d { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------------- Modal fiche (verre) ---------------- */
/* Fiche en PAGE COMPLÈTE (plus une fenêtre modale) */
.modal { position: fixed; inset: 0; z-index: 180; overflow-y: auto; -webkit-overflow-scrolling: touch; display: block; padding: 0; }
.modal-backdrop { display: none; }
.modal-card {
  position: relative; width: 100%; min-height: 100%; border-radius: 0; overflow: hidden; z-index: 1;
  background: #0c0d12; border: 0; box-shadow: none; animation: fadepage 0.3s var(--ease);
}
@keyframes fadepage { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* Tous les boutons retour partagent le style .icon-btn (cercle de verre, même survol) */
.modal-close { position: fixed; top: calc(14px + var(--safe-top)); left: max(16px, env(safe-area-inset-left)); right: auto; z-index: 6; }
/* largeur 100% + hauteur dérivée de la largeur (16/9) plafonnée — évite la bande noire sur grand écran */
.modal-hero { position: relative; width: 100%; height: min(56.25vw, 84vh); background: #0e0f15; }
.modal-hero img, .modal-hero iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.fade-img { opacity: 0; transition: opacity 0.45s var(--ease); }
/* Ouverture de fiche sans « saut » : squelette propre pendant TMDB, puis contenu final révélé d'un coup */
.modal-card.loading .modal-hero { background-image: linear-gradient(100deg, rgba(255,255,255,0.03) 30%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.03) 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
.modal-card.loading .modal-hero::after { content: ""; position: absolute; top: 50%; left: 50%; width: 32px; height: 32px; margin: -16px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.16); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
.modal-card.loading h2.m-title { min-height: 1.5em; width: min(56%, 420px); border-radius: 12px; color: transparent; background: linear-gradient(100deg, rgba(255,255,255,0.06) 30%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
.modal-card.loading .modal-plot { min-height: 4em; border-radius: 10px; background: linear-gradient(100deg, rgba(255,255,255,0.04) 30%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
.modal-body #m-meta, .modal-body #m-tagline, .modal-body #m-extra, .modal-body #m-cast, .modal-body #m-versions { transition: opacity 0.4s var(--ease); }
.modal-card.loading #m-meta, .modal-card.loading #m-tagline, .modal-card.loading #m-extra, .modal-card.loading #m-cast, .modal-card.loading #m-versions { opacity: 0; }
.ep-loading { padding: 26px 4px; color: var(--muted); font-size: 14px; }
.fade-img.on { opacity: 1; }
/* Bande-annonce auto : par-dessus l'image, fondu fluide, sans contrôles ni interaction */
.trailer-bg { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity 0.8s var(--ease); pointer-events: none; overflow: hidden; }
.trailer-bg.on { opacity: 1; }
.trailer-bg iframe, .trailer-bg #trailer-yt { width: 100%; height: 100%; border: 0; }
/* Bande-annonce manuelle : fenêtre modale dédiée */
.trailer-modal { position: fixed; inset: 0; z-index: 320; background: rgba(0,0,0,0.88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: grid; place-items: center; padding: 24px; animation: fade 0.2s; }
.tm-box { position: relative; width: min(1040px, 100%); aspect-ratio: 16 / 9; animation: pop 0.25s var(--spring); }
.tm-box iframe { width: 100%; height: 100%; border: 0; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.tm-close { position: absolute; top: -54px; right: 0; background: rgba(255,255,255,0.12); }
@keyframes pop { from { transform: scale(0.95); opacity: 0; } to { transform: none; opacity: 1; } }
/* Fondu progressif du bas de l'image vers le corps (pas de démarcation nette) */
.modal-hero-fade { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(0deg, #0c0d12 0%, rgba(12,13,18,0.95) 8%, rgba(12,13,18,0.55) 22%, rgba(12,13,18,0.15) 38%, transparent 58%),
  linear-gradient(90deg, rgba(12,13,18,0.45) 0%, transparent 30%); }
.modal-body { padding: 0 clamp(18px, 4vw, 44px) 70px; margin: -92px auto 0; position: relative; z-index: 1; background: transparent; max-width: 1200px; }
.modal-body h2 { margin: 0 0 12px; font-size: clamp(24px, 3vw, 36px); font-weight: 800; }
.modal-actions { display: flex; gap: 10px; margin: 4px 0 16px; flex-wrap: wrap; align-items: center; }
/* Style Infuse : pastille de lecture discrète + boutons ronds */
.fiche-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin: 8px 0 18px; }
.fiche-action-round { display: flex; align-items: center; gap: 10px; }
.play-pill { display: inline-flex; align-items: center; gap: 11px; height: 48px; padding: 0 22px; border-radius: 999px; background: rgba(255,255,255,0.12); border: 1px solid var(--glass-brd); backdrop-filter: blur(12px); color: #fff; font-size: 15px; font-weight: 600; box-shadow: inset 0 1px 0 var(--glass-hi); transition: background 0.15s; }
.play-pill:hover { background: rgba(255,255,255,0.2); }
.play-pill .ic { width: 19px; height: 19px; }
.pp-bar { width: 74px; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.28); overflow: hidden; }
.pp-bar > span { display: block; height: 100%; background: var(--accent); }
.pp-time { font-size: 14px; color: #e6e8ef; font-weight: 600; white-space: nowrap; }
.round-btn { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; background: rgba(255,255,255,0.1); border: 1px solid var(--glass-brd); color: #fff; transition: all 0.15s; }
.round-btn:hover { background: rgba(255,255,255,0.18); }
.round-btn .ic { width: 19px; height: 19px; }
.round-btn.on { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.round-btn.on-done { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
/* badges + menu épisodes */
.ep-badge { position: absolute; top: 6px; right: 6px; z-index: 2; width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,0.5); }
.ep-badge .ic { width: 13px; height: 13px; }
.ep-badge.done { background: var(--accent); color: var(--on-accent); }
.ep-badge.prog { background: rgba(20,20,28,0.75); backdrop-filter: blur(8px); border: 1px solid var(--glass-brd); color: #fff; }
.ep-badge.prog .ic { width: 11px; height: 11px; }
.episode { position: relative; }
.episode.is-done .ep-title { color: var(--muted); }
.ep-more { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; color: var(--muted); background: transparent; transition: all 0.15s; }
.ep-more:hover { color: #fff; background: rgba(255,255,255,0.1); }
.ep-more .ic { width: 18px; height: 18px; }
.modal-meta { color: var(--muted); font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.modal-meta .star { color: #ffce3a; font-weight: 700; }
.tag { padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,0.08); border: 1px solid var(--glass-brd); font-size: 12px; }
.modal-logo { max-width: min(56%, 360px); max-height: 120px; object-fit: contain; margin: 0 0 12px; filter: drop-shadow(0 4px 14px rgba(0,0,0,0.5)); }
.m-versions { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.m-versions:empty { display: none; }
.ver-lbl { color: var(--muted); font-size: 14px; font-weight: 600; }
.m-versions select { background: rgba(255,255,255,0.1); border: 1px solid var(--glass-brd); color: #fff; border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600; min-width: 160px; }
.modal-tagline { color: var(--muted); font-style: italic; font-size: 15px; margin: -4px 0 14px; }
.modal-tagline:empty { display: none; }
.modal-plot { color: #dfe2ec; line-height: 1.6; font-size: 15px; max-width: 820px; }
.sim-name { position: absolute; left: 6px; right: 6px; bottom: 6px; font-size: 11px; font-weight: 700; text-shadow: 0 1px 4px #000; opacity: 0; transition: opacity 0.2s; }
.sim-card:hover .sim-name { opacity: 1; }
.ep-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,0.28); overflow: hidden; z-index: 2; }
.ep-prog > span { display: block; height: 100%; background: var(--accent); }
.spoiler { filter: blur(6px); cursor: pointer; user-select: none; transition: filter 0.2s; position: relative; }
.spoiler:hover { filter: blur(5px) brightness(1.1); }
.switch { position: relative; width: 50px; height: 30px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,0.18); transition: 0.2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: 0.2s; }
.switch input:checked + span { background: var(--red); }
.switch input:checked + span::before { transform: translateX(20px); }
.section-h { font-size: 16px; font-weight: 800; margin: 24px 0 12px; }
/* Bloc d'infos curé (léger) */
.fiche-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 28px; margin: 18px 0 6px; }
.ff { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.ff-k { flex: 0 0 auto; min-width: 92px; color: var(--dim); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.ff-v { color: #d7dbe6; font-size: 14px; }
.details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 24px; }
.det { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.det-k { color: var(--dim); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.det-v { color: #e6e8ef; font-size: 14px; }
.cast-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.cast-item { flex: 0 0 auto; width: 92px; text-align: center; }
.cast-item .pic { width: 92px; height: 92px; border-radius: 999px; object-fit: cover; background: rgba(255,255,255,0.06); border: 1px solid var(--glass-brd); }
.cast-item .ph { width: 92px; height: 92px; border-radius: 999px; display: grid; place-items: center; background: rgba(255,255,255,0.06); font-size: 28px; }
.cast-item b { display: block; font-size: 12.5px; margin-top: 8px; line-height: 1.2; }
.cast-item span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.sim-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.sim-card { flex: 0 0 auto; width: 120px; aspect-ratio: 2/3; border-radius: 12px; overflow: hidden; cursor: pointer; position: relative; border: 1px solid rgba(255,255,255,0.06); transition: transform 0.2s var(--spring); }
.sim-card:hover { transform: scale(1.05); }
.sim-card img { width: 100%; height: 100%; object-fit: cover; }
/* Saisons en ONGLETS (scroll horizontal) */
.ep-seasons { display: flex; gap: 8px; overflow-x: auto; flex-wrap: nowrap; margin: 12px 0 14px; padding-bottom: 2px; scrollbar-width: none; }
.ep-seasons::-webkit-scrollbar { display: none; }
.season-tab { flex: 0 0 auto; padding: 8px 15px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid var(--glass-brd); color: #cdd3dc; font-weight: 600; font-size: 13.5px; white-space: nowrap; cursor: pointer; transition: all 0.15s; }
.season-tab:hover { background: rgba(255,255,255,0.12); }
.season-tab.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
/* Épisodes en CARROUSEL horizontal (cartes verticales) */
.ep-carousel { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; scrollbar-width: none; }
.ep-carousel::-webkit-scrollbar { display: none; }
.episode { scroll-snap-align: start; flex: 0 0 auto; width: 260px; display: flex; flex-direction: column; cursor: pointer; transition: transform 0.15s var(--ease); }
.episode:hover { transform: translateY(-3px); }
.ep-thumb { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #2a2c36 center / cover no-repeat; overflow: hidden; border: 1px solid rgba(255,255,255,0.06); }
.episode.is-next .ep-thumb { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ep-thumb.spoiler { filter: blur(7px) brightness(0.78); }
.ep-play { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 999px; background: rgba(0,0,0,0.5); backdrop-filter: blur(6px); border: 1px solid var(--glass-brd); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity 0.15s; }
.ep-play .ic { width: 18px; height: 18px; }
.episode:hover .ep-play { opacity: 1; }
@media (hover: none) { .ep-play { opacity: 1; } }
.ep-cap { padding: 8px 2px 0; min-width: 0; }
.ep-line { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.ep-num { font-size: 12px; font-weight: 800; color: var(--accent); letter-spacing: 0.4px; font-variant-numeric: tabular-nums; }
.ep-dur { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.ep-more { margin-left: auto; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; color: var(--muted); background: transparent; transition: all 0.15s; }
.ep-more:hover { color: #fff; background: rgba(255,255,255,0.1); }
.ep-more .ic { width: 17px; height: 17px; }
.ep-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; font-weight: 700; line-height: 1.3; }
.episode.is-done .ep-title { color: var(--muted); }
.ep-plot { margin: 5px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-plot.spoiler { filter: blur(5px); }
.ep-masked { color: var(--dim); font-style: italic; cursor: pointer; font-size: 12.5px; margin-top: 5px; }
.ep-masked::before { content: "🔒 "; font-style: normal; }
.ep-masked:hover { color: var(--muted); }
.section-h .cnt { color: var(--dim); font-size: 13px; font-weight: 600; }
@media (max-width: 560px) { .episode { width: 200px; } }

/* ---------------- Bottom sheet (verre) ---------------- */
.sheet-back { position: fixed; inset: 0; z-index: 260; background: rgba(0,0,0,0.55); backdrop-filter: blur(6px); display: grid; place-items: end center; animation: fade 0.2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: 100%; max-width: 480px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 18px 18px calc(18px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 8px; animation: slideup 0.3s var(--spring); background: var(--glass-strong); backdrop-filter: blur(30px) saturate(180%); border: 1px solid var(--glass-brd); border-bottom: 0; }
@media (min-width: 520px) { .sheet-back { place-items: center; } .sheet { border-radius: var(--radius-lg); } }
@keyframes slideup { from { transform: translateY(50px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-title { color: var(--muted); font-size: 14px; padding: 4px 4px 10px; font-weight: 600; }
.sheet-sec { color: var(--dim); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; padding: 12px 4px 4px; }
.sheet-info { color: var(--muted); font-size: 13px; padding: 4px 6px 8px; }
.sheet-info b { color: #fff; }
.sheet { max-height: 86vh; overflow-y: auto; }
.sheet-btn { padding: 15px; border-radius: 12px; background: rgba(255,255,255,0.07); border: 1px solid var(--glass-brd); color: #fff; font-size: 16px; font-weight: 600; text-align: center; transition: background 0.15s; }
.sheet-btn:hover { background: rgba(255,255,255,0.14); }
.sheet-btn.cancel { background: transparent; border-color: transparent; color: var(--muted); }
.sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 12px; background: rgba(255,255,255,0.05); }
.sheet-row label { font-size: 15px; font-weight: 600; }
.sheet-row select { background: rgba(255,255,255,0.08); border: 1px solid var(--glass-brd); color: #fff; border-radius: 10px; padding: 8px 10px; font-size: 14px; }

/* ---------------- Bottom nav (mobile, verre) ---------------- */
.bottomnav { display: none; position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-bottom)); z-index: 90; border-radius: 22px; padding: 8px; justify-content: space-around; background: var(--glass-strong); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); border: 1px solid var(--glass-brd); box-shadow: inset 0 1px 0 var(--glass-hi), 0 14px 40px rgba(0,0,0,0.5); }
.bn-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 10px; font-weight: 600; padding: 6px 10px; border-radius: 14px; transition: all 0.2s; }
.bn-item .ic { width: 22px; height: 22px; }
.bn-item.active { color: var(--accent); background: transparent; }
.bn-item.active::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }

/* ---------------- Indicateur EPG / synchro ---------------- */
.epg-status { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + var(--safe-bottom)); z-index: 80; display: inline-flex; align-items: center; gap: 9px; padding: 9px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); background: var(--glass-strong); backdrop-filter: blur(20px) saturate(180%); border: 1px solid var(--glass-brd); box-shadow: 0 8px 24px rgba(0,0,0,0.45); cursor: pointer; transition: color 0.15s, opacity 0.3s; }
.epg-status:hover { color: #fff; }
.es-dot { width: 8px; height: 8px; border-radius: 999px; background: #1db954; box-shadow: 0 0 8px rgba(29,185,84,0.6); flex: 0 0 auto; }
.epg-status { cursor: default; }
.epg-status.syncing { color: #fff; }
.epg-status.syncing .es-dot { background: var(--red); animation: spin 0.8s linear infinite; box-shadow: 0 0 8px var(--red-glow); border-radius: 2px; }
.epg-status.done .es-dot { background: #1db954; box-shadow: 0 0 8px rgba(29,185,84,0.6); }
@media (max-width: 680px) { .epg-status { bottom: calc(96px + var(--safe-bottom)); } }

/* ---------------- Toast ---------------- */
.toast { position: fixed; bottom: calc(28px + var(--safe-bottom)); left: 50%; transform: translateX(-50%); padding: 13px 20px; border-radius: 14px; font-size: 14px; font-weight: 600; z-index: 300; background: var(--glass-strong); backdrop-filter: blur(20px); border: 1px solid var(--glass-brd); box-shadow: 0 10px 30px rgba(0,0,0,0.5); animation: slideup 0.3s var(--spring); }
@media (max-width: 680px) { .toast { bottom: calc(100px + var(--safe-bottom)); } }

/* Skeletons de chargement (shimmer) — remis après la refonte des cartes */
.card.skeleton { background: linear-gradient(100deg, rgba(255,255,255,0.05) 30%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.05); cursor: default; }
.card.skeleton.poster { aspect-ratio: 2 / 3; overflow: hidden; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Bouton retirer de Reprendre */
.card-remove { position: absolute; top: 8px; right: 8px; z-index: 5; width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center; color: #fff; background: rgba(10,10,14,0.7); backdrop-filter: blur(8px); border: 1px solid var(--glass-brd); opacity: 0; transition: opacity 0.15s; }
.card-remove .ic { width: 13px; height: 13px; }
.card:hover .card-remove { opacity: 1; }
@media (hover: none) { .card-remove { opacity: 1; } }

/* Compte à rebours épisode suivant */
.autonext { position: absolute; right: clamp(16px,4vw,40px); bottom: calc(110px + var(--safe-bottom)); z-index: 6; }
.an-card { border-radius: 18px; padding: 16px 18px; min-width: 240px; box-shadow: 0 18px 50px rgba(0,0,0,0.6); animation: slideup 0.3s var(--spring); }
.an-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.an-name { font-size: 15px; font-weight: 700; margin: 4px 0 2px; }
.an-sub { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.an-btns { display: flex; gap: 8px; }
.an-btns .btn { padding: 10px 16px; font-size: 14px; }

/* ---------------- Mon compte (plein écran) ---------------- */
.account-page { position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; background: rgba(10,13,18,0.96); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); overflow-y: auto; }
.ap-head { display: flex; align-items: center; gap: 14px; padding: calc(14px + var(--safe-top)) clamp(16px,4vw,48px) 14px; position: sticky; top: 0; background: linear-gradient(180deg, rgba(10,13,18,0.95) 60%, transparent); z-index: 2; }
.ap-head h2 { margin: 0; font-size: 22px; font-weight: 800; }
.ap-body { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 6px clamp(16px,4vw,48px) calc(48px + var(--safe-bottom)); }
.ap-profile, .ap-hero { display: flex; align-items: center; gap: 16px; padding: 22px; border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-brd); margin-bottom: 26px; }
.ap-hero .ap-id { flex: 1; min-width: 0; }
.ap-avatar { flex: 0 0 auto; width: 60px; height: 60px; border-radius: 999px; display: grid; place-items: center; font-size: 24px; font-weight: 800; color: #fff; background: var(--glass-strong); border: 1px solid var(--glass-brd); }
.ap-id b { display: block; font-size: 18px; }
.ap-id span { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.plan-badge { flex: 0 0 auto; padding: 6px 13px; border-radius: 999px; font-size: 12px; font-weight: 800; background: rgba(255,255,255,0.1); color: var(--muted); }
.plan-badge.premium { background: var(--accent); color: var(--on-accent); }
.pro-tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); vertical-align: middle; }
.ap-row.locked { opacity: 0.62; cursor: pointer; }
.ap-row.locked select, .ap-row.locked .switch { pointer-events: none; }
.ap-btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 700; }
.ap-btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
/* Interruption du lecteur (gratuit) */
.free-gate { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(6,8,12,0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 24px; animation: fade 0.25s; }
.free-gate.hidden { display: none; }
.fg-box { text-align: center; max-width: 440px; }
.fg-icon { font-size: 42px; margin-bottom: 6px; }
.fg-box h2 { font-size: clamp(22px, 4vw, 28px); margin: 0 0 12px; }
.fg-box p { color: var(--muted); line-height: 1.6; margin: 0 0 24px; font-size: 15px; }
.fg-box .btn { background: var(--accent); color: var(--on-accent); margin: 0 auto; }
.fg-box .btn:hover { filter: brightness(1.08); }
.fg-continue { display: block; margin: 14px auto 0; color: var(--dim); font-size: 14px; background: none; }
.fg-continue:hover { color: #fff; }
/* Menu d'achat (paywall) — réutilisé partout */
.paywall { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: rgba(6,8,12,0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: 20px; animation: fade 0.25s; }
.paywall.hidden { display: none; }
.pw-box { position: relative; width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; text-align: center; padding: 34px 26px 26px; border-radius: 24px; background: var(--glass-strong); border: 1px solid var(--glass-brd); box-shadow: inset 0 1px 0 var(--glass-hi), 0 30px 80px rgba(0,0,0,0.6); }
.pw-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 999px; background: rgba(255,255,255,0.08); color: #fff; font-size: 15px; }
.pw-close:hover { background: rgba(255,255,255,0.16); }
.pw-spark { font-size: 38px; }
.pw-box h2 { font-size: 27px; margin: 6px 0; }
.pw-sub-h { color: var(--muted); font-size: 14.5px; margin: 0 0 20px; }
.pw-benefits { list-style: none; text-align: left; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; }
.pw-benefits li { position: relative; padding-left: 30px; font-size: 15px; }
.pw-benefits li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 900; display: grid; place-items: center; }
.pw-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.pw-plan { position: relative; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 16px 14px; border-radius: 16px; background: rgba(255,255,255,0.05); border: 2px solid transparent; text-align: left; transition: 0.15s; }
.pw-plan:hover { background: rgba(255,255,255,0.08); }
.pw-plan.on { border-color: var(--accent); background: var(--accent-soft); }
.pw-badge { position: absolute; top: -9px; right: 10px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.pw-pname { font-size: 13px; color: var(--muted); font-weight: 600; }
.pw-price { font-size: 21px; font-weight: 800; }
.pw-price small { font-size: 12px; font-weight: 600; color: var(--muted); }
.pw-permo { font-size: 11.5px; color: var(--dim); }
.pw-cta { width: 100%; justify-content: center; background: var(--accent); color: var(--on-accent); font-size: 16px; }
.pw-cta:hover { filter: brightness(1.08); }
.pw-note { font-size: 12px; color: var(--dim); margin: 12px 0 0; }
.ap-section { margin-bottom: 20px; background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.06); border-radius: 18px; padding: 16px 14px; }
.ap-section h3 { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: #d7dbe2; margin: 2px 0 13px; padding: 0 2px; }
.ap-section h3::before { content: ""; flex: 0 0 auto; width: 3px; height: 15px; border-radius: 2px; background: var(--accent); }
/* lignes & boutons à plat DANS une section (style Réglages iOS) */
.ap-section .ap-row { background: transparent; border: 0; border-radius: 0; margin: 0; padding: 13px 4px; }
.ap-section .ap-row + .ap-row { border-top: 1px solid rgba(255,255,255,0.06); }
.ap-section .ap-btn { background: transparent; border: 0; border-top: 1px solid rgba(255,255,255,0.06); border-radius: 0; margin: 0; padding: 14px 4px; text-align: left; color: var(--accent); font-weight: 600; }
.ap-section .ap-btn:first-of-type { margin-top: 4px; }
.ap-section .ap-btn:hover { background: rgba(255,255,255,0.04); }
.ap-section .ap-btn.danger { color: #ff7b7b; }
.ap-section .ap-btn.primary { color: var(--on-accent); background: var(--accent); border: 0; border-radius: 12px; text-align: center; margin-top: 12px; padding: 14px; font-weight: 700; }
.ap-section .ap-btn.primary:hover { background: var(--accent); filter: brightness(1.08); }
.ap-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border-radius: 14px; background: var(--glass); border: 1px solid rgba(255,255,255,0.05); margin-bottom: 8px; }
.ap-row label { font-size: 15px; font-weight: 500; }
.ap-row select { background: rgba(255,255,255,0.08); border: 1px solid var(--glass-brd); color: #fff; border-radius: 10px; padding: 9px 12px; font-size: 14px; font-weight: 600; max-width: 55%; }
.ap-val { color: var(--muted); font-size: 14px; }
.ap-btn { width: 100%; padding: 15px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-brd); color: #fff; font-size: 15px; font-weight: 600; text-align: center; margin-bottom: 8px; transition: background 0.15s; }
.ap-btn:hover { background: rgba(255,255,255,0.12); }
.ap-btn.danger { color: #ff7b7b; }
/* Réglages : champ texte + sélecteur d'avatar */
.ap-input { background: rgba(255,255,255,0.08); border: 1px solid var(--glass-brd); color: #fff; border-radius: 10px; padding: 9px 12px; font-size: 14px; font-weight: 600; max-width: 55%; }
.pf-av-row { flex-wrap: wrap; }
.ap-avs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 72%; }
.pf-av-opt { width: 38px; height: 38px; border-radius: 10px; font-size: 20px; display: grid; place-items: center; background: rgba(255,255,255,0.06); border: 1px solid transparent; transition: 0.15s; }
.pf-av-opt:hover { background: rgba(255,255,255,0.12); }
.pf-av-opt.on { border-color: var(--accent); background: var(--accent-soft); }

/* Écran « Qui regarde ? » */
.profile-gate { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: radial-gradient(120% 120% at 50% 0%, #11161f 0%, #07090d 70%); padding: 24px; }
.profile-gate.hidden { display: none; }
.pf-inner { width: 100%; max-width: 740px; text-align: center; }
.pf-h { font-size: clamp(28px, 5vw, 46px); font-weight: 800; margin-bottom: 38px; letter-spacing: -0.5px; }
.pf-grid { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; }
.pf-tile { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 132px; transition: transform 0.15s var(--spring); }
.pf-tile:hover { transform: translateY(-4px); }
.pf-av { width: 116px; height: 116px; border-radius: 18px; display: grid; place-items: center; font-size: 54px; background: var(--glass-strong); border: 2px solid transparent; box-shadow: inset 0 1px 0 var(--glass-hi); transition: border-color 0.15s; }
.pf-tile:hover .pf-av { border-color: var(--accent); }
.pf-name { font-size: 17px; font-weight: 600; color: #cdd3dc; }
.pf-add-ic { font-size: 52px; color: #8a93a0; font-weight: 300; background: rgba(255,255,255,0.04); }
@media (max-width: 520px) { .pf-tile { width: 100px; } .pf-av { width: 90px; height: 90px; font-size: 40px; } .pf-h { margin-bottom: 26px; } }

/* Création de profil */
.pf-create { max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.pf-create .pf-input { width: 100%; padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,0.07); border: 1px solid var(--glass-brd); color: #fff; font-size: 16px; text-align: center; max-width: none; }
.pf-avs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pf-create .pf-av-opt { width: 46px; height: 46px; font-size: 24px; }
.pf-create-btns { display: flex; gap: 12px; justify-content: center; margin-top: 6px; }
.profile-gate .btn { background: var(--accent); color: var(--on-accent); }
.profile-gate .btn.ghost { background: rgba(255,255,255,0.1); color: #fff; }

/* Lecteur : safe-area latérale en paysage (notch / home-indicator) */
.player-top { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }

/* ---------------- Tablette / téléphone : barre du bas, pilule du haut masquée ---------------- */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .bottomnav { display: flex; }
  .rows { padding-bottom: calc(100px + var(--safe-bottom)); }
}
@media (max-width: 680px) {
  .hero { min-height: 480px; aspect-ratio: 3 / 4; max-height: 70vh; }
  .hero-content { bottom: 42px; max-width: 92vw; }
  .hero-dots { left: 0; right: 0; bottom: 16px; justify-content: center; }
  .hero-actions .btn { height: 46px; padding: 0 20px; font-size: 14.5px; border-radius: 999px; }
  .hero-actions .btn .ic { width: 17px; height: 17px; }
  .rows { margin-top: 14px; }
  /* Image de fiche plus grande sur mobile (portrait 3/4), plafonnée */
  .modal-hero { height: min(133.33vw, 78vh); }
  .modal-body { margin-top: -84px; }
}
@media (prefers-reduced-motion: reduce) { *, body::before { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }

/* ---- Splash de lancement animé ---- */
#splash { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #141d30 0%, #0a0e17 55%, #05070c 100%);
  animation: sp-out 0.72s ease 2.15s forwards; }
#splash.sp-hide { display: none; }
.sp-logo { display: flex; align-items: center; justify-content: center; }
.sp-mark { width: 128px; height: 128px; filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.5));
  animation: sp-breath 2.1s cubic-bezier(0.34, 1.2, 0.5, 1) 0.15s both; }
.sp-leg { stroke-dasharray: 272; stroke-dashoffset: 272; animation: sp-draw 1.05s cubic-bezier(0.45, 0.05, 0.2, 1) 0.25s forwards; }
@keyframes sp-draw { to { stroke-dashoffset: 0; } }
@keyframes sp-breath { 0% { transform: scale(0.92); } 60% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes sp-out { from { opacity: 1; } to { opacity: 0; transform: scale(1.05); visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  #splash { animation-delay: 0.7s !important; }
}

/* === F3 : badge "nouvel épisode" sur une série suivie === */
.card-badge.new { background: var(--accent); color: var(--on-accent); }

/* === F2 : espace enfants / code parental === */
.pf-kid { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px 2px 2px; color: #cfd2da; font-size: 14px; cursor: pointer; }
.pf-kid input { width: 18px; height: 18px; accent-color: var(--accent); }
.pf-kid em { color: #8b909c; font-style: normal; font-size: 12.5px; }
.pf-manage { display: block; margin: 24px auto 0; background: none; border: none; color: #8b909c; font-size: 13px; cursor: pointer; }
.pf-manage:hover { color: var(--accent); }
.pin-sheet { text-align: center; }
.pin-input { display: block; width: 170px; text-align: center; letter-spacing: 0.4em; font-size: 22px; padding: 12px; margin: 10px auto; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.07); color: #fff; }
.pin-msg { color: #e8918f; font-size: 13px; min-height: 16px; }
.pin-btns { display: flex; gap: 10px; justify-content: center; }
.pin-ok { color: var(--accent); }
