/* ==========================================================================
   TÉRA VISION TV — Design system
   Couleurs du logo : vert #05470A, jaune #FBC100, blanc.
   Mobile first · mode clair / sombre · accessible · compatible TV connectées.
   ========================================================================== */

@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 800; font-display: swap; src: url("../fonts/poppins-latin-800-normal.woff2") format("woff2"); }

/* ---------- Jetons de design ---------- */
:root {
  --green-900: #022B05;
  --green-800: #05470A;
  --green-700: #0A5C12;
  --green-600: #11761C;
  --green-500: #1E8F2B;
  --green-100: #E3F1E4;
  --green-50:  #F2F8F2;
  --yellow-500: #FBC100;
  --yellow-400: #FFD23F;
  --yellow-100: #FFF4CC;
  --red-live: #E5252A;

  --bg: #FFFFFF;
  --surface: #F4F7F3;
  --surface-2: #E9EFE8;
  --elevated: #FFFFFF;
  --text: #0E1A10;
  --text-muted: #56675A;
  --border: #DCE5DB;
  --primary: var(--green-800);
  --primary-hover: var(--green-700);
  --on-primary: #FFFFFF;
  --accent: var(--yellow-500);
  --on-accent: #1A1400;
  --link: var(--green-700);
  --focus: var(--yellow-500);
  --header-bg: rgba(255, 255, 255, 0.92);
  --shadow-sm: 0 1px 2px rgba(5, 40, 10, 0.06), 0 1px 3px rgba(5, 40, 10, 0.08);
  --shadow-md: 0 6px 20px rgba(5, 40, 10, 0.10);
  --shadow-lg: 0 18px 50px rgba(5, 40, 10, 0.18);
  --overlay: linear-gradient(180deg, rgba(2, 20, 4, 0) 30%, rgba(2, 20, 4, 0.92) 100%);

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Poppins", var(--font-body);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --gutter: 16px;
  --container: 1320px;
  --header-h: 60px;
  --bottom-nav-h: 64px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  color-scheme: light;
}

/* Mode sombre : préférence système, sauf choix explicite de l'utilisateur */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #07120A;
    --surface: #0E1D12;
    --surface-2: #16291A;
    --elevated: #12241A;
    --text: #EEF3EE;
    --text-muted: #9DB0A1;
    --border: #22382A;
    --primary: #1E8F2B;
    --primary-hover: #25A834;
    --link: #6FD27C;
    --header-bg: rgba(7, 18, 10, 0.9);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #07120A;
  --surface: #0E1D12;
  --surface-2: #16291A;
  --elevated: #12241A;
  --text: #EEF3EE;
  --text-muted: #9DB0A1;
  --border: #22382A;
  --primary: #1E8F2B;
  --primary-hover: #25A834;
  --link: #6FD27C;
  --header-bg: rgba(7, 18, 10, 0.9);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ---------- Base ---------- */
:root { --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px); }
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 4.5vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.icon { display: inline-block; vertical-align: -0.22em; width: 1.25em; height: 1.25em; flex-shrink: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Focus très visible : indispensable au clavier et à la télécommande */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 700; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding-top: 28px; padding-bottom: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.section-head h2::before { content: ""; width: 6px; height: 1.1em; border-radius: 3px; background: var(--accent); }
.section-head a { font-weight: 600; font-size: .92rem; display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 2px solid transparent;
  font-family: var(--font-display); font-weight: 600; font-size: .95rem; line-height: 1;
  text-decoration: none !important; transition: background-color .2s var(--ease), transform .15s var(--ease), border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--yellow-400); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); }
.btn-light { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255,255,255,.26); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .85rem; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: transparent; color: var(--text);
}
.icon-btn:hover { background: var(--surface); }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: calc(var(--header-h) + var(--safe-top)); padding-top: var(--safe-top);
  background: var(--header-bg); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 40px; width: auto; }
.brand .logo-dark { display: none; }
:root[data-theme="dark"] .brand .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark { display: block; }
.main-nav { display: none; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.header-live {
  display: none; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: var(--red-live); color: #fff; font-weight: 700; font-size: .85rem; text-decoration: none !important;
}
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 700; font-size: .8rem; font-family: var(--font-display); }

