/* StudioTools Playout — thème RCS Zetta Metal (log + on-air) */

:root {
    --vu-width: clamp(108px, 11vmin, 140px);

    /* ── Palette cartwall : gris sombre + accent jaune ── */
    --ct-bg: #141618;
    --ct-surface: #1c1f24;
    --ct-surface-2: #262a31;
    --ct-surface-3: #323842;
    --ct-border: rgba(255, 255, 255, 0.10);
    --ct-border-strong: rgba(255, 255, 255, 0.22);
    --ct-text: #eceff4;
    --ct-text-dim: #9aa3b2;
    --ct-accent: #c9a227;
    --ct-accent-hover: #dbb42e;
    --ct-accent-soft: rgba(201, 162, 39, 0.18);
    --ct-danger: #c53030;
    --ct-success: #3d8f5f;
    --ct-radius: 8px;

    /* ── Tokens playout remappés sur la palette cartwall ── */
    --zt-bg: var(--ct-bg);
    --zt-bg-row: #1a1d22;
    --zt-bg-row-alt: #16181c;
    /* On-air : accent jaune (cohérent avec cartwall .playing) */
    --zt-bg-onair: var(--ct-accent);
    --zt-bg-onair-text: #1a1a1a;
    --zt-bg-onair-border: var(--ct-accent-hover);
    /* Suivant / sélection : surface sombre + liseré jaune */
    --zt-bg-next: #2b3038;
    --zt-bg-selected: #333a44;
    --zt-bg-next-text: var(--ct-text);
    --zt-bg-next-border: var(--ct-accent);
    --zt-bg-hover: var(--ct-surface-2);
    --zt-border: var(--ct-border);
    --zt-text: var(--ct-text);
    --zt-text-dim: var(--ct-text-dim);
    --zt-green-onair: var(--ct-accent);
    --zt-red: var(--ct-danger);
    --zt-orange: var(--ct-accent-hover);
    --zt-mono: 'JetBrains Mono', 'Segoe UI', ui-monospace, monospace;
    --zt-ui: 'DM Sans', system-ui, 'Segoe UI', sans-serif;
    --zt-row-h: 18px;

    /* Boutons plats (remplacent l'ancien skin « métal ») */
    --zt-metal-face: var(--ct-surface-2);
    --zt-metal-pressed: var(--ct-accent-soft);
    --zt-metal-edge: var(--ct-border);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body.zt-app {
    font-family: var(--zt-ui);
    font-size: 11px;
    background: var(--ct-bg);
    color: var(--zt-text);
    display: grid;
    grid-template-columns: var(--vu-width) 1fr;
    grid-template-rows: 1fr 18px;
    grid-template-areas:
        "vu dashboard"
        "vu status";
    overflow: hidden;
}

.zt-dashboard { grid-area: dashboard; }
.zt-statusbar { grid-area: status; }
.vu-sidebar { grid-area: vu; }

body.zt-app .vu-sidebar {
    --surface: #0a0a0a;
    --border: #222;
    --text: var(--zt-text);
    --text-dim: var(--zt-text-dim);
}

.zt-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-height: 0;
    background: #000;
}

/* Rangées Zetta : haut (Horloge · Players · Notes) / bas (Log · Hot Keys · Segue) */
.zt-row {
    display: grid;
    gap: 1px;
    min-height: 0;
}

.zt-row-top {
    grid-template-columns: minmax(0, 2.5fr) minmax(0, 1.15fr);
    height: 40%;
}

/* Colonne droite du haut : Notes (à gauche) + Horloge (à droite de l'écran). */
.zt-top-right {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.72fr);
    gap: 1px;
    min-height: 0;
    min-width: 0;
}

.zt-top-right .zt-quad-clock {
    margin-left: 0; /* neutralise la règle héritée qui décalait le panneau */
}

/* Horloge plus compacte dans la colonne étroite. */
.zt-top-right .zt-clock-time { font-size: clamp(22px, 2.6vw, 38px); }
.zt-top-right .zt-clock-meta { max-width: 100%; }

.zt-row-bot {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.15fr);
    flex: 1;
}

/* ── Panneau Horloge ─────────────────────────────── */
.zt-quad-clock {
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #050505;
    padding: 6px 8px;
    gap: 2px;
}

.zt-clock-date {
    font-size: 12px;
    font-weight: 600;
    color: #cfcfcf;
    text-transform: capitalize;
    line-height: 1.1;
}

.zt-clock-time {
    font-family: var(--zt-mono);
    font-size: clamp(30px, 5vw, 52px);
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    line-height: 1;
    text-shadow: 0 0 12px rgba(255,255,255,0.15);
}

.zt-clock-meta {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    max-width: 200px;
}

.zt-clock-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 2px 8px;
    background: #111;
    border: 1px solid #1e1e1e;
    border-radius: 3px;
}

.zt-clock-lbl {
    font-size: 10px;
    font-weight: 700;
    color: #7d7d7d;
    letter-spacing: 0.1em;
}

.zt-clock-row b {
    font-family: var(--zt-mono);
    font-size: 14px;
    color: #00e000;
}

#clock-gap.zt-gap-over { color: #ff3b3b; }

/* ── Panneau Notes / Pochette ────────────────────── */
.zt-notes-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: #0b0b0b;
}

.zt-notes-art {
    flex: 1;
    min-height: 0;
    width: auto;
    aspect-ratio: 1 / 1;
    max-height: 100%;
    background: #161616 center/cover no-repeat;
    border: 1px solid #262626;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.zt-notes-info { text-align: center; width: 100%; }

.zt-notes-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zt-notes-artist {
    font-size: 11px;
    color: #9a9a9a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zt-notes-album {
    margin-top: 2px;
    font-size: 10px;
    font-style: italic;
    color: #7d7d7d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zt-notes-meta {
    margin-top: 4px;
    font-family: var(--zt-mono, monospace);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #6b93c8;
}

.zt-quad {
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--zt-bg);
    border: none;
    overflow: hidden;
}

.zt-quad-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 8px;
    background: #2a2a2a;
    border-bottom: 1px solid #111;
    flex: none;
    min-height: 22px;
}

