/* ─── Variables ──────────────────────────────────────────────────────────────── */
:root {
  --bg:       #080c14;
  --bg2:      #0e1422;
  --bg3:      #151d30;
  --bg4:      #1c2640;
  --border:   rgba(255,255,255,0.06);
  --border2:  rgba(255,255,255,0.12);
  --accent:   #e63946;
  --accent2:  #4895ef;
  --gold:     #ffd166;
  --text:     #eef0f5;
  --text2:    #7a8499;
  --text3:    #3d4a63;
  --card-r:   14px;
  --nav-h:    68px;
  --safe:     env(safe-area-inset-bottom, 0px);
}

/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, select {
  font-family: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 10px; padding: 11px 14px; outline: none; width: 100%;
  transition: border-color .2s;
}
input:focus, select:focus { border-color: var(--accent2); }
h1, h2, h3 { font-family: 'Outfit', sans-serif; font-weight: 700; }

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
#app { padding-bottom: calc(var(--nav-h) + var(--safe)); min-height: 100dvh; }
.page { display: none; }
.page.active { display: block; }

/* ─── Nav ────────────────────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + var(--safe));
  padding-bottom: var(--safe);
  background: rgba(8,12,20,0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; z-index: 100;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 5px; padding: 10px 4px; color: var(--text3);
  transition: color .2s; font-size: .65rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
}
.nav-item svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item.active { color: var(--accent); }
.nav-item.active svg { stroke: var(--accent); }

/* ─── Page header ────────────────────────────────────────────────────────────── */
.page-header {
  padding: 24px 18px 8px;
  display: flex; align-items: baseline; justify-content: space-between;
}
.page-header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.9rem; font-weight: 800;
  letter-spacing: -.03em; color: var(--text);
}
.page-header h1 em { color: var(--accent); font-style: normal; }
.page-header small { font-size: .75rem; color: var(--text3); }

/* ─── Section title ──────────────────────────────────────────────────────────── */
.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: .75rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text3); padding: 24px 18px 12px;
  display: flex; align-items: center; gap: 8px;
}
.section-title::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ─── Chips ──────────────────────────────────────────────────────────────────── */
.chips-row {
  display: flex; gap: 8px; padding: 0 18px 16px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.chips-row::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--bg3); border: 1px solid var(--border2);
  font-size: .78rem; color: var(--text2); cursor: pointer;
  transition: all .15s; white-space: nowrap; font-weight: 500;
}
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }

/* ─── Grille "En ce moment" ──────────────────────────────────────────────────── */
.now-grid {
  display: flex; flex-direction: column; gap: 2px; padding: 0 18px 8px;
}
.now-card {
  background: var(--bg2); border-radius: var(--card-r);
  border: 1px solid var(--border); overflow: hidden;
  cursor: pointer; transition: border-color .2s, transform .15s;
  display: flex; align-items: stretch;
}
.now-card:active { transform: scale(.99); }
.now-card:hover { border-color: var(--border2); }
.now-card__num {
  font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 800;
  color: var(--text3); min-width: 44px; display: flex; align-items: center;
  justify-content: center; border-right: 1px solid var(--border);
  flex-shrink: 0;
}
.now-card.has-prog .now-card__num { color: var(--text); }
.now-card__logo-wrap {
  width: 48px; display: flex; align-items: center; justify-content: center;
  padding: 0 10px; flex-shrink: 0; border-right: 1px solid var(--border);
}
.now-card__logo { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; }
.now-card__logo-ph {
  width: 28px; height: 28px; border-radius: 4px;
  background: var(--bg4); display: flex; align-items: center; justify-content: center;
  font-size: .58rem; font-weight: 700; color: var(--text3); text-align: center; line-height: 1.1;
}
.now-card__body { flex: 1; padding: 12px 14px; min-width: 0; }
.now-card__channel { font-size: .68rem; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.now-card__title { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-card__time { font-size: .72rem; color: var(--text3); margin-top: 4px; }
.now-card__bar { width: 3px; flex-shrink: 0; background: var(--bg4); position: relative; overflow: hidden; }
.now-card__bar-fill { position: absolute; bottom: 0; left: 0; right: 0; background: var(--accent); transition: height .5s ease; }
/* Live dot */
.live-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-right: 5px;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.8)} }

