/* ============================================================
   Radio CMS 2026 — Feuille de styles principale
   ============================================================ */

/* Variables injectées dynamiquement par PHP via style en ligne */
:root {
  --primary:      #e63946;
  --secondary:    #1d3557;
  --accent:       #457b9d;
  --bg:           #0d0d0d;
  --bg2:          #1a1a2e;
  --text:         #f0f0f0;
  --text-muted:   #9ca3af;
  --nav-bg:       #0d0d0d;
  --player-bg:    #0d0d1e;
  --border:       rgba(255,255,255,.08);
  --radius:       12px;
  --radius-sm:    6px;
  --shadow:       0 4px 24px rgba(0,0,0,.4);
  --transition:   .25s ease;
  --player-h:     72px;
  --nav-h:        70px;
  --font:         'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body { overflow-x: hidden; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: calc(var(--player-h) + 16px);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }
ul { list-style: none; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ============================================================
   NAVIGATION
   ============================================================ */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  transition: background var(--transition), box-shadow var(--transition);
}
#navbar.scrolled { box-shadow: var(--shadow); }
.nav-container {
  max-width: 1400px; margin: 0 auto; width: 100%;
  padding: 0 24px;
  display: flex; align-items: center; gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.25rem; font-weight: 700; white-space: nowrap;
}
.nav-logo img { height: var(--logo-h, 40px); width: auto; max-height: 56px; object-fit: contain; }
.nav-logo .logo-light { display: none; }
html.light .nav-logo .logo-dark  { display: none; }
html.light .nav-logo .logo-light { display: block; }
.nav-logo .logo-text span { color: var(--primary); }
.nav-links {
  display: flex; align-items: center; gap: 4px;
  flex: 1; overflow: visible; min-width: 0;
}
.nav-links a {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500; white-space: nowrap;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: rgba(255,255,255,.07);
}
.nav-links a.active { color: var(--primary); }
.nav-links a svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Dropdown submenus */
.nav-item { position: relative; }
.nav-item > a .nav-chevron { width: 12px; height: 12px; transition: transform .2s; flex-shrink: 0; }
.nav-item:hover > a .nav-chevron,
.nav-item:focus-within > a .nav-chevron { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute; top: 100%; left: 0; /* top:100% — pas de gap pour éviter la perte du hover */
  min-width: 180px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  display: flex; flex-direction: column; gap: 2px;
  padding: 4px 6px 6px;
  opacity: 0; pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease;
  z-index: 910;
}
/* Pont invisible pour combler le micro-gap entre le parent et le dropdown */
.nav-dropdown::before {
  content: ''; position: absolute; top: -8px; left: 0; right: 0; height: 8px;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown,
.nav-item.open .nav-dropdown {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.nav-item.open > a .nav-chevron { transform: rotate(180deg); }
.nav-dropdown a {
  padding: 8px 12px; border-radius: 6px;
  font-size: .85rem; font-weight: 500;
  color: var(--text-muted); white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}
.nav-dropdown a:hover { color: var(--text); background: rgba(255,255,255,.07); }
html.light .nav-dropdown { background: #fff; box-shadow: 0 8px 32px rgba(0,0,0,.12); }

/* Mobile submenu collapsible */
.nav-mobile-group { display: flex; flex-direction: column; gap: 2px; }
.nav-mobile-parent-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 16px; border-radius: var(--radius);
  font-size: 1rem; font-weight: 500; color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
  border: 1px solid transparent; background: none; cursor: pointer; text-align: left;
}
.nav-mobile-parent-btn:hover { color: var(--text); background: rgba(255,255,255,.05); border-color: var(--border); }
.nav-mobile-parent-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-mobile-chevron-icon { margin-left: auto; width: 16px !important; height: 16px !important; transition: transform .2s; }
.nav-mobile-group.open .nav-mobile-chevron-icon { transform: rotate(180deg); }
.nav-mobile-sub { display: none; flex-direction: column; gap: 2px; padding: 0 0 4px 16px; }
.nav-mobile-group.open .nav-mobile-sub { display: flex; }
.nav-mobile-child { font-size: .92rem; }

.nav-cta {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
}
.btn-live {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 999px;
  background: var(--primary);
  color: #fff; font-weight: 600; font-size: .88rem;
  transition: opacity var(--transition), transform var(--transition);
}
.btn-live:hover { opacity: .85; transform: translateY(-1px); }
.btn-live .live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fff;
  animation: livePulse 1.4s infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.8); }
}
.nav-burger {
  display: none; padding: 8px;
  color: var(--text);
}
.nav-burger svg { width: 22px; height: 22px; }

/* Mobile menu */
.nav-mobile {
  display: none; position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--bg); z-index: 850;
  flex-direction: column; gap: 4px;
  padding: 16px;
  overflow-y: auto;
}
@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes navSlideUp {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-10px); }
}
.nav-mobile.open { display: flex; animation: navSlideDown .22s ease forwards; }
.nav-mobile.closing { display: flex; animation: navSlideUp .22s ease forwards; }
.nav-mobile a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius);
  font-size: 1rem; font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
  border: 1px solid transparent;
}
.nav-mobile a:hover, .nav-mobile a.active {
  color: var(--text); background: rgba(255,255,255,.05);
  border-color: var(--border);
}
.nav-mobile a svg { width: 18px; height: 18px; }

/* ============================================================
   SLIDER / HERO
   ============================================================ */
#accueil { padding: 0; }
#sections-wrapper { padding-top: var(--nav-h); }
#slider {
  position: relative; overflow: hidden;
  height: calc(100svh - var(--nav-h)); min-height: 480px; max-height: 900px;
  margin-top: 0;
}
.slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .8s ease;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.slide.active { opacity: 1; pointer-events: auto; z-index: 2; }
.slider-arrow { z-index: 10; }
.slider-dots  { z-index: 10; }
.slide-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.slide-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.35) 100%);
}
.slide-bg.no-image {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--bg2) 60%, var(--bg) 100%);
}
.slide-content {
  position: relative; z-index: 2;
  text-align: center; padding: 24px;
  max-width: 800px;
}
.slide-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 14px; border-radius: 999px;
  background: var(--primary); color: #fff;
  font-size: .78rem; font-weight: 600; letter-spacing: .5px;
  text-transform: uppercase; margin-bottom: 16px;
}
.slide-badge svg { width: 12px; height: 12px; }
.slide-title {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,.5);
}
.slide-sub {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: rgba(255,255,255,.8);
  margin-bottom: 32px;
}
.slide-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 999px;
  background: var(--primary); color: #fff;
  font-size: 1rem; font-weight: 700;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(230,57,70,.4);
}
.slide-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(230,57,70,.5); }
.slide-btn svg { width: 16px; height: 16px; }
.slider-dots {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 10;
}
.slider-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.35);
  transition: all var(--transition);
  cursor: pointer;
}
.slider-dot.active { background: var(--primary); width: 24px; border-radius: 4px; }
.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 10; padding: 12px;
  background: rgba(0,0,0,.4); border-radius: 50%;
  color: #fff; transition: background var(--transition);
  backdrop-filter: blur(4px);
}
.slider-arrow:hover { background: rgba(0,0,0,.7); }
.slider-arrow svg { width: 20px; height: 20px; display: block; }
.slider-prev { left: 16px; }
.slider-next { right: 16px; }
.slider-next svg { transform: rotate(0deg); }
.slider-prev svg { transform: rotate(180deg); }

/* ============================================================
   SECTIONS COMMUNES
   ============================================================ */
