/* Pop Tool v3 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.hidden { display: none !important; }
:root {
  --bg: #f5f5f3; --card: #fff; --accent: #d4a017; --accent-soft: #fef9e3; --dark: #111;
  --text: #1a1a1a; --muted: #6b7280; --border: #e8e8e4; --border2: #f0f0ec;
  --red: #dc2626; --green: #16a34a; --blue: #2563eb;
  --r: 18px; --r-sm: 11px; --shadow: 0 4px 16px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
}
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg); color: var(--text); min-height: 100dvh; line-height: 1.45; }
body.has-reader { overflow: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
button:disabled { opacity: .45; cursor: default; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes flipFromLeft { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.anim-header { animation: fadeIn .4s ease both; }
.anim-card { animation: flipFromLeft .5s cubic-bezier(.08,.92,.18,1) .05s both; }

/* ── En-tête ── */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 10px max(16px, env(safe-area-inset-left)); background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.brand { font-weight: 800; font-size: 18px; text-decoration: none; letter-spacing: -.02em; }
.tagline { color: var(--muted); font-size: 13px; flex: 1; }
main { max-width: 860px; margin: 0 auto; padding: 16px 14px 60px; }

/* ── Boutons, champs ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:hover:not(:disabled) { background: #fafaf7; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.primary { background: var(--dark); color: #fff; border-color: var(--dark); }
.btn.primary:hover:not(:disabled) { background: #333; }
.btn.danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(0,0,0,.04); }
.btn.small { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn.big { padding: 13px 18px; font-size: 16px; border-radius: 12px; }
.danger-text { color: var(--red) !important; }
.icon { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; color: var(--muted); }
.icon:hover { background: rgba(0,0,0,.05); color: var(--text); }
.inp { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 15px; background: #fff; color: var(--text); }
.inp:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea.inp { resize: vertical; line-height: 1.5; }
.inp.num { width: 140px; flex: none; }
.inp.mono, pre { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 13px; margin-top: 8px; }
.help { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.lbl { display: block; font-weight: 600; font-size: 13px; margin: 16px 0 6px; }
.lbl:first-child { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips + .chips { margin-top: 6px; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: #fff; font-size: 14px; font-weight: 500; }
.chip.on { background: var(--dark); color: #fff; border-color: var(--dark); }
.chips.small .chip { padding: 5px 10px; font-size: 13px; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }
.count { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--border2); color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; vertical-align: middle; }

/* ── Cartes ── */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.fold { width: 100%; text-align: left; font-weight: 700; font-size: 15px; padding: 4px 0; display: flex; gap: 8px; align-items: center; }
.fold::before { content: '▸'; color: var(--muted); transition: transform .15s; }
.fold.open::before { transform: rotate(90deg); }
.card .fold:not(:first-child) { margin-top: 12px; font-size: 14px; }
.empty { color: var(--muted); padding: 12px 0; list-style: none; }
.hero { margin-bottom: 14px; }
.reader-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.memo { border-color: var(--accent); background: var(--accent-soft); }
.memo-card .card-head { margin-bottom: 8px; }
.foot-links { text-align: center; color: var(--muted); font-size: 13px; margin-top: 18px; }
.foot-links a { text-decoration: none; }
.search { margin-bottom: 10px; }