/* ─── Ce soir ────────────────────────────────────────────────────────────────── */
.tonight-list { display: flex; flex-direction: column; gap: 10px; padding: 0 18px 24px; }
.tonight-card {
  background: var(--bg2); border-radius: var(--card-r);
  border: 1px solid var(--border); padding: 14px 16px;
  cursor: pointer; transition: border-color .2s, background .2s;
  display: flex; align-items: center; gap: 14px;
}
.tonight-card:hover { border-color: var(--border2); background: var(--bg3); }
.tonight-card__num {
  font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 800;
  color: var(--text3); min-width: 28px; text-align: center; flex-shrink: 0;
}
.tonight-card__body { flex: 1; min-width: 0; }
.tonight-card__channel { font-size: .7rem; color: var(--text3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.tonight-card__title { font-size: .95rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tonight-card__desc { font-size: .78rem; color: var(--text2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tonight-card__time { font-family: 'Outfit', sans-serif; font-size: .9rem; font-weight: 700; color: var(--gold); flex-shrink: 0; }
.cat-badge {
  display: inline-block; font-size: .63rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 7px; border-radius: 4px;
  background: var(--bg4); color: var(--text3); flex-shrink: 0;
}

/* ─── Guide ──────────────────────────────────────────────────────────────────── */
.guide-header {
  position: sticky; top: 0;
  background: rgba(8,12,20,.97); backdrop-filter: blur(16px);
  z-index: 10; padding: 12px 18px; display: flex; gap: 8px;
  border-bottom: 1px solid var(--border);
}
.guide-date-btn {
  flex: 1; padding: 8px 10px; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  font-size: .78rem; font-weight: 600; color: var(--text2); text-align: center;
  cursor: pointer; transition: all .15s;
}
.guide-date-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.guide-channel-row { border-bottom: 1px solid var(--border); }
.guide-channel-name {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px 8px; cursor: pointer;
}
.guide-channel-name .ch-num {
  font-family: 'Outfit', sans-serif; font-size: .9rem; font-weight: 800;
  color: var(--text3); min-width: 26px;
}
.guide-channel-name .ch-name { font-size: .88rem; font-weight: 600; }
.guide-progs {
  display: flex; gap: 8px; padding: 0 18px 14px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.guide-progs::-webkit-scrollbar { display: none; }
.guide-prog {
  flex-shrink: 0; background: var(--bg3); border-radius: 8px;
  padding: 9px 12px; min-width: 130px; max-width: 200px;
  cursor: pointer; border: 1px solid var(--border); transition: border-color .15s;
}
.guide-prog.current { border-color: var(--accent); background: rgba(230,57,70,.08); }
.guide-prog__time { font-family: 'Outfit', sans-serif; font-size: .75rem; font-weight: 700; color: var(--accent2); margin-bottom: 4px; }
.guide-prog.current .guide-prog__time { color: var(--accent); }
.guide-prog__title { font-size: .8rem; font-weight: 600; line-height: 1.3; }
.guide-prog__cat { font-size: .66rem; color: var(--text3); margin-top: 3px; }

/* ─── Recherche ──────────────────────────────────────────────────────────────── */
.search-bar { margin: 16px 18px; position: relative; }
.search-bar input { padding-left: 44px; border-radius: 12px; }
.search-bar svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; stroke: var(--text3); fill: none;
  stroke-width: 2; stroke-linecap: round;
}
.search-results { display: flex; flex-direction: column; gap: 8px; padding: 0 18px 24px; }
.search-item {
  background: var(--bg2); border-radius: 10px; border: 1px solid var(--border);
  padding: 13px 15px; cursor: pointer; transition: border-color .15s;
}
.search-item:hover { border-color: var(--border2); }
.search-item__title { font-size: .92rem; font-weight: 700; }
.search-item__meta { font-size: .75rem; color: var(--accent2); margin-top: 3px; }
.search-item__desc { font-size: .78rem; color: var(--text2); margin-top: 4px; line-height: 1.4; }

/* ─── Settings ───────────────────────────────────────────────────────────────── */
.settings-group { padding: 0 18px 8px; }
.settings-group__label {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text3); padding: 20px 0 10px;
}
.settings-row {
  background: var(--bg2); border-radius: 12px; border: 1px solid var(--border);
  padding: 14px 16px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  transition: border-color .15s;
}
.settings-row:hover { border-color: var(--border2); }
.settings-row__label { font-size: .9rem; font-weight: 600; flex: 1; }
.settings-row__sub { font-size: .75rem; color: var(--text3); margin-top: 2px; }
.settings-row__val { font-size: .8rem; color: var(--accent2); font-weight: 600; white-space: nowrap; }
.settings-row svg { stroke: var(--text3); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; width: 18px; height: 18px; }

/* ─── Bouquets ───────────────────────────────────────────────────────────────── */
.bouquet-row {
  background: var(--bg2); border-radius: 12px; border: 1px solid var(--border);
  padding: 13px 16px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  transition: border-color .15s;
}
.bouquet-row.active { border-color: var(--accent2); background: rgba(72,149,239,.06); }
.bouquet-row__icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--bg4); display: flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 800; color: var(--text3); flex-shrink: 0;
}
.bouquet-row__body { flex: 1; min-width: 0; }
.bouquet-row__name { font-size: .9rem; font-weight: 600; }
.bouquet-row__count { font-size: .73rem; color: var(--text3); margin-top: 2px; }
.bouquet-row__check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border2); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.bouquet-row.active .bouquet-row__check { background: var(--accent2); border-color: var(--accent2); }
.bouquet-row__check svg { width: 11px; height: 11px; stroke: #fff; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ─── FAI picker ─────────────────────────────────────────────────────────────── */
.fai-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; padding: 0 18px 16px; }
.fai-btn {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 10px; text-align: center;
  cursor: pointer; transition: all .15s; color: var(--text2); font-weight: 600;
}
.fai-btn:hover, .fai-btn.active { border-color: var(--accent2); color: var(--accent2); background: rgba(72,149,239,.06); }
.fai-btn small { display: block; font-size: .68rem; color: var(--text3); margin-top: 3px; font-weight: 400; }

/* ─── Fiche chaîne ────────────────────────────────────────────────────────────── */
.channel-hero {
  background: linear-gradient(180deg, var(--bg3) 0%, transparent 100%);
  padding: 20px 18px 18px;
  display: flex; align-items: center; gap: 16px;
}
.channel-hero__logo {
  width: 52px; height: 52px; border-radius: 12px;
  object-fit: contain; background: var(--bg4); flex-shrink: 0;
}
.channel-hero__logo-ph {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--bg4); display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: var(--text3); flex-shrink: 0;
}
.channel-hero__name { font-family: 'Outfit', sans-serif; font-size: 1.4rem; font-weight: 800; }
.channel-hero__num { font-size: .82rem; color: var(--accent2); font-weight: 700; margin-top: 2px; }
.prog-list { display: flex; flex-direction: column; gap: 6px; padding: 0 18px 100px; }
.prog-item {
  background: var(--bg2); border-radius: 10px; border: 1px solid var(--border);
  padding: 12px 14px; display: flex; gap: 12px; cursor: pointer; transition: border-color .15s;
}
.prog-item:hover { border-color: var(--border2); }
.prog-item.current { border-color: var(--accent); background: rgba(230,57,70,.06); }
.prog-item__time { font-family: 'Outfit', sans-serif; font-size: .82rem; font-weight: 700; color: var(--text3); min-width: 42px; padding-top: 1px; flex-shrink: 0; }
.prog-item.current .prog-item__time { color: var(--accent); }
.prog-item__body { flex: 1; min-width: 0; }
.prog-item__title { font-size: .9rem; font-weight: 600; }
.prog-item__sub { font-size: .75rem; color: var(--text2); margin-top: 2px; }

