:root {
  --bg:          #c9bf98;
  --bg-surface:  #0d2818;
  --bg-elevated: #143824;
  --line:        rgba(255,255,255,0.14);
  --line-strong: rgba(255,255,255,0.22);
  --text:        #f4efe2;
  --text-hero:   #1a2e22;
  --text-dim:    #a8b8ac;
  --accent:      #fc3d32;
  --accent-soft: rgba(252,61,50,0.18);
  --mg-green:    #00843d;
  --mg-red:      #fc3d32;
  --display: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --body:    'Familjen Grotesk', system-ui, sans-serif;
  --pb-height: 92px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
}

/* ===== HERO / LOGO ===== */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-bottom: calc(var(--pb-height) + 24px);
  background:
    radial-gradient(ellipse 80% 65% at 8% 8%, rgba(0,132,61,0.85), transparent 70%),
    radial-gradient(ellipse 80% 65% at 92% 92%, rgba(252,61,50,0.80), transparent 70%),
    radial-gradient(ellipse 65% 45% at 50% 50%, #d8cfae, transparent 70%),
    var(--bg);
}

.hero__logo {
  max-width: min(95vw, 900px);
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.18));
}

/* ===== PLAYER BAR ===== */
.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: var(--bg-surface);
  border-top: 1px solid var(--line);
}

.player-bar__ticker {
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  height: 0;
  display: none; /* activé en JS uniquement si le texte déborde */
}

.player-bar__ticker-inner {
  display: inline-block;
  padding: 4px 16px;
  font-size: 12px;
  color: var(--text-dim);
}

.player-bar__inner {
  height: var(--pb-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.pb-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 auto;
}

.pb-live {
  flex-shrink: 0;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 3px;
  padding: 3px 8px;
  background: var(--accent-soft);
}

.pb-track {
  min-width: 0;
}

.pb-track__name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pb-resume {
  flex-shrink: 0;
}

.pb-btn--resume {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
}

.pb-btn--resume svg { width: 16px; height: 16px; }

.pb-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.pb-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: color .15s ease, background .15s ease;
}

.pb-btn:hover,
.pb-btn:focus-visible {
  color: var(--text);
  background: var(--bg-elevated);
}

.pb-btn svg { width: 20px; height: 20px; }

.pb-btn--play {
  background: var(--accent);
  color: #ffffff;
  width: 44px;
  height: 44px;
}

.pb-btn--play:hover,
.pb-btn--play:focus-visible {
  background: var(--accent);
  color: #ffffff;
  opacity: .9;
}

.pb-vol {
  position: relative;
  display: flex;
  align-items: center;
}

.vol-horiz-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  transition: max-width .2s ease, opacity .2s ease, margin .2s ease;
}

.pb-vol:hover .vol-horiz-wrap,
.pb-vol:focus-within .vol-horiz-wrap {
  max-width: 160px;
  opacity: 1;
  margin-left: 4px;
}

.vol-horiz-track { width: 100px; }

#vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: var(--line-strong);
  border-radius: 2px;
  outline: none;
}

#vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

#vol-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.vol-label {
  font-size: 11px;
  color: var(--text-dim);
  width: 32px;
}

.pb-sep {
  width: 1px;
  height: 24px;
  background: var(--line);
  margin: 0 4px;
}

.pb-btn--share svg { width: 16px; height: 16px; }

.pb-share-native svg { width: 18px; height: 18px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  :root { --pb-height: 116px; }

  .player-bar__inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 14px;
    gap: 10px;
  }

  .pb-track__name { max-width: 46vw; }

  .vol-horiz-wrap { display: none; }

  .pb-controls { gap: 6px; }
}

/* ===== ACCESSIBILITÉ ===== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
