:root {
  --bg: #0b0f14;
  --bg-elev: #121820;
  --bg-elev-2: #18202a;
  --line: #223040;
  --text: #e6edf5;
  --muted: #8899ab;
  --accent: #29b6f6;
  --accent-soft: rgba(41, 182, 246, 0.12);
  --danger: #ef5350;
  --ok: #66bb6a;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -10%, #16222f 0%, var(--bg) 60%);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}

a {
  color: var(--accent);
}

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

/* ---------- En-tête ---------- */

header.top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.brand {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

.brand span {
  color: var(--accent);
}

.spacer {
  flex: 1;
}

.me {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: var(--muted);
}

.me img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

/* ---------- Boutons ---------- */

button {
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-elev-2);
  color: var(--text);
  padding: 8px 14px;
  transition: border-color 0.15s, background 0.15s, opacity 0.15s;
}

button:hover:not(:disabled) {
  border-color: var(--accent);
}

button:disabled {
  opacity: 0.5;
  cursor: default;
}

button.ghost {
  background: transparent;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 13px;
}

button.ghost:hover:not(:disabled) {
  color: var(--text);
}

button.danger:hover:not(:disabled) {
  border-color: var(--danger);
  color: var(--danger);
}

/* ---------- Zone d'upload ---------- */

.drop {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: 32px 24px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.drop.over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop .hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

.upload-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #06131c;
  font-weight: 600;
  padding: 11px 22px;
}

.upload-btn:hover:not(:disabled) {
  filter: brightness(1.1);
}

/* ---------- Progression ---------- */

.progress {
  margin-top: 20px;
  text-align: left;
}

.progress[hidden] {
  display: none;
}

.progress .label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 7px;
  gap: 12px;
}

.progress .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar {
  height: 6px;
  border-radius: 99px;
  background: var(--bg-elev-2);
  overflow: hidden;
}

.bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.2s;
}

/* ---------- Messages ---------- */

.msg {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid var(--line);
}

.msg[hidden] {
  display: none;
}

.msg.error {
  border-color: rgba(239, 83, 80, 0.5);
  color: #ffb4b2;
  background: rgba(239, 83, 80, 0.08);
}

.msg.ok {
  border-color: rgba(102, 187, 106, 0.5);
  color: #b6e3b8;
  background: rgba(102, 187, 106, 0.08);
}

/* ---------- Liste ---------- */

h2.section {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 36px 0 12px;
  font-weight: 600;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
}

.list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.list li:last-child {
  border-bottom: none;
}

.list li:hover {
  background: var(--bg-elev-2);
}

.file-icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  font-size: 16px;
}

.file-main {
  min-width: 0;
  flex: 1;
}

.file-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  text-decoration: none;
}

.file-name:hover {
  color: var(--accent);
}

.file-meta {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.file-meta img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Page de connexion ---------- */

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 40px 36px;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.card p {
  color: var(--muted);
  font-size: 14px;
}

.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  background: #5865f2;
  border-color: #5865f2;
  color: #fff;
  font-weight: 600;
  padding: 12px 22px;
  text-decoration: none;
  border-radius: 8px;
  border-style: solid;
  border-width: 1px;
}

.discord-btn:hover {
  filter: brightness(1.1);
}

@media (max-width: 560px) {
  .file-actions button span {
    display: none;
  }
}