section { padding: 60px 0; }
#classement, #equipe, #dedicaces, #meteo, #partenaires { padding: 30px 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 14px; border-radius: 999px;
  background: rgba(230,57,70,.15); border: 1px solid rgba(230,57,70,.3);
  color: var(--primary); font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 12px;
}
.section-tag svg { width: 12px; height: 12px; }
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800; line-height: 1.2;
  margin-bottom: 12px;
}
.section-sub { color: var(--text-muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.divider {
  width: 48px; height: 3px; border-radius: 2px;
  background: var(--primary); margin: 12px auto 0;
}

/* ============================================================
   NOW PLAYING / DERNIERS TITRES
   ============================================================ */
#direct { background: var(--bg2); position: relative; overflow: hidden; }
/* Blur background cover */
#np-section-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  filter: blur(60px) brightness(.35) saturate(1.4);
  transform: scale(1.1);
  transition: background-image .6s ease;
  pointer-events: none;
}
.nowplaying-card {
  display: flex; align-items: center; gap: 24px;
  background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 24px 32px;
  max-width: 700px; margin: 0 auto 48px;
}
.nowplaying-cover {
  width: 90px; height: 90px; border-radius: 10px;
  background: rgba(255,255,255,.08);
  overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.nowplaying-cover img { width: 100%; height: 100%; object-fit: cover; }
.nowplaying-cover svg { width: 36px; height: 36px; color: var(--text-muted); }
.nowplaying-info { flex: 1; min-width: 0; }
.nowplaying-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--primary); margin-bottom: 4px;
}
.nowplaying-title {
  font-size: 1.25rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nowplaying-artist { color: var(--text-muted); font-size: .95rem; margin-top: 2px; }
.nowplaying-eq {
  display: flex; align-items: flex-end; gap: 3px; height: 20px;
}
.nowplaying-eq span {
  width: 4px; border-radius: 2px; background: var(--primary);
  animation: eq 1s infinite ease-in-out;
}
.nowplaying-eq span:nth-child(2) { animation-delay: .2s; }
.nowplaying-eq span:nth-child(3) { animation-delay: .4s; }
@keyframes eq {
  0%, 100% { height: 4px; } 50% { height: 20px; }
}

/* Historique titres — cartes avec cover en fond */
.track-history {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.track-history .track-card:nth-child(n+11) { display: none; }
.track-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,.05);
  background-size: cover;
  background-position: center;
  cursor: default;
  transition: transform .22s ease, box-shadow .22s ease;
}
.track-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 8px 28px rgba(0,0,0,.45); }
.track-card-icon {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--text-muted);
}
.track-card-icon svg { width: 36px; height: 36px; }
.track-card-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.4) 60%, transparent 100%);
  padding: 24px 10px 10px;
}
.track-card-time {
  font-size: .68rem; font-weight: 700; letter-spacing: .5px;
  color: var(--primary); margin-bottom: 3px;
}
.track-card-title {
  font-size: .82rem; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.track-card-artist {
  font-size: .72rem; color: rgba(255,255,255,.65);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 1px;
}
.track-vote-btn {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,.45); border: none; border-radius: 20px;
  color: rgba(255,255,255,.7); cursor: pointer; padding: 3px 7px;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: .7rem; font-weight: 600; line-height: 1;
  transition: background .18s, color .18s, transform .15s;
  z-index: 2;
}
.track-vote-btn:hover { background: rgba(0,0,0,.65); color: #fff; transform: scale(1.08); }
.track-vote-btn.voted { background: var(--primary); color: #fff; }
.track-vote-btn.voted svg { fill: currentColor; stroke: currentColor; }
.track-vote-count:empty { display: none; }
/* Cœur dans l'historique : plus grand, coin haut-droite de la pochette */
.track-history .track-vote-btn { padding: 6px 10px; top: 8px; right: 8px; }
.track-history .track-vote-btn svg { width: 20px; height: 20px; }

/* ============================================================
   ACTUALITÉS
   ============================================================ */
#actualites { background: var(--bg); }
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.news-card {
  background: var(--bg2); border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-card-img {
  height: 180px; overflow: hidden;
  background: rgba(255,255,255,.05);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.news-img-source {
  position: absolute; bottom: 6px; right: 8px;
  font-size: .65rem; color: rgba(255,255,255,.8);
  background: rgba(0,0,0,.55); padding: 2px 6px;
  border-radius: 4px; pointer-events: none; line-height: 1.4;
}
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-card:hover .news-card-img img { transform: scale(1.05); }
.news-card-img svg { width: 40px; height: 40px; color: var(--text-muted); }
.news-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-source {
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--primary); margin-bottom: 8px;
}
.news-card-title {
  font-size: 1rem; font-weight: 700; line-height: 1.4;
  margin-bottom: 8px; flex: 1;
}
.news-card-excerpt { font-size: .88rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 16px; }
.news-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .8rem; color: var(--text-muted);
}
.news-read-more {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--primary); font-weight: 600; font-size: .85rem;
  transition: gap var(--transition);
}
.news-read-more:hover { gap: 8px; }
.news-read-more svg { width: 14px; height: 14px; }

/* Contenu riche dans la modale article */
.rich-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 10px 0; display: block; }
.rich-content iframe { width: 100%; aspect-ratio: 16/9; border: none; border-radius: 8px; margin: 14px 0; display: block; }
.rich-content h2, .rich-content h3, .rich-content h4 { margin: 18px 0 8px; font-weight: 700; }
.rich-content p { margin: 0 0 12px; }
.rich-content ul, .rich-content ol { padding-left: 22px; margin: 0 0 12px; }
.rich-content blockquote { border-left: 3px solid var(--primary); margin: 12px 0; padding: 8px 16px; background: rgba(255,255,255,.04); border-radius: 0 6px 6px 0; }
.rich-content a { color: var(--primary); }
.rich-content pre { background: rgba(0,0,0,.3); border-radius: 6px; padding: 12px; overflow-x: auto; font-size: .85rem; }