/* ── Liste des morceaux ── */
.songs { list-style: none; }
.song { display: flex; align-items: center; gap: 8px; padding: 10px 4px; border-top: 1px solid var(--border2); background: #fff; transition: background .2s; }
.song:first-child { border-top: 0; }
.song.dragging { opacity: .5; background: var(--accent-soft); }
.song.moved { background: var(--accent-soft); }
.song.off .song-name { color: var(--muted); }
.handle { cursor: grab; color: var(--muted); font-size: 18px; padding: 6px 4px; touch-action: none; user-select: none; }
.num { width: 22px; text-align: right; color: var(--muted); font-weight: 700; font-size: 14px; }
.song-main { flex: 1; min-width: 0; text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.song-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.song-artist { color: var(--muted); font-size: 13px; }
.song-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.song-meta > span:not(.st) { font-weight: 600; color: #4b5563; }
.song-icons { display: flex; gap: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.moves { display: inline-flex; }
.moves .icon { width: 28px; height: 28px; font-size: 11px; }
.st { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.st-nouveau { background: #eff6ff; color: var(--blue); }
.st-en_cours { background: var(--accent-soft); color: #92400e; }
.st-pret { background: #f0fdf4; color: var(--green); }
.st-todo { background: #fef2f2; color: var(--red); }
.st-off { background: var(--border2); color: var(--muted); margin-top: 6px; }
.recent { list-style: none; }
.recent li { border-top: 1px solid var(--border2); }
.recent li:first-child { border-top: 0; }
.recent a { display: block; padding: 9px 0; text-decoration: none; font-size: 14px; }

/* ── Fiche morceau ── */
.crumbs { margin-bottom: 10px; }
.crumbs a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.song-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.song-head h1 { font-size: 26px; letter-spacing: -.02em; line-height: 1.15; }
.artist { color: var(--muted); font-size: 16px; margin-top: 2px; }
.status-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; background: var(--accent-soft); border: 1px solid #f3e3a1; border-radius: var(--r-sm); padding: 12px 14px; margin-bottom: 14px; font-size: 14px; font-weight: 500; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.facts div { background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.facts dd { font-size: 16px; font-weight: 700; margin-top: 2px; }
.ref { margin: 4px 0 10px; }
.ref a { font-weight: 600; color: var(--blue); text-decoration: none; }
.info-text { white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
.rec { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 10px; }
.rec[data-slot=current] { border-color: var(--accent); background: #fffdf5; }
.rec-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 8px; }
.rec-slot { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; color: #92400e; }
.rec[data-slot=previous] .rec-slot { color: var(--muted); }
.rec-label { font-weight: 700; }
.rec audio { width: 100%; height: 40px; }
.rec-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.arch { margin-top: 8px; }
.upl { margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.bar { height: 6px; background: var(--border2); border-radius: 3px; overflow: hidden; margin-top: 4px; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.note-new { margin-bottom: 12px; }
.note-new .row { margin-top: 8px; }
.notes { list-style: none; }
.note { border-top: 1px solid var(--border2); padding: 10px 0; }
.note-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.note-body { white-space: pre-wrap; margin: 4px 0; font-size: 15px; }
.note-actions { display: flex; gap: 2px; }
.note.is-done .note-body { color: var(--muted); text-decoration: line-through; }
.chip.at { padding: 2px 9px; font-size: 12px; background: var(--accent-soft); border-color: #f3e3a1; }
.lyr-prev { max-height: 220px; overflow: auto; white-space: pre-wrap; font-family: inherit; font-size: 14px; background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.files { list-style: none; }
.file { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border2); }
.file:first-child { border-top: 0; }
.file-name { flex: 1; min-width: 0; font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.danger-zone { display: flex; gap: 8px; flex-wrap: wrap; justify-content: space-between; box-shadow: none; background: transparent; padding: 4px 0; }

/* ── Fenêtres ── */
body.has-modal { overflow: hidden; }
.ov { position: fixed; inset: 0; z-index: 100; background: rgba(17,17,17,.45); display: flex; align-items: center; justify-content: center; padding: 12px; animation: fadeIn .15s; }
.dlg { background: #fff; border-radius: var(--r); width: 100%; max-width: 460px; max-height: calc(100dvh - 24px); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.dlg.wide { max-width: 680px; }
.dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px 16px 8px; }
.dlg-head h3 { font-size: 18px; letter-spacing: -.01em; }
.dlg-body { padding: 8px 16px 12px; overflow: auto; }
.dlg-foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border2); flex-wrap: wrap; }
.dlg-foot .primary { order: 9; }
.editor { min-height: 46dvh; }
.q-steps { display: flex; gap: 6px; margin-bottom: 6px; }
.q-dot { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--muted); }
.q-dot.on { background: var(--dark); color: #fff; border-color: var(--dark); }
.q-dot.past { background: var(--accent-soft); border-color: #f3e3a1; color: #92400e; }
.btn.tap { min-width: 140px; }
.btn.tap:active { background: var(--accent); color: #fff; }
.pick { list-style: none; margin-top: 10px; max-height: 50dvh; overflow: auto; }
.pick button { width: 100%; text-align: left; padding: 9px 6px; border-top: 1px solid var(--border2); display: flex; flex-direction: column; }
.pick button:hover { background: var(--bg); }
.pick button.done { background: #f0fdf4; }
#toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--dark); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: .2s; z-index: 300; max-width: calc(100vw - 32px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Enregistreur ── */
.rec-box { text-align: center; padding: 18px 16px; }
.rec-time { font-size: 54px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.rec-box.on .rec-time { color: var(--red); }
.rec-meter { height: 12px; background: var(--border2); border-radius: 6px; overflow: hidden; margin: 14px 0 6px; }
.rec-meter span { display: block; height: 100%; width: 0; background: var(--green); transition: width .05s; }
.rec-meter span.hot { background: var(--red); }

/* ── Décompte ── */
.cd-ov { position: fixed; inset: 0; z-index: 400; background: rgba(17,17,17,.88); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; animation: fadeIn .1s; cursor: pointer; }
.cd-title { font-size: 20px; font-weight: 700; opacity: .8; padding: 0 20px; text-align: center; }
.cd-num { font-size: min(42vw, 300px); font-weight: 900; line-height: 1; min-height: 1em; font-variant-numeric: tabular-nums; }
.cd-num.pop { animation: cdpop .18s ease-out; }
.cd-ov.bar1 .cd-num { opacity: .75; }
.cd-ov.bar2 .cd-num { color: var(--accent); }
.cd-bars { font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.cd-ov.go .cd-num { color: #4ade80; }
.cd-sub { font-size: 15px; opacity: .6; }
@keyframes cdpop { from { transform: scale(1.25); } to { transform: scale(1); } }

/* ── Pupitre ── */
.rd { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; }
.rd.dark { background: #0e0e0e; color: #f2f2f2; --rd-bar: #1b1b1b; --rd-line: #2a2a2a; --rd-muted: #9ca3af; --rd-h: #e8c23a; }
.rd.light { background: #fff; color: #111; --rd-bar: #f3f3f1; --rd-line: #e5e5e1; --rd-muted: #6b7280; --rd-h: #a16207; }
.rd-bar { display: flex; align-items: center; gap: 4px; padding: 6px max(8px, env(safe-area-inset-left)); background: var(--rd-bar); border-bottom: 1px solid var(--rd-line); overflow-x: auto; scrollbar-width: none; }
.rd-bar::-webkit-scrollbar { display: none; }
.rd-btn { padding: 8px 11px; border-radius: 9px; font-weight: 700; font-size: 14px; white-space: nowrap; border: 1px solid var(--rd-line); text-decoration: none; display: inline-block; }
.rd-btn:hover:not(:disabled) { background: rgba(127,127,127,.15); }
.rd-btn.on { background: var(--rd-h); color: #111; border-color: var(--rd-h); }
.rd-cd { color: var(--rd-h); }
.rd-sep { width: 1px; height: 24px; background: var(--rd-line); margin: 0 4px; flex: none; }
.rd-lead { display: flex; gap: 4px; margin-left: auto; }
.rd-title { flex: 1; min-width: 140px; text-align: left; display: flex; flex-direction: column; padding: 2px 8px; border-radius: 9px; }
.rd-title b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-title small { font-size: 12px; color: var(--rd-muted); }
.rd-info { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 6px 16px; font-size: 14px; font-weight: 700; color: var(--rd-h); border-bottom: 1px solid var(--rd-line); }
.rd-info .muted { color: var(--rd-muted); font-weight: 500; }
.rd-page { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; outline: none; cursor: pointer; }
.rd-content { max-width: 980px; margin: 0 auto; padding: 18px 20px 45vh; }
.rd.docs .rd-content { max-width: calc(860px * var(--zoom, 1)); }
.lyr { line-height: 1.45; }
.lyr h2 { font-size: .62em; text-transform: uppercase; letter-spacing: .08em; color: var(--rd-h); margin: 1.1em 0 .3em; }
.lyr h2:first-child { margin-top: 0; }
.lyr .ln { white-space: pre-wrap; }
.rd-next { display: block; width: 100%; margin-top: 40px; padding: 18px; border-radius: 14px; border: 2px dashed var(--rd-line); font-size: 18px; font-weight: 700; color: var(--rd-muted); }
.rd-next:hover { color: inherit; border-color: var(--rd-h); }
.rd-end, .rd-empty { text-align: center; color: var(--rd-muted); margin: 40px 0; font-size: 17px; line-height: 1.8; }
.doc { margin-bottom: 26px; }
.doc figcaption { font-size: 13px; font-weight: 700; color: var(--rd-muted); margin-bottom: 6px; }
.doc img, .pdf-page { display: block; width: 100%; height: auto; background: #fff; border-radius: 4px; margin-bottom: 10px; }
.pdf-frame { width: 100%; height: 80vh; border: 0; background: #fff; }
.doc-text { white-space: pre-wrap; font-size: 1em; line-height: 1.5; margin-bottom: 26px; }
.rd-menu { position: absolute; top: 54px; left: 50%; transform: translateX(-50%); width: min(420px, calc(100vw - 20px)); max-height: 70vh; overflow: auto; background: var(--rd-bar); border: 1px solid var(--rd-line); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.4); padding: 6px; z-index: 5; }
.rd-mi { display: flex; gap: 10px; width: 100%; text-align: left; padding: 10px; border-radius: 9px; font-weight: 600; }
.rd-mi span { color: var(--rd-muted); width: 22px; text-align: right; }
.rd-mi.on, .rd-mi:hover { background: rgba(127,127,127,.18); }

@media (max-width: 640px) {
  .tagline { display: none; }
  .top { justify-content: space-between; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .song-icons { display: none; }
  .song-head h1 { font-size: 22px; }
  .reader-btns .btn.big { font-size: 15px; padding: 12px 10px; }
  .rd-content { padding: 14px 14px 45vh; }
  .rd-info { padding: 5px 12px; font-size: 13px; }
}

/* ── v4 : répertoires, prochaine répète, menus ── */
.top #who { margin-left: auto; }
.next-card { border: 2px solid var(--accent); background: #fffdf5; }
.next-list { margin: 0 0 2px 22px; }
.next-list li { padding: 3px 0; font-size: 16px; }
.next-list li a { font-weight: 700; text-decoration: none; margin-right: 8px; }
.next-card .memo { margin-top: 8px; background: #fff; border-color: var(--border); }
.rep-bar { display: flex; align-items: center; gap: 8px; margin: -4px 0 14px; border-bottom: 1px solid var(--border2); padding-bottom: 10px; }
.rep-tabs { display: flex; gap: 6px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.rep-tabs::-webkit-scrollbar { display: none; }
.rep-tab { padding: 7px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; white-space: nowrap; border: 1px solid var(--border); background: #fff; }
.rep-tab.on { background: var(--dark); color: #fff; border-color: var(--dark); }
.rep-tab.on .count { background: rgba(255,255,255,.2); color: #fff; }
.rep-tab.add { border-style: dashed; color: var(--muted); }
.nextbox { display: inline-flex; align-items: center; padding: 6px 2px; cursor: pointer; }
.nextbox input { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; }
.song.is-next { background: #fffdf5; }
.rep-chip { display: inline-flex; align-items: center; gap: 4px; }
.rep-chip .x { color: #fff; opacity: .7; font-size: 16px; line-height: 1; padding: 0 2px; }
.rep-chip .x:hover { opacity: 1; }
.menu-list { display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; }
.menu-list .btn { justify-content: flex-start; }
.rd-more { position: absolute; top: 54px; right: 10px; width: min(360px, calc(100vw - 20px)); background: var(--rd-bar); border: 1px solid var(--rd-line); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.4); padding: 6px; z-index: 6; display: flex; flex-direction: column; }

/* ── v6 : commandes directes sur chaque morceau ── */
.song { position: relative; }
.song.playing { background: #fffaf0; }
.qa { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.qa-b, .qa-c { height: 38px; min-width: 38px; border-radius: 10px; border: 1px solid var(--border); background: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 2px; font-size: 15px; transition: background .15s, border-color .15s, transform .08s; }
.qa-b:hover:not(:disabled), .qa-c:hover { background: #fafaf7; border-color: #d6d6d0; }
.qa-b:active:not(:disabled), .qa-c:active { transform: scale(.94); }
.qa-b small { font-size: 11px; font-weight: 700; color: var(--muted); margin-left: 1px; }
.qa-play { background: var(--dark); color: #fff; border-color: var(--dark); font-size: 13px; }
.qa-play:hover:not(:disabled) { background: #333; border-color: #333; }
.qa-play:disabled { background: #fff; color: var(--muted); border-color: var(--border); opacity: .35; }
.song.playing .qa-play { background: var(--accent); border-color: var(--accent); }
.qa-c { flex-direction: column; gap: 0; padding: 0 7px; min-width: 50px; line-height: 1.05; }
.qa-c b { font-size: 14px; font-weight: 800; }
.qa-c small { font-size: 10px; color: var(--muted); font-weight: 600; }
.qa-c.empty { border-style: dashed; }
.qa-b.faint { opacity: .4; }
.qa-b.faint:hover { opacity: 1; }
.qe-tempo { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 10px; }
.qe-bpm { width: 110px; flex: none; text-align: center; font-size: 26px; font-weight: 800; }
.qe-capo { min-width: 110px; text-align: center; font-weight: 700; font-size: 17px; }
.qe-tap { width: 100%; margin-bottom: 6px; }
.qe-keys { margin-bottom: 8px; }
.qe-keys .chip { min-width: 46px; justify-content: center; }

/* ── v7 : lecteur dans la liste, import, dépôt, note de répète, icône du décompte ── */
.song { flex-wrap: wrap; }
.qa-extra { display: contents; }
.qa-more { display: none; }
.qa-add { color: var(--accent); border-style: dashed; border-color: var(--accent); font-size: 19px; font-weight: 600; }
.qa-add:hover { background: var(--accent-soft) !important; border-color: var(--accent) !important; }
.qa-count { flex-direction: column; gap: 0; padding: 0 6px; line-height: 1.05; min-width: 50px; }
.qa-count small { margin: 0; font-size: 9.5px; }
.ic-cd { display: inline-block; font-weight: 900; font-size: 11px; letter-spacing: .5px; padding: 1px 4px; border: 1.5px solid currentColor; border-radius: 5px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.btn .ic-cd, .rd-btn .ic-cd { margin-right: 3px; vertical-align: 1px; }
.mini { flex-basis: 100%; display: flex; align-items: center; gap: 8px; padding: 4px 4px 2px 62px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mini input[type=range] { flex: 1; accent-color: var(--accent); height: 28px; cursor: pointer; min-width: 60px; }
.mini-b { padding: 4px 7px; border-radius: 8px; font-weight: 700; font-size: 12px; color: var(--text); }
.mini-b:hover { background: var(--border2); }
.song.drop { background: var(--accent-soft) !important; outline: 2px dashed var(--accent); outline-offset: -2px; }
body.drop-page main { outline: 3px dashed var(--accent); outline-offset: 6px; border-radius: 16px; }
.next-note { margin-top: 12px; padding: 2px 0 2px 12px; border-left: 3px solid var(--accent); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; font-weight: 600; font-style: italic; color: #6b5310; line-height: 1.55; cursor: pointer; }
.next-note:hover { color: #4a3a0b; }
.next-note-add { margin-top: 8px; color: var(--muted); font-size: 13px; font-weight: 600; padding: 4px 0; }
.next-note-add:hover { color: var(--text); }
.memo-ta { min-height: 120px; resize: vertical; font-size: 15px; line-height: 1.5; }
.menu-list a.btn { text-decoration: none; }
@media (max-width: 640px) {
  .song { row-gap: 6px; }
  .song-main { flex-basis: calc(100% - 100px); }
  .qa { width: 100%; padding-left: 62px; gap: 6px; }
  .qa-extra { display: none; }
  .qa-more { display: inline-flex; }
  .qa-b { height: 42px; flex: 1; min-width: 0; }
  .qa-more { flex: .6; }
  .mini { padding-left: 4px; gap: 4px; }
  .mini-b { padding: 6px 6px; }
}

/* ── v8 : un seul répertoire affiché, on change par le titre ── */
.rep-switch-wrap { position: relative; flex: 1; min-width: 0; }
.rep-switch { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 10px 4px 2px; border-radius: 10px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; text-align: left; }
.rep-switch:hover { background: var(--border2); }
.rep-cur { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-caret { font-size: 14px; color: var(--muted); transition: transform .15s; }
.rep-switch[aria-expanded=true] .rep-caret { transform: rotate(180deg); }
.rep-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 280px; max-width: calc(100vw - 40px); background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.14); padding: 6px; animation: fadeIn .12s; }
.rep-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 10px; border-radius: 9px; text-align: left; font-weight: 600; font-size: 15px; }
.rep-opt:hover { background: var(--border2); }
.rep-opt.on { background: var(--accent-soft); }
.rep-check { width: 16px; color: var(--accent); font-weight: 800; text-align: center; }
.rep-opt.add { color: var(--muted); border-top: 1px solid var(--border2); border-radius: 0 0 9px 9px; margin-top: 4px; }
.rep-opt.add:hover { color: var(--text); }
@media (max-width: 640px) { .rep-switch { font-size: 21px; } }

/* ── v9 : pas de zoom sur mobile ── */
html, body { touch-action: manipulation; }            /* pas de zoom au double tap */
@media (max-width: 900px) {
  input, textarea, select, .inp { font-size: 16px !important; }  /* iPhone : pas de zoom automatique quand on touche un champ */
}
