/* Sticky player + barres de progression */
#sticky-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
  font-family: "Heebo", system-ui, sans-serif;
  direction: rtl;
}
#sticky-player.hidden { display: none; }
#sticky-player .sp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  max-width: 768px;
  margin: 0 auto;
}
#sticky-player .sp-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  background: #f1f5f9;
  flex-shrink: 0;
}
#sticky-player .sp-meta { flex: 1; min-width: 0; }
#sticky-player .sp-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
#sticky-player .sp-track {
  background: #e2e8f0;
  height: 3px;
  border-radius: 99px;
  overflow: hidden;
}
#sticky-player .sp-progress {
  background: #1e40af;
  height: 100%;
  width: 0;
  transition: width 250ms linear;
}
#sticky-player .sp-time {
  font-size: 11px;
  color: #64748b;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
#sticky-player button.sp-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #1e40af;
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}
#sticky-player button.sp-btn:hover { background: #1e3a8a; }
#sticky-player button.sp-speed {
  min-width: 48px;
  height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #1e40af;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border: 1px solid #c7d2fe;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 120ms, color 120ms;
}
#sticky-player button.sp-speed:hover { background: #e0e7ff; }
#sticky-player button.sp-speed:active { background: #1e40af; color: #fff; }
#sticky-player button.sp-speed.is-fast { background: #fde68a; color: #92400e; border-color: #f59e0b; }
#sticky-player button.sp-close {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  border: none;
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
}
#sticky-player button.sp-close:hover { color: #0f172a; }

#sp-resume {
  background: #eff4ff;
  border-bottom: 1px solid #c7d2fe;
  padding: 6px 12px;
  text-align: center;
  font-size: 12px;
  color: #1e40af;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
#sp-resume.hidden { display: none; }
#sp-resume button {
  border: 1px solid #1e40af;
  border-radius: 4px;
  padding: 2px 8px;
  background: #fff;
  color: #1e40af;
  font-size: 12px;
  cursor: pointer;
}
#sp-resume button:hover { background: #1e40af; color: #fff; }

/* Barre progression ecoute par cours */
.course-progress-track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: transparent;
  pointer-events: none;
}
.course-progress-bar {
  height: 100%;
  background: #1e40af;
  opacity: 0.6;
  width: 0;
  display: none;
}
.course-watched-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: #16a34a;
  font-weight: 600;
}

/* Toast clipboard */
#share-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 100;
  opacity: 0;
  transition: opacity 200ms;
  pointer-events: none;
}
#share-toast.visible { opacity: 1; }

/* Padding bottom pour eviter que le sticky cache du contenu */
body.has-sticky-player { padding-bottom: 88px; }
