/* Flash Transfert — thème « coucher de soleil » : site blanc, barre du haut en dégradé orange → rose */
/* Polices hébergées sur le site (licence OFL) */
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/bricolage-grotesque-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }

:root {
  --bg: #ffffff;
  --page: #fafafc;
  --card: #ffffff;
  --card-2: #f6f6f9;
  --line: #e7e7ee;
  --text: #1a1320;
  --muted: #6b6b78;
  --accent: #e8366a;
  --accent-rgb: 232, 54, 106;
  --grad: linear-gradient(135deg, #ff8a3d 0%, #f4506b 50%, #c2185b 100%);
  --danger: #e11d48;
  --ok: #16a34a;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 20, 40, .04), 0 8px 28px -12px rgba(20, 20, 40, .12);
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --ink: #1a1320;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
a { color: var(--accent); text-decoration: none; }
.hidden { display: none !important; }
h1, h2, h3, .brand { font-family: var(--display); }
.muted { color: var(--muted); line-height: 1.5; }
.center { text-align: center; }

/* halo d'ambiance (très léger sur fond blanc) */
.bg-glow {
  position: fixed; inset: -20vh -20vw auto; height: 70vh; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 20%, rgba(255, 138, 61, .10), rgba(244, 80, 107, .06) 40%, transparent 65%);
  animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .6; transform: scale(1.05); } }

/* barre du haut : blanche, logo + nom au centre, fin liseré en dégradé dessous */
.topbar {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 88px; padding: 0 clamp(16px, 4vw, 48px); margin-bottom: 10px;
  background: rgba(250, 250, 252, .94); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
/* barre de la même couleur que le fond, sans séparation */
.brand { grid-column: 2; display: flex; align-items: center; gap: 13px; color: var(--ink); font-size: 30px; font-weight: 800; letter-spacing: -.035em; }
.brand img { width: 48px; height: 48px; border-radius: 13px; box-shadow: 0 6px 16px -6px rgba(var(--accent-rgb), .6); transition: transform .3s cubic-bezier(.2, 1.4, .4, 1); }
.brand:hover img { transform: translate(2px, -2px) rotate(-6deg); }
.brand b { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
h1 b { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tb-side { display: flex; align-items: center; gap: 4px; }
.tb-left { grid-column: 1; justify-self: start; }
.tb-right { grid-column: 3; justify-self: end; }
.tb-side a { position: relative; color: var(--muted); padding: 10px 14px; font-size: 15px; font-weight: 600; transition: color .2s; }
.tb-side a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--grad); transform: scaleX(0); transition: transform .25s; }
.tb-side a:hover { color: var(--ink); }
.tb-side a.on { color: var(--ink); }
.tb-side a.on::after, .tb-side a:hover::after { transform: scaleX(1); }
body.home .tb-left { visibility: hidden; }
@media (max-width: 640px) {
  .topbar { grid-template-columns: 1fr auto; min-height: 68px; }
  .brand { grid-column: 1; justify-self: start; font-size: 22px; gap: 10px; }
  .brand img { width: 36px; height: 36px; }
  .tb-left { grid-column: 2; grid-row: 1; justify-self: end; }
  .tb-right { display: none; }
  .tb-side a { padding: 8px 10px; font-size: 14px; }
}

main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px) 40px; }

