/* Musekni — style mobile-first, esprit Spotify, accent orange #FF5A1F */
:root {
  --bg: #121212;
  --bg-soft: #1a1a1a;
  --card: #232323;
  --text: #f5f5f5;
  --muted: #b3b3b3;
  --accent: #FF5A1F;
  --accent-dark: #d6480f;
  --danger: #e5484d;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 120px; /* espace pour le lecteur fixe */
}

/* ---------- login ---------- */
.login-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.login-wrap img.logo { width: 120px; height: 120px; border-radius: 50%; }
.login-wrap h1 { margin: 16px 0 4px; font-size: 28px; }
.login-wrap p.sub { color: var(--muted); margin: 0 0 24px; }

.field { width: 100%; max-width: 340px; margin-bottom: 12px; }
input[type="text"], input[type="password"], input[type="number"], textarea, select {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid #333;
  color: var(--text);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 16px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}
textarea { min-height: 120px; resize: vertical; font-family: inherit; }

button, .btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  max-width: 340px;
}
button:hover, .btn:hover { background: var(--accent-dark); }
button:disabled { opacity: 0.5; cursor: default; }
button.ghost {
  background: transparent;
  border: 1px solid #444;
  color: var(--text);
}
button.small, .btn.small {
  width: auto;
  padding: 8px 16px;
  font-size: 14px;
  max-width: none;
}
button.danger { background: var(--danger); }

.error { color: var(--danger); margin-top: 12px; min-height: 20px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 16px; }

/* ---------- header ---------- */
header.app {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  background: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(8px);
  z-index: 10;
  border-bottom: 1px solid #222;
}
header.app img { width: 40px; height: 40px; border-radius: 50%; }
header.app .who { flex: 1; min-width: 0; }
header.app .who strong { display: block; font-size: 15px; }
header.app .who span { color: var(--muted); font-size: 12px; }

/* ---------- cartes maquettes ---------- */
.search { margin: 12px 0; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}
.card h3 { margin: 0 0 4px; font-size: 17px; }
.card .meta { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.card .price { color: var(--accent); font-weight: 700; }
.card .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.empty { color: var(--muted); text-align: center; padding: 40px 0; }

/* ---------- lecteur ---------- */
.player {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #1e1e1e;
  border-top: 1px solid #333;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: none;
  z-index: 20;
}
.player.visible { display: block; }
.player .title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.player button.play {
  width: 48px; height: 48px; max-width: none;
  padding: 0; font-size: 20px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.player input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
  padding: 0; border: none; background: transparent;
}
.player .time { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- overlay paroles ---------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 30;
  display: none;
  overflow-y: auto;
  padding: 24px 20px 60px;
}
.overlay.visible { display: block; }
.overlay h2 { margin-top: 0; }
.overlay pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}
.overlay .close { position: sticky; top: 0; float: right; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 110px; left: 50%;
  transform: translateX(-50%);
  background: #2a2a2a;
  border: 1px solid #444;
  color: var(--text);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 40;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; }

/* ---------- admin ---------- */
.tabs { display: flex; gap: 8px; margin: 16px 0; overflow-x: auto; }
.tabs button { max-width: none; width: auto; padding: 10px 18px; font-size: 14px; }
.tabs button.active { background: var(--accent-dark); }
.tab { display: none; }
.tab.visible { display: block; }
.code-box {
  background: #0d2b12;
  border: 1px dashed #2ea043;
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
  text-align: center;
}
.code-box code { font-size: 22px; letter-spacing: 2px; color: #7ee787; }
.row-flex { display: flex; gap: 8px; align-items: center; }
.row-flex .grow { flex: 1; }
.badge {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #333;
  color: var(--muted);
}
.badge.pending { background: #3a2b00; color: #ffb224; }
.badge.contacted { background: #0d2b6e; color: #7aa2f7; }
.badge.done { background: #0d2b12; color: #7ee787; }
.badge.cancelled { background: #2b0d0d; color: #f77a7a; }
.badge.revoked { background: #2b0d0d; color: #f77a7a; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list td, table.list th { padding: 10px 6px; border-bottom: 1px solid #2a2a2a; text-align: left; }
table.list th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
