/* ============================================================
   Station-Radio.fr — Styles principaux
   Design : dark theme moderne, SEO-friendly, mobile-first
   ============================================================ */

/* === VARIABLES === */
:root {
  --bg:         #0d1117;
  --surface:    #161b22;
  --surface2:   #21262d;
  --border:     #30363d;
  --primary:    #2563eb;
  --primary-h:  #1d4ed8;
  --accent:     #ef4444;
  --accent-h:   #dc2626;
  --text:       #e6edf3;
  --muted:      #8b949e;
  --green:      #22c55e;

  --r-sm:   6px;
  --r-md:   12px;
  --r-lg:   20px;
  --r-full: 9999px;

  --shadow-sm:  0 1px 4px rgba(0,0,0,.5);
  --shadow-md:  0 4px 16px rgba(0,0,0,.6);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.7);

  --ease: .2s ease;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, sans-serif;

  --header-h: 64px;
  --player-h: 76px;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
img  { max-width: 100%; height: auto; display: block; }
a    { color: inherit; text-decoration: none; }
ul   { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, select { font-family: inherit; }
main { flex: 1; }

/* === SKIP LINK === */
.skip-link {
  position: absolute; top: -999px; left: 1rem;
  background: var(--primary); color: #fff;
  padding: .5rem 1rem; border-radius: var(--r-sm); z-index: 9999; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* === CONTAINER === */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
@media (min-width:640px)  { .container { padding: 0 1.5rem; } }
@media (min-width:1024px) { .container { padding: 0 2rem; } }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(13,17,23,.96);
  backdrop-filter: blur(12px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  display: flex; align-items: center; gap: 1.5rem; height: 100%;
}

/* Logo */
.logo {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1.2rem; font-weight: 800; white-space: nowrap; flex-shrink: 0;
  transition: opacity var(--ease);
}
.logo:hover { opacity: .8; }
.logo-icon  { font-size: 1.4rem; }
.logo-text strong { color: var(--accent); }
.logo-text em { font-style: normal; color: var(--muted); font-size: .85em; }

/* Nav desktop */
.main-nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.nav-link {
  display: flex; align-items: center; gap: .4rem;
  padding: .45rem .85rem; border-radius: var(--r-full);
  font-size: .875rem; font-weight: 500; color: var(--muted);
  transition: all var(--ease);
}
.nav-link:hover, .nav-link.active {
  background: var(--surface); color: var(--text);
}
.nav-search-btn { font-size: .875rem; }

/* Hamburger */
.menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  padding: .5rem; margin-left: auto;
}
.bar {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px; transition: all var(--ease);
}

/* Mobile menu */
.mobile-menu {
  background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.mobile-menu a {
  padding: .85rem 1.5rem; border-left: 3px solid transparent;
  transition: all var(--ease); font-size: .95rem;
}
.mobile-menu a:hover {
  background: var(--surface2); border-left-color: var(--primary);
  padding-left: 2rem;
}

@media (max-width:768px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
}

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.search-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.88);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 80px; padding-left: 1rem; padding-right: 1rem;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.search-overlay-box {
  width: 100%; max-width: 640px;
}
.search-form {
  display: flex; align-items: center; gap: .75rem;
  background: var(--surface); border: 2px solid var(--primary);
  border-radius: var(--r-lg); padding: .6rem 1.25rem;
  box-shadow: var(--shadow-lg);
}
.search-icon { font-size: 1.1rem; flex-shrink: 0; }
.search-form input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 1.1rem; padding: .4rem 0;
}
.search-form input::placeholder { color: var(--muted); }
.search-close {
  font-size: 1.1rem; color: var(--muted); padding: .25rem;
  transition: color var(--ease);
}
.search-close:hover { color: var(--accent); }

.search-suggestions {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); margin-top: .5rem;
  overflow: hidden; box-shadow: var(--shadow-md);
}
.suggestion-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1.25rem; cursor: pointer;
  transition: background var(--ease);
  border-bottom: 1px solid var(--border);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--surface2); }