/* accueil */
.hero { text-align: center; padding: 6vh 0 30px; }
.hero-logo { display: inline-block; animation: fly-in .9s cubic-bezier(.2, 1.3, .4, 1) both; }
.hero-logo img { border-radius: 28px; box-shadow: 0 18px 50px -14px rgba(232, 54, 106, .55); animation: float 4s ease-in-out 1s infinite; }
@keyframes fly-in { from { opacity: 0; transform: translate(-40px, 40px) scale(.5) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes float { 50% { transform: translate(4px, -6px); } }
.hero h1 { font-size: clamp(40px, 8vw, 72px); letter-spacing: -.045em; margin: 18px 0 8px; font-weight: 800; animation: rise .7s .15s both; }
.tagline { color: var(--muted); font-size: clamp(16px, 2.2vw, 19px); line-height: 1.55; animation: rise .7s .25s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 38px auto 0; max-width: 640px; }
.choice-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px; color: var(--text); box-shadow: var(--shadow);
  overflow: hidden; transition: transform .25s, border-color .25s, box-shadow .25s; animation: rise .7s .35s both;
}
.choice-card:nth-child(2) { animation-delay: .45s; }
.choice-card::before {
  content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255, 138, 61, .12) 50%, transparent 60%);
  transform: translateX(-100%); transition: transform .7s;
}
.choice-card:hover { transform: translateY(-4px); border-color: rgba(var(--accent-rgb), .45); box-shadow: 0 18px 44px -16px rgba(var(--accent-rgb), .45); }
.choice-card:hover::before { transform: translateX(100%); }
.choice-card strong { font-size: 22px; }
.choice-card small { color: var(--muted); }
.ic { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--grad); box-shadow: 0 8px 20px -8px rgba(var(--accent-rgb), .6); }
.ic svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.drop svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.steps, .trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 56px; }
.step, .trust > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.step span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; }
.step h3 { margin: 12px 0 6px; font-size: 17px; }
.step p, .trust p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.trust { margin-top: 14px; }
.trust b { display: block; margin-bottom: 6px; }
.get-app { text-align: center; margin-top: 40px; }

/* panneaux */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: clamp(20px, 4vw, 40px); margin-top: 20px; box-shadow: var(--shadow); animation: rise .5s both; }
.panel h2 { margin: 0 0 14px; font-size: clamp(22px, 3.4vw, 30px); letter-spacing: -.03em; }
.stage { animation: rise .4s both; }

.progress-steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 26px; }
.progress-steps li { flex: 1; font-size: 12.5px; color: var(--muted); padding-top: 10px; border-top: 3px solid var(--line); transition: .3s; }
.progress-steps li.on { color: var(--text); border-image: var(--grad) 1; }

.drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 42px 20px; cursor: pointer;
  border: 2px dashed #d6d6e0; border-radius: 22px; background: var(--card-2); transition: .2s; text-align: center;
}
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(var(--accent-rgb), .04); }
.drop.over { transform: scale(1.01); }
.drop svg { width: 38px; height: 38px; margin-bottom: 6px; }
.drop small { color: var(--muted); }

.files { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.file {
  position: relative; display: grid; grid-template-columns: 34px 1fr auto auto; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; overflow: hidden;
}
.file .fi { font-size: 20px; text-align: center; }
.file .fn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .fs { color: var(--muted); font-size: 13px; }
.file .x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 15px; padding: 4px 8px; border-radius: 8px; }
.file .x:hover { color: var(--danger); background: rgba(225, 29, 72, .08); }
.file.ok { border-color: rgba(22, 163, 74, .45); }
.file.ko { border-color: rgba(225, 29, 72, .5); }
.file.active { border-color: rgba(var(--accent-rgb), .5); }
.file.gone { opacity: .5; }
.file.gone button { cursor: not-allowed; }
.pop { animation: pop .3s both; }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
.total { color: var(--muted); font-size: 14px; }

.field { display: grid; gap: 8px; margin-top: 18px; }
.field span { font-size: 14px; color: var(--muted); }
textarea, input { font: inherit; color: var(--text); background: var(--card); border: 1px solid #dcdce4; border-radius: 14px; padding: 12px 14px; outline: none; transition: .2s; }
textarea:focus, input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .14); }
textarea { resize: vertical; }