.zt-quad-head-onair { background: #252525; }

.zt-station-name {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.zt-onair-date {
    font-size: 10px;
    color: #aaa;
    margin-left: 4px;
}

.zt-quad-title {
    font-size: 10px;
    font-weight: 700;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.zt-quad-clock {
    margin-left: auto;
    font-family: var(--zt-mono);
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.04em;
    line-height: 1;
}

.zt-la-pill {
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    background: #e07020;
    padding: 2px 7px;
    border-radius: 8px;
    text-transform: uppercase;
}

/* ── On-Air now playing bar ─────────────────────────── */

.zt-now-block {
    flex: none;
    padding: 3px 4px;
    background: #0e0e0e;
}

.zt-now-track {
    position: relative;
    height: 42px;
    background: #1a3a1a;
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

.zt-now-countdown {
    position: relative;
    z-index: 2;
    flex: none;
    width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--zt-mono);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,0.35);
    text-shadow: 0 1px 2px #000;
}

.zt-now-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: var(--zt-bg-onair);
    transition: width 0.12s linear;
    pointer-events: none;
}

.zt-now-text {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    padding: 4px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
}

.zt-now-title {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zt-now-artist {
    font-size: 11px;
    color: rgba(0,0,0,0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── On-Air : players simultanés façon Zetta (now/next mixés) ─────────── */
.zt-onair-players {
    display: flex;
    align-items: stretch;
    gap: 4px;
}

.zt-onair-decks {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

/* ── Mix scope AutoMix : 2 ondes temps réel + grille de beats + BPM live ── */
.zt-mixscope {
    display: none;
    width: 100%;
    margin-top: 4px;
}
body.automix-mode .zt-mixscope { display: block; }
.zt-ms-view {
    position: relative;
    width: 100%;
    height: 120px;
    background: #070707;
    border: 1px solid #1c1c1c;
    border-radius: 4px;
    overflow: hidden;
}
.zt-mixscope-canvas { display: block; width: 100%; height: 100%; }
.zt-ms-bpm {
    position: absolute;
    right: 6px;
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-variant-numeric: tabular-nums;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}
.zt-ms-bpm-a { top: 4px; }
.zt-ms-bpm-b { bottom: 4px; }
.zt-ms-bpm .zt-ms-lane { font-size: 10px; font-weight: 700; opacity: 0.9; }
.zt-ms-bpm b { font-size: 15px; font-weight: 700; letter-spacing: 0.3px; }
.zt-ms-bpm .zt-ms-unit { font-size: 8px; opacity: 0.55; }
.zt-ms-bpm-a .zt-ms-lane, .zt-ms-bpm-a b { color: #35d0e0; }
.zt-ms-bpm-b .zt-ms-lane, .zt-ms-bpm-b b { color: #f0a030; }

/* Panneau live des paramètres de transition */
.zt-ms-params {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
    min-height: 20px;
}
.zt-ms-idle { font-size: 11px; color: #666; padding: 2px 2px; }
.zt-ms-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 2px 7px;
    border-radius: 4px;
    background: #141414;
    border: 1px solid #262626;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: #cfcfcf;
    white-space: nowrap;
}
.zt-ms-chip i {
    font-style: normal;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #7a7a7a;
}
.zt-ms-chip-a { border-color: rgba(53, 208, 224, 0.35); }
.zt-ms-chip-a i { color: #35d0e0; }
.zt-ms-chip-b { border-color: rgba(240, 160, 48, 0.35); }
.zt-ms-chip-b i { color: #f0a030; }
.zt-ms-chip-hl { background: #10261f; border-color: rgba(70, 220, 160, 0.4); color: #eafff5; }
.zt-ms-chip-hl i { color: #46dca0; }
.zt-ms-chip-ok { border-color: rgba(70, 200, 120, 0.35); }
.zt-ms-chip-ok i { color: #46c878; }
.zt-ms-chip-warn { border-color: rgba(230, 170, 60, 0.4); }
.zt-ms-chip-warn i { color: #e6aa3c; }

/* Gros bouton Play/Pause façon Zetta (colonne à droite des rangs) */
.zt-onair-bigplay {
    flex: none;
    width: 60px;
    align-self: stretch;
    border: 1px solid #0a0a0a;
    border-radius: 3px;
    background: linear-gradient(#3a3a3a, #1d1d1d);
    color: #eee;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 1px 2px rgba(0,0,0,0.5);
}

.zt-onair-bigplay:hover { background: linear-gradient(#454545, #242424); }
.zt-onair-bigplay:active { background: linear-gradient(#181818, #101010); }

.zt-onair-bigplay.zt-onair-onair {
    color: #00e000;
    text-shadow: 0 0 8px rgba(0,224,0,0.6);
}

/* Ligne de mode (Auto Mode / Live Assist) */
.zt-od-row {
    position: relative;
    display: flex;
    align-items: center;
    height: 40px;
    overflow: hidden;
    border-radius: 2px;
    background: #171717;
}

.zt-od-row.zt-od-active { background: #12331a; }
.zt-od-row.zt-od-out { background: #33300f; }
.zt-od-row.zt-od-paused { filter: saturate(0.5) brightness(0.85); }
.zt-od-row.zt-od-empty { background: #131313; opacity: 0.55; }
/* Élément précalé (à suivre) : visible mais atténué, en attente. */
.zt-od-row.zt-od-cued { background: #16181c; opacity: 0.8; }
.zt-od-cued .zt-od-lane { color: #6b93c8; }
.zt-od-cued .zt-od-title { color: #b8c2cc; }
.zt-od-cued .zt-od-cd { color: #7d8791; }

/* Badge de voie fixe A / B / C */
.zt-od-lane {
    position: relative;
    z-index: 2;
    flex: none;
    width: 18px;
    text-align: center;
    margin-left: 6px;
    margin-right: 2px;
    font: 700 12px/1 "Segoe UI", system-ui, sans-serif;
    color: #7c7c7c;
    letter-spacing: 0.5px;
}
.zt-od-active .zt-od-lane { color: #4fe07a; }
.zt-od-out .zt-od-lane { color: #e0c24f; }
.zt-od-empty .zt-od-title { color: #666; }
.zt-od-empty .zt-od-artist { color: #4a4a4a; }
.zt-od-empty .zt-od-ico { display: none; }

/* Pastille d'icône type (rouge/or/bleu façon Zetta) */
.zt-od-ico {
    position: relative;
    z-index: 2;
    flex: none;
    width: 22px;
    height: 22px;
    margin-left: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    font-size: 12px;
    color: #fff;
    background: #444;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 1px 2px rgba(0,0,0,0.5);
}

.zt-od-ico.ico-song { background: linear-gradient(#e33, #a11); }
.zt-od-ico.ico-jingle { background: linear-gradient(#f0c419, #c99400); color: #3a2c00; }
.zt-od-ico.ico-vt { background: linear-gradient(#3aa0ff, #1668c8); }
.zt-od-ico.ico-url { background: linear-gradient(#37c, #159); }
.zt-od-ico.ico-spot { background: linear-gradient(#9a5cff, #6a1b9a); }
.zt-od-ico.ico-folder { background: linear-gradient(#888, #555); }
.zt-od-ico.zt-od-ico-cover {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Transport par ligne */
.zt-od-tr {
    position: relative;
    z-index: 2;
    flex: none;
    display: flex;
    gap: 2px;
    padding-right: 6px;
}

.zt-od-btn {
    width: 22px;
    height: 26px;
    border: 1px solid #0a0a0a;
    border-radius: 2px;
    background: linear-gradient(#333, #1c1c1c);
    color: #ccc;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.zt-od-btn:hover { color: #fff; background: linear-gradient(#3d3d3d, #232323); }
.zt-od-btn.active { color: #00e000; text-shadow: 0 0 6px rgba(0,224,0,0.5); }

/* Décompte coloré façon Zetta */
.zt-od-cd.zt-cd-green { color: #00e000; text-shadow: 0 0 6px rgba(0,224,0,0.35); }
.zt-od-cd.zt-cd-red { color: #ff3b3b; text-shadow: 0 0 6px rgba(255,59,59,0.45); }

.zt-od-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    z-index: 0;
    pointer-events: none;
    transition: width 0.12s linear;
}

.zt-od-wave {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.zt-od-active .zt-od-fill {
    background: var(--zt-bg-onair, #2ecc40);
    opacity: 0.62;
}

.zt-od-out .zt-od-fill {
    background: #cbb43a;
    opacity: 0.5;
}

.zt-od-text {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
    padding: 3px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
}

.zt-od-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.zt-od-artist {
    font-size: 10px;
    color: rgba(255,255,255,0.78);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.zt-od-cd {
    position: relative;
    z-index: 2;
    flex: none;
    padding: 0 10px 0 6px;
    font-family: var(--zt-mono);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Stack */
.zt-stack {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    background: #101010;
}

.zt-stack-row {
    display: grid;
    grid-template-columns: 1fr auto auto 48px;
    align-items: center;
    gap: 6px;
    height: 20px;
    padding: 0 4px 0 8px;
    border-bottom: 1px solid #1e1e1e;
    font-size: 11px;
    color: #ddd;
}

.zt-stack-row:hover { background: #1c1c1c; }

.zt-stack-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zt-stack-line .zt-stack-artist { color: #888; }

.zt-stack-dur {
    font-family: var(--zt-mono);
    font-size: 10px;
    color: #999;
}

.zt-stack-eta {
    font-family: var(--zt-mono);
    font-size: 10px;
    color: #aaa;
    min-width: 36px;
    text-align: right;
}

.zt-stack-actions { display: flex; gap: 2px; }

.zt-stack-btn {
    width: 14px;
    height: 14px;
    border: none;
    background: transparent;
    color: #ccc;
    font-size: 9px;
    cursor: pointer;
    padding: 0;
    opacity: 0.85;
}

.zt-stack-btn:hover { color: #fff; opacity: 1; }

.zt-onair-transport {
    display: flex;
    gap: 3px;
    padding: 4px 6px;
    background: #222;
    border-top: 1px solid #111;
    flex: none;
}

.zt-tr-btn {
    width: 28px;
    height: 24px;
    border: 1px solid #505050;
    border-top-color: #909090;
    background: linear-gradient(180deg, #ececec 0%, #b8b8b8 100%);
    color: #1a1a1a;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zt-tr-btn:hover { filter: brightness(1.1); }
.zt-tr-play {
    background: linear-gradient(180deg, #50e050 0%, #28a828 100%);
    border-color: #186818;
    color: #fff;
}
.zt-tr-stop {
    background: linear-gradient(180deg, #e85050 0%, #c03030 100%);
    border-color: #901818;
    color: #fff;
}

/* ── Segue panel (bas droite) ───────────────────────── */

.zt-segue-next-lbl { font-size: 10px; color: #888; margin-left: 8px; }
.zt-segue-next-name {
    font-size: 11px;
    font-weight: 600;
    color: #c8a0e8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.zt-segue-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #000;
    padding: 4px;
}

.zt-quad-segue {
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.zt-quad-segue.has-editor {
    display: flex;
    flex-direction: column;
}

.zt-quad-segue .zt-deck-wave {
    flex: 1;
    min-height: 80px;
    height: auto;
}

.zt-segue-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    background: #222;
    border-top: 1px solid #111;
    flex: none;
}

.zt-segue-transport { display: flex; gap: 3px; }

/* ── Chrome ─────────────────────────────────────────────── */

.zt-chrome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    background: var(--zt-chrome-bg);
    border-bottom: 1px solid #2a2a2a;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    gap: 12px;
}

.zt-chrome-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.zt-brand {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 11px;
}

.zt-brand:hover { color: var(--zt-accent); }

.zt-sep { color: var(--zt-text-dim); font-size: 10px; }

.zt-module-name {
    font-weight: 700;
    font-size: 11px;
    color: #fff;
    text-shadow: 0 1px 1px #000;
}

.zt-station {
    font-family: var(--zt-ui);
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: #2a2a2a;
    border: 1px solid #1a1a1a;
    box-shadow: inset 0 0 0 1px #555;
    padding: 1px 8px;
}

.zt-onair-pill {
    font-family: var(--zt-ui);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #fff;
    background: var(--zt-red);
    border: 1px solid #901818;
    padding: 2px 8px;
    text-shadow: 0 1px 0 #000;
    animation: ztBlink 1s step-end infinite;
}

.zt-onair-pill[hidden] { display: none; }

@keyframes ztBlink {
    50% { opacity: 0.55; }
}

.zt-chrome-clock {
    font-family: var(--zt-mono);
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.06em;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.25), 0 1px 2px #000;
    background: #1a1a1a;
    border: 1px solid #0a0a0a;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.8);
    padding: 0 12px;
    line-height: 26px;
}

.zt-out-btn {
    height: 20px;
    padding: 0 8px;
    border: 1px solid #606060;
    border-top-color: #909090;
    border-left-color: #808080;
    background: var(--zt-metal-face);
    color: #1a1a1a;
    font-family: var(--zt-ui);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 1px 0 #fff inset;
}

.zt-out-btn:hover {
    background: linear-gradient(180deg, #fff 0%, #d8d8d8 100%);
}

.zt-out-btn:active {
    background: var(--zt-metal-pressed);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}

.zt-chrome-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.zt-out-lbl {
    font-size: 9px;
    font-weight: 700;
    color: #ccc;
    letter-spacing: 0.08em;
    text-shadow: 0 1px 0 #000;
}

/* ── Tabs (MDI Zetta) ─────────────────────────────────── */

.zt-tabs {
    display: flex;
    gap: 0;
    background: #3a3a3a;
    border-bottom: 1px solid #1a1a1a;
    padding: 2px 4px 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.zt-tab {
    padding: 3px 16px;
    font-size: 11px;
    font-weight: 600;
    color: #bbb;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: 0;
    background: #4a4a4a;
    border-color: #2a2a2a #2a2a2a transparent;
    cursor: pointer;
    font-family: var(--zt-ui);
    margin-right: 2px;
    border-radius: 3px 3px 0 0;
}

.zt-tab:hover:not(.zt-tab-active) {
    background: #555;
    color: #fff;
}

.zt-tab-active {
    color: #fff;
    background: var(--zt-bg);
    border-color: #1a1a1a;
    border-bottom-color: var(--zt-bg);
    position: relative;
    z-index: 1;
    padding-bottom: 4px;
    margin-bottom: -1px;
}

.zt-tab-disabled { opacity: 0.35; cursor: default; }

.zt-tb-jingle { color: #806000 !important; font-weight: 700; }
.zt-tb-vt { color: #005a8a !important; font-weight: 700; }
.zt-tb-toggle.active {
    background: var(--zt-metal-pressed) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
    border-color: #606060 !important;
    color: #1a1a1a !important;
    outline: 2px solid var(--zt-green-onair);
    outline-offset: -3px;
}

/* ── Log module ───────────────────────────────────────── */

.zt-log-module,
.zt-quad-log,
.zt-hotkeys-module,
.zt-quad-hotkeys {
    min-height: 0;
    overflow: hidden;
}

.zt-quad-log {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    background: #141414;
}

.zt-log-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 3px 5px;
    background: linear-gradient(180deg, #4a4a4a 0%, #3a3a3a 100%);
    border-bottom: 1px solid #1a1a1a;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    flex: none;
}

.zt-tb-group {
    display: flex;
    gap: 2px;
    padding-right: 8px;
    border-right: 1px solid #555;
    margin-right: 4px;
}

.zt-tb-btn {
    height: 20px;
    padding: 0 9px;
    border: 1px solid #606060;
    border-top-color: #a0a0a0;
    border-left-color: #909090;
    background: var(--zt-metal-face);
    color: #1a1a1a;
    font-family: var(--zt-ui);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset;
}

.zt-tb-btn:hover {
    background: linear-gradient(180deg, #fff 0%, #d4d4d4 100%);
}

.zt-tb-btn:active,
.zt-tb-btn.active:not(.zt-tb-toggle) {
    background: var(--zt-metal-pressed);
    border-top-color: #505050;
    border-left-color: #606060;
    box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.25);
}

.zt-log-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.zt-log-grid {
    --log-cols: 20px 26px minmax(88px, 1.6fr) minmax(64px, 1fr) minmax(52px, 0.85fr) minmax(74px, 0.95fr) 44px 24px 22px 22px 22px 52px;
}
.zt-log-header,
.queue-item {
    display: grid;
    grid-template-columns: var(--log-cols);
    align-items: center;
    gap: 0;
    height: 22px;
    border-bottom: 1px solid #222;
    font-size: 11px;
}

/* Colonne d'affectation de platine (A/B) */
.qi-deck {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    color: #666;
}
.qi-deck-a { color: #35d0e0; }
.qi-deck-b { color: #f0a030; }
.queue-onair .qi-deck-a,
.queue-onair .qi-deck-b { color: #000; }

/* En-têtes triables + poignées de redimensionnement */
.zt-log-header span[data-sort] { cursor: pointer; position: relative; user-select: none; }
.zt-log-header span[data-sort]:hover { color: #fff; }
.zt-log-header span.log-sorted-asc::after { content: " ▲"; font-size: 8px; opacity: 0.9; }
.zt-log-header span.log-sorted-desc::after { content: " ▼"; font-size: 8px; opacity: 0.9; }
.zt-log-header span { position: relative; }
.col-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    z-index: 2;
}
.col-resizer:hover { background: rgba(255, 255, 255, 0.18); }
body.log-resizing { cursor: col-resize !important; user-select: none !important; }

.qi-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px !important;
}

.qi-cover img {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 2px;
    background: #111;
    display: block;
}

.qi-album {
    color: var(--zt-text-dim);
    font-size: 10px;
}

.queue-onair .qi-album { color: rgba(0, 0, 0, 0.6); }
.queue-next .qi-album { color: rgba(255, 255, 255, 0.75); }

.qi-meta {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: var(--zt-text-dim);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
/* AutoMix : le Segue Editor est masqué (moteur 100 % beatgrid, cues/fades du
   Segue Editor ignorés). Le titre suivant reste précalé automatiquement. */
body.automix-mode #right-panel { display: none !important; }

.qi-meta .qi-bpm { color: #6fc38a; font-variant-numeric: tabular-nums; }
.qi-meta .qi-key { color: var(--ct-accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.qi-meta .qi-year { color: #9aa7b4; font-variant-numeric: tabular-nums; }
.qi-meta .qi-label { color: #b9a06a; overflow: hidden; text-overflow: ellipsis; }
.qi-meta .qi-meta-sep { color: #555; }
.queue-onair .qi-meta,
.queue-onair .qi-meta .qi-bpm,
.queue-onair .qi-meta .qi-key,
.queue-onair .qi-meta .qi-year,
.queue-onair .qi-meta .qi-label,
.queue-onair .qi-meta .qi-meta-sep { color: rgba(0, 0, 0, 0.6); }

.zt-log-head-tools {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
}

.zt-icon-btn {
    width: 20px;
    height: 18px;
    border: none;
    background: transparent;
    color: #aaa;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.zt-icon-btn:hover { color: #fff; }

.zt-log-count {
    font-family: var(--zt-mono);
    font-size: 10px;
    color: #666;
    margin-left: 4px;
}

.zt-log-io {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.zt-io-btn {
    height: 18px;
    padding: 0 6px;
    border: 1px solid #444;
    background: #333;
    color: #ccc;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
}

.zt-io-btn:hover { background: #444; color: #fff; }

.zt-log-onair {
    margin-left: auto;
    animation: none;
    background: #c02020;
    padding: 1px 6px;
    font-size: 8px;
}

.queue-item.queue-onair {
    background: var(--zt-bg-onair);
    color: var(--zt-bg-onair-text);
    font-weight: 600;
    height: 20px;
}

.queue-item.queue-onair .file-name,
.queue-item.queue-onair .qi-artist,
.queue-item.queue-onair .qi-album,
.queue-item.queue-onair .duration,
.queue-item.queue-onair .qi-ico { color: #000; }

.queue-item.queue-next {
    background: var(--zt-bg-next);
    color: var(--zt-bg-next-text);
}

.queue-item.queue-selected:not(.queue-onair):not(.queue-next) {
    background: var(--zt-bg-selected);
    color: #fff;
}

.qi-flag {
    justify-content: center;
    padding: 0 !important;
}

.qi-flag input {
    width: 12px;
    height: 12px;
    accent-color: var(--zt-bg-next);
    cursor: pointer;
}

.qi-ico { font-size: 10px; }
.qi-ico.ico-song { color: #5090e0; }
.qi-ico.ico-jingle { color: #e8c020; }
.qi-ico.ico-vt { color: #60c0ff; }
.qi-ico.ico-url { color: #80e0a0; }
.qi-ico.ico-folder { color: #c0a060; }
.qi-ico.ico-spot { color: #e080c0; }

.qi-chain { font-size: 11px; color: #666; justify-content: center; }
.queue-next .qi-chain { color: #e0c0ff; }
.queue-onair .qi-chain { color: #000; }

/* Segue multi-lanes */
.zt-segue-ruler {
    height: 16px;
    background: #1a1a1a;
    border-bottom: 1px solid #111;
    flex: none;
    position: relative;
    overflow: hidden;
}

.zt-ruler-ticks {
    height: 100%;
    background: repeating-linear-gradient(90deg, #333 0, #333 1px, transparent 1px, transparent 40px);
    opacity: 0.5;
}

.zt-segue-lanes {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #000;
    gap: 1px;
}

.zt-lane {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.zt-lane-lbl {
    position: absolute;
    top: 2px;
    left: 4px;
    z-index: 2;
    font-size: 9px;
    color: #7ecfff;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px #000;
    pointer-events: none;
}

.zt-lane-wave,
.zt-lane-placeholder {
    flex: 1;
    min-height: 24px;
    background: #000;
}

.zt-lane-placeholder {
    background: #080808 linear-gradient(180deg, transparent 45%, rgba(78,176,232,0.08) 50%, transparent 55%);
}

.zt-lane-now { flex: 1.4; }

.zt-lane-now .zt-deck-wave {
    flex: 1;
    min-height: 40px;
    height: 100%;
    background: #000;
    border: none;
    box-shadow: none;
}

.zt-flat-btn {
    width: 26px;
    height: 22px;
    border: none;
    background: transparent;
    color: #ccc;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zt-flat-btn:hover { color: #fff; }
.zt-flat-play { color: #50e050; }
.zt-flat-rec { color: #e03030; font-size: 14px; }

.zt-segue-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 8px;
    background: #1a1a1a;
    border-top: 1px solid #111;
    flex: none;
    min-height: 26px;
}

.zt-statusbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
    background: #1a1a1a;
    border-top: 1px solid #111;
    font-size: 9px;
    color: #666;
}

.zt-live { color: var(--zt-green-onair); font-weight: 700; }
.zt-status-time { margin-left: auto; }

.zt-tb-group:last-child { border-right: none; }

.zt-log-header {
    background: linear-gradient(180deg, #383838 0%, #2b2b2b 100%);
    color: #aaa;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex: none;
    border-bottom: 1px solid #1a1a1a;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.zt-log-header span,
.queue-item > * {
    padding: 0 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-right: 1px solid #333;
    height: 100%;
    display: flex;
    align-items: center;
}

.zt-log-header span:last-child,
.queue-item > *:last-child { border-right: none; }

.zt-drop-hint {
    display: none;
    padding: 24px;
    text-align: center;
    color: var(--zt-text-dim);
    font-size: 12px;
    border: 2px dashed var(--zt-border);
    margin: 12px;
}

#left-panel.dragover .zt-drop-hint { display: block; }

#left-panel.dragover .zt-log-body { opacity: 0.35; }

.zt-log-body {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

/* Log rows */
.queue-item {
    cursor: default;
    position: relative;
    background: var(--zt-bg-row);
}

.queue-item:nth-child(even) { background: var(--zt-bg-row-alt); }

.queue-item:hover:not(.queue-onair) { background: var(--zt-bg-hover); }

.queue-item.queue-onair {
    background: var(--zt-bg-onair);
    color: var(--zt-bg-onair-text);
    font-weight: 700;
    height: 22px;
    border-bottom: 1px solid var(--zt-bg-onair-border);
}

.queue-item.queue-next {
    background: var(--zt-bg-next);
    color: var(--zt-bg-next-text);
    outline: none;
    box-shadow: inset 0 0 0 1px var(--zt-bg-next-border);
}

.col-chain,
.qi-chain {
    justify-content: center;
    font-size: 12px;
    color: #888;
}

.queue-next .qi-chain { color: #e0c0ff; }

.col-ico,
.qi-ico {
    justify-content: center;
    font-size: 11px;
    opacity: 0.85;
}

.qi-sts.onair { color: var(--zt-green-onair); text-shadow: 0 0 4px rgba(0, 200, 0, 0.6); }
.queue-onair .qi-sts.onair { color: var(--zt-bg-onair-text); text-shadow: none; }

.queue-item.queue-onair .qi-type { color: var(--zt-bg-onair-text); }
.queue-item.queue-onair .col-time,
.queue-item.queue-onair .file-name,
.queue-item.queue-onair .qi-artist { color: var(--zt-bg-onair-text); }

.queue-item.queue-onair::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: var(--row-progress, 0%);
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.queue-item.dragging { opacity: 0.4; }

.qi-sts {
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
}

/* Types Zetta (Sound Code) */
.qi-type[data-type="AUD"],
.qi-type[data-type="SNG"] { color: #5cd65c; }
.qi-type[data-type="JNG"] { color: #f0e030; }
.qi-type[data-type="VT"]  { color: #50c8ff; }
.qi-type[data-type="SPT"] { color: #ff80c0; }
.qi-type[data-type="LNR"] { color: #c0a0ff; }
.qi-type[data-type="ID"]  { color: #60e0b0; }
.qi-type[data-type="DIR"] { color: #ffa040; }
.qi-type[data-type="URL"] { color: #60b0ff; }
.qi-type[data-type="???"] { color: #ff5050; }

/* Lignes log — Row Highlighting Zetta */
.queue-jingle {
    background: #4a4800 !important;
    color: #ffffa0 !important;
}
.queue-jingle .qi-artist,
.queue-jingle .col-time,
.queue-jingle .duration { color: #e8e880 !important; }

.queue-auto-jingle {
    outline: 1px dashed rgba(200, 200, 80, 0.35);
    outline-offset: -1px;
}

.queue-auto-jingle .file-name::after {
    content: " ◆";
    color: #c8c840;
    font-size: 9px;
}

.queue-voicetrack {
    background: #003050 !important;
    color: #a0e0ff !important;
}
.queue-voicetrack .qi-artist,
.queue-voicetrack .col-time,
.queue-voicetrack .duration { color: #80c8f0 !important; }

.queue-spot {
    background: #4a1038 !important;
    color: #ffc0e0 !important;
}

.queue-liner { background: #302850 !important; color: #d0c0ff !important; }
.queue-id { background: #103830 !important; color: #a0ffe0 !important; }

.col-time,
.duration {
    font-family: var(--zt-mono);
    font-size: 10px;
}

.qi-type {
    font-family: var(--zt-ui);
    font-size: 9px;
    font-weight: 700;
    justify-content: center;
}

.queue-next.queue-jingle { box-shadow: inset 0 0 0 2px #f0e030; }
.queue-next.queue-voicetrack { box-shadow: inset 0 0 0 2px #50c8ff; }

.queue-onair .qi-type { color: inherit; }

.file-name { font-weight: 500; }

.qi-artist { color: var(--zt-text-dim); font-size: 10px; }
.queue-onair .qi-artist { color: rgba(255, 255, 255, 0.8); }

.folder-pick {
    display: none;
}

.qi-actions {
    display: flex;
    gap: 1px;
    justify-content: flex-end;
    padding: 0 2px !important;
}

.mix-item-btn,
.play-item-btn,
.delete-btn,
.dup-item-btn,
.reconnect-btn,
.vt-item-btn {
    height: 16px;
    min-width: 16px;
    padding: 0 3px;
    border: 1px solid #505050;
    border-top-color: #808080;
    background: linear-gradient(180deg, #d8d8d8 0%, #b0b0b0 100%);
    color: #1a1a1a;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mix-item-btn {
    background: linear-gradient(180deg, #6a9fd4 0%, #4a7ab0 100%);
    border-color: #306090;
    color: #fff;
}
.vt-item-btn {
    background: linear-gradient(180deg, #60b0e8 0%, #4080b8 100%);
    border-color: #2860a0;
    color: #fff;
}
.delete-btn { color: #c02020; }
.reconnect-btn { color: #a06000; }

.mix-item-btn:hover,
.play-item-btn:hover,
.delete-btn:hover,
.dup-item-btn:hover,
.reconnect-btn:hover {
    filter: brightness(1.15);
}

.queue-onair .qi-actions { display: none; }

/* ── On-Air module (Zetta) ────────────────────────────── */

.zt-onair-deck {
    display: grid;
    grid-template-columns: auto 1fr 2fr auto auto;
    align-items: center;
    gap: 10px;
    padding: 5px 8px;
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    border-top: 2px solid #1a1a1a;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    flex: none;
    min-height: 58px;
}

.zt-deck-btn {
    width: 34px;
    height: 34px;
    border: 1px solid #505050;
    border-top-color: #909090;
    border-left-color: #808080;
    background: var(--zt-metal-face);
    color: #1a1a1a;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

.zt-deck-btn:hover {
    background: linear-gradient(180deg, #fff 0%, #d0d0d0 100%);
}

.zt-deck-btn:active {
    background: var(--zt-metal-pressed);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.zt-deck-play {
    background: linear-gradient(180deg, #70d070 0%, #40a040 100%);
    border-color: #208020;
    border-top-color: #90e890;
    color: #fff;
    text-shadow: 0 1px 1px #104010;
}

.zt-deck-stop {
    background: linear-gradient(180deg, #e85050 0%, #c03030 100%);
    border-color: #901818;
    border-top-color: #f08080;
    color: #fff;
    text-shadow: 0 1px 1px #500000;
}

.zt-deck-lbl {
    font-size: 9px;
    font-weight: 700;
    color: #888;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.zt-deck-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px #000;
}

.zt-deck-meta {
    font-family: var(--zt-mono);
    font-size: 10px;
    color: var(--zt-green-onair);
}

.zt-deck-next span:last-child {
    font-size: 12px;
    font-weight: 600;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zt-deck-transport {
    display: flex;
    gap: 3px;
}

.zt-deck-now,
.zt-deck-next {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.zt-deck-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zt-deck-wave {
    position: relative;
    height: 44px;
    min-height: 40px;
    min-width: 120px;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8);
}

#waveform {
    width: 100%;
    height: 100%;
    display: block;
}

#intro-countdown {
    position: absolute;
    top: 2px;
    right: 4px;
    font-family: var(--zt-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--zt-green-onair);
    background: rgba(0,0,0,0.65);
    padding: 1px 6px;
    border: 1px solid #1a3a1a;
}

#intro-countdown[hidden] { display: none; }
#intro-countdown.blink { color: var(--zt-red); animation: ztBlink 0.5s step-end infinite; }

.zt-deck-vol {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 80px;
}

.zt-deck-vol input[type="range"] {
    width: 72px;
    height: 4px;
    accent-color: var(--zt-accent);
}

.zt-visualizer {
    display: none;
}

/* ── Status bar ───────────────────────────────────────── */

.zt-statusbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 8px;
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    border-top: 1px solid #1a1a1a;
    font-family: var(--zt-ui);
    font-size: 10px;
    color: #999;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.zt-live { color: var(--zt-green-onair); font-weight: 700; text-shadow: 0 0 6px rgba(0, 200, 0, 0.4); }

.zt-status-time { margin-left: auto; color: #ddd; font-family: var(--zt-mono); }

.zt-history-inline {
    list-style: none;
    display: flex;
    gap: 12px;
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.zt-history-inline li {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* ── Audio output panel ───────────────────────────────── */

.audio-output-panel {
    position: fixed;
    z-index: 9999;
    background: var(--zt-bg-header);
    border: 1px solid var(--zt-border-light);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    min-width: 260px;
    font-size: 11px;
}

.aop-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
    min-height: 28px;
}

.aop-item:hover { background: var(--zt-bg-hover); }
.aop-active { color: var(--zt-accent); }
.aop-check { width: 14px; text-align: center; }
.aop-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aop-sep { height: 1px; background: var(--zt-border); margin: 2px 0; }
.aop-msg, .aop-unlock { padding: 6px 10px; color: var(--zt-text-dim); font-size: 10px; }

/* ── Segue Editor (Zetta) ─────────────────────────────── */

/* ── Segue Editor embarqué (dans le panneau principal, remplace le popup) ── */
/* Segue embarqué : on garde l'en-tête du panneau (zt-quad-head), on masque
   celui du mix-editor pour éviter le doublon et gagner de la hauteur utile. */
.zt-quad-segue.has-editor > .zt-segue-ruler,
.zt-quad-segue.has-editor > .zt-segue-lanes,
.zt-quad-segue.has-editor > .zt-segue-foot {
    display: none;
}

#segue-editor-host {
    flex: 1;
    min-height: 0;
    min-width: 0;
    display: flex;
}
#segue-editor-host:empty { display: none; }

#segue-editor-host .segue-editor {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    border: none;
    box-shadow: none;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#segue-editor-host .se-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
}

#segue-editor-host .se-stage {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#segue-editor-host .me-viewport {
    flex: 1;
    min-height: 96px;
    min-width: 0;
    position: relative;
    overflow: hidden;
    background: #000;
}

#segue-editor-host #me-timeline {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    touch-action: none;
}

#segue-editor-host .me-chrome {
    flex: none;
}

#segue-editor-host .me-chrome:empty,
#segue-editor-host .me-chrome[hidden] {
    display: none;
}

#segue-editor-host .me-sync-status {
    flex: none;
    padding: 2px 8px 4px;
    font-size: 10px;
    font-family: var(--zt-mono, monospace);
    color: var(--ct-accent, #c9a227);
    background: #111;
    border-top: 1px solid #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#segue-editor-host .se-transport {
    padding: 4px 6px;
    gap: 3px;
    flex-wrap: wrap;
    flex: none;
}

#segue-editor-host .se-tr {
    width: 30px;
    height: 26px;
    font-size: 13px;
}

#segue-editor-host .se-tr-ok,
#segue-editor-host .se-tr.me-auto,
#segue-editor-host .se-tr.me-sync,
#segue-editor-host .se-tr[data-act="save"] {
    width: auto;
    min-width: 36px;
    height: 26px;
    padding: 0 8px;
    font-size: 10px;
}

/* Tempo sync : bouton d'état (timestretch de transition) */
.se-tr.me-sync {
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.se-tr.me-sync.on {
    background: var(--ct-accent, #c9a227);
    border-color: var(--ct-accent, #c9a227);
    color: #111;
    font-weight: bold;
}

.se-tr.me-sync:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

#mix-editor-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.82);
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
}

.segue-editor {
    width: min(1200px, 100vw);
    max-height: 100vh;
    margin: auto;
    display: flex;
    flex-direction: column;
    background: #2a2a2a;
    border: 1px solid #111;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px;
    color: #e0e0e0;
}

.se-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    background: linear-gradient(180deg, #3a3a3a 0%, #2e2e2e 100%);
    border-bottom: 1px solid #111;
    flex: none;
    min-height: 32px;
}

.se-title {
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    padding-right: 12px;
    border-right: 1px solid #555;
    margin-right: 4px;
}

.se-toolbar,
.se-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.se-nav { margin-left: auto; }

.se-tb {
    height: 22px;
    min-width: 22px;
    padding: 0 8px;
    border: 1px solid #505050;
    border-top-color: #909090;
    border-left-color: #808080;
    background: var(--zt-metal-face);
    color: #1a1a1a;
    font-family: var(--zt-ui);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

.se-tb:hover:not(:disabled) {
    background: linear-gradient(180deg, #fff 0%, #d0d0d0 100%);
}
.se-tb:active:not(:disabled) {
    background: var(--zt-metal-pressed);
    box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.25);
}
.se-tb:disabled { opacity: 0.35; cursor: default; }
.se-tb-rec { color: #c02020; font-weight: 700; }

.se-close {
    width: 28px;
    height: 22px;
    border: 1px solid #505050;
    border-top-color: #909090;
    background: var(--zt-metal-face);
    color: #333;
    cursor: pointer;
    font-size: 14px;
    margin-left: 4px;
}

.se-close:hover { background: #c44; color: #fff; }

.se-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #000;
    min-height: 0;
    padding: 0;
}

.se-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.me-chrome {
    flex: none;
}

.me-chrome:empty,
.me-chrome[hidden] {
    display: none;
}

.me-viewport {
    flex: 1;
    min-height: 120px;
    min-width: 0;
    position: relative;
    overflow: hidden;
    background: #000;
}

#me-timeline {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    background: #000;
    cursor: crosshair;
    touch-action: none;
}

/* ── Poignées DOM du Segue Editor ──────────────────────────────────────────
   Chaque marqueur est un élément positionné par la même transformation que
   le canvas : la ligne visible EST la zone de saisie. */
.me-handles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.me-h {
    position: absolute;
    pointer-events: auto;
    touch-action: none;
    user-select: none;
}

/* Lignes verticales (Cue / Intro / Next) : bande de saisie 16 px centrée. */
.me-h-line {
    width: 16px;
    cursor: ew-resize;
}

.me-h-line .me-h-bar {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
    background: var(--h-col);
}

.me-h-line .me-h-bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: -4px;
    border: 5px solid transparent;
    border-top: 7px solid var(--h-col);
    border-bottom: 0;
}

.me-h-knob {
    position: absolute;
    left: 50%;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    border-radius: 50%;
    background: var(--h-col);
    border: 2px solid rgba(0, 0, 0, 0.65);
    box-sizing: border-box;
}

/* Nœuds ronds (Fade In / Fade Out) sur l'enveloppe. */
.me-h-node {
    width: 18px;
    height: 18px;
    cursor: ew-resize;
}

.me-h-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    background: var(--h-col);
    border: 2px solid rgba(0, 0, 0, 0.65);
    box-sizing: border-box;
}

.me-h-tag {
    position: absolute;
    left: 18px;
    text-decoration: none;
    font: 10px Tahoma, sans-serif;
    color: var(--h-col);
    background: rgba(0, 0, 0, 0.72);
    padding: 1px 4px;
    border-radius: 2px;
    white-space: nowrap;
    pointer-events: none;
}

.me-h-node .me-h-tag {
    left: 20px;
    top: 0;
}

/* Fondu désactivé : nœud discret, libellé au survol seulement. */
.me-h-off .me-h-dot { opacity: 0.4; }
.me-h-off .me-h-tag { display: none; }
.me-h-off:hover .me-h-tag { display: block; }

.me-h:hover .me-h-knob,
.me-h:hover .me-h-dot,
.me-h-active .me-h-knob,
.me-h-active .me-h-dot {
    box-shadow: 0 0 6px var(--h-col);
}

.me-h-active .me-h-bar,
.me-h-line:hover .me-h-bar {
    box-shadow: 0 0 4px var(--h-col);
}

.me-hint {
    padding: 4px 8px;
    font-size: 10px;
    color: #888;
    background: #141414;
    border-bottom: 1px solid #222;
    flex: none;
}

.me-scrollbar {
    height: 14px;
    background: #1a1a1a;
    border-top: 1px solid #333;
    position: relative;
    flex: none;
}

.me-scrollbar.hidden { visibility: hidden; }

.me-thumb {
    position: absolute;
    top: 2px;
    bottom: 2px;
    background: #666;
    border-radius: 2px;
    cursor: grab;
    min-width: 32px;
}

.me-thumb:hover { background: #888; }

.se-warn {
    padding: 6px 10px;
    background: rgba(200, 120, 0, 0.2);
    border-bottom: 1px solid #a60;
    color: #eca;
    font-size: 11px;
    flex: none;
}

.me-msg, .me-loading {
    padding: 24px;
    color: #888;
    text-align: center;
}

.me-loading { display: flex; align-items: center; justify-content: center; gap: 10px; }

.me-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #444;
    border-top-color: #4eb0e8;
    border-radius: 50%;
    animation: meSpin 0.8s linear infinite;
}

@keyframes meSpin { to { transform: rotate(360deg); } }

.se-transport {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    border-top: 1px solid #111;
    flex: none;
}

.se-tr {
    width: 40px;
    height: 36px;
    border: 1px solid #1a1a1a;
    background: linear-gradient(180deg, #4a4a4a 0%, #333 100%);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.se-tr:hover { background: linear-gradient(180deg, #555 0%, #3d3d3d 100%); }
.se-tr-play { font-size: 18px; }
.se-tr-rec { color: #e44; font-size: 14px; }
.se-tr-stop { font-size: 14px; }
.se-tr-ok { width: auto; padding: 0 14px; font-size: 12px; font-weight: 700; background: #3a6288; border-color: #5a9fd4; }
.se-tr.me-auto { width: auto; padding: 0 10px; font-size: 11px; }
.se-tr.me-cancel { width: 32px; font-size: 14px; }

.se-spacer,
.me-spacer { flex: 1; }

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 900px) {
    body.zt-app {
        grid-template-rows: 28px 24px 1fr auto auto 22px;
    }

    .zt-onair-deck {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }

    .zt-deck-wave { grid-column: 1 / -1; }

    .zt-log-header,
    .queue-item {
        grid-template-columns: 18px 24px 64px 44px 1fr 52px 60px;
    }

    .col-artist, .qi-artist { display: none; }
    .col-meta, .qi-meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .zt-onair-pill, #intro-countdown.blink, .me-spinner { animation: none; }
}

/* ── Hot Keys (Zetta) ─────────────────────────────────── */

.zt-hotkeys-module,
.zt-quad-hotkeys {
    display: flex;
    flex-direction: column;
    background: #121212;
    overflow: hidden;
    height: 100%;
}

.hk-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px;
    background: linear-gradient(180deg, #383838 0%, #282828 100%);
    border-bottom: 1px solid #111;
    flex: none;
}

.hk-title { font-weight: 700; font-size: 11px; color: #fff; }
.hk-onair-badge {
    margin-left: auto;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: #c02020;
    padding: 2px 8px;
    letter-spacing: 0.08em;
}
.hk-hint { font-size: 9px; color: #888; }

.hk-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 2px;
    padding: 4px;
    flex: 1;
    overflow: hidden;
}

.hk-slot {
    min-height: 0;
    min-width: 0;
    border: 1px solid rgba(0,0,0,0.35);
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    padding: 3px 5px;
    font-family: var(--zt-ui);
    position: relative;
    border-radius: 0;
}

.hk-slot.hk-empty {
    background: #2a2a2a !important;
    color: #555;
}

.hk-icon {
    position: absolute;
    top: 3px;
    left: 4px;
    font-size: 9px;
    opacity: 0.75;
}

.hk-slot.hk-row-0 { background: #b82020; }
.hk-slot.hk-row-1 { background: #d07018; }
.hk-slot.hk-row-2 { background: #d0b818; color: #1a1a00; }
.hk-slot.hk-row-3 { background: #2870c0; }
.hk-slot.hk-row-4 { background: #28a828; }
.hk-slot.hk-row-5 { background: #a040a8; }

.hk-slot.hk-filled { border-color: rgba(255,255,255,0.25); }

.hk-slot:hover { filter: brightness(1.15); transform: scale(1.02); }
.hk-num {
    position: absolute;
    top: 3px;
    left: 5px;
    font-size: 8px;
    opacity: 0.7;
    font-family: var(--zt-mono);
}
.hk-name {
    font-size: 9px;
    font-weight: 700;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.2;
}
.hk-dur {
    font-family: var(--zt-mono);
    font-size: 9px;
    text-align: right;
    opacity: 0.9;
}

.vt-item-btn { background: #2a5070; border-color: #5a9fd4; color: #b8e8ff; }

/* ── Voice Track modal ────────────────────────────────── */

.vt-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vt-dialog {
    width: min(420px, 92vw);
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    border: 1px solid #111;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.vt-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #1a3048;
    border-bottom: 1px solid #111;
}

.vt-title { font-weight: 700; color: #7ecfff; }
.vt-close { background: transparent; border: none; color: #aaa; cursor: pointer; font-size: 14px; }
.vt-hint { padding: 10px 12px; font-size: 11px; color: #aaa; margin: 0; }
.vt-ai { margin: 0 12px 10px; padding: 8px 10px; background: #16181c; border: 1px solid #2a2f36; border-radius: 6px; }
.vt-ai-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.vt-ai-label { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #6b93c8; }
.vt-ai-refresh { background: #232830; color: #cdd6e0; border: 1px solid #333; border-radius: 4px; width: 22px; height: 22px; cursor: pointer; font-size: 13px; line-height: 1; }
.vt-ai-refresh:hover { background: #2c333d; }
.vt-ai-text { margin: 0; font-size: 12px; line-height: 1.4; color: #e6e9ee; }
.vt-meter-wrap { padding: 0 12px 8px; }
.vt-meter-wrap meter { width: 100%; height: 12px; }
.vt-status { padding: 0 12px 8px; font-family: var(--zt-mono); font-size: 11px; color: #e8d040; }
.vt-actions { display: flex; gap: 6px; padding: 10px 12px 14px; }
.vt-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid #444;
    background: #333;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.vt-btn:disabled { opacity: 0.4; cursor: default; }
.vt-rec { background: #8a2020; border-color: #e04040; }
.vt-save { background: #2a5a2a; border-color: #4a9a4a; }

/* ── Zetta Academy features ───────────────────────────── */

.zt-mode-btn {
    height: 18px;
    padding: 0 8px;
    border: 1px solid #555;
    background: #333;
    color: #aaa;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
}

.zt-mode-btn.active {
    background: #e07020;
    border-color: #c06010;
    color: #fff;
}

.zt-filter-select,
.zt-log-search {
    height: 20px;
    font-size: 10px;
    background: #222;
    border: 1px solid #444;
    color: #ddd;
    padding: 0 6px;
}

.zt-log-search { min-width: 120px; }

.queue-item.log-filtered {
    opacity: 0.2;
    pointer-events: none;
    height: 0;
    overflow: hidden;
    border: none;
    padding: 0;
    margin: 0;
}

.pfl-item-btn {
    background: #2a4a2a !important;
    border-color: #4a8a4a !important;
    color: #a0ffa0 !important;
}

.zt-library-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 90vw);
    height: 100%;
    background: #1a1a1a;
    border-left: 1px solid #333;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.2s ease;
}

.zt-library-panel.open { transform: translateX(0); }

.zt-library-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: #2a2a2a;
    border-bottom: 1px solid #111;
    font-weight: 700;
    font-size: 11px;
}

.zt-library-head .zt-icon-btn { margin-left: auto; }

.zt-library-list {
    list-style: none;
    flex: 1;
    overflow-y: auto;
}

.lib-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    border-bottom: 1px solid #222;
    cursor: pointer;
    font-size: 11px;
}

.lib-item:hover { background: #252525; }
.lib-item.selected { background: #3a2060; }
.lib-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.lib-dur { font-family: var(--zt-mono); color: #888; font-size: 10px; }

.zt-icon-btn.active { color: #50e050; }

/* ── Stereo Tool (traitement broadcast) ── */
.zt-st-btn.active {
    background: #4a3800 !important;
    border-color: #c9a227 !important;
    color: #ffe080 !important;
}

.zt-proc-modal {
    border: 1px solid #444;
    border-radius: 6px;
    padding: 0;
    background: #1a1a1a;
    color: var(--zt-text);
    max-width: 540px;
    width: calc(100% - 2rem);
}

.zt-proc-modal::backdrop { background: rgba(0, 0, 0, 0.65); }

.zt-proc-panel {
    display: flex;
    flex-direction: column;
    max-height: min(calc(100vh - 2rem), 700px);
}

.zt-proc-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #333;
    background: #252525;
}

.zt-proc-head h2 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
}

.zt-proc-bus {
    display: block;
    margin-top: 4px;
    font-family: var(--zt-mono);
    font-size: 10px;
    color: #c9a227;
    font-weight: 600;
}

.zt-proc-body {
    padding: 10px 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 0;
}

.zt-proc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.zt-proc-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.zt-proc-toggle input { position: absolute; opacity: 0; pointer-events: none; }

.zt-proc-toggle-ui {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 3px;
    border: 1px solid #555;
    background: #2a2a2a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #888;
}

.zt-proc-toggle input:checked + .zt-proc-toggle-ui {
    background: #4a3800;
    border-color: #c9a227;
    color: #ffe080;
}

.zt-proc-field-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.zt-proc-field-inline select {
    padding: 3px 6px;
    border: 1px solid #555;
    border-radius: 3px;
    background: #2a2a2a;
    color: var(--zt-text);
    font-size: 11px;
}

.zt-proc-lead {
    margin: 0;
    font-size: 10px;
    color: var(--zt-text-dim);
    line-height: 1.4;
}

.zt-proc-section {
    padding: 8px 10px;
    background: #222;
    border: 1px solid #333;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.zt-proc-section h3 {
    margin: 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #c9a227;
}

.zt-proc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
}

.zt-slider-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 10px;
    color: var(--zt-text-dim);
}

.zt-slider-field em {
    font-style: normal;
    font-family: var(--zt-mono);
    color: var(--zt-text);
}

.zt-slider-field input[type="range"] {
    width: 100%;
    height: 4px;
    accent-color: #c9a227;
}

.zt-proc-hint {
    margin: 0;
    font-size: 10px;
    color: var(--zt-text-dim);
}

.zt-proc-hint strong {
    font-family: var(--zt-mono);
    color: var(--zt-text);
}

.zt-proc-hint.zt-proc-err {
    color: #f87171;
}

.zt-proc-top-inner {
    margin-top: 0.5rem;
}

.zt-proc-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid #333;
    background: #252525;
}

.zt-tb-primary {
    background: #3a2060 !important;
    border-color: #6a1b9a !important;
    color: #fff !important;
}

@media (max-width: 520px) {
    .zt-proc-grid { grid-template-columns: 1fr; }
}

/* ── Dashboard dockable (resize + permutation) ───────────────────── */
.zt-dashboard.zt-dock {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    min-height: 0;
}

.zt-dock .zt-lrow {
    display: grid;
    gap: 0;
    min-width: 0;
    min-height: 0;
}

.zt-dock .zt-quad {
    position: relative;
    min-width: 0;
    min-height: 0;
}

/* Horloge : neutralise les décalages hérités de l'ancienne colonne droite. */
.zt-dock .zt-quad-clock { margin-left: 0; }
.zt-dock .zt-quad-clock .zt-clock-time { font-size: clamp(22px, 2.6vw, 38px); }

/* Poignées de redimensionnement */
.zt-vgutter,
.zt-hgutter {
    position: relative;
    background: #000;
    touch-action: none;
    z-index: 5;
}
.zt-vgutter { cursor: col-resize; }
.zt-hgutter { cursor: row-resize; }

.zt-vgutter::after,
.zt-hgutter::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    background: #333;
    border-radius: 1px;
}
.zt-vgutter::after { width: 2px; height: 26px; }
.zt-hgutter::after { width: 26px; height: 2px; }

.zt-vgutter:hover,
.zt-hgutter:hover { background: #12314a; }
.zt-vgutter:hover::after,
.zt-hgutter:hover::after { background: #5a9fd4; }

/* Poignée de déplacement (permutation) */
.zt-panel-grip {
    position: absolute;
    top: 3px;
    left: 3px;
    z-index: 30;
    width: 16px;
    height: 16px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1;
    color: #8a8a8a;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 3px;
    cursor: grab;
    touch-action: none;
    user-select: none;
    opacity: 0.55;
    transition: opacity 0.12s, background 0.12s, color 0.12s;
}
.zt-panel-grip:hover {
    opacity: 1;
    color: #eee;
    background: rgba(90, 159, 212, 0.35);
}

/* Décale les en-têtes pour laisser la place à la poignée. */
.zt-dock .zt-quad-head,
.zt-dock .hk-toolbar { padding-left: 24px; }

/* États de glisser-déposer */
body.zt-dragging { cursor: grabbing; user-select: none; }
body.zt-dragging .zt-panel-grip { cursor: grabbing; }
.zt-drag-src { opacity: 0.45; }
.zt-drop-target { outline: 2px dashed #5a9fd4; outline-offset: -2px; }

.zt-drag-ghost {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #3a6288;
    border: 1px solid #5a9fd4;
    border-radius: 4px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}

.zt-status-btn {
    padding: 1px 8px;
    font-size: 10px;
    font-weight: 600;
    color: #cfcfcf;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 3px;
    cursor: pointer;
}
.zt-status-btn:hover { background: #262626; color: #fff; border-color: #5a9fd4; }

/* ── Menu principal (dropup) ─────────────────────────────────── */
.zt-menu-pop {
    position: fixed;
    z-index: 9998;
    min-width: 230px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 4px;
    background: #1c1c1c;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.6);
    font-size: 11px;
    color: #ddd;
}

.zt-menu-sec {
    padding: 6px 8px 3px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7a7a7a;
}

.zt-menu-sep {
    height: 1px;
    margin: 4px 2px;
    background: #333;
}

.zt-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 5px 8px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #ddd;
    font-size: 11px;
    text-align: left;
    cursor: pointer;
}
.zt-menu-item:hover { background: #2b2b2b; }

.zt-menu-check input {
    width: 13px;
    height: 13px;
    accent-color: #5a9fd4;
    cursor: pointer;
}

/* Zones de navigation (seek) du player */
.zt-od-row[data-seq] { cursor: pointer; }
#progress { cursor: pointer; }

.zt-menu-action { justify-content: space-between; }
.zt-menu-sub {
    color: #888;
    font-size: 10px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════
   Thème « Cartwall » — cohérence gris + jaune, boutons plats, icônes SVG.
   Bloc d'harmonisation appliqué par-dessus le skin d'origine.
   ══════════════════════════════════════════════════════════════════════ */

/* Barres de défilement discrètes façon cartwall */
body.zt-app ::-webkit-scrollbar { width: 10px; height: 10px; }
body.zt-app ::-webkit-scrollbar-track { background: var(--ct-bg); }
body.zt-app ::-webkit-scrollbar-thumb {
    background: var(--ct-surface-3);
    border: 2px solid var(--ct-bg);
    border-radius: 6px;
}
body.zt-app ::-webkit-scrollbar-thumb:hover { background: #414855; }

/* Dashboard : séparateurs fins plutôt que noirs */
.zt-dashboard, .zt-dashboard.zt-dock { background: var(--ct-border); }
.zt-row { background: var(--ct-border); }

/* En-têtes de panneaux */
.zt-quad-head {
    background: var(--ct-surface) !important;
    border-bottom: 1px solid var(--ct-border);
}
.zt-quad-head-onair { background: var(--ct-surface) !important; }
.zt-quad-title { color: var(--ct-text-dim); }
.zt-station-name { color: var(--ct-text); }

/* Toolbars : fond plat */
.zt-log-toolbar,
.hk-toolbar {
    background: var(--ct-surface) !important;
    border-bottom: 1px solid var(--ct-border) !important;
    box-shadow: none !important;
}

/* Boutons plats (toolbar log, segue toolbar) */
.zt-tb-btn,
.se-tb {
    background: var(--ct-surface-2) !important;
    border: 1px solid var(--ct-border) !important;
    border-radius: 6px !important;
    color: var(--ct-text) !important;
    box-shadow: none !important;
    font-weight: 600;
}
.zt-tb-btn:hover,
.se-tb:hover:not(:disabled) {
    background: var(--ct-surface-3) !important;
    border-color: var(--ct-border-strong) !important;
    color: var(--ct-text) !important;
}
.zt-tb-btn:active,
.se-tb:active:not(:disabled) {
    background: var(--ct-accent-soft) !important;
    border-color: var(--ct-accent) !important;
    color: var(--ct-accent) !important;
}
.se-tb-rec { color: var(--ct-danger) !important; }

/* Toggles actifs (Auto JNG, Beatmix, Trim, Auto next…) → accent jaune */
.zt-tb-toggle.active {
    background: var(--ct-accent-soft) !important;
    border-color: var(--ct-accent) !important;
    color: var(--ct-accent) !important;
    outline: none !important;
    box-shadow: inset 0 0 0 1px var(--ct-accent-soft) !important;
}

/* Transport principal */
.zt-tr-btn {
    background: var(--ct-surface-2) !important;
    border: 1px solid var(--ct-border) !important;
    color: var(--ct-text) !important;
    border-radius: 6px;
}
.zt-tr-btn:hover { filter: none; background: var(--ct-surface-3) !important; }
.zt-tr-play { background: var(--ct-success) !important; border-color: var(--ct-success) !important; color: #fff !important; }
.zt-tr-stop { background: var(--ct-danger) !important; border-color: var(--ct-danger) !important; color: #fff !important; }

/* Boutons plats du segue (transport bas) */
.se-tr {
    background: var(--ct-surface-2) !important;
    border: 1px solid var(--ct-border) !important;
    color: var(--ct-text) !important;
    border-radius: 6px;
}
.se-tr:hover { background: var(--ct-surface-3) !important; }
.se-tr-rec { color: var(--ct-danger) !important; }
.se-tr-ok {
    background: var(--ct-accent) !important;
    border-color: var(--ct-accent) !important;
    color: #1a1a1a !important;
}

/* Boutons icône (en-tête Log) + icônes SVG */
.zt-icon-btn { color: var(--ct-text-dim); display: inline-flex; align-items: center; justify-content: center; }
.zt-icon-btn:hover { color: var(--ct-accent); }
.zt-icon-btn.active { color: var(--ct-accent); }
.zt-icon-btn svg { width: 14px; height: 14px; display: block; }
.zt-flat-btn svg,
.zt-tb-btn svg,
.se-tb svg,
.zt-io-btn svg,
.zt-status-btn svg,
.zt-tr-btn svg,
.se-tr svg { display: inline-block; vertical-align: -0.15em; }

/* Boutons IO (PFL / OUT) */
.zt-io-btn {
    background: var(--ct-surface-2);
    border: 1px solid var(--ct-border);
    color: var(--ct-text-dim);
    border-radius: 5px;
}
.zt-io-btn:hover { background: var(--ct-surface-3); color: var(--ct-accent); border-color: var(--ct-accent); }
.zt-io-btn.active { color: var(--ct-accent); border-color: var(--ct-accent); }

/* Selects et recherche */
.zt-filter-select,
.zt-log-search {
    background: var(--ct-surface-2);
    border: 1px solid var(--ct-border);
    color: var(--ct-text);
    border-radius: 6px;
}
.zt-filter-select:focus,
.zt-log-search:focus { outline: none; border-color: var(--ct-accent); }
.zt-log-search::placeholder { color: var(--ct-text-dim); }

/* Boutons plats (segue header nav) */
.zt-flat-btn { color: var(--ct-text-dim); }
.zt-flat-btn:hover { color: var(--ct-text); }
.zt-flat-play { color: var(--ct-success); }
.zt-flat-rec { color: var(--ct-danger); }

/* Barre de statut */
.zt-statusbar {
    background: var(--ct-surface) !important;
    border-top: 1px solid var(--ct-border) !important;
    color: var(--ct-text-dim);
}
.zt-status-btn {
    background: var(--ct-surface-2);
    border: 1px solid var(--ct-border);
    color: var(--ct-text-dim);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.zt-status-btn:hover {
    background: var(--ct-surface-3);
    color: var(--ct-text);
    border-color: var(--ct-border-strong);
}
.zt-status-btn svg { width: 13px; height: 13px; }
.zt-status-btn[aria-pressed="true"] { color: var(--ct-accent); border-color: var(--ct-accent); }

/* Lignes du Log : liseré accent pour le suivant / la sélection */
.queue-item.queue-next { box-shadow: inset 3px 0 0 var(--ct-accent); }
.queue-item.queue-selected:not(.queue-onair):not(.queue-next) {
    box-shadow: inset 3px 0 0 var(--ct-border-strong);
}
.zt-log-header {
    background: var(--ct-surface) !important;
    color: var(--ct-text-dim) !important;
}
.zt-log-header span,
.queue-item > * { border-right-color: rgba(255, 255, 255, 0.05) !important; }

/* Menu principal (dropup) */
.zt-menu-pop {
    background: var(--ct-surface);
    border: 1px solid var(--ct-border);
    border-radius: 10px;
    color: var(--ct-text);
    box-shadow: 0 -10px 34px rgba(0, 0, 0, 0.65);
}
.zt-menu-item { color: var(--ct-text); }
.zt-menu-item:hover { background: var(--ct-surface-2); }
.zt-menu-sec { color: var(--ct-accent); }
.zt-menu-sep { background: var(--ct-border); }
.zt-menu-check input { accent-color: var(--ct-accent); }

/* Slot hotkey vide : surface pointillée cohérente */
.hk-slot.hk-empty {
    background: var(--ct-surface) !important;
    border: 1px dashed var(--ct-border) !important;
    color: var(--ct-text-dim);
}

/* Finitions lignes Log */
.queue-next .qi-chain { color: var(--ct-accent); }
.queue-item.queue-onair .qi-meta,
.queue-item.queue-onair .qi-meta * { color: #1a1a1a !important; }

/* Bouton GO principal (play on-air) → action primaire accent */
.zt-onair-bigplay {
    background: var(--ct-accent) !important;
    border: 1px solid var(--ct-accent-hover) !important;
    border-radius: 6px !important;
    color: #1a1a1a !important;
    box-shadow: none !important;
}
.zt-onair-bigplay:hover { background: var(--ct-accent-hover) !important; }
.zt-onair-bigplay:active { background: var(--ct-accent) !important; filter: brightness(0.92); }
.zt-onair-bigplay.zt-onair-onair { color: #1a1a1a !important; text-shadow: none !important; }

/* Boutons de mode (Live Assist / Auto) */
.zt-mode-btn {
    background: var(--ct-surface-2);
    border: 1px solid var(--ct-border);
    color: var(--ct-text-dim);
}
.zt-mode-btn.active {
    background: var(--ct-accent-soft);
    border-color: var(--ct-accent);
    color: var(--ct-accent);
}

/* ──────────────────────────────────────────────────────────────────────
   Uniformisation des sections restantes : players, horloge, notes,
   lanes segue, library, now-block. On remplace les verts / bleus /
   violets / oranges Zetta par la palette gris + jaune.
   ────────────────────────────────────────────────────────────────────── */

/* ── Panneau Horloge ── */
.zt-quad-clock { background: var(--ct-bg) !important; }
.zt-clock-date { color: var(--ct-text-dim); }
.zt-clock-time { color: var(--ct-text); text-shadow: none; }
.zt-clock-row { background: var(--ct-surface-2) !important; border: 1px solid var(--ct-border) !important; }
.zt-clock-lbl { color: var(--ct-text-dim); }
.zt-clock-row b { color: var(--ct-accent); }
#clock-gap.zt-gap-over { color: var(--ct-danger); }

/* ── Panneau Notes ── */
.zt-notes-body { background: var(--ct-bg); }
.zt-notes-art { background-color: var(--ct-surface-2); border: 1px solid var(--ct-border); }
.zt-notes-title { color: var(--ct-text); }
.zt-notes-artist, .zt-notes-album, .zt-notes-meta { color: var(--ct-text-dim); }

/* ── Players / decks on-air ── */
.zt-now-block { background: var(--ct-bg); }
.zt-od-row { background: var(--ct-surface); }
.zt-od-row.zt-od-empty { background: var(--ct-surface); }
.zt-od-row.zt-od-cued { background: var(--ct-surface-2); }
/* Voie active (à l'antenne) → accent jaune */
.zt-od-row.zt-od-active { background: rgba(201, 162, 39, 0.14); }
.zt-od-active .zt-od-lane { color: var(--ct-accent); }
.zt-od-active .zt-od-fill { background: var(--ct-accent) !important; opacity: 0.28; }
/* Voie sortante → ambre atténué, cohérent */
.zt-od-row.zt-od-out { background: rgba(201, 162, 39, 0.06); }
.zt-od-out .zt-od-lane { color: var(--ct-accent-hover); }
.zt-od-out .zt-od-fill { background: var(--ct-accent-hover) !important; opacity: 0.18; }
/* Précalé (à suivre) → neutre */
.zt-od-cued .zt-od-lane,
.zt-od-cued .zt-od-title { color: var(--ct-text-dim); }
.zt-od-cued .zt-od-cd { color: var(--ct-text-dim); }
.zt-od-lane { color: var(--ct-text-dim); font-family: var(--zt-ui); }
.zt-od-title { color: var(--ct-text); }
.zt-od-artist { color: var(--ct-text-dim); }
.zt-od-cd { font-family: var(--zt-mono); color: var(--ct-text); }
.zt-od-cd.zt-cd-green { color: var(--ct-accent); text-shadow: none; }
.zt-od-cd.zt-cd-red { color: var(--ct-danger); text-shadow: none; }
/* Boutons transport par ligne → plats */
.zt-od-btn {
    background: var(--ct-surface-2);
    border: 1px solid var(--ct-border);
    border-radius: 5px;
    color: var(--ct-text-dim);
    box-shadow: none;
}
.zt-od-btn:hover { background: var(--ct-surface-3); color: var(--ct-text); }
.zt-od-btn.active { color: var(--ct-accent); text-shadow: none; }
/* Barre now-playing alternative */
.zt-now-track { background: var(--ct-surface-2); }
.zt-now-fill { background: var(--ct-accent); }
.zt-now-title { color: #1a1a1a; }
.zt-now-artist { color: rgba(26, 26, 26, 0.72); }
.zt-la-pill { background: var(--ct-accent); color: #1a1a1a; }

/* ── Lanes du Segue ── */
.zt-segue-stage,
.zt-segue-lanes { background: var(--ct-bg); }
.zt-segue-ruler { background: var(--ct-surface); border-bottom: 1px solid var(--ct-border); }
.zt-segue-foot { background: var(--ct-surface) !important; border-top: 1px solid var(--ct-border) !important; }
.zt-segue-next-lbl { color: var(--ct-text-dim); }
.zt-segue-next-name { color: var(--ct-accent); }
.zt-lane-lbl { color: var(--ct-text-dim); }
.zt-lane-wave,
.zt-lane-placeholder,
.zt-lane-now .zt-deck-wave { background: var(--ct-bg); }
.zt-lane-placeholder {
    background: var(--ct-surface) linear-gradient(180deg, transparent 45%, rgba(201, 162, 39, 0.10) 50%, transparent 55%);
}

/* ── Stack ── */
.zt-stack { background: var(--ct-bg); }
.zt-stack-row { color: var(--ct-text); border-bottom: 1px solid var(--ct-border); }
.zt-stack-row:hover { background: var(--ct-surface-2); }
.zt-stack-line .zt-stack-artist,
.zt-stack-dur,
.zt-stack-eta { color: var(--ct-text-dim); }
.zt-stack-btn { color: var(--ct-text-dim); }
.zt-stack-btn:hover { color: var(--ct-accent); }

/* ── Library ── */
.zt-library-panel { background: var(--ct-surface); border-left: 1px solid var(--ct-border); }
.zt-library-head { background: var(--ct-surface) !important; border-bottom: 1px solid var(--ct-border) !important; color: var(--ct-text); }

/* ── Hot Keys : toolbar + icône SVG ── */
.hk-title { color: var(--ct-text); }
.hk-hint { color: var(--ct-text-dim); }
.hk-icon svg { width: 15px; height: 15px; display: block; opacity: 0.9; }
.hk-empty .hk-icon svg { opacity: 0.5; }
.hk-slot.hk-row-2 .hk-icon svg { color: #1a1a00; }

/* ── Transport plat du Segue (footer) ── */
.zt-flat-btn svg { width: 15px; height: 15px; display: block; }
.zt-flat-play { color: var(--ct-success); }
.zt-flat-rec { color: var(--ct-danger); }