.suggestion-logo {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  object-fit: contain; background: var(--surface2); flex-shrink: 0;
}
.suggestion-name { font-weight: 600; font-size: .9rem; }
.suggestion-meta { font-size: .78rem; color: var(--muted); }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-nav {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: .6rem 0; font-size: .82rem;
}
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: .25rem;
}
.breadcrumb li { display: flex; align-items: center; gap: .25rem; color: var(--muted); }
.breadcrumb li + li::before { content: '/'; color: var(--border); margin-right: .25rem; }
.breadcrumb a { color: var(--primary); transition: color var(--ease); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb [aria-current="page"] { color: var(--text); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1.25rem; border-radius: var(--r-full);
  font-weight: 600; font-size: .875rem; transition: all var(--ease);
}
.btn-primary  { background: var(--primary); color: #fff; border: none; }
.btn-primary:hover { background: var(--primary-h); transform: translateY(-1px); }
.btn-accent   { background: var(--accent); color: #fff; border: none; }
.btn-accent:hover { background: var(--accent-h); transform: translateY(-1px); }
.btn-ghost    { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: .4rem .875rem; font-size: .8rem; }

/* ============================================================
   LOADING / ERROR
   ============================================================ */
.loading-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 5rem 2rem; gap: 1rem;
  color: var(--muted);
}
.loader {
  width: 40px; height: 40px;
  border: 3px solid var(--surface2); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite;
}
.mini-loader {
  width: 16px; height: 16px; display: inline-block;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-state {
  text-align: center; padding: 4rem 2rem; color: var(--muted);
}
.error-state h2 { color: var(--accent); font-size: 1.4rem; margin-bottom: .75rem; }
.error-state p  { margin-bottom: 1.5rem; }

/* ============================================================
   HERO v2 — Featured station + Quick Access
   ============================================================ */
.hero-v2 {
  background: linear-gradient(160deg, #0d1117 0%, #111827 60%, #0f172a 100%);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0 0;
}

/* Featured player card */
.featured-player {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.featured-player::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, rgba(37,99,235,.15) 0%, transparent 60%);
  pointer-events: none;
}
@media (max-width: 500px) {
  .featured-player { grid-template-columns: 1fr; text-align: center; }
}

/* Art du featured */
.featured-art {
  width: 100px; height: 100px;
  border-radius: var(--r-md);
  object-fit: contain;
  background: var(--surface2);
  flex-shrink: 0;
  padding: .5rem;
}
.station-avatar {
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem; color: #fff;
  border-radius: var(--r-md); flex-shrink: 0;
}
.station-avatar.featured-art { width: 100px; height: 100px; font-size: 2rem; }
.station-avatar.row-art     { width: 50px; height: 50px; font-size: 1rem; border-radius: var(--r-sm); }
.station-avatar.card-art    { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; font-size: 2rem; padding: 1rem; }
.station-avatar.quick-av    { width: 36px; height: 36px; border-radius: var(--r-sm); font-size: .8rem; flex-shrink: 0; }
.station-avatar.player-art  { width: 100%; height: 100%; border-radius: var(--r-sm); font-size: 1.1rem; }

.featured-live-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .7rem; font-weight: 700; color: var(--accent);
  letter-spacing: .5px; text-transform: uppercase; margin-bottom: .4rem;
}
.featured-name {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800; line-height: 1.15; margin-bottom: .5rem;
}
.featured-tags {
  display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1rem;
}
.featured-tags span {
  font-size: .72rem; padding: .15rem .5rem;
  background: rgba(255,255,255,.08); border-radius: var(--r-full);
  color: var(--muted); text-transform: capitalize;
}
.featured-play-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .75rem 1.75rem; border-radius: var(--r-full);
  background: var(--accent); color: #fff; font-weight: 700; font-size: 1rem;
  border: none; cursor: pointer; transition: all var(--ease);
  box-shadow: 0 4px 16px rgba(239,68,68,.35);
}
.featured-play-btn:hover { background: var(--accent-h); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(239,68,68,.5); }
.featured-play-btn.playing { background: var(--surface2); box-shadow: none; color: var(--text); }
.featured-programme {
  margin-top: .75rem; font-size: .8rem; color: var(--muted);
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
}
.featured-programme strong { color: var(--text); }
.featured-programme a { color: var(--primary); font-size: .75rem; }

/* Quick access strip */
.quick-access {
  padding-bottom: 1.25rem;
}
.quick-access-label {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .6px;
  color: var(--muted); font-weight: 700; margin-bottom: .625rem;
}
.quick-access-strip {
  display: flex; gap: .5rem; overflow-x: auto;
  padding-bottom: .4rem;
  scrollbar-width: none;
}
.quick-access-strip::-webkit-scrollbar { display: none; }
.quick-btn {
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: .625rem .75rem; min-width: 72px;
  cursor: pointer; transition: all var(--ease); flex-shrink: 0;
}
.quick-btn:hover, .quick-btn.is-playing {
  border-color: var(--accent); background: rgba(239,68,68,.08);
}
.quick-btn span {
  font-size: .65rem; font-weight: 600; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 70px; text-align: center;
}
.quick-btn .quick-art {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  object-fit: contain; background: var(--surface2);
}

/* Stats hero */
.hero-stats-strip {
  display: flex; gap: 0; border-top: 1px solid var(--border);
}
.hero-stat-item {
  flex: 1; text-align: center; padding: .875rem .5rem;
  border-right: 1px solid var(--border);
}
.hero-stat-item:last-child { border-right: none; }
.hero-stat-item strong { display: block; font-size: 1.3rem; font-weight: 800; color: var(--primary); }
.hero-stat-item span   { font-size: .7rem; color: var(--muted); }

/* ============================================================
   HERO legacy (pages pays/genre)
   ============================================================ */
.hero {
  background: linear-gradient(160deg, #0d1117 0%, #1a1a2e 55%, #16213e 100%);
  padding: 3rem 0 2.5rem; border-bottom: 1px solid var(--border);
  text-align: center;
}
.hero-flag { font-size: 3rem; margin-bottom: 1rem; }
.hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.2;
  margin-bottom: .875rem;
  background: linear-gradient(130deg, #fff 0%, #93c5fd 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  color: var(--muted); font-size: clamp(.95rem, 2vw, 1.15rem);
  max-width: 580px; margin: 0 auto 2rem;
}
.hero-badges {
  display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 2rem;
}
.hero-badge {
  padding: .3rem .85rem; border-radius: var(--r-full);
  font-size: .8rem; font-weight: 600; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  transition: all var(--ease);
}
.hero-badge:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.hero-badge.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.hero-stats {
  display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap;
  padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.hero-stat span   { font-size: .78rem; color: var(--muted); }

/* ============================================================
   PROGRAMME / ON AIR
   ============================================================ */
.on-air-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.on-air-title {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--muted); margin-bottom: .625rem;
  display: flex; align-items: center; gap: .4rem;
}
.programme-list { display: flex; flex-direction: column; gap: .5rem; }
.programme-item {
  display: flex; align-items: flex-start; gap: .875rem;
  padding: .5rem 0; border-bottom: 1px solid var(--border);
}
.programme-item:last-child { border-bottom: none; }
.programme-time {
  font-size: .75rem; font-weight: 700; color: var(--primary);
  white-space: nowrap; min-width: 45px;
}
.programme-now .programme-time { color: var(--accent); }
.programme-info { flex: 1; min-width: 0; }
.programme-show { font-size: .85rem; font-weight: 600; }
.programme-desc { font-size: .75rem; color: var(--muted); margin-top: .15rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.programme-now .programme-show { color: var(--accent); }
.programme-badge {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .65rem; font-weight: 700; color: var(--accent);
  background: rgba(239,68,68,.12); padding: .1rem .4rem; border-radius: 3px;
  margin-left: .35rem;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 2rem 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem; gap: 1rem; flex-wrap: wrap;
}
.section-title { font-size: 1.25rem; font-weight: 700; }
.section-title small { font-size: .8rem; font-weight: 400; color: var(--muted); margin-left: .5rem; }
.section-link  { font-size: .82rem; color: var(--primary); white-space: nowrap; }
.section-link:hover { text-decoration: underline; }

/* ============================================================
   STATION CARDS (grille)
   ============================================================ */
.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
}
@media (min-width:1280px) {
  .stations-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

.station-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden;
  transition: all var(--ease); cursor: pointer;
  display: flex; flex-direction: column;
}
.station-card:hover {
  border-color: var(--primary); transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.station-card.is-playing {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(239,68,68,.2);
}

.card-art-wrap {
  position: relative; padding-top: 62.5%; /* 16:10 */
  background: var(--surface2); overflow: hidden; flex-shrink: 0;
}
.card-art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; padding: .875rem;
}
.card-art-placeholder {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  font-size: 2.5rem; color: var(--border);
}
.card-play-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--ease);
}
.station-card:hover .card-play-overlay { opacity: 1; }
.card-play-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: transform var(--ease);
}
.card-play-btn:hover { transform: scale(1.1); }

