/* ============================================================
   SHUFFLE DRUMMER — Onglets bas, TIMESHIFT, FX pane, EQ courbes, info pane
   ============================================================ */
  /* FX */
  .fx-col { display: flex; flex-direction: column; gap: 7px; justify-content: center; min-width: 120px; align-items: center; }

  /* ── Global Pitch fader (permanent, right of FX knobs) ── */
  .gpitch-col {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    margin-left: 12px;
    user-select: none;
  }
  .gpitch-inner {
    display: flex; flex-direction: row; align-items: center; gap: 5px;
  }
  .gpitch-scale {
    display: flex; flex-direction: column; justify-content: space-between;
    height: 120px; padding: 0;
    font-size: 11px; color: #555; text-align: right; line-height: 1;
    font-family: monospace; font-weight: 700;
  }
  .gpitch-track {
    position: relative; width: 22px; height: 120px;
    display: flex; justify-content: center;
    cursor: ns-resize; touch-action: none;
  }
  .gpitch-slot {
    width: 6px; height: 100%;
    background: #252525;
    border-radius: 3px;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.9);
    border: 1px solid #1a1a1a;
  }
  .gpitch-zero {
    position: absolute; left: 0; right: 0; top: 50%; margin-top: -1px;
    height: 2px; background: #ff7a1a; opacity: 0.6; pointer-events: none;
  }
  /* graduation ticks */
  .gpitch-tick {
    position: absolute; right: 0; width: 5px; height: 1px;
    background: #444; pointer-events: none;
  }
  .gpitch-thumb {
    position: absolute; left: 50%; margin-left: -11px;
    width: 22px; height: 14px; border-radius: 2px;
    background: linear-gradient(180deg, var(--accent-bright), var(--accent-deep));
    border: 1px solid var(--accent-light);
    box-shadow: 0 1px 4px rgba(0,0,0,0.7), 0 0 7px var(--accent-glow-40);
    cursor: ns-resize; top: calc(50% - 7px);
  }
  .gpitch-label {
    font-size: 10px; letter-spacing: 0.16em; color: var(--text-knob);
    white-space: nowrap; margin-top: 2px;
  }
  .gpitch-val {
    font-size: 10px; color: var(--text-knob);
    font-family: monospace; font-weight: 700; white-space: nowrap;
  }
  .bottom-comp {
    background: var(--surface-mid2);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-panel);
    margin-bottom: 10px;
    overflow: hidden;
    height: 370px;
    display: flex;
    flex-direction: column;
  }
