:root {
  --rose: #e31c79;
  --rose-dark: #b8155f;
  --rose-light: #fce4ef;
  --ink: #1c1c1e;
  --gray: #6b7280;
  --gray-light: #f4f4f6;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  color: var(--ink);
  background: #fafafb;
  line-height: 1.5;
}

/* ---------- Marque ---------- */
.brand { display: flex; align-items: baseline; gap: .4rem; }
.brand-mark { font-weight: 800; letter-spacing: .04em; color: var(--ink); font-size: 1.15rem; }
.brand-sub  { font-weight: 800; letter-spacing: .12em; color: var(--rose); font-size: 1.15rem; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block; border: none; border-radius: 8px; cursor: pointer;
  padding: .55rem 1rem; font-size: .9rem; font-weight: 600; text-decoration: none;
  transition: background .15s, opacity .15s;
}
.btn-primary { background: var(--rose); color: #fff; width: 100%; padding: .7rem; font-size: 1rem; }
.btn-primary:hover { background: var(--rose-dark); }
.btn-ghost { background: transparent; color: var(--gray); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--gray-light); }
.link-btn { background: none; border: none; color: var(--rose); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

/* ---------- Login ---------- */
.login-page {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: linear-gradient(135deg, #fff 0%, var(--rose-light) 100%);
}
.login-card {
  background: #fff; padding: 2.5rem; border-radius: var(--radius);
  box-shadow: var(--shadow); width: 100%; max-width: 380px;
}
.login-card .brand { justify-content: center; font-size: 1.4rem; }
.login-card .brand-mark, .login-card .brand-sub { font-size: 1.4rem; }
.login-intro { text-align: center; color: var(--gray); font-size: .9rem; margin: .5rem 0 1.5rem; }
.login-form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 1rem; color: var(--ink); }
.login-form input {
  width: 100%; margin-top: .3rem; padding: .6rem .7rem; border: 1px solid var(--border);
  border-radius: 8px; font-size: 1rem;
}
.login-form input:focus { outline: 2px solid var(--rose); border-color: var(--rose); }
.login-foot { text-align: center; color: var(--gray); font-size: .8rem; margin-top: 1.5rem; }

/* ---------- Flash ---------- */
.flash { padding: .6rem .8rem; border-radius: 8px; font-size: .85rem; margin-bottom: 1rem; }
.flash-error { background: #fde8e8; color: #b91c1c; }
.flash-info { background: var(--rose-light); color: var(--rose-dark); }

/* Avertissement spam / indésirables */
.spam-note {
  background: #fff8e6; border: 1px solid #f5e0a3; color: #7a5b00;
  border-radius: 8px; padding: .6rem .8rem; font-size: .8rem; line-height: 1.45;
  margin: 1rem 0;
}
.spam-note strong { color: #5a4400; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.user-chip { font-size: .85rem; color: var(--gray); font-weight: 600; }

/* ---------- Layout ---------- */
.container { max-width: 980px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.intro h1 { font-size: 1.6rem; margin: 0 0 .3rem; }
.intro p { color: var(--gray); max-width: 65ch; margin: 0 0 1.5rem; }

/* ---------- Stats ---------- */
.stats-row { display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.stat {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: .9rem 1.4rem; display: flex; flex-direction: column; min-width: 110px;
}
.stat strong { font-size: 1.5rem; color: var(--rose); }
.stat span { font-size: .8rem; color: var(--gray); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Dropzone ---------- */
.dropzone-wrap { margin-bottom: 2.5rem; }
.upload-options { display: flex; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.upload-options label { font-size: .8rem; font-weight: 600; color: var(--gray); display: flex; flex-direction: column; gap: .3rem; }
.upload-options select, .upload-options input {
  padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 8px; font-size: .9rem; color: var(--ink);
}
.note-field { flex: 1; min-width: 220px; }
.note-field input { width: 100%; }

.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius);
  background: #fff; padding: 2.5rem 1.5rem; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone.dragover { border-color: var(--rose); background: var(--rose-light); }
.dz-icon { font-size: 2rem; color: var(--rose); }
.dz-title { font-weight: 700; font-size: 1.1rem; margin: .5rem 0 .2rem; }
.dz-sub { margin: 0 0 .5rem; color: var(--gray); }
.dz-hint { font-size: .8rem; color: var(--gray); margin: 0; }

/* ---------- Upload progress ---------- */
.upload-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.upload-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: .5rem .8rem; border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: .4rem; font-size: .85rem; background: #fff;
}
.upload-list .ok { color: #15803d; }
.upload-list .ko { color: #b91c1c; }
.upload-list .pending { color: var(--gray); }

/* ---------- Filtres ---------- */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip {
  font-size: .8rem; padding: .35rem .8rem; border-radius: 999px; text-decoration: none;
  background: #fff; border: 1px solid var(--border); color: var(--gray); font-weight: 600;
}
.chip-active { background: var(--rose); color: #fff; border-color: var(--rose); }

/* ---------- Table ---------- */
.deposit-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.deposit-table th {
  text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--gray); padding: .8rem 1rem; border-bottom: 1px solid var(--border); background: var(--gray-light);
}
.deposit-table td { padding: .8rem 1rem; border-bottom: 1px solid var(--border); font-size: .9rem; vertical-align: top; }
.deposit-table tr:last-child td { border-bottom: none; }
.cell-file a { color: var(--rose); text-decoration: none; font-weight: 600; word-break: break-word; }
.cell-file a:hover { text-decoration: underline; }
.cell-note { font-size: .78rem; color: var(--gray); margin-top: .2rem; }
.cell-size, .cell-date { color: var(--gray); white-space: nowrap; }
.tag { display: inline-block; font-size: .75rem; padding: .2rem .55rem; border-radius: 6px; background: var(--rose-light); color: var(--rose-dark); font-weight: 600; }
.btn-del { background: none; border: none; color: var(--gray); cursor: pointer; font-size: 1rem; padding: .2rem .4rem; border-radius: 6px; }
.btn-del:hover { background: #fde8e8; color: #b91c1c; }
.empty { text-align: center; color: var(--gray); padding: 2rem; }

@media (max-width: 640px) {
  .deposit-table .cell-date { display: none; }
}