/* Tabs news */
.news-tabs {
  display: flex; gap: 8px; margin-bottom: 32px;
  flex-wrap: wrap;
}
.news-tab {
  padding: 8px 18px; border-radius: 999px;
  font-size: .88rem; font-weight: 600;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.news-tab.active, .news-tab:hover {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ============================================================
   PODCASTS
   ============================================================ */
#podcasts { background: var(--bg2); }
.podcast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.podcast-card {
  background: rgba(255,255,255,.04); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.podcast-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
/* Carousel podcasts */
.podcast-carousel-wrap { position: relative; }
.podcast-carousel-nav {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 18px;
}
.podcast-carousel-btn {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--transition), opacity var(--transition);
  color: var(--text);
}
.podcast-carousel-btn svg { width: 18px; height: 18px; display: block; }
.podcast-carousel-btn.podcast-prev svg { transform: rotate(180deg); }
.podcast-carousel-btn:disabled { opacity: .3; cursor: default; pointer-events: none; }
.podcast-carousel-btn:not(:disabled):hover { background: rgba(255,255,255,.12); }
.podcast-carousel-page { font-size: .83rem; color: var(--text-muted); min-width: 40px; text-align: center; }
.podcast-card-header {
  position: relative; padding-top: 56.25%; /* 16:9 */
  background: rgba(255,255,255,.06);
}
.podcast-cover {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.podcast-play-btn {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5);
  transition: background var(--transition);
}
.podcast-play-btn:hover { background: rgba(0,0,0,.65); }
.podcast-play-btn svg {
  width: 48px; height: 48px;
  color: #fff; filter: drop-shadow(0 2px 8px rgba(0,0,0,.5));
}
.podcast-no-cover {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.podcast-no-cover svg { width: 48px; height: 48px; color: var(--text-muted); }
.podcast-card-body { padding: 16px; }
.podcast-card-title { font-size: .95rem; font-weight: 700; margin-bottom: 6px; }
.podcast-card-desc { font-size: .83rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 10px; }
.podcast-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .78rem; color: var(--text-muted);
}
.podcast-duration {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.07); padding: 2px 8px; border-radius: 4px;
}
/* Onglets podcasts (RSS) */
.podcast-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.podcast-tab {
  padding: 8px 18px; border-radius: 20px; font-size: .85rem; font-weight: 600;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.podcast-tab:hover { background: rgba(255,255,255,.10); color: var(--text); }
.podcast-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
html.light .podcast-tab { background: rgba(0,0,0,.06); color: var(--text-muted); }
html.light .podcast-tab.active { background: var(--primary); color: #fff; }

/* Mini player podcast */
#podcast-mini-player {
  position: fixed; bottom: calc(var(--player-h) + 10px); left: 50%; transform: translateX(-50%);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 10px;
  width: min(540px, calc(100vw - 24px));
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  z-index: 800; opacity: 0; pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  transform: translateX(-50%) translateY(8px);
}
#podcast-mini-player.visible { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
#podcast-mini-player button {
  color: var(--text-muted); padding: 6px;
  border-radius: 50%; transition: color .2s, background .2s;
  flex-shrink: 0;
}
#podcast-mini-player button:hover { color: var(--primary); background: rgba(255,255,255,.06); }
#podcast-mini-player button svg { width: 18px; height: 18px; display: block; }
#podcast-mini-player #pmp-play { color: #fff; background: var(--primary); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
#podcast-mini-player #pmp-play:hover { opacity: .85; background: var(--primary); }
#podcast-mini-player input[type=range] { flex: 1; accent-color: var(--primary); cursor: pointer; height: 4px; }
.pmp-title { font-size: .85rem; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.pmp-time { font-size: .75rem; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ============================================================
   PROGRAMMES
   ============================================================ */
#programmes { background: var(--bg); }
.programs-days {
  display: flex; gap: 8px; margin-bottom: 32px;
  overflow-x: auto; padding-bottom: 4px;
  justify-content: center; flex-wrap: wrap;
}
.programs-days::-webkit-scrollbar { height: 3px; }
.day-btn {
  flex-shrink: 0; padding: 8px 18px; border-radius: 999px;
  font-size: .88rem; font-weight: 600;
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.day-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.programs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.program-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 16px; border-radius: var(--radius);
  background: var(--bg2); border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  transition: transform var(--transition);
}
.program-card.current { border-left-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.program-card:hover { transform: translateY(-2px); }
.program-img {
  width: 60px; height: 60px; border-radius: 8px; flex-shrink: 0;
  overflow: hidden; background: rgba(255,255,255,.07);
  display: flex; align-items: center; justify-content: center;
}
.program-img img { width: 100%; height: 100%; object-fit: cover; }
.program-img svg { width: 24px; height: 24px; color: var(--text-muted); }
.program-info { flex: 1; min-width: 0; }
.program-time { font-size: .78rem; color: var(--primary); font-weight: 700; margin-bottom: 2px; }
.program-title { font-size: .95rem; font-weight: 700; margin-bottom: 2px; }
.program-host { font-size: .82rem; color: var(--text-muted); }
.program-current-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(230,57,70,.2); color: var(--primary);
  font-size: .7rem; font-weight: 700; text-transform: uppercase;
  margin-top: 4px;
}
.program-current-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); animation: livePulse 1.4s infinite;
}

/* ============================================================
   ÉQUIPE
   ============================================================ */
#equipe { background: var(--bg2); }
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}
.team-card {
  text-align: center; padding: 32px 20px;
  background: rgba(255,255,255,.04); border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.team-photo {
  width: 100px; height: 100px; border-radius: 50%;
  margin: 0 auto 16px;
  border: 3px solid var(--primary);
  overflow: hidden; background: rgba(255,255,255,.07);
  display: flex; align-items: center; justify-content: center;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-photo svg { width: 40px; height: 40px; color: var(--text-muted); }
.team-name { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.team-role { font-size: .83rem; color: var(--primary); font-weight: 600; margin-bottom: 10px; }
.team-bio { font-size: .82rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 16px; }
.team-socials { display: flex; gap: 8px; justify-content: center; }
.team-social {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.07); color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.team-social:hover { background: var(--primary); color: #fff; }
.team-social svg { width: 14px; height: 14px; }

/* ============================================================
   MÉTÉO
   ============================================================ */
#meteo { background: var(--bg); }
.weather-widget {
  max-width: 700px; margin: 0 auto;
  background: var(--bg2); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
}
.weather-search {
  display: flex; gap: 8px; padding: 20px;
  border-bottom: 1px solid var(--border);
}
.weather-search input {
  flex: 1; padding: 10px 16px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.07); border: 1px solid var(--border);
  color: var(--text); font-size: .9rem; outline: none;
  transition: border-color var(--transition);
}
.weather-search input:focus { border-color: var(--primary); }
.weather-search button {
  padding: 10px 20px; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff;
  font-weight: 600; font-size: .9rem;
  transition: opacity var(--transition);
}
.weather-search button:hover { opacity: .85; }
.weather-main {
  display: flex; align-items: center; gap: 32px;
  padding: 32px;
}
.weather-icon-wrap { font-size: 5rem; }
.weather-icon-svg { width: 80px; height: 80px; }
.weather-temp-main { font-size: 3.5rem; font-weight: 800; line-height: 1; }
.weather-city-name { font-size: 1.1rem; font-weight: 600; margin-top: 4px; }
.weather-desc { color: var(--text-muted); font-size: .9rem; margin-top: 2px; }
.weather-details {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0; border-top: 1px solid var(--border);
}
.weather-detail {
  padding: 16px; text-align: center;
  border-right: 1px solid var(--border);
}
.weather-detail:last-child { border-right: none; }
.weather-detail-label { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.weather-detail-val { font-size: 1rem; font-weight: 700; }
.weather-forecast {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0; border-top: 1px solid var(--border);
}
.forecast-day {
  padding: 16px; text-align: center;
  border-right: 1px solid var(--border);
}
.forecast-day:last-child { border-right: none; }
.forecast-day-name { font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.forecast-temps { font-size: .9rem; font-weight: 600; }
.forecast-temps .max { color: var(--primary); }
.forecast-temps .min { color: var(--text-muted); margin-left: 6px; }
.weather-icon-sun { color: #f9c74f; }
.weather-icon-cloud { color: #adb5bd; }
.weather-icon-rain { color: #4cc9f0; }
.weather-icon-snow { color: #a8dadc; }
.weather-icon-storm { color: #f4a261; }
.weather-icon-wind { color: #adb5bd; }

/* ============================================================
   DÉDICACES
   ============================================================ */
#dedicaces { background: var(--bg2); }
.dedications-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.dedications-list {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 340px; overflow-y: auto;
  padding-right: 4px;
}
.dedication-item {
  padding: 12px 14px; border-radius: var(--radius);
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  animation: fadeInUp .3s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dedication-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.dedication-pseudo { font-weight: 700; font-size: .9rem; }
.dedication-time { font-size: .75rem; color: var(--text-muted); }
.dedication-message { font-size: .88rem; color: var(--text-muted); line-height: 1.5; }
.dedication-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.form-group input, .form-group textarea {
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  color: var(--text); font-size: .92rem; outline: none;
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 100px; }
.captcha-row { display: flex; gap: 12px; align-items: center; }
.captcha-question {
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.07); font-size: .88rem;
  font-weight: 600; color: var(--primary); white-space: nowrap;
}
.captcha-row input { flex: 1; }
.btn-submit {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff;
  font-size: .95rem; font-weight: 700;
  transition: opacity var(--transition), transform var(--transition);
}
.btn-submit:hover { opacity: .85; transform: translateY(-1px); }
.btn-submit svg { width: 16px; height: 16px; }
.form-feedback {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 600; display: none;
}
.form-feedback.success { background: rgba(34,197,94,.15); border: 1px solid rgba(34,197,94,.3); color: #4ade80; }
.form-feedback.error   { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.3); color: #f87171; }
.form-feedback.visible { display: block; }

/* ============================================================
   PLAYER RADIO (sticky bas de page)
   ============================================================ */
#radio-player {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 950;
  height: var(--player-h);
  background: var(--player-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,.5);
}
.player-inner {
  display: flex; align-items: center; gap: 16px;
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  width: 100%; height: 100%;
}
/* Bouton agrandir (mobile uniquement) */
#player-expand-btn {
  display: none;
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--player-bg);
  border: 1px solid var(--border); border-bottom: none;
  border-radius: 10px 10px 0 0; padding: 3px 20px 0;
  color: var(--text-muted); cursor: pointer; z-index: 951;
  opacity: .9; transition: opacity .2s;
}
#player-expand-btn:hover { opacity: 1; }
.player-stream-select { display: flex; align-items: center; }
.player-stream-selector {
  background: rgba(255,255,255,.08); border: 1px solid var(--border);
  color: var(--text); font-size: .75rem; border-radius: 6px;
  padding: 4px 8px; cursor: pointer; max-width: 140px;
}
.player-stream-selector option { background: #1e1e30; color: #f0f0f0; }

/* Styled stream selector — desktop only */
@media (min-width: 769px) {
  .player-stream-select { position: relative; }
  .player-stream-selector {
    appearance: none; -webkit-appearance: none;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 20px;
    padding: 5px 30px 5px 14px;
    font-size: .78rem; font-weight: 600;
    color: var(--text); max-width: 180px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,.6)' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    backdrop-filter: blur(8px);
    transition: border-color .2s, background .2s;
  }
  .player-stream-selector:hover {
    border-color: var(--primary);
    background: rgba(255,255,255,.15);
  }
  .player-stream-selector:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb,.5),.3);
  }
}
/* Player width variants */
body[data-player-width="wide"]   .player-inner { max-width: 1600px; }
body[data-player-width="full"]   .player-inner { max-width: 100%; padding: 0 32px; }

/* Mini floating player */
body[data-player-style="mini"] #radio-player {
  left: auto; right: 20px; bottom: 20px;
  width: 320px; border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  height: auto; min-height: 0;
}
body[data-player-style="mini"] .player-inner {
  padding: 12px 14px; flex-wrap: wrap; gap: 10px;
}
body[data-player-style="mini"] .player-right  { flex: 1 1 100%; justify-content: center; flex-wrap: wrap; gap: 6px 10px; }
body[data-player-style="mini"] .player-meta   { flex: 1; max-width: 100%; }
body[data-player-style="mini"] #player-expand-btn { display: none; }
/* Volume full-width sous les contrôles (mini, PC uniquement) */
@media (min-width: 769px) {
  /* Force le volume sur une ligne complète en dessous des contrôles */
  body[data-player-style="mini"] .player-volume {
    flex: 1 1 100%; gap: 6px; padding: 2px 0 0;
  }
  body[data-player-style="mini"] .player-volume .volume-slider {
    flex: 1; width: auto; max-width: none;
  }
}
/* Positions du mini player */
body[data-player-style="mini"][data-player-mini-pos="bottom-left"] #radio-player  { right: auto; left: 20px; bottom: 20px; }
body[data-player-style="mini"][data-player-mini-pos="top-right"]   #radio-player  { bottom: auto; top: calc(var(--nav-h) + 12px); right: 20px; left: auto; }
body[data-player-style="mini"][data-player-mini-pos="top-left"]    #radio-player  { bottom: auto; top: calc(var(--nav-h) + 12px); left: 20px; right: auto; }
/* Player carré (mini) — layout colonne compact */
body[data-player-style="mini"][data-player-mini-square="1"] #radio-player { width: 240px; }
body[data-player-style="mini"][data-player-mini-square="1"] .player-inner { flex-direction: column; align-items: center; gap: 8px; }
body[data-player-style="mini"][data-player-mini-square="1"] .player-left  { flex: 0 0 auto; flex-direction: column; align-items: center; width: 100%; gap: 6px; }
body[data-player-style="mini"][data-player-mini-square="1"] .player-cover { width: 80px; height: 80px; flex-shrink: 0; }
body[data-player-style="mini"][data-player-mini-square="1"] .player-meta  { text-align: center; max-width: 100%; width: 100%; }
/* Reset flex-basis:100% (calculé pour row) → auto pour ne pas déborder en colonne */
body[data-player-style="mini"][data-player-mini-square="1"] .player-right  { flex: 0 0 auto !important; width: 100%; flex-wrap: wrap; }
body[data-player-style="mini"][data-player-mini-square="1"] .player-volume { flex: 0 0 auto !important; width: 100%; }
/* Adjust podcast mini-player offset for mini player */
body[data-player-style="mini"] #podcast-mini-player { bottom: 20px; right: 360px; left: auto; transform: none; }
body[data-player-style="mini"][data-player-mini-pos="bottom-left"] #podcast-mini-player { left: 360px; right: auto; }
/* Mobile : forcer le player en mode sticky quelle que soit la config admin */
@media (max-width: 768px) {
  /* Podcast mini-player : toujours centré en bas (ignore le positionnement PC mini) */
  body[data-player-style="mini"] #podcast-mini-player,
  body[data-player-style="mini"][data-player-mini-pos="bottom-left"] #podcast-mini-player {
    left: 50% !important; right: auto !important;
    transform: translateX(-50%) translateY(8px) !important;
    bottom: calc(var(--player-h) + 10px) !important;
  }
  body[data-player-style="mini"] #podcast-mini-player.visible {
    transform: translateX(-50%) translateY(0) !important;
  }
  body[data-player-style="mini"] #radio-player {
    left: 0 !important; right: 0 !important; bottom: 0 !important;
    width: auto !important; border-radius: 0 !important;
    height: var(--player-h) !important; box-shadow: none !important;
  }
  body[data-player-style="mini"] .player-inner {
    flex-direction: row !important; flex-wrap: nowrap !important;
    padding: 0 12px !important; gap: 10px !important; height: 100%;
  }
  body[data-player-style="mini"] .player-right {
    flex: 0 !important; flex-wrap: nowrap !important;
    justify-content: flex-end !important; gap: 8px !important;
  }
  body[data-player-style="mini"] .player-left { flex: 1 !important; }
  body[data-player-style="mini"] .player-meta { max-width: none !important; flex: 1 !important; }
  body[data-player-style="mini"] .player-volume { display: none !important; }
  body[data-player-style="mini"][data-player-mini-square="1"] #radio-player {
    width: auto !important;
  }
  body[data-player-style="mini"][data-player-mini-square="1"] .player-inner {
    flex-direction: row !important; align-items: center !important;
  }
  body[data-player-style="mini"][data-player-mini-square="1"] .player-left {
    flex: 1 !important; flex-direction: row !important; width: auto !important;
  }
  body[data-player-style="mini"][data-player-mini-square="1"] .player-cover {
    width: 40px !important; height: 40px !important;
  }
  body[data-player-style="mini"][data-player-mini-square="1"] .player-meta {
    text-align: left !important;
  }
  body[data-player-style="mini"][data-player-mini-square="1"] .player-right {
    flex: 0 !important; flex-direction: row !important; width: auto !important;
  }
}
/* Hauteur du player sticky (PC uniquement) — grossit textes + images */
@media (min-width: 769px) {
  body[data-player-style="sticky"][data-player-height] #radio-player {
    height: var(--player-custom-h, var(--player-h));
  }
  body[data-player-style="sticky"][data-player-height] #podcast-mini-player {
    bottom: calc(var(--player-custom-h, var(--player-h)) + 10px);
  }
  body[data-player-style="sticky"][data-player-height] .player-cover {
    width: var(--player-cover-sz, 48px);
    height: var(--player-cover-sz, 48px);
  }
  body[data-player-style="sticky"][data-player-height] .player-title {
    font-size: calc(.88rem * var(--player-scale, 1));
  }
  body[data-player-style="sticky"][data-player-height] .player-artist {
    font-size: calc(.78rem * var(--player-scale, 1));
  }
  body[data-player-style="sticky"][data-player-height] .player-btn-main {
    width: calc(44px * var(--player-scale, 1));
    height: calc(44px * var(--player-scale, 1));
  }
  body[data-player-style="sticky"][data-player-height] .player-btn-main svg {
    width: calc(22px * var(--player-scale, 1));
    height: calc(22px * var(--player-scale, 1));
  }
}