/* ─── Back btn ───────────────────────────────────────────────────────────────── */
.back-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 16px 18px 4px; color: var(--text3); font-size: .85rem;
  cursor: pointer; font-weight: 500; width: fit-content;
}
.back-btn:hover { color: var(--text); }
.back-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ─── Modal détail programme ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.75);
  backdrop-filter: blur(6px); z-index: 200;
  display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  width: 100%; max-height: 85dvh; background: var(--bg2);
  border-radius: 20px 20px 0 0; border-top: 1px solid var(--border2);
  overflow-y: auto; position: relative;
  padding: 0 0 calc(24px + var(--safe));
  transform: translateY(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--border2); margin: 12px auto 0;
}
.modal-close {
  position: absolute; top: 12px; right: 16px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg4); color: var(--text2);
  font-size: .85rem; display: flex; align-items: center; justify-content: center;
}
.prog-modal { padding: 16px 20px 0; }
.prog-modal__channel { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text3); margin-bottom: 8px; }
.prog-modal__title { font-family: 'Outfit', sans-serif; font-size: 1.3rem; font-weight: 800; line-height: 1.2; margin-bottom: 6px; }
.prog-modal__subtitle { font-size: .85rem; color: var(--text2); margin-bottom: 12px; }
.prog-modal__meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.prog-modal__badge {
  font-size: .72rem; font-weight: 700; padding: 4px 10px;
  border-radius: 6px; background: var(--bg4); color: var(--text2);
}
.prog-modal__badge.time { background: rgba(230,57,70,.15); color: var(--accent); }
.prog-modal__badge.cat { background: rgba(72,149,239,.15); color: var(--accent2); }
.prog-modal__desc { font-size: .88rem; color: var(--text2); line-height: 1.6; }

