/* kTransfer — look kMeet : surfaces navy, rampe violette Kryll, aurora. */

@font-face {
  font-family: "PP Fragment";
  src: url("/_/PPFragment-TextRegular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --kryll-50: #f3edff;
  --kryll-100: #e4d5ff;
  --kryll-200: #c8aeff;
  --kryll-300: #a78bfa;
  --kryll-400: #8b5cf6;
  --kryll-500: #7c45f0;
  --kryll-600: #6933ff;
  --kryll-700: #4a20b0;
  --kryll-800: #350f74;
  --kryll-900: #220950;

  --surface-0: #05111a;
  --surface-1: #0c1422;
  --surface-2: #141b2e;
  --surface-3: #1f253d;

  --fg: rgb(245 243 250);
  --fg-55: rgba(255, 255, 255, 0.55);
  --fg-40: rgba(255, 255, 255, 0.4);
  --fg-30: rgba(255, 255, 255, 0.3);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --fill: rgba(255, 255, 255, 0.04);
  --fill-hover: rgba(255, 255, 255, 0.08);

  --font-display: "PP Fragment", "Geist", Georgia, serif;
  --font-sans: "Geist", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", "SF Mono", Menlo, monospace;

  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--surface-0);
  color: var(--fg);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; }
button { font: inherit; color: inherit; }
code { font-family: var(--font-mono); font-size: 0.92em; color: var(--kryll-200); }

/* ---------- Aurora ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--surface-0);
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
  mix-blend-mode: screen;
}
.blob-a {
  top: -10%; left: -5%; width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(124, 69, 240, 0.55), transparent 65%);
  animation: drift-a 32s ease-in-out infinite;
}
.blob-b {
  top: 30%; right: -10%; width: 65%; height: 65%;
  background: radial-gradient(circle, rgba(200, 174, 255, 0.3), transparent 65%);
  animation: drift-b 38s ease-in-out infinite;
}
.blob-c {
  bottom: -15%; left: 25%; width: 55%; height: 55%;
  background: radial-gradient(circle, rgba(74, 32, 176, 0.5), transparent 65%);
  animation: drift-c 44s ease-in-out infinite;
}
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
}
@keyframes drift-a { 0%, 100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(6%,-4%,0) scale(1.1); } }
@keyframes drift-b { 0%, 100% { transform: translate3d(0,0,0) scale(1.05); } 50% { transform: translate3d(-7%,5%,0) scale(0.95); } }
@keyframes drift-c { 0%, 100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(4%,8%,0) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

/* ---------- Layout ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
}
@media (min-width: 768px) { .top { padding: 20px 40px; } }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; transition: transform 150ms ease; }
.brand:hover img { transform: scale(1.05); }
.brand-name { font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.brand-by {
  display: none;
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-40);
}
@media (min-width: 768px) { .brand-by { display: inline; } }

.top-right { display: flex; align-items: center; gap: 10px; }
.zone-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--kryll-200);
  background: rgba(124, 69, 240, 0.14);
  border: 1px solid rgba(124, 69, 240, 0.35);
  border-radius: 999px;
  padding: 5px 11px;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 64px;
}
@media (min-width: 768px) { .main { padding: 64px 40px 80px; } }
.main > section { width: 100%; max-width: 44rem; }

.foot {
  display: flex;
  justify-content: space-between;
  padding: 0 24px 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-30);
}
@media (min-width: 768px) { .foot { padding: 0 40px 24px; } }
.foot .mono { text-transform: uppercase; letter-spacing: 0.14em; }

/* ---------- Typo ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(167, 139, 250, 0.8);
  margin-bottom: 20px;
}
.eyebrow-sm {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-40);
}
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 8vw, 68px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.grad {
  font-style: italic;
  background: linear-gradient(90deg, var(--kryll-200), var(--kryll-400), var(--kryll-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-55);
  max-width: 36rem;
  margin: 0 0 40px;
}
@media (min-width: 768px) { .lede { font-size: 18px; } }
.mono-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-40);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--fill);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, filter 120ms ease;
}
.btn:hover { background: var(--fill-hover); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; }
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--fg-55);
}
.btn-icon svg { width: 16px; height: 16px; }
.btn-icon:hover { color: var(--fg); }
.btn-icon.danger:hover { color: #fca5a5; border-color: rgba(252, 165, 165, 0.35); background: rgba(127, 29, 29, 0.25); }

.btn-kryll {
  border: none;
  color: #fff;
  background-image: linear-gradient(135deg, var(--kryll-500), var(--kryll-700));
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.12) inset,
    0 8px 24px -8px rgba(124, 69, 240, 0.55),
    0 2px 6px -2px rgba(124, 69, 240, 0.3);
}
.btn-kryll:hover {
  filter: brightness(1.08);
  background-image: linear-gradient(135deg, var(--kryll-500), var(--kryll-700));
  box-shadow:
    0 1px 0 0 rgba(255, 255, 255, 0.18) inset,
    0 10px 32px -8px rgba(124, 69, 240, 0.7),
    0 4px 10px -2px rgba(124, 69, 240, 0.45);
}
.btn-kryll:active { transform: translateY(1px); }

.link { color: var(--kryll-200); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- Glass / cards ---------- */
.glass-strong {
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  background-color: rgba(20, 12, 36, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.card {
  background: var(--fill);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

/* ---------- Drop zone ---------- */
.drop {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--fill);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.drop:hover, .drop:focus-visible {
  border-color: rgba(124, 69, 240, 0.6);
  background: rgba(255, 255, 255, 0.06);
}
.drop.over {
  border-color: var(--kryll-400);
  border-style: solid;
  background: rgba(124, 69, 240, 0.12);
  box-shadow: 0 0 0 4px rgba(124, 69, 240, 0.15), 0 20px 60px -20px rgba(124, 69, 240, 0.6);
}
.drop-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.drop-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background-image: linear-gradient(135deg, var(--kryll-500), var(--kryll-700));
  box-shadow: 0 8px 24px -8px rgba(124, 69, 240, 0.7);
  margin-bottom: 6px;
}
.drop-icon svg { width: 22px; height: 22px; }
.drop-text { font-size: 15px; color: var(--fg-55); }
.drop-text strong { color: var(--fg); font-weight: 500; }

/* ---------- Uploads ---------- */
.uploads { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.upload {
  background: var(--fill);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.upload-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 13px; }
.upload-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload.error { border-color: rgba(252, 165, 165, 0.4); }
.upload.error .upload-status { color: #fca5a5; }
.upload.done .bar-fill { background: linear-gradient(90deg, #34d399, #10b981); }
.bar { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--kryll-300), var(--kryll-500));
  transition: width 150ms linear;
}

/* ---------- Files list ---------- */
.list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 40px 0 12px;
}
.files { display: flex; flex-direction: column; gap: 6px; }
.file {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--fill);
  transition: background 120ms ease, border-color 120ms ease;
}
.file:hover { background: var(--fill-hover); border-color: var(--line-strong); }
.file-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--kryll-100);
  background: rgba(124, 69, 240, 0.18);
  border: 1px solid rgba(124, 69, 240, 0.3);
}
.file-main { min-width: 0; }
.file-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-name:hover { color: var(--kryll-200); }
.file-meta {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-40);
  display: flex;
  gap: 6px;
}
.file-actions { display: flex; gap: 6px; }
.empty {
  padding: 28px 20px;
  text-align: center;
  color: var(--fg-40);
  font-size: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
}

