/* Zap TV — thème sombre façon lecteur IPTV Android */
:root {
  --bg: #0b0e13;
  --rail: #0f1319;
  --panel: #131820;
  --panel-2: #1a2029;
  --hover: #1e2530;
  --line: #222a35;
  --text: #e9edf2;
  --muted: #8a94a3;
  --dim: #5d6775;
  --accent: #3d8bff;
  --accent-soft: rgba(61, 139, 255, 0.16);
  --gold: #ffc23d;
  --live: #ff4d5e;
  --ok: #3ccf8e;
  --radius: 12px;
  --row: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.4 var(--font); -webkit-font-smoothing: antialiased; }
body { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- grille principale ---------- */
.app {
  display: grid;
  grid-template-columns: 236px minmax(340px, 420px) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
}

/* ---------- colonne catégories ---------- */
.rail { background: var(--rail); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px 12px; font-weight: 700; font-size: 18px; letter-spacing: .2px; }
.brand img { border-radius: 8px; }
.brand .icon-btn { margin-left: auto; }
.search { display: flex; align-items: center; gap: 8px; margin: 4px 12px 10px; padding: 0 12px; height: 40px; border-radius: 10px; background: var(--panel-2); color: var(--muted); }
.search input { flex: 1; min-width: 0; height: 100%; padding: 0; background: transparent; border: 0; outline: 0; color: var(--text); -webkit-appearance: none; appearance: none; }
.search input::-webkit-search-decoration { -webkit-appearance: none; }
label.search input:not([type=checkbox]) { height: 100%; width: auto; padding: 0; border: 0; border-radius: 0; background: transparent; }
.search:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.groups { flex: 1; overflow-y: auto; padding: 4px 8px 12px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.grp { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 10px; text-align: left; color: #c5ccd6; }
.grp svg { color: var(--dim); width: 18px; height: 18px; }
.grp .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp .n { color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.grp:hover { background: var(--hover); }
.grp.active { background: var(--accent-soft); color: #fff; }
.grp.active svg, .grp.active .n { color: var(--accent); }
.grp-sep { height: 1px; background: var(--line); margin: 8px 10px; }
.grp-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding: 8px 10px 4px; }
.rail-foot { border-top: 1px solid var(--line); padding: 8px; display: grid; gap: 2px; }
.rail-btn { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: var(--muted); text-align: left; }
.rail-btn:hover { background: var(--hover); color: var(--text); }

/* ---------- colonne chaînes ---------- */
.list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--panel); position: relative; }
.list-head { display: flex; align-items: center; gap: 8px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.list-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.list-head h2 { margin: 0; font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count { color: var(--dim); font-size: 12px; white-space: nowrap; }
.vlist { flex: 1; overflow-y: auto; position: relative; outline: 0; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.vlist-spacer { position: relative; width: 100%; }
.row {
  position: absolute; left: 0; right: 0; height: var(--row);
  display: flex; align-items: center; gap: 12px; padding: 0 10px 0 12px;
  cursor: pointer; border-left: 3px solid transparent;
}
.row:hover { background: var(--hover); }
.row.focus { background: var(--panel-2); }
.vlist:focus-visible .row.focus { box-shadow: inset 0 0 0 2px var(--accent); }
.row.playing { border-left-color: var(--accent); background: var(--accent-soft); }
.row .num { width: 34px; text-align: right; color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; flex: none; }
.logo {
  width: 52px; height: 40px; border-radius: 8px; background: #fff1; flex: none;
  display: grid; place-items: center; overflow: hidden; position: relative;
  font-weight: 700; font-size: 13px; color: var(--muted); letter-spacing: .5px;
}
.has-img { color: transparent !important; }
.logo img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; }
.meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.meta .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta .prog { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 3px; border-radius: 2px; background: #ffffff14; overflow: hidden; margin-top: 3px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.row .fav { width: 32px; height: 32px; display: grid; place-items: center; color: var(--dim); border-radius: 8px; opacity: 0; }
.row:hover .fav, .row.focus .fav, .row .fav.on { opacity: 1; }
.row .fav.on { color: var(--gold); }
.row .fav:hover { background: #ffffff10; }
.empty { position: absolute; inset: 70px 20px auto; text-align: center; color: var(--muted); line-height: 1.6; }
.empty strong { color: var(--text); display: block; font-size: 15px; margin-bottom: 4px; }
.empty .btn { margin-top: 12px; }

/* ---------- colonne lecteur ---------- */
.stage { min-height: 0; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 16px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; flex: none; box-shadow: 0 10px 40px #0008; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.player-msg { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--muted); text-align: center; padding: 20px; pointer-events: none; }
.player-msg svg { width: 44px; height: 44px; color: var(--dim); }
.player-msg.error { color: #ffb3ba; }
.player.playing .player-msg { display: none; }
.player.stopped .player-msg { pointer-events: auto; cursor: pointer; }
.player.stopped .live-dot { display: none; }
.player.stopped .player-msg:not(.error) { color: #d6dce4; }
.player.stopped .player-msg:not(.error) svg { width: 64px; height: 64px; padding: 14px; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: 0 6px 24px #0008; }
.player.stopped .player-msg:not(.error):hover svg { filter: brightness(1.1); }
.spinner { position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 3px solid #ffffff22; border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.numpad { position: absolute; top: 18px; right: 22px; font-size: 44px; font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: 0 2px 12px #000; }

.controls {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 4px;
  padding: 28px 12px 10px; background: linear-gradient(transparent, #000c);
  opacity: 0; transition: opacity .2s;
}
.player:hover .controls, .player.show-ui .controls, .player:not(.playing) .controls { opacity: 1; }
.player:not(.has-channel) .controls { display: none; }
.ctl { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; }
.ctl:hover { background: #ffffff1f; }
.ctl svg { width: 22px; height: 22px; }
.vol { width: 90px; accent-color: var(--accent); }
.live-dot { cursor: pointer; margin-left: 10px; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #fff; display: flex; align-items: center; gap: 6px; }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 8px var(--live); }
.spacer { flex: 1; }

/* Débit vidéo / audio (5 s sous la vidéo) */
.player-wrap { position: relative; flex: none; }
.vstats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px;
  padding: 7px 14px; border-radius: 10px; font-size: 12.5px; line-height: 1.4;
  background: #161c25; border: 1px solid #2a3340; color: var(--muted);
  font-variant-numeric: tabular-nums; pointer-events: none;
  opacity: 0; transition: opacity .3s, transform .3s;
}
.vstats > span { white-space: nowrap; }
.vstats b { color: var(--text); font-weight: 650; }
.vstats .k { color: var(--accent); font-weight: 700; margin-right: 6px; }
.vstats .conv { color: var(--gold); }
.vstats-below { position: absolute; z-index: 4; top: calc(100% + 8px); left: 50%; transform: translate(-50%, -4px); width: max-content; max-width: calc(100% - 16px); box-shadow: 0 8px 24px #000c; }
.vstats-below.show { opacity: 1; transform: translate(-50%, 0); }
.vstats-fs { position: absolute; top: 16px; left: 16px; display: none; background: rgba(13, 17, 23, .85); }
.player:fullscreen .vstats-fs { display: flex; }
.player:fullscreen .vstats-fs.show { opacity: 1; }

/* OSD (bandeau d'info en plein écran / au zapping) */
.osd {
  position: absolute; left: 50%; bottom: 72px; transform: translate(-50%, 20px);
  width: min(880px, calc(100% - 40px)); display: flex; gap: 16px; align-items: center;
  padding: 14px 18px; border-radius: 14px; background: rgba(13, 17, 23, .86); backdrop-filter: blur(10px);
  border: 1px solid #ffffff14; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.osd.show { opacity: 1; transform: translate(-50%, 0); }
.osd-logo { width: 84px; height: 60px; border-radius: 10px; background: #fff1; display: grid; place-items: center; overflow: hidden; position: relative; font-weight: 700; color: var(--muted); flex: none; }
.osd-logo img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; }
.osd-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.osd-top { display: flex; gap: 10px; align-items: baseline; }
.osd-num { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.osd-name { font-weight: 700; font-size: 17px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osd-clock { color: var(--muted); font-variant-numeric: tabular-nums; }
.osd-prog { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.osd-bar { height: 4px; border-radius: 2px; background: #ffffff1a; overflow: hidden; }
.osd-bar i { display: block; height: 100%; background: var(--accent); }
.osd-next { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player:fullscreen { border-radius: 0; }
.player:fullscreen .osd { bottom: 90px; }
.player:fullscreen video { object-fit: contain; }
.player.hide-cursor { cursor: none; }

/* Fiche chaîne */
.info { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.info-head { display: flex; align-items: center; gap: 14px; }
.info-logo { width: 72px; height: 54px; border-radius: 10px; background: #fff1; display: grid; place-items: center; overflow: hidden; position: relative; font-weight: 700; color: var(--muted); flex: none; }
.info-logo img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; }
.info-id { flex: 1; min-width: 0; }
.info-name { display: flex; gap: 10px; align-items: baseline; font-size: 18px; font-weight: 700; }
.info-name #info-num { color: var(--accent); font-variant-numeric: tabular-nums; }
.info-group { color: var(--muted); font-size: 13px; }
.fav-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: var(--panel-2); }
.fav-btn:hover { color: var(--text); }
.fav-btn.on { color: var(--gold); }
.fav-btn svg { width: 22px; height: 22px; }
.now { margin-top: 14px; }
.now .t { font-size: 16px; font-weight: 650; }
.now .time { color: var(--muted); font-size: 13px; margin: 2px 0 8px; font-variant-numeric: tabular-nums; display: flex; justify-content: space-between; gap: 10px; }
.now .bar { height: 4px; margin: 0 0 10px; }
.now .d { color: #b9c1cc; line-height: 1.55; margin: 0; }
.now .nx { margin-top: 12px; color: var(--muted); font-size: 13px; }
.now .nx b { color: var(--text); font-weight: 600; }
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--panel-2); color: var(--muted); margin-left: 8px; vertical-align: 2px; }

/* Guide */
.guide { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 6px 6px; }
.guide h3 { margin: 0 10px 8px; font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.guide ol { list-style: none; margin: 0; padding: 0; }
.guide li { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 9px 10px; border-radius: 8px; }
.guide li .h { color: var(--muted); font-variant-numeric: tabular-nums; }
.guide li .gt { font-weight: 550; }
.guide li .gd { color: var(--muted); font-size: 12.5px; margin-top: 2px; display: none; }
.guide li.open .gd { display: block; }
.guide li { cursor: pointer; }
.guide li:hover { background: var(--hover); }
.guide li.past { opacity: .45; }
.guide li.cur { background: var(--accent-soft); }
.guide li.cur .h { color: var(--accent); font-weight: 700; }
.guide .day { grid-template-columns: 1fr; color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 12px 10px 4px; cursor: default; }
.guide .day:hover { background: none; }
.guide-empty { color: var(--muted); padding: 6px 10px 12px; }

/* ---------- boutons / formulaires ---------- */
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 600; }
.btn:hover { background: var(--hover); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--hover); }
.btn:disabled { opacity: .5; cursor: default; }

.sheet { width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--text); box-shadow: 0 30px 80px #000c; }
.sheet::backdrop { background: #000a; backdrop-filter: blur(3px); }
.sheet[open] { display: flex; flex-direction: column; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 20px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 18px; }
.sheet-body { overflow-y: auto; padding: 16px; display: grid; gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h3 { margin: 0 0 12px; font-size: 15px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.card-head h3 { margin: 0; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
label input:not([type=checkbox]), label select { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); outline: 0; width: 100%; }
label input:focus, label select:focus { border-color: var(--accent); }
label.check { display: flex; align-items: center; gap: 10px; color: var(--text); }
label.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.inline-num { display: flex; align-items: center; gap: 10px; color: var(--text); }
label .inline-num input { width: 100px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
details { margin: 4px 0 8px; }
details summary { cursor: pointer; color: var(--muted); margin-bottom: 12px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.form-err { color: #ff8a95; font-size: 13px; }
.seg { display: inline-flex; background: var(--panel-2); border-radius: 10px; padding: 3px; margin-bottom: 14px; }
.seg-btn { padding: 7px 14px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.seg-btn.active { background: var(--hover); color: var(--text); }

.src-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.src { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.src.off { opacity: .55; }
.src-name { font-weight: 650; display: flex; align-items: center; gap: 8px; min-width: 0; }
.src-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src-type { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; padding: 2px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.src-meta { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }
.src-meta .err { color: #ff8a95; }
.src-meta .ok { color: var(--ok); }
.src-opts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.src-opts label { margin: 0; font-size: 12.5px; }
.src-actions { display: flex; gap: 2px; }
.keys { margin: 0; text-align: center; line-height: 1.6; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1d2430; border: 1px solid var(--line); color: var(--text); padding: 10px 16px; border-radius: 10px; box-shadow: 0 10px 30px #0009; z-index: 50; max-width: calc(100vw - 32px); }

.mobile-only { display: none; }
.scrim { display: none; }

/* ---------- journal ---------- */
.sheet-wide { width: min(980px, calc(100vw - 24px)); }
.sheet-wide .sheet-head { gap: 16px; }
.sheet-wide .sheet-head h2 { margin-right: auto; }
.jr-tabs { margin: 0; }
.sheet-body > section { min-width: 0; }
.jr-tabs .seg-btn, .jr-filter .seg-btn { white-space: nowrap; }
.danger { color: #ff8a95 !important; }
.live-card { margin-bottom: 14px; border-color: rgba(255, 77, 94, .35); }
.live-card h3 { display: flex; align-items: center; gap: 10px; }
.live-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(255, 77, 94, .6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(255, 77, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 94, 0); } }
.live-list, .jr-list, .dev-list { list-style: none; margin: 0; padding: 0; }
.live-list li { display: grid; grid-template-columns: 34px 1fr auto; gap: 4px 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.live-list li:first-child { border-top: 0; }
.live-list .ch { font-weight: 650; }
.live-list .since { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.dev-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--panel-2); color: var(--muted); }
.dev-ic svg { width: 18px; height: 18px; }
.sub { color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.ip { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: #c5ccd6; }
.net { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 2px 6px; border-radius: 6px; text-transform: uppercase; }
.net.local { background: rgba(60, 207, 142, .14); color: var(--ok); }
.net.inet { background: rgba(255, 194, 61, .14); color: var(--gold); }
.me { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.jr-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; color: var(--muted); font-size: 12.5px; }
.stat b { color: var(--text); font-size: 16px; margin-right: 4px; font-variant-numeric: tabular-nums; }
.stat.bad b { color: #ff8a95; }
.jr-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.jr-filter { margin: 0; }
.jr-search { margin: 0; flex: 1; min-width: 200px; }
.jr-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.jr-row { display: grid; grid-template-columns: 112px 30px minmax(150px, 1.2fr) minmax(160px, 1fr) 170px; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.jr-row:first-child { border-top: 0; }
.jr-row:hover { background: var(--hover); }
.jr-when { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; line-height: 1.35; }
.jr-when b { color: var(--text); font-weight: 600; display: block; }
.ev-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--panel-2); color: var(--muted); }
.ev-ic svg { width: 17px; height: 17px; }
.ev-login .ev-ic { color: var(--ok); background: rgba(60, 207, 142, .12); }
.ev-login_fail .ev-ic, .ev-login_blocked .ev-ic { color: #ff8a95; background: rgba(255, 77, 94, .12); }
.ev-play .ev-ic { color: var(--accent); background: var(--accent-soft); }
.ev-password .ev-ic, .ev-revoke .ev-ic { color: var(--gold); background: rgba(255, 194, 61, .12); }
.jr-what { min-width: 0; }
.jr-what .lbl { font-weight: 600; }
.jr-what .det { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jr-dev { min-width: 0; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.jr-dev svg { width: 16px; height: 16px; color: var(--dim); }
.jr-dev span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jr-ip { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.jr-empty { padding: 24px; text-align: center; color: var(--muted); }
.jr-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.jr-dev-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.jr-dev-head p { margin: 0; max-width: 520px; }
.dev-list { display: grid; gap: 10px; }
.dev { display: grid; grid-template-columns: 44px 1fr auto; gap: 6px 14px; align-items: center; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.dev.current { border-color: rgba(61, 139, 255, .45); }
.dev .dev-ic { width: 44px; height: 44px; border-radius: 12px; }
.dev .dev-ic svg { width: 22px; height: 22px; }
.dev-name { font-weight: 650; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- écrans moyens : guide sous la liste ---------- */
@media (max-width: 1180px) {
  .app { grid-template-columns: 220px minmax(300px, 380px) minmax(0, 1fr); }
  .stage { padding: 14px; }
}

/* ---------- mobile / tablette portrait ---------- */
@media (max-width: 860px) {
  .app { display: flex; flex-direction: column; }
  .stage { order: 1; padding: 0; overflow: visible; gap: 0; flex: none; background: var(--bg); }
  .player { border-radius: 0; box-shadow: none; }
  .info, .guide { display: none !important; }
  .list { order: 2; border-right: 0; flex: 1; min-height: 0; }
  .list-head { padding: 10px 12px; }
  .mobile-only { display: grid; }
  .rail { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: min(300px, 84vw); transform: translateX(-100%); transition: transform .22s ease; }
  .app.rail-open .rail { transform: none; box-shadow: 20px 0 50px #000a; }
  .app.rail-open .scrim { display: block; position: fixed; inset: 0; background: #0009; z-index: 20; }
  .row .fav { opacity: 1; }
  .row2 { grid-template-columns: 1fr; }
  .vol { display: none; }
  .jr-row { grid-template-columns: 30px 1fr; gap: 4px 12px; }
  .jr-row .ev-ic { grid-row: span 3; align-self: start; }
  .jr-when { order: 2; }
  .jr-when b { display: inline; margin-right: 6px; }
  .jr-what { order: 1; }
  .jr-dev, .jr-ip { order: 3; grid-column: 2; justify-content: flex-start; }
  .sheet-wide .sheet-head { flex-wrap: wrap; }
  .jr-tabs { order: 3; width: 100%; }
  .hide-sm { display: none; }
  .jr-tools { flex-direction: column; align-items: stretch; }
  .jr-tools > * { min-width: 0; max-width: 100%; }
  .jr-filter { display: flex; overflow-x: auto; scrollbar-width: none; }
  .jr-filter::-webkit-scrollbar { display: none; }
  .jr-filter .seg-btn { flex: 1 0 auto; padding: 7px 10px; }
  .jr-search { min-width: 0; }
  .live-list li { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .sub { min-width: 0; }
  .jr-tabs .seg-btn { flex: 1; }
  .jr-dev-head { flex-direction: column; align-items: stretch; }
  .dev { grid-template-columns: 44px 1fr; }
  .dev > .btn { grid-column: 1 / -1; justify-content: center; }
  .osd { bottom: 54px; padding: 8px 12px; gap: 10px; width: calc(100% - 24px); }
  .osd-logo, .osd-next { display: none; }
  .osd-name { font-size: 15px; }
  .osd-prog { font-size: 13px; }
  .player:fullscreen .osd-logo { display: grid; }
  .player:fullscreen .osd-next { display: block; }
}