/* Indicateur "en lecture" */
.card-playing-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: var(--accent);
  display: none;
}
.station-card.is-playing .card-playing-bar { display: block; }

.card-body {
  padding: .875rem; flex: 1;
  display: flex; flex-direction: column; gap: .35rem;
}
.card-name {
  font-size: .9rem; font-weight: 600; line-height: 1.3;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.card-tags {
  display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .1rem;
}
.card-tag {
  font-size: .68rem; padding: .1rem .45rem;
  background: var(--surface2); border-radius: var(--r-full);
  color: var(--muted); text-transform: capitalize;
}
.card-meta {
  display: flex; align-items: center; gap: .5rem;
  font-size: .75rem; color: var(--muted); margin-top: auto; padding-top: .35rem;
}
.card-flag { font-size: .9rem; }
.card-bitrate { margin-left: auto; font-size: .7rem; }
.card-live {
  font-size: .65rem; font-weight: 700; color: var(--accent);
  background: rgba(239,68,68,.12); padding: .1rem .35rem; border-radius: 3px;
}

/* Lien titre carte */
.card-name-link { display: block; text-decoration: none; color: inherit; }
.card-name-link:hover .card-name { color: var(--primary); }

/* Bouton play inline sur carte */
.card-play-row-btn {
  display: flex; align-items: center; gap: .4rem;
  margin-top: .625rem; width: 100%;
  padding: .45rem .75rem; border-radius: var(--r-full);
  background: var(--accent); color: #fff; font-weight: 600; font-size: .8rem;
  border: none; cursor: pointer; transition: all var(--ease);
  justify-content: center;
}
.card-play-row-btn:hover { background: var(--accent-h); transform: translateY(-1px); }
.card-play-row-btn .cpb-icon { font-size: .8rem; }
.station-card.is-playing .card-play-row-btn { background: var(--surface2); color: var(--accent); }

/* Lien art wrap */
.card-art-wrap { display: block; text-decoration: none; }

/* Row art link */
.row-art-link { display: block; text-decoration: none; flex-shrink: 0; }
.row-name { font-weight: 600; font-size: .9rem; color: var(--text); text-decoration: none; display: block; }
.row-name:hover { color: var(--primary); }

/* ============================================================
   STATION LIST (vue liste)
   ============================================================ */
.stations-list { display: flex; flex-direction: column; gap: .625rem; }
.station-row {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: .75rem 1rem;
  cursor: pointer; transition: all var(--ease);
}
.station-row:hover { border-color: var(--primary); background: var(--surface2); }
.station-row.is-playing { border-color: var(--accent); }
.row-art {
  width: 50px; height: 50px; border-radius: var(--r-sm);
  object-fit: contain; background: var(--surface2); flex-shrink: 0;
}
.row-info { flex: 1; min-width: 0; }
.row-name {
  font-weight: 600; font-size: .9rem;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.row-meta {
  font-size: .78rem; color: var(--muted);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.row-play {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; flex-shrink: 0; transition: transform var(--ease);
}
.station-row:hover .row-play { transform: scale(1.1); }

/* Vue toggle */
.view-toggle { display: flex; gap: .25rem; }
.view-btn {
  padding: .35rem .6rem; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-size: .85rem; transition: all var(--ease);
}
.view-btn:hover, .view-btn.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

/* ============================================================
   COUNTRY / GENRE GRIDS
   ============================================================ */
.countries-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(148px,1fr)); gap: .75rem;
}
.country-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 1.25rem 1rem; text-align: center;
  cursor: pointer; transition: all var(--ease);
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
}
.country-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.country-flag { font-size: 2.4rem; line-height: 1; }
.country-name { font-weight: 600; font-size: .875rem; }
.country-count { font-size: .72rem; color: var(--muted); }
.country-card.featured { border-color: rgba(37,99,235,.4); background: rgba(37,99,235,.05); }

