:root{
  --bg:#0f172a;--card:#111827;--fg:#e5e7eb;--accent:#22c55e;--muted:#334155;--danger:#ef4444
}
*{box-sizing:border-box}
body{margin:0;font-family:ui-sans-serif,system-ui,Segoe UI,Roboto,Arial;background:var(--bg);color:var(--fg)}
a{color:#60a5fa;text-decoration:none}
.wrapper{max-width:1100px;margin:40px auto;padding:0 16px}
.card{background:#111827;border-radius:16px;padding:20px;box-shadow:0 10px 30px rgba(0,0,0,.35)}
h1,h2,h3{margin:0 0 12px 0}
input,select{width:100%;padding:12px;border-radius:12px;border:1px solid #1f2937;background:#0b1220;color:var(--fg);outline:none}
button,.btn{display:inline-block;padding:10px 16px;border-radius:12px;border:0;background:var(--accent);color:#0b1220;font-weight:700;cursor:pointer}
.btn:hover{filter:brightness(1.05)}
.btn-secondary{background:var(--muted);color:#e5e7eb}
.btn-secondary:hover{filter:brightness(1.08)}

/* Bouton Télécharger (client) bleu */
.btn-download{display:inline-block;padding:10px 16px;border-radius:12px;border:0;background:#3b82f6;color:#fff;font-weight:700;cursor:pointer;text-align:center}
.btn-download:hover{filter:brightness(1.08)}
/* Reset & Export (admin) */
.btn-reset{display:inline-block;padding:10px 16px;border-radius:12px;border:0;background:#3b82f6;color:#fff;font-weight:700;cursor:pointer}
.btn-reset:hover{filter:brightness(1.08)}
.btn-export{display:inline-block;padding:10px 16px;border-radius:12px;border:0;background:#a855f7;color:#fff;font-weight:700;cursor:pointer}
.btn-export:hover{filter:brightness(1.08)}

.grid{display:grid;gap:16px}
.form-row{display:grid;gap:12px}
@media(min-width:720px){.form-row{grid-template-columns:1fr 1fr 1fr}}
.nav{display:flex;gap:10px;align-items:center;margin-bottom:16px}
.nav a{padding:8px 12px;background:#0b1220;border-radius:10px}
.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:10px;border-bottom:1px solid #1f2937;text-align:left;vertical-align:middle}
.table th{user-select:none;white-space:nowrap}
.alert{padding:12px;background:#0b1220;border-left:4px solid var(--accent);border-radius:8px;margin-bottom:12px}
video{width:100%;border-radius:12px;background:#000}
.footer{opacity:.7;font-size:.9em;margin-top:20px}

/* Tri flèches */
.sort-group{display:inline-flex;gap:6px;align-items:center;margin-left:6px}
.sort-arrow{font-size:.9em;opacity:.5;padding:2px 4px;border-radius:6px;cursor:pointer;background:#0b1220}
.sort-arrow:hover{opacity:.9}
.sort-arrow.active{opacity:1;background:#123;outline:1px solid #1f2937;color:#93c5fd}

/* Mini barres de progression dans la file */
.rowbar{height:8px;background:#0b1220;border-radius:8px;overflow:hidden}
.rowbar>div{height:8px;width:0;background:#22c55e}

/* MODAL (pop-up) */
.modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.55);display:none;align-items:center;justify-content:center;z-index:1000}
.modal{background:#0b1220;border:1px solid #1f2937;border-radius:16px;max-width:720px;width:94%;padding:18px;box-shadow:0 20px 60px rgba(0,0,0,.6)}
.modal h3{margin:0 0 8px}
.modal p{opacity:.85}
.modal .actions{display:flex;gap:10px;justify-content:flex-end;margin-top:14px}

/* Onglets dashboard client */
.tabs{display:flex;gap:8px;margin-bottom:12px}
.tab{padding:8px 12px;border-radius:10px;background:#0b1220;cursor:pointer}
.tab.active{background:#123;color:#93c5fd}

/* ===== Barre de filtres (admin + client) ===== */
.filters-bar{
  display:flex;align-items:center;gap:10px;
  background:#1e293b;padding:12px 16px;border-radius:12px;margin-bottom:20px;
  box-shadow:0 2px 6px rgba(0,0,0,.25)
}
@media (max-width:820px){
  .filters-bar{flex-wrap:wrap}
  .filters-bar > *{flex:1 1 240px}
}
.filters-item{display:flex;flex-direction:column;gap:4px}
.filters-bar .label{font-size:12px;opacity:.8;display:block;margin:0 0 4px 2px}
.filters-bar select,
.filters-bar input[type="text"],
.filters-bar input[type="search"]{
  padding:10px 14px;border:1px solid #334155;border-radius:8px;background:#0f172a;color:#fff;font-size:14px;min-width:180px;
  transition:border-color .2s, box-shadow .2s
}
.filters-bar select:focus,
.filters-bar input[type="text"]:focus,
.filters-bar input[type="search"]:focus{
  outline:none;border-color:#3b82f6;box-shadow:0 0 0 2px rgba(59,130,246,.4)
}
.filters-bar .btn,
.filters-bar .btn-reset,
.filters-bar .btn-export{
  padding:10px 16px;border-radius:8px;font-weight:700;color:#fff;cursor:pointer;
  transition:transform .15s, box-shadow .15s, filter .15s;white-space:nowrap
}
.filters-bar .btn:hover,
.filters-bar .btn-reset:hover,
.filters-bar .btn-export:hover{
  transform:translateY(-1px);box-shadow:0 4px 10px rgba(0,0,0,.25)
}
.filters-bar .btn{background:#22c55e}
.filters-bar .btn-reset{background:#3b82f6}
.filters-bar .btn-export{background:#a855f7}

/* ===== Panneau de filtres repliable (bouton + état) ===== */
#toggleFilters .chev{transition:transform .2s;display:inline-block}
#toggleFilters.open .chev{transform:rotate(180deg)}
.filters-bar.hidden{display:none}

/* Petit ajustement pour la rangée d’actions en tête */
.actions-row{display:grid;gap:12px;align-items:end}
@media(min-width:720px){.actions-row{grid-template-columns:1fr 1fr auto auto}}

/* Style du bouton "Tous DL" pour qu’il ressemble au bouton Télécharger */
.btn-download-all {background: #3b82f6;color: #fff;border: none;border-radius: 8px;padding: 6px 14px;font-weight: 600;transition: background .2s;}
