/* Design amélioré pour la barre de progression de téléchargement */

/* Popup moderne (modal) pour téléchargements */
.bk-download-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bk-download-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 20, 0.55);
  backdrop-filter: blur(8px);
}

.bk-download-card {
  position: relative;
  width: min(520px, calc(100vw - 28px));
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.86));
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 22px 70px rgba(0,0,0,0.35);
  padding: 16px 16px 14px;
}

.bk-download-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.bk-download-title {
  font-weight: 900;
  color: #0b1220;
  letter-spacing: 0.2px;
}

.bk-download-x {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: #0b1220;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.bk-download-x:hover {
  background: rgba(255,255,255,0.95);
}

.bk-download-file {
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.06);
  margin-bottom: 12px;
}

.bk-download-name {
  font-weight: 800;
  color: #0b1220;
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bk-download-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(15, 23, 42, 0.72);
  font-weight: 700;
  font-size: 12px;
}

.bk-download-dot {
  opacity: 0.6;
}

.bk-download-progress {
  margin-bottom: 14px;
}

.bk-download-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.bk-download-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1 0%, #22c55e 100%);
  transition: width 160ms linear;
}

.bk-download-fill.is-indeterminate {
  width: 45%;
  animation: bkDownloadIndeterminate 1.05s infinite ease-in-out;
}

@keyframes bkDownloadIndeterminate {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(240%); }
}

.bk-download-actions {
  display: flex;
  justify-content: flex-end;
}

.bk-download-cancel {
  border: 0;
  border-radius: 14px;
  padding: 11px 14px;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(185, 28, 28, 0.35);
}

.bk-download-cancel:hover {
  filter: brightness(1.05);
}

@media (max-width: 480px) {
  .bk-download-card {
    padding: 14px 14px 12px;
    border-radius: 16px;
  }
  .bk-download-actions {
    justify-content: stretch;
  }
  .bk-download-cancel {
    width: 100%;
  }
}