.genres-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); gap: .75rem;
}
.genre-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 1.25rem 1rem; text-align: center;
  cursor: pointer; transition: all var(--ease);
}
.genre-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.genre-icon  { font-size: 2rem; margin-bottom: .4rem; }
.genre-name  { font-weight: 600; font-size: .875rem; }
.genre-count { font-size: .72rem; color: var(--muted); }

/* Bande francophone */
.franco-strip {
  background: linear-gradient(135deg, rgba(37,99,235,.1), rgba(239,68,68,.08));
  border: 1px solid rgba(37,99,235,.2); border-radius: var(--r-lg);
  padding: 1.5rem; margin: .5rem 0 1.5rem;
}
.franco-strip h2 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: var(--text); }
.franco-scroll {
  display: flex; gap: .75rem; overflow-x: auto;
  padding-bottom: .5rem; scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.franco-scroll::-webkit-scrollbar { height: 4px; }
.franco-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ============================================================
   FILTERS (tags genre)
   ============================================================ */
.filters {
  display: flex; gap: .4rem; flex-wrap: wrap;
  padding: 1rem 0; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem;
}
.filter-btn {
  padding: .35rem .8rem; border-radius: var(--r-full); font-size: .82rem;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); transition: all var(--ease); text-transform: capitalize;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex; justify-content: center; gap: .4rem;
  margin-top: 2.5rem; flex-wrap: wrap;
}
.page-btn {
  min-width: 36px; height: 36px; padding: 0 .5rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); background: var(--surface);
  border: 1px solid var(--border); color: var(--text); font-size: .875rem;
  transition: all var(--ease);
}
.page-btn:hover, .page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ============================================================
   PAGE STATION (détail)
   ============================================================ */