/* ─── Admin ──────────────────────────────────────────────────────────────────── */
.admin-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; padding: 0 18px 16px; }
.admin-stat { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.admin-stat__num { font-family: 'Outfit', sans-serif; font-size: 1.8rem; font-weight: 800; color: var(--accent2); }
.admin-stat__label { font-size: .73rem; color: var(--text3); margin-top: 2px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.admin-action {
  margin: 0 18px 8px; padding: 14px 16px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 12px; display: flex; align-items: center;
  justify-content: space-between; cursor: pointer; transition: border-color .15s;
}
.admin-action:hover { border-color: var(--border2); }
.admin-action__label { font-size: .9rem; font-weight: 700; }
.admin-action__sub { font-size: .75rem; color: var(--text3); margin-top: 2px; }
.btn-primary {
  padding: 9px 18px; background: var(--accent2); color: #fff;
  border-radius: 8px; font-weight: 700; font-size: .82rem;
  font-family: 'Outfit', sans-serif; transition: opacity .15s; flex-shrink: 0;
}
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary:hover:not(:disabled) { opacity: .85; }

/* ─── Setup screen ───────────────────────────────────────────────────────────── */
.setup-screen {
  position: fixed; inset: 0; background: var(--bg); z-index: 300;
  display: flex; flex-direction: column; padding: 52px 24px 40px; overflow-y: auto;
}
.setup-logo { font-family: 'Outfit', sans-serif; font-size: 2.4rem; font-weight: 800; margin-bottom: 6px; }
.setup-logo em { color: var(--accent); font-style: normal; }
.setup-sub { color: var(--text2); font-size: .9rem; margin-bottom: 36px; line-height: 1.5; }
.setup-screen h2 { font-family: 'Outfit', sans-serif; font-size: 1rem; color: var(--text3); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .08em; }

/* ─── Auth ────────────────────────────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 16px; }
.auth-field label { font-size: .78rem; color: var(--text3); font-weight: 600; display: block; margin-bottom: 5px; }
.auth-links { text-align: center; font-size: .82rem; color: var(--text3); padding: 8px 0; }
.auth-links a { color: var(--accent2); font-weight: 600; cursor: pointer; }

/* ─── Toast ──────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 14px + var(--safe));
  left: 50%; transform: translateX(-50%) translateY(16px);
  background: var(--text); color: var(--bg);
  padding: 9px 20px; border-radius: 999px;
  font-size: .85rem; font-weight: 700; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; white-space: nowrap; z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── Loader / Empty ─────────────────────────────────────────────────────────── */
.loader {
  display: flex; align-items: center; justify-content: center;
  padding: 48px; color: var(--text3); font-size: .85rem; gap: 10px;
}
.loader::before {
  content: ''; width: 16px; height: 16px;
  border: 2px solid var(--border2); border-top-color: var(--accent2);
  border-radius: 50%; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty { padding: 40px 18px; text-align: center; color: var(--text3); font-size: .88rem; line-height: 1.6; }


/* ─── Onglets home ───────────────────────────────────────────────────────────── */
.home-tabs {
  display: flex; gap: 0; padding: 8px 18px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.home-tab {
  flex: 1; padding: 10px 0; font-size: .88rem; font-weight: 700;
  color: var(--text3); border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all .15s; text-align: center;
  font-family: 'Outfit', sans-serif;
}
.home-tab.active { color: var(--text); border-bottom-color: var(--accent); }

/* ─── Scrollbar ──────────────────────────────────────────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: var(--bg3) transparent; }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 2px; }

/* ─── Date strip ─────────────────────────────────────────────────────────────── */
.date-strip {
  display: flex; gap: 6px; padding: 12px 18px 4px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.date-strip::-webkit-scrollbar { display: none; }
.date-btn {
  flex-shrink: 0; padding: 6px 14px; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  font-size: .78rem; font-weight: 600; color: var(--text2);
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.date-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── Liste chaînes ──────────────────────────────────────────────────────────── */
.channel-list { display: flex; flex-direction: column; padding: 0 18px 80px; }
.channel-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .15s; border-radius: 8px;
}
.channel-list-item:hover { background: var(--bg2); }
.channel-list-item__num {
  font-family: 'Outfit', sans-serif; font-size: .9rem; font-weight: 800;
  color: var(--text3); min-width: 28px; text-align: center;
}
.channel-list-item__logo { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.channel-list-item__name { flex: 1; font-size: .88rem; font-weight: 600; }

/* ─── Modal prog enrichie ────────────────────────────────────────────────────── */
.prog-modal { position: relative; overflow: hidden; }
.prog-modal__backdrop {
  position: absolute; top: 0; left: 0; right: 0; height: 180px;
  background-size: cover; background-position: center top;
  opacity: .25; pointer-events: none;
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}
.prog-modal__body { position: relative; padding: 16px 20px 0; z-index: 1; }
.prog-modal__channel {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent2); margin-bottom: 8px;
}
.prog-modal__title {
  font-family: 'Outfit', sans-serif; font-size: 1.4rem; font-weight: 800;
  line-height: 1.2; margin-bottom: 6px;
}
.prog-modal__subtitle { font-size: .85rem; color: var(--text2); margin-bottom: 12px; }
.prog-modal__meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.prog-modal__badge {
  font-size: .72rem; font-weight: 600; padding: 4px 10px;
  border-radius: 6px; background: var(--bg4); color: var(--text2);
}
.prog-modal__badge.time { background: rgba(230,57,70,.15); color: var(--accent); }
.prog-modal__badge.cat { background: rgba(72,149,239,.15); color: var(--accent2); }
.prog-modal__desc { font-size: .88rem; color: var(--text2); line-height: 1.65; margin-bottom: 16px; }
.prog-modal__loading { font-size: .82rem; color: var(--text3); padding: 8px 0; font-style: italic; }

/* TMDB extra */
.tmdb-rating {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.stars { display: flex; gap: 2px; }
.star { font-size: 1rem; color: var(--text3); }
.star.on { color: var(--gold); }
.tmdb-rating__score {
  font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 800; color: var(--gold);
}
.tmdb-rating__max { font-size: .7rem; color: var(--text3); }
.tmdb-rating__votes { font-size: .72rem; color: var(--text3); }
.tmdb-metas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tmdb-section-title {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text3); margin-bottom: 8px;
}
.tmdb-directors { font-size: .88rem; color: var(--text2); margin-bottom: 16px; }
.tmdb-desc { margin-top: -8px; margin-bottom: 16px; }

/* Casting */
.cast-row {
  display: flex; gap: 12px; overflow-x: auto;
  padding-bottom: 20px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.cast-row::-webkit-scrollbar { display: none; }
.cast-card { flex-shrink: 0; width: 72px; text-align: center; }
.cast-card__photo {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; background: var(--bg4); display: block; margin: 0 auto 6px;
}
.cast-card__nophoto {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--bg4); display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; color: var(--text3); margin: 0 auto 6px;
}
.cast-card__name { font-size: .68rem; font-weight: 600; line-height: 1.3; }
.cast-card__role { font-size: .62rem; color: var(--text3); margin-top: 2px; line-height: 1.2; }

/* ─── Prime list (Ce soir / Nuit / En direct) ────────────────────────────────── */
.prime-list { display: flex; flex-direction: column; padding: 0 18px 80px; }
.prime-card {
  display: flex; align-items: center; gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 12px 0; cursor: pointer; transition: background .15s;
  border-radius: 0;
}
.prime-card:hover { background: rgba(255,255,255,.02); }
.prime-card__left {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; width: 88px; padding-right: 12px;
}
.prime-card__num {
  font-family: 'Outfit', sans-serif; font-size: .85rem; font-weight: 800;
  color: var(--text3); min-width: 24px; text-align: right;
}
.prime-logo {
  width: 36px; height: 36px; border-radius: 6px;
  object-fit: contain; background: var(--bg3); flex-shrink: 0;
}
.prime-logo-ph {
  width: 36px; height: 36px; border-radius: 6px;
  background: var(--bg3); display: flex; align-items: center; justify-content: center;
  font-size: .62rem; font-weight: 700; color: var(--text3); flex-shrink: 0;
}
.prime-card__body { flex: 1; min-width: 0; }
.prime-card__channel {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text3); margin-bottom: 3px;
}
.prime-card__title {
  font-size: .92rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prime-card__desc {
  font-size: .76rem; color: var(--text2); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prime-card__foot { display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.prime-card__dur { font-size: .7rem; color: var(--text3); }
.prime-card__time {
  font-family: 'Outfit', sans-serif; font-size: .95rem; font-weight: 800;
  color: var(--gold); flex-shrink: 0; padding-left: 12px; text-align: right;
}
.prime-card__time-sub { font-size: .7rem; color: var(--text3); margin-top: 3px; }

/* Barre progression (En direct) */
.now-bar { height: 2px; background: var(--bg4); border-radius: 1px; margin-top: 5px; overflow: hidden; }
.now-bar__fill { height: 100%; background: var(--accent); border-radius: 1px; }

/* Badges catégories colorés */
.cat-badge { font-size: .62rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: .04em; background: var(--bg4); color: var(--text3); }
.cat-film        { background: rgba(230,57,70,.15);  color: #e63946; }
.cat-serie       { background: rgba(72,149,239,.15); color: #4895ef; }
.cat-documentaire{ background: rgba(76,201,240,.15); color: #4cc9f0; }
.cat-animaux     { background: rgba(114,176,29,.15); color: #72b01d; }
.cat-magazine    { background: rgba(255,209,102,.15);color: #ffd166; }
.cat-info        { background: rgba(255,255,255,.08);color: var(--text2); }
.cat-sport       { background: rgba(6,214,160,.15);  color: #06d6a0; }
.cat-jeunesse    { background: rgba(255,107,107,.15);color: #ff6b6b; }
.cat-musique     { background: rgba(168,85,247,.15); color: #a855f7; }

/* ─── Logos dans le guide ────────────────────────────────────────────────────── */
.guide-logo {
  width: 24px; height: 24px; object-fit: contain;
  border-radius: 4px; background: var(--bg4); flex-shrink: 0;
}
.guide-logo-ph {
  width: 24px; height: 24px; border-radius: 4px;
  background: var(--bg4); display: flex; align-items: center; justify-content: center;
  font-size: .56rem; font-weight: 700; color: var(--text3); flex-shrink: 0;
}

/* ─── Logos dans la liste chaînes ────────────────────────────────────────────── */
.ch-logo { width: 32px; height: 32px; border-radius: 6px; object-fit: contain; background: var(--bg3); }
.ch-logo-ph {
  width: 32px; height: 32px; border-radius: 6px; background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: .62rem; font-weight: 700; color: var(--text3);
}

/* ─── Modale programme enrichie ──────────────────────────────────────────────── */
.prog-modal { position: relative; overflow: hidden; }
.prog-modal__backdrop {
  position: absolute; top: 0; left: 0; right: 0; height: 180px;
  background-size: cover; background-position: center top;
  opacity: .2; pointer-events: none;
  mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
}
.prog-modal__body { position: relative; padding: 16px 20px 0; z-index: 1; }
.pm-channel { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent2); margin-bottom: 8px; }
.pm-title { font-family: 'Outfit', sans-serif; font-size: 1.35rem; font-weight: 800; line-height: 1.2; margin-bottom: 6px; }
.pm-sub { font-size: .85rem; color: var(--text2); margin-bottom: 12px; }
.pm-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pm-badge { font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 6px; background: var(--bg4); color: var(--text2); }
.pm-badge.time { background: rgba(230,57,70,.15); color: var(--accent); }
.pm-badge.cat  { background: rgba(72,149,239,.15); color: var(--accent2); }
.pm-desc { font-size: .88rem; color: var(--text2); line-height: 1.65; margin-bottom: 16px; }
.pm-desc--tmdb { margin-top: -8px; }
.pm-loading { font-size: .82rem; color: var(--text3); padding: 6px 0 14px; font-style: italic; }

/* Timeline avant/après */
.pm-timeline-title {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--text3); margin: 8px 0 10px;
  border-top: 1px solid var(--border); padding-top: 16px;
}
.pm-timeline {
  display: flex; flex-direction: column; gap: 0;
  max-height: 280px; overflow-y: auto; border-radius: 8px;
  background: var(--bg3); margin-bottom: 20px;
}
.pm-tl-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.pm-tl-item:last-child { border-bottom: none; }
.pm-tl-item.current { background: rgba(230,57,70,.08); }
.pm-tl-item.selected { background: rgba(72,149,239,.12); border-left: 3px solid var(--accent2); }
.pm-tl-time { font-family: 'Outfit', sans-serif; font-size: .78rem; font-weight: 700; color: var(--text3); min-width: 38px; flex-shrink: 0; padding-top: 1px; }
.pm-tl-item.current .pm-tl-time { color: var(--accent); }
.pm-tl-item.selected .pm-tl-time { color: var(--accent2); }
.pm-tl-title { font-size: .82rem; font-weight: 500; line-height: 1.35; }

/* TMDB */
.tmdb-rating { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.stars { display: flex; gap: 1px; }
.star { font-size: 1rem; color: var(--text3); }
.star.on { color: var(--gold); }
.tmdb-score { font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 800; color: var(--gold); }
.tmdb-max { font-size: .7rem; color: var(--text3); }
.tmdb-votes { font-size: .72rem; color: var(--text3); }
.tmdb-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--text3); margin-bottom: 6px; }
.tmdb-directors { font-size: .88rem; color: var(--text2); margin-bottom: 14px; }

/* Casting */
.cast-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 20px; scrollbar-width: none; }
.cast-row::-webkit-scrollbar { display: none; }
.cast-card { flex-shrink: 0; width: 68px; text-align: center; }
.cast-photo { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; background: var(--bg4); display: block; margin: 0 auto 5px; }
.cast-nophoto { width: 60px; height: 60px; border-radius: 50%; background: var(--bg4); display: flex; align-items: center; justify-content: center; font-size: .95rem; font-weight: 700; color: var(--text3); margin: 0 auto 5px; }
.cast-name { font-size: .66rem; font-weight: 600; line-height: 1.3; }
.cast-role { font-size: .6rem; color: var(--text3); margin-top: 1px; }

/* chevron */
.chevron-right { stroke: var(--text3); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
