/* === GLOBAL === */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #111;
  color: #fff;
}

.bb-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
  box-sizing: border-box;
}

/* === DESKTOP === */
#bb-download-container {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
}

#bb-sidebar {
  width: 25%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #1e1e1e;
  padding: 1rem;
  border-radius: 8px;
}

#bb-sidebar button {
  background: #333;
  border: none;
  padding: 0.75rem 1rem;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  text-align: left;
}
#bb-sidebar button:hover,
#bb-sidebar button.active {
  background-color: #ff0099;
  color: white;
}

.flex-1 {
  flex: 1;
  min-width: 0;
  background: #1a1a1a;
  padding: 1rem;
  border-radius: 8px;
  box-sizing: border-box;
}

#bb-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 1rem;
  scrollbar-width: none;
  white-space: nowrap;
}
#bb-tabs::-webkit-scrollbar {
  display: none;
}
#bb-tabs button.bb-tab {
  flex: 0 0 auto;
  padding: 0.5rem 1rem;
  background: #333;
  color: white;
  border: 0px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
#bb-tabs button.bb-tab:hover,
#bb-tabs button.bb-tab.active {
  background-color: #ff0099;
  border-color: #ff0099;
  color: #fff;
}

#bb-content {
  background: #222;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

/* === MOBILE OVERRIDE === */
@media (max-width: 768px) {
  #bb-download-container {
    flex-direction: column;
  }

  #bb-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  #bb-sidebar button {
    flex: 1 1 40%;
    font-size: 0.95rem;
    text-align: center;
  }

  #bb-tabs {
    justify-content: center;
    padding-bottom: 0.5rem;
  }

  .flex-1 {
    width: 100%;
    padding: 0.75rem;
  }

  #bb-content {
    padding: 0.75rem;
  }
}


/* Audio en pleine largeur sur desktop */
.flex-1 audio {
  width: 100%;
  max-width: 100%;
  height: 32px;
  margin: 0.5rem 0 1.5rem 0;
  display: block;
}

/* Empêche débordement sur mobile */
@media (max-width: 768px) {
  .flex-1 audio {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}


.bb-video-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 100%;
}

.bb-video {
  width: 100%;
  height: auto;
}



.bb-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background-color: rgba(0, 0, 0, 0.6);
  border: 2px solid #ff0099;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
}


.bb-play-overlay svg polygon {
  fill: #ff0099;
  stroke: none;
}

#bbd-loading .bbd-spinner {
  margin:40px 0 40px 0;
  width: 50px;
  height: 50px;
  border: 4px solid #ff0099;
  border-top: 4px solid transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


.bbd-docfile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem;
  background-color: #2d2d2d;
  border-left: 4px solid #ff0099;
  border-radius: 6px;
  transition: background 0.3s;
  color: white;
  text-decoration: none;
  margin-bottom: 0.75rem;
}

.bbd-docfile:hover {
  background-color: #ff0099;
  color: white;
}

.bbd-docfile::before {
  content: "📄";
  font-size: 1.2rem;
}
