/* === Page Téléchargements - Style néon === */
.card {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  padding: clamp(22px, 3vw, 32px);
  margin-bottom: 30px;
  border: 1px solid rgba(127, 91, 255, 0.25);
  box-shadow: 0 28px 55px rgba(127, 91, 255, 0.16);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(255, 106, 213, 0.12));
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 35px 65px rgba(127, 91, 255, 0.22);
}

.card:hover::after {
  opacity: 1;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-header h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-strong);
}

.section-header .muted {
  margin-top: 6px;
}

.download-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.download-form input[type="url"] {
  flex: 1;
  min-width: 260px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(127, 91, 255, 0.28);
  background: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  transition: var(--transition-base);
  box-shadow: inset 0 0 22px rgba(127, 91, 255, 0.08);
}

.download-form input[type="url"]:focus {
  outline: none;
  border-color: rgba(0, 212, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.18);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(127, 91, 255, 0.2);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 18px rgba(127, 91, 255, 0.08);
}

.file-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.file-table th,
.file-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(127, 91, 255, 0.14);
  text-align: left;
  color: var(--text-strong);
}

.file-table th {
  background: rgba(127, 91, 255, 0.12);
  font-size: 0.9rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.file-table tbody tr:hover {
  background: rgba(0, 212, 255, 0.12);
}

.file-name {
  font-weight: 700;
}

.file-size,
.file-date,
.file-type {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  color: var(--text-muted);
}

.download-progress-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.download-card {
  border-radius: 20px;
  padding: 18px 20px;
  border: 1px solid rgba(0, 212, 255, 0.25);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 45px rgba(0, 212, 255, 0.18);
}

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

.download-card-title {
  font-weight: 700;
}

.download-card-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.download-progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(127, 91, 255, 0.12);
  overflow: hidden;
  margin-bottom: 12px;
}

.download-progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(120deg, var(--primary-color), var(--accent-color));
  border-radius: inherit;
  transition: width 0.35s ease;
  box-shadow: 0 0 20px rgba(127, 91, 255, 0.35);
}

.download-card-status {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.analysis-card {
  border: 1px dashed rgba(127, 91, 255, 0.4);
  background: rgba(127, 91, 255, 0.08);
}

.analysis-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.analysis-item {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  padding: 20px;
  border: 1px solid rgba(127, 91, 255, 0.22);
  box-shadow: inset 0 0 24px rgba(127, 91, 255, 0.08);
}

.analysis-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.analysis-item-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.analysis-item-destination {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.analysis-item-preview {
  font-size: 0.95rem;
  color: var(--text-strong);
  line-height: 1.6;
  background: rgba(127, 91, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
}

.analysis-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.analysis-item-tags .tag {
  background: rgba(0, 212, 255, 0.18);
  color: var(--text-strong);
}

.analysis-errors {
  margin-top: 20px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 90, 138, 0.15);
  color: #7a1438;
  border: 1px solid rgba(255, 90, 138, 0.35);
}

.analysis-error-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.analysis-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(120deg, rgba(255, 206, 84, 0.9), rgba(255, 153, 0, 0.9));
  color: #5b3600;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 16px 28px rgba(255, 185, 64, 0.45);
  border: 1px solid rgba(255, 185, 64, 0.45);
  margin-top: 12px;
}

.premium-icon {
  font-size: 1.2rem;
}

@media (max-width: 900px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .analysis-item-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .download-form {
    flex-direction: column;
  }

  .table-actions,
  .analysis-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .download-card-status {
    flex-direction: column;
    align-items: flex-start;
  }
}
