/* Convertisseur vidéo et audio — ServicesHub.ca : palette du hub */
: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; }
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); }
code { background: rgba(0,0,0,.35); border-radius: 4px; padding: 1px 4px; font-size: 13px; }
[hidden] { display: none !important; }
.indice { color: var(--doux); font-size: 13px; margin: 0; }
.ligne { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

#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: var(--menthe); font-weight: 600; }

.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; }

.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); }
.groupe-titre { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--doux); margin: 4px 0 6px; }
.formats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.formats button { min-width: 74px; 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(165px, 1fr)); gap: 12px; }
.options label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--doux); }
.cases { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.case { display: flex; align-items: baseline; gap: 8px; cursor: pointer; }
.case input { accent-color: var(--ciel); }

.entete-liste { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.entete-liste h2 { margin: 0; }
#etatMoteur { min-height: 1.2em; margin-bottom: 8px; }
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.liste .vide { color: var(--doux); padding: 12px 0; }
.fichier { padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--ligne); }
.fichier.fini { border-color: rgba(52,211,153,.5); }
.fichier.erreur { border-color: rgba(248,113,113,.55); }
.fichier .haut { display: flex; align-items: center; gap: 10px; }
.fichier .icone-type { font-size: 22px; flex: none; }
.fichier .nom { flex: 1; min-width: 0; }
.fichier .nom b { display: block; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fichier .nom small { color: var(--doux); }
.fichier .actions { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.fichier .actions button, .fichier .actions .bouton { padding: 5px 11px; font-size: 13px; }
.barre { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); margin-top: 10px; overflow: hidden; }
.barre i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--bleu), var(--ciel)); transition: width .3s; }
.fichier.indetermine .barre i { width: 30% !important; animation: va-vient 1.2s ease-in-out infinite alternate; }
@keyframes va-vient { from { margin-left: 0; } to { margin-left: 70%; } }
.fichier .statut { font-size: 13px; color: var(--doux); margin-top: 6px; }
.fichier.fini .statut { color: var(--menthe); }
.fichier.erreur .statut { color: #ffb4b4; }
.fichier details { margin-top: 6px; font-size: 12px; color: var(--doux); }
.fichier details pre { white-space: pre-wrap; word-break: break-all; max-height: 220px; overflow: auto; background: rgba(0,0,0,.35); padding: 8px; border-radius: 6px; margin: 6px 0 0; }
.apercu { margin-top: 10px; }
.apercu video, .apercu audio, .apercu img { display: block; max-width: 100%; max-height: 360px; border-radius: 8px; background: #000; }
.apercu audio { width: 100%; background: none; }

.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; }
  .fichier .haut { flex-wrap: wrap; }
  .fichier .actions { width: 100%; justify-content: flex-start; }
}
