/* weloveukulele — songbook · feuille unique, sans framework */

@font-face { font-family: Inter; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../assets/fonts/inter-latin-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../assets/fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(../assets/fonts/bricolage-grotesque-latin-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(../assets/fonts/bricolage-grotesque-latin-ext-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Jetons (surchargés par config.json) ---------- */
:root {
  --accent: var(--c-accent, #C2410C);
  --fav: var(--c-fav, #D6336C);
  --ground: var(--c-ground, #FBF5EC);
  --ink: var(--c-ink, #2B1B12);
  --scene-ground: var(--c-scene-ground, #1A120D);
  --scene-chords: var(--c-scene-chords, #FFB27A);

  --surface: #FFFFFF;
  --muted: #735E4E;
  --ink-2: #5A4637;
  --line: #EBDFD0;
  --line-2: #E3D4C3;
  --chip: #F6ECDF;
  --chord: var(--accent);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, #FFFFFF);
  --accent-ink: color-mix(in srgb, var(--accent) 78%, #000000);
  --chorus-bg: color-mix(in srgb, var(--accent) 7%, #FFFFFF);
  --veil: .4;

  --font: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Bricolage Grotesque', var(--font);
  --radius: 14px;
  --shadow: 0 8px 28px rgb(43 27 18 / .14);
  --fs: 18px;
  color-scheme: light;
}

:root[data-theme="scene"] {
  --ground: var(--scene-ground);
  --surface: color-mix(in srgb, var(--scene-ground) 88%, #FFFFFF);
  --ink: #F6EDE3;
  --ink-2: #E3D3C2;
  --muted: #B9A595;
  --line: color-mix(in srgb, var(--scene-ground) 75%, #FFFFFF);
  --line-2: color-mix(in srgb, var(--scene-ground) 65%, #FFFFFF);
  --chip: color-mix(in srgb, var(--scene-ground) 82%, #FFFFFF);
  --chord: var(--scene-chords);
  --accent-soft: color-mix(in srgb, var(--scene-chords) 18%, var(--scene-ground));
  --accent-ink: var(--scene-chords);
  --chorus-bg: color-mix(in srgb, var(--scene-chords) 10%, var(--scene-ground));
  --shadow: 0 8px 28px rgb(0 0 0 / .5);
  color-scheme: dark;
}
/* Le thème « auto » est résolu en JS (clair ou scène) : une seule définition du sombre. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--ground); }
.skip:focus { top: 8px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.btn--dark { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: inherit; display: inline-flex; align-items: center; justify-content: center; flex: none; text-decoration: none; }
.icon-btn:hover { background: color-mix(in srgb, currentColor 8%, transparent); }

/* ---------- Accueil ---------- */
.hero { position: relative; height: 280px; overflow: hidden; background: #2E7FA6; color: #FFFFFF; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__tint { position: absolute; inset: 0; background: #F6A65A; opacity: .14; mix-blend-mode: soft-light; }
.hero__veil { position: absolute; inset: 0; opacity: calc(var(--veil) * 1.7);
  background: linear-gradient(180deg, rgb(43 27 18 / .55) 0%, rgb(43 27 18 / 0) 32%, rgb(43 27 18 / 0) 46%, rgb(43 27 18 / 1) 100%); }
.hero__inner { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding-top: 18px; padding-bottom: 46px; }
.hero__logo img { height: 40px; width: auto; }
.hero h1 { margin: 0; font: 800 40px/1 var(--display); letter-spacing: -.03em; text-shadow: 0 1px 14px rgb(43 27 18 / .35); }
.hero p { margin: 6px 0 0; font-size: 15px; font-weight: 500; color: #FFE7D0; text-shadow: 0 1px 8px rgb(43 27 18 / .4); }

.search-row { position: relative; margin-top: -26px; display: flex; gap: 10px; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 8px 0 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); color: var(--muted); }
.search input { flex: 1; min-width: 0; width: 100%; height: 100%; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--ink); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { display: none; font: 12px var(--font); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); cursor: help; }
@media (hover: hover) and (pointer: fine) { .search kbd { display: inline-block; } }
.random { height: 52px; border-radius: 16px; box-shadow: var(--shadow); border: 0; }
.random { width: 52px; padding: 0; flex: none; }
.random span { display: none; }

.chips-bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.chips { position: relative; flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; margin-left: -20px; padding: 2px 4px 4px 20px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.chips-bar.is-open { flex-wrap: wrap; align-items: flex-start; }
.chips-bar.is-open .chips { flex: 1 1 100%; flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.chip .icon { width: 16px; height: 16px; }
/* Favoris, « + N » et « Moins » : différenciés des catégories */
.chip--alt { border-color: transparent; background: var(--accent-soft); color: var(--accent-ink); }
.chip--fav .icon { stroke: var(--fav); }
.chip--fav[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.chip--fav[aria-pressed="true"] .icon { fill: var(--fav); }

.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 0; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--chip); }
.seg button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(43 27 18 / .12); }
.count { font-size: 13px; color: var(--muted); }

.songlist { padding-bottom: 56px; }
.group h2 { margin: 14px 0 2px; font: 700 15px var(--display); color: var(--accent-ink); }
.group ul { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.row a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--ink); text-decoration: none; }
.row__txt { flex: 1; min-width: 0; }
.row__t, .row__a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__t { font-weight: 600; }
.row__a { font-size: 13px; color: var(--muted); }
.key { flex: none; min-width: 34px; height: 26px; padding: 0 7px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.fav svg { width: 20px; height: 20px; stroke: var(--muted); fill: none; stroke-width: 2; }
.fav[aria-pressed="true"] svg { stroke: var(--fav); fill: var(--fav); }
.empty { padding: 40px 8px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); }

/* ---------- Lecteur ---------- */
.rd { padding-bottom: 110px; }
.rd-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 2px; padding: 8px 6px 8px 4px; background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.rd-top__txt { flex: 1; min-width: 0; }
.rd-top h1 { margin: 0; font: 700 21px/1.15 var(--display); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-top p { margin: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-meta { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 20px 12px; }
.pill { height: 26px; padding: 0 10px; border-radius: 8px; background: var(--chip); color: var(--ink-2); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.pill--key { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.pill--sun { background: #FFF4DB; color: #7A4B00; }

.rd-grid { display: block; }
.rd-diag { padding: 0 20px 12px; border-bottom: 1px solid var(--line); }
.rd-diag__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rd-diag h2 { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.link-btn { min-height: 36px; padding: 0 8px; border: 0; background: transparent; color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.diagrams { display: flex; gap: 10px; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 4px; scrollbar-width: thin; }
.dgc { flex: none; width: 84px; padding: 8px 0 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dgc__name { font-size: 15px; font-weight: 700; color: var(--chord); }
.dgc .dg { width: 62px; height: 84px; }
.dgc__pips { display: flex; gap: 4px; height: 6px; }
.dgc__pips i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.dgc__pips i.on { background: var(--chord); }
.dg-str { stroke: color-mix(in srgb, var(--ink) 45%, transparent); stroke-width: 1.2; }
.dg-fret { stroke: color-mix(in srgb, var(--ink) 22%, transparent); stroke-width: 1.2; }
.dg-nut { stroke: var(--ink); stroke-width: 3.4; stroke-linecap: round; }
.dg-dot { fill: var(--ink); }
.dg-open { fill: none; stroke: var(--muted); stroke-width: 1.4; }
.dg-base, .dg-q { font: 600 10px var(--font); fill: var(--muted); }

.rd-body { padding: 16px 20px 0; font-size: var(--fs); max-width: 820px; }
.blk { margin: 0 -12px 18px; padding: 0 12px; border-radius: 14px; break-inside: avoid; }
.blk--chorus { padding: 12px 12px 6px; background: var(--chorus-bg); }
.blk__label { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.blk--chorus .blk__label { color: var(--accent-ink); }
.blk-ref { margin: 0 0 18px; font-size: 14px; font-weight: 600; color: var(--accent-ink); }
.blk-comment { margin: 0 0 10px; font-size: .78em; font-weight: 600; color: var(--muted); }
.blk-comment b, .ln--chords b { color: var(--chord); }
.ln { margin-bottom: .32em; line-height: 1.35; overflow-wrap: anywhere; }
.ln--blank { height: .6em; }
.ln--chords { display: flex; flex-wrap: wrap; gap: .2em .9em; font-weight: 700; color: var(--chord); font-size: .9em; }
.w { white-space: nowrap; }
.u { display: inline-flex; flex-direction: column; vertical-align: bottom; }
.c { font-size: .82em; font-weight: 700; color: var(--chord); line-height: 1.25; white-space: pre; padding-right: .3em; }
.c:empty::before { content: '\00a0'; }
.ln--plain .c { display: none; }
.t:empty::before { content: '\00a0'; }
.rd[data-chords="inline"] .u { flex-direction: row; align-items: baseline; }
.rd[data-chords="inline"] .c { font-size: .72em; padding: 0 .15em 0 0; }
.rd[data-chords="inline"] .c:empty { display: none; }
.rd[data-chords="hidden"] .c, .rd[data-chords="hidden"] .ln--chords, .rd[data-chords="hidden"] .rd-diag { display: none; }
.tab { margin: 0 0 18px; padding: 12px; border-radius: 12px; background: var(--chip); font: 13px/1.4 ui-monospace, Menlo, monospace; overflow-x: auto; }

/* Grille */
.gridblk { margin: 0 0 22px; }
.gridblk__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.gridblk__badge { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 8px; background: var(--ink); color: var(--scene-chords); font: 800 15px var(--display); display: inline-flex; align-items: center; justify-content: center; }
.gridblk__n { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-2); border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; }
.cell { position: relative; height: calc(var(--fs) * 3.2); background: var(--surface); }
.cell__n { position: absolute; left: 6px; top: 3px; font-size: 10px; font-weight: 600; color: var(--muted); opacity: .7; }
.cell__one, .cell__rep { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.cell__rep { font: 700 calc(var(--fs) * 1.25) var(--display); color: var(--line-2); }
.cell svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cell svg line { stroke: var(--line-2); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.cell__a { position: absolute; left: 7px; top: calc(var(--fs) * .8); }
.cell__b { position: absolute; right: 7px; bottom: 6px; }
.gch { font: 700 calc(var(--fs) * 1.25) var(--display); line-height: 1; color: var(--ink); white-space: nowrap; }
.gch i { font-style: normal; font-family: var(--font); font-weight: 600; font-size: .8em; }
.gch sup { font-family: var(--font); font-size: .55em; font-weight: 700; color: var(--chord); margin-left: 1px; }
.cell__a .gch, .cell__b .gch { font-size: calc(var(--fs) * .88); }

.video { margin: 8px 0 24px; max-width: 560px; }
.video__btn { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 16px; background: var(--ink); color: var(--ground); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-weight: 600; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 16px; }
.video small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }

/* Barre de jeu */
.rd-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.grp { display: flex; align-items: center; height: 48px; border-radius: 14px; background: var(--chip); }
.grp button { width: 44px; height: 48px; border: 0; background: transparent; font-size: 22px; font-weight: 600; }
.grp__key { min-width: 42px; text-align: center; line-height: 1.05; }
.grp__key b { display: block; font-size: 16px; color: var(--chord); }
.grp__key small { font-size: 10px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.grp .a-sm { font-size: 14px; font-weight: 700; }
.grp .a-lg { font-size: 20px; font-weight: 700; }
.play { margin-left: auto; width: 52px; height: 52px; border: 0; border-radius: 16px; background: var(--accent); color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.play svg { width: 20px; height: 20px; }
.sq { width: 48px; height: 48px; border: 0; border-radius: 14px; background: var(--chip); display: inline-flex; align-items: center; justify-content: center; }

.pill-float { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 21; display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 6px 0 14px; border-radius: 999px; background: var(--ink); color: var(--ground); font-size: 13px; font-weight: 600; box-shadow: var(--shadow); white-space: nowrap; }
.pill-float button { width: 34px; height: 34px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--ground) 16%, transparent); color: inherit; font-size: 18px; }
.focus-exit { display: none; }

/* Sans distraction */
.is-focus .rd-top, .is-focus .rd-meta, .is-focus .rd-diag, .is-focus .rd-bar, .is-focus .video { display: none; }
.is-focus .rd-body { padding-top: 64px; margin: 0 auto; }
.is-focus .focus-exit { display: inline-flex; position: fixed; top: calc(10px + env(safe-area-inset-top)); right: 10px; z-index: 30; background: color-mix(in srgb, var(--ink) 8%, var(--ground)); border-radius: 999px; }
.is-focus .pill-float { bottom: calc(20px + env(safe-area-inset-bottom)); }

/* Feuille de réglages */
.sheet { width: 100%; max-width: 560px; max-height: 92vh; margin: auto auto 0; padding: 0; border: 0; border-radius: 24px 24px 0 0; background: var(--surface); color: var(--ink); box-shadow: 0 -12px 40px rgb(43 27 18 / .2); }
.sheet::backdrop { background: rgb(43 27 18 / .45); }
.sheet__in { padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.sheet__grip { width: 40px; height: 5px; border-radius: 999px; background: var(--line-2); align-self: center; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; }
.sheet h2 { margin: 0; font: 700 22px var(--display); letter-spacing: -.02em; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span, .field legend { padding: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
fieldset.field { border: 0; margin: 0; padding: 0; }
.opts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 3px; border-radius: 12px; background: var(--chip); }
.opts button { min-height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.opts button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(43 27 18 / .12); }
.range { display: flex; align-items: center; gap: 12px; }
.range input { flex: 1; accent-color: var(--accent); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.toggle span small { display: block; font-size: 13px; color: var(--muted); }
.toggle input { appearance: none; width: 52px; height: 32px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; transition: background .2s; }
.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #FFFFFF; transition: transform .2s; }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { transform: translateX(20px); }
.sheet__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.toast { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translate(-50%, -20px); z-index: 60; padding: 10px 16px; border-radius: 12px; background: var(--ink); color: var(--ground); font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.print-only { display: none; }

/* ---------- Ordinateur ---------- */
@media (min-width: 760px) {
  .hero { height: 420px; }
  .hero__inner { padding-bottom: 76px; }
  .hero__logo img { height: 52px; }
  .hero h1 { font-size: 76px; }
  .hero p { font-size: 19px; margin-top: 12px; }
  .search-row { margin-top: -34px; max-width: 860px; }
  .search { height: 64px; border-radius: 18px; }
  .search input { font-size: 18px; }
  .random { height: 64px; width: auto; border-radius: 18px; padding: 0 22px; }
  .random span { display: inline; }
  .chips-bar { margin-top: 12px; }
  .chips { margin-left: 0; padding-left: 0; }
  .group ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); column-gap: 32px; }
  .grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .rd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0 40px; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
  .rd-grid .rd-body { grid-column: 1; grid-row: 1; padding-left: 0; }
  .rd-grid .rd-diag { grid-column: 2; grid-row: 1; align-self: start; position: sticky; top: 72px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 16px; margin-top: 16px; }
  .rd-grid .diagrams { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
  .rd-top, .rd-meta { max-width: 1240px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
  .rd-bar { left: 50%; right: auto; bottom: 20px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 8px; }
  .rd-bar .play { margin-left: 8px; }
  .pill-float { bottom: 100px; }
  .is-focus .rd-grid { grid-template-columns: minmax(0, 820px); justify-content: center; }
  .is-focus .rd-body { font-size: calc(var(--fs) * 1.2); }
}

/* ---------- Impression (fiche A4) ---------- */
@media print {
  @page { size: A4; margin: 16mm 18mm 14mm; }
  :root { --ground: #FFFFFF; --surface: #FFFFFF; --ink: #1A0F09; --muted: #5A4637; --chord: #A3360A; --chorus-bg: #FFF6EE; --fs: 14.5pt; }
  body { background: #FFFFFF; }
  .rd-top, .rd-meta, .rd-bar, .pill-float, .focus-exit, .rd-diag__head button, .video, .skip, .toast, .sheet { display: none !important; }
  .rd { padding: 0; }
  .print-only { display: block; }
  .print-head h1 { margin: 0; font: 800 28pt/1.05 var(--display); letter-spacing: -.02em; }
  .print-head p { margin: 4pt 0 10pt; font-size: 11pt; color: #5A4637; }
  .rd-grid { display: block; }
  .rd-diag { border: 0; padding: 0 0 8pt; border-bottom: 1px solid #E4D3C0; }
  .rd-diag h2 { display: none; }
  .diagrams { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  .dgc { width: 64pt; border-color: #E4D3C0; }
  .dgc__pips { display: none; }
  .rd-body { padding: 12pt 0 0; max-width: none; }
  .blk--chorus { border: 1px solid #F0D2B5; }
  body { padding-bottom: 12mm; }
  .print-foot { position: fixed; bottom: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 4mm; border-top: 1px solid #E4D3C0; background: #FFFFFF; font-size: 8pt; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #5A4637; }
  .print-foot img { height: 16pt; width: auto; }
  .grid { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Raccourcis du hero : Reprendre · Setlists · Admin ---------- */
.hero__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero__actions { display: flex; gap: 8px; min-width: 0; }
.hero__pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 44px; height: 44px; min-width: 0; border-radius: 999px; border: 1px solid rgb(255 255 255 / .35); background: rgb(43 27 18 / .28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #FFFFFF; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.hero__pill:hover { background: rgb(43 27 18 / .45); }
.hero__pill .icon { width: 18px; height: 18px; flex: none; }
.hero__pill span { display: none; overflow: hidden; text-overflow: ellipsis; }
.hero__pill em { display: none; font-style: normal; font-weight: 500; opacity: .85; }
@media (min-width: 760px) {
  .hero__pill { width: auto; padding: 0 16px; }
  .hero__pill span { display: inline; }
}
@media (min-width: 1024px) {
  .hero__pill em { display: inline; }
  .hero__pill span { max-width: 340px; }
}

/* ---------- Setlists ---------- */
.page-top { max-width: 1200px; margin: 0 auto; }
.page { padding-top: 8px; padding-bottom: 60px; }
.set-new { display: flex; gap: 8px; margin: 4px 0 18px; }
.inp-pill { flex: 1; min-width: 0; min-height: 46px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 16px; }
.set-index { list-style: none; margin: 0; padding: 0; }
.set-index a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.set-index small, .set-pick small { display: block; font-size: 13px; color: var(--muted); }
.set-title { width: 100%; padding: 2px 0; border: 0; border-bottom: 2px dashed transparent; background: transparent; font: 700 21px/1.15 var(--display); letter-spacing: -.02em; color: var(--ink); }
.set-title:hover, .set-title:focus { border-bottom-color: var(--line-2); outline: none; }
.set-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.set-actions [aria-disabled] { opacity: .5; pointer-events: none; }
.btn--danger { color: #B42318; }
.set-items { list-style: none; margin: 0 0 26px; padding: 0; border-top: 1px solid var(--line); }
.set-item { display: flex; align-items: center; gap: 6px; min-height: 60px; border-bottom: 1px solid var(--line); }
.set-item__n { width: 26px; flex: none; font: 700 15px var(--display); color: var(--muted); text-align: center; }
.set-item__txt { flex: 1; min-width: 0; padding: 8px 0; color: var(--ink); text-decoration: none; }
.set-item .icon-btn:disabled { opacity: .3; cursor: default; }
.set-item .key small { font-weight: 600; }
.set-add h2 { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.set-add .search { box-shadow: none; border: 1px solid var(--line); height: 48px; }
.set-results, .set-pick { list-style: none; margin: 8px 0 0; padding: 0; }
.set-results li, .set-pick li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.set-results .row__t, .set-results .row__a { display: block; }

/* Navigation de setlist dans le lecteur */
.rd.has-set { padding-bottom: 170px; }
.rd-set { position: fixed; left: 0; right: 0; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 19; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; padding: 6px 10px; background: var(--chip); border-top: 1px solid var(--line); }
.rd-set__btn { min-height: 44px; display: flex; align-items: center; gap: 4px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; min-width: 0; }
.rd-set__btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-set__next { justify-content: flex-end; text-align: right; }
.rd-set__mid { display: flex; flex-direction: column; align-items: center; padding: 2px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; line-height: 1.15; }
.rd-set__mid b { font-size: 14px; color: var(--accent-ink); }
.rd-set__mid span { font-size: 11px; color: var(--muted); max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-focus .rd-set { bottom: 0; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
.is-focus .rd.has-set .rd-body { padding-bottom: 80px; }
@media (min-width: 1024px) {
  .rd-set { left: 50%; right: auto; width: min(640px, 90vw); transform: translateX(-50%); bottom: 96px; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
  .is-focus .rd-set { bottom: 20px; }
}
/* Setlists du groupe (publiées par l'admin) */
.set-group { margin: 6px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.set-index + .set-group { margin-top: 24px; }
.set-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 700; vertical-align: middle; }
.set-items--ro .set-item { gap: 10px; }

/* Accordeur */
.tu { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.tu-tunings { display: flex; flex-wrap: wrap; gap: 8px; }
.tu-dial { padding: 22px 20px 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); text-align: center; transition: background .2s; }
.tu-dial[data-state="ok"] { background: color-mix(in srgb, #2F9E5B 16%, var(--surface)); border-color: color-mix(in srgb, #2F9E5B 40%, var(--line)); }
.tu-note { margin: 0; display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.tu-note b { font: 800 clamp(64px, 18vw, 96px)/1 var(--display); letter-spacing: -.03em; }
.tu-note span { font-size: 18px; font-weight: 600; color: var(--muted); }
.tu-gauge { container-type: inline-size; position: relative; height: 44px; margin: 14px 0 10px; border-radius: 12px;
  background: linear-gradient(90deg, transparent 0 45%, color-mix(in srgb, #2F9E5B 22%, transparent) 45% 55%, transparent 55%), repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 10%); }
.tu-zero { position: absolute; left: 50%; top: 4px; bottom: 4px; width: 2px; margin-left: -1px; background: var(--ink); opacity: .35; }
.tu-needle { position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--accent); transition: transform .12s ease-out; }
.tu-dial[data-state="ok"] .tu-needle { background: #2F9E5B; }
.tu-read { margin: 0; display: flex; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tu-read span:last-child { color: var(--muted); font-weight: 500; }
.tu-strings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tu-str { min-height: 64px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 800 24px var(--display); display: flex; align-items: baseline; justify-content: center; gap: 2px; }
.tu-str small { font: 600 12px var(--font); color: var(--muted); }
.tu-str.is-target { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.tu-str[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.tu-str[aria-pressed="true"] small { color: inherit; opacity: .7; }
.tu-start { align-self: center; }
.tu-hint { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .tu-needle, .tu-dial { transition: none; } }

/* Mode scène (setlist) : sombre, plein écran, gros texte */
.stage-head, .stage-exit { display: none; }
.is-stage .focus-exit { display: none; }
.is-stage .stage-head { display: block; max-width: 820px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 150px 0 20px; font: 700 clamp(20px, 3.2vw, 32px)/1.15 var(--display); letter-spacing: -.02em; color: var(--ink); }
.is-stage .stage-head span { display: block; margin-top: 4px; font: 500 .55em var(--font); letter-spacing: 0; color: var(--muted); }
.is-stage .rd-body { padding-top: 14px; font-size: calc(var(--fs) * 1.1); }
.is-stage .stage-exit { display: inline-flex; align-items: center; gap: 6px; position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 30; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 600 13px var(--font); }
.is-stage .stage-exit .icon { width: 16px; height: 16px; }
.is-stage .rd-set__btn { min-height: 58px; font-size: 16px; }
.is-stage .rd-set__mid b { font-size: 17px; }
@media (min-width: 760px) { .is-stage .rd-body { font-size: calc(var(--fs) * 1.4); } }
@media (min-width: 1024px) { .is-stage .stage-head { max-width: none; text-align: center; padding-left: 170px; padding-right: 170px; } }

@media print { .rd-set, .hero__actions, .stage-head, .stage-exit { display: none !important; } }