/* ---------- Wanted (arrivée via lien direct) ---------- */
.wanted {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-color: rgba(124, 69, 240, 0.4);
  background: rgba(124, 69, 240, 0.1);
}
.wanted.missing { border-color: rgba(252, 165, 165, 0.35); background: rgba(127, 29, 29, 0.18); }
.wanted-title { font-weight: 500; font-size: 15px; }
.wanted-sub { margin-top: 3px; }

/* ---------- API ---------- */
.api {
  margin-top: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--fill);
}
.api summary {
  cursor: pointer;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  list-style: none;
}
.api summary::-webkit-details-marker { display: none; }
.api pre {
  margin: 0;
  padding: 4px 16px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--fg-55);
  white-space: pre-wrap;
  word-break: break-all;
}
.api pre .c { color: var(--fg-30); }
.api pre .k { color: var(--kryll-200); }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 17, 26, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-card {
  width: 100%;
  max-width: 24rem;
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}
.modal-title { margin: 0 0 4px; font-size: 20px; font-weight: 500; }
.modal-sub { margin: 0; font-size: 14px; color: rgb(156 163 175); }
.modal-foot { margin: 0; font-size: 12px; color: rgb(107 114 128); text-align: center; }
.modal input {
  width: 100%;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
  outline: none;
}
.modal input::placeholder { color: rgb(107 114 128); font-family: var(--font-sans); }
.modal input:focus { box-shadow: 0 0 0 2px var(--kryll-500); }
.error {
  margin: 0;
  font-size: 13px;
  color: #fca5a5;
  background: rgba(69, 10, 10, 0.4);
  border: 1px solid rgba(127, 29, 29, 0.5);
  border-radius: 6px;
  padding: 8px 12px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 60;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: rgba(20, 12, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  animation: toast-in 180ms ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

[hidden] { display: none !important; }