.options { display: grid; gap: 10px; }
.opt { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); cursor: pointer; transition: .2s; }
.opt:hover { border-color: #cfcfd9; }
.opt input { accent-color: var(--accent); width: 20px; height: 20px; }
.opt span { display: grid; gap: 3px; }
.opt small { color: var(--muted); }
.opt:has(input:checked) { border-color: var(--accent); background: rgba(var(--accent-rgb), .05); }

.pin-choice { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 18px 0; }
.pin-input { font-size: 30px; letter-spacing: .5em; text-align: center; width: 260px; max-width: 100%; padding: 14px 10px 14px 24px; font-variant-numeric: tabular-nums; font-weight: 700; }

.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 24px; }
.actions.center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; padding: 13px 22px;
  font: 600 15px var(--font); cursor: pointer; border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px -10px rgba(var(--accent-rgb), .7); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 32px -8px rgba(var(--accent-rgb), .85); }
.btn-ghost { background: var(--card); color: var(--text); border-color: #dcdce4; }
.btn-ghost:hover:not(:disabled) { border-color: #c4c4d0; background: var(--card-2); }
.btn-danger { background: rgba(225, 29, 72, .07); color: var(--danger); border-color: rgba(225, 29, 72, .3); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }

.bar { height: 10px; background: var(--card-2); border-radius: 99px; overflow: hidden; margin: 18px 0 10px; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 99px; transition: width .25s; position: relative; }
.bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: sweep 1.2s linear infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.qr-wrap { width: min(320px, 80vw); margin: 18px auto; padding: 14px; background: #fff; border-radius: 22px; box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .35), 0 18px 50px -16px rgba(var(--accent-rgb), .5); animation: rise .6s both; transition: opacity .3s; }
.qr-wrap canvas { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.qr-wrap.pulse { animation: rise .6s both, qrpulse 2.4s ease-in-out .6s infinite; }
.qr-wrap.dim { opacity: .15; animation: none; }
@keyframes qrpulse { 50% { box-shadow: 0 0 0 3px rgba(255, 138, 61, .55), 0 22px 60px -14px rgba(var(--accent-rgb), .65); } }
#ready { text-align: center; }
#ready .actions { justify-content: center; }
.pin-reminder { font-size: 18px; }
.pin-reminder b { color: var(--accent); letter-spacing: .3em; font-size: 24px; }
.link-row { display: flex; gap: 8px; margin: 14px auto; max-width: 560px; }
.link-row input { flex: 1; min-width: 0; font-size: 13px; }

.howto { color: var(--muted); text-align: left; max-width: 520px; margin: 0 auto 8px; line-height: 1.7; }
.howto b { color: var(--text); }
.paste { margin-top: 26px; color: var(--muted); }
.paste summary { cursor: pointer; }

.message { margin: 16px 0; background: rgba(255, 138, 61, .06); border: 1px solid rgba(var(--accent-rgb), .3); border-radius: 16px; padding: 14px 16px; }
.msg-head { display: flex; justify-content: space-between; align-items: center; }
.message pre { white-space: pre-wrap; word-break: break-word; font: 15px/1.55 var(--font); margin: 10px 0 0; }

.fbar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--grad); width: 0; }
.done { color: var(--ok); font-weight: 600; text-align: center; margin-top: 20px; }
.error { color: var(--danger); font-weight: 500; }
.spinner { width: 42px; height: 42px; margin: 20px auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

.prose { line-height: 1.65; }
.prose h3 { margin-top: 26px; }
.prose p, .prose li { color: #3d3d48; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 22px clamp(16px, 4vw, 48px); color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); background: var(--card); }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--accent); }

@media (max-width: 560px) {
  .file { grid-template-columns: 28px 1fr auto; }
  .file .fs { display: none; }
  .actions .btn { flex: 1; }
  .link-row { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ----- compte / connexion ----- */
.inline { display: inline; margin: 0; }
.nav-user { background: var(--card-2); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 7px 12px; cursor: pointer; font: inherit; font-size: 13px; max-width: 220px; display: inline-flex; gap: 6px; }
.nav-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user:hover { color: var(--danger); border-color: rgba(225, 29, 72, .35); }
.auth { max-width: 440px; margin-left: auto; margin-right: auto; }
.auth-logo { border-radius: 16px; box-shadow: 0 12px 30px -12px rgba(var(--accent-rgb), .6); }
.auth h2 { margin-top: 10px; }
.auth-form { display: grid; gap: 4px; }
.auth-form input { width: 100%; }
.btn-block { width: 100%; margin-top: 18px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--card-2); border: 1px solid var(--line); padding: 5px; border-radius: 14px; margin: 18px 0 6px; }
.seg a { text-align: center; padding: 9px; border-radius: 10px; color: var(--muted); font-weight: 600; }
.seg a.on { background: var(--grad); color: #fff; }

/* ----- maintenance (page entière en dégradé) ----- */
body.maint { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: var(--grad); color: #fff; }
body.maint .bg-glow { display: none; }
body.maint .tagline, body.maint .muted { color: rgba(255, 255, 255, .85); }
.maint-box { text-align: center; max-width: 560px; }
.maint-box .hero-logo img { box-shadow: 0 0 0 2px rgba(255, 255, 255, .6), 0 20px 50px -14px rgba(0, 0, 0, .35); }
.maint-box h1 { font-size: clamp(32px, 6vw, 52px); letter-spacing: -.04em; margin: 20px 0 10px; }
.maint-box h1 b { color: #fff; background: none; opacity: .9; }
.maint-bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .25); overflow: hidden; margin: 28px auto 16px; max-width: 320px; }
.maint-bar i { display: block; height: 100%; width: 35%; background: linear-gradient(90deg, transparent, #fff, transparent); animation: maintsweep 1.6s ease-in-out infinite; }
@keyframes maintsweep { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* =====================================================================
   PAGE D'ACCUEIL : un choix, deux grands boutons
   ===================================================================== */
body.home main { display: flex; align-items: center; justify-content: center; }
body.home .bg-glow { display: none; }
.btn:focus-visible, a:focus-visible { outline: 3px solid rgba(var(--accent-rgb), .45); outline-offset: 3px; }
.btn-lg { padding: 16px 26px; font-size: 16px; border-radius: 16px; }

.home-choice { width: 100%; max-width: 760px; text-align: center; padding: clamp(32px, 8vh, 90px) 0 clamp(40px, 9vh, 100px); }
.home-choice h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.02; letter-spacing: -.045em; font-weight: 800; color: var(--ink); margin: 0 0 14px; animation: none; }
.home-choice .lead { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.55; margin: 0 auto 44px; max-width: 42ch; }

.big-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.big-btn {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left;
  padding: 28px 28px 26px; min-height: 210px; border-radius: 28px; color: var(--ink);
  transition: transform .25s cubic-bezier(.2, 1.2, .4, 1), box-shadow .25s;
}
.big-btn .bb-ic { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; margin-bottom: auto; }
.big-btn .bb-ic svg { width: 30px; height: 30px; }
.bb-send .bb-ic svg { width: 40px; height: 40px; }
.big-btn strong { font: 800 clamp(28px, 3.2vw, 36px)/1 var(--display); letter-spacing: -.035em; margin-top: 26px; }
.big-btn small { font-size: 15px; line-height: 1.4; }
.big-btn .bb-go { position: absolute; right: 24px; bottom: 24px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; transition: transform .25s; }
.big-btn .bb-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.big-btn:hover { transform: translateY(-4px); }
.big-btn:hover .bb-go { transform: translateX(4px); }
.big-btn:active { transform: translateY(-1px) scale(.99); }

/* Envoyer : plein dégradé */
.bb-send { background: var(--grad); color: #fff; box-shadow: 0 22px 44px -22px rgba(194, 24, 91, .75); }
.bb-send small { color: rgba(255, 255, 255, .88); }
.bb-send .bb-ic { background: rgba(255, 255, 255, .2); }
.bb-send .bb-go { background: #fff; color: var(--accent); }
.bb-send:hover { box-shadow: 0 28px 54px -22px rgba(194, 24, 91, .85); }

/* Recevoir : blanc, contour en dégradé */
.bb-recv { padding: 26px 26px 24px; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; border: 2px solid transparent; box-shadow: 0 18px 40px -26px rgba(26, 19, 32, .35); }
.bb-recv small { color: var(--muted); }
.bb-recv .bb-ic { background: rgba(var(--accent-rgb), .08); }
.bb-recv .bb-go { background: var(--grad); color: #fff; right: 22px; bottom: 22px; }
.bb-recv:hover { box-shadow: 0 26px 50px -24px rgba(var(--accent-rgb), .45); }

.home-foot { margin-top: 34px; color: var(--muted); font-size: 14.5px; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; }
.home-foot span { display: inline-flex; align-items: center; gap: 7px; }
.home-foot svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.home-foot a { font-weight: 600; }

@media (max-width: 640px) {
  .big-choice { grid-template-columns: 1fr; }
  .big-btn { min-height: 168px; }
  .big-btn strong { margin-top: 18px; }
}

/* ----- aperçus des photos dans les listes ----- */
.file { grid-template-columns: 52px 1fr auto auto; }
.file .fi { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: var(--card-2); overflow: hidden; }
.file .fi.has-thumb { background: none; }
.file .fi a, .file .fi img { display: block; width: 100%; height: 100%; }
.file .fi img { object-fit: cover; border-radius: 12px; transition: transform .25s; }
.file .fi a:hover img { transform: scale(1.06); }
.file .fi.loading { background: linear-gradient(100deg, var(--card-2) 30%, #fff 50%, var(--card-2) 70%); background-size: 300% 100%; animation: shimmer 1.2s linear infinite; color: transparent; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (max-width: 560px) { .file { grid-template-columns: 46px 1fr auto; } .file .fi { width: 46px; height: 46px; } }

/* ----- vignettes cliquables + visionneuse plein écran ----- */
.file .fi.media { cursor: zoom-in; position: relative; }
.file .fi.video::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(26, 19, 32, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 7v10l8-5z'/%3E%3C/svg%3E") center / 16px no-repeat;
  pointer-events: none;
}
.file .fi video { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }
.file .fi.media:hover img, .file .fi.media:hover video { transform: scale(1.06); }
.file .fi img, .file .fi video { transition: transform .25s; }
.expired { margin: 6px 0 14px; padding: 14px 16px; border-radius: 14px; background: #fff4f6; border: 1px solid rgba(225, 29, 72, .25); color: var(--danger); font-weight: 600; }

body.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(14, 10, 18, .97); display: grid; grid-template-columns: 64px 1fr 64px; grid-template-rows: auto 1fr; animation: lbin .2s ease-out; }
@keyframes lbin { from { opacity: 0; } }
.lb.hidden { display: none; }
.lb-top { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; color: #fff; }
.lb-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.lb-x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font-size: 18px; cursor: pointer; }
.lb-x:hover { background: rgba(255, 255, 255, .22); }
.lb-top { grid-row: 1; }
.lb-prev { grid-column: 1; grid-row: 2; }
.lb-next { grid-column: 3; grid-row: 2; }
.lb-stage { grid-column: 2; grid-row: 2; display: grid; place-items: center; min-height: 0; min-width: 0; padding: 0 0 24px; }
.lb-media { max-width: min(100%, 1400px); max-height: calc(100vh - 110px); object-fit: contain; border-radius: 10px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); background: #000; }
.lb-nav { align-self: center; justify-self: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.lb-nav:hover { background: rgba(255, 255, 255, .25); }
.lb-msg { color: rgba(255, 255, 255, .85); text-align: center; }
.lb-load { text-align: center; }
.lb .btn-white { color: var(--accent); }
@media (max-width: 640px) {
  .lb { grid-template-columns: 0 1fr 0; }
  .lb-nav { position: absolute; bottom: 18px; }
  .lb-prev { left: 18px; } .lb-next { right: 18px; }
}
.btn-white { background: #fff; color: var(--accent); border-color: transparent; }
.btn-white:hover { background: #fff5f7; }
