/* Pupitre : feuille de style
   Papier blanc, encre bleu-noir, crayon gris, bleu de Prusse pour les actions,
   bleu clair pour « ma voix » dans le lecteur. */

:root {
  --paper: #fbfbf9;
  --sheet: #ffffff;
  --ink: #1b2330;
  --pencil: #5c6470;
  --rule: #d9dde3;
  --rule-soft: #eceef1;
  --prussian: #1f4e79;
  --prussian-dark: #163a5c;
  --marker: #ffe45c;
  --marker-soft: #fff3a6;
  --mine: #a9cbe9;
  --danger: #9b2c2c;
  --ok: #2f6b3b;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 44rem;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
}
img, svg { max-width: 100%; }
a { color: var(--prussian); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--prussian-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--prussian); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Typographie ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--ink); line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem); letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; margin-top: 0; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; line-height: 1.5; max-width: 38rem; }
.muted { color: var(--pencil); }
.small { font-size: 0.9rem; }
.eyebrow { color: var(--pencil); font-size: 0.95rem; margin: 0 0 0.35rem; }
.eyebrow a { color: inherit; }
.count { font-family: var(--sans); font-size: 0.95rem; color: var(--pencil); margin-left: 0.25rem; vertical-align: 0.15em; }
.warn { color: var(--danger); }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 1.6em; font-size: 1.3rem; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.small-prose { margin-top: 2.5rem; font-size: 0.97rem; color: var(--pencil); }
.small-prose h2 { color: var(--ink); }

