:root {
  --bg: #0f1419;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.1);
  --text: #e8eaed;
  --text-dim: #9aa0a6;
  --accent: #ff6b35;
  --accent-hover: #ff8255;
  --accent-soft: rgba(255, 107, 53, 0.12);
  --success: #4ade80;
  --error: #f87171;
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  font-feature-settings: "ss01", "cv11";
}

/* Décor de fond */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
}
.bg-blob-1 {
  width: 500px; height: 500px;
  background: var(--accent);
  top: -200px; right: -150px;
}
.bg-blob-2 {
  width: 400px; height: 400px;
  background: #6366f1;
  bottom: -150px; left: -100px;
}

.topbar {
  padding: 24px 32px;
  position: relative;
  z-index: 1;
}
.logo {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.logo span {
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  animation: fadeUp 0.5s ease-out;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin-bottom: 6px;
}
.subtitle {
  color: var(--text-dim);
  font-size: 15px;
  margin-bottom: 24px;
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dz-icon {
  font-size: 40px;
  color: var(--accent);
  margin-bottom: 12px;
  line-height: 1;
}
.dz-main {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}
.dz-sub {
  color: var(--text-dim);
  font-size: 14px;
}
.link {
  color: var(--accent);
  text-decoration: underline;
}

/* Liste fichiers */
.filelist {
  list-style: none;
  margin-bottom: 16px;
  max-height: 200px;
  overflow-y: auto;
}
.filelist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 14px;
  gap: 10px;
}
.filelist .fname {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.filelist .fsize {
  color: var(--text-dim);
  font-size: 13px;
  flex-shrink: 0;
}
.filelist .remove {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 18px;
  padding: 0 4px;
  line-height: 1;
}
.filelist .remove:hover { color: var(--error); }
.filelist .dl-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
}
.filelist .dl-link:hover { text-decoration: underline; }

/* Champs */
.fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border 0.2s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { resize: vertical; min-height: 60px; }

/* Boutons */
.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-secondary {
  background: rgba(255,255,255,0.1);
  color: var(--text);
  width: auto;
  padding: 12px 20px;
  white-space: nowrap;
}
.btn-secondary:hover { background: rgba(255,255,255,0.15); }
.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  margin-top: 12px;
}
.btn-ghost:hover { color: var(--text); }

/* Progression */
.progress-wrap { margin-top: 18px; }
.progress {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ff9b6e);
  width: 0%;
  transition: width 0.3s ease;
}
.progress-text {
  text-align: center;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-dim);
}

/* Succès */
.success { text-align: center; }
.check {
  width: 64px;
  height: 64px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px;
}
.link-box {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.link-box input { font-family: 'SF Mono', Monaco, monospace; font-size: 13px; }
.expires-info {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 8px;
}

.message-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 18px;
  font-size: 14px;
}
.message-box strong { color: var(--text-dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.message-box p { margin-top: 6px; white-space: pre-wrap; }

.error {
  color: var(--error);
  font-size: 14px;
  margin-top: 12px;
  text-align: center;
}

.hidden { display: none !important; }

.foot {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--text-dim);
  position: relative;
  z-index: 1;
}

@media (max-width: 520px) {
  .card { padding: 28px 22px; }
  h1 { font-size: 22px; }
  .topbar { padding: 18px 22px; }
}