.station-page { padding: 2rem 0; }
.station-hero-card {
  display: flex; align-items: flex-start; gap: 2rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 2rem; margin-bottom: 2rem;
}
@media (max-width:580px) { .station-hero-card { flex-direction: column; align-items: center; text-align: center; } }
.station-hero-logo {
  width: 120px; height: 120px; border-radius: var(--r-md);
  object-fit: contain; background: var(--surface2); flex-shrink: 0; padding: .75rem;
}
.station-hero-info { flex: 1; }
.station-hero-name { font-size: 1.7rem; font-weight: 800; line-height: 1.2; margin-bottom: .5rem; }
.station-hero-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0; }
.station-hero-tag {
  padding: .25rem .7rem; background: var(--surface2);
  border-radius: var(--r-full); font-size: .82rem; color: var(--muted);
}
.station-hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.station-hero-meta { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .85rem; color: var(--muted); margin-top: .75rem; }
.station-hero-meta span { display: flex; align-items: center; gap: .3rem; }

.station-info-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 2rem;
}
.station-info-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 1rem 1.25rem;
}
.station-info-label { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: .25rem; }
.station-info-value { font-weight: 600; font-size: .95rem; }

/* ============================================================
   PLAYER STICKY
   ============================================================ */
.player {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: #1c2333; border-top: 1px solid var(--border);
  height: var(--player-h);
  box-shadow: 0 -4px 24px rgba(0,0,0,.6);
}
body.player-active { padding-bottom: var(--player-h); }

.player-inner {
  display: flex; align-items: center; gap: 1rem; height: 100%;
}

.player-station {
  display: flex; align-items: center; gap: .875rem; flex: 1; min-width: 0;
}
.player-art-wrap {
  position: relative; width: 48px; height: 48px; flex-shrink: 0;
}
.player-art {
  width: 100%; height: 100%; border-radius: var(--r-sm);
  object-fit: contain; background: var(--surface2);
}
.player-waves {
  position: absolute; inset: 0; border-radius: var(--r-sm);
  display: none; align-items: center; justify-content: center;
  gap: 2px; background: rgba(0,0,0,.65);
}
.player.playing .player-waves { display: flex; }
.player-waves span {
  width: 3px; background: var(--accent); border-radius: 2px;
  animation: wave 1.1s ease-in-out infinite;
}
.player-waves span:nth-child(1) { height: 55%; animation-delay: 0s; }
.player-waves span:nth-child(2) { height: 80%; animation-delay: .1s; }
.player-waves span:nth-child(3) { height: 45%; animation-delay: .2s; }
.player-waves span:nth-child(4) { height: 70%; animation-delay: .3s; }
.player-waves span:nth-child(5) { height: 60%; animation-delay: .15s; }
@keyframes wave {
  0%,100% { transform: scaleY(1); }
  50% { transform: scaleY(.3); }
}

.player-info { min-width: 0; }
.player-name {
  display: block; font-weight: 700; font-size: .9rem;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.player-meta {
  display: block; font-size: .72rem; color: var(--muted);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

.player-controls { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }
.player-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2); color: var(--text); font-size: .9rem;
  transition: all var(--ease);
}
.player-btn:hover { background: var(--surface); }
.player-play-btn {
  width: 48px; height: 48px; font-size: 1rem;
  background: var(--accent);
}
.player-play-btn:hover { background: var(--accent-h); }