/* ---------- Structure ---------- */
.top { border-bottom: 1px solid var(--rule); background: var(--paper); }
.top-inner, .foot-inner, .flash-inner, .page { max-width: 60rem; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }
.top-inner { display: flex; align-items: baseline; gap: 0.6rem; min-height: 3.25rem; padding-top: 0.75rem; padding-bottom: 0.6rem; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.crumb-sep { color: var(--rule); }
.crumb { color: var(--ink); text-decoration: none; font-size: 1rem; max-width: 50vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-nav { margin-left: auto; display: flex; gap: 1.1rem; font-size: 0.97rem; }
.top-nav a { text-decoration: none; color: var(--ink); }
.top-nav a:hover { color: var(--prussian); text-decoration: underline; }
.page { padding-top: 2.5rem; padding-bottom: 4rem; }
.narrow { max-width: 34rem; }
.block { margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--rule); }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.foot { border-top: 1px solid var(--rule); color: var(--pencil); font-size: 0.9rem; }
.foot-inner { display: flex; gap: 1.25rem; padding-top: 1.25rem; padding-bottom: 2rem; flex-wrap: wrap; }
.foot a { color: var(--pencil); }


.flash { background: var(--ink); color: var(--paper); }
.flash-inner { padding-top: 0.7rem; padding-bottom: 0.7rem; }
.flash-error { background: var(--danger); }
.alert { border-left: 3px solid var(--danger); padding: 0.6rem 0 0.6rem 1rem; margin: 0 0 1.5rem; background: #fbf1f1; }
.alert p:last-child { margin-bottom: 0; }
.notice { margin-top: 1rem; }
.notice a { font-weight: 600; }
.subnav { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 1rem; font-size: 0.97rem; }

/* ---------- Listes de partitions (comme une table des matières) ---------- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.row { display: flex; align-items: center; gap: 1rem; border-bottom: 1px solid var(--rule-soft); }
.row-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 1rem; padding: 0.8rem 0; color: var(--ink); text-decoration: none; }
a.row-main:hover .row-title { color: var(--prussian); text-decoration: underline; text-decoration-thickness: 1px; }
.row-title { font-family: var(--serif); font-size: 1.2rem; line-height: 1.3; }
.row-sub { color: var(--pencil); font-size: 0.95rem; margin-left: auto; text-align: right; }
.row-aside { font-size: 0.92rem; white-space: nowrap; }
.row-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.row.is-archived .row-title { color: var(--pencil); }
ol.numbered { counter-reset: n; }
ol.numbered .row-main::before { counter-increment: n; content: counter(n); font-family: var(--serif); color: var(--pencil); width: 1.6rem; flex: none; }
.filter { width: 100%; max-width: 24rem; margin: 0 0 1rem; }

.my-part { margin-top: 1.25rem; }
.my-part label { color: var(--pencil); }
.my-part select { font-weight: 600; }

/* Programmes */
.programmes { display: grid; gap: 2rem 3rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.programme header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--ink); padding-bottom: 0.3rem; margin-bottom: 0.6rem; }
.programme h3 { margin: 0; }
.programme h3 a { color: var(--ink); text-decoration: none; }
.programme h3 a:hover { text-decoration: underline; }
.programme .date { margin: 0; color: var(--pencil); font-size: 0.92rem; white-space: nowrap; }
.programme.is-featured header { border-bottom-width: 3px; }
.prog-list { margin: 0; padding-left: 1.4rem; }
.prog-list li { margin-bottom: 0.35rem; }

/* ---------- Formulaires ---------- */
.form { max-width: 34rem; display: grid; gap: 1.1rem; }
.form-wide { display: grid; gap: 1.1rem; max-width: 52rem; }
.form h2, .form-wide h2 { margin-top: 1.25rem; }
label { display: grid; gap: 0.3rem; font-size: 0.97rem; }
.hint { color: var(--pencil); font-size: 0.88rem; font-weight: 400; }
label > .hint { display: inline; }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea {
  font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #b9c0ca; border-radius: var(--radius);
  padding: 0.55rem 0.7rem; width: 100%;
}
select { width: auto; max-width: 100%; padding-right: 2rem; }
textarea { resize: vertical; }
input[type=file] { font: inherit; }
input:focus, select:focus, textarea:focus { border-color: var(--prussian); outline: 2px solid var(--prussian); outline-offset: 0; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
legend { font-size: 0.97rem; margin-bottom: 0.3rem; }
.check, .radio { display: flex; gap: 0.55rem; align-items: baseline; }
.check input, .radio input { width: 1.05rem; height: 1.05rem; accent-color: var(--prussian); flex: none; position: relative; top: 0.15em; }
.inline-form { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.inline-form label { display: inline; }
.inline-form input:not([type=checkbox]):not([type=file]) { width: auto; flex: 1; min-width: 12rem; }
.grid-2 { display: grid; gap: 1.1rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.short { max-width: 6rem; }
.short-text { max-width: 10rem; }
.copy-field { display: flex; gap: 0.5rem; max-width: 40rem; margin-bottom: 0.75rem; }
.copy-field input { font-size: 0.92rem !important; }
.login-choice { display: grid; gap: 0.35rem; }
details.pw { border-top: 1px solid var(--rule); padding-top: 0.9rem; }
details.pw summary { cursor: pointer; color: var(--prussian); }
details.pw[open] { display: grid; gap: 0.9rem; }
details.pw[open] summary { margin-bottom: 0.2rem; }
.parts-pick { border-top: 1px solid var(--rule); padding-top: 0.9rem; }
.checks { list-style: none; padding: 0; margin: 0 0 1.5rem; font-size: 0.95rem; }
.checks .ok { color: var(--ok); }
.checks .ko { color: var(--danger); font-weight: 600; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font: 600 1rem/1.2 var(--sans); color: #fff; background: var(--prussian);
  border: 1px solid var(--prussian); border-radius: var(--radius);
  padding: 0.65rem 1.1rem; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--prussian-dark); border-color: var(--prussian-dark); color: #fff; text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-small { font-size: 0.92rem; padding: 0.42rem 0.8rem; }
.btn-quiet { background: transparent; color: var(--prussian); border-color: #9fb2c8; }
.btn-quiet:hover { background: #eef3f8; color: var(--prussian-dark); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #7d2222; border-color: #7d2222; }
.link-btn { font: inherit; font-size: 0.92rem; background: none; border: 0; padding: 0; color: var(--prussian); cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; }
.link-btn.danger { color: var(--danger); }
.danger-zone { margin-top: 3rem; display: grid; gap: 1rem; }

/* ---------- Tableaux ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.table th { text-align: left; font-weight: 600; color: var(--pencil); font-size: 0.88rem; border-bottom: 1px solid var(--ink); padding: 0.4rem 0.75rem 0.4rem 0; }
.table td { border-bottom: 1px solid var(--rule-soft); padding: 0.6rem 0.75rem 0.6rem 0; vertical-align: top; }
.table select { font-size: 0.92rem; padding: 0.3rem 1.8rem 0.3rem 0.5rem; }
.parts-table input { font-size: 0.95rem !important; padding: 0.4rem 0.5rem !important; }
.prog-table tr.is-out td:last-child { color: var(--pencil); }
details.mini summary { cursor: pointer; color: var(--danger); font-size: 0.9rem; }
details.mini[open] { min-width: 15rem; }

/* ======================================================================
   Lecteur
   ====================================================================== */
body.is-player { background: #eef0f2; }
.player { max-width: 75rem; margin: 0 auto; padding: 1.25rem 1rem 9rem; }
.player-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.player-head h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); margin: 0; }
.player-sub { margin: 0.2rem 0 0; color: var(--pencil); font-size: 1.05rem; }
.player-links { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.chef-note { background: var(--sheet); border-left: 3px solid var(--prussian); padding: 0.7rem 1rem; margin-bottom: 1rem; max-width: 50rem; }
.chef-note summary { cursor: pointer; font-weight: 600; }
.chef-note p { margin: 0.5rem 0 0; }

.sheet-wrap { position: relative; isolation: isolate; z-index: 0; background: var(--sheet); box-shadow: 0 1px 0 var(--rule), 0 0 0 1px var(--rule-soft); min-height: 60vh; }
.sheet { padding: 1rem 0.5rem; }
.sheet-status { position: absolute; inset: 0 0 auto; padding: 3rem 1rem; text-align: center; color: var(--pencil); font-size: 1.05rem; z-index: 2; }
.sheet-status.is-error { color: var(--danger); }
.attribution-note { color: var(--pencil); font-size: 0.82rem; margin: 0.6rem 0 0; }

/* Éléments dessinés par alphaTab */
.at-cursor-bar { background: rgba(31, 78, 121, 0.07); }
.at-cursor-beat { background: var(--prussian); width: 3px; }
.at-selection div { background: rgba(31, 78, 121, 0.12); }
.at-highlight * { fill: var(--prussian); stroke: var(--prussian); }

/* Barre de lecture */
.transport {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  background: var(--ink); color: #eef1f5;
  padding-bottom: env(safe-area-inset-bottom);
}
.transport-inner { max-width: 75rem; margin: 0 auto; display: flex; align-items: center; gap: 0.6rem 1rem; padding: 0.6rem 1rem; flex-wrap: wrap; }
.transport svg { width: 1.3rem; height: 1.3rem; fill: currentColor; }
.t-btn { font: inherit; color: inherit; background: transparent; border: 1px solid #45526a; border-radius: var(--radius); min-height: 2.75rem; min-width: 2.75rem; padding: 0 0.7rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.t-btn:hover:not(:disabled) { border-color: #8b97ab; }
.t-btn:disabled, .t-play:disabled { opacity: 0.4; cursor: default; }
.t-btn.is-active { border-color: var(--mine); color: var(--mine); }
.t-text { font-size: 0.97rem; }
.t-play { width: 3.4rem; height: 3.4rem; border-radius: 50%; border: 0; background: var(--paper); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.t-play svg { width: 1.6rem; height: 1.6rem; }
.t-play .i-pause, .is-playing .t-play .i-play { display: none; }
.is-playing .t-play .i-pause { display: block; }
.t-play:hover:not(:disabled) { background: #fff; }
.t-label { color: #a9b3c2; font-size: 0.85rem; }
.t-pos { font-variant-numeric: tabular-nums; min-width: 6.5rem; font-size: 1.05rem; }
.t-speed { display: flex; align-items: center; gap: 0.5rem; flex-direction: row; }
.t-speed select { background: #263043; color: #fff; border-color: #45526a; padding: 0.4rem 1.6rem 0.4rem 0.5rem; font-size: 0.95rem; }
.t-tempo { color: #a9b3c2; font-size: 0.95rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
#btn-passage { margin-left: auto; }

/* Panneaux au-dessus de la barre : compacts, jamais plus de la moitié de l'écran */
.panel { border-top: 1px solid #333e52; background: #222b3a; max-height: 50vh; overflow-y: auto; overscroll-behavior: contain; }
.panel-inner { position: relative; max-width: 75rem; margin: 0 auto; padding: 0.7rem 3rem 0.75rem 1rem; display: grid; gap: 0.55rem; }
.panel-x { position: absolute; top: 0.45rem; right: 0.6rem; width: 2.2rem; height: 2.2rem; border: 1px solid #56637a; border-radius: var(--radius); background: transparent; color: #dfe4ea; font-size: 1.3rem; line-height: 1; cursor: pointer; }
.panel-x:hover { background: #2d3849; color: #fff; }
.panel label { color: #dfe4ea; }
.panel input[type=number] { width: 4.5rem !important; background: #fff; padding: 0.35rem 0.5rem; }
.panel select { background: #263043; color: #fff; border-color: #45526a; padding-top: 0.35rem; padding-bottom: 0.35rem; }
.panel-row { display: flex; gap: 0.5rem 1.25rem; align-items: center; flex-wrap: wrap; }
.panel-row label { display: flex; align-items: center; gap: 0.45rem; font-size: 0.93rem; }
.panel-hint { margin: 0; color: #a9b3c2; font-size: 0.88rem; }
.panel-hint:empty { display: none; }
.panel .btn-quiet { color: #dfe4ea; border-color: #56637a; }
.panel .btn-quiet:hover { background: #2d3849; color: #fff; }
.panel .btn:not(.btn-quiet) { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.toggles { gap: 0.5rem 1.25rem; }
.presets { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.presets button, .tracks button, .zoom button {
  font: inherit; font-size: 0.88rem; color: #dfe4ea; background: transparent;
  border: 1px solid #56637a; border-radius: var(--radius); padding: 0.3rem 0.65rem; cursor: pointer; min-height: 2.2rem;
}
.presets button[aria-pressed=true] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.presets button:disabled { opacity: 0.4; cursor: default; }
.others-level { display: flex !important; align-items: center; gap: 0.5rem; }
.others-level input { width: 9rem; accent-color: var(--mine); }
.zoom { display: inline-flex; gap: 0.35rem; }
.zoom button { min-width: 2.3rem; font-size: 1.05rem; }
.tracks-box summary { cursor: pointer; color: #dfe4ea; font-size: 0.93rem; padding: 0.15rem 0; width: max-content; }
.tracks-box summary:hover { color: #fff; }
.tracks-box[open] summary { margin-bottom: 0.35rem; }

.tracks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 0.25rem 1rem; }
.track { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 0.15rem 0.35rem; padding: 0.3rem 0.5rem; border-left: 4px solid transparent; }
.tr-name { font-size: 0.95rem; line-height: 1.2; min-width: 0; }
.tr-name small { display: block; color: #a9b3c2; font-size: 0.78rem; }
.track .tr-vol { grid-column: 1 / -1; width: 100%; accent-color: #c9d2de; height: 1.1rem; }
.track button { padding: 0.2rem 0.5rem; min-height: 1.9rem; font-size: 0.82rem; }
.track button[aria-pressed=true] { background: #dfe4ea; color: var(--ink); border-color: #dfe4ea; }
.track .tr-mine[aria-pressed=true] { background: var(--mine); border-color: var(--mine); color: var(--ink); }
/* La ligne de ma voix est marquée en bleu clair */
.track.is-mine { border-left-color: var(--mine); background: rgba(169, 203, 233, 0.08); }
.track.is-mine .tr-name { color: var(--mine); }
.track.is-silent .tr-name { color: #7d889a; text-decoration: line-through; text-decoration-thickness: 1px; }

/* ---------- Petits écrans ---------- */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .page { padding-top: 1.5rem; }
  .row-main { flex-direction: column; gap: 0.1rem; }
  .row-sub { margin-left: 0; text-align: left; }
  ol.numbered .row-main { display: grid; grid-template-columns: 1.6rem 1fr; column-gap: 0; }
  ol.numbered .row-main::before { grid-row: span 2; }
  .hide-sm { display: none; }
  .table.members td:first-child { min-width: 9rem; }
  .player { padding: 0.75rem 0.5rem 10rem; }
  .sheet { padding: 0.5rem 0; }
  .transport-inner { gap: 0.5rem 0.6rem; padding: 0.5rem 0.75rem; }
  .t-speed .t-label, .t-pos .t-label { display: none; }
  .t-pos { min-width: 0; }
  .t-pos::before { content: "Mes. "; color: #a9b3c2; font-size: 0.85rem; }
  .t-speed { order: 10; }
  #btn-passage { margin-left: auto; }
  .tracks { grid-template-columns: 1fr; }
  .others-level input { width: 7rem; }
  .panel { max-height: 45vh; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
.form > .btn, .form-wide > .btn, .form > button, .form-wide > button { justify-self: start; }
.convert-status { margin: 0; padding: 0.55rem 0.8rem; border-left: 3px solid var(--rule); background: #f3f5f7; font-size: 0.95rem; flex-basis: 100%; }
.convert-status.is-busy { border-left-color: var(--prussian); }
.convert-status.is-ok { border-left-color: var(--ok); background: #f1f7f2; }
.convert-status.is-error { border-left-color: var(--danger); background: #fbf1f1; }

/* ---------- En-tête : icônes réglages et compte ---------- */
.top-inner { align-items: center; }
.top-nav { align-items: center; gap: 0.35rem; }
.ico { position: relative; width: 2.4rem; height: 2.4rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--ink); padding: 0; cursor: pointer; }
.ico svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico:hover { background: var(--rule-soft); color: var(--ink); }
.ico.on { background: var(--ink); color: #fff; }
.ico[aria-expanded=true] { background: var(--rule-soft); }
.pastille { font-style: normal; font-size: 0.68rem; line-height: 1rem; min-width: 1rem; padding: 0 0.25rem; border-radius: 0.5rem; background: var(--prussian); color: #fff; text-align: center; font-weight: 600; }
.ico .pastille { position: absolute; top: -0.15rem; right: -0.2rem; }
.acct { position: relative; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 1100; min-width: 17rem; max-width: 20rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 10px 30px rgba(27, 35, 48, 0.14); padding: 0.4rem 0; font-size: 0.97rem; }
.acct-menu a, .acct-menu button { display: block; width: 100%; text-align: left; padding: 0.5rem 1rem; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.acct-menu a:hover, .acct-menu button:hover, .acct-menu a:focus-visible, .acct-menu button:focus-visible { background: var(--rule-soft); outline: none; }
.acct-menu a[aria-current] { font-weight: 600; }
.acct-menu hr { border: 0; border-top: 1px solid var(--rule-soft); margin: 0.35rem 0; }
.acct-who { margin: 0.2rem 1rem 0.5rem; display: grid; line-height: 1.3; }
.acct-who span { color: var(--pencil); font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; }
.acct-label { margin: 0.2rem 1rem 0.1rem; color: var(--pencil); font-size: 0.85rem; }
.acct-count { color: var(--prussian); font-size: 0.85rem; white-space: nowrap; }
.acct-menu form { margin: 0; }

/* ---------- Onglets en colonne à gauche ---------- */
.tabbed { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 2.25rem; margin-top: 1.75rem; align-items: start; }
.side-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 1rem; }
.side-nav a { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.8rem; border-left: 3px solid transparent; border-radius: 0 6px 6px 0; color: var(--pencil); text-decoration: none; font-size: 0.98rem; }
.side-nav a:hover { color: var(--ink); background: var(--rule-soft); }
.side-nav a.on { color: var(--ink); border-left-color: var(--ink); background: var(--rule-soft); font-weight: 600; }
.side-nav .side-back { margin-top: 0.75rem; font-size: 0.9rem; }
.side-nav .pastille { margin-left: auto; }
.tab-panels { min-width: 0; }
.tab-panel { margin: 0; padding: 0; border: 0; }
.tab-panel + .tab-panel, form + .tab-panel, .tab-panel + form { margin-top: 3rem; }
[data-tabs].is-ready .tab-panel + .tab-panel, [data-tabs].is-ready form + .tab-panel, [data-tabs].is-ready .tab-panel + form { margin-top: 0; }
.tab-panel > h2:first-child, .tab-panel > .block-head:first-child h2 { margin-top: 0; }
.tab-panel.danger-zone { margin-top: 0; }
.tab-panel .form-wide, .tab-panel .form { max-width: 40rem; }
@media (max-width: 760px) {
  .tabbed { grid-template-columns: 1fr; gap: 1rem; margin-top: 1rem; }
  .side-nav { position: static; flex-direction: row; overflow-x: auto; gap: 0; border-bottom: 1px solid var(--rule); scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav a { flex: none; border-left: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 0.55rem 0.75rem; white-space: nowrap; }
  .side-nav a.on { border-bottom-color: var(--ink); background: none; }
  .side-nav .side-back { margin-top: 0; }
}

/* ---------- Remarques ---------- */
.remarque { position: fixed; right: 1rem; bottom: 1rem; z-index: 900; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.5rem 0.9rem 0.5rem 0.7rem; border-radius: 999px; border: 1px solid var(--prussian); background: var(--sheet); color: var(--prussian); font-weight: 600; font-size: 0.92rem; text-decoration: none; box-shadow: 0 4px 14px rgba(31, 78, 121, 0.18); }
.remarque svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.remarque:hover { background: var(--prussian); color: #fff; text-decoration: none; }
@media (max-width: 560px) { .remarque span { display: none; } .remarque { padding: 0.65rem; } }
@media print { .remarque { display: none !important; } }
body:not(.is-player) .foot-inner { padding-bottom: 4.5rem; }
.dlg { border: 1px solid var(--rule); border-radius: 10px; padding: 1.5rem; width: min(34rem, calc(100vw - 2rem)); background: var(--sheet); color: var(--ink); box-shadow: 0 20px 60px rgba(27, 35, 48, 0.25); }
.dlg::backdrop { background: rgba(27, 35, 48, 0.4); }
.dlg h2 { margin-top: 0; }
.dlg textarea { width: 100%; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 0.5rem; }
.dlg-err { color: var(--danger); margin: 0; }
.msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.msg { border: 1px solid var(--rule); border-radius: 8px; padding: 0.9rem 1.1rem; background: var(--sheet); }
.msg-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; }
.msg-meta { margin: 0.35rem 0 0.5rem; color: var(--ink); }
.msg-body { margin: 0 0 0.75rem; white-space: normal; }
.sig { font-family: var(--serif); font-weight: 600; color: var(--ink); }

/* ---------- PDF d'une voix ---------- */
.pdf-voices { border: 0; padding: 0; margin: 0.5rem 0; }
#pdf-tracks { display: grid; gap: 0.35rem; max-height: 50vh; overflow-y: auto; }
.pdf-quick { display: flex; gap: 1.25rem; margin: 0.25rem 0 0.5rem; }
.pdf-status { margin: 0.5rem 0 0; padding: 0.5rem 0.75rem; border-left: 3px solid var(--prussian); background: #f3f5f7; font-size: 0.95rem; }
.pdf-status.is-error { border-left-color: var(--danger); background: #fbf1f1; }
.player-links { align-items: baseline; }
.player-links .link-btn { font-size: 0.95rem; }
.player-links .link-btn:disabled { opacity: 0.5; cursor: default; }

/* ---------- Bandeau d'annonce ---------- */
.annonce { background: var(--marker-soft); border-bottom: 1px solid #e6d36a; }
.annonce-inner { max-width: 60rem; margin: 0 auto; padding: 0.6rem 1.25rem; display: flex; gap: 1rem; align-items: flex-start; }
.annonce p { margin: 0; flex: 1; }
.annonce-x { flex: none; font: inherit; font-size: 1.4rem; line-height: 1; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 0 0.25rem; }
.annonce-x:hover { color: var(--prussian); }

/* ---------- Aide « ? » ---------- */
.aidebtn { position: fixed; right: 1.2rem; bottom: 4.4rem; z-index: 900; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); font: 700 1.35rem/1 var(--serif); cursor: pointer; box-shadow: 0 4px 14px rgba(27, 35, 48, 0.14); display: flex; align-items: center; justify-content: center; padding: 0; }
.aidebtn:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 560px) { .aidebtn { right: 1rem; bottom: 4rem; width: 2.5rem; height: 2.5rem; } }
@media print { .aidebtn { display: none !important; } }
.dlg-aide { width: min(38rem, calc(100vw - 2rem)); }
.aide-texte p { margin: 0 0 0.75rem; }
.dlg-aide .dlg-foot { flex-wrap: wrap; }

/* ---------- Visite guidée ---------- */
.tour { position: fixed; inset: 0; z-index: 3000; }
.tour-catch { position: fixed; inset: 0; }
.tour-hole { position: fixed; border-radius: 8px; box-shadow: 0 0 0 200vmax rgba(27, 35, 48, 0.55); outline: 2px solid var(--marker); transition: all 0.2s ease; pointer-events: none; }
.tour-bubble { position: fixed; background: var(--sheet); color: var(--ink); border-radius: 10px; padding: 1rem 1.1rem 0.85rem; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3); }
.tour-n { margin: 0; color: var(--pencil); font-size: 0.82rem; }
.tour-t { margin: 0.1rem 0 0.35rem; font-family: var(--serif); font-size: 1.2rem; }
.tour-x { margin: 0 0 0.85rem; font-size: 0.97rem; }
.tour-foot { display: flex; align-items: center; gap: 0.5rem; }
.tour-foot .link-btn { font-size: 0.88rem; }
.tour-sp { flex: 1; }
@media (prefers-reduced-motion: reduce) { .tour-hole { transition: none; } }

/* ---------- Choix des partitions d'un programme ---------- */
.prog-pick { list-style: none; margin: 0.5rem 0 1.25rem; padding: 0; border-top: 1px solid var(--rule); }
.pick { display: flex; align-items: center; gap: 0.75rem; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--rule-soft); background: var(--paper); }
.pick input[type=checkbox] { width: 1.15rem; height: 1.15rem; flex: none; accent-color: var(--prussian); }
.pick-pos { min-width: 1.6rem; color: var(--pencil); font-variant-numeric: tabular-nums; }
.pick:not(.is-in) .pick-pos { min-width: 0; }
.pick-title { flex: 1; }
.pick:not(.is-in) .pick-title { color: var(--pencil); }
.pick-handle { flex: none; width: 2.2rem; height: 2.2rem; border: 0; background: none; color: var(--pencil); cursor: grab; touch-action: none; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.pick-handle svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.pick-handle:hover { background: var(--rule-soft); color: var(--ink); }
.pick.is-dragging { background: var(--marker-soft); box-shadow: 0 6px 18px rgba(27, 35, 48, 0.15); position: relative; z-index: 2; }
.pick.is-dragging .pick-handle { cursor: grabbing; }
.pick.is-in + .pick:not(.is-in) { border-top: 2px solid var(--rule); }
.danger-zone > .btn, .danger-zone > button { justify-self: start; }

/* ---------- Parties du groupe ---------- */
.parts { border-top: 1px solid var(--rule); margin: 1.25rem 0; }
.part { border-bottom: 1px solid var(--rule); }
.part summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 1rem; padding: 0.75rem 0.25rem; }
.part summary::-webkit-details-marker { display: none; }
.part summary:hover { background: var(--rule-soft); }
.part-name { font-weight: 600; }
.part-kw { grid-column: 1; color: var(--pencil); font-size: 0.95rem; }
.part-edit { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--prussian); font-size: 0.95rem; text-decoration: underline; text-underline-offset: 0.18em; }
.part[open] .part-edit { visibility: hidden; }
.part-tag { font-weight: 400; font-size: 0.85rem; color: var(--pencil); border: 1px solid var(--rule); border-radius: 999px; padding: 0 0.5rem; margin-left: 0.35rem; }
.part-fields { display: grid; grid-template-columns: 1fr 9rem; gap: 0.9rem 1rem; padding: 0.25rem 0.25rem 1.1rem; align-items: end; }
.part-fields .wide { grid-column: 1 / -1; }
.part-fields label { font-size: 0.97rem; }
.part-fields .danger { color: var(--danger); }
.parts-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
@media (max-width: 560px) { .part-fields { grid-template-columns: 1fr; } }

/* ---------- Zones de dépôt de fichier ---------- */
.dropzone { position: relative; display: grid; justify-items: center; gap: 0.35rem; text-align: center; padding: 1.75rem 1.25rem; border: 2px dashed #b9c3cf; border-radius: 10px; background: var(--sheet); cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.dropzone:hover, .dropzone:focus-within { border-color: var(--prussian); background: #f5f8fb; }
.dropzone.is-over { border-color: var(--prussian); border-style: solid; background: #eaf1f8; }
.dropzone.has-file { border-style: solid; border-color: var(--ok); background: #f4f9f5; }
.dropzone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dz-icon { width: 2.4rem; height: 2.4rem; fill: none; stroke: var(--prussian); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.dz-main { font-weight: 600; font-size: 1.02rem; }
.dz-main u { color: var(--prussian); text-underline-offset: 0.18em; }
.dz-sub { color: var(--pencil); font-size: 0.9rem; }
.dz-file { margin-top: 0.3rem; font-size: 0.95rem; color: var(--ok); font-weight: 600; word-break: break-all; }
.dz-file.is-error { color: var(--danger); font-weight: 400; }
.dz-touch { display: none; }
@media (hover: none) { .dz-desk { display: none; } .dz-touch { display: inline; } }
.tracks-box .tracks { margin-bottom: 0.5rem; }

/* ---------- Discussion du groupe ---------- */
.narrow-wide { max-width: 44rem; }
.group-links { margin: 0.75rem 0 0; display: flex; align-items: center; gap: 0.45rem; }
.posts { list-style: none; margin: 1.5rem 0 1rem; padding: 0; display: grid; gap: 0.6rem; }
.post-day { text-align: center; color: var(--pencil); font-size: 0.85rem; margin: 0.75rem 0 0.1rem; }
.post { border-left: 3px solid var(--rule); padding: 0.35rem 0 0.35rem 0.9rem; }
.post.is-mine { border-left-color: var(--prussian); }
.post.is-new { border-left-color: var(--marker); background: rgba(255, 228, 92, 0.12); }
.post-head { margin: 0; font-size: 0.95rem; display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; align-items: baseline; }
.post-time { color: var(--pencil); font-size: 0.85rem; }
.post-new { font-size: 0.78rem; background: var(--marker); color: var(--ink); border-radius: 999px; padding: 0 0.45rem; }
.post-body { margin: 0.15rem 0 0.1rem; overflow-wrap: anywhere; }
.post form { margin: 0; }
.post-form { max-width: 44rem; margin-top: 1rem; border-top: 1px solid var(--rule); padding-top: 1rem; }
.msg-kind { margin: 0.2rem 0 0; font-size: 0.85rem; color: var(--prussian); font-weight: 600; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.request { max-width: 40rem; }
.request-form { max-width: 40rem; margin-top: 1.5rem; }

/* ---------- Accueil ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.25fr); gap: 2.5rem; align-items: center; padding: 1rem 0 2.5rem; }
.hero h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 2.9rem); line-height: 1.12; margin: 0 0 1rem; letter-spacing: -0.01em; }
.hero .lead { font-size: 1.12rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.5rem 0 0.75rem; }
.hero-shot { margin: 0; }
.hero-shot img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--rule); box-shadow: 0 18px 40px rgba(27, 35, 48, 0.16); }
.home-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; border-top: 1px solid var(--rule); padding-top: 2rem; }
.home-cols h2 { margin-top: 0; }
.feats { margin: 0; }
.feats dt { font-weight: 600; margin-top: 0.9rem; }
.feats dt:first-child { margin-top: 0; }
.feats dd { margin: 0.15rem 0 0; color: var(--pencil); }
.home-test { margin-top: 3rem; padding: 1.75rem 1.75rem 1.5rem; background: var(--marker-soft); border-left: 4px solid var(--marker); max-width: 46rem; }
.home-test h2 { margin-top: 0; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 1.75rem; }
  .home-cols { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ---------- Cartes des groupes ---------- */
.group-cards { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.group-card { position: relative; background: var(--sheet); border: 1px solid var(--rule); border-top: 4px solid var(--prussian); border-radius: 4px; padding: 1rem 1.15rem 1.1rem; display: grid; gap: 0.3rem; align-content: start; transition: border-color 0.15s, box-shadow 0.15s; }
.group-card:hover { border-color: #b9c3cf; border-top-color: var(--prussian-dark); box-shadow: 0 6px 18px rgba(27, 35, 48, 0.08); }
.group-card:focus-within { outline: 3px solid var(--prussian); outline-offset: 2px; }
.group-card.is-pending { border-top-color: var(--rule); }
.gc-kind { margin: 0 0 0.35rem; color: var(--pencil); font-size: 0.85rem; }
.gc-name { margin: 0 0 0.1rem; font-size: 1.35rem; line-height: 1.2; }
.gc-name a { color: var(--ink); text-decoration: none; }
.gc-name a::after { content: ""; position: absolute; inset: 0; }
.gc-name a:focus-visible { outline: none; }
.gc-part { margin: 0; font-size: 0.95rem; }
.gc-part strong { font-weight: 600; color: var(--prussian); }
.gc-meta { margin: 0; color: var(--pencil); font-size: 0.9rem; }
.gc-meta strong { color: var(--ink); font-weight: 600; }
.gc-actions { position: relative; z-index: 1; display: flex; gap: 1rem; align-items: baseline; margin-top: 0.5rem; font-size: 0.92rem; flex-wrap: wrap; }
.gc-actions .mini { flex-basis: 100%; }
.gc-actions details:not([open]) { flex-basis: auto; }

/* ---------- Répertoire : écouter et PDF ---------- */
.rep-row { flex-wrap: wrap; }
.rep-row .row-main { flex: 1 1 18rem; }
.rep-actions { display: flex; align-items: center; gap: 0.5rem 1rem; flex-wrap: wrap; padding: 0.4rem 0; }
.rep-pdf { position: relative; }
.rep-pdf-btn svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rep-pdf-btn[aria-expanded=true] svg { transform: rotate(180deg); }
.rep-menu { position: absolute; right: 0; top: calc(100% + 0.3rem); z-index: 50; min-width: 13rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 10px 28px rgba(27, 35, 48, 0.14); padding: 0.3rem 0; }
.rep-menu button { display: block; width: 100%; text-align: left; font: inherit; font-size: 0.95rem; padding: 0.5rem 0.9rem; background: none; border: 0; color: var(--ink); cursor: pointer; white-space: nowrap; }
.rep-menu button:hover:not(:disabled), .rep-menu button:focus-visible { background: var(--rule-soft); outline: none; }
.rep-menu button:disabled { color: var(--pencil); cursor: default; }
.rep-edit { font-size: 0.92rem; }
.rep-status { flex-basis: 100%; font-size: 0.88rem; color: var(--danger); }
@media (max-width: 640px) { .rep-actions { padding-top: 0; padding-bottom: 0.7rem; } }

/* ---------- Démonstration de l'accueil ---------- */
.demo-launch { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 8px; }
.demo-launch img { transition: filter 0.2s; }
.demo-launch:hover img, .demo-launch:focus-visible img { filter: brightness(0.9); }
.demo-cta { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.2rem 0.7rem 0.95rem; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: 1rem; box-shadow: 0 8px 24px rgba(27, 35, 48, 0.3); white-space: nowrap; }
.demo-cta svg { width: 1.3rem; height: 1.3rem; fill: var(--mine); }
.demo-launch:hover .demo-cta { background: var(--prussian); }
.hero-shot figcaption { margin-top: 0.6rem; }
.demo { border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--sheet); box-shadow: 0 18px 40px rgba(27, 35, 48, 0.16); }
.demo-sheet { height: min(26rem, 62vh); overflow-y: auto; position: relative; background: #fff; }
.demo-bar { display: flex; align-items: center; gap: 0.5rem 0.75rem; flex-wrap: wrap; padding: 0.55rem 0.7rem; background: var(--ink); color: #eef1f5; }
.demo-play { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: var(--paper); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.demo-play:disabled { opacity: 0.4; cursor: default; }
.demo-play svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.demo-play .i-pause, .demo.is-playing .demo-play .i-play { display: none; }
.demo.is-playing .demo-play .i-pause { display: block; }
.demo-pos { font-variant-numeric: tabular-nums; font-size: 0.9rem; min-width: 5.5rem; color: #c9d2de; }
.demo-voices { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.demo-voices button { font: inherit; font-size: 0.82rem; color: #dfe4ea; background: transparent; border: 1px solid #56637a; border-radius: var(--radius); padding: 0.25rem 0.55rem; cursor: pointer; }
.demo-voices button[aria-pressed=true] { background: var(--mine); border-color: var(--mine); color: var(--ink); }
.demo-speed-l { display: flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: #c9d2de; }
.demo-speed { background: #263043; color: #fff; border-color: #45526a; padding: 0.2rem 0.4rem; font-size: 0.85rem; }
.demo-close { margin-left: auto; width: 2rem; height: 2rem; border: 1px solid #56637a; border-radius: var(--radius); background: transparent; color: #dfe4ea; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.demo-status { margin: 0; padding: 0.45rem 0.75rem; font-size: 0.88rem; background: #f3f5f7; border-top: 1px solid var(--rule); }

/* ---------- Tempo à 100 % ---------- */
.tempo-field { display: grid; gap: 0.4rem; margin: 1rem 0 1.25rem; }
.tempo-input { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.tempo-input input { width: 5.5rem !important; text-align: center; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.tempo-input .btn { min-width: 2.6rem; font-size: 1.2rem; padding: 0.45rem 0.6rem; }
.tempo-unit { color: var(--pencil); margin-left: 0.25rem; }
.demo-tempo { font-size: 0.85rem; color: #c9d2de; font-variant-numeric: tabular-nums; }

/* ---------- Enregistrements ---------- */
.audio-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.audio-item { border: 1px solid var(--rule); border-radius: 8px; padding: 0.7rem 0.9rem; background: var(--sheet); display: grid; gap: 0.45rem; }
.audio-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.25rem 1rem; flex-wrap: wrap; }
.audio-item audio { width: 100%; height: 2.5rem; }
.audio-form { max-width: 40rem; margin-top: 1rem; }
.recs { margin: 0 0 1rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--sheet); padding: 0.6rem 0.9rem; }
.recs summary { cursor: pointer; font-weight: 600; }
.recs .audio-list { margin-top: 0.6rem; }
.recs .audio-item { border: 0; padding: 0.3rem 0; background: none; border-top: 1px solid var(--rule-soft); border-radius: 0; }
.rec-count { margin-left: 0.6rem; font-size: 0.85rem; color: var(--prussian); }
.rec-count::before { content: "♪ "; }
.audio-form .grid-2 { align-items: end; }

/* ---------- Bulle de confirmation (« Enregistré ») : s'efface seule, même sans JavaScript ---------- */
.bulle {
  position: fixed; top: 4.1rem; left: 50%; z-index: 2500; transform: translateX(-50%);
  max-width: min(30rem, calc(100vw - 2rem)); padding: 0.4rem 0.95rem 0.4rem 0.75rem;
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: #f0f7f1; color: var(--ok); border: 1px solid #b7d6bd; border-radius: 999px;
  font-size: 0.92rem; font-weight: 600; box-shadow: 0 4px 14px rgba(27, 35, 48, 0.1);
  animation: bulle-fin 0.3s ease 2s forwards; pointer-events: none;
}
.bulle::before { content: ""; width: 0.95rem; height: 0.95rem; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.bulle.is-error { background: #fbf1f1; color: var(--danger); border-color: #e3bcbc; }
.bulle.is-error::before { display: none; }
@keyframes bulle-fin { to { opacity: 0; transform: translate(-50%, -0.4rem); visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .bulle { animation-duration: 0.01s; } }
@media print { .bulle { display: none; } }

/* ---------- Boutons du groupe dans l'en-tête ---------- */
.group-nav { display: flex; gap: 0.25rem; margin-left: auto; }
.group-nav + .top-nav { margin-left: 0.5rem; }
.group-nav a { padding: 0.4rem 0.75rem; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 0.95rem; border: 1px solid transparent; white-space: nowrap; }
.group-nav a:hover { background: var(--rule-soft); color: var(--ink); }
.group-nav a.on { border-color: var(--ink); font-weight: 600; }
@media (max-width: 720px) {
  .group-nav { order: 10; flex-basis: 100%; margin: 0.15rem 0 0 -0.5rem; overflow-x: auto; scrollbar-width: none; }
  .group-nav::-webkit-scrollbar { display: none; }
  .group-nav + .top-nav { margin-left: auto; }
  .crumb { max-width: 45vw; }
}

/* ---------- En-tête des pages du groupe ---------- */
.group-head h1 { margin-bottom: 0.4rem; }
.my-part { margin-top: 1rem; align-items: center; }
.my-part-hint { flex: 1 1 100%; margin: 0; color: var(--pencil); font-size: 0.88rem; }

/* ---------- Programmes en pleine largeur ---------- */
.prog-blocks { display: grid; gap: 2.25rem; margin-top: 1rem; }
.prog-block { background: var(--paper); }
.prog-head { display: flex; align-items: baseline; gap: 0.4rem 1rem; flex-wrap: wrap; border-bottom: 1px solid var(--ink); padding-bottom: 0.35rem; }
.prog-block.is-featured .prog-head { border-bottom-width: 3px; }
.prog-head h3 { margin: 0; font-size: 1.35rem; }
.prog-head h3 a { color: var(--ink); text-decoration: none; }
.prog-head h3 a:hover { text-decoration: underline; }
.prog-head .date { margin: 0; color: var(--pencil); font-size: 0.95rem; }
.prog-tools { margin: 0 0 0 auto; display: flex; gap: 1rem; font-size: 0.92rem; }
.prog-desc { margin: 0.5rem 0 0; color: var(--pencil); font-size: 0.97rem; }
.prog-block .rows { border-top: 0; }
.drag-hint { margin: -0.25rem 0 0; }

/* Poignée de glisser-déposer */
.drag-handle { flex: none; align-self: center; width: 2rem; height: 2.2rem; border: 0; background: none; color: var(--pencil); cursor: grab; touch-action: none; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.drag-handle svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
.drag-handle:hover { background: var(--rule-soft); color: var(--ink); }
.prog-head .drag-handle { align-self: center; margin-left: -0.35rem; }
[data-sortable] > .is-dragging { position: relative; z-index: 5; background: #eef3f8; box-shadow: 0 8px 22px rgba(27, 35, 48, 0.16); }
[data-sortable] > .is-dragging .drag-handle { cursor: grabbing; }
.rep-row .drag-handle { margin-left: -0.35rem; }
@media (max-width: 420px) { .hide-xs { display: none; } }

/* ---------- Lecteur des enregistrements ---------- */
.ap-ui { display: grid; gap: 0.45rem; }
.ap-row { display: flex; align-items: center; gap: 0.5rem 0.65rem; flex-wrap: wrap; }
.ap-play { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 0; background: var(--prussian); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0; }
.ap-play:hover { background: var(--prussian-dark); }
.ap-play svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
.ap-play .i-pause, .ap.is-playing .ap-play .i-play { display: none; }
.ap.is-playing .ap-play .i-pause { display: inline; }
.ap-seek { flex: 1 1 10rem; min-width: 8rem; accent-color: var(--prussian); height: 1.4rem; }
.ap-time { font-variant-numeric: tabular-nums; font-size: 0.9rem; color: var(--pencil); min-width: 6.2rem; text-align: right; }
.ap-small { font: inherit; font-size: 0.88rem; min-width: 2.1rem; height: 2.1rem; padding: 0 0.45rem; border: 1px solid #b9c3cf; border-radius: var(--radius); background: var(--sheet); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 0.2rem; justify-content: center; }
.ap-small:hover:not(:disabled) { border-color: var(--prussian); color: var(--prussian); }
.ap-small:disabled { opacity: 0.4; cursor: default; }
.ap-small svg { width: 0.9rem; height: 0.9rem; fill: currentColor; }
.ap-opts { gap: 0.4rem 1.25rem; font-size: 0.92rem; }
.ap-step { display: inline-flex; align-items: center; gap: 0.3rem; }
.ap-step-l { color: var(--pencil); margin-right: 0.15rem; }
.ap-val { min-width: 3.1rem; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.ap-unit { color: var(--pencil); font-size: 0.85rem; }
.ap-loop { font-size: 0.92rem; }
.ap-reset, .ap-propose { font-size: 0.88rem; }
.ap-hint { margin: 0; font-size: 0.85rem; color: var(--pencil); }
.audio-item.is-mine { border-left: 3px solid var(--prussian); }
.voice-tag { font-size: 0.8rem; font-weight: 400; border: 1px solid #9fb2c8; color: var(--prussian); border-radius: 999px; padding: 0 0.5rem; white-space: nowrap; font-family: var(--sans); vertical-align: 0.1em; }
.voice-tag.is-all { border-color: var(--rule); color: var(--pencil); }
.mine-tag { font-size: 0.8rem; color: #fff; background: var(--prussian); border-radius: 999px; padding: 0 0.5rem; }
.audio-head { justify-content: flex-start; }
.audio-head .audio-dl { margin-left: auto; }
.audio-defaults summary { cursor: pointer; color: var(--prussian); font-size: 0.95rem; }
.audio-defaults[open] { display: grid; gap: 0.6rem; }
.recs .ap-ui { padding-bottom: 0.3rem; }

/* Ajouter un morceau : partition ou enregistrements seulement */
.mode-pick { display: inline-flex; border: 1px solid #b9c3cf; border-radius: 8px; overflow: hidden; margin: 0.5rem 0 1.5rem; }
.mode-pick a { padding: 0.5rem 1rem; color: var(--ink); text-decoration: none; font-size: 0.97rem; }
.mode-pick a + a { border-left: 1px solid #b9c3cf; }
.mode-pick a.on { background: var(--ink); color: #fff; }
.mode-pick a:not(.on):hover { background: var(--rule-soft); }
.audio-voices { border-top: 1px solid var(--rule); padding-top: 0.6rem; }
.audio-voices-t { margin: 0 0 0.4rem; font-size: 0.97rem; }
.audio-voices ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.audio-voices li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; font-size: 0.95rem; }
.audio-voices li span { overflow-wrap: anywhere; }
@media (max-width: 560px) { .ap-time { min-width: 0; } .mode-pick a { padding: 0.5rem 0.7rem; font-size: 0.92rem; } }
.dz-err { display: block; color: var(--danger); font-weight: 400; }
.sub-h { margin: 2.25rem 0 0.4rem; }

/* ---------- Administration : statistiques et membres ---------- */
.stats { display: flex; gap: 0.75rem 2rem; flex-wrap: wrap; margin: 0.5rem 0 1.25rem; font-size: 0.92rem; color: var(--pencil); }
.stats b { display: block; font: 600 1.45rem/1.2 var(--serif); color: var(--ink); }
.seg { display: inline-flex; border: 1px solid #b9c3cf; border-radius: 6px; overflow: hidden; font-size: 0.9rem; }
.seg a { padding: 0.3rem 0.7rem; color: var(--ink); text-decoration: none; }
.seg a + a { border-left: 1px solid #b9c3cf; }
.seg a.on { background: var(--ink); color: #fff; }
.hist { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-top: 6px; border-bottom: 1px solid var(--rule); max-width: 52rem; }
.hist .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.hist .b { display: block; width: 70%; max-width: 26px; background: var(--prussian); border-radius: 3px 3px 0 0; }
.hist .col:hover .b { background: var(--prussian-dark); }
.hist .l { font-size: 0.7rem; color: var(--pencil); height: 1rem; line-height: 1rem; margin-top: 3px; white-space: nowrap; }
.hist.serre { gap: 1px; }
.hist.serre .b { width: 90%; }
.deux { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0.5rem 2.25rem; }
table.hbar { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
table.hbar td { padding: 0.2rem 0.4rem 0.2rem 0; white-space: nowrap; }
table.hbar td.t { width: 55%; }
table.hbar td.t span { display: block; height: 0.6rem; background: var(--prussian); border-radius: 2px; }
table.hbar td.n, .table .n { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.stats-users tr.is-idle td { color: var(--pencil); }
.members-all .mg { display: block; }
.post-actions { display: flex; gap: 0.25rem 1rem; align-items: baseline; flex-wrap: wrap; }
.post-edit summary { cursor: pointer; color: var(--prussian); font-size: 0.92rem; text-decoration: underline; text-underline-offset: 0.18em; list-style: none; }
.post-edit summary::-webkit-details-marker { display: none; }
.post-edit[open] { flex-basis: 100%; }
.post-edit[open] summary { margin-bottom: 0.4rem; }
.post-edit textarea { max-width: 40rem; }