.player-cover {
  width: 48px; height: 48px; border-radius: 8px;
  overflow: hidden; flex-shrink: 0;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
}
.player-cover img { width: 100%; height: 100%; object-fit: cover; }
.player-cover svg { width: 20px; height: 20px; color: var(--text-muted); }
.player-left  { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-right { flex: 1; display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.player-meta  { flex: 1; min-width: 0; }
.player-title {
  font-size: .88rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-artist { font-size: .78rem; color: var(--text-muted); }
.player-controls { display: flex; align-items: center; gap: 8px; }
.player-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); transition: all var(--transition);
}
.player-btn-main {
  background: var(--primary);
  box-shadow: 0 0 16px rgba(230,57,70,.35);
}
.player-btn-main:hover { opacity: .85; transform: scale(1.05); }
.player-btn:not(.player-btn-main):hover { background: rgba(255,255,255,.1); }
.player-btn svg { width: 20px; height: 20px; display: block; }
.player-btn-main svg { width: 22px; height: 22px; }
.player-volume { display: flex; align-items: center; gap: 4px; }
.player-volume #volume-btn { width: 34px; height: 34px; flex-shrink: 0; }
.player-volume #volume-btn svg { width: 18px; height: 18px; color: var(--text-muted); }
.volume-slider {
  -webkit-appearance: none; appearance: none;
  width: 90px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.2); outline: none; cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--primary); cursor: pointer;
}
.player-live-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(230,57,70,.2); color: var(--primary);
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; white-space: nowrap;
}
.player-live-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); animation: livePulse 1.4s infinite;
}
.player-vote-btn {
  position: static !important;
  background: rgba(255,255,255,.08) !important;
  border-radius: 20px !important;
  padding: 5px 10px !important;
  gap: 5px !important;
  font-size: .75rem !important;
  white-space: nowrap; flex-shrink: 0;
  justify-content: center !important;
}
.player-vote-btn:hover { background: rgba(255,255,255,.16) !important; }
.player-vote-btn.voted { background: var(--primary) !important; color: #fff !important; }
.player-vote-btn svg { width: 13px !important; height: 13px !important; }

/* ============================================================
   PLAYER — Disposition des contrôles (PC uniquement)
   ============================================================ */
/* Centre : grille 3 colonnes, contrôles au milieu */
@media (min-width: 769px) {
  body[data-player-controls="center"][data-player-style="sticky"] .player-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  body[data-player-controls="center"][data-player-style="sticky"] .player-left  { grid-column: 1; }
  body[data-player-controls="center"][data-player-style="sticky"] .player-right { grid-column: 2; justify-content: center; }
  /* Inversé : contrôles à gauche, cover+titre à droite */
  body[data-player-controls="left"][data-player-style="sticky"] .player-inner { flex-direction: row-reverse; }
  body[data-player-controls="left"][data-player-style="sticky"] .player-right  { justify-content: flex-start; }
}

/* ============================================================
   PLAYER PLEIN ÉCRAN (mobile)
   ============================================================ */
#player-fullscreen {
  display: flex;
  flex-direction: column; align-items: center; justify-content: flex-start;
  position: fixed; inset: 0; z-index: 960;
  background: rgba(var(--bg-rgb, 13,13,13), .72);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  gap: 12px; padding: 48px 32px 24px;
  text-align: center; overflow-y: auto;
  opacity: 0; pointer-events: none;
  transform: translateY(6%);
  transition: opacity .35s ease, transform .35s ease;
}
html.light #player-fullscreen {
  background: rgba(240,242,245,.75);
}
.pfs-logo { max-height: 90px; max-width: 260px; width: auto; object-fit: contain; margin-bottom: 8px; opacity: .9; }
#player-fullscreen.visible {
  opacity: 1; pointer-events: auto;
  transform: translateY(0);
}
#player-fs-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.1); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .2s;
}
#player-fs-close:hover { background: rgba(255,255,255,.18); color: var(--text); }
#player-fs-close svg { width: 18px; height: 18px; display: block; }
.pfs-cover-wrap {
  width: 280px; height: 280px; border-radius: 20px; overflow: hidden;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; box-shadow: 0 16px 48px rgba(0,0,0,.5);
  position: relative;
}
.pfs-cover-wrap img { width: 100%; height: 100%; object-fit: cover; }
.pfs-cover-wrap svg { width: 70px; height: 70px; color: var(--text-muted); }
.pfs-title {
  font-size: 1.15rem; font-weight: 800;
  color: var(--text); max-width: 280px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pfs-artist { font-size: .9rem; color: var(--text-muted); }
.pfs-stream-wrap { width: 100%; max-width: 260px; }
.pfs-stream-wrap select {
  width: 100%; padding: 8px 12px; border-radius: 8px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  color: var(--text); font-size: .82rem; text-align: center;
  cursor: pointer;
}
html.light .pfs-stream-wrap select { background: rgba(0,0,0,.07); border-color: rgba(0,0,0,.15); }
.pfs-controls { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.pfs-play-btn { width: 60px !important; height: 60px !important; }
.pfs-play-btn svg { width: 26px !important; height: 26px !important; }
#pfs-vote-btn {
  position: absolute !important;
  top: 10px; right: 10px;
  width: 36px !important; height: 36px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  background: rgba(0,0,0,.45) !important;
  backdrop-filter: blur(4px);
  color: #fff !important;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  transition: background .2s, transform .15s;
}
#pfs-vote-btn:hover { transform: scale(1.1); background: rgba(0,0,0,.65) !important; }
#pfs-vote-btn .track-vote-count { display: none; }
#pfs-vote-btn svg { width: 18px !important; height: 18px !important; stroke: currentColor !important; flex-shrink: 0; }
#pfs-vote-btn.voted { background: var(--primary) !important; }
html.light #pfs-vote-btn { background: rgba(0,0,0,.35) !important; }

/* ============================================================
   CLASSEMENT TOP 5
   ============================================================ */
#classement { background: var(--bg2); }
.classement-list { display: flex; flex-direction: column; gap: 10px; max-width: 700px; margin: 0 auto; }
.classement-item {
  display: flex; align-items: center; gap: 16px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  transition: transform .18s, box-shadow .18s;
}
.classement-item:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.classement-rank {
  font-size: 1.4rem; font-weight: 800; min-width: 40px; text-align: center;
  display: flex; align-items: center; justify-content: center;
}
.rank-1 { color: #f59e0b; }
.rank-2 { color: #9ca3af; }
.rank-3 { color: #b87333; }
.classement-cover {
  width: 52px; height: 52px; border-radius: 8px; overflow: hidden;
  background: rgba(255,255,255,.07); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.classement-cover img { width: 100%; height: 100%; object-fit: cover; }
.classement-cover-placeholder svg { width: 22px; height: 22px; color: var(--text-muted); }
.classement-info { flex: 1; min-width: 0; }
.classement-title  { font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.classement-artist { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.classement-votes {
  display: flex; align-items: center; gap: 5px;
  color: var(--primary); font-weight: 700; font-size: .88rem; flex-shrink: 0;
}
html.light .classement-item { background: rgba(0,0,0,.03); }

/* ============================================================
   PARTENAIRES
   ============================================================ */
#partenaires { background: var(--bg); }
.partners-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 24px; align-items: center;
}
.partner-card {
  display: flex; align-items: center; justify-content: center;
  padding: 16px 24px; border-radius: var(--radius);
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  transition: transform .18s, box-shadow .18s, background .18s;
  text-decoration: none; min-width: 120px; min-height: 70px;
}
.partner-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); background: rgba(255,255,255,.08); }
.partner-card img { max-height: 52px; max-width: 160px; object-fit: contain; filter: grayscale(40%); transition: filter .2s; }
.partner-card:hover img { filter: grayscale(0%); }
.partner-name { font-size: .92rem; font-weight: 700; color: var(--text-muted); }
html.light .partner-card { background: rgba(0,0,0,.03); }
html.light .partner-card img { filter: grayscale(20%); }

/* ============================================================
   MODULES PERSONNALISÉS
   ============================================================ */
.custom-module-section { padding: 60px 0; }
.custom-module-block   { width: 100%; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 40px 0 24px;
}
/* ============================================================
   BANNIÈRES PUB
   ============================================================ */
#bannieres { background: var(--bg); padding: 24px 0; }
.banners-wrap {
  max-width: 728px; height: 90px; margin: 0 auto;
  overflow: hidden; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.banner-link { display: block; line-height: 0; }
.banner-img  { width: 728px; height: 90px; object-fit: cover; border-radius: 8px; }
@media (max-width: 768px) {
  .banners-wrap { max-width: 100%; height: auto; }
  .banner-img  { width: 100%; height: auto; max-height: 90px; }
}

.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 40px; margin-bottom: 32px;
}
.footer-brand .nav-logo { margin-bottom: 12px; }
.footer-brand p { font-size: .88rem; color: var(--text-muted); line-height: 1.6; }
.footer-socials { display: flex; gap: 10px; margin-top: 16px; }
.footer-social {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.07); color: var(--text-muted);
  transition: all var(--transition);
}
.footer-social:hover { background: var(--primary); color: #fff; }
.footer-social svg { width: 16px; height: 16px; }
.footer-col-title { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 16px; color: var(--text-muted); }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  display: flex; align-items: center; gap: 6px;
  font-size: .88rem; color: var(--text-muted);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--primary); }
.footer-links a svg { width: 13px; height: 13px; flex-shrink: 0; opacity: .6; }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--border);
  text-align: center; font-size: .82rem; color: var(--text-muted);
}