.player-vol {
  display: flex; align-items: center; gap: .5rem; flex-shrink: 0;
}
.player-mute-btn { font-size: 1rem; color: var(--muted); transition: color var(--ease); }
.player-mute-btn:hover { color: var(--text); }
.vol-slider {
  width: 80px; height: 4px; border-radius: 2px;
  appearance: none; background: var(--surface2); outline: none; cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  appearance: none; width: 14px; height: 14px;
  border-radius: 50%; background: var(--primary); cursor: pointer;
}
.vol-slider::-moz-range-thumb {
  width: 14px; height: 14px; border: none;
  border-radius: 50%; background: var(--primary);
}
.player-close-btn {
  font-size: 1rem; color: var(--muted); padding: .25rem;
  transition: color var(--ease); flex-shrink: 0;
}
.player-close-btn:hover { color: var(--accent); }

/* Masquer sur mobile petits écrans */
@media (max-width:480px) {
  .player-vol  { display: none; }
  #prevBtn, #nextBtn { display: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem; margin-top: auto;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 2.5rem; margin-bottom: 2rem;
}
@media (min-width:768px) { .footer-grid { grid-template-columns: 2fr 3fr; } }
.footer-logo {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: 1.15rem; font-weight: 800; margin-bottom: .875rem;
}
.footer-brand p { color: var(--muted); font-size: .875rem; line-height: 1.7; margin-bottom: .5rem; }
.footer-api { font-size: .78rem !important; }
.footer-api a { color: var(--primary); }
.footer-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: 2rem; }
.footer-links h3 { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: .75rem; }
.footer-links ul { display: flex; flex-direction: column; gap: .4rem; }
.footer-links a { font-size: .85rem; color: var(--muted); transition: color var(--ease); }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 1.5rem;
  text-align: center; color: var(--muted); font-size: .78rem;
}
.footer-bottom p + p { margin-top: .25rem; }

/* ============================================================
   UTILITAIRES
   ============================================================ */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; clip: rect(0,0,0,0); overflow: hidden; }
.text-muted   { color: var(--muted); }
.text-center  { text-align: center; }
.gap-1 { gap: .5rem; }

/* Page d'accueil : section live badge */
.live-dot {
  display: inline-block; width: 8px; height: 8px;
  background: var(--accent); border-radius: 50%; margin-right: .35rem;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.85); }
}

/* Barre de filtres sticky */
.sticky-filters {
  position: sticky; top: var(--header-h); z-index: 10;
  background: var(--bg); border-bottom: 1px solid var(--border);
  padding: .6rem 0;
}

/* Chip pays dans détail station */
.chip {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .25rem .65rem; border-radius: var(--r-full);
  font-size: .8rem; background: var(--surface2); color: var(--muted);
}

/* ============================================================
   PUBLICITÉ — ADSENSE
   ============================================================ */
.ad-block {
  margin: 1.5rem 0; padding: .5rem;
  border: 1px dashed var(--border); border-radius: var(--r-md);
  background: var(--surface); text-align: center; min-height: 100px;
}
.ad-label {
  font-size: .65rem; text-transform: uppercase; letter-spacing: .8px;
  color: var(--muted); margin-bottom: .5rem;
}

/* ============================================================
   AFFILIATION
   ============================================================ */
.affiliate-block {
  background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(239,68,68,.05));
  border: 1px solid rgba(37,99,235,.18); border-radius: var(--r-lg);
  padding: 1.5rem; margin: 1.5rem 0;
}
.affiliate-block h3 {
  font-size: 1rem; font-weight: 700; margin-bottom: 1rem;
}
.affiliate-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .875rem;
}
.affiliate-card {
  display: flex; align-items: center; gap: .875rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 1rem;
  transition: all var(--ease); cursor: pointer;
}
.affiliate-card:hover {
  border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-sm);
}
.affiliate-img {
  font-size: 2rem; width: 48px; height: 48px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface2); border-radius: var(--r-sm);
}
.affiliate-info { min-width: 0; }
.affiliate-info strong { display: block; font-size: .875rem; font-weight: 700; margin-bottom: .2rem; }
.affiliate-info span  { display: block; font-size: .75rem; color: var(--muted); line-height: 1.4; }
.affiliate-cta {
  display: inline-block; margin-top: .4rem;
  font-size: .75rem; color: var(--primary); font-weight: 600;
}

/* Responsive grilles */
@media (max-width:480px) {
  .stations-grid { grid-template-columns: repeat(2, 1fr); gap: .625rem; }
  .countries-grid { grid-template-columns: repeat(2, 1fr); }
  .genres-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width:640px) {
  .stations-grid { grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); }
}
