:root {
  --bg: #0b0b12;
  --bg-2: #12121c;
  --card: #171724;
  --card-2: #1f1f30;
  --line: rgba(255, 255, 255, .08);
  --text: #f3f3f8;
  --muted: #9b9bb2;
  --accent: #8b5cf6;
  --accent-2: #ec4899;
  --grad: linear-gradient(135deg, #8b5cf6, #ec4899);
  --st-watching: #38bdf8;
  --st-planned: #a78bfa;
  --st-paused: #fbbf24;
  --st-completed: #34d399;
  --st-dropped: #f87171;
  --danger: #f87171;
  --warn: #fbbf24;
  --radius: 18px;
  --radius-s: 12px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tab-h: 62px;
  --top-h: 52px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  min-height: 100dvh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { opacity: .35; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.xsmall { font-size: 12px; }
.center { text-align: center; }
.pad { padding: 0 2px; margin: 8px 0; }
.link { color: #c4b5fd; font-weight: 600; }
.warn-text { color: var(--warn); display: flex; gap: 6px; align-items: center; }

/* ---------- barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 4px;
  padding: calc(var(--safe-t) + 6px) 12px 6px 16px;
  min-height: calc(var(--top-h) + var(--safe-t));
  background: rgba(11, 11, 18, .78);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 {
  flex: 1; min-width: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#back:not([hidden]) + h1 { font-size: 17px; font-weight: 700; }
.top-actions { display: flex; gap: 2px; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; color: var(--text);
}
.icon-btn:active { background: var(--card-2); }
#back { margin-left: -10px; }
.offline-pill {
  display: none; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px;
  background: rgba(251, 191, 36, .15); color: var(--warn);
}
body.offline .offline-pill { display: inline-block; }

/* ---------- contenu ---------- */
main {
  padding: 12px 16px calc(var(--tab-h) + var(--safe-b) + 28px);
  max-width: 760px; margin: 0 auto; outline: none;
}
main.enter { animation: enter .22s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
section { margin-bottom: 22px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 6px 2px 12px; }
.sec-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.count { color: var(--muted); font-weight: 700; }
.loading { display: grid; place-items: center; padding: 80px 0; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--card-2); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- barre d'onglets ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(14, 14, 22, .86);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-top: 1px solid var(--line);
  user-select: none; -webkit-user-select: none;
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: 100%; color: var(--muted); font-size: 11px; font-weight: 600;
  transition: color .15s;
}
.tabbar a.on { color: var(--text); }
.tabbar a.on svg { color: #c4b5fd; }
.add-bubble {
  width: 50px; height: 50px; border-radius: 17px; display: grid; place-items: center;
  background: var(--grad); color: #fff;
  box-shadow: 0 6px 22px rgba(139, 92, 246, .45);
  transition: transform .15s;
}
.tab-add:active .add-bubble { transform: scale(.92); }

/* ---------- affiches ---------- */
.cover { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--card-2); }
.cover.ph {
  display: grid; place-items: center;
  background: linear-gradient(150deg, hsl(var(--h) 55% 32%), hsl(calc(var(--h) + 50) 60% 18%));
}
.cover.ph span { font-size: 26px; font-weight: 800; color: rgba(255, 255, 255, .85); letter-spacing: .02em; }

.grid {
  display: grid; gap: 16px 12px;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}
@media (min-width: 560px) { .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
.poster { display: block; content-visibility: auto; contain-intrinsic-size: 110px 220px; }
.poster:active { transform: scale(.97); }
.poster { transition: transform .12s; }
.poster-img {
  position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius-s); overflow: hidden;
  background: var(--card-2); box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.poster-meta { padding: 7px 2px 0; }
.poster-meta strong {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13.5px; line-height: 1.25; font-weight: 650;
}
.poster-meta span { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 4px; }
.poster-meta small { color: var(--muted); font-size: 11.5px; }
.fav-dot {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; color: var(--accent-2);
  background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.shelf {
  display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 4px;
  scrollbar-width: none;
}
.shelf::-webkit-scrollbar { display: none; }
.shelf .poster { scroll-snap-align: start; }

/* ---------- badges et barres ---------- */
.badge {
  display: inline-block; font-size: 10.5px; font-weight: 750; letter-spacing: .02em;
  padding: 2px 7px; border-radius: 99px; background: var(--card-2); color: var(--muted);
}
.badge.st-watching { color: var(--st-watching); background: rgba(56, 189, 248, .13); }
.badge.st-planned { color: var(--st-planned); background: rgba(167, 139, 250, .13); }
.badge.st-paused { color: var(--st-paused); background: rgba(251, 191, 36, .13); }
.badge.st-completed { color: var(--st-completed); background: rgba(52, 211, 153, .13); }
.badge.st-dropped { color: var(--st-dropped); background: rgba(248, 113, 113, .13); }
.bar { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width .3s ease; }
.bar.unknown i { background: repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px); }
.bar.on-img { position: absolute; left: 6px; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .5); }

/* ---------- cartes en ligne ---------- */
.stack { display: grid; gap: 10px; }
.row-card {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center;
  padding: 10px; border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--line); content-visibility: auto; contain-intrinsic-size: 300px 116px;
}
.row-cover { width: 64px; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; display: block; }
.row-body { min-width: 0; display: grid; gap: 4px; }
.row-body p { margin: 0; }
.row-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plus-one {
  min-width: 60px; height: 60px; padding: 0 10px; border-radius: 16px;
  display: grid; place-items: center; align-content: center; gap: 1px;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 13px;
  box-shadow: 0 6px 18px rgba(139, 92, 246, .35); transition: transform .12s;
}
.plus-one:active:not(:disabled) { transform: scale(.92); }
.plus-one:disabled { background: var(--card-2); box-shadow: none; }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 700; font-size: 15px;
  transition: transform .12s, opacity .12s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad); color: #fff; }
.btn.ghost { background: var(--card-2); }
.btn.danger { background: var(--danger); color: #1a0606; }
.btn.danger-ghost { background: rgba(248, 113, 113, .12); color: var(--danger); }
.btn.wide { width: 100%; }
.btn.small-btn { min-height: 38px; font-size: 14px; margin-top: 6px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.round {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card-2); transition: transform .12s;
}
.round.primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(139, 92, 246, .35); }
.round:active:not(:disabled) { transform: scale(.9); }

/* ---------- bannières / états vides ---------- */
.banner {
  display: flex; gap: 10px; align-items: center; padding: 12px 14px; margin-bottom: 18px;
  border-radius: var(--radius-s); font-size: 14px;
}
.banner.warn { background: rgba(251, 191, 36, .1); color: #fde68a; border: 1px solid rgba(251, 191, 36, .25); }
.banner .ic { flex: none; }
.empty { text-align: center; padding: 56px 16px 24px; display: grid; justify-items: center; gap: 8px; }
.empty-ic {
  width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; margin-bottom: 6px;
  background: linear-gradient(135deg, rgba(139, 92, 246, .22), rgba(236, 72, 153, .18)); color: #d8b4fe;
}
.empty h2 { font-size: 20px; }
.empty p { margin: 0; max-width: 320px; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }

/* ---------- collection ---------- */
.search-wrap { position: sticky; top: calc(var(--top-h) + var(--safe-t)); z-index: 5; margin: -12px -16px 0; padding: 10px 16px 8px; background: linear-gradient(var(--bg) 70%, transparent); }
.search {
  display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 46px;
  border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--muted);
}
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--text); }
.search input::-webkit-search-cancel-button { filter: invert(.6); }
.chips {
  display: flex; gap: 8px; overflow-x: auto; margin: 6px -16px 0; padding: 4px 16px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: 99px; background: var(--card); border: 1px solid var(--line);
  font-size: 14px; font-weight: 650; color: var(--muted); white-space: nowrap;
}
.chip small { font-weight: 700; opacity: .7; }
.chip.on { background: var(--text); color: var(--bg); border-color: transparent; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.select {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  border-radius: 99px; background: var(--card); border: 1px solid var(--line); color: var(--muted); max-width: 100%;
}
.select select { appearance: none; -webkit-appearance: none; border: 0; background: none; outline: 0; font-size: 14px; font-weight: 650; color: var(--text); max-width: 160px; padding-right: 2px; }

/* ---------- fiche ---------- */
.hero { position: relative; margin: -12px -16px 18px; padding: 22px 16px 18px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(30px) saturate(1.3); transform: scale(1.3); opacity: .45; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(11, 11, 18, .3), var(--bg)); }
.hero-content { position: relative; z-index: 1; display: grid; grid-template-columns: 116px 1fr; gap: 16px; align-items: end; }
.hero-cover { aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden; box-shadow: 0 14px 40px rgba(0, 0, 0, .55); }
.hero-info h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; padding-right: 36px; }
.hero-info p { margin: 2px 0; }
.alt { color: #d4d4e4; font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tags span { font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 99px; background: rgba(255, 255, 255, .1); }
.fav-btn {
  position: absolute; z-index: 2; top: 16px; right: 12px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0, 0, 0, .4); color: var(--text);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform .15s;
}
.fav-btn.on { color: var(--accent-2); }
.fav-btn:active { transform: scale(.85); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.card h3 { font-size: 15px; font-weight: 750; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.card p { margin: 4px 0; }
.segmented { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg-2); }
.segmented button { min-height: 40px; border-radius: 10px; font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 2px; }
.segmented button.on { background: var(--card-2); color: var(--text); box-shadow: inset 0 -2px 0 currentColor; }
.segmented .st-watching.on { color: var(--st-watching); }
.segmented .st-planned.on { color: var(--st-planned); }
.segmented .st-paused.on { color: var(--st-paused); }
.segmented .st-completed.on { color: var(--st-completed); }
.segmented .st-dropped.on { color: var(--st-dropped); }
.progress-card { display: grid; gap: 12px; }
.prog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.big { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; margin: 0 0 6px !important; }
.big small { font-size: 15px; font-weight: 650; color: var(--muted); letter-spacing: 0; }
.steppers { display: flex; gap: 10px; }
.season-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); }
.mini-stepper { display: flex; align-items: center; gap: 4px; background: var(--bg-2); border-radius: 12px; padding: 3px; }
.mini-stepper button { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; }
.mini-stepper button:active:not(:disabled) { background: var(--card-2); }
.mini-stepper strong { min-width: 44px; text-align: center; color: var(--text); }
.rating { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-bottom: 6px; }
.rating button { height: 38px; border-radius: 9px; background: var(--bg-2); font-weight: 750; font-size: 14px; color: var(--muted); }
.rating button.on { background: var(--grad); color: #fff; }
.dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dates label, .form label { display: grid; gap: 6px; font-size: 13px; font-weight: 650; color: var(--muted); }
input[type=date], input[type=text], input[type=url], input[type=number], input:not([type]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; font-size: 16px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text); outline: 0;
}
input[type=date] { -webkit-appearance: none; appearance: none; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
.synopsis { white-space: pre-line; color: #d4d4e4; font-size: 15px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.timeline li { display: grid; grid-template-columns: 12px 1fr; gap: 10px; }
.timeline p { margin: 0; }
.t-dot { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(139, 92, 246, .2); }
.source p { margin: 2px 0; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }

/* ---------- formulaire ---------- */
.form fieldset { border: 1px solid var(--line); display: grid; gap: 14px; }
.form legend { font-weight: 800; font-size: 15px; padding: 0 6px; margin-left: -6px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.check { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px !important; font-size: 15px !important; color: var(--text) !important; flex-wrap: wrap; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; flex: none; }
.check small { flex-basis: 100%; padding-left: 32px; }
.form-actions { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 8px); display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding-top: 6px; }

/* ---------- stats ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 12px; display: grid; gap: 2px; }
.tile strong { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.tile span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tile small { font-size: 10.5px; color: var(--muted); opacity: .8; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin: 14px 0 4px; }
.spark i { flex: 1; border-radius: 4px 4px 2px 2px; background: rgba(255, 255, 255, .08); }
.spark i.on { background: var(--grad); }
.spark-axis { display: flex; justify-content: space-between; margin-bottom: 8px; }
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: 96px 1fr 32px; align-items: center; gap: 10px; font-size: 14px; }
.hbar span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar div { height: 10px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.hbar i { display: block; height: 100%; border-radius: inherit; background: var(--grad); min-width: 4px; }
.hbar i.st-watching { background: var(--st-watching); }
.hbar i.st-planned { background: var(--st-planned); }
.hbar i.st-paused { background: var(--st-paused); }
.hbar i.st-completed { background: var(--st-completed); }
.hbar i.st-dropped { background: var(--st-dropped); }
.hbar strong { text-align: right; }

/* ---------- réglages ---------- */
.integ { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.integ:first-of-type { border-top: 0; padding-top: 0; }
.badge.muted-b { flex: none; }
.danger-zone { border-color: rgba(248, 113, 113, .25); }

/* ---------- synchro ---------- */
.sync-pill {
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 10px 14px;
  border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.sync-pill span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync-pill strong { color: #c4b5fd; }
.steps { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.changes { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.confirm-list { display: grid; gap: 10px; margin: 12px 0; }
.confirm-row { display: grid; gap: 6px; padding: 10px; border-radius: 12px; background: var(--bg-2); font-size: 14px; }
.plan-card .plan { margin: 10px 0; }
details summary { cursor: pointer; padding: 6px 0; }
a.integ { color: inherit; }

/* ---------- v2 : accueil ---------- */
.hl { color: #c4b5fd; font-weight: 700; }
.eyebrow { margin: 0 0 4px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #c4b5fd; }
.banner.info { background: rgba(139, 92, 246, .12); color: #ddd6fe; border: 1px solid rgba(139, 92, 246, .3); }
.sync-pill a { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync-pill button { color: #c4b5fd; font-weight: 700; padding: 4px 2px; }
.hero-resume {
  position: relative; overflow: hidden; border-radius: 22px; margin-bottom: 22px; padding: 16px;
  display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: end;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
.hero-resume-bg { position: absolute; inset: 0; }
.hero-resume-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(26px) saturate(1.4); transform: scale(1.3); opacity: .55; }
.hero-resume-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(11, 11, 18, .2), rgba(11, 11, 18, .92) 70%); }
.hero-resume > :not(.hero-resume-bg) { position: relative; }
.hero-resume-cover { aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); }
.hero-resume h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.hero-resume-body { display: grid; gap: 6px; min-width: 0; }
.hero-resume-body p { margin: 0; }
.hero-resume-actions { margin-top: 6px; }
.hero-resume-actions .btn { width: 100%; min-height: 48px; }
.new-badge {
  position: absolute; left: 6px; top: 6px; padding: 3px 8px; border-radius: 99px; font-size: 11px; font-weight: 800;
  background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(236, 72, 153, .4);
}
.new-badge.soon { background: rgba(0, 0, 0, .65); box-shadow: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pick-tonight {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px; margin-bottom: 22px;
  border-radius: var(--radius); background: linear-gradient(135deg, rgba(139, 92, 246, .22), rgba(236, 72, 153, .16));
  border: 1px solid rgba(139, 92, 246, .35); color: var(--text);
}
.pick-tonight .ic { color: #f0abfc; flex: none; }
.pick-tonight span { display: grid; gap: 2px; }
.pick-tonight small { color: var(--muted); font-size: 12.5px; }
.tonight { display: grid; justify-items: center; text-align: center; gap: 4px; }
.tonight-cover { width: 130px; aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden; margin-bottom: 10px; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.ptr { height: 0; overflow: hidden; display: grid; place-items: center; transition: height .2s; margin: -12px -16px 0; }
.ptr .spinner { animation-play-state: paused; opacity: .4; }
.ptr.ready .spinner { opacity: 1; }
.ptr.loading { height: 50px !important; }
.ptr.loading .spinner { animation-play-state: running; opacity: 1; }
img.cover { animation: fade-img .35s ease-out; }
@keyframes fade-img { from { opacity: 0; } }

/* ---------- v2 : collection, sélection ---------- */
.sel-check {
  position: absolute; right: 6px; bottom: 16px; width: 26px; height: 26px; border-radius: 50%; display: none; place-items: center;
  background: rgba(0, 0, 0, .55); border: 2px solid rgba(255, 255, 255, .7); color: transparent;
}
.grid.selecting .sel-check { display: grid; }
.poster.picked .sel-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.grid.selecting .poster:not(.picked) .poster-img { opacity: .7; }
.bulk-bar {
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(var(--tab-h) + var(--safe-b) + 10px);
  display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 18px;
  background: rgba(36, 36, 54, .97); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  max-width: 560px; margin: 0 auto; animation: toast-in .2s ease-out;
}
.bulk-bar span { flex: 1; font-size: 13px; font-weight: 700; white-space: nowrap; }
.bulk-bar select { width: auto; min-height: 40px; padding: 6px 8px; font-size: 14px; }
.bulk-bar button { min-width: 40px; height: 40px; border-radius: 12px; background: var(--card-2); display: grid; place-items: center; padding: 0 10px; font-size: 13px; font-weight: 700; }
.bulk-bar button.danger { color: var(--danger); }

/* ---------- v2 : fiche ---------- */
.season { border-top: 1px solid var(--line); padding: 4px 0; }
.season:first-of-type { border-top: 0; }
.season summary { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; list-style: none; }
.season summary::-webkit-details-marker { display: none; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; padding-bottom: 10px; }
.ep { height: 40px; border-radius: 10px; background: var(--bg-2); color: var(--muted); font-weight: 700; font-size: 13px; transition: transform .1s; }
.ep.on { background: var(--grad); color: #fff; }
.ep:active { transform: scale(.9); }
.detail-actions { grid-template-columns: 1fr 1fr; }
.detail-actions .wide-col { grid-column: 1 / -1; }

/* ---------- v2 : agenda / découvrir ---------- */
.seg-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); margin-bottom: 16px; }
.seg-tabs a { text-align: center; padding: 10px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg-tabs a.on { background: var(--card-2); color: var(--text); }
.sync-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sync-card p { margin: 2px 0 0; }
.day-head { font-size: 14px; font-weight: 800; color: #c4b5fd; margin: 18px 2px 10px; text-transform: none; }
.agenda-row { grid-template-columns: 52px 1fr auto; }
.agenda-row .row-cover { width: 52px; }
.agenda-row p { margin: 0; }
.time-chip { font-size: 14px; font-weight: 800; padding: 8px 10px; border-radius: 12px; background: var(--bg-2); }
.confirm-al select { margin-top: 6px; }
.score-badge { position: absolute; right: 6px; top: 6px; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 99px; background: rgba(0, 0, 0, .65); }
.poster.disc .poster-img { display: block; }
.poster-meta small { display: block; margin-top: 2px; font-size: 11.5px; }
.mini-btn {
  margin-top: 6px; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 750;
  padding: 6px 10px; border-radius: 99px; background: var(--card-2); color: var(--text);
}
.mini-btn.on { background: rgba(52, 211, 153, .14); color: var(--st-completed); }
.search-wrap.static { position: static; margin: 0 0 14px; padding: 0; background: none; }
.skeleton-row { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 12px; overflow: hidden; }
.sk-poster { aspect-ratio: 2 / 3; border-radius: var(--radius-s); background: linear-gradient(100deg, var(--card) 30%, var(--card-2) 50%, var(--card) 70%); background-size: 300% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
.pick-list { display: grid; gap: 8px; max-height: 50dvh; overflow: auto; }
.pick { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; text-align: left; padding: 6px; border-radius: 12px; background: var(--bg-2); }
.pick img, .pick > span:first-child { width: 44px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; background: var(--card-2); }
.pick strong { display: block; font-size: 14px; }
.pick small { font-size: 12px; }

/* ---------- v2 : stats ---------- */
.stat-hero { text-align: center; padding: 18px 0 8px; }
.stat-hero p { margin: 0; }
.hero-num { font-size: 52px; font-weight: 850; letter-spacing: -.04em; line-height: 1.05; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.heat-wrap { overflow-x: auto; padding-bottom: 4px; }
.heat-months { display: grid; grid-template-columns: repeat(var(--weeks), 11px); gap: 3px; font-size: 10px; color: var(--muted); height: 14px; white-space: nowrap; }
.heat-months span { overflow: visible; }
.heat { display: grid; grid-template-columns: repeat(var(--weeks), 11px); gap: 3px; }
.heat-col { display: grid; grid-template-rows: repeat(7, 11px); gap: 3px; }
.heat i, .heat-legend i { display: block; width: 11px; height: 11px; border-radius: 3px; background: rgba(255, 255, 255, .06); }
.heat i.empty { background: transparent; }
.heat .l1, .heat-legend .l1 { background: #3b2d6e; }
.heat .l2, .heat-legend .l2 { background: #5a3fb3; }
.heat .l3, .heat-legend .l3 { background: #8b5cf6; }
.heat .l4, .heat-legend .l4 { background: #c4b5fd; }
.heat-legend { display: flex; align-items: center; gap: 3px; justify-content: flex-end; margin-top: 8px; }
.heat-legend span { margin: 0 4px; }
.vbars { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 18px; }
.vbar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.vbar i { width: 100%; max-width: 26px; border-radius: 4px 4px 0 0; background: #8b5cf6; transition: height .4s ease; }
.vbar:hover i { background: #a78bfa; }
.vbar-val { font-size: 11px; font-weight: 700; color: var(--text); height: 16px; }
.vbar-lab { font-size: 10.5px; color: var(--muted); margin-top: 6px; white-space: nowrap; }
.hbar.wide { grid-template-columns: minmax(0, 1fr) 90px 46px; }
.chart-tip {
  position: absolute; z-index: 40; pointer-events: none; padding: 6px 10px; border-radius: 10px; font-size: 12px; font-weight: 650;
  background: rgba(36, 36, 54, .97); border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(0, 0, 0, .4); white-space: nowrap;
}

/* ---------- toasts / modales ---------- */
#toasts {
  position: fixed; z-index: 50; left: 12px; right: 12px; bottom: calc(var(--tab-h) + var(--safe-b) + 12px);
  display: grid; gap: 8px; justify-items: center; pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 520px; width: 100%;
  padding: 12px 12px 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 600;
  background: rgba(36, 36, 54, .96); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  animation: toast-in .22s ease-out;
}
.toast span { flex: 1; }
.toast button { flex: none; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .1); font-weight: 750; color: #d8b4fe; }
.toast.error { border-color: rgba(248, 113, 113, .4); background: rgba(60, 22, 28, .97); }
.toast.out { opacity: 0; transform: translateY(8px); transition: .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
.modal-back {
  position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; justify-items: center;
  background: rgba(0, 0, 0, .55); padding: 12px 12px calc(12px + var(--safe-b));
  animation: fade .18s ease-out;
}
.modal-back.out { opacity: 0; transition: .2s; }
@keyframes fade { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 480px; max-height: 85dvh; overflow: auto; padding: 22px 18px 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  animation: sheet .24s cubic-bezier(.2, .9, .3, 1); display: grid; gap: 12px;
}
@keyframes sheet { from { transform: translateY(30px); opacity: 0; } }
@media (min-width: 600px) { .modal-back { align-items: center; } }
.modal h2 { font-size: 19px; }
.modal p { margin: 0; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.plan { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 360px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .hero-content { grid-template-columns: 96px 1fr; }
  .segmented button { font-size: 11px; }
}