/* ============================================================
   UTILITAIRES
   ============================================================ */
.loading {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 40px; color: var(--text-muted);
}
.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.1);
  border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state {
  text-align: center; padding: 48px;
  color: var(--text-muted); font-size: .95rem;
}
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 12px; opacity: .4; }

/* ============================================================
   COOKIE BANNER
   ============================================================ */
/* App banner */
#app-banner { position: fixed; bottom: calc(var(--player-h) + 8px); left: 0; right: 0; z-index: 850; }
.app-banner-inner {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg2); border-top: 3px solid var(--primary);
  padding: 10px 16px; max-width: 480px; margin: 0 auto;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,.4);
}
.app-banner-text { flex: 1; min-width: 0; }
.app-banner-text strong { display: block; font-size: .88rem; color: var(--text); }
.app-banner-text span { font-size: .78rem; color: var(--text-muted); }
.app-banner-close { color: var(--text-muted); font-size: 1rem; padding: 4px 8px; border-radius: 4px; transition: color .2s; }
.app-banner-close:hover { color: var(--text); }
/* Live vidéo modal */
#live-video-modal {
  display: none; position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,.85); align-items: center; justify-content: center;
}
#live-video-modal.open { display: flex; }
.live-video-wrap {
  position: relative; width: min(860px, calc(100vw - 32px));
  aspect-ratio: 16/9; background: #000; border-radius: var(--radius);
  overflow: hidden;
}
.live-video-wrap iframe { width: 100%; height: 100%; border: 0; }
#live-video-close {
  position: absolute; top: -36px; right: 0; color: #fff;
  font-size: 1.2rem; padding: 4px 10px; border-radius: 4px;
  background: rgba(255,255,255,.1);
}
#live-video-close:hover { background: rgba(255,255,255,.2); }

