feat: initial implementation — Arte Concert web GUI
Docker / docker (push) Successful in 2m50s

FastAPI backend + HTML/JS frontend pour parcourir et télécharger les
concerts Arte Concert. Cache 6h, recherche live, historique SQLite,
suivi de progression SSE, design sombre Playfair Display + Inter.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
dev
2026-04-25 18:36:00 +02:00
parent 8b841950b4
commit eadc242173
10 changed files with 1546 additions and 0 deletions
+364
View File
@@ -0,0 +1,364 @@
'use strict';
// ── State ────────────────────────────────────────────────────────────────────
const state = {
page: 1,
search: '',
pageSize: 24,
totalPages: 1,
current: null, // concert object shown in modal
activeDls: {}, // dl_id → { title, state, progress }
downloadedUrls: new Set(),
};
// ── DOM refs ─────────────────────────────────────────────────────────────────
const $ = id => document.getElementById(id);
const grid = $('grid');
const pagination = $('pagination');
const statusText = $('status-text');
const searchInput = $('search');
const modalOverlay = $('modal-overlay');
const dlPanel = $('dl-panel');
const dlPanelBody = $('dl-panel-body');
const dlBadge = $('dl-badge');
// ── Helpers ──────────────────────────────────────────────────────────────────
function fmtDuration(secs) {
if (!secs) return '';
const h = Math.floor(secs / 3600);
const m = Math.floor((secs % 3600) / 60);
const s = Math.floor(secs % 60);
return h
? `${h}h ${String(m).padStart(2,'0')}min`
: `${m}min ${String(s).padStart(2,'0')}s`;
}
function fmtDate(raw) {
if (!raw || raw.length < 8) return '';
const y = raw.slice(0, 4), mo = raw.slice(4, 6), d = raw.slice(6, 8);
return new Date(`${y}-${mo}-${d}`).toLocaleDateString('fr-FR', {
day: 'numeric', month: 'long', year: 'numeric'
});
}
function debounce(fn, ms) {
let t; return (...a) => { clearTimeout(t); t = setTimeout(() => fn(...a), ms); };
}
// ── Concerts ─────────────────────────────────────────────────────────────────
async function loadConcerts() {
const params = new URLSearchParams({
page: state.page,
search: state.search,
page_size: state.pageSize,
});
const res = await fetch(`/api/concerts?${params}`);
if (!res.ok) throw new Error(res.statusText);
return res.json();
}
function renderSkeletons() {
grid.innerHTML = Array(8).fill('<div class="skeleton"></div>').join('');
}
function renderConcerts(data) {
const { concerts, total, pages } = data;
state.totalPages = pages;
if (!concerts.length) {
grid.innerHTML = '<p style="color:var(--text-muted);grid-column:1/-1;padding:40px 0">Aucun résultat.</p>';
pagination.hidden = true;
statusText.textContent = 'Aucun résultat.';
return;
}
statusText.textContent = `${total} concert${total > 1 ? 's' : ''} · page ${state.page} / ${pages}`;
grid.innerHTML = concerts.map(c => {
const thumb = c.thumbnail
? `<img class="card-thumb" src="${c.thumbnail}" alt="" loading="lazy" />`
: `<div class="card-thumb" style="background:#1a1a1a"></div>`;
const dur = c.duration ? `<span class="card-duration">${fmtDuration(c.duration)}</span>` : '';
const dl = state.downloadedUrls.has(c.url) ? `<span class="card-downloaded">✓ Téléchargé</span>` : '';
const date = fmtDate(c.upload_date);
return `
<div class="card" data-id="${c.id}" tabindex="0" role="button" aria-label="${c.title}">
<div class="card-thumb-wrap">
${thumb}${dur}${dl}
</div>
<div class="card-info">
<div class="card-title">${c.title}</div>
${date ? `<div class="card-date">${date}</div>` : ''}
</div>
</div>`;
}).join('');
// store concerts for modal access
grid._concerts = concerts;
renderPagination(pages);
}
async function refresh() {
renderSkeletons();
pagination.hidden = true;
statusText.textContent = 'Chargement…';
try {
const data = await loadConcerts();
renderConcerts(data);
} catch (e) {
statusText.textContent = `Erreur : ${e.message}`;
grid.innerHTML = '';
}
}
// ── Pagination ───────────────────────────────────────────────────────────────
function renderPagination(pages) {
if (pages <= 1) { pagination.hidden = true; return; }
pagination.hidden = false;
const p = state.page;
let btns = '';
btns += `<button class="page-btn" data-p="${p-1}" ${p===1?'disabled':''}></button>`;
const range = [...new Set([1, p-1, p, p+1, pages])].filter(n => n>=1 && n<=pages).sort((a,b)=>a-b);
let prev = null;
for (const n of range) {
if (prev && n - prev > 1) btns += `<span style="color:var(--text-muted);padding:0 4px">…</span>`;
btns += `<button class="page-btn ${n===p?'active':''}" data-p="${n}">${n}</button>`;
prev = n;
}
btns += `<button class="page-btn" data-p="${p+1}" ${p===pages?'disabled':''}></button>`;
pagination.innerHTML = btns;
}
pagination.addEventListener('click', e => {
const btn = e.target.closest('[data-p]');
if (!btn || btn.disabled) return;
const p = +btn.dataset.p;
if (p < 1 || p > state.totalPages) return;
state.page = p;
window.scrollTo({ top: 0, behavior: 'smooth' });
refresh();
});
// ── Modal ────────────────────────────────────────────────────────────────────
function openModal(concert) {
state.current = concert;
$('modal-thumb').src = concert.thumbnail || '';
$('modal-title').textContent = concert.title;
$('modal-meta').textContent = [
concert.duration ? fmtDuration(concert.duration) : '',
concert.upload_date ? fmtDate(concert.upload_date) : '',
].filter(Boolean).join(' · ');
$('modal-desc').textContent = concert.description || '';
$('modal-dur-badge').textContent = concert.duration ? fmtDuration(concert.duration) : '';
$('btn-watch').href = concert.url || '#';
const btnDl = $('btn-download');
const alreadyDone = state.downloadedUrls.has(concert.url);
btnDl.textContent = alreadyDone ? '✓ Déjà téléchargé' : 'Télécharger';
btnDl.prepend((() => {
const s = document.createElementNS('http://www.w3.org/2000/svg','svg');
s.setAttribute('viewBox','0 0 20 20'); s.setAttribute('fill','none');
s.setAttribute('width','16'); s.setAttribute('height','16');
if (!alreadyDone) {
s.innerHTML = `<path d="M10 3v9M7 9l3 3 3-3" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4 15h12" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>`;
}
return s;
})());
btnDl.disabled = alreadyDone;
$('dl-progress-wrap').hidden = true;
$('dl-progress-fill').style.width = '0%';
$('dl-progress-label').textContent = '0%';
modalOverlay.hidden = false;
document.body.style.overflow = 'hidden';
}
function closeModal() {
modalOverlay.hidden = true;
document.body.style.overflow = '';
state.current = null;
}
$('modal-close').addEventListener('click', closeModal);
modalOverlay.addEventListener('click', e => { if (e.target === modalOverlay) closeModal(); });
document.addEventListener('keydown', e => { if (e.key === 'Escape') closeModal(); });
grid.addEventListener('click', e => {
const card = e.target.closest('.card');
if (!card) return;
const concerts = grid._concerts || [];
const c = concerts.find(x => x.id === card.dataset.id);
if (c) openModal(c);
});
grid.addEventListener('keydown', e => {
if (e.key === 'Enter' || e.key === ' ') {
const card = e.target.closest('.card');
if (card) card.click();
}
});
// ── Download ─────────────────────────────────────────────────────────────────
$('btn-download').addEventListener('click', async () => {
const c = state.current;
if (!c) return;
const btnDl = $('btn-download');
btnDl.disabled = true;
btnDl.textContent = 'Démarrage…';
try {
const res = await fetch('/api/download', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ url: c.url, title: c.title }),
});
const { id } = await res.json();
trackDownload(id, c.title, c.url);
} catch (e) {
btnDl.disabled = false;
btnDl.textContent = 'Erreur — réessayer';
}
});
function trackDownload(id, title, url) {
state.activeDls[id] = { title, state: 'queued', progress: 0 };
updateDlBadge();
renderDlPanel();
$('dl-progress-wrap').hidden = false;
const es = new EventSource(`/api/progress/${id}`);
es.onmessage = ev => {
const s = JSON.parse(ev.data);
state.activeDls[id] = { ...state.activeDls[id], ...s };
updateDlBadge();
renderDlPanel();
// update modal progress if it's still open for this url
if (state.current?.url === url) {
const pct = s.progress || 0;
$('dl-progress-fill').style.width = `${pct}%`;
$('dl-progress-label').textContent = `${Math.round(pct)}%`;
if (s.state === 'done') {
$('dl-progress-label').textContent = '✓ Terminé';
$('btn-download').textContent = '✓ Téléchargé';
}
}
if (s.state === 'done') {
state.downloadedUrls.add(url);
es.close();
} else if (s.state === 'error') {
es.close();
}
};
es.onerror = () => es.close();
}
function updateDlBadge() {
const active = Object.values(state.activeDls).filter(
d => d.state === 'downloading' || d.state === 'queued' || d.state === 'processing'
).length;
if (active > 0) {
dlBadge.hidden = false;
dlBadge.textContent = active;
} else {
dlBadge.hidden = true;
}
}
function renderDlPanel() {
const items = Object.entries(state.activeDls);
if (!items.length) {
dlPanelBody.innerHTML = '<p class="dl-empty">Aucun téléchargement.</p>';
return;
}
dlPanelBody.innerHTML = items.map(([, d]) => {
const pct = Math.round(d.progress || 0);
const showBar = ['downloading','processing'].includes(d.state);
return `
<div class="dl-item">
<div class="dl-item-title">${d.title}</div>
<div class="dl-item-state ${d.state}">${stateLabel(d.state)}</div>
${showBar ? `
<div class="dl-item-bar-wrap">
<div class="dl-item-bar-fill" style="width:${pct}%"></div>
</div>` : ''}
</div>`;
}).join('');
}
function stateLabel(s) {
return { queued:'En attente', downloading:'Téléchargement', processing:'Finalisation', done:'Terminé', error:'Erreur' }[s] || s;
}
// ── Downloads panel toggle ────────────────────────────────────────────────────
$('btn-dl-toggle').addEventListener('click', () => {
dlPanel.hidden = !dlPanel.hidden;
if (!dlPanel.hidden) refreshDlHistory();
});
$('dl-panel-close').addEventListener('click', () => { dlPanel.hidden = true; });
async function refreshDlHistory() {
try {
const history = await fetch('/api/downloads').then(r => r.json());
for (const h of history) {
if (!state.activeDls[h.id]) {
state.activeDls[h.id] = { title: h.title, state: h.state, progress: h.progress || 0 };
}
if (h.state === 'done') state.downloadedUrls.add(h.url);
}
renderDlPanel();
updateDlBadge();
} catch {}
}
// ── Refresh button ─────────────────────────────────────────────────────────
$('btn-refresh').addEventListener('click', async () => {
const btn = $('btn-refresh');
btn.style.opacity = '0.4';
btn.disabled = true;
statusText.textContent = 'Rafraîchissement du catalogue…';
try {
const r = await fetch('/api/refresh', { method: 'POST' });
const { count } = await r.json();
statusText.textContent = `Catalogue mis à jour — ${count} concerts.`;
state.page = 1;
await refresh();
} catch {
statusText.textContent = 'Erreur lors du rafraîchissement.';
}
btn.style.opacity = '';
btn.disabled = false;
});
// ── Search ────────────────────────────────────────────────────────────────────
const doSearch = debounce(() => {
state.search = searchInput.value.trim();
state.page = 1;
refresh();
}, 380);
searchInput.addEventListener('input', doSearch);
document.addEventListener('keydown', e => {
if ((e.metaKey || e.ctrlKey) && e.key === 'k') {
e.preventDefault();
searchInput.focus();
}
});
// ── Init ─────────────────────────────────────────────────────────────────────
(async () => {
await refreshDlHistory();
await refresh();
})();
+661
View File
@@ -0,0 +1,661 @@
/* ══ RESET & BASE ══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--bg: #080808;
--surface: #131313;
--surface-2: #1c1c1c;
--border: rgba(255,255,255,0.07);
--gold: #d4a853;
--gold-dim: rgba(212,168,83,0.45);
--gold-glow: rgba(212,168,83,0.12);
--text: #e8e8e8;
--text-dim: #888;
--text-muted: #555;
--radius: 10px;
--header-h: 64px;
--transition: 0.2s ease;
}
html { scroll-behavior: smooth; }
body {
background: var(--bg);
color: var(--text);
font-family: 'Inter', system-ui, sans-serif;
font-size: 14px;
min-height: 100vh;
overflow-x: hidden;
}
/* ══ HEADER ════════════════════════════════════════════════════════════════ */
.header {
position: fixed;
top: 0; left: 0; right: 0;
height: var(--header-h);
background: rgba(8,8,8,0.92);
backdrop-filter: blur(12px);
border-bottom: 1px solid var(--border);
z-index: 100;
}
.header-inner {
max-width: 1440px;
margin: 0 auto;
height: 100%;
padding: 0 24px;
display: flex;
align-items: center;
gap: 24px;
}
.brand {
display: flex;
align-items: center;
gap: 10px;
flex-shrink: 0;
text-decoration: none;
}
.brand-logo {
color: var(--gold);
font-size: 22px;
line-height: 1;
}
.brand-text {
display: flex;
flex-direction: column;
line-height: 1.1;
}
.brand-name {
font-family: 'Playfair Display', serif;
font-size: 17px;
font-weight: 700;
letter-spacing: 0.08em;
color: var(--text);
}
.brand-sub {
font-size: 9px;
font-weight: 600;
letter-spacing: 0.22em;
color: var(--gold);
text-transform: uppercase;
}
.search-wrap {
flex: 1;
max-width: 520px;
position: relative;
margin: 0 auto;
}
.search-icon {
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
width: 15px;
height: 15px;
color: var(--text-muted);
pointer-events: none;
}
.search-input {
width: 100%;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 8px;
padding: 9px 40px 9px 36px;
color: var(--text);
font-family: 'Inter', sans-serif;
font-size: 13.5px;
outline: none;
transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
border-color: var(--gold-dim);
box-shadow: 0 0 0 3px var(--gold-glow);
}
.search-kbd {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
font-size: 11px;
color: var(--text-muted);
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: 4px;
padding: 2px 5px;
pointer-events: none;
}
.header-actions {
display: flex;
align-items: center;
gap: 8px;
flex-shrink: 0;
}
.btn-ghost {
background: none;
border: 1px solid var(--border);
border-radius: 7px;
color: var(--text-dim);
cursor: pointer;
padding: 7px 10px;
display: flex;
align-items: center;
gap: 6px;
font-size: 13px;
transition: color var(--transition), border-color var(--transition), background var(--transition);
position: relative;
}
.btn-ghost:hover {
color: var(--text);
border-color: rgba(255,255,255,0.15);
background: var(--surface);
}
.dl-badge {
position: absolute;
top: -5px; right: -5px;
background: var(--gold);
color: #000;
font-size: 10px;
font-weight: 700;
min-width: 17px;
height: 17px;
border-radius: 9px;
display: flex;
align-items: center;
justify-content: center;
padding: 0 4px;
}
/* ══ MAIN ══════════════════════════════════════════════════════════════════ */
.main {
max-width: 1440px;
margin: 0 auto;
padding: calc(var(--header-h) + 28px) 24px 80px;
}
.status-bar {
font-size: 12.5px;
color: var(--text-muted);
margin-bottom: 20px;
letter-spacing: 0.02em;
}
/* ══ GRID ══════════════════════════════════════════════════════════════════ */
.grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 18px;
}
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid { grid-template-columns: 1fr; } }
/* ══ CARD ══════════════════════════════════════════════════════════════════ */
.card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
cursor: pointer;
transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
position: relative;
}
.card:hover {
transform: translateY(-4px);
box-shadow: 0 16px 48px rgba(0,0,0,0.6), 0 0 0 1px var(--gold-dim);
border-color: var(--gold-dim);
}
.card-thumb-wrap {
position: relative;
aspect-ratio: 16/9;
overflow: hidden;
background: #111;
}
.card-thumb {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.35s ease;
display: block;
}
.card:hover .card-thumb { transform: scale(1.04); }
.card-thumb-wrap::after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(to bottom,
transparent 40%,
rgba(0,0,0,0.55) 75%,
rgba(0,0,0,0.85) 100%
);
}
.card-duration {
position: absolute;
bottom: 8px;
right: 8px;
background: rgba(0,0,0,0.75);
border: 1px solid rgba(255,255,255,0.1);
color: var(--text);
font-size: 11px;
font-weight: 500;
padding: 2px 6px;
border-radius: 4px;
z-index: 2;
letter-spacing: 0.02em;
}
.card-downloaded {
position: absolute;
top: 8px;
left: 8px;
background: rgba(0,0,0,0.7);
border: 1px solid var(--gold-dim);
color: var(--gold);
font-size: 10px;
font-weight: 600;
padding: 2px 7px;
border-radius: 4px;
z-index: 2;
letter-spacing: 0.06em;
text-transform: uppercase;
}
.card-info {
padding: 12px 14px 14px;
}
.card-title {
font-family: 'Playfair Display', serif;
font-size: 15px;
font-weight: 400;
line-height: 1.35;
color: var(--text);
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.card-date {
margin-top: 6px;
font-size: 11.5px;
color: var(--text-muted);
letter-spacing: 0.03em;
}
/* ══ SKELETON ══════════════════════════════════════════════════════════════ */
.skeleton {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
aspect-ratio: 16/11;
overflow: hidden;
position: relative;
}
.skeleton::after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(90deg,
transparent 0%,
rgba(255,255,255,0.04) 50%,
transparent 100%
);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
0% { background-position: -200% 0; }
100% { background-position: 200% 0; }
}
/* ══ PAGINATION ════════════════════════════════════════════════════════════ */
.pagination {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
margin-top: 40px;
}
.page-btn {
background: var(--surface);
border: 1px solid var(--border);
border-radius: 7px;
color: var(--text-dim);
cursor: pointer;
min-width: 36px;
height: 36px;
padding: 0 10px;
font-size: 13px;
font-family: 'Inter', sans-serif;
transition: all var(--transition);
}
.page-btn:hover {
border-color: var(--gold-dim);
color: var(--text);
}
.page-btn.active {
background: var(--gold);
border-color: var(--gold);
color: #000;
font-weight: 600;
}
.page-btn:disabled {
opacity: 0.3;
cursor: default;
}
/* ══ MODAL ═════════════════════════════════════════════════════════════════ */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0,0,0,0.82);
backdrop-filter: blur(6px);
z-index: 200;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
}
.modal-overlay[hidden] { display: none; }
.modal {
background: var(--surface);
border: 1px solid rgba(255,255,255,0.1);
border-radius: 14px;
width: 100%;
max-width: 640px;
max-height: 90vh;
overflow-y: auto;
position: relative;
box-shadow: 0 40px 100px rgba(0,0,0,0.8);
animation: modal-in 0.22s ease;
}
@keyframes modal-in {
from { opacity: 0; transform: scale(0.95) translateY(12px); }
to { opacity: 1; transform: none; }
}
.modal-close {
position: absolute;
top: 12px; right: 12px;
background: rgba(0,0,0,0.5);
border: 1px solid var(--border);
border-radius: 50%;
color: var(--text-dim);
cursor: pointer;
width: 30px; height: 30px;
display: flex; align-items: center; justify-content: center;
font-size: 13px;
z-index: 2;
transition: color var(--transition);
}
.modal-close:hover { color: var(--text); }
.modal-thumb-wrap {
position: relative;
aspect-ratio: 16/9;
overflow: hidden;
border-radius: 14px 14px 0 0;
background: #111;
}
.modal-thumb {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.modal-thumb-gradient {
position: absolute;
inset: 0;
background: linear-gradient(to bottom, transparent 50%, var(--surface) 100%);
}
.modal-duration-badge {
position: absolute;
bottom: 12px; right: 12px;
background: rgba(0,0,0,0.75);
border: 1px solid rgba(255,255,255,0.12);
color: var(--text);
font-size: 12px;
font-weight: 500;
padding: 3px 8px;
border-radius: 5px;
letter-spacing: 0.02em;
}
.modal-body {
padding: 20px 28px 28px;
}
.modal-title {
font-family: 'Playfair Display', serif;
font-size: 22px;
font-weight: 700;
line-height: 1.3;
margin-bottom: 8px;
}
.modal-meta {
font-size: 12.5px;
color: var(--gold);
letter-spacing: 0.04em;
margin-bottom: 14px;
}
.modal-desc {
font-size: 13.5px;
color: var(--text-dim);
line-height: 1.65;
max-height: 120px;
overflow-y: auto;
margin-bottom: 24px;
}
.modal-desc::-webkit-scrollbar { width: 4px; }
.modal-desc::-webkit-scrollbar-track { background: transparent; }
.modal-desc::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.modal-actions {
display: flex;
align-items: center;
gap: 12px;
}
.btn-download {
background: var(--gold);
color: #000;
border: none;
border-radius: 8px;
padding: 10px 22px;
font-family: 'Inter', sans-serif;
font-size: 14px;
font-weight: 600;
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
transition: opacity var(--transition), transform var(--transition);
}
.btn-download:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-download:active { transform: none; }
.btn-download:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn-watch {
color: var(--text-dim);
text-decoration: none;
font-size: 13px;
display: flex;
align-items: center;
gap: 6px;
transition: color var(--transition);
}
.btn-watch:hover { color: var(--text); }
.dl-progress-wrap {
margin-top: 16px;
display: flex;
align-items: center;
gap: 12px;
}
.dl-progress-wrap[hidden] { display: none; }
.dl-progress-bar {
flex: 1;
height: 4px;
background: var(--surface-2);
border-radius: 2px;
overflow: hidden;
}
.dl-progress-fill {
height: 100%;
background: var(--gold);
border-radius: 2px;
transition: width 0.5s ease;
width: 0%;
}
.dl-progress-label {
font-size: 12px;
color: var(--text-dim);
min-width: 36px;
text-align: right;
}
/* ══ DOWNLOADS PANEL ═══════════════════════════════════════════════════════ */
.dl-panel {
position: fixed;
bottom: 0; left: 0; right: 0;
max-height: 360px;
background: var(--surface);
border-top: 1px solid var(--border);
z-index: 150;
box-shadow: 0 -16px 48px rgba(0,0,0,0.5);
animation: slide-up 0.25s ease;
}
.dl-panel[hidden] { display: none; }
@keyframes slide-up {
from { transform: translateY(100%); }
to { transform: none; }
}
.dl-panel-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 14px 24px;
border-bottom: 1px solid var(--border);
}
.dl-panel-title {
font-size: 13px;
font-weight: 600;
letter-spacing: 0.05em;
text-transform: uppercase;
color: var(--text-dim);
}
.dl-panel-body {
overflow-y: auto;
max-height: 300px;
padding: 8px 0;
}
.dl-empty {
padding: 20px 24px;
color: var(--text-muted);
font-size: 13px;
}
.dl-item {
padding: 10px 24px;
display: grid;
grid-template-columns: 1fr auto;
gap: 4px 12px;
align-items: center;
border-bottom: 1px solid var(--border);
}
.dl-item:last-child { border-bottom: none; }
.dl-item-title {
font-family: 'Playfair Display', serif;
font-size: 13.5px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.dl-item-state {
font-size: 11px;
font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
text-align: right;
}
.dl-item-state.done { color: #5cb85c; }
.dl-item-state.error { color: #e55; }
.dl-item-state.queued { color: var(--text-muted); }
.dl-item-state.downloading,
.dl-item-state.processing { color: var(--gold); }
.dl-item-bar-wrap {
grid-column: 1 / -1;
height: 3px;
background: var(--surface-2);
border-radius: 2px;
overflow: hidden;
}
.dl-item-bar-fill {
height: 100%;
background: var(--gold);
border-radius: 2px;
transition: width 0.5s ease;
}
/* scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }