:root {
  --bg: #0f0e17;
  --surface: #1a1926;
  --surface-2: #24223a;
  --line: #4a456e;
  --line-strong: #565180;
  --on-accent: #0f0e17;
  --tap: 44px;
  --link: var(--accent);
  --warn-text: var(--rewatch);
  --ok-text: var(--seen);
  --love-text: #ff6b8f;
  --star: var(--rewatch);
  --bg-rgb: 15, 14, 23;
  --shimmer: #2e2b4a;
  --text: #f2f0ff;
  --muted: #a19dbd;
  --accent: #ff7a59;
  --accent-2: #8b7cff;
  --want: #8b7cff;
  --seen: #3ecf8e;
  --rewatch: #ffb547;
  --nope: #6f6b85;
  --watching: #4cb2ff;
  --radius: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
/* Thème clair : choisi dans les réglages, ou automatique selon le téléphone */
:root[data-theme="light"] {
  --bg: #f6f5fb;
  --surface: #ffffff;
  --surface-2: #eeecf6;
  --line: #d6d2e6;
  --line-strong: #a39dc4;
  --text: #17151f;
  --muted: #5b566f;
  --link: #c2410c;
  --warn-text: #9a5800;
  --ok-text: #17784c;
  --love-text: #c0245c;
  --star: #c98200;
  --bg-rgb: 246, 245, 251;
  --shimmer: #e2dfef;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, system-ui, sans-serif;
  padding-bottom: calc(72px + var(--safe-b));
  -webkit-tap-highlight-color: transparent;
}
body.noscroll { overflow: hidden; }
a { color: var(--link); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; text-align: inherit; }
button, a, select, label.btn { touch-action: manipulation; }
:focus-visible { outline: 2.5px solid var(--link); outline-offset: 2px; border-radius: 10px; }
.card:focus-visible, .rposter:focus-visible { outline-offset: 3px; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
img { display: block; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; font-size: .9em; }
h2 { font-size: 1.15rem; margin: 22px 0 10px; }
h3 { font-size: .95rem; margin: 16px 0 8px; color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.note { margin: 6px 2px 10px; font-size: .88rem; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: calc(12px + var(--safe-t)) 16px 12px;
  background: linear-gradient(var(--bg) 70%, transparent);
}
.topbar h1 { font-size: 1.5rem; margin: 0; letter-spacing: -.02em; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who { margin-left: auto; display: flex; gap: 4px; }
.avatar { width: var(--tap); height: var(--tap); border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .95rem; color: var(--muted); background: var(--surface-2); border: 2px solid transparent; transition: border-color .15s, color .15s; }
.avatar .i { width: 20px; height: 20px; }
.avatar.on { color: var(--text); border-color: var(--accent); background: rgba(255, 122, 89, .18); }
.logo { width: 26px; height: 26px; fill: var(--accent); stroke: none; }
main { padding: 0 16px; max-width: 980px; margin: 0 auto; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(var(--bg-rgb), .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 6px 0 calc(6px + var(--safe-b));
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .75rem; min-height: 48px; justify-content: center; color: var(--muted); text-decoration: none; padding: 4px 0; }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--text); }
.tabbar a.on svg { stroke: var(--accent); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 10px 0; }
.panel h2 { margin-top: 0; }
.tonight-bar { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 6px; }
.bar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.filter-btn { padding: 0 14px; }
.filter-btn.on { border-color: var(--accent); }
.filter-btn .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .75rem; font-weight: 700; }
.mood-row { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scroll-snap-type: x proximity; scrollbar-width: none; }
.mood-row::-webkit-scrollbar { display: none; }
.mood-row .chip { flex: none; scroll-snap-align: start; }
.mood-row .sep { flex: none; width: 1px; margin: 8px 2px; background: var(--line-strong); }
.chip.vibe { border-style: dashed; }
.chip.vibe.on { border-style: solid; }
.time-row { display: flex; align-items: center; gap: 6px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; color: var(--muted); }
.time-row::-webkit-scrollbar { display: none; }
.time-row .chip { flex: none; padding: 0 12px; }
.time-row > .i { flex: none; margin-right: 2px; }
.csub.fit { display: inline-flex; align-items: center; gap: 4px; color: var(--ok-text); }
.csub.fit .i { width: 14px; height: 14px; }
.more-filters { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.more-filters[hidden] { display: none; }
.tonight-bar .btn.wide { margin-top: 0; }
.with-spin { display: flex; align-items: center; gap: 10px; }
.spin.sm { width: 16px; height: 16px; border-width: 2px; }
.rows.stale { opacity: .45; pointer-events: none; transition: opacity .2s; }
.filters h3 { margin-top: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--tap); padding: 0 16px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text);
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease-out, background-color .15s, border-color .15s;
}
.btn:active, .chip:active, .qbtn:active, .sbtn:active, .rbtn:active { transform: scale(.96); }
.btn.primary { background: linear-gradient(135deg, var(--accent), #ff4f81); border-color: transparent; color: var(--on-accent); font-weight: 700; }
.btn.ghost { background: transparent; }
.btn.small { min-height: var(--tap); padding: 0 12px; font-size: .88rem; border-radius: 10px; }
.btn .i { width: 18px; height: 18px; }
.btn.wide { width: 100%; margin-top: 12px; }
.btn:disabled { opacity: .5; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.btn.file { cursor: pointer; }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { min-height: var(--tap); padding: 0 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.seg button.on { background: var(--text); color: var(--bg); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: var(--tap); padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); font-size: .9rem; color: var(--muted); white-space: nowrap; transition: background-color .15s, border-color .15s, transform .12s; }
.chip.on { background: rgba(255, 122, 89, .18); border-color: var(--accent); color: var(--text); font-weight: 600; }
.filter-row { display: flex; align-items: flex-end; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.sel { display: flex; flex-direction: column; gap: 3px; font-size: .75rem; color: var(--muted); }
select, .input, .search input {
  font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 11px; min-height: var(--tap); max-width: 100%;
}
.input, .search input { width: 100%; }
.search input { font-size: 16px; padding: 12px 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 12px; margin: 12px 0; }
.card { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.poster { position: relative; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.poster img { width: 100%; height: 100%; object-fit: cover; }
.noposter { display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px; width: 100%; height: 100%; font-size: .8rem; color: var(--muted); background: linear-gradient(160deg, var(--surface-2), var(--surface)); }
.noposter.tall { aspect-ratio: 2 / 3; border-radius: 12px; }
.ctitle { font-size: .85rem; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.csub { display: block; font-size: .78rem; color: var(--muted); }
.badge { position: absolute; top: 6px; left: 6px; font-size: .75rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; color: #111; }
.badge.inline { position: static; margin-left: 4px; vertical-align: 1px; }
.heart { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(var(--bg-rgb), .8); color: #ff4f81; }
.heart .i { width: 14px; height: 14px; fill: currentColor; }
.st-want { background: var(--want); }
.st-seen { background: var(--seen); }
.st-rewatch { background: var(--rewatch); }
.st-nope { background: var(--nope); color: #fff; }
.st-watching { background: var(--watching); }
.st-paused { background: #b9b3d6; }
.pbar { height: 4px; background: rgba(255, 255, 255, .15); border-radius: 4px; overflow: hidden; }
.poster .pbar { position: absolute; left: 6px; right: 6px; bottom: 6px; }
.pbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ff4f81); border-radius: 4px; transition: width .3s; }
.pbar.big { height: 8px; margin: 8px 0 4px; }

.hscroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: 0 0 auto; }
.hscroll .card { width: 112px; }

.resume { display: flex; gap: 10px; width: 272px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.resume .rposter { width: 62px; flex: none; }
.resume .rinfo { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.resume .btn { align-self: flex-start; margin-top: 4px; }

.rows { display: flex; flex-direction: column; gap: 12px; }
.row-card { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.rposter { width: 84px; flex: none; aspect-ratio: 2 / 3; border-radius: 9px; overflow: hidden; background: var(--surface-2); }
.rposter img { width: 100%; height: 100%; object-fit: cover; }
.rbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rtitle { font-weight: 700; font-size: 1rem; line-height: 1.25; min-height: var(--tap); display: flex; align-items: center; margin: -10px 0 -8px; }
.reason { font-size: .8rem; color: var(--warn-text); }
.overview { font-size: .85rem; color: var(--muted); margin: 4px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.overview.full { display: block; color: var(--text); opacity: .9; font-size: .93rem; }
.rfoot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.provs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.plogo { width: 26px; height: 26px; border-radius: 7px; }
.ptag { font-size: .75rem; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); }
.quick { display: flex; gap: 6px; }
.qbtn { width: var(--tap); height: var(--tap); border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--muted); transition: transform .12s, background-color .15s; }
.qbtn.on { background: var(--want); border-color: var(--want); color: #111; }
.quick { gap: 8px; }

.pick-card { display: block; width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--bg) var(--bg) center/cover; position: relative; }
.pick-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(var(--bg-rgb), .95) 30%, rgba(var(--bg-rgb), .55)); }
.pick-inner { position: relative; display: flex; gap: 14px; padding: 14px; align-items: center; }
.pick-inner img { width: 110px; border-radius: 10px; box-shadow: 0 8px 24px #0008; }
.pick-inner strong { font-size: 1.25rem; display: block; margin-bottom: 4px; }
.pick-inner .reason { display: block; margin: 6px 0; }
.pick-actions { display: flex; gap: 8px; margin-top: 10px; }
.pick-actions .btn { flex: 1; }
.callout { display: flex; flex-direction: column; gap: 6px; border-color: rgba(255, 122, 89, .4); }
.callout p { margin: 0; }

.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px; color: var(--muted); }
.spin { width: 20px; height: 20px; border: 2.5px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sk { background: linear-gradient(90deg, var(--surface-2) 25%, var(--shimmer) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: 8px; }
.sk.line { height: 12px; margin: 5px 0; width: 100%; }
.sk.w90 { width: 90%; } .sk.w70 { width: 70%; } .sk.w40 { width: 40%; }
.card .sk.line { height: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 30px 12px; }
.empty p { margin: 6px 0; }
.empty .big { font-size: 2.4rem; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.stats strong { display: block; font-size: 1.4rem; }
.stats span { font-size: .75rem; color: var(--muted); }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 12px -16px 0; padding: 0 16px 4px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; min-height: var(--tap); padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.tabs button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.tabs small { opacity: .7; margin-left: 2px; }

.prov-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.prov { display: flex; align-items: center; gap: 8px; padding: 7px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: .85rem; cursor: pointer; }
.prov.on { border-color: var(--accent); background: rgba(255, 122, 89, .12); }
.prov img { width: 28px; height: 28px; border-radius: 7px; }
.prov input { accent-color: var(--accent); }
.steps { padding-left: 20px; margin: 8px 0 12px; font-size: .9rem; }
.steps li { margin: 4px 0; }
.credits { margin: 20px 4px 30px; }
details summary { cursor: pointer; color: var(--muted); }

/* Fiche détail */
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .6); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet[hidden], .triage[hidden] { display: none; }
.sheet-panel { background: var(--bg); width: 100%; max-width: 680px; max-height: 94vh; overflow-y: auto; border-radius: 20px 20px 0 0; animation: up .25s ease-out; padding-bottom: calc(24px + var(--safe-b)); overscroll-behavior: contain; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.hero { position: relative; background: var(--surface) var(--bg) center/cover; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(var(--bg-rgb), .35), var(--bg) 92%); }
.hero-inner { position: relative; display: flex; gap: 14px; align-items: flex-end; padding: 70px 16px 8px; }
.handle { position: absolute; z-index: 2; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: rgba(255, 255, 255, .45); }
.sheet-panel { transition: transform .2s ease-out; }
.hero h2 { margin: 0 0 4px; font-size: 1.35rem; line-height: 1.2; }
.hposter { width: 104px; border-radius: 10px; box-shadow: 0 8px 24px #000a; flex: none; }
.genres { font-size: .8rem; margin: 4px 0; }
.close { position: absolute; z-index: 2; top: 10px; right: 10px; width: var(--tap); height: var(--tap); border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; }
.sheet-body { padding: 4px 16px; }
.where { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .85rem; margin: 8px 0 12px; }
.pchip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 3px; border-radius: 999px; background: var(--surface-2); font-size: .8rem; }
.pchip img { width: 22px; height: 22px; border-radius: 50%; }
.pchip.mine { outline: 1.5px solid var(--accent); }
.now { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: .9rem; }
.now .liked { display: inline-flex; align-items: center; gap: 4px; color: var(--love-text); }
.now .liked .i { width: 15px; height: 15px; fill: currentColor; }
.statuses { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 64px; justify-content: center; padding: 8px 2px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-strong); transition: transform .12s, background-color .15s; }
.sbtn span { font-size: .75rem; color: var(--muted); text-align: center; line-height: 1.2; }
.sbtn.on { color: #111; border-color: transparent; }
.sbtn.on.st-want { background: var(--want); }
.sbtn.on.st-seen { background: var(--seen); }
.sbtn.on.st-rewatch { background: var(--rewatch); }
.sbtn.on.st-nope { background: var(--nope); color: #fff; }
.sbtn.on.st-nope span { color: #fff; }
.sbtn.on span { color: #111; font-weight: 700; }
.sbtn:not(.on) { background: var(--surface); }
.rate { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: .9rem; }
.rate span { margin-right: auto; color: var(--muted); }
.rbtn { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .88rem; }
.rbtn.on { border-color: var(--accent); background: rgba(255, 122, 89, .18); font-weight: 600; }
.rbtn .i { width: 18px; height: 18px; }
.stars { display: flex; }
.star { width: var(--tap); height: var(--tap); display: grid; place-items: center; color: var(--line-strong); transition: transform .12s, color .15s; }
.star .i { width: 26px; height: 26px; }
.star.on { color: var(--star); }
.star.on .i { fill: currentColor; }
.rate + .rate { margin-top: 2px; }
.taste-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: var(--tap); margin: 10px 0 2px; padding: 0 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: .9rem; }
.taste-link .i { color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); color: var(--muted); text-decoration: none; font-weight: 600; }
.back .i { transform: rotate(180deg); }
.taste h2 { margin-bottom: 6px; }
.seg.wide { display: flex; width: 100%; margin: 4px 0 8px; }
.seg.wide button { flex: 1; }
.note .i { width: 15px; height: 15px; vertical-align: -2px; }
.taste { padding: 4px 12px; }
.trow { display: flex; align-items: center; gap: 10px; min-height: 52px; border-top: 1px solid var(--line); }
.trow:first-child { border-top: 0; }
.tlabel { flex: 1; min-width: 0; font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbar { flex: none; width: 48px; position: relative; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.tbar i { position: absolute; top: 0; bottom: 0; background: var(--seen); border-radius: 4px; }
.tbar i.neg { background: var(--nope); }
.tbar::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--line-strong); }
.tchoice { flex: none; display: flex; background: var(--surface-2); border-radius: 12px; padding: 2px; }
.tchoice button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); }
.tchoice button .i { width: 18px; height: 18px; }
.tchoice button.on { background: var(--text); color: var(--bg); }
.tchoice .t1.on { background: #ff6b8f; color: #111; }
.tchoice .t1.on .i { fill: currentColor; }
.tchoice .t-1.on { background: var(--nope); color: #fff; }
.profile-names { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.progress .prow { display: flex; align-items: baseline; gap: 8px; }
.progress .prow strong { font-size: 1.6rem; }
.tagline { font-style: italic; color: var(--muted); margin: 14px 0 0; }

/* Tri rapide */
.triage { position: fixed; inset: 0; z-index: 50; background: var(--bg); display: flex; flex-direction: column; padding: calc(10px + var(--safe-t)) 16px calc(12px + var(--safe-b)); }
.tri-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .9rem; }
.tri-card { flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 0; }
.tri-card img { width: min(62vw, 260px); max-height: 46vh; object-fit: cover; border-radius: 14px; box-shadow: 0 12px 34px #000a; }
.tri-card h2 { margin: 14px 0 2px; }
.tri-card .overview { max-width: 520px; -webkit-line-clamp: 4; }
.tri-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 520px; width: 100%; margin: 0 auto; }
.tri-actions button { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 64px; justify-content: center; padding: 8px 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-strong); transition: transform .12s; }
.tri-actions .i { width: 24px; height: 24px; }
.tri-actions span { font-size: .78rem; color: var(--muted); }
.tri-actions .t-loved { border-color: #ff4f81; color: var(--love-text); }
.tri-actions .t-loved .i { fill: currentColor; }
.tri-actions .t-want { border-color: var(--want); color: var(--want); }
.tri-actions .t-seen { color: var(--ok-text); }
.tri-actions button:active { transform: scale(.96); }

#toast { position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translate(-50%, 20px); display: flex; align-items: center; gap: 12px; background: var(--text); color: var(--bg); padding: 6px 6px 6px 16px; min-height: 48px; border-radius: 12px; font-weight: 600; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s ease-out; z-index: 60; max-width: calc(100% - 32px); width: max-content; }
#toast:not(:has(button)) { padding-right: 16px; }
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.triage:not([hidden]) ~ #toast { bottom: auto; top: calc(60px + var(--safe-t)); }
.toast-undo { min-height: 40px; padding: 0 12px; border-radius: 9px; color: #b3261e; font-weight: 700; }
.toast-undo:hover { background: rgba(0, 0, 0, .06); }

@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .hscroll .card { width: 140px; }
  .sheet { align-items: center; }
  .sheet-panel { border-radius: 20px; max-height: 90vh; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Qui a regardé ? */
.who-list { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.who-row { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.who-row .rposter { width: 64px; }
.who-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.who-body .rtitle { margin: -10px 0 -10px; }
.who-body .chips { margin-top: 6px; gap: 6px; }
.chip .i { width: 16px; height: 16px; }
.chip.ghost { background: transparent; padding: 0 12px; }
.who-line { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.who-line .chips { gap: 6px; }
.who-pick { border: 0; padding: 0; margin: 4px 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.who-pick legend { font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.radio { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface-2); font-size: .9rem; cursor: pointer; }
.radio:has(input:checked) { border-color: var(--accent); background: rgba(255, 122, 89, .18); font-weight: 600; }
.radio input { accent-color: var(--accent); margin: 0; }
.taste-link.todo { border-color: var(--rewatch); }
.taste-link.todo span { display: inline-flex; align-items: center; gap: 8px; }
.taste-link.todo strong { color: var(--warn-text); }

/* Agenda */
.ag-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0; }
.ag-list { display: flex; flex-direction: column; gap: 8px; }
.ag-row { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.ag-row .rposter { width: 52px; }
.ag-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ag-body .rtitle { margin: -8px 0 -6px; }
.ag-body .csub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
h3.day { text-transform: capitalize; color: var(--text); margin: 14px 0 6px; }
.badge.new { background: var(--accent); color: var(--on-accent); }
.with-link { display: flex; align-items: center; justify-content: space-between; }
.with-link a { display: inline-flex; align-items: center; gap: 2px; min-height: var(--tap); font-size: .9rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.with-link a .i { width: 16px; height: 16px; }
.recap { margin: 8px 0 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.recap summary { min-height: var(--tap); display: flex; align-items: center; font-weight: 600; font-size: .9rem; }
.recap p { margin: 4px 0 0; font-size: .9rem; color: var(--muted); }
details.panel summary { min-height: var(--tap); display: flex; align-items: center; font-weight: 600; color: var(--text); }

/* Pastille de synchro */
.sync-dot { width: 32px; height: var(--tap); display: grid; place-items: center; flex: none; margin-left: auto; }
.sync-dot + .who { margin-left: 0; }
.sync-dot span { width: 10px; height: 10px; border-radius: 50%; background: var(--seen); box-shadow: 0 0 0 3px rgba(62, 207, 142, .2); }
.sync-dot[data-state="pending"] span, .sync-dot[data-state="syncing"] span { background: var(--watching); box-shadow: 0 0 0 3px rgba(76, 178, 255, .25); animation: pulse 1s ease-in-out infinite alternate; }
.sync-dot[data-state="offline"] span { background: var(--nope); box-shadow: none; }
.sync-dot[data-state="error"] span { background: #ff5a5a; box-shadow: 0 0 0 3px rgba(255, 90, 90, .25); }
@keyframes pulse { to { opacity: .35; } }

/* Cartes : plateformes vérifiées */
.cprov { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.cprov .plogo { width: 22px; height: 22px; border-radius: 6px; }
.ptag.off { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }
.card { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.hint { margin: 6px 2px 0; }

/* Listes perso */
.lists-row h3 { margin: 14px 0 6px; }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chips-scroll .chip { flex: none; text-decoration: none; color: var(--text); }
.chips-scroll .chip small { color: var(--muted); }
.list-pick { display: flex; flex-direction: column; gap: 10px; }
.list-pick .chips { gap: 6px; }
.new-list { display: flex; gap: 8px; }
.new-list .input { flex: 1; min-width: 0; }
.btn.on { border-color: var(--accent); }

/* Casting & personnes */
.hscroll.people { gap: 10px; }
.person { width: 84px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; text-decoration: none; color: var(--text); }
.pphoto { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.pphoto img { width: 100%; height: 100%; object-fit: cover; }
.pname { font-size: .8rem; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.person .csub { font-size: .75rem; line-height: 1.2; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 14px 8px; margin: 8px 0 20px; }
.people-grid .person { width: auto; }
.person-head { display: flex; align-items: center; gap: 14px; margin: 6px 0; }
.person-head img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.person-head h2 { margin: 0; }

/* Bilan */
.wrapped { position: relative; margin: 14px 0; padding: 20px 16px; border-radius: 20px; color: #fff; background: radial-gradient(120% 90% at 0% 0%, #ff7a59 0%, #ff4f81 40%, #6b4cff 100%); overflow: hidden; }
.wrapped h3 { color: rgba(255, 255, 255, .85); margin: 16px 0 6px; }
.w-kicker { margin: 0; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; opacity: .9; }
.w-big { margin: 6px 0 0; font-size: 3.2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.w-sub { margin: 4px 0 14px; opacity: .9; }
.w-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.w-tiles div { background: rgba(0, 0, 0, .22); border-radius: 12px; padding: 10px 6px; text-align: center; }
.w-tiles strong { display: block; font-size: 1.5rem; }
.w-tiles span { font-size: .78rem; }
.w-line { margin: 12px 0 0; }
.w-top { margin: 0; padding-left: 22px; }
.w-top li { margin: 2px 0; }
.w-top button { min-height: 36px; font-weight: 600; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.w-stars { color: #ffe08a; }
.wrapped .btn.primary { margin-top: 16px; background: #fff; color: #17151f; }
.wrapped.empty-w { background: var(--surface); color: var(--text); border: 1px solid var(--line); }

/* Menu d'appui long */
.qmenu-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.qmenu { width: 100%; max-width: 480px; background: var(--surface); border-radius: 18px 18px 0 0; padding: 10px 12px calc(14px + var(--safe-b)); display: flex; flex-direction: column; gap: 4px; animation: up .2s ease-out; }
.qtitle { margin: 4px 6px 6px; font-weight: 700; }
.qmenu button { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border-radius: 12px; font-weight: 600; }
.qmenu button:hover, .qmenu button.on { background: var(--surface-2); }
.qmenu .qm-cancel { justify-content: center; color: var(--muted); margin-top: 4px; }

/* Tri rapide : glisser */
.tri-card { touch-action: pan-y; position: relative; transition: transform .2s ease-out; }
.tri-card[data-hint="want"]::before, .tri-card[data-hint="nope"]::before { position: absolute; top: 24px; z-index: 2; padding: 6px 14px; border-radius: 10px; font-weight: 800; font-size: 1.1rem; border: 3px solid; transform: rotate(-8deg); }
.tri-card[data-hint="want"]::before { content: "À VOIR"; left: 18px; color: var(--want); border-color: var(--want); background: rgba(var(--bg-rgb), .85); }
.tri-card[data-hint="nope"]::before { content: "PAS POUR MOI"; right: 18px; color: var(--nope); border-color: var(--nope); background: rgba(var(--bg-rgb), .85); transform: rotate(8deg); }
.swipe-hint { margin: 4px 0 0; }

/* Séries en pause */
.resume-actions { display: flex; gap: 6px; margin-top: 4px; }
.resume .resume-actions .btn { margin-top: 0; }
.btn.icon-only { width: var(--tap); padding: 0; }
.paused-box { border-color: #b9b3d6; }
.paused-box h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--text); }
.paused-box h3 .i { width: 18px; height: 18px; }
.paused-box p { margin: 4px 0; }
.resume-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.ropt { display: flex; flex-direction: column; gap: 2px; min-height: 64px; justify-content: center; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-strong); text-align: left; transition: transform .12s, border-color .15s; }
.ropt strong { font-size: .88rem; line-height: 1.25; }
.ropt span { font-size: .8rem; color: var(--muted); }
.ropt.main { border-color: var(--accent); background: rgba(255, 122, 89, .14); }
.ropt:active { transform: scale(.97); }
