/* ══════════════════════════════════════════════
   MINI-LECTEUR FLOTTANT
   ══════════════════════════════════════════════ */
.sw-float {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translate(-50%, 140%);
  width: min(560px, calc(100% - 2rem));
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  background: rgba(10,10,10,0.72);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 16px 50px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.03);
  z-index: 500;
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22,1,0.36,1), opacity 0.35s ease;
  pointer-events: none;
}
.sw-float.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

/* coins bracket façon Nox Ouro */
.sw-float::before,
.sw-float::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  pointer-events: none;
}
.sw-float::before { top: 0; left: 0; border-top: 1px solid rgba(255,255,255,0.4); border-left: 1px solid rgba(255,255,255,0.4); }
.sw-float::after  { bottom: 0; right: 0; border-bottom: 1px solid rgba(255,255,255,0.4); border-right: 1px solid rgba(255,255,255,0.4); }

.sw-float-glow {
  position: absolute; inset: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.sw-float.is-playing .sw-float-glow {
  animation: swFloatPulse 2.6s ease-in-out infinite;
}
@keyframes swFloatPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 0 12px rgba(255,255,255,0.08); }
  50%      { box-shadow: 0 0 0 1px rgba(255,255,255,0.24), 0 0 22px rgba(255,255,255,0.16); }
}

/* ── Cover / bouton lecture principal ── */
.sw-float-cover {
  position: relative;
  width: 38px; height: 38px;
  flex-shrink: 0;
  border: none;
  padding: 0;
  background: #111;
  cursor: pointer;
  overflow: hidden;
}
.sw-float-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.sw-float.is-playing .sw-float-cover img {
  animation: swFloatSpin 26s linear infinite;
}
@keyframes swFloatSpin {
  from { transform: scale(1.4) rotate(0deg); }
  to   { transform: scale(1.4) rotate(360deg); }
}
.sw-float-cover-ring {
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
  pointer-events: none;
}

/* ── Infos titre ── */
.sw-float-info { min-width: 0; overflow: hidden; }
.sw-float-title-wrap { overflow: hidden; }
.sw-float-title {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sw-float-sub {
  font-family: 'DM Mono', monospace;
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-top: 1px;
}

/* ── Progression (fine barre sous le titre, superposée en bas de la pilule) ── */
.sw-float-progress {
  grid-column: 1 / -1;
  order: 5;
  position: relative;
  height: 3px;
  margin-top: 0.15rem;
  cursor: pointer;
}
.sw-float-bar-line {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.08);
}
.sw-float-bar-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--gradient-rgb, #fff);
  transition: width 0.1s linear;
}

/* ── Transport ── */
.sw-float-transport { display: flex; align-items: center; gap: 0.3rem; flex-shrink: 0; }
.sw-float-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.sw-float-btn:hover { border-color: rgba(255,255,255,0.3); color: #fff; }
.sw-float-btn.play { width: 30px; height: 30px; color: rgba(255,255,255,0.9); }

.sw-float-btn.mode { width: 22px; height: 22px; border-color: rgba(255,255,255,0.07); color: rgba(255,255,255,0.3); }
.sw-float-btn.mode.active { color: #fff; border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.05); }

/* ── Extra (shuffle/repeat/volume) : repliés sur mobile, visibles au hover desktop ── */
.sw-float-extra { display: flex; align-items: center; gap: 0.3rem; flex-shrink: 0; }
.sw-float-vol { display: flex; align-items: center; color: rgba(255,255,255,0.4); }
.sw-float-vol-slider {
  width: 0; opacity: 0; height: 3px; margin-left: 0;
  accent-color: #fff; cursor: pointer;
  transition: width 0.25s ease, opacity 0.25s ease, margin-left 0.25s ease;
}
.sw-float-vol:hover .sw-float-vol-slider,
.sw-float-vol:focus-within .sw-float-vol-slider { width: 48px; opacity: 1; margin-left: 6px; }

.sw-float-close {
  background: none; border: none;
  color: rgba(255,255,255,0.3);
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: color 0.2s;
}
.sw-float-close:hover { color: #fff; }

/* ── pjax : fine barre de chargement en haut de page ── */
#sw-pjax-bar {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: #fff; box-shadow: 0 0 8px rgba(255,255,255,0.6);
  z-index: 999; opacity: 0;
  transition: width 0.3s ease, opacity 0.2s ease;
}
#sw-pjax-bar.is-loading { width: 70%; opacity: 1; }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 640px) {
  .sw-float {
    left: 0.6rem; right: 0.6rem; bottom: 0.6rem;
    width: auto;
    transform: translateY(140%);
    grid-template-columns: auto 1fr auto auto;
  }
  .sw-float.is-visible { transform: translateY(0); }
  .sw-float-extra { display: none; }
}
