/* Transfert — styles propres (le thème commun vient de theme.css, identique à JellyParty) */
body { min-height: 100vh; }
.top { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: rgba(8,8,12,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.top .spacer { flex: 1; }
.logo .mark svg { margin-left: 0; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.4px; margin: 0; }
h2 { font-size: 20px; }
.err { color: var(--err); font-size: 13.5px; min-height: 18px; margin: 10px 0 0; }
.hidden { display: none !important; }
.small { font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; }

/* Connexion */
.login { position: relative; z-index: 1; min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 24px; }
.login .glass { width: min(400px, 100%); padding: 30px; }
.login h2 { margin-bottom: 6px; }
.login p { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.login .row { display: flex; gap: 8px; }

/* Mise en page admin */
.wrap { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 28px 24px 60px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .wrap { grid-template-columns: 1fr; } }
.panel { padding: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }

/* Zone de dépôt */
.drop { display: block; position: relative; border: 1.5px dashed var(--line2); border-radius: var(--radius); padding: 38px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; background: rgba(255,255,255,.02); }
.drop:hover, .drop.over { border-color: rgba(217,70,239,.75); background: rgba(139,92,246,.08); }
.drop .icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(217,70,239,.3); }
.drop .icon svg { width: 26px; height: 26px; fill: #fff; }
.drop strong { display: block; font-family: var(--font-display); font-size: 18px; margin-bottom: 4px; }
.drop span { color: var(--muted); font-size: 14px; }
.drop input { display: none; }

/* Liste de fichiers */
.files { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow: auto; }
.files li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.files .ext { width: 36px; height: 36px; border-radius: 9px; background: var(--surface2); display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; flex-shrink: 0; letter-spacing: .3px; overflow: hidden; }
.files .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; }
.files .size { color: var(--muted); font-size: 13px; white-space: nowrap; }
.iconbtn { width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent; color: var(--dim); cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.iconbtn:hover { background: var(--surface2); color: var(--txt); }
.iconbtn svg { width: 16px; height: 16px; fill: currentColor; }
.iconbtn.danger:hover { color: var(--err); background: rgba(248,113,113,.1); }
.iconbtn.armed { color: #fff; background: var(--err); }

/* Options */
.opts { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.opt-row label.lbl { font-size: 14px; font-weight: 500; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); }
.seg button { border: none; background: transparent; padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--surface3); color: var(--txt); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 500; user-select: none; }
.switch input { display: none; }
.switch .track { width: 38px; height: 22px; border-radius: 99px; background: var(--surface3); position: relative; transition: background .15s; flex-shrink: 0; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .track { background: var(--grad); }
.switch input:checked + .track::after { transform: translateX(16px); }
textarea.field { resize: vertical; min-height: 64px; }
.send-row { margin-top: 20px; display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; }
.send-row .muted { font-size: 13.5px; }

/* Progression */
.progress { margin-top: 6px; }
.bar { height: 10px; border-radius: 99px; background: var(--surface2); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 99px; transition: width .3s ease; }
.bar.thin { height: 5px; }
.big-pct { font-family: var(--font-display); font-size: 46px; font-weight: 800; letter-spacing: -1.5px; margin: 6px 0 12px; }
.big-pct span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; margin-top: 12px; }
.stats b { color: var(--txt); font-weight: 600; }

/* Lien */
.linkbox { display: flex; gap: 8px; margin: 16px 0 10px; }
.linkbox .field { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; }
.done-icon { width: 54px; height: 54px; border-radius: 50%; background: rgba(52,211,153,.14); display: grid; place-items: center; margin-bottom: 14px; }
.done-icon svg { width: 28px; height: 28px; fill: var(--ok); }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: var(--radius-sm); background: rgba(139,92,246,.08); border: 1px solid rgba(139,92,246,.22); color: #cfc6f5; font-size: 13px; line-height: 1.5; }
.note svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; margin-top: 2px; }

/* Transferts actifs */
.list { display: flex; flex-direction: column; gap: 10px; }
.tr { padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.tr-head { display: flex; align-items: center; gap: 10px; }
.tr-title { flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.tr-meta .pill { font-size: 12px; padding: 3px 9px; }
.tr .bar { margin-top: 10px; }
.empty { color: var(--dim); font-size: 14px; text-align: center; padding: 30px 10px; border: 1px dashed var(--line); border-radius: var(--radius); }
.pill.warn { color: var(--warn); }
.pill.grad { color: #fff; background: rgba(139,92,246,.18); border-color: rgba(139,92,246,.35); }

/* Page de téléchargement */
.dl { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 28px 18px; }
.dl-card { width: min(620px, 100%); padding: 30px; }
.dl-card > .logo { margin-bottom: 26px; }
.dl-card h1 { font-size: clamp(26px, 5vw, 34px); line-height: 1.1; letter-spacing: -1px; margin-bottom: 8px; }
.dl-card h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dl-sub { color: var(--muted); font-size: 15px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.message { margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border-left: 3px solid #d946ef; white-space: pre-wrap; line-height: 1.55; font-size: 14.5px; overflow-wrap: anywhere; }
.dl .files { max-height: 380px; margin-top: 20px; }
.dl .files li { flex-wrap: wrap; }
.dl .files .bar { flex-basis: 100%; margin: 4px 0 0 48px; }
.dl .files .state { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.dl .files .state.ok { color: var(--ok); }
.dl .files .state.err { color: var(--err); white-space: normal; }
.dl-actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dl-foot { margin-top: 22px; }
.center-msg { text-align: center; padding: 10px 0; }
.center-msg .big { font-size: 42px; margin-bottom: 10px; }
.center-msg p { color: var(--muted); line-height: 1.6; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface3); border-top-color: #d946ef; animation: spin .8s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
