:root {
  --bg: #121214;
  --panel: #1b1b1f;
  --panel-2: #24242a;
  --line: #2f2f37;
  --text: #ecebe6;
  --muted: #9a98a0;
  --accent: #e8b04b;
  --good: #6fcf97;
  --bad: #eb7a6f;
  --disc: #8fb5ff;
  --radius: 14px;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code { background: var(--panel-2); padding: 1px 6px; border-radius: 6px; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; padding: 14px 28px; background: rgba(18,18,20,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 19px; letter-spacing: .3px; display: flex; align-items: center; gap: 9px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.sections { display: flex; gap: 4px; flex: 1; }
.sec { background: none; border: 0; padding: 7px 14px; border-radius: 999px; color: var(--muted); }
.sec.active { background: var(--panel-2); color: var(--text); }
.sec.soon { opacity: .4; cursor: default; }
.ghost { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; color: var(--text); }
.ghost:hover { border-color: var(--muted); }
.primary { background: var(--accent); color: #1a1407; border: 0; border-radius: 10px; padding: 8px 16px; font-weight: 600; }

main { max-width: 1480px; margin: 0 auto; padding: 22px 28px 60px; }
.intro p { color: var(--muted); margin: 0 0 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px; flex-wrap: wrap; }
.seg button { background: none; border: 0; padding: 6px 14px; border-radius: 999px; color: var(--muted); }
.seg button.on { background: var(--panel-2); color: var(--text); }
.seg.small button { font-size: 13px; padding: 5px 11px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 22px; }
.tag { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 3px 11px; font-size: 13px; color: var(--muted); }
.tag.on { border-color: var(--accent); color: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: opacity .25s, transform .25s; }
.card.voted-like { border-color: rgba(111,207,151,.5); }
.card.voted-dislike { opacity: .45; }
.card.leaving { opacity: 0; transform: scale(.97); }
.thumb { position: relative; border: 0; padding: 0; background: #000; aspect-ratio: 16/9; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.thumb:hover img { transform: scale(1.04); }
.dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.8); font-size: 12px; padding: 2px 6px; border-radius: 6px; }
.badge { position: absolute; left: 8px; top: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; padding: 3px 8px; border-radius: 6px; font-weight: 600; }
.badge.decouverte { background: var(--disc); color: #0d1730; }
.badge.affinite { background: rgba(0,0,0,.65); color: var(--accent); }
.badge.chaine { background: rgba(0,0,0,.65); color: var(--good); }
.body { padding: 14px 16px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.title { margin: 0; font-size: 16px; line-height: 1.3; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--muted); }
.meta > * { white-space: nowrap; }
.lang { border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; font-size: 11px; text-transform: uppercase; }
.why { margin: 0; font-size: 14px; color: #cfcdc6; flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chips span { font-size: 11.5px; color: var(--muted); background: var(--panel-2); padding: 1px 8px; border-radius: 999px; }
.actions { display: flex; gap: 6px; margin-top: 4px; }
.actions button { background: var(--panel-2); border: 1px solid transparent; border-radius: 10px; padding: 6px 11px; font-size: 15px; }
.actions button:hover { border-color: var(--line); }
.actions button.on[data-act="like"] { background: rgba(111,207,151,.18); border-color: var(--good); }
.actions button.on[data-act="dislike"] { background: rgba(235,122,111,.18); border-color: var(--bad); }
.actions button.on[data-act="later"], .actions button.on[data-act="seen"], .actions button.on.follow { border-color: var(--accent); }
.actions .follow { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.reasons { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 12.5px; color: var(--muted); }
.reasons button { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; font-size: 12.5px; }
.reasons button.on { border-color: var(--bad); color: var(--bad); }
.empty { color: var(--muted); text-align: center; padding: 50px 0; }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--panel); border-left: 1px solid var(--line); z-index: 10; padding: 20px 24px 40px; overflow-y: auto; box-shadow: -20px 0 40px rgba(0,0,0,.4); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer h2 { margin: 0; font-size: 20px; }
.drawer h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 26px 0 10px; }
.muted { color: var(--muted); font-size: 14px; }
.slider { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.slider input { flex: 1; accent-color: var(--disc); }
.slider output { color: var(--text); min-width: 40px; text-align: right; }
.bars { display: grid; gap: 6px; }
.bar { display: grid; grid-template-columns: 120px 1fr 44px; align-items: center; gap: 8px; font-size: 13px; }
.bar .track { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--accent); border-radius: 4px; }
.bar .delta { font-size: 12px; text-align: right; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }
.avoid { padding-left: 18px; margin: 0; color: var(--muted); font-size: 13.5px; }
.avoid li { margin-bottom: 4px; }
textarea { width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 10px; font: inherit; resize: vertical; margin-bottom: 8px; }
.notes { list-style: none; padding: 0; font-size: 13px; color: var(--muted); }
.notes li { border-left: 2px solid var(--line); padding-left: 10px; margin: 8px 0; }

dialog#player { border: 0; padding: 0; background: #000; border-radius: var(--radius); width: min(1200px, 94vw); color: var(--text); }
dialog::backdrop { background: rgba(0,0,0,.8); }
.player-wrap { aspect-ratio: 16/9; }
.player-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.player-bar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: var(--panel); }
.player-bar span { flex: 1; font-weight: 600; }
.player-bar a { color: var(--muted); font-size: 13px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line); padding: 9px 16px; border-radius: 10px; font-size: 14px; z-index: 20; }

[hidden] { display: none !important; }

/* Recherche */
.top { flex-wrap: wrap; }
.search { display: flex; gap: 6px; flex: 1 1 560px; max-width: 760px; }
.search input { flex: 1; min-width: 180px; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 7px 14px; font: inherit; }
.search select { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 0 10px; font: inherit; font-size: 13px; }
.search .primary { border-radius: 999px; }
.sections { flex: 0; }

/* En-têtes de vue et groupes */
.full { grid-column: 1 / -1; }
.viewhead { display: flex; align-items: center; gap: 14px; margin: 16px 0 0; }
.viewhead h2, .grouphead { font-size: 18px; margin: 0; }
.grouphead { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.grouphead:first-child { border-top: 0; }
#viewHead .muted { margin: 14px 0 0; }
.topicform { display: flex; gap: 8px; max-width: 760px; }
.topicform input { flex: 1; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 8px 12px; font: inherit; }
.tag.topic { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; padding: 4px 6px 4px 12px; }
.tag .x { background: none; border: 0; color: var(--muted); padding: 0 4px; font-size: 12px; }
.tag .x:hover { color: var(--bad); }
.age:empty { display: none; }
.badge.soir { background: #3a2a52; color: #e3cfff; }
.badge.actu { background: #4a1f1f; color: #ffd0c8; }
.badge.sujet, .badge.recherche { background: rgba(0,0,0,.7); color: var(--text); }
.card.voted-seen { opacity: .6; }

/* Actualités */
.news { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr)); gap: 10px 22px; }
.grid > p.full { margin: -12px 0 0; }
.story { display: flex; gap: 14px; padding: 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.story img { width: 132px; height: 84px; object-fit: cover; border-radius: 8px; flex: none; background: #000; }
.story .meta { display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); margin-bottom: 3px; }
.story .meta strong { color: var(--accent); font-weight: 600; }
.story .cover { color: var(--disc); }
.stitle { color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; line-height: 1.3; }
.stitle:hover { text-decoration: underline; }
.story p { margin: 5px 0 0; font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.also { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.also a { color: var(--muted); }
.news.une .story { border-color: rgba(143,181,255,.35); }