@media (max-width: 760px) {
  .gpitch-col { display: none !important; }
}

  .bottom-tabs {
    display: flex;
    border-bottom: 1px solid #141518;
    flex-shrink: 0;
  }
  .btab {
    flex: 1; padding: 6px 4px 6px;
    font-size: 12px; letter-spacing: 0.18em; font-weight: 700;
    font-family: inherit; cursor: pointer;
    background: none; border: none; color: var(--text-knob);
    border-bottom: 2px solid transparent;
    transition: color 120ms, border-color 120ms, background 120ms;
    text-align: center;
    /* Centrage vertical + pas de retour à la ligne : sinon le label le plus
       large ("SEQUENCER") passait sur 2 lignes et son texte remontait de ~7px
       par rapport aux autres onglets (cf. retour utilisateur). */
    display: flex; align-items: center; justify-content: center;
    white-space: nowrap;
  }
  .btab:hover { color: #5a5650; background: rgba(0,0,0,0.06); }
  .btab.active { color: var(--accent); border-bottom-color: var(--accent); text-shadow: 0 1px 3px rgba(0,0,0,0.8); background: rgba(0,0,0,0.18); }
  .btab-dot {
    display: inline-block; width: 4px; height: 4px; border-radius: 50%;
    background: var(--accent); margin-left: 4px; vertical-align: middle;
    opacity: 0; transition: opacity 200ms;
  }
  .btab-dot.visible { opacity: 1; }
  .btab-settings { flex: 0 0 36px; font-size: 19px; }
  .settings-info-btn {
    font-size: 11px; letter-spacing: 0.14em; padding: 2px 7px; border-radius: 3px;
    border: 1px solid #9a9690; background: none; color: #2e2922;
    cursor: pointer; font-family: inherit;
  }
  .settings-info-btn.on { color: var(--accent-bright); border-color: var(--accent); }
  /* Titres de sections dans le panneau MASTER */
  .pane-section-title {
    font-size: 12px;
    letter-spacing: 0.22em;
    color: #1a1612;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
  }
  /* Bouton bypass/active (EQ, Compresseur, Limiter) */
  .pane-bypass-btn {
    font-size: 10px; letter-spacing: 0.12em; padding: 5px 14px;
    border-radius: 4px; border: none; cursor: pointer;
    font-family: inherit; font-weight: 700;
    background: #8b1a1a;
    color: #ff8080;
    box-shadow: 0 0 8px rgba(192,57,43,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  }
  .pane-bypass-btn.is-active {
    background: #1a4d2e;
    color: #5dde8a;
    box-shadow: 0 0 8px rgba(39,174,96,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
  }

  .bottom-pane {
    display: none; padding: 9px 10px 8px;
    overflow-y: auto; flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #ff7a1a44 #1a1814;
  }
  .bottom-pane.active { display: block; }
  .bottom-pane::-webkit-scrollbar { width: 4px; }
  .bottom-pane::-webkit-scrollbar-track { background: #111018; border-radius: 2px; }
  .bottom-pane::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff7a1a, #ff4a0a88);
    border-radius: 2px;
    border: 1px solid #2a1a0a;
  }
  .bottom-pane::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff9a3a, #ff6a1a);
  }

  /* TIMESHIFT pane */
  .ts-pane-header {
    display: flex; justify-content: flex-end; margin-bottom: 8px;
  }
  .ts-reset-all {
    font-size: 11px; letter-spacing: 0.14em; color: var(--text-deep);
    background: none; border: 1px solid var(--muted-border); border-radius: 3px;
    padding: 2px 7px; cursor: pointer; font-family: inherit;
  }
  .ts-reset-all:hover { color: var(--accent); border-color: var(--accent); }
  .ts-rows { display: flex; flex-direction: column; gap: 5px; }
  .ts-row { display: flex; align-items: center; gap: 6px; }
  .ts-track-label {
    width: 26px; font-size: 11px; letter-spacing: 0.12em;
    text-align: right; flex-shrink: 0;
  }
  .ts-slider-wrap {
    flex: 1; position: relative; height: 22px;
    display: flex; align-items: center;
    cursor: ew-resize; touch-action: none;
  }
  .ts-track-bg {
    position: absolute; left: 0; right: 0; height: 4px;
    background: var(--fader-slot); border-radius: 2px;
    box-shadow: inset 0 1px 2px var(--black);
  }
  .ts-center-tick {
    position: absolute; left: 50%; width: 1px; height: 10px;
    margin-left: -0.5px; background: var(--metal-dark); top: 50%; margin-top: -5px;
  }
  .ts-fill {
    position: absolute; top: 50%; height: 4px; margin-top: -2px;
    background: var(--accent); opacity: 0.5; border-radius: 1px;
    pointer-events: none; display: none;
  }
  .ts-thumb {
    position: absolute; top: 50%; margin-top: -10px;
    width: 20px; height: 20px; border-radius: 4px;
    background: linear-gradient(180deg,var(--metal-mid),var(--metal-dark));
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px var(--shadow-strong);
    transform: translateX(-50%);
  }
  .ts-thumb.active {
    background: linear-gradient(180deg,var(--accent-bright),var(--accent-deep));
    border-color: var(--accent-light);
    box-shadow: 0 2px 5px var(--shadow-strong), 0 0 8px var(--accent-glow-40);
  }
  .ts-value {
    width: 34px; font-size: 11px; letter-spacing: 0.08em;
    color: var(--text-deep); text-align: left; flex-shrink: 0; white-space: nowrap;
  }
  .ts-value.nonzero { color: var(--accent-bright); }
  .ts-shuf-btn {
    width: 22px; height: 22px; border-radius: 4px; flex-shrink: 0;
    background: linear-gradient(180deg,var(--metal-mid),var(--metal-dark));
    border: 1px solid var(--border-color); color: var(--border-color);
    font-size: 10px; cursor: pointer; font-family: inherit;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 4px var(--shadow-deep);
    transition: color 100ms, border-color 100ms, box-shadow 100ms;
    user-select: none;
  }
  .ts-shuf-btn:hover { color: var(--accent-bright); border-color: var(--accent-bright); box-shadow: 0 2px 4px var(--shadow-deep), 0 0 6px rgba(255,148,64,0.35); }
  .ts-shuf-btn:active { }
  .ts-shuf-btn.lit { color: var(--accent-bright); border-color: var(--accent-bright); box-shadow: 0 2px 4px var(--shadow-deep), 0 0 8px rgba(255,122,26,0.45); }

  /* FX pane */
  .fx-pane-grid {
    display: flex; flex-direction: row; gap: 16px; align-items: flex-start;
  }
  .fx-left-col {
    display: flex; flex-direction: column; gap: 6px;
    flex: 0 0 auto; min-width: 220px; max-width: 340px; width: 45%;
  }
  .fx-right-col {
    flex: 1 1 auto; min-height: 100px;
  }
  .fx-row {
    display: flex; flex-direction: column; gap: 4px;
  }
  .fx-row-header {
    display: flex; justify-content: space-between; align-items: baseline;
  }
  .fx-row-label {
    font-size: 11px; letter-spacing: 0.2em; color: var(--text-deep); font-weight: 700;
  }
  .fx-slider-wrap {
    position: relative; height: 22px; display: flex; align-items: center;
    cursor: ew-resize; touch-action: none;
    padding: 0 10px;
  }
  .fx-slot {
    position: absolute; left: 10px; right: 10px; height: 4px;
    background: var(--fader-slot); border-radius: 2px; box-shadow: inset 0 1px 2px var(--black);
  }
  .fx-fill {
    position: absolute; left: 10px; top: 50%; height: 4px; margin-top: -2px;
    background: var(--accent); opacity: 0.4; border-radius: 1px; pointer-events: none;
  }
  .fx-thumb-h {
    position: absolute; top: 50%; margin-top: -10px;
    width: 20px; height: 20px; border-radius: 4px;
    background: linear-gradient(180deg,var(--metal-mid),var(--metal-dark));
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px var(--shadow-strong);
    transform: translateX(-50%);
  }
  .fx-thumb-h.lit {
    background: linear-gradient(180deg,var(--accent-bright),var(--accent-deep));
    border-color: var(--accent-light);
    box-shadow: 0 2px 5px var(--shadow-strong), 0 0 8px rgba(255,122,26,0.35);
  }
  .fx-val {
    font-size: 11px; color: var(--text-knob); letter-spacing: 0.08em; text-align: right;
  }
  .fx-val.lit { color: var(--accent-bright); }

  /* ── DELAY SYNC (sélecteur de valeur musicale sous le slider DELAY) ── */
  .delay-sync-row {
    display: flex; flex-wrap: wrap; gap: 4px;
    padding: 2px 10px 4px;
    margin-top: -6px;
  }
  .delay-sync-btn {
    font-size: 9px; font-family: var(--font-mono, monospace);
    padding: 2px 6px; border-radius: 3px;
    border: 1px solid #555; cursor: pointer;
    background: #3a3a3a; color: #aaa;
    letter-spacing: 0.08em; line-height: 1.4;
    transition: background 80ms, color 80ms, border-color 80ms;
  }
  .delay-sync-btn:hover { background: #484848; color: #ccc; border-color: #777; }
  .delay-sync-btn.active {
    background: var(--accent); color: #000;
    border-color: var(--accent-bright); font-weight: 700;
    box-shadow: 0 0 6px rgba(255,122,26,0.4);
  }

  /* ── LUFS METER ─────────────────────────── */
  .lufs-main {
    display:flex; align-items:baseline; justify-content:center; gap:10px;
    margin-bottom:10px;
  }
  .lufs-m-num {
    font-size:38px; font-weight:700; color:#4ddf4d;
    letter-spacing:-0.02em; line-height:1;
    font-variant-numeric:tabular-nums; min-width:4.5ch; text-align:right;
    transition:color 0.15s;
  }
  .lufs-m-unit {
    font-size:10px; letter-spacing:0.12em; color:#8a8580; line-height:1.5;
  }
  .lufs-scale-wrap { margin-bottom:8px; }
  .lufs-bar-bg {
    position:relative; height:14px; border-radius:4px; overflow:hidden;
    border:1px solid #1a1814;
    /* zones colorées en fond : -30→-14 vert, -14→-9 jaune, -9→-6 orange, -6→ rouge */
    background:linear-gradient(90deg,
      #0d3318 0%, #0d3318 66.67%,
      #3d2e00 66.67%, #3d2e00 87.5%,
      #3d1400 87.5%, #3d1400 100%);
  }
  .lufs-fill {
    position:absolute; left:0; top:0; bottom:0; width:0%;
    border-radius:3px; opacity:0.85;
    transition:width 80ms, background 120ms;
  }
  .lufs-needle {
    position:absolute; top:0; bottom:0; width:2px; left:0%;
    background:#fff; border-radius:1px;
    box-shadow:0 0 5px rgba(255,255,255,0.9);
    transition:left 80ms;
  }
  .lufs-scale-labels {
    display:flex; justify-content:space-between; margin-top:3px;
  }
  .lufs-scale-labels span { font-size:8px; color:#4a4540; }
  .lufs-bottom {
    display:flex; justify-content:space-between; align-items:center;
    margin-top:8px; gap:8px;
  }
  .lufs-st {
    display:flex; align-items:baseline; gap:5px;
    background:#0d0d10; border:1px solid #1e1c18;
    border-radius:3px; padding:3px 8px;
  }
  .lufs-st-label { font-size:8px; color:#5a5550; letter-spacing:0.1em; }
  .lufs-st-val { font-size:12px; color:#aaa8a0; font-weight:600; }
  .lufs-targets { display:flex; gap:4px; }
  .lufs-badge {
    font-size:7.5px; letter-spacing:0.08em; color:#5a5550;
    background:#0d0d10; border:1px solid #1e1c18;
    border-radius:3px; padding:3px 5px;
  }

  /* ── MFX PADS (16 pads style SP-404, colonne droite onglet FX) ── */

  /* Pane FX en flex pour que la colonne droite occupe toute la hauteur */
  #pane-fx.active {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  #pane-fx .fx-pane-grid {
    flex: 1;
    min-height: 0;
    align-items: stretch;
  }
  #pane-fx .fx-right-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .mfx-pads-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    flex-shrink: 0;
  }
  .mfx-pads-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #b8b2a8;
  }
  .mfx-btn-group {
    display: flex;
    gap: 5px;
    align-items: center;
  }
  .mfx-toggle-all-btn {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 2px 9px;
    border-radius: 3px;
    border: 1.5px solid #1e8449;
    background: #27ae60;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
  }
  .mfx-toggle-all-btn:hover {
    background: #2ecc71;
    border-color: #27ae60;
  }
  .mfx-toggle-all-btn.mfx-toggle-off {
    background: #c0392b;
    color: #fff;
    border-color: #a93226;
  }
  .mfx-toggle-all-btn.mfx-toggle-off:hover {
    background: #e74c3c;
    border-color: #c0392b;
  }
  .mfx-reset-all-btn {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 2px 9px;
    border-radius: 3px;
    border: 1.5px solid #9a9690;
    background: #b8b4ae;
    color: #2e2922;
    cursor: pointer;
    transition: background 0.15s;
  }
  .mfx-reset-all-btn:hover {
    background: #ccc8c2;
  }
  .mfx-pads-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 4px;
    margin-top: 6px;
  }
  .mfx-pad-btn {
    width: 100%;
    height: 100%;
    font-size: 8px;
    font-family: inherit;
    font-weight: 700;
    letter-spacing: 0.10em;
    line-height: 1.35;
    text-align: center;
    cursor: ns-resize;
    border-radius: 4px;
    border: 1px solid #9a9690;
    background: #b8b4ae;
    color: #2e2922;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.3);
    transition: background 100ms, color 100ms, border-color 100ms, box-shadow 100ms;
    padding: 0;
    user-select: none;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  @keyframes mfx-pad-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.7; }
  }
  .mfx-pad-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    transition: height 60ms linear;
  }
  .mfx-pad-btn.mfx-pad-active .mfx-pad-fill {
    background: #ff7a1a;
    animation: mfx-pad-pulse 0.55s ease-in-out infinite;
  }
  .mfx-pad-label {
    position: relative;
    z-index: 1;
    pointer-events: none;
    padding: 2px;
    font-size: 10px;
    color: #222;
    text-shadow: none;
  }
  .mfx-pad-btn:hover {
    border-color: #7a7670;
    background: #a8a49e;
  }
  .mfx-pad-btn.mfx-pad-active {
    border: 3px solid #ff7a1a;
    box-shadow: 0 0 0 2px rgba(255,122,26,0.4), 0 0 18px rgba(255,122,26,0.7);
  }
  .mfx-pad-btn.mfx-pad-active .mfx-pad-label {
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9);
    font-size: 11px;
  }
  /* Tinte mémoire : pad utilisé puis désactivé — légère lueur orange */
  .mfx-pad-btn.mfx-pad-used {
    border-color: rgba(255, 122, 26, 0.7);
  }
  .mfx-pad-btn.mfx-pad-used .mfx-pad-fill {
    background: rgba(255, 122, 26, 0.18);
  }
  /* Pad actif mais bypass global ON — contour rouge, fill grisé */
  .mfx-pad-btn.mfx-pad-muted {
    border: 3px solid #c0392b;
    box-shadow: 0 0 0 2px rgba(192,57,43,0.35), 0 0 12px rgba(192,57,43,0.5);
  }
  .mfx-pad-btn.mfx-pad-muted .mfx-pad-fill {
    background: #c0392b;
    animation: none;
    opacity: 0.5;
  }
  .mfx-pad-btn.mfx-pad-muted .mfx-pad-label {
    color: #f5a39a;
  }


  /* INFO pane */
  .info-pane {
    font-size: 13px; letter-spacing: 0.1em; color: var(--text-knob); line-height: 1.8;
  }
  .info-pane b { color: #5a5650; }
  .info-pane .info-row { display: flex; gap: 6px; align-items: baseline; margin-bottom: 3px; }
  .info-pane .info-key { color: var(--accent); min-width: 70px; }

  /* Fader graduation marks */
  .fader-grad {
    position: absolute; left: 50%; width: 36px; margin-left: -18px;
    height: 1px; background: rgba(0,0,0,0.08); pointer-events: none;
  }
  .fader-grad.major {
    width: 36px; margin-left: -18px;
    height: 1px;
    background: rgba(0,0,0,0.14);
  }
  /* Pitch zero line — magnetic center mark */
  .fader-zero {
    position: absolute; left: 50%; width: 36px; margin-left: -18px;
    top: 50%; margin-top: -1px;
    height: 2px; background: var(--accent);
    box-shadow: 0 0 5px rgba(255,122,26,0.7), 0 0 12px rgba(255,122,26,0.3);
    pointer-events: none; display: none;
    z-index: 2;
  }
  .pitch-mode .fader-zero { display: block; }
  .pitch-mode .fader-tick { display: none; }

  /* Vintage popup for double-click shuffle */
  .vintage-dblclick-hint {
    font-size: 8px; color: var(--text-muted); letter-spacing: 0.08em;
    text-align: center; margin-top: 2px;
  }



  /* ── MUTE BOARD (REC LIVE) ── */
  .mute-board {
    margin-top: 10px;
    padding: 8px 6px 6px;
    border: 1px solid #8a8680;
    border-radius: 5px;
    background: rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .mute-board-title {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--text-deep);
    margin-bottom: 2px;
  }
  .mute-board-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }
  .mute-board-all-row {
    margin-top: 2px;
    justify-content: flex-end;
  }
  .mute-board-btn {
    min-width: 32px;
    height: 26px;
    padding: 0 6px;
    font-size: 9px;
    font-family: inherit;
    font-weight: 700;
    letter-spacing: 0.10em;
    cursor: pointer;
    border-radius: 3px;
    border: 1px solid #7a7670;
    background: #3a8c3a;
    color: #e8f8e8;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
    transition: background 60ms, color 60ms, border-color 60ms;
    user-select: none;
  }
  .mute-board-btn.muted {
    background: #8c2a2a;
    color: #f8e0e0;
    border-color: #6a1a1a;
  }
  .mute-board-btn:hover {
    filter: brightness(1.15);
  }
  .mute-board-all-btn {
    background: #555;
    color: #ddd;
    border-color: #444;
    min-width: 36px;
  }
  .mute-board-all-btn:hover {
    background: #666;
  }
