/* piano.mypalace.ca — pages du catalogue (l'application garde son propre styles.css) */
:root {
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-2: #f0ede4;
  --line: #e2ddd0;
  --text: #1d1f24;
  --muted: #5d6270;
  --accent: #b7791f;
  --accent-ink: #1d1f24;
  --accent-bg: #facc15;
  --right: #059669;
  --left: #2563eb;
  --hero: #14161c;
  --hero-text: #e6e8ee;
  --hero-muted: #9aa1b2;
  --radius: 10px;
  --wrap: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161c; --surface: #1c1f27; --surface-2: #242833; --line: #2e3340;
    --text: #e6e8ee; --muted: #9aa1b2; --accent: #facc15; --right: #34d399; --left: #60a5fa;
    --hero: #0e1015; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14161c; --surface: #1c1f27; --surface-2: #242833; --line: #2e3340;
  --text: #e6e8ee; --muted: #9aa1b2; --accent: #facc15; --right: #34d399; --left: #60a5fa;
  --hero: #0e1015; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Ubuntu, Cantarell, sans-serif;
}
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
img { max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* en-tête */
.site-head { background: var(--hero); color: var(--hero-text); }
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 18px; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand .logo { color: var(--accent-bg); font-size: 22px; }
.site-head nav { display: flex; gap: 18px; margin-left: auto; font-size: 15px; flex-wrap: wrap; }
.site-head nav a { color: var(--hero-muted); text-decoration: none; }
.site-head nav a:hover, .site-head nav a[aria-current] { color: var(--hero-text); }

/* bandeau d'accueil */
.hero { background: var(--hero); color: var(--hero-text); padding: 40px 0 56px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.12; margin: 0 0 16px; letter-spacing: -0.01em; }
.hero p { color: var(--hero-muted); font-size: 18px; margin: 0 0 24px; max-width: 34em; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.falls { position: relative; height: 260px; border-radius: 12px; background: #1c1f27; border: 1px solid #2e3340; overflow: hidden; }
.falls i { position: absolute; width: 7.5%; border-radius: 5px; animation: fall 3.2s linear infinite; }
.falls i.r { background: #34d399; } .falls i.l { background: #60a5fa; }
.falls .keys { position: absolute; left: 0; right: 0; bottom: 0; height: 46px;
  background: repeating-linear-gradient(90deg, #f6f2e7 0 calc(12.5% - 2px), #2e3340 calc(12.5% - 2px) 12.5%); }
@keyframes fall { from { transform: translateY(-120px); } to { transform: translateY(300px); } }
@media (prefers-reduced-motion: reduce) { .falls i { animation: none; transform: translateY(80px); } }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 8px;
  font-weight: 600; text-decoration: none; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  cursor: pointer; font-size: 16px;
}
.btn.primary { background: var(--accent-bg); color: #1d1f24; border-color: transparent; }
.btn.primary:hover { filter: brightness(1.06); }
.hero .btn:not(.primary) { background: transparent; color: var(--hero-text); border-color: #3a4050; }

/* sections */
main { padding: 32px 0 56px; }
h2 { font-size: 24px; margin: 40px 0 12px; line-height: 1.25; }
h2:first-child { margin-top: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 8px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.step b { display: block; margin-bottom: 4px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* filtres et catalogue */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0 16px; }
.filters input, .filters select {
  font: inherit; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); min-width: 0;
}
.filters input { flex: 1 1 240px; }
.count { color: var(--muted); font-size: 14px; margin-left: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; }
.card {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none;
}
.card:hover { border-color: var(--accent); }
.card .t { font-weight: 600; line-height: 1.3; }
.card .c { color: var(--muted); font-size: 14px; }
.card .meta { margin-top: auto; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.lvl { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid currentColor; }
.lvl-1 { color: var(--right); } .lvl-2 { color: var(--left); } .lvl-3 { color: var(--accent); } .lvl-4 { color: #c2410c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lvl-4 { color: #fb923c; } }
:root[data-theme="dark"] .lvl-4 { color: #fb923c; }
.empty { color: var(--muted); padding: 24px 0; }

/* fiche d'un morceau */
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.piece-head { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.piece-head .txt { flex: 1 1 420px; }
.piece-head h1 { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.15; margin: 0 0 6px; }
.piece-head .by { font-size: 18px; color: var(--muted); margin: 0 0 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 20px; padding: 0; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.facts dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 0; font-weight: 600; }
.sheet-preview { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); padding: 8px; margin: 8px 0 24px; }
.sheet-preview img { display: block; width: 100%; height: auto; }
.prose { max-width: 46em; }
.prose p { margin: 0 0 14px; }
.credit { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 28px; }
.note-mobile { font-size: 14px; color: var(--muted); margin: 10px 0 0; }

.site-foot { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 14px; }
.site-foot a { color: inherit; }

@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .falls { height: 180px; }
  .steps { grid-template-columns: 1fr; }
  .site-head nav { margin-left: 0; gap: 14px; }
  .count { margin-left: 0; width: 100%; }
}
