/* we are bandits · Transfer — style « Bandits tools » : noir, papier, rouge signal, Brockmann, pilules */
@font-face { font-family: "Brockmann"; src: url(/assets/brockmann-500.otf) format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Brockmann"; src: url(/assets/brockmann-700.otf) format("opentype"); font-weight: 700; font-display: swap; }

:root {
  --page: #0a0a0a; --card: #131313; --card2: #181818; --raised: #1f1f1f;
  --border: #2a2a2a; --border-strong: #3a3a3a;
  --text: #f5f5f2; --soft: #c4c4c1; --muted: #8c8c8c;
  --signal: #ff4d2e; --tint: rgba(255,77,46,.12);
  --ok: #7fdc9a; --warn: #ffb648; --info: #8fb3ff; --err: #ff6b57;
  --f: "Brockmann", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --r: 10px; --r-md: 16px; --r-lg: 22px; --r-pill: 999px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 500 15px/1.45 var(--f); -webkit-font-smoothing: antialiased; caret-color: var(--signal); }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 16px 16px; opacity: .35;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%); }
main, header, footer { position: relative; z-index: 1; }
::selection { background: var(--signal); color: #0a0a0a; }
h1, h2, h3 { text-wrap: balance; font-weight: 700; margin: 0; }
p { text-wrap: pretty; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* barre du haut */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px clamp(16px, 4vw, 28px);
  background: rgba(10,10,10,.9); border-bottom: 1px solid var(--border); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.top .logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.top .logo img { height: 18px; width: auto; display: block; }
.tagp { font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 4px 10px; white-space: nowrap; }
.top .right { margin-left: auto; display: flex; gap: 12px; align-items: center; font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 0; }
.top .right .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
nav.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
nav.tabs button { border: 1px solid var(--border); background: transparent; border-radius: var(--r-pill); padding: 7px 16px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); }
nav.tabs button:hover { color: var(--text); border-color: #555; }
nav.tabs button[aria-selected=true] { background: var(--text); color: var(--page); border-color: var(--text); }

.page { max-width: 1100px; margin: 0 auto; padding: clamp(28px, 6vh, 64px) clamp(16px, 4vw, 28px) 96px; }
.hero { font-size: clamp(44px, 8vw, 92px); line-height: .9; letter-spacing: -.04em; margin-bottom: 18px; }
.hero b { color: var(--signal); font-weight: 700; }
.lead { color: var(--soft); font-size: 17px; max-width: 60ch; margin: 0 0 28px; }
.label { display: block; font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 20px 0 8px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 18px; border-radius: var(--r-pill); border: 1px solid var(--text);
  background: var(--text); color: var(--page); font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none; min-height: 38px; }
.btn:hover { background: #fff; }
.btn.signal { background: var(--signal); border-color: var(--signal); color: #0a0a0a; }
.btn.signal:hover { background: #ff6a50; }
.btn.second { background: transparent; border-color: var(--border); color: var(--text); }
.btn.second:hover { border-color: #555; background: var(--card2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); border-color: var(--border); }
.btn.danger { background: transparent; border-color: #5a2a22; color: var(--err); }
.btn.danger:hover { background: var(--tint); border-color: var(--signal); }
.btn.sm { padding: 5px 12px; font-size: 12px; min-height: 30px; }
.btn.lg { padding: 13px 26px; font-size: 16px; min-height: 50px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* champs */
input[type=text], input[type=email], textarea, select { width: 100%; padding: 10px 13px; border: 1px solid var(--border); border-radius: var(--r); background: var(--page); color: var(--text); min-height: 42px; outline: 0; }
input:focus, textarea:focus, select:focus { border-color: var(--text); }
input::placeholder, textarea::placeholder { color: #6f6f6c; }
textarea { resize: vertical; min-height: 92px; }
.seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.seg button { border: 1px solid var(--border); background: transparent; border-radius: var(--r-pill); padding: 7px 15px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg button:hover { color: var(--text); border-color: #555; }
.seg button[aria-pressed=true] { background: var(--text); color: var(--page); border-color: var(--text); }

/* cartes */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); }
.pad { padding: clamp(18px, 3vw, 28px); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 820px) { .grid2 { grid-template-columns: 1fr; } }

/* zone de dépôt */
.drop { position: relative; border: 1.5px dashed var(--border-strong); border-radius: var(--r-lg); padding: 44px 20px; text-align: center; cursor: pointer;
  background: rgba(19,19,19,.6); transition: border-color .15s, background .15s; }
.drop:hover { border-color: #666; }
.drop.over { border-color: var(--signal); background: var(--tint); }
.drop .big { font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -.02em; }
.drop .plus { width: 54px; height: 54px; border-radius: 50%; background: var(--signal); color: #0a0a0a; display: grid; place-items: center; margin: 0 auto 16px; }
.drop .plus svg { width: 26px; height: 26px; stroke-width: 2.5; }
.drop .alt { margin-top: 14px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.files { list-style: none; margin: 14px 0 0; padding: 0; max-height: 340px; overflow: auto; border-top: 1px solid var(--border); }
.files li { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.files li .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files li .s { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.files li .x { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px; display: inline-flex; }
.files li .x:hover { color: var(--signal); }
.files li.done .s { color: var(--ok); }
.total { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

/* progression */
.prog { margin-top: 18px; }
.bar { height: 10px; border-radius: var(--r-pill); background: var(--card2); border: 1px solid var(--border); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--signal); transition: width .25s; }
.prog .meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.prog .pct { font-size: clamp(48px, 8vw, 80px); font-weight: 700; letter-spacing: -.04em; line-height: 1; font-family: var(--f); color: var(--text); }

/* lien final */
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--page); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 6px 6px 6px 18px; margin-top: 14px; }
.linkbox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 13px var(--mono); }
.okdot { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--ok); color: #0a0a0a; margin-bottom: 16px; }
.okdot svg { width: 26px; height: 26px; stroke-width: 2.5; }

/* historique */
.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.list td { padding: 14px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 14px; }
.list tr:last-child td { border-bottom: 0; }
.list tbody tr:hover td { background: var(--card2); }
.list .t { font-weight: 700; }
.list .sub { color: var(--muted); font-size: 12.5px; }
.list .acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.scroll-x { overflow-x: auto; }
.badge { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 9px; border-radius: var(--r-pill); border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.badge.ok { color: var(--ok); border-color: #285a37; }
.badge.warn { color: var(--warn); border-color: #5a4220; }
.badge.info { color: var(--info); border-color: #2f3f63; }
.badge.err { color: var(--err); border-color: #5a2a22; }
.empty { padding: 56px 24px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 22px; letter-spacing: -.02em; margin-bottom: 6px; }

/* page client : galerie */
.dl-head { display: flex; gap: 20px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 28px; }
.dl-head .from { color: var(--muted); font-family: var(--mono); font-size: 12.5px; margin-bottom: 14px; }
.msg { white-space: pre-wrap; color: var(--soft); font-size: 16px; max-width: 62ch; margin: 0 0 6px; border-left: 2px solid var(--signal); padding-left: 14px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.tile { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: #555; }
.tile .pv { position: relative; aspect-ratio: 4 / 3; background: #0d0d0d; display: grid; place-items: center; cursor: zoom-in; border: 0; padding: 0; width: 100%; overflow: hidden; }
.tile .pv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .pv .ext { font: 700 22px var(--f); letter-spacing: -.02em; color: var(--muted); text-transform: uppercase; }
.tile .pv .play { position: absolute; width: 46px; height: 46px; border-radius: 50%; background: rgba(10,10,10,.75); border: 1px solid rgba(245,245,242,.35); display: grid; place-items: center; }
.tile .pv .play svg { width: 18px; height: 18px; fill: var(--text); stroke: none; margin-left: 3px; }
.tile .pv .dur { position: absolute; right: 8px; bottom: 8px; font: 11px var(--mono); background: rgba(10,10,10,.8); padding: 2px 6px; border-radius: 6px; }
.tile .meta { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; }
.tile .meta .n { flex: 1; min-width: 0; }
.tile .meta .n b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .meta .n span { font: 11.5px var(--mono); color: var(--muted); }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--text); display: inline-grid; place-items: center; cursor: pointer; flex: none; text-decoration: none; }
.icon-btn:hover { background: var(--text); color: var(--page); border-color: var(--text); }

/* visionneuse */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(5,5,5,.94); display: flex; flex-direction: column; }
.lightbox .lb-top { display: flex; align-items: center; gap: 12px; padding: 14px clamp(16px, 3vw, 24px); border-bottom: 1px solid var(--border); }
.lightbox .lb-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox .lb-body { flex: 1; min-height: 0; display: grid; place-items: center; padding: clamp(8px, 2vw, 24px); position: relative; }
.lightbox iframe { width: 100%; height: 100%; border: 0; border-radius: var(--r); background: #000; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lightbox .nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox .nav.prev { left: 12px; } .lightbox .nav.next { right: 12px; }

/* divers */
.center { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--signal); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--text); color: var(--page); font-weight: 700; padding: 10px 18px; border-radius: var(--r-pill); font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.toast.err { background: var(--signal); color: #0a0a0a; }
.err-box { border: 1px solid #5a2a22; background: var(--tint); color: var(--text); padding: 12px 16px; border-radius: var(--r); margin-top: 14px; font-size: 14px; }
footer.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 32px 16px 40px; font-family: var(--mono); }
footer.foot a { color: var(--muted); }
@media (max-width: 600px) { .list .hide-m { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: 2s !important; } }

/* photo de profil */
.av { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: var(--signal); color: #0a0a0a; vertical-align: middle; box-shadow: 0 0 0 1px var(--border); }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.av-ini { font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.sender { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 6px 16px 6px 6px; border: 1px solid var(--border); border-radius: var(--r-pill); background: rgba(19,19,19,.7); }
.sender .av { box-shadow: 0 0 0 2px var(--page), 0 0 0 3px var(--signal); }
.sender b { display: block; font-size: 15px; line-height: 1.2; }
.sender span.d { display: block; font: 11.5px var(--mono); color: var(--muted); }
.who-line { display: inline-flex; align-items: center; gap: 7px; }
.top .right .av { box-shadow: 0 0 0 1px var(--border-strong); }

/* menu du compte (photo en haut à droite) */
.menu { position: relative; }
.av-btn { background: none; border: 0; padding: 0; border-radius: 50%; cursor: pointer; display: block; }
.av-btn:hover .av, .av-btn[aria-expanded=true] .av { box-shadow: 0 0 0 2px var(--page), 0 0 0 3px var(--text); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; min-width: 230px; background: var(--card); border: 1px solid var(--border-strong); border-radius: 16px; padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.6); font-family: var(--f); }
.menu-who { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-who b { display: block; color: var(--text); font-size: 14px; }
.menu-who span { display: block; font: 12px var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-pop [role=menuitem] { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 10px; padding: 9px 12px; cursor: pointer; color: var(--text); font-weight: 700; font-size: 13.5px; }
.menu-pop [role=menuitem]:hover, .menu-pop [role=menuitem]:focus-visible { background: var(--card2); color: var(--signal); outline: 0; }
/* en mobile, la barre du haut ne suit plus le défilement */
@media (max-width: 760px) { .top { position: relative; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--page); } }
.files:empty { display: none; }