/* Recherche */
.search-panel {
  position: fixed; inset: 0; z-index: 150; background: var(--bg); display: none; flex-direction: column;
}
.search-panel.open { display: flex; animation: fade-in .18s var(--ease); }
.search-bar { display: flex; align-items: center; gap: 8px; padding: 10px var(--gutter); border-bottom: 1px solid var(--border); }
.search-input {
  flex: 1; min-height: 46px; border-radius: 999px; border: 2px solid var(--border); background: var(--surface);
  padding: 0 18px; font-size: 1rem; outline: none;
}
.search-input:focus { border-color: var(--primary); }
.search-results { overflow-y: auto; padding: 8px var(--gutter) 24px; }
.suggest-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--radius); color: var(--text); text-decoration: none !important; }
.suggest-item:hover, .suggest-item:focus-visible { background: var(--surface); }
.suggest-item img { width: 72px; aspect-ratio: 16/9; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.suggest-type { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }

/* ---------- Navigation mobile (barre du bas) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  height: calc(var(--bottom-nav-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(5, 1fr);
}
.bottom-nav a { min-height: var(--bottom-nav-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-muted); font-size: .7rem; font-weight: 600; text-decoration: none !important; position: relative;
}
.bottom-nav a .icon { width: 24px; height: 24px; }
.bottom-nav a[aria-current="page"] { color: var(--primary); }
:root[data-theme="dark"] .bottom-nav a[aria-current="page"] { color: var(--yellow-500); }
.bottom-nav a[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.bottom-nav .nav-live .icon { color: var(--red-live); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 6px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; line-height: 1.4; }
.badge-live { background: var(--red-live); color: #fff; }
.badge-live::before, .live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
.live-dot { display: inline-flex; align-items: center; }
.badge-accent { background: var(--accent); color: var(--on-accent); }
.badge-soft { background: var(--green-100); color: var(--green-800); }
:root[data-theme="dark"] .badge-soft { background: var(--surface-2); color: var(--yellow-400); }
.badge-dark { background: rgba(0,0,0,.72); color: #fff; }

/* ---------- Héros ---------- */
.hero { position: relative; overflow: hidden; background: var(--green-900); color: #fff; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(2,30,5,.95) 0%, rgba(2,30,5,.55) 55%, rgba(2,30,5,.15) 100%), var(--overlay); }
.hero-content { position: relative; padding: 48px 0 36px; min-height: 340px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; max-width: 640px; }
.hero-content h1 { color: #fff; margin: 0; }
.hero-content p { color: rgba(255,255,255,.86); margin: 0; font-size: 1.02rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: rgba(255,255,255,.8); font-size: .9rem; }
.hero-band { height: 6px; background: linear-gradient(90deg, var(--accent) 0 62%, var(--green-800) 62% 100%); }

/* ---------- Bandeau « en ce moment » ---------- */
.on-air {
  display: grid; gap: 10px; padding: 14px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
}
.on-air-item { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.on-air-time { font-family: var(--font-display); font-weight: 700; color: var(--text-muted); font-size: .95rem; }
.on-air-item.current .on-air-time { color: var(--red-live); }
.on-air-title { font-weight: 600; }
.progress { height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

/* ---------- Rangées défilantes (style plateforme) ---------- */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 12px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
  padding: 4px var(--gutter) 12px; margin: 0 calc(-1 * var(--gutter));
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail.posters { grid-auto-columns: 40%; }
.rail-wrap { position: relative; }
.rail-btn {
  display: none; position: absolute; top: 34%; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--elevated); color: var(--text); box-shadow: var(--shadow-md);
  place-items: center;
}
.rail-btn.prev { left: -14px; }
.rail-btn.next { right: -14px; }

/* ---------- Cartes ---------- */
.card { position: relative; display: block; color: var(--text); text-decoration: none !important; border-radius: var(--radius); }
.card-media { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.card:hover .card-media img, .card:focus-visible .card-media img { transform: scale(1.04); }
.card-media .badge { position: absolute; top: 8px; left: 8px; }
.card-duration { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.78); color: #fff; font-size: .75rem; font-weight: 600; padding: 2px 7px; border-radius: 5px; }
.card-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.35); }
.card-progress > span { display: block; height: 100%; background: var(--accent); }
.card-play {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s;
  background: rgba(0,0,0,.25); color: #fff;
}
.card-play .icon { width: 46px; height: 46px; padding: 12px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.card:hover .card-play, .card:focus-visible .card-play { opacity: 1; }
.card-body { padding: 10px 2px 0; }
.card-title { font-family: var(--font-display); font-weight: 600; font-size: .98rem; line-height: 1.3; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { font-size: .8rem; color: var(--text-muted); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.card-meta span + span::before { content: "·"; margin-right: 10px; }

.poster .card-media { aspect-ratio: 2 / 3; }
.poster .card-title { font-size: .92rem; }

.grid { display: grid; gap: 18px 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.posters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.one-col { grid-template-columns: 1fr; }

/* Carte article */
.article-card .card-media { aspect-ratio: 16 / 9; }
.article-card .card-title { font-size: 1.05rem; -webkit-line-clamp: 3; }
.article-card .excerpt { color: var(--text-muted); font-size: .9rem; margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-row { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: start; }
.article-row .card-media { aspect-ratio: 4 / 3; }
.article-row .card-body { padding: 0; }

/* ---------- Puces de catégories ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px var(--gutter) 6px; margin: 0 calc(-1 * var(--gutter)); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: .88rem;
  text-decoration: none !important; white-space: nowrap;
}
.chip:hover { border-color: var(--primary); }
.chip[aria-current="true"], .chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ---------- Lecteur ---------- */
.player-shell { background: #000; }
.player-frame { position: relative; width: 100%; max-width: 1280px; margin: 0 auto; aspect-ratio: 16 / 9; background: #000; }
.player-frame .video-js { position: absolute; inset: 0; width: 100%; height: 100%; }
.player-frame .player-youtube { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; padding: 20px;
  background: radial-gradient(circle at 70% 20%, rgba(251,193,0,.28), transparent 55%), linear-gradient(160deg, var(--green-800), var(--green-900));
}
.player-overlay h2 { color: #fff; margin-bottom: 8px; }
.player-overlay p { color: rgba(255,255,255,.85); max-width: 520px; margin: 0 auto 16px; }
.standby-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.standby-overlay {
  position: absolute; inset: auto 0 0 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: 40px clamp(12px, 3vw, 24px) clamp(10px, 2.4vw, 20px); color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .35) 60%, transparent);
}
.standby-info { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.standby-title { font-family: var(--font-display); font-size: clamp(.95rem, 2.6vw, 1.35rem); line-height: 1.2; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.standby-when { font-size: clamp(.78rem, 2vw, .95rem); opacity: .9; }
.countdown-inline b { font-variant-numeric: tabular-nums; color: var(--yellow-500); }
.standby-actions { display: flex; gap: 8px; flex-shrink: 0; }
.standby-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(0, 0, 0, .45); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.standby-btn:hover { background: rgba(0, 0, 0, .65); }
.standby-btn svg { width: 22px; height: 22px; }
.standby-btn[data-standby-play] { background: var(--yellow-500); color: #1A1400; border: 0; }
.standby-btn .sound-on { display: none; }
.standby-btn[aria-pressed="true"] .sound-on { display: inline; }
.standby-btn[aria-pressed="true"] .sound-off { display: none; }
.countdown { display: flex; gap: 10px; justify-content: center; margin: 14px 0 18px; }
.countdown div { min-width: 64px; padding: 10px 8px; border-radius: var(--radius); background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); }
.countdown strong { display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--yellow-500); line-height: 1.1; }
.countdown span { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.player-info { padding: 16px 0 4px; }
.player-info h1 { font-size: clamp(1.3rem, 3.4vw, 2rem); margin-bottom: 6px; }
.player-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.player-error { position: absolute; left: 12px; right: 12px; bottom: 60px; z-index: 5; background: rgba(0,0,0,.8); color: #fff; padding: 10px 14px; border-radius: var(--radius-sm); font-size: .9rem; display: none; }
.player-error.show { display: block; }

/* Habillage Video.js aux couleurs TVT (sélecteurs préfixés pour passer devant la feuille de Video.js) */
.player-frame .video-js .vjs-big-play-button { border: 0; width: 76px; height: 76px; line-height: 76px; border-radius: 50%; background: var(--yellow-500); color: #1A1400; top: 50%; left: 50%; margin: -38px 0 0 -38px; }
.player-frame .video-js:hover .vjs-big-play-button, .player-frame .video-js .vjs-big-play-button:focus { background: var(--yellow-400); }
.player-frame .video-js .vjs-play-progress, .player-frame .video-js .vjs-volume-level { background: var(--yellow-500); }
.player-frame .video-js .vjs-control-bar { background: linear-gradient(0deg, rgba(0,0,0,.85), rgba(0,0,0,0)); height: 3.6em; }
.video-js .vjs-live-control, .video-js .vjs-seek-to-live-control { font-weight: 700; }
.video-js .vjs-seek-to-live-control .vjs-icon-placeholder { color: var(--red-live); }
.vjs-quality-select { font-size: 1.1em; }
.vjs-quality-select select { background: transparent; color: #fff; border: 0; height: 100%; padding: 0 6px; font-size: 1em; cursor: pointer; }
.vjs-quality-select option { color: #000; }

/* ---------- Grille des programmes ---------- */
.day-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px var(--gutter) 10px; margin: 0 calc(-1 * var(--gutter)); position: sticky; top: var(--header-h); z-index: 10; background: var(--bg); }
.day-tabs::-webkit-scrollbar { display: none; }
.schedule { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); margin-left: 64px; }
.slot { position: relative; padding: 12px 0 12px 18px; }
.slot-time { position: absolute; left: -66px; top: 14px; width: 52px; text-align: right; font-family: var(--font-display); font-weight: 700; font-size: .92rem; color: var(--text-muted); }
.slot::before { content: ""; position: absolute; left: -7px; top: 19px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border); }
.slot-card { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid transparent; color: var(--text); text-decoration: none !important; }
.slot-card img { width: 64px; aspect-ratio: 2/3; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.slot-title { font-family: var(--font-display); font-weight: 600; }
.slot-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: .8rem; color: var(--text-muted); }
.slot.past { opacity: .55; }
.slot.current .slot-card { border-color: var(--accent); background: var(--elevated); box-shadow: var(--shadow-md); }
.slot.current::before { background: var(--red-live); border-color: var(--red-live); box-shadow: 0 0 0 4px rgba(229,37,42,.2); }
.slot.current .slot-time { color: var(--red-live); }

/* ---------- Pages d'émission / article ---------- */
.page-cover { position: relative; background: var(--green-900); color: #fff; overflow: hidden; }
.page-cover img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; filter: blur(2px); transform: scale(1.05); }
.page-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 0%, rgba(2,30,5,.2) 60%, rgba(2,30,5,.45) 100%); }
.page-cover .container { position: relative; z-index: 1; display: grid; gap: 18px; padding-top: 28px; padding-bottom: 20px; grid-template-columns: 120px 1fr; align-items: end; }
.page-cover .poster-img { width: 120px; aspect-ratio: 2/3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.page-cover h1 { color: var(--text); margin: 4px 0; }
.page-cover .lead { color: var(--text-muted); margin: 0; }
.presenters { display: flex; flex-wrap: wrap; gap: 12px; }
.presenter { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--surface); }
.presenter .avatar { width: 38px; height: 38px; }

.prose { font-size: 1.06rem; line-height: 1.75; max-width: 720px; }
.prose h2 { margin-top: 1.4em; }
.prose blockquote { margin: 1.4em 0; padding: 12px 18px; border-left: 5px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; }
.prose img { border-radius: var(--radius); }
.article-header { max-width: 820px; margin: 0 auto; padding-top: 24px; }
.article-cover { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16/9; margin: 16px 0 24px; background: var(--surface-2); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-body { max-width: 820px; margin: 0 auto; }

/* ---------- Partage ---------- */
.share-menu { position: relative; }
.share-pop {
  position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; min-width: 230px; padding: 8px; border-radius: var(--radius);
  background: var(--elevated); border: 1px solid var(--border); box-shadow: var(--shadow-lg); display: none;
}
.share-pop.open { display: grid; animation: fade-in .15s var(--ease); }
.share-pop a, .share-pop button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text); background: none; border: 0; text-align: left; text-decoration: none !important; font-weight: 500; }
.share-pop a:hover, .share-pop button:hover { background: var(--surface); }

/* ---------- Formulaires ---------- */
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 32px var(--gutter) 48px; }
.auth-card { background: var(--elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: .92rem; }
.input {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--radius-sm); border: 2px solid var(--border);
  background: var(--bg); font-size: 1rem; transition: border-color .2s;
}
.input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px rgba(30,143,43,.15); }
.field.has-error .input { border-color: var(--red-live); }
.field-error { color: var(--red-live); font-size: .85rem; font-weight: 500; }
.field-hint { color: var(--text-muted); font-size: .82rem; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.divider { text-align: center; color: var(--text-muted); font-size: .88rem; margin: 18px 0; }

/* ---------- Alertes & toasts ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius); margin: 14px 0; display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.alert-success { background: var(--green-100); color: var(--green-800); }
.alert-info { background: var(--yellow-100); color: #5A4500; }
.alert-error { background: #FDE4E4; color: #8E1418; }
.toast-zone { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom-nav-h) + 16px + var(--safe-bottom)); z-index: 160; display: grid; gap: 8px; width: min(92vw, 460px); }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--green-900); color: #fff;
  box-shadow: var(--shadow-lg); animation: slide-up .25s var(--ease); font-size: .92rem;
}
.toast .btn { margin-left: auto; }

/* Bannière d'installation */
.install-banner {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--bottom-nav-h) + 12px + var(--safe-bottom)); z-index: 140;
  display: none; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-lg);
  background: var(--elevated); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.install-banner.show { display: flex; animation: slide-up .3s var(--ease); }
.install-banner img { width: 48px; height: 48px; border-radius: 12px; }
.install-banner strong { display: block; font-family: var(--font-display); }
.install-banner .actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }

/* Écran d'ouverture de l'application installée */
.app-splash { display: none; }
html.splash .app-splash {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 1000;
  background: radial-gradient(120% 80% at 50% 38%, #FFFFFF 0%, #F3F8F1 70%, #E6F0E3 100%);
}
html.splash body { overflow: hidden; }
.app-splash-inner { display: grid; justify-items: center; gap: 26px; width: min(78vw, 300px); }
.app-splash-logo { position: relative; animation: splash-logo-in .7s cubic-bezier(.2, .9, .3, 1.25) both; }
.app-splash-logo img { width: min(64vw, 260px); height: auto; filter: drop-shadow(0 10px 18px rgba(5, 71, 10, .18)); animation: splash-float 2.4s ease-in-out .7s infinite; }
.app-splash-logo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .75) 50%, transparent 65%);
  background-size: 250% 100%; mix-blend-mode: soft-light;
  -webkit-mask: url("../img/splash-logo.png") center / contain no-repeat; mask: url("../img/splash-logo.png") center / contain no-repeat;
  animation: splash-shine 1.8s ease-in-out .5s infinite;
}
.app-splash-bar { width: 100%; height: 6px; border-radius: 999px; background: rgba(5, 71, 10, .12); overflow: hidden; animation: fade-in .4s .25s both; }
.app-splash-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #05470A, #2E8B1F 55%, #F5B800); box-shadow: 0 0 12px rgba(245, 184, 0, .55); }
.app-splash-text { margin: -12px 0 0; font: 600 .85rem/1 var(--font-display); color: #4A5D48; letter-spacing: .04em; animation: fade-in .4s .35s both; }
html.splash-out .app-splash { animation: splash-out .5s ease forwards; }
html.splash-out .app-splash-logo img { animation: splash-logo-out .5s ease forwards; }
@keyframes splash-logo-in { from { opacity: 0; transform: scale(.6) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes splash-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes splash-shine { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }
@keyframes splash-logo-out { to { transform: scale(1.15); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .app-splash-logo, .app-splash-logo img, .app-splash-logo::after { animation: none; }
}

/* Application installée : on masque tout ce qui propose de l'installer */
html.is-app [data-hide-installed], html.is-installed [data-hide-installed] { display: none !important; }

/* Indicateur hors-ligne */
.offline-bar { display: none; position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 90; background: #3B3B3B; color: #fff; text-align: center; font-size: .85rem; padding: 6px; }
body.is-offline .offline-bar { display: block; }

/* Publicité / partenaires */
.ad-banner { display: block; border-radius: var(--radius); overflow: hidden; position: relative; border: 1px solid var(--border); }
.ad-banner img { width: 100%; }
.ad-label { position: absolute; top: 6px; right: 8px; font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; background: rgba(0,0,0,.55); color: #fff; padding: 1px 6px; border-radius: 4px; }
.ad-slot { margin: 20px 0; }
.ad-player, .ad-article { max-width: 820px; }
.ad-text { display: grid; place-items: center; min-height: 90px; padding: 18px 60px 18px 18px; background: var(--surface); color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; text-align: center; }
.partners { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.partners li > a, .partners li > img, .partners li > span { display: grid; place-items: center; height: 84px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--elevated); color: var(--text); font-weight: 600; text-align: center; text-decoration: none; }
.partners img { max-height: 56px; width: auto; object-fit: contain; }
.partners a:hover { border-color: var(--primary); }

/* Commentaires */
.comments .section-head h2 .muted { font-weight: 500; font-size: .8em; }
.comment-form { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 22px; }
.comment-input { flex: 1; min-width: 0; }
.comment-input textarea { width: 100%; resize: vertical; min-height: 64px; }
.comment-form-foot { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 8px; }
.comment-login { padding: 16px; border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 22px; }
.comment-login p { margin: 0; }
.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.comment { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.comment > div { flex: 1; min-width: 0; }
.comment p { margin: 4px 0 6px; overflow-wrap: anywhere; }
.comment-meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.avatar { flex: none; }
.avatar-soft { background: var(--surface-2); color: var(--text); }
.comment-report { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 4px 0; color: var(--text-muted); font-size: .8rem; cursor: pointer; }
.comment-report .icon, .comment-report svg { width: 14px; height: 14px; }
.comment-report:hover { color: var(--red-live); }
.comment-report[disabled] { cursor: default; color: var(--text-muted); opacity: .7; }
.comment.is-pending { opacity: .75; }
.comment-note { font-size: .78rem; color: var(--text-muted); font-style: italic; }

/* Chat du direct */
.live-aside { padding-top: 16px; display: grid; gap: 18px; align-content: start; }
.live-chat { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--elevated); display: flex; flex-direction: column; overflow: hidden; }
.live-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.live-chat-head h2 { font-size: 1rem; margin: 0; }
.live-viewers { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.live-viewers svg { width: 16px; height: 16px; }
.live-chat-mod { display: flex; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.live-chat-mod .input { min-height: 36px; padding: 4px 10px; font-size: .85rem; flex: 1; }
.live-chat-list { list-style: none; margin: 0; padding: 8px 6px 8px 14px; height: 380px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px; }
.live-chat-empty { margin: auto; color: var(--text-muted); font-size: .88rem; text-align: center; padding: 0 12px; }
.chat-msg { display: flex; gap: 8px; align-items: flex-start; padding: 5px 6px 5px 0; border-radius: var(--radius-sm); font-size: .92rem; line-height: 1.4; }
.chat-msg .avatar { width: 26px; height: 26px; font-size: .65rem; background: var(--surface-2); color: var(--text); }
.chat-msg.is-staff .avatar { background: var(--primary); color: var(--on-primary); }
.chat-msg.is-mine .avatar { background: var(--accent); color: var(--on-accent); }
.chat-msg-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chat-msg-author { font-weight: 700; margin-right: 6px; }
.chat-msg.is-staff .chat-msg-author { color: var(--link); }
.chat-msg-badge { display: inline-block; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--green-100); color: var(--green-800); border-radius: 4px; padding: 0 4px; margin-right: 6px; vertical-align: 1px; }
.chat-msg-time { font-size: .72rem; color: var(--text-muted); margin-left: 4px; }
.chat-msg-tools { display: none; gap: 2px; flex: none; }
.chat-msg:hover .chat-msg-tools, .chat-msg:focus-within .chat-msg-tools { display: inline-flex; }
.chat-msg-tools button { background: none; border: 0; padding: 3px; color: var(--text-muted); cursor: pointer; border-radius: 6px; }
.chat-msg-tools button:hover { color: var(--red-live); background: var(--surface); }
.chat-msg-tools svg { width: 15px; height: 15px; }
.chat-msg.is-pending { opacity: .6; }
.live-chat-new { position: sticky; bottom: 0; align-self: center; margin-top: auto; }
.live-chat-foot { border-top: 1px solid var(--border); padding: 10px 14px 12px; }
.live-chat-state { margin: 0 0 8px; color: var(--text-muted); }
.live-chat-state.is-error { color: var(--red-live); }
.live-chat-form { display: flex; gap: 8px; }
.live-chat-form .input { flex: 1; min-width: 0; min-height: 42px; }
.btn-icon { width: 42px; min-width: 42px; padding: 0; justify-content: center; }
.btn-icon svg { width: 18px; height: 18px; }
@media (max-width: 1023px) {
  .live-chat-list { height: 300px; }
}

/* Notifications push */
.push-card { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.push-card p { margin: 4px 0 0; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 28px 0 8px; flex-wrap: wrap; }

/* États vides */
.empty { text-align: center; padding: 48px 16px; color: var(--text-muted); }
.empty .icon { display: block; width: 48px; height: 48px; margin: 0 auto 12px; color: var(--primary); }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--green-900); color: rgba(255,255,255,.82); margin-top: 40px; }
.site-footer .container { padding-top: 36px; padding-bottom: 28px; display: grid; gap: 28px; }
.site-footer a { color: #fff; }
.site-footer h3 { color: var(--yellow-500); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.socials { display: flex; gap: 8px; }
.socials a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.1); }
.socials a:hover { background: var(--yellow-500); color: var(--on-accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; font-size: .82rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.footer-band { height: 5px; background: linear-gradient(90deg, var(--accent) 0 70%, #fff 70% 100%); }

/* ---------- Page d'installation ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; padding: 14px 14px 14px 58px; background: var(--surface); border-radius: var(--radius); }
.steps li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; font-family: var(--font-display); }
.platform-cards { display: grid; gap: 16px; }
.platform-card { padding: 20px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--elevated); }

/* Paramètres rapides (mode éco, thème) */
.settings-list { display: grid; gap: 10px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); }
.switch { position: relative; width: 52px; height: 30px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-2); border: 2px solid var(--border); transition: background .2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--primary); border-color: var(--primary); }
.switch input:checked + span::after { transform: translateX(22px); }
.switch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Animations ---------- */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.reveal { animation: slide-up .45s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Cartes : statistiques, vues, survol ---------- */
.card { transition: transform .25s var(--ease); }
.card-media { box-shadow: var(--shadow-sm); transition: box-shadow .25s var(--ease); }
.card-media::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.45)); pointer-events: none; }
.card:hover, .card:focus-visible { transform: translateY(-3px); }
.card:hover .card-media, .card:focus-visible .card-media { box-shadow: var(--shadow-md), 0 0 0 2px var(--accent); }
.card-badges { position: absolute; top: 8px; left: 8px; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.card-badges .badge, .card-media .card-badges .badge { position: static; }
.card-duration { z-index: 1; }
.card-play { z-index: 1; }
.card-kicker { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--link); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-theme="dark"] .card-kicker { color: var(--yellow-400); }
.card-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; font-size: .8rem; color: var(--text-muted); }
.card-stats > span { display: inline-flex; align-items: center; gap: 5px; }
.card-stats .icon { width: 15px; height: 15px; flex-shrink: 0; }
.card-stats > span + span::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; margin-right: 7px; }
.article-card .card-title { margin-top: 0; }

/* Ligne compacte (liste « À suivre ») */
.video-row { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 12px; align-items: start; }
.video-row .card-body { padding: 0; }
.video-row .card-title { font-size: .92rem; }
.video-row .card-kicker { margin: 4px 0 0; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .8rem; }
.video-row .card-stats { margin-top: 2px; }
.video-row:hover { transform: none; }
.up-next { display: grid; gap: 14px; }

/* Liste de statistiques (vues, date, durée…) */
.stat-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stat-list li > *, .stat-list li { display: inline-flex; align-items: center; gap: 6px; }
.stat-list li { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .86rem; color: var(--text-muted); }
.stat-list li a { color: inherit; }
.stat-list li a:hover { color: var(--text); }
.stat-list .icon { width: 16px; height: 16px; }
.stat-list strong { color: var(--text); font-weight: 700; }
.stat-list .stat-strong { background: var(--green-100); border-color: transparent; color: var(--green-800); }
.stat-list .stat-strong strong { color: var(--green-800); }
:root[data-theme="dark"] .stat-list .stat-strong { background: var(--surface-2); color: var(--yellow-400); }
:root[data-theme="dark"] .stat-list .stat-strong strong { color: var(--yellow-400); }
.stat-list .stat-live { background: rgba(229,37,42,.1); border-color: transparent; color: var(--red-live); }
.stat-list .stat-live strong { color: var(--red-live); }
.stat-inline { display: inline-flex; align-items: center; gap: 4px; }
.stat-inline .icon { width: 15px; height: 15px; }
.hero-views { display: inline-flex; align-items: center; gap: 5px; }
.hero-views .icon { width: 16px; height: 16px; }

/* ---------- Page vidéo (lecteur + « À suivre ») ---------- */
.watch { padding: 0 0 8px; }
.watch-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 32px; }
.watch-player { margin: 0 calc(-1 * var(--gutter)); width: auto; max-width: none; }
.watch-info { padding: 16px 0 4px; }
.watch-info h1 { font-size: clamp(1.3rem, 3.2vw, 1.9rem); margin: 8px 0 0; }
.watch-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.watch-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.watch-bar .player-actions { margin: 0; }
.watch-show { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.watch-show .avatar { width: 42px; height: 42px; font-size: 1rem; background: var(--primary); color: #fff; }
.watch-show strong { display: block; font-family: var(--font-display); line-height: 1.2; }
.watch-show small { color: var(--text-muted); font-size: .8rem; }
.watch-desc { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); }
.watch-desc p { white-space: pre-line; }
.watch-desc p { margin: 0; }
.watch-desc .watch-desc-head { font-weight: 700; font-size: .9rem; margin-bottom: 6px; white-space: normal; }
.watch-aside .section-head { margin-bottom: 12px; }
.watch-aside .section-head h2 { font-size: 1.1rem; }
.watch-comments .comments { padding-top: 8px; }
.watch-comments .comments .container { max-width: none !important; padding: 0; }

@media (max-width: 599px) {
  .video-row { grid-template-columns: 140px minmax(0, 1fr); }
}

/* ==========================================================================
   Points de rupture : tablette, ordinateur, grand écran / TV
   ========================================================================== */
@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .rail { grid-auto-columns: 44%; }
  .rail.posters { grid-auto-columns: 26%; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.posters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .page-cover .container { grid-template-columns: 170px 1fr; }
  .page-cover .poster-img { width: 170px; }
  .platform-cards { grid-template-columns: repeat(2, 1fr); }
  .site-footer .container { grid-template-columns: 2fr 1fr 1fr; }
  .install-banner { left: auto; right: 24px; width: 420px; }
  .hero-content { min-height: 400px; }
}

@media (min-width: 1024px) {
  :root { --header-h: 72px; }
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .toast-zone { bottom: 24px; }
  .install-banner { bottom: 24px; }
  .main-nav { display: flex; gap: 2px; margin-left: 18px; }
  .main-nav a { padding: 10px 14px; border-radius: 999px; color: var(--text); font-weight: 600; font-size: .95rem; text-decoration: none !important; }
  .main-nav a:hover { background: var(--surface); }
  .main-nav a[aria-current="page"] { background: var(--green-100); color: var(--green-800); }
  :root[data-theme="dark"] .main-nav a[aria-current="page"] { background: var(--surface-2); color: var(--yellow-500); }
  .header-live { display: inline-flex; }
  .brand img { height: 48px; }
  .rail { grid-auto-columns: calc((100% - 3 * 14px) / 4); gap: 14px; margin: 0; padding: 4px 0 12px; scroll-padding: 0; }
  .rail.posters { grid-auto-columns: calc((100% - 5 * 14px) / 6); }
  .rail-btn { display: grid; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 18px; }
  .grid.posters { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-content { min-height: 480px; padding-bottom: 56px; }
  .home-top { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
  .home-top > *, .live-layout > * { min-width: 0; }
  .live-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 28px; align-items: start; }
  .watch { padding-top: 24px; }
  .watch-grid { grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "main aside" "comments aside"; align-items: start; }
  .watch-main { grid-area: main; min-width: 0; }
  .watch-aside { grid-area: aside; min-width: 0; }
  .watch-comments { grid-area: comments; min-width: 0; }
  .watch-player { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
  .chips, .day-tabs { margin: 0; padding-left: 0; padding-right: 0; }
  .search-panel { background: rgba(0,0,0,.55); }
  .search-panel .search-box { background: var(--bg); width: min(720px, 94vw); margin: 80px auto 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-height: 76vh; display: flex; flex-direction: column; overflow: hidden; }
  .offline-bar { top: var(--header-h); }
}

/* Grands écrans et téléviseurs connectés : tout est agrandi pour une lecture à distance */
@media (min-width: 1600px) {
  html { font-size: 112.5%; }
  :root { --container: 1680px; }
  .rail { grid-auto-columns: calc((100% - 4 * 14px) / 5); }
}
@media (min-width: 2400px) {
  html { font-size: 150%; }
  :root { --container: 2200px; }
}

/* Impression des articles */
@media print {
  .site-header, .bottom-nav, .site-footer, .install-banner, .toast-zone, .player-actions, .share-menu { display: none !important; }
  body { padding: 0; }
}

/* Liste simple avec icône (prochaines diffusions…) */
.icon-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.icon-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 14px; border-radius: var(--radius); background: var(--surface); }
.icon-list li .icon { color: var(--primary); }

/* Affiches d'émission : catégorie et vues sur deux lignes */
.poster .card-stats { flex-direction: column; align-items: flex-start; gap: 2px; }
.poster .card-stats > span + span::before { display: none; }

/* ---------- Fenêtres modales (remplacent les alertes du navigateur) ---------- */
.tvt-modal-open, .tvt-modal-open body { overflow: hidden; }
.tvt-modal-backdrop {
  position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px;
  background: rgba(2, 20, 4, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: tvt-modal-fade .2s ease both;
}
.tvt-modal {
  position: relative; width: min(100%, 440px); max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 28px 24px 22px; border-radius: 22px; background: var(--elevated); color: var(--text);
  border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(2, 20, 4, .35); text-align: center;
  animation: tvt-modal-in .32s cubic-bezier(.2, 1.2, .4, 1) both;
}
.tvt-modal::before { content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 4px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, var(--green-800), var(--yellow-500)); }
.tvt-modal-icon {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-100); color: var(--green-800); animation: tvt-modal-pop .45s .08s cubic-bezier(.2, 1.4, .4, 1) both;
}
.tvt-modal-icon svg { width: 28px; height: 28px; }
.tvt-modal.tone-danger .tvt-modal-icon { background: rgba(229, 37, 42, .12); color: var(--red-live); }
.tvt-modal.tone-danger::before { background: linear-gradient(90deg, var(--red-live), #ff7a59); }
.tvt-modal.tone-warning .tvt-modal-icon { background: var(--yellow-100); color: #8a6100; }
:root[data-theme="dark"] .tvt-modal-icon { background: var(--surface-2); color: var(--yellow-400); }
:root[data-theme="dark"] .tvt-modal.tone-danger .tvt-modal-icon { color: #ff6b6f; }
.tvt-modal h2 { font-size: 1.2rem; margin: 0 0 6px; }
.tvt-modal-text { margin: 0 auto; max-width: 340px; color: var(--text-muted); font-size: .95rem; line-height: 1.5; }
.tvt-modal-input { margin-top: 16px; text-align: left; }
.tvt-modal-input.is-invalid { border-color: var(--red-live); animation: tvt-modal-shake .35s; }
.tvt-modal-choices { display: grid; gap: 8px; margin-top: 16px; text-align: left; }
.tvt-modal-choice { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--border); cursor: pointer; transition: border-color .2s, background .2s; }
.tvt-modal-choice:hover { background: var(--surface); }
.tvt-modal-choice:has(input:checked) { border-color: var(--primary); background: var(--surface); }
.tvt-modal-choice input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; }
.tvt-modal-choice small { display: block; color: var(--text-muted); font-size: .8rem; }
.tvt-modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap-reverse; }
.tvt-modal-actions .btn { flex: 1 1 140px; }
.tvt-modal .btn-danger { background: var(--red-live); color: #fff; }
.tvt-modal .btn-danger:hover { background: #c81e23; }
.tvt-modal-backdrop.is-leaving { animation: tvt-modal-fade .18s ease reverse both; }
.tvt-modal-backdrop.is-leaving .tvt-modal { animation: tvt-modal-out .18s ease both; }
@keyframes tvt-modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tvt-modal-in { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes tvt-modal-out { to { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes tvt-modal-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tvt-modal-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (max-width: 599px) {
  .tvt-modal-backdrop { place-items: end center; padding: 0; }
  .tvt-modal { width: 100%; border-radius: 22px 22px 0 0; padding-bottom: calc(22px + var(--safe-bottom)); animation-name: tvt-modal-sheet; }
  .tvt-modal-backdrop.is-leaving .tvt-modal { animation: tvt-modal-sheet-out .2s ease both; }
}
@keyframes tvt-modal-sheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes tvt-modal-sheet-out { to { transform: translateY(100%); } }

/* Cloche des notifications (en-tête) */
.push-bell { position: relative; }
.push-bell-dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); animation: pulse 1.8s infinite; }
.push-bell.is-on .push-bell-dot { display: none; }
.push-bell.is-on { color: var(--primary); }
:root[data-theme="dark"] .push-bell.is-on { color: var(--yellow-400); }