.cookie-banner {
  position: fixed; bottom: calc(var(--player-h) + 12px); left: 50%; transform: translateX(-50%);
  background: var(--bg2); border: 1px solid var(--border); border-top: 3px solid var(--primary);
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  width: calc(100vw - 32px); max-width: 760px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  z-index: 9000;
  transition: transform .4s ease, opacity .4s;
}
.cookie-text { flex: 1 1 260px; font-size: .85rem; color: var(--text-muted); line-height: 1.5; margin: 0; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-btn { padding: 8px 18px; border-radius: 6px; font-size: .82rem; font-weight: 700; cursor: pointer; border: none; transition: opacity .2s; }
.cookie-btn-accept { background: var(--primary); color: #fff; }
.cookie-btn-decline { background: rgba(255,255,255,.08); color: var(--text-muted); border: 1px solid var(--border); }
.cookie-btn:hover { opacity: .8; }
html.light .cookie-banner { background: #fff; border-color: rgba(0,0,0,.1); }
html.light .cookie-btn-decline { background: rgba(0,0,0,.05); }

/* ============================================================
   MODAL (mentions légales)
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(0,0,0,.75); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-box {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
  width: 100%; max-width: 640px; max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.05rem; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.07); color: var(--text-muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .2s;
}
.modal-close svg { width: 16px; height: 16px; display: block; }
.modal-close:hover { background: rgba(255,255,255,.14); color: var(--text); }
.modal-body {
  padding: 24px; overflow-y: auto;
  font-size: .9rem; line-height: 1.7; color: var(--text-muted);
}
.modal-body h2, .modal-body h3 { color: var(--text); margin: 16px 0 6px; }
html.light .modal-box { background: #fff; }
html.light .modal-close { background: rgba(0,0,0,.06); }

/* ============================================================
   POPUP VILLES D'ÉCOUTE
   ============================================================ */
.city-popup-overlay { z-index: 9600; }
.city-popup-box {
  max-width: 440px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 20px;
  overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.7);
}
.city-popup-header {
  padding: 32px 28px 20px; text-align: center;
}
.city-popup-header svg { width: 40px; height: 40px; color: var(--primary); margin-bottom: 14px; }
.city-popup-header h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; }
.city-popup-header p { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }
.city-list {
  padding: 0 20px; display: flex; flex-direction: column; gap: 8px;
  max-height: 300px; overflow-y: auto;
}
.city-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; text-align: left; width: 100%;
  transition: background .2s, border-color .2s;
}
.city-btn:hover { background: rgba(255,255,255,.08); border-color: var(--primary); }
.city-btn-icon svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }
.city-btn-name { flex: 1; font-weight: 600; font-size: .95rem; }
.city-btn-arrow { color: var(--text-muted); font-size: .85rem; }
.city-skip {
  display: block; width: 100%; text-align: center;
  padding: 16px; margin-top: 8px; border: none; background: none;
  color: var(--text-muted); font-size: .82rem; cursor: pointer;
  transition: color .2s;
}
.city-skip:hover { color: var(--text); }
html.light .city-popup-box { background: #fff; }
html.light .city-btn { background: rgba(0,0,0,.03); }
html.light .city-btn:hover { background: rgba(0,0,0,.07); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
}
@media (max-width: 768px) {
  :root { --nav-h: 60px; --player-h: 64px; }
  .nav-links, .nav-cta { display: none; }
  .nav-container { padding: 0 16px; gap: 12px; overflow: visible; }
  .nav-burger { display: flex; flex-shrink: 0; margin-left: auto; padding: 8px; }
  #slider { max-height: 600px; }
  section { padding: 48px 0; }
  .dedications-layout { grid-template-columns: 1fr; }
  .dedication-form input, .dedication-form textarea { max-width: 100%; box-sizing: border-box; }
  .captcha-row { flex-wrap: wrap; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .weather-main { flex-direction: column; text-align: center; gap: 16px; }
  .weather-search { flex-wrap: wrap; }
  .weather-search input { flex: 1 1 100%; }
  .weather-search button { width: 100%; }
  .weather-details, .weather-forecast { grid-template-columns: repeat(3, 1fr); }
  .player-volume { display: none; }
  .player-live-badge { display: none; }
  #player-expand-btn { display: block; }
  /* Bouton expand visible même en mode mini (forcé sticky sur mobile) */
  body[data-player-style="mini"] #player-expand-btn { display: block; }
  /* Cœur vote : masqué sur mobile (disponible uniquement en plein écran) */
  #player-vote-btn { display: none !important; }
  .nowplaying-card { flex-direction: column; text-align: center; }
  #podcast-mini-player { flex-wrap: wrap; padding: 10px 14px; gap: 8px; width: calc(100vw - 24px); }
  .pmp-title { flex: 1 1 100%; order: -1; }
  .pmp-time { font-size: .72rem; }
  .contact-layout { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .slide-content { padding: 16px; }
  .news-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .podcast-grid { grid-template-columns: 1fr; }
  .programs-grid { grid-template-columns: 1fr; }
  .track-history { grid-template-columns: repeat(3, 1fr); }
  .track-history .track-card:nth-child(n+7) { display: none; }
  .track-history .track-card:nth-child(n+11) { display: unset; }
  .weather-details { grid-template-columns: repeat(2, 1fr); }
  .weather-detail:nth-child(3) { border-right: none; }
  .player-inner { padding: 0 12px; gap: 10px; }
  .player-left  { flex: 1; gap: 8px; }
  .player-right { flex: 0; gap: 8px; }
  .player-meta  { max-width: none; }
  .player-cover { width: 40px; height: 40px; }
}

/* ============================================================
   MODE CLAIR (light mode)
   ============================================================ */
html.light {
  --bg:           #f5f5f5;
  --bg2:          #e8e8f0;
  --text:         #1a1a2e;
  --text-muted:   #555566;
  --border:       rgba(0,0,0,.1);
  --nav-bg:       #ffffff;
  --player-bg:    #f0f0fa;
}
html.light body { color: var(--text); }
html.light .nav-links a { color: var(--text-muted); }
html.light .nav-links a:hover,
html.light .nav-links a.active { color: var(--text); background: rgba(0,0,0,.06); }
html.light .nav-mobile a { color: var(--text-muted); }
html.light .nav-mobile { background: var(--nav-bg); }
html.light section { background: var(--bg); }
html.light #direct,
html.light #dedicaces,
html.light #podcasts { background: var(--bg2); }
html.light .track-card { background: rgba(0,0,0,.08); }
html.light .news-card,
html.light .podcast-card,
html.light .program-card,
html.light .team-card,
html.light .weather-widget { background: rgba(0,0,0,.04); border-color: var(--border); }
html.light .dedication-item { background: rgba(0,0,0,.04); }
html.light .form-group input,
html.light .form-group textarea { background: #fff; border-color: rgba(0,0,0,.15); color: var(--text); }
html.light footer { background: var(--bg2); }
html.light .footer-bottom { border-color: var(--border); }
html.light #radio-player { background: var(--player-bg); }
html.light #navbar { background: var(--nav-bg); }
html.light .player-stream-selector { background: rgba(0,0,0,.08); color: var(--text); }
/* Volume slider visible en mode clair */
html.light .volume-slider { accent-color: var(--primary); background: rgba(0,0,0,.15); }
html.light .player-volume #volume-btn svg { color: var(--text-muted); }
/* Texte slider toujours blanc (pas affecté par le thème) */
html.light .slide-title { color: #fff !important; text-shadow: 0 2px 8px rgba(0,0,0,.7); }
html.light .slide-sub   { color: rgba(255,255,255,.85) !important; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
html.light .slide-btn   { color: #fff; }
/* Barre de volume en mode clair */
html.light #radio-player .player-title,
html.light #radio-player .player-artist { color: var(--text); }
html.light #radio-player .player-btn-main { color: var(--text); }
html.light #radio-player .player-live-badge { color: var(--primary); border-color: var(--primary); }
/* Contact light mode */
html.light .contact-form-card { background: #fff; }
html.light .contact-form-card input,
html.light .contact-form-card select,
html.light .contact-form-card textarea { background: #f5f5f5; border-color: rgba(0,0,0,.15); color: var(--text); }
/* Nowplaying light */
html.light .nowplaying-card { background: rgba(255,255,255,.75); border-color: rgba(0,0,0,.12); }
/* Lisibilité du header de section sur fond flouté (any cover color) */
#direct.has-bg-blur .section-header .section-tag,
#direct.has-bg-blur .section-header .section-title {
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,.7);
}
#direct.has-bg-blur .section-header .section-tag {
  background: rgba(230,57,70,.5); border-color: rgba(230,57,70,.6);
}
/* Titres historique dans EN DIRECT — toujours lisibles */
#direct .section-header h3 { color: var(--text); }
.history-all-link { color: var(--primary); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; }
#direct.has-bg-blur .section-header h3,
#direct.has-bg-blur .history-all-link { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.8); }
html.light #direct .section-header h3 { color: var(--text); }
html.light .history-all-link { color: var(--primary); }
html.light #direct.has-bg-blur .section-header h3 { color: var(--text); text-shadow: none; }
html.light #direct.has-bg-blur .history-all-link { color: var(--primary); text-shadow: none; }
/* Podcast mini-player light */
html.light #podcast-mini-player { background: #fff; border-color: rgba(0,0,0,.1); }
/* Theme toggle text in nav */
html.light .theme-toggle-btn { border-color: rgba(0,0,0,.15); color: var(--text-muted); }
/* Vote heart en mode clair */
html.light .track-vote-btn { background: rgba(0,0,0,.07); color: #111; }
html.light .track-vote-btn:hover { background: rgba(0,0,0,.13); color: #000; }
html.light .track-vote-btn.voted { background: var(--primary); color: #fff; }

/* Bouton thème */
.theme-toggle-btn {
  background: none; border: 1px solid var(--border);
  color: var(--text-muted); border-radius: 6px;
  padding: 6px 8px; cursor: pointer; display: flex;
  align-items: center; transition: color .2s, border-color .2s;
  flex-shrink: 0;
}
.theme-toggle-btn:hover { color: var(--text); border-color: var(--primary); }
.theme-toggle-btn svg { width: 16px; height: 16px; display: block; }

/* ============================================================
   SECTION CONTACT
   ============================================================ */
#contact { background: var(--bg); }
.contact-layout {
  display: flex; justify-content: center;
}
.contact-info h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; }
.contact-info p { color: var(--text-muted); font-size: .95rem; line-height: 1.6; }
.contact-recipient-list { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.contact-recipient-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius);
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
}
.contact-recipient-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(230,57,70,.15); border: 1px solid rgba(230,57,70,.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); flex-shrink: 0;
}
.contact-recipient-icon svg { width: 18px; height: 18px; }
.contact-form-card {
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px;
  width: 100%; max-width: 600px;
}
.contact-form-card .form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.contact-form-card label { font-size: .82rem; font-weight: 600; color: var(--text-muted); }
.contact-form-card input,
.contact-form-card select,
.contact-form-card textarea {
  padding: 11px 14px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  color: var(--text); font-size: .9rem; outline: none; width: 100%;
  transition: border-color var(--transition);
}
.contact-form-card input:focus,
.contact-form-card select:focus,
.contact-form-card textarea:focus { border-color: var(--primary); }
.contact-form-card select option { background: #1e1e30; color: #f0f0f0; }
.contact-form-card textarea { resize: vertical; min-height: 120px; }
.contact-select {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  color: var(--text); font-size: .92rem; outline: none;
  transition: border-color var(--transition); margin-bottom: 16px;
}
.contact-select:focus { border-color: var(--primary); }
.contact-select option { background: #1e1e30; color: #f0f0f0; }
@media (max-width: 768px) {
  .contact-layout { grid-template-columns: 1fr; }
}

/* ============================================================
   PAGE HISTORIQUE (publique)
   ============================================================ */
.history-page { padding: 100px 0 60px; min-height: 100vh; }
.history-filters {
  display: flex; flex-wrap: wrap; gap: 12px;
  padding: 20px 0; margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.history-filters input,
.history-filters select {
  padding: 9px 14px; border-radius: 8px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  color: var(--text); font-size: .88rem; outline: none;
}
.history-filters input:focus,
.history-filters select:focus { border-color: var(--primary); }
.history-table { width: 100%; border-collapse: collapse; }
.history-table th,
.history-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: .88rem; }
.history-table th { color: var(--text-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; }
.history-table td:first-child { width: 60px; }
.history-table img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; }
.history-table .no-cover { width: 44px; height: 44px; border-radius: 6px; background: rgba(255,255,255,.07); display:flex;align-items:center;justify-content:center; color:var(--text-muted); }
.history-page .pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.history-page .pagination a,
.history-page .pagination span { padding: 7px 14px; border-radius: 7px; font-size: .85rem; border: 1px solid var(--border); color: var(--text-muted); }
.history-page .pagination a:hover { border-color: var(--primary); color: var(--primary); }
.history-page .pagination .current-page { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================================
   Chat Widget
   ============================================================ */
.chat-widget {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 100%;
}
.chat-widget-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: .95rem;
}
.chat-live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .35; }
}
.chat-messages {
  min-height: 360px;
  max-height: 480px;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }
.chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.chat-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .78rem; color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
}
.chat-msg-body { flex: 1; min-width: 0; }
.chat-msg-name  { font-weight: 700; font-size: .82rem; }
.chat-msg-time  { font-size: .7rem; color: var(--text-muted); margin-left: 6px; }
.chat-msg-text  {
  font-size: .9rem; color: var(--text);
  word-break: break-word; margin-top: 3px; line-height: 1.45;
}
.chat-disabled  { color: var(--text-muted); text-align: center; padding: 48px 20px; font-size: .9rem; }
.chat-form {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-form input[type="text"] {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 13px;
  color: var(--text);
  font-size: .88rem;
  width: 100%;
  outline: none;
  transition: border-color .2s;
}
.chat-form input[type="text"]:focus { border-color: var(--primary); }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row input { flex: 1; }
.chat-send-btn {
  padding: 9px 20px;
  background: var(--primary);
  color: #fff; border: none;
  border-radius: 8px;
  font-weight: 700; font-size: .88rem;
  cursor: pointer; white-space: nowrap;
  transition: opacity .2s;
  flex-shrink: 0;
}
.chat-send-btn:disabled { opacity: .5; cursor: not-allowed; }
html.light .chat-form input[type="text"] { background: rgba(0,0,0,.04); }
html.light .chat-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,.12); }
/* Assombrit les couleurs générées (md5) potentiellement trop claires sur fond blanc */
html.light .chat-msg-name   { filter: brightness(0.55) saturate(1.3); }
html.light .chat-avatar     { filter: brightness(0.8); }
html.light .chat-role-badge { filter: brightness(0.8); }

/* Badges de rôle */
.chat-role-badge {
  display: inline-block;
  font-size: .65rem; font-weight: 800;
  padding: 1px 6px; border-radius: 4px;
  color: #fff; margin-left: 5px;
  text-transform: uppercase; letter-spacing: .4px;
  vertical-align: middle;
}
/* Token connect bar */
.chat-token-bar {
  border-top: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: .8rem;
  color: var(--text-muted);
}
.chat-token-bar input {
  flex: 1; background: rgba(255,255,255,.05);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 5px 10px; color: var(--text); font-size: .78rem;
  font-family: monospace; outline: none;
}
.chat-token-bar button {
  padding: 5px 12px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); font-size: .78rem; cursor: pointer;
  white-space: nowrap;
}
.chat-mod-connected {
  border-top: 1px solid var(--border);
  padding: 6px 16px;
  font-size: .78rem;
  display: flex; align-items: center; gap: 8px;
  color: var(--text-muted);
}
/* Actions mod sur les messages */
.chat-msg-actions {
  display: none;
  gap: 4px;
  margin-top: 4px;
}
.chat-msg:hover .chat-msg-actions { display: flex; }
.chat-mod-btn {
  padding: 2px 8px; border: none; border-radius: 4px;
  font-size: .72rem; font-weight: 700; cursor: pointer;
  transition: opacity .15s;
}
.chat-mod-btn:hover { opacity: .8; }
.chat-mod-btn-del  { background: rgba(239,68,68,.18);  color: #ef4444; }
.chat-mod-btn-ban  { background: rgba(245,158,11,.18); color: #f59e0b; }

/* Modale ban */
.chat-ban-modal {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.6); backdrop-filter: blur(3px);
  align-items: center; justify-content: center; padding: 16px;
}
.chat-ban-modal.open { display: flex; }
.chat-ban-modal-box {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; max-width: 380px; width: 100%;
  padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.chat-ban-modal-box h3 { font-size: 1rem; font-weight: 700; margin: 0 0 16px; }
.chat-ban-modal-box label { display: block; font-size: .82rem; color: var(--text-muted); margin-bottom: 4px; }
.chat-ban-modal-box select,
.chat-ban-modal-box input[type="text"] {
  width: 100%; background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px; color: var(--text); font-size: .88rem;
  margin-bottom: 12px; outline: none;
  -webkit-appearance: none; appearance: none;
}
.chat-ban-modal-box select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}
.chat-ban-modal-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.chat-ban-modal-btns button {
  padding: 8px 18px; border-radius: 8px; font-weight: 700;
  font-size: .85rem; cursor: pointer; border: none;
}
.chat-ban-modal-btns .btn-cancel {
  background: transparent; border: 1px solid var(--border); color: var(--text);
}
.chat-ban-modal-btns .btn-confirm { background: #f59e0b; color: #fff; }
