:root {
  --ink: #f4f7fb;
  --night: #050b18;
  --line: #203552;
  --blue: #3b82f6;
  --red: #ef3340;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--night);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; }
select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid #77a9ff;
  outline-offset: 3px;
}
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.site-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 12%, rgba(29, 78, 216, .15), transparent 27rem),
    radial-gradient(circle at 78% 31%, rgba(37, 99, 235, .08), transparent 30rem),
    linear-gradient(180deg, #07101f 0, #050b18 78%);
}
.topbar {
  height: 72px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: clamp(18px, 2.2vw, 38px);
  align-items: center;
  border-bottom: 1px solid rgba(82, 111, 151, .28);
  background: rgba(5, 11, 24, .84);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; letter-spacing: .16em; width: max-content; }
.brand strong { font-weight: 800; }
.brand-mark { width: 24px; height: 23px; display: flex; align-items: end; gap: 3px; }
.brand-mark i { display: block; width: 5px; border-radius: 1px 1px 0 0; background: #e9f2ff; transform: skew(-9deg); }
.brand-mark i:nth-child(1) { height: 11px; opacity: .62; }
.brand-mark i:nth-child(2) { height: 17px; opacity: .82; }
.brand-mark i:nth-child(3) { height: 23px; }
.primary-nav { height: 100%; display: flex; align-items: center; gap: clamp(18px, 2.2vw, 38px); }
.primary-nav a, .primary-nav button { height: 100%; display: grid; place-items: center; position: relative; color: #94a7c1; text-decoration: none; font-size: 14px; font-weight: 600; }
.primary-nav button { border: 0; background: transparent; cursor: pointer; padding: 0; }
.primary-nav a:hover, .primary-nav button:hover { color: #fff; }
.primary-nav a.active { color: #fff; }
.primary-nav a.active::after { content: ""; position: absolute; bottom: 0; height: 2px; left: 0; right: 0; background: var(--blue); box-shadow: 0 -3px 14px rgba(59, 130, 246, .8); }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.theme-picker { position: relative; display: flex; align-items: center; gap: 8px; }
.theme-picker-label { color: #71859e; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.theme-picker select { height: 34px; max-width: 155px; padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #0a1629; color: #dce6f2; font-size: 10px; font-weight: 700; cursor: pointer; }
.theme-picker select:focus-visible { outline: 2px solid #77a9ff; outline-offset: 3px; }
.icon-button { width: 38px; height: 38px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #b8c6d9; font-size: 27px; line-height: 1; cursor: pointer; }
.icon-button:hover { border-color: var(--line); background: rgba(255,255,255,.04); color: #fff; }
.search-field input { width: 190px; height: 36px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; background: #0a1629; color: #fff; }
.search-field input::placeholder { color: #6e829e; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; height: 33px; padding: 0 13px; border: 1px solid rgba(239,51,64,.4); border-radius: 8px; color: #ff9aa1; background: rgba(239,51,64,.08); text-transform: uppercase; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.live-dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(239,51,64,.13), 0 0 13px rgba(239,51,64,.8); animation: pulse 1.8s ease-out infinite; }
.content-wrap { width: min(1410px, calc(100% - clamp(36px, 7vw, 104px))); margin: 0 auto; }
.hero { padding: 44px 0 50px; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: #71859e; font-size: 10px; font-weight: 700; letter-spacing: .21em; text-transform: uppercase; margin-bottom: 20px; }
.eyebrow span { color: #ff9299; }
.eyebrow i { width: 1px; height: 12px; background: #334967; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(300px, .72fr); gap: 18px; }
.stage, .on-now { border: 1px solid rgba(45, 69, 100, .78); background: rgba(11, 24, 45, .76); box-shadow: 0 22px 55px rgba(0,0,0,.18); }
.stage { min-width: 0; }
.video-frame { aspect-ratio: 16 / 8.55; position: relative; overflow: hidden; background: #020711; }
.video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.on-air { position: absolute; top: 16px; left: 16px; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 5px; background: rgba(4,9,19,.76); backdrop-filter: blur(8px); color: white; text-transform: uppercase; font-size: 9px; font-weight: 800; letter-spacing: .12em; pointer-events: none; }
.now-playing { min-height: 118px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 26px; border-top: 1px solid var(--line); }
.station-line { color: #7b90ad; text-transform: uppercase; font-size: 10px; font-weight: 750; letter-spacing: .13em; margin: 0 0 6px; }
.station-line span { color: var(--blue); padding: 0 4px; }
.now-playing h1 { font-size: clamp(24px, 2.3vw, 34px); line-height: 1.1; letter-spacing: -.035em; margin: 0; }
.now-playing p:last-child { color: #90a3bc; margin: 8px 0 0; font-size: 13px; }
.source-link { flex: 0 0 auto; color: #b9c9dd; text-decoration: none; font-size: 11px; font-weight: 700; padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; }
.source-link:hover { color: white; border-color: #3c6090; background: rgba(59,130,246,.07); }
.on-now { display: flex; flex-direction: column; min-height: 100%; }
.aside-heading { padding: 21px 20px 18px; display: flex; justify-content: space-between; align-items: end; border-bottom: 1px solid var(--line); }
.section-kicker { display: block; color: #68809f; text-transform: uppercase; font-size: 9px; font-weight: 800; letter-spacing: .18em; margin-bottom: 5px; }
.aside-heading h2, .section-head h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.count { color: #647894; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.on-now-list { flex: 1; }
.now-item { width: 100%; display: grid; grid-template-columns: 23px 50px 1fr 28px; gap: 12px; align-items: center; padding: 14px 15px; border: 0; border-bottom: 1px solid rgba(36,57,84,.82); background: transparent; color: inherit; text-align: left; cursor: pointer; transition: background .18s ease, border-color .18s ease; }
.now-item:hover, .now-item.selected { background: linear-gradient(90deg, rgba(59,130,246,.1), rgba(59,130,246,.025)); }
.now-item.selected { box-shadow: inset 2px 0 var(--blue); }
.rank { color: #516780; font-family: ui-monospace, monospace; font-size: 10px; }
.station-avatar { width: 50px; height: 39px; display: grid; place-items: center; overflow: hidden; position: relative; color: white; font-size: 11px; font-weight: 900; letter-spacing: -.02em; background: radial-gradient(circle at 75% 20%, var(--accent), transparent 35%), linear-gradient(135deg, var(--station), #06101f 85%); border: 1px solid rgba(255,255,255,.13); }
.now-copy { min-width: 0; display: block; }
.now-copy strong { display: block; color: #dae4f0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-copy small { display: flex; align-items: center; gap: 7px; margin-top: 6px; color: #71869f; font-size: 9px; }
.now-copy .live-dot { width: 5px; height: 5px; box-shadow: none; }
.play-mini { width: 26px; height: 26px; border: 1px solid #294262; display: grid; place-items: center; border-radius: 50%; color: #8399b4; font-size: 8px; }
.now-item:hover .play-mini, .now-item.selected .play-mini { border-color: var(--blue); color: white; background: var(--blue); }
.official-note { display: flex; align-items: center; gap: 12px; margin: 16px; padding: 13px; border: 1px solid rgba(61,89,124,.7); background: #0a1628; }
.shield { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(59,130,246,.14); color: #75a9ff; font-size: 12px; }
.official-note strong, .official-note small { display: block; }
.official-note strong { font-size: 10px; color: #c8d5e5; }
.official-note small { margin-top: 3px; color: #647994; font-size: 9px; }
.channels-section { padding: 40px 0 90px; border-top: 1px solid rgba(47,72,104,.48); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.section-head h2 { font-size: 25px; }
.filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.filters button { min-height: 32px; padding: 0 13px; border: 1px solid #203652; border-radius: 8px; background: #0a1527; color: #8398b1; font-size: 10px; font-weight: 700; cursor: pointer; transition: .18s ease; }
.filters button:hover { color: white; border-color: #3b5d87; }
.filters button.active { color: white; background: #2563d5; border-color: #3b82f6; box-shadow: 0 8px 22px rgba(37,99,213,.22); }
.channel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.channel-card { min-width: 0; overflow: hidden; border: 1px solid rgba(39,61,89,.92); background: #0b172a; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.channel-card:hover { transform: translateY(-2px); border-color: #365c8d; box-shadow: 0 18px 30px rgba(0,0,0,.18); }
.card-preview { width: 100%; aspect-ratio: 16 / 8.8; position: relative; overflow: hidden; border: 0; border-bottom: 1px solid var(--line); display: grid; place-items: center; background: #081221; cursor: pointer; color: white; }
.preview-glow { position: absolute; inset: 0; background: radial-gradient(circle at 70% 24%, color-mix(in srgb, var(--accent) 50%, transparent), transparent 26%), linear-gradient(145deg, color-mix(in srgb, var(--station) 80%, #07101d), #07101d 72%); opacity: .82; }
.preview-glow::after { content: ""; position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px); background-size: 34px 34px; transform: perspective(260px) rotateX(62deg) scale(1.5) translateY(20%); }
.card-monogram { position: relative; font-size: clamp(23px, 2.5vw, 38px); font-weight: 900; letter-spacing: -.055em; text-shadow: 0 6px 24px rgba(0,0,0,.35); }
.card-live { position: absolute; left: 10px; top: 10px; display: flex; align-items: center; gap: 7px; padding: 5px 7px; background: rgba(4,9,18,.73); color: #fff; text-transform: uppercase; font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.card-live .live-dot { width: 5px; height: 5px; box-shadow: none; }
.favorite-button { position: absolute; right: 10px; top: 9px; width: 29px; height: 29px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: rgba(4,9,18,.66); color: #b9c8da; font-size: 15px; line-height: 1; cursor: pointer; z-index: 2; }
.favorite-button:hover, .favorite-button.saved { border-color: #f2c466; color: #ffd77a; background: rgba(43,31,8,.78); }
.card-play { position: absolute; right: 11px; bottom: 11px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(4,9,18,.68); border: 1px solid rgba(255,255,255,.28); font-size: 9px; transform: scale(.94); transition: .18s ease; }
.card-preview:hover .card-play { background: var(--blue); border-color: var(--blue); transform: scale(1); }
.card-body { min-height: 67px; padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-body h3 { margin: 0; font-size: 12px; color: #dce6f2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-body p { margin: 6px 0 0; color: #627791; font-size: 9px; }
.language-tag { flex: 0 0 auto; padding: 5px 7px; border: 1px solid #263d5c; color: #7f95b0; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.empty-state { padding: 60px 20px; border: 1px dashed var(--line); color: #8295ad; text-align: center; }
.empty-state strong, .empty-state span { display: block; }
.empty-state strong { color: #d7e1ed; font-size: 15px; }
.empty-state span { margin-top: 8px; font-size: 12px; }
.about-section { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; padding: 76px 0; border-top: 1px solid rgba(47,72,104,.48); }
.about-section h2 { max-width: 620px; margin: 8px 0 0; font-size: clamp(28px, 3.2vw, 46px); line-height: 1.08; letter-spacing: -.045em; }
.about-copy > p { margin: 0; max-width: 620px; color: #91a3bb; font-size: 14px; line-height: 1.8; }
.about-stats { display: flex; gap: 34px; margin-top: 30px; padding-top: 25px; border-top: 1px solid var(--line); }
.about-stats span { display: flex; align-items: baseline; gap: 7px; color: #7186a1; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.about-stats strong { color: white; font-size: 26px; letter-spacing: -.04em; }
.footer { border-top: 1px solid rgba(47,72,104,.55); background: #030813; }
.footer-inner { width: min(1410px, calc(100% - clamp(36px, 7vw, 104px))); min-height: 112px; margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr 1fr; align-items: center; gap: 30px; }
.footer-inner p { margin: 0; color: #61748e; font-size: 10px; line-height: 1.6; text-align: center; }
.footer-inner > a:last-child { justify-self: end; color: #8ea3bd; text-decoration: none; font-size: 11px; font-weight: 700; }
.footer-inner > a:last-child:hover { color: white; }

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239,51,64,.45); } 70% { box-shadow: 0 0 0 6px rgba(239,51,64,0); } 100% { box-shadow: 0 0 0 0 rgba(239,51,64,0); } }

@media (max-width: 1100px) {
  .topbar { grid-template-columns: 1fr auto; }
  .primary-nav { display: none; }
  .hero-grid { grid-template-columns: minmax(0, 1.5fr) minmax(270px, .68fr); }
  .source-link { display: none; }
  .channel-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1380px) and (min-width: 1101px) {
  .topbar { padding-inline: 24px; column-gap: 18px; }
  .primary-nav { gap: 19px; }
  .theme-picker { gap: 7px; }
  .theme-picker select { max-width: 145px; }
}
@media (max-width: 820px) {
  .content-wrap { width: min(100% - 32px, 680px); }
  .hero { padding-top: 28px; }
  .hero-grid { grid-template-columns: 1fr; }
  .on-now { min-height: auto; }
  .on-now-list { display: grid; grid-template-columns: repeat(2, 1fr); }
  .now-item:nth-child(odd) { border-right: 1px solid rgba(36,57,84,.82); }
  .official-note { display: none; }
  .channel-grid { grid-template-columns: repeat(2, 1fr); }
  .section-head { align-items: flex-start; flex-direction: column; }
  .filters { justify-content: flex-start; }
  .about-section { grid-template-columns: 1fr; gap: 30px; }
  .footer-inner { grid-template-columns: 1fr; padding: 30px 0; justify-items: center; }
  .footer-inner p { max-width: 520px; }
  .footer-inner > a:last-child { justify-self: center; }
}
@media (max-width: 560px) {
  .topbar { height: 62px; padding: 0 16px; }
  .brand { font-size: 12px; letter-spacing: .12em; }
  .live-pill { display: none; }
  .theme-picker-label { display: none; }
  .theme-picker select { width: 108px; padding-left: 8px; }
  .search-field { position: absolute; left: 16px; right: 61px; }
  .search-field input { width: 100%; }
  .content-wrap { width: calc(100% - 24px); }
  .eyebrow { font-size: 8px; letter-spacing: .14em; }
  .video-frame { aspect-ratio: 16 / 9; }
  .now-playing { min-height: 108px; padding: 18px; }
  .now-playing h1 { font-size: 24px; }
  .on-now-list { grid-template-columns: 1fr; }
  .now-item:nth-child(odd) { border-right: 0; }
  .channel-grid { grid-template-columns: 1fr; }
  .filters { flex-wrap: nowrap; width: calc(100vw - 24px); overflow-x: auto; padding-bottom: 5px; }
  .filters button { flex: 0 0 auto; }
  .about-stats { gap: 18px; justify-content: space-between; }
  .about-stats span { display: block; }
  .about-stats strong { display: block; margin-bottom: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Mise en page haute définition : l’interface reste nette et occupe mieux
   les écrans 2K et 4K. Les flux vidéo conservent la définition fournie par
   chaque chaîne. */
@media (min-width: 1800px) {
  .topbar { height: 90px; padding-inline: 64px; }
  .brand { font-size: 18px; }
  .brand-mark { transform: scale(1.18); transform-origin: left center; margin-right: 4px; }
  .primary-nav a, .primary-nav button { font-size: 16px; }
  .theme-picker-label { font-size: 11px; }
  .theme-picker select { height: 42px; max-width: 190px; font-size: 13px; }
  .icon-button { width: 44px; height: 44px; }
  .content-wrap, .footer-inner { width: min(2200px, calc(100% - 144px)); }
  .hero { padding-block: 58px 70px; }
  .hero-grid { grid-template-columns: minmax(0, 1.78fr) minmax(460px, .7fr); gap: 25px; }
  .eyebrow { font-size: 13px; margin-bottom: 25px; }
  .now-playing { min-height: 150px; padding: 29px 34px; }
  .now-playing h1 { font-size: clamp(34px, 2.1vw, 48px); }
  .now-playing p:last-child { font-size: 16px; }
  .station-line, .source-link { font-size: 13px; }
  .aside-heading { padding: 26px 25px 22px; }
  .aside-heading h2, .section-head h2 { font-size: 25px; }
  .section-kicker, .count { font-size: 12px; }
  .now-item { grid-template-columns: 30px 66px 1fr 36px; gap: 15px; padding: 17px 20px; }
  .station-avatar { width: 66px; height: 49px; font-size: 14px; }
  .now-copy strong { font-size: 15px; }
  .now-copy small, .rank { font-size: 11px; }
  .play-mini { width: 34px; height: 34px; font-size: 10px; }
  .official-note { margin: 20px; padding: 16px; }
  .official-note strong { font-size: 12px; }
  .official-note small { font-size: 11px; }
  .channels-section { padding-block: 55px 115px; }
  .section-head h2 { font-size: 34px; }
  .filters button { min-height: 40px; padding-inline: 17px; font-size: 13px; }
  .channel-grid { grid-template-columns: repeat(5, 1fr); gap: 22px; }
  .card-body { min-height: 86px; padding: 17px 18px; }
  .card-body h3 { font-size: 15px; }
  .card-body p { font-size: 11px; }
  .language-tag { font-size: 10px; }
  .footer-inner { min-height: 145px; }
}

@media (min-width: 3000px) {
  .topbar { height: 116px; padding-inline: 100px; }
  .brand { font-size: 25px; }
  .brand-mark { transform: scale(1.55); margin-right: 13px; }
  .primary-nav { gap: 50px; }
  .primary-nav a, .primary-nav button { font-size: 21px; }
  .theme-picker-label { font-size: 15px; }
  .theme-picker select { height: 58px; max-width: 260px; padding-inline: 18px 42px; font-size: 18px; }
  .icon-button { width: 58px; height: 58px; font-size: 36px; }
  .content-wrap, .footer-inner { width: min(3200px, calc(100% - 220px)); }
  .hero { padding-block: 82px 95px; }
  .hero-grid { grid-template-columns: minmax(0, 1.82fr) minmax(680px, .68fr); gap: 34px; }
  .eyebrow { font-size: 17px; margin-bottom: 34px; }
  .now-playing { min-height: 205px; padding: 40px 48px; }
  .now-playing h1 { font-size: 62px; }
  .now-playing p:last-child { font-size: 21px; }
  .station-line, .source-link { font-size: 17px; }
  .source-link { padding: 15px 18px; }
  .aside-heading { padding: 35px 32px 29px; }
  .aside-heading h2 { font-size: 36px; }
  .section-kicker, .count { font-size: 16px; }
  .now-item { grid-template-columns: 40px 90px 1fr 50px; gap: 21px; padding: 24px 27px; }
  .station-avatar { width: 90px; height: 67px; font-size: 19px; }
  .now-copy strong { font-size: 21px; }
  .now-copy small, .rank { font-size: 15px; }
  .play-mini { width: 47px; height: 47px; font-size: 14px; }
  .official-note { margin: 27px; padding: 22px; }
  .official-note strong { font-size: 17px; }
  .official-note small { font-size: 15px; }
  .section-head h2 { font-size: 47px; }
  .filters button { min-height: 55px; padding-inline: 24px; font-size: 17px; }
  .channel-grid { grid-template-columns: repeat(6, 1fr); gap: 29px; }
  .card-monogram { font-size: 58px; }
  .card-body { min-height: 117px; padding: 23px 24px; }
  .card-body h3 { font-size: 20px; }
  .card-body p { font-size: 15px; }
  .language-tag { padding: 8px 11px; font-size: 13px; }
  .about-section { padding-block: 110px; }
  .about-section h2 { max-width: 900px; font-size: 65px; }
  .about-copy > p { max-width: 900px; font-size: 21px; }
  .footer-inner { min-height: 190px; }
  .footer-inner p, .footer-inner > a:last-child { font-size: 15px; }
}
