/* 1000 chansons — feuille de style de la page
   Réutilise la charte graphique du site (Cormorant Garamond + Montserrat,
   palette papier/or). Les variables communes sont exposées pour /assets/site.css. */

:root {
  --ink: #1a1814;
  --paper: #f5f2eb;
  --paper-dark: #ede9df;
  --gold: #b89a5a;
  --muted: #7a7060;
  --brand: #1a1814;
  --nav-h: 72px;
  --line: rgba(184, 154, 90, 0.28);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* ── EN-TÊTE ── */
.entete {
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 3.5rem) 2rem 1.5rem;
  text-align: center;
}

.eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.8rem;
}

.entete h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.02;
  margin: 0;
  letter-spacing: 0.01em;
}
.entete h1 em { font-style: italic; color: var(--gold); }

.accroche {
  max-width: 640px;
  margin: 1.1rem auto 0;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--muted);
}

.filet {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 1.8rem auto 0;
}

/* ── SCÈNE ── */
.scene {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem 2rem 2rem;
}

/* ── BARRE DE CONTRÔLE ── */
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.9rem 1.1rem;
  padding: 1.2rem 1.3rem;
  background: var(--paper-dark);
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-bottom: 1.2rem;
}

.ctrl { display: flex; flex-direction: column; gap: 0.35rem; }
.ctrl-search { flex: 1 1 260px; }

.ctrl label {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.controls input[type="search"],
.controls select {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.55rem 0.7rem;
  min-height: 40px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.controls input[type="search"] { width: 100%; }
.controls select { min-width: 130px; cursor: pointer; }

.controls input:focus,
.controls select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 154, 90, 0.15);
}

.reset {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.6rem 1rem;
  min-height: 40px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.reset:hover { color: var(--gold); border-color: var(--gold); background: var(--paper); }

/* ── COMPTEUR ── */
.tally {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 0.7rem 0.2rem;
}
.tally b { color: var(--ink); font-weight: 600; }

/* ── TABLEAU ── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 820px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.85rem 0.9rem;
  white-space: nowrap;
  user-select: none;
}

th.sortable { cursor: pointer; }
th.sortable:hover { color: var(--gold); }
th.num { text-align: right; }

.arrow { display: inline-block; width: 0.8em; color: var(--gold); font-size: 0.9em; }
th[data-dir="asc"] .arrow::after { content: "▲"; }
th[data-dir="desc"] .arrow::after { content: "▼"; }

tbody td {
  padding: 0.68rem 0.9rem;
  border-top: 1px solid rgba(184, 154, 90, 0.14);
  vertical-align: top;
}
tbody td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

tbody tr:nth-child(even) { background: rgba(237, 233, 223, 0.5); }
tbody tr:hover { background: rgba(184, 154, 90, 0.12); }

.cell-title { font-family: 'Cormorant Garamond', serif; font-size: 1.08rem; font-weight: 500; color: var(--ink); }
.cell-artist { font-weight: 400; }
.cell-album { color: var(--muted); font-style: italic; }
.tag-lang {
  display: inline-block;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
}

.empty {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  padding: 3rem 1rem;
  margin: 0;
}

/* ── PAGINATION ── */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin: 1.4rem 0 0.6rem;
}
.pager button {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.pager button:hover:not(:disabled) { color: var(--gold); border-color: var(--gold); }
.pager button:disabled { opacity: 0.4; cursor: default; }
#pageinfo { font-size: 0.78rem; color: var(--muted); min-width: 8rem; text-align: center; }
.perpage {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.perpage select {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  cursor: pointer;
}

/* ── NOTE ── */
.note {
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 2rem auto 0;
  max-width: 760px;
  text-align: center;
}
.note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: var(--paper-dark);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

/* ── PIED ── */
.pied {
  text-align: center;
  padding: 2.5rem 1rem;
  margin-top: 3rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.pied a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.pied a:hover { color: var(--gold); }
.pied .sep { margin: 0 0.5rem; color: var(--gold); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .scene, .entete { padding-left: 1rem; padding-right: 1rem; }
  .controls { padding: 1rem; }
  .ctrl { flex: 1 1 100%; }
  .ctrl-search { flex-basis: 100%; }
  .controls select { width: 100%; }
}
