/* Compresseur et décompresseur — ServicesHub.ca : palette du hub (même base que le Convertisseur) */
:root {
  --nuit: #070d24; --nuit-2: #0d1838; --nuit-3: #14225a; --bleu: #2f6bff; --ciel: #38bdf8; --lis: #f6c744;
  --menthe: #34d399; --rouge: #f87171; --texte: #dbe4ff; --doux: #93a3d1; --ligne: rgba(255,255,255,.12); --verre: rgba(255,255,255,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--nuit); color: var(--texte); font: 15px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
body { min-height: 100vh; background: radial-gradient(900px 500px at 85% -10%, rgba(47,107,255,.25), transparent 60%), var(--nuit); }
a { color: var(--ciel); }
h2 { font-size: 16px; margin: 0 0 12px; color: #fff; }
h3 { font-size: 15px; margin: 16px 0 4px; color: #fff; }
button, input, select { font: inherit; color: inherit; }
button, .bouton { background: var(--verre); border: 1px solid var(--ligne); border-radius: 8px; padding: 7px 14px; cursor: pointer; white-space: nowrap; text-decoration: none; color: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button:hover, .bouton:hover { border-color: var(--ciel); }
button:disabled { opacity: .45; cursor: default; border-color: var(--ligne); }
button.principal { background: var(--bleu); border-color: var(--bleu); color: #fff; font-weight: 600; padding: 8px 20px; }
button.principal:hover:not(:disabled) { background: #4a7fff; }
button.danger { color: #ffb4b4; }
button.icone { padding: 6px 11px; }
.bouton.telecharger { background: var(--menthe); border-color: var(--menthe); color: #052e1f; font-weight: 600; padding: 9px 20px; }
select, input[type=text] { width: 100%; background: var(--nuit-2); border: 1px solid var(--ligne); border-radius: 8px; padding: 8px 10px; color: var(--texte); }
input[type=text]::placeholder { color: #5f6f9d; }
select:focus, input:focus { outline: none; border-color: var(--ciel); }
[hidden] { display: none !important; }
.indice { color: var(--doux); font-size: 13px; margin: 0; }
.ligne { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.alerte { padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(248,113,113,.55); background: rgba(248,113,113,.1); color: #ffd0d0; }

#entete { position: sticky; top: 0; z-index: 5; height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 16px; background: rgba(13,24,56,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ligne); }
.retour { color: var(--doux); text-decoration: none; font-size: 13px; white-space: nowrap; }
.retour:hover { color: #fff; }
.marque { font-size: 17px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marque b { color: var(--ciel); }

.cadre { width: min(940px, 94vw); margin: 0 auto; padding: 22px 0 40px; }
.intro { font-size: 16px; margin: 0 0 18px; }
.intro b { color: #fff; }
.intro em { color: var(--menthe); font-style: normal; font-weight: 600; }

.onglets { display: flex; gap: 6px; margin-bottom: 16px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--ligne); width: fit-content; }
.onglets button { border: 0; background: none; padding: 8px 18px; border-radius: 9px; color: var(--doux); font-weight: 600; }
.onglets button.actif { background: var(--bleu); color: #fff; }

.depot { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 30px 16px; border: 2px dashed rgba(56,189,248,.45); border-radius: 16px; background: rgba(56,189,248,.05); cursor: pointer; text-align: center; transition: background .2s, border-color .2s; }
.depot:hover, .depot:focus, .depot.survol { background: rgba(56,189,248,.12); border-color: var(--ciel); outline: none; }
.depot b { font-size: 17px; color: #fff; }
.depot span { color: var(--doux); }
.depot .depot-icone { font-size: 28px; color: var(--ciel); line-height: 1; }
.sous-depot { justify-content: center; margin-top: 10px; }

.panneau { margin-top: 18px; padding: 18px; border-radius: 16px; background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); border: 1px solid var(--ligne); }
.formats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.formats button { min-width: 84px; font-weight: 600; }
.formats button.actif { background: rgba(47,107,255,.35); border-color: var(--ciel); color: #fff; }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 14px; }
.options label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--doux); }
.champ-ext { display: flex; align-items: stretch; }
.champ-ext input { border-radius: 8px 0 0 8px; }
.champ-ext i { font-style: normal; display: flex; align-items: center; padding: 0 10px; background: var(--nuit-3); border: 1px solid var(--ligne); border-left: 0; border-radius: 0 8px 8px 0; color: var(--texte); }

.entete-liste { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.entete-liste h2 { margin: 0; }
.titre-archive { min-width: 0; flex: 1; }
.titre-archive h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; max-height: 460px; overflow-y: auto; overflow-x: hidden; }
.liste .vide, .liste .plus { color: var(--doux); padding: 8px 2px; }
.element { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: rgba(0,0,0,.22); border: 1px solid var(--ligne); }
.element .ic { flex: none; width: 22px; text-align: center; }
.element .nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.element .nom .dos { color: var(--doux); }
.element .meta { flex: none; color: var(--doux); font-size: 13px; text-align: right; }
.element button { flex: none; padding: 3px 10px; font-size: 13px; }
.element.dossier .nom { color: var(--doux); }
.actions-archive { margin: 14px 0 6px; }
.actions-archive input { flex: 1; min-width: 180px; width: auto; }
#etatD { min-height: 1.2em; }

.progres { margin-top: 10px; }
.barre { height: 7px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.barre i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--bleu), var(--ciel)); transition: width .25s; }
.progres .statut { font-size: 13px; color: var(--doux); margin: 6px 0 0; }
.resultat { margin-top: 12px; padding: 14px; border-radius: 12px; border: 1px solid rgba(52,211,153,.5); background: rgba(52,211,153,.07); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.resultat.erreur { border-color: rgba(248,113,113,.55); background: rgba(248,113,113,.08); color: #ffd0d0; }
.resultat .infos { flex: 1; min-width: 200px; }
.resultat .infos b { color: #fff; word-break: break-all; }

.credit { margin-top: 22px; text-align: center; }

dialog { background: var(--nuit-2); color: var(--texte); border: 1px solid var(--ligne); border-radius: 14px; padding: 0; width: min(640px, 94vw); max-height: 86vh; }
dialog::backdrop { background: rgba(0,0,0,.6); }
.dh { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--ligne); font-weight: 600; color: #fff; }
.db { padding: 4px 18px 18px; overflow-y: auto; }
.db p { margin: 0 0 6px; }
.fermer { padding: 3px 9px; }

#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--nuit-3); border: 1px solid var(--ligne); border-radius: 10px; padding: 10px 16px; box-shadow: 0 10px 40px rgba(0,0,0,.45); z-index: 20; max-width: 92vw; }

@media (max-width: 600px) {
  .retour { display: none; }
  .element .meta .date { display: none; }
  .onglets { width: 100%; }
  .onglets button { flex: 1; }
}
