/* Police Inter servie par le site (licence SIL OFL 1.1, fonts/OFL.txt) */
@font-face{font-family:"Inter";font-style:normal;font-display:swap;font-weight:100 900;src:url(/fonts/inter-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter";font-style:normal;font-display:swap;font-weight:100 900;src:url(/fonts/inter-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
/* Autocut : styles partagés (jetons, boutons) et studio. La page d'accueil ajoute landing.css. */

:root {
  --accent: #22d3ee;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(34, 211, 238, 0.13);
  --accent-line: rgba(34, 211, 238, 0.35);
  --glow: rgba(99, 102, 241, 0.28);
  --bg: #0b0d16;
  --bg-2: #0f1220;
  --panel: #141829;
  --panel-2: #1a1f33;
  --field: #1f2439;
  --border: #252b44;
  --border-2: #323a58;
  --text: #e9ecf2;
  --muted: #8b93a3;
  --faint: #5d6575;
  --ok: #3ccf9a;
  --danger: #ff6b6b;
  --blue: #569cff;
  --radius: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --accent-ink: var(--accent);
  --text-2: #c3c9d6;
  --gold: #fbbf24;
  --wave-bg: linear-gradient(180deg, #111216, #0d0e11);
  --wave-label: rgba(255, 255, 255, 0.55);
  --backdrop: rgba(5, 6, 8, 0.6);
  --nav-bg: rgba(11, 13, 22, 0.75);
  --hairline: rgba(255, 255, 255, 0.05);
  --ok-soft: rgba(60, 207, 154, 0.1);
  --ok-line: rgba(60, 207, 154, 0.25);
  --timeline: #6b7385;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

/* Thème clair : mêmes accents, mêmes formes ; seuls les fonds, les textes et les nuances lisibles sur blanc changent.
   Le cyan garde les dégradés et les fonds ; --accent-ink, plus profond, sert au texte et aux traits fins. */
:root[data-theme="light"] {
  --accent-ink: #0e7490;
  --accent-soft: rgba(6, 182, 212, 0.12);
  --accent-line: rgba(8, 145, 178, 0.38);
  --glow: rgba(99, 102, 241, 0.24);
  --bg: #f4f6fb;
  --bg-2: #eceff7;
  --panel: #ffffff;
  --panel-2: #f1f3f9;
  --field: #eef1f7;
  --border: #dfe3ee;
  --border-2: #c9cfde;
  --text: #11142a;
  --text-2: #363c52;
  --muted: #555d72;
  --faint: #666e82;
  --ok: #047857;
  --danger: #d92d2d;
  --blue: #2563eb;
  --gold: #b45309;
  --shadow: 0 12px 40px rgba(30, 36, 70, 0.14);
  --wave-bg: linear-gradient(180deg, #f8f9fd, #eef1f8);
  --wave-label: rgba(17, 20, 42, 0.6);
  --backdrop: rgba(20, 24, 45, 0.38);
  --nav-bg: rgba(244, 246, 251, 0.8);
  --hairline: rgba(17, 20, 42, 0.07);
  --ok-soft: rgba(4, 120, 87, 0.09);
  --ok-line: rgba(4, 120, 87, 0.28);
  --timeline: #666e82;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
code, kbd {
  font: 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--field); border: 1px solid var(--border); border-radius: 4px; padding: 2px 5px;
}
h1, h2, h3 { margin: 0; }
h2 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* --- Boutons ---------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--field); color: var(--text); border: 1px solid var(--border-2);
  border-radius: 8px; padding: 8px 14px; font: inherit; font-weight: 500; cursor: pointer;
  text-decoration: none; transition: border-color .15s, background .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--accent-ink); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.ghost { background: transparent; }
.btn.danger:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent; color: #06102b; font-weight: 650;
  box-shadow: 0 6px 22px var(--glow);
}
.btn.primary:hover:not(:disabled) { filter: brightness(1.07); border-color: transparent; }
.btn.wide { width: 100%; }
.btn svg, .ico svg { display: block; }
.ico { display: inline-flex; }

.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0;
  background: transparent; color: var(--muted); border: 1px solid transparent; border-radius: 8px; cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.icon-btn:hover:not(:disabled) { color: var(--text); background: var(--field); border-color: var(--border); }
.icon-btn:disabled { opacity: .3; cursor: default; }

/* --- Barre du haut ------------------------------------------------------------- */

.topbar {
  height: 52px; display: flex; align-items: center; gap: 16px; padding: 0 16px;
  background: var(--bg-2); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; text-decoration: none; }
.topbar-mid { display: flex; gap: 2px; padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--border); }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.privacy-badge {
  font-size: 12px; color: var(--ok); padding: 3px 10px; border-radius: 99px;
  background: var(--ok-soft); border: 1px solid var(--ok-line);
}
.pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; padding: 4px 11px;
  border-radius: 99px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.pill.busy .dot { background: var(--accent-ink); animation: pulse 1s ease-in-out infinite; }
.pill.ready .dot { background: var(--ok); }
.pill.error { color: var(--danger); border-color: var(--danger); }
.pill.error .dot { background: var(--danger); }
@keyframes pulse { 50% { opacity: .3; } }

/* --- Disposition du studio ------------------------------------------------------- */

body.studio { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.layout {
  flex: 1; min-height: 0; display: grid; grid-template-columns: 250px minmax(0, 1fr) 340px;
  gap: 12px; padding: 12px;
}
.panel {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; min-width: 0;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.count { color: var(--text); background: var(--field); border-radius: 99px; padding: 1px 8px; margin-left: 4px; font-size: 11px; letter-spacing: 0; }
.hint { color: var(--faint); font-size: 12px; }

/* Pistes */
.tracks { display: flex; flex-direction: column; overflow: hidden; }
#track-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; overflow: auto; flex: 1; }
#track-list li {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; transition: background .15s;
}
#track-list li:hover { background: var(--panel-2); }
#track-list li.active { background: var(--accent-soft); border-color: var(--accent-line); }
#track-list li.none { color: var(--faint); cursor: default; font-size: 13px; padding: 8px 2px; }
#track-list li.none:hover { background: none; }
#track-list li.group {
  cursor: default; gap: 6px; padding: 10px 4px 2px; font-size: 11.5px; color: var(--faint); background: none; border-color: transparent;
  white-space: nowrap; overflow: hidden;
}
#track-list li.group span { overflow: hidden; text-overflow: ellipsis; }
#track-list li.group:hover { background: none; }
.panel-head .head-actions { display: flex; gap: 6px; }
.ticon { color: var(--muted); display: grid; }
li.active .ticon { color: var(--accent-ink); }
.tinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.tmeta { color: var(--muted); font-size: 12px; }
.tremove { background: none; border: 0; color: var(--faint); cursor: pointer; padding: 4px; border-radius: 6px; display: grid; opacity: 0; }
#track-list li:hover .tremove { opacity: 1; }
.tremove:hover { color: var(--danger); background: var(--field); }
.session { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.session h2 { margin-bottom: 4px; }
.session .btn { justify-content: flex-start; }
.autosave { color: var(--faint); font-size: 12px; margin: 4px 0 0; }

/* Zone centrale */
.center { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.editor { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.dropzone {
  flex: 1; display: grid; place-items: center; border: 1.5px dashed var(--border-2); border-radius: 16px;
  background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.12), transparent 60%), var(--panel);
  transition: border-color .2s, background .2s;
}
.dropzone-inner { text-align: center; max-width: 460px; padding: 32px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.dropzone h1 { font-size: 24px; letter-spacing: -.02em; }
.dropzone p { color: var(--muted); margin: 0; }
.dropzone .fine { font-size: 12px; color: var(--faint); }
.drop-icon {
  width: 76px; height: 76px; display: grid; place-items: center; border-radius: 20px; color: var(--accent-ink);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
}
body.dragging .dropzone, body.dragging .waveform { border-color: var(--accent-ink); }

.wave-panel { padding: 14px 14px 10px; }
.wave-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.wave-head h2 { color: var(--text); text-transform: none; letter-spacing: -.01em; font-size: 15px; font-weight: 600; }
.meta { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.zoom-tools { display: flex; align-items: center; gap: 2px; }
.zoom-tools input { width: 120px; }
.video-box { display: flex; justify-content: center; background: #000; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.video-box.off { display: none; }
.video-box video { display: block; max-width: 100%; max-height: min(260px, 30vh); }
.exp-video { display: flex; flex-direction: column; gap: 10px; padding: 10px; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 10px; }
.exp-video-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.exp-video .help { margin: 0; }
.exp-sub { display: flex; flex-direction: column; gap: 8px; padding-left: 4px; }
.minimap { border-radius: 6px; overflow: hidden; background: var(--bg); margin-bottom: 8px; }
.waveform {
  background: var(--wave-bg); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden;
}
.waveform ::part(region) { border-radius: 2px; }
.waveform ::part(region-content) { font-size: 10px; color: var(--wave-label); padding: 3px 5px; }
.waveform ::part(region-handle) { border-color: var(--wave-label) !important; width: 3px !important; }
.transport { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.transport .group { display: flex; align-items: center; gap: 6px; }
body.playing #play { border-color: var(--accent-ink); color: var(--accent-ink); }

.toggle { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; cursor: pointer; margin-left: 6px; }
.toggle > input, .switch > input:not(.inline) { position: absolute; opacity: 0; pointer-events: none; }
.toggle span, .switch > input + span {
  width: 30px; height: 17px; border-radius: 99px; background: var(--field); border: 1px solid var(--border-2);
  position: relative; transition: background .15s; flex: none;
}
.toggle span::after, .switch > input + span::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--muted); transition: transform .15s, background .15s;
}
.toggle input:checked + span, .switch input:checked + span { background: var(--accent-soft); border-color: var(--accent-ink); }
.toggle input:checked + span::after, .switch input:checked + span::after { transform: translateX(13px); background: var(--accent-ink); }
.toggle input:focus-visible + span, .switch input:focus-visible + span { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

.seg-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.table-wrap { overflow: auto; flex: 1; min-height: 0; margin: 0 -14px -14px; padding: 0 14px 14px; }
.segments { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.segments th {
  text-align: left; color: var(--faint); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  padding: 6px 8px; position: sticky; top: 0; background: var(--panel); z-index: 1;
}
.segments td { padding: 4px 8px; border-top: 1px solid var(--border); white-space: nowrap; }
.segments tr { cursor: pointer; transition: background .1s; }
.segments tbody tr:hover td { background: var(--panel-2); }
.segments tr.selected td { background: var(--accent-soft); }
.segments td.num { color: var(--faint); width: 36px; }
.segments td.name { width: 100%; font-weight: 500; }
.segments td.time { color: var(--muted); }
.segments td.actions { text-align: right; }
.segments td.actions .icon-btn { width: 26px; height: 26px; }
.segments td.actions .del:hover { color: var(--danger); }
.segments input { width: 100%; padding: 4px 8px; }
.segments .empty td { color: var(--faint); text-align: center; padding: 28px; cursor: default; background: none !important; }

/* Inspecteur */
.inspector { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); }
.tab {
  flex: 1; background: none; border: 0; color: var(--muted); font: inherit; font-weight: 500; padding: 7px 0;
  border-radius: 7px; cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--field); color: var(--text); }
.tab-body { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.field > span { display: flex; justify-content: space-between; }
.field em { font-style: normal; color: var(--text); font-variant-numeric: tabular-nums; }
.help { color: var(--faint); font-size: 12px; margin: -6px 0 2px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.row { display: flex; gap: 8px; margin-top: 4px; }
.row-inline { display: flex; gap: 4px; align-items: center; }
.row-inline select { flex: 1; min-width: 0; }

input[type=text], input[type=number], input[type=search], select, textarea {
  background: var(--field); color: var(--text); border: 1px solid var(--border-2); border-radius: 7px;
  padding: 7px 9px; font: inherit; font-size: 13px; min-width: 0; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 3px var(--accent-soft); }
input.inline { width: 64px; padding: 3px 6px; }
select.inline { width: auto; padding: 3px 6px; }
.field-end { display: flex; align-items: center; gap: 8px; }
.mini-btn {
  font: inherit; font-size: 11px; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft);
  border: 1px solid var(--accent-line); border-radius: 6px; padding: 1px 7px; cursor: pointer;
}
.mini-btn:hover:not(:disabled) { background: rgba(34, 211, 238, 0.22); }
.mini-btn:disabled { opacity: .35; cursor: default; }
input[type=range] { accent-color: var(--accent-ink); width: 100%; }
input[type=checkbox] { accent-color: var(--accent-ink); }

.seg-control { display: flex; background: var(--field); border: 1px solid var(--border-2); border-radius: 8px; padding: 3px; gap: 3px; }
.seg-control button {
  flex: 1; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; font-weight: 500;
  padding: 6px 4px; border-radius: 6px; cursor: pointer;
}
.seg-control button.active { background: var(--panel-2); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
.switch { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; position: relative; }
details { font-size: 13px; }
details summary { cursor: pointer; color: var(--muted); }
details textarea { margin: 8px 0; resize: vertical; }

.export-bar { border-top: 1px solid var(--border); padding: 14px 16px 16px; background: var(--panel-2); display: flex; flex-direction: column; gap: 8px; }
.summary { color: var(--muted); font-size: 12px; text-align: center; }
.progress { height: 4px; border-radius: 99px; background: var(--field); overflow: hidden; }
.progress div { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .2s; }
.status { font-size: 12px; color: var(--muted); text-align: center; min-height: 1em; }

/* Menu contextuel, toasts, raccourcis */
.ctxmenu {
  position: fixed; z-index: 35; min-width: 210px; padding: 5px; background: var(--panel-2);
  border: 1px solid var(--border-2); border-radius: 10px; box-shadow: var(--shadow);
}
.ctxmenu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; background: none; border: 0;
  color: var(--text); font: inherit; font-size: 13px; border-radius: 6px; cursor: pointer; text-align: left;
}
.ctxmenu button:hover { background: var(--field); }
.ctxmenu svg { color: var(--muted); }
.ctxmenu hr { margin: 4px 6px; border: 0; border-top: 1px solid var(--border); }
.ctx-sp { width: 15px; flex: none; }
.ctx-colors { display: inline-flex; gap: 4px; margin-left: auto; }
.ctx-colors i { display: inline-block; width: 14px; height: 14px; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 40;
  background: var(--panel-2); border: 1px solid var(--danger); color: var(--text);
  padding: 10px 16px; border-radius: 10px; max-width: min(560px, calc(100vw - 32px)); box-shadow: var(--shadow);
}
.toast.info { border-color: var(--border-2); }
.toast-act { margin-left: 10px; padding: 3px 10px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--field); color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.toast-act:hover { background: var(--accent); color: var(--bg); }

dialog {
  background: var(--panel); color: var(--text); border: 1px solid var(--border-2); border-radius: 14px;
  padding: 22px 24px; box-shadow: var(--shadow); max-width: min(520px, calc(100vw - 32px));
}
dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(2px); }
dialog h2 { margin-bottom: 14px; }
dialog table { border-collapse: collapse; width: 100%; font-size: 13px; }
dialog td { padding: 6px 0; border-top: 1px solid var(--border); }
dialog td:first-child { white-space: nowrap; padding-right: 18px; }
dialog form { margin-top: 16px; text-align: right; }

@media (max-width: 1180px) {
  .layout { grid-template-columns: 220px minmax(0, 1fr) 300px; }
  .privacy-badge { display: none; }
}
@media (max-width: 920px) {
  body.studio { height: auto; overflow: auto; }
  .layout { grid-template-columns: minmax(0, 1fr); padding: 12px 16px; }
  .tracks, .inspector { max-height: none; }
  .seg-panel { min-height: 320px; }
  .dropzone { min-height: 420px; }
  .hint { display: none; }
}

.lang-btn {
  font: inherit; font-size: 12px; font-weight: 650; letter-spacing: .04em; color: var(--muted); cursor: pointer;
  background: transparent; border: 1px solid var(--border-2); border-radius: 7px; padding: 4px 8px; line-height: 1.2;
}
.lang-btn:hover { color: var(--text); border-color: var(--accent-line); }
.drop-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.icon-btn.bordered { border: 1px solid var(--border-2); width: 30px; height: 30px; }

.gdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
td.name { position: relative; }
td.name .final {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%); pointer-events: none;
  font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums;
}
.icon-btn.on { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-line); }

/* Fondus, variations, cibles d'export, favoris et boucles */
.curve-row { display: flex; align-items: center; gap: 10px; }
.curve-row .seg-control { flex: 1; }
.curve-preview { width: 72px; height: 30px; flex: none; }
.curve-preview .fill { fill: var(--accent-soft); }
.curve-preview .line { fill: none; stroke: var(--accent-ink); stroke-width: 1.6; stroke-linejoin: round; }
.checks { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 10px; margin: 10px 0 8px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; color: var(--text); position: relative; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check span::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border-radius: 4px;
  border: 1px solid var(--border-2); background: var(--field);
}
.check input:checked + span::before {
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306102b' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 11px no-repeat;
  border-color: var(--accent-ink);
}
.check input:focus-visible + span::before { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.check.off { opacity: .4; cursor: default; }
details .count { margin-left: 6px; }
.segments td.actions .icon-btn.on { background: none; border-color: transparent; }
.segments td.actions .fav.on { color: var(--gold); }
.segments td.actions .fav.on svg { fill: currentColor; }
.segments td.actions .fav:not(.on), .segments td.actions .loop:not(.on) { opacity: 0; }
.segments tr:hover td.actions .icon-btn, .segments tr.selected td.actions .icon-btn { opacity: 1; }

/* Revue au clavier */
.review {
  margin-top: 10px; padding: 10px 12px 0; border-radius: 9px; overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(139, 92, 246, 0.08)); border: 1px solid var(--accent-line);
}
.review-top { display: flex; align-items: center; gap: 10px; }
.review-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #06102b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-radius: 6px; padding: 2px 8px;
}
.review-count { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.review-top input { flex: 1; font-weight: 600; font-size: 14px; }
.review-keys { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 9px 0 10px; font-size: 12px; color: var(--muted); }
.review-keys kbd { font-size: 11px; margin-right: 3px; }
.review .progress { margin: 0 -12px; border-radius: 0; height: 3px; }
.review .progress div { width: 0; }
body.reviewing #review-start { border-color: var(--accent-ink); color: var(--accent-ink); }

/* Liste ou bibliothèque */
.seg-panel .panel-head .hint { margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg-control.small { padding: 2px; flex: none; }
.seg-control.small button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: 12px; }
.textview { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.tv-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tv-info { flex: 1; min-width: 200px; color: var(--muted); font-size: 12.5px; }
.tv-body { flex: 1; min-height: 0; overflow: auto; margin: 0 -14px -14px; padding: 0 14px 14px; }
.tv-cue { display: flex; align-items: baseline; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; line-height: 1.5; }
.tv-cue:hover { background: var(--field); }
.tv-cue.playing { background: var(--accent-soft); }
.tv-time { flex: none; width: 44px; color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.tv-text { flex: 1; font-size: 14px; }
.tv-cue.cut .tv-text { text-decoration: line-through; color: var(--faint); }
.tv-cue .tv-act { flex: none; align-self: center; width: 26px; height: 26px; opacity: 0; }
.tv-cue:hover .tv-act, .tv-cue.cut .tv-act, .tv-act:focus-visible { opacity: 1; }
@media (hover: none) { .tv-cue .tv-act { opacity: 1; } }
.library { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.lib-bar { display: flex; align-items: center; gap: 12px; }
.search { position: relative; flex: 1; max-width: 360px; }
.search .ico { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search input { padding-left: 30px; }
.lib-bar .toggle { margin-left: 0; }
.lib-count { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; }
.lib-grid {
  flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px; align-content: start; margin: 0 -14px -14px; padding: 2px 14px 14px;
}
.card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 9px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border); transition: border-color .15s, background .15s;
}
.card:hover { border-color: var(--border-2); }
.card.selected { border-color: var(--accent-line); background: var(--accent-soft); }
.card canvas { width: 100%; height: 38px; display: block; }
.card .cthumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #000; border-radius: 6px; }
.segments td.num .vthumb { width: 44px; height: 26px; object-fit: cover; border-radius: 3px; vertical-align: middle; margin-left: 8px; background: #000; }
.card-info { display: flex; flex-direction: column; min-width: 0; padding-right: 22px; }
.cname { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmeta { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .fav { position: absolute; right: 4px; bottom: 6px; width: 26px; height: 26px; }
.card .fav:not(.on) { opacity: 0; }
.card:hover .fav { opacity: 1; }
.card .fav.on { color: var(--gold); }
.card .fav.on svg { fill: currentColor; }
.lib-empty { color: var(--faint); text-align: center; grid-column: 1 / -1; padding: 30px 0; margin: 0; }

.link-btn {
  background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--accent-ink); cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px;
}
.link-btn:hover { text-decoration-color: var(--accent-ink); }
.dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Étiquettes, doublons et nommage UCS */
.lib-bar { flex-wrap: wrap; }
.lib-bar .btn .ico { display: inline-flex; }
.lib-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 12px; color: var(--muted); background: var(--field); border: 1px solid var(--border-2);
}
.chip span { color: var(--faint); font-variant-numeric: tabular-nums; }
.chip:hover { color: var(--text); }
.chip.on { color: var(--text); background: var(--accent-soft); border-color: var(--accent-line); }
.chip.on span { color: var(--accent-ink); }
.lib-dupbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 9px; font-size: 13px;
  background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.35);
}
.lib-dupbar span { flex: 1; min-width: 160px; }
.card.dup { border-left: 3px solid var(--dup); }
.ctags { color: var(--accent-ink); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.iv-bar { margin: 10px 0 4px; padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.45;
  background: var(--accent-soft); border: 1px solid var(--accent-line); }
.iv-bar p { margin: 0 0 8px; color: var(--text); }
.iv-bar .row { display: flex; gap: 6px; flex-wrap: wrap; }
.hes-box { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
#hes-panel { margin-top: 10px; }
#hes-panel .help { margin: 0 0 8px; }
.hes-list { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; margin-bottom: 8px; }
.hes-item { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 7px; font-size: 12.5px; cursor: pointer; }
.hes-item:hover { background: var(--field); }
.hes-time { flex: 1; font-variant-numeric: tabular-nums; }
.hes-dur { color: var(--faint); font-variant-numeric: tabular-nums; }
.hes-item .icon-btn { width: 24px; height: 24px; }
.ucs-box { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.segments td.name input.cat { width: 108px; margin-right: 6px; font-size: 11.5px; font-weight: 600; color: var(--accent-ink); padding: 4px 6px; }
.segments td.name.with-cat input:not(.cat) { width: calc(100% - 114px); }
#ucs-opts { margin-top: 10px; }

/* Réglages d'un son, contrôle qualité, banc d'essai, superposition, micro, générateur */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.empty-note { color: var(--faint); font-size: 13px; margin: 8px 0; }
.snd-form { display: flex; flex-direction: column; gap: 12px; }
.snd-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.snd-tools { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.snd-tools .btn .ico, .synth-actions .btn .ico, .dialog-actions .btn .ico { display: inline-flex; }
.segments td.num { white-space: nowrap; }
.fxmark { display: inline-flex; color: var(--accent-2); margin-left: 4px; vertical-align: -1px; }
#replace-box .switch { margin-top: 6px; }
#replace-box .grid2 { margin-top: 8px; }
#replace-box .btn { margin-top: 8px; }
#replace-box .help { margin: 6px 0 0; }

dialog.wide { width: min(760px, calc(100vw - 32px)); max-width: min(760px, calc(100vw - 32px)); }
dialog .help { margin: 0 0 12px; }
dialog .field { margin-bottom: 12px; }
dialog form.dialog-actions { margin-top: 18px; }
.qc-status { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.qc-status.ok { color: var(--ok); }
.qc-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.qc-wrap { max-height: min(52vh, 460px); overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; }
dialog .qc-table th { position: sticky; top: 0; background: var(--panel-2); text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 7px 10px; }
dialog .qc-table td { padding: 7px 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
dialog .qc-table td:first-child { padding-right: 10px; }
.qc-table tbody tr { cursor: pointer; }
.qc-table tbody tr:hover { background: var(--panel-2); }
.qc-table tr.empty td { color: var(--faint); text-align: center; cursor: default; }
.qc-name { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.qc-name small { display: block; color: var(--faint); font-size: 11px; }
.qc-issues { white-space: normal !important; }
.qc-chip {
  display: inline-block; margin: 1px 4px 1px 0; padding: 1px 8px; border-radius: 999px; font-size: 11px;
  color: var(--gold); background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.3); cursor: help;
}
.qc-chip.clipped { color: var(--danger); background: rgba(255, 107, 107, 0.12); border-color: rgba(255, 107, 107, 0.35); }
.qc-ok { color: var(--ok); display: inline-flex; }

.bench-now {
  font-size: 18px; font-weight: 600; text-align: center; padding: 18px 12px; margin-bottom: 14px; border-radius: var(--radius);
  background: var(--field); border: 1px solid var(--border-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bench-now.flash { animation: bench-flash 0.35s ease-out; }
@keyframes bench-flash { from { border-color: var(--accent-ink); background: var(--accent-soft); } to { border-color: var(--border-2); background: var(--field); } }
#bench { width: min(440px, calc(100vw - 32px)); }

.layer-a { padding: 8px 10px; border-radius: 8px; background: var(--field); border: 1px solid var(--border); color: var(--text); font-size: 13px; }
#layer { width: min(520px, calc(100vw - 32px)); }

#rec { width: min(440px, calc(100vw - 32px)); }
.rec-meter { height: 12px; border-radius: 6px; background: var(--field); border: 1px solid var(--border); overflow: hidden; }
#rec-level { height: 100%; width: 0; background: linear-gradient(90deg, var(--ok), #fbbf24 85%, var(--danger)); background-size: 440px 100%; transition: width 0.05s linear; }
#rec-level.hot { box-shadow: inset -6px 0 0 var(--danger); }
.rec-info { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; color: var(--muted); font-size: 13px; }
.rec-time { font: 600 24px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); }
#rec.recording .rec-time { color: var(--danger); }
#rec.recording #rec-state::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-right: 8px; animation: rec-blink 1s infinite; }
@keyframes rec-blink { 50% { opacity: 0.2; } }
#rec-toggle { display: inline-flex; align-items: center; gap: 6px; }

.synth-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.synth-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.synth-list { list-style: none; margin: 14px 0 0; padding: 0; max-height: 180px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.synth-list li { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-top: 1px solid var(--border); font-size: 13px; }
.synth-list li:first-child { border-top: 0; }
.synth-list li span { flex: 1; }
.synth-list li em { font-style: normal; color: var(--faint); font-variant-numeric: tabular-nums; }

/* Sons similaires */
.card .sim { position: absolute; right: 30px; bottom: 6px; width: 26px; height: 26px; opacity: 0; }
.card:hover .sim { opacity: 1; }
.card.sim-target { border-color: var(--accent-ink); box-shadow: 0 0 0 1px var(--accent-line); }
.csim {
  position: absolute; top: 6px; right: 6px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-variant-numeric: tabular-nums;
  color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.snd-form .grid3 .field > span { flex-direction: column; gap: 0; }
.snd-form .grid3 .field em { font-size: 11.5px; }
.tune-box { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; }
.tune-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.tune-head em { flex: 1; font-style: normal; color: var(--accent-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tune-head .mini-btn { margin-left: auto; }
.tune-grid { display: grid; grid-template-columns: minmax(0, 1fr) 92px; gap: 8px; }
.tune-grid .field { margin: 0; }
.tune-box .btn { align-self: flex-start; }
.segments .exact { color: var(--accent-ink); }
.lib-map { position: relative; flex: 1; min-height: 260px; display: flex; flex-direction: column; gap: 8px; }
.lib-map canvas { flex: 1; min-height: 240px; width: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); }
.map-tip { position: absolute; pointer-events: none; background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 8px; padding: 4px 8px; font-size: 12px; white-space: nowrap; box-shadow: var(--shadow); }
.map-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-left: auto; }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.map-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* Recettes */
.recipe-save { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.recipe-save input[type=text] { flex: 1 1 100%; min-width: 0; }
.recipe-save .btn .ico, .recipe-actions .btn .ico { display: inline-flex; }
.recipe-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; }
.recipe-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel-2); }
.recipe-list li.recipe-empty { color: var(--faint); justify-content: center; border-style: dashed; background: none; }
.recipe-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.recipe-info strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recipe-info span { color: var(--muted); font-size: 12px; }
.recipe-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Palette de commandes */
dialog.palette { width: min(560px, calc(100vw - 32px)); max-width: min(560px, calc(100vw - 32px)); padding: 0; margin-top: 12vh; overflow: hidden; }
#palette-input { width: 100%; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; padding: 16px 18px; font-size: 16px; outline: none; }
.palette-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.palette-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.palette-list li.on { background: var(--accent-soft); color: var(--text); }
.palette-list li kbd { font-size: 11px; color: var(--muted); }
.palette-list li.palette-empty { color: var(--faint); cursor: default; justify-content: center; }
.palette-foot { display: flex; gap: 16px; margin: 0; padding: 9px 16px; border-top: 1px solid var(--border); color: var(--faint); font-size: 12px; }

/* Visite guidée */
.tour { position: fixed; inset: 0; z-index: 1000; }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px var(--backdrop); border: 2px solid var(--accent-ink); transition: all 0.25s ease; pointer-events: none; }
.tour-card { position: fixed; width: min(340px, calc(100vw - 20px)); background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); transition: top 0.25s ease, left 0.25s ease; }
.tour-card h3 { margin: 2px 0 6px; font-size: 16px; }
.tour-card p { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.tour-step { font-size: 11.5px; color: var(--accent-ink); text-transform: uppercase; letter-spacing: 0.06em; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* Mode simple : les réglages avancés sont cachés (ils restent appliqués) */
body.simple .adv { display: none !important; }
body:not(.simple) .simple-only { display: none !important; }
.mode-switch button { min-width: 64px; justify-content: center; }
.adv-note { font-size: 12.5px; color: var(--muted); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 8px; padding: 8px 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.export-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.export-tools .btn { flex: 1 1 120px; justify-content: center; white-space: nowrap; }
.export-tools .btn .ico { display: inline-flex; }

/* Question d'usage */
.usage-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.usage-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px; border: 1px solid var(--border-2); border-radius: var(--radius); background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; }
.usage-card:hover, .usage-card:focus-visible { border-color: var(--accent-ink); outline: none; }
.usage-card .uico { color: var(--accent-ink); display: inline-flex; margin-bottom: 2px; }
.usage-card strong { font-weight: 600; }
.usage-card small { color: var(--muted); font-size: 12px; line-height: 1.35; }

/* Liste de sons à faire */
#todo-text { width: 100%; resize: vertical; font: inherit; }
.todo-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0 8px; color: var(--muted); font-size: 13px; }
.todo-bar .btn .ico { display: inline-flex; }
.todo-list { list-style: none; margin: 0; padding: 0; max-height: 40vh; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.todo-list li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; background: var(--panel-2); cursor: pointer; font-size: 13.5px; }
.todo-list .tick { color: var(--faint); display: inline-flex; }
.todo-list li.done .tick { color: var(--ok); }
.todo-list li.manual .tick { color: var(--accent-ink); }
.todo-list li.done .tline { color: var(--muted); }
.todo-list .tline { flex: 1; min-width: 0; }
.todo-list .thits { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }

/* Tablettes et téléphones : un panneau à la fois */
.mobile-nav { display: none; }
@media (hover: none) {
  .card .sim, .card .fav, .tremove { opacity: 1; }
}
@media (max-width: 920px) {
  body.studio { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .mobile-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; gap: 4px;
    background: var(--panel); border-top: 1px solid var(--border); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-nav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0;
    color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 550; padding: 6px 0; border-radius: 10px; cursor: pointer;
  }
  .mobile-nav button .ico { display: inline-flex; }
  .mobile-nav button.active { color: var(--accent-ink); background: var(--accent-soft); }
  body[data-pane=tracks] .center, body[data-pane=tracks] .inspector,
  body[data-pane=sounds] .tracks, body[data-pane=sounds] .inspector,
  body[data-pane=settings] .tracks, body[data-pane=settings] .center { display: none; }
  .inspector .tab-body { overflow: visible; }
  .export-bar { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); border-radius: 0 0 var(--radius) var(--radius); }
  .tour-card { max-width: calc(100vw - 20px); }
}
@media (max-width: 560px) {
  .layout { padding: 10px; gap: 10px; }
  .topbar { gap: 8px; padding-left: 10px; padding-right: 10px; }
  .topbar .brand span, #engine .label, .topbar #help { display: none; }
  .topbar-mid { padding-left: 6px; margin-left: 0; }
  .topbar-end { gap: 4px; }
  .topbar { gap: 6px; padding-left: 8px; padding-right: 8px; }
  .topbar .mode-switch button { padding: 4px 7px; }
  .topbar-mid .icon-btn, .topbar .theme-btn { width: 28px; }
  .topbar .lang-btn { padding: 4px 6px; }
  .mode-switch button { min-width: 0; padding: 4px 8px; }
  .segments th:nth-child(3), .segments td:nth-child(3) { display: none; }
  .transport .group { flex-wrap: wrap; }
  .transport .toggle { font-size: 12px; margin-left: 0; }
  .lib-bar .search { flex: 1 1 100%; }
  dialog { padding: 18px 16px; }
  .usage-list { grid-template-columns: 1fr 1fr; }
  .wave-head { flex-wrap: wrap; gap: 8px; }
  .zoom-tools { width: 100%; }
  .zoom-tools input[type=range] { flex: 1; }
}

/* --- Studio vidéo ------------------------------------------------------------------ */

.st {
  position: fixed; inset: 0; z-index: 30; background: var(--bg); display: flex; flex-direction: column;
  padding: 0 12px 12px; gap: 10px;
}
body.st-open { overflow: hidden; }
body.st-open .mobile-nav { display: none; }
.st-top { display: flex; align-items: center; gap: 12px; height: 54px; border-bottom: 1px solid var(--border); margin: 0 -12px; padding: 0 12px; }
.st-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 650; white-space: nowrap; }
.st-title .ico { color: var(--accent-ink); }
.st-top-mid { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.st-top-mid .seg-control { margin-left: 8px; }
.st-top .btn .ico, .st-add .btn .ico, .st-tools .btn .ico, .st-actions .btn svg { display: inline-flex; }
.st-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 230px minmax(0, 1fr) 300px; gap: 10px; }
.st-media, .st-inspector, .st-stage, .st-timeline {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; min-height: 0;
}
.st-media { padding: 12px; display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.st-media-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.st-media-head .btn .ico { display: inline-flex; }
.st-sources { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.st-sources li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; padding: 8px; border-radius: 8px; background: var(--panel-2); }
.st-sources li.st-none { display: block; background: none; color: var(--faint); font-size: 12px; padding: 4px 0; }
.st-src-del { width: 24px; height: 24px; }
.st-src-del:hover { color: var(--danger); }
.st-src-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-src-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
.st-kind { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--field); color: var(--muted); }
.st-kind.video { color: var(--accent-ink); }
.st-kind.music { color: #f472b6; }
.st-kind.image { color: #34d399; }
.st-add { display: flex; flex-wrap: wrap; gap: 6px; }
.st-stage { display: flex; flex-direction: column; padding: 10px; gap: 8px; }
.st-preview { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; background: #05060a; border-radius: 8px; overflow: hidden; }
.st-preview canvas { display: block; box-shadow: 0 0 0 1px var(--border); cursor: grab; touch-action: none; }
.st-preview canvas:active { cursor: grabbing; }
.st-empty { position: absolute; inset: auto 20px 20px; text-align: center; color: var(--muted); margin: 0; }
.st-transport { display: flex; align-items: center; gap: 8px; justify-content: center; }
.st-transport .btn { min-width: 104px; }
.st-transport .btn svg { display: block; }
.st-clock { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; min-width: 120px; }
.st-clock b { color: var(--text); font-weight: 600; }
.st-inspector { padding: 14px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.st-inspector h3 { font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.st-inspector h3 small { font-size: 12px; font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-inspector .help { margin: -4px 0 0; }
.st-inspector textarea { resize: vertical; }
.st-inspector input[type=color] { width: 100%; height: 32px; padding: 2px; background: var(--field); border: 1px solid var(--border-2); border-radius: 7px; }
.st-inspector .seg-control.small { flex-wrap: wrap; }
.st-inspector .seg-control.small button { flex: 1; justify-content: center; }
.st-trans-box { display: flex; flex-direction: column; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; }
.st-actions { justify-content: space-between; margin-top: auto; padding-top: 6px; }
.st-tip { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.st-tip-text { flex: 1; min-width: 0; }
.st-gap {
  position: absolute; top: 4px; bottom: 4px; border-radius: 6px; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--muted) 16%, transparent) 6px 8px);
}
.st-gap-close {
  pointer-events: auto; opacity: 0; width: 20px; height: 20px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--border-2); border-radius: 50%; background: var(--panel-2); color: var(--text); cursor: pointer;
}
.st-tlane:hover .st-gap-close, .st-gap-close:focus-visible { opacity: 1; }
.st-gap-close:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.st-peek {
  position: fixed; z-index: 34; width: 220px; padding: 4px; border-radius: 10px; background: var(--panel-2);
  border: 1px solid var(--border-2); box-shadow: var(--shadow); pointer-events: none;
}
.st-peek video, .st-peek img { display: block; width: 100%; max-height: 140px; object-fit: contain; border-radius: 6px; background: #000; }
.st-peek [hidden] { display: none; }
.st-peek-time { position: absolute; right: 10px; bottom: 10px; font-size: 11px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, 0.6); color: #fff; }
.st-peek-time:empty { display: none; }
.st-versions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.st-versions li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--panel-2); }
.st-versions li div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.st-versions li span { color: var(--muted); font-size: 12px; }
.st-timeline { display: flex; flex-direction: column; height: 292px; flex: none; overflow: hidden; position: relative; }
.st-resize { position: absolute; top: -6px; left: 0; right: 0; height: 10px; cursor: ns-resize; z-index: 5; touch-action: none; }
.st-resize::after { content: ""; position: absolute; left: 50%; top: 3px; width: 44px; height: 4px; margin-left: -22px; border-radius: 4px; background: var(--border-2); opacity: 0; transition: opacity 0.15s; }
.st-timeline:hover .st-resize::after, .st-resize:active::after { opacity: 1; }
.st-tools { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.st-hint { margin-left: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-zoom { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--faint); width: 200px; flex: none; }
.st-tracks { flex: 1; min-height: 0; display: flex; overflow: auto; }
.st-labels { flex: none; width: 168px; border-right: 1px solid var(--border); font-size: 11.5px; color: var(--muted); height: max-content; min-height: 100%; }
.st-labels > div { display: flex; align-items: center; gap: 6px; padding: 0 10px; border-bottom: 1px solid var(--border); }
.st-labels .ico { color: var(--faint); }
.st-ruler-label, .st-ruler { height: 22px; }
.st-scroll { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; position: relative; cursor: text; height: max-content; min-height: 100%; }
.st-canvas-w { position: relative; min-height: 100%; }
/* En-têtes des pistes : nom (réglages et mixage), image, muet, solo, verrou, vumètre */
.st-labels > .st-tlabel { position: relative; display: flex; align-items: center; gap: 4px; padding: 0 6px 0 4px; }
.st-tlabel.sel { background: var(--accent-soft); }
.st-tname { display: inline-flex; align-items: center; gap: 5px; min-width: 0; flex: 1; padding: 3px 4px; border: 0; border-radius: 5px; background: none; color: var(--text); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.st-tname span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-tname svg { flex: none; color: var(--faint); }
.st-tname:hover { background: var(--field); }
.st-tbtns { display: flex; gap: 2px; flex: none; }
.st-tbtn { width: 20px; height: 20px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--border-2); border-radius: 4px; background: var(--field); color: var(--faint); cursor: pointer; font: 700 10px/1 inherit; }
.st-tbtn svg { display: block; }
.st-tbtn:hover { color: var(--text); }
.st-tbtn.on[data-tact=hidden] { color: var(--muted); }
.st-tbtn.on[data-tact=mute] { background: var(--danger); border-color: var(--danger); color: #fff; }
.st-tbtn.on[data-tact=solo] { background: #f59e0b; border-color: #f59e0b; color: #111; }
.st-tbtn.on[data-tact=lock] { color: var(--accent-ink); border-color: var(--accent-ink); }
.st-tbtn[data-tact=delete]:hover { color: var(--danger); }
/* Couleur de piste : un liseré sur l'en-tête, ses blocs teintés */
.st-tlabel.tinted { box-shadow: inset 3px 0 var(--tc); }
.st-tracks .st-tlane.tinted .st-block { background: color-mix(in srgb, var(--tc) 45%, transparent); border-color: color-mix(in srgb, var(--tc) 70%, transparent); }
/* Piste repliée : le nom seul */
.st-tlabel.small .st-tbtns, .st-tlabel.small .st-meter, .st-tlabel.small .st-tname svg { display: none; }
.st-tlabel.small .st-tname { padding: 0 4px; }
.st-tlane.small .st-label, .st-tlane.small .st-dur, .st-tlane.small .st-thumb { display: none; }
.st-tlabel[draggable=true] { cursor: grab; }
.st-tlabel.drop-on { outline: 2px solid var(--accent); outline-offset: -2px; }
.st-tname-input { flex: 1; min-width: 0; padding: 2px 4px; border: 1px solid var(--accent); border-radius: 5px; background: var(--field); color: var(--text); font: inherit; font-weight: 600; }
.st-colors { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; min-height: 28px; }
.st-colors button, .ctx-colors i { width: 16px; height: 16px; padding: 0; border-radius: 50%; border: 1px solid var(--border-2); cursor: pointer; }
.st-colors button.on, .ctx-colors i.on { outline: 2px solid var(--text); outline-offset: 1px; }
.st-colors button[data-color=""], .ctx-colors i[data-color=""] { background: linear-gradient(135deg, transparent 45%, var(--danger) 45% 55%, transparent 55%) !important; }
.st-meter { position: absolute; left: 4px; right: 6px; bottom: 3px; height: 3px; border-radius: 2px; background: var(--field); overflow: hidden; }
.st-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #22c55e, #84cc16 70%, #eab308 90%); transition: width 0.06s linear; }
.st-meter i.hot { background: var(--danger); }
.st-addtracks { display: flex; gap: 4px; height: 34px; align-items: center; padding: 0 6px !important; }
.st-lane-end { height: 34px; border-bottom: 0; }
.st-tlane.locked { background: repeating-linear-gradient(135deg, transparent 0 8px, rgba(127, 127, 127, 0.07) 8px 16px); }
.st-tlane.hidden-track .st-block { opacity: 0.45; }
.st-tlane.audio { background: color-mix(in srgb, #f472b6 4%, transparent); }
#st-lanes > .st-lane.drop-target { background: color-mix(in srgb, var(--accent-ink) 14%, transparent); box-shadow: inset 0 0 0 2px var(--accent-ink); }
.st-tlane .st-layer { top: 4px; bottom: 4px; height: auto; }
.st-layer.full { background: linear-gradient(180deg, rgba(56, 189, 248, 0.5), rgba(14, 165, 233, 0.35)); }
.st-block.locked { cursor: not-allowed; }
.st-block.multi { outline-style: dashed; }
.st-badge { display: inline-flex; color: #fde68a; }
/* Sons : forme d'onde, courbe de volume, fondus enchaînés */
.st-mus { padding: 0 8px; align-items: flex-start; padding-top: 3px; }
.st-mus .st-label { position: relative; z-index: 1; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.st-wave { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(255, 255, 255, 0.35); pointer-events: none; }
.st-env { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; }
.st-env polyline { fill: none; stroke: #fde047; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.st-env-pt { position: absolute; width: 9px; height: 9px; margin: -4px 0 0 -4px; border-radius: 50%; background: #fde047; border: 1px solid rgba(0, 0, 0, 0.5); z-index: 3; cursor: grab; }
.st-xfade { position: absolute; top: 4px; bottom: 4px; pointer-events: none; z-index: 2; border-radius: 4px; background: linear-gradient(to top right, transparent 48%, rgba(255, 255, 255, 0.6) 49% 51%, transparent 52%), linear-gradient(to bottom right, transparent 48%, rgba(255, 255, 255, 0.6) 49% 51%, transparent 52%); }
/* Repères */
.st-mark { position: absolute; top: 0; height: 22px; display: inline-flex; align-items: center; gap: 2px; margin-left: -1px; padding: 0 3px; color: #f59e0b; cursor: pointer; z-index: 6; font-weight: 400; }
.st-mark::after { content: ""; position: absolute; left: 0; top: 22px; width: 1px; height: 2000px; background: rgba(245, 158, 11, 0.55); pointer-events: none; }
.st-mark svg { display: block; }
.st-mark em { font-style: normal; font-size: 10.5px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-mark.sel { color: var(--accent-ink); }
.st-box-title { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.st-box-title svg { display: block; color: var(--accent-ink); }
.st-trow { flex-wrap: wrap; gap: 8px 14px; }
.st-presets { display: flex; flex-wrap: wrap; gap: 4px; }
.st-presets .mini-btn { white-space: nowrap; }
#st-voice.recording { background: var(--danger); border-color: var(--danger); color: #fff; }
#st-voice .ico { display: inline-flex; }
#st-split-all svg, #st-marker svg { display: block; }
.st-ruler { position: relative; border-bottom: 1px solid var(--border); background: var(--panel-2); }
.st-ruler span { position: absolute; top: 0; height: 100%; padding: 3px 0 0 4px; border-left: 1px solid var(--border-2); font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.st-lane { position: relative; border-bottom: 1px solid var(--border); }
.st-layers { min-height: 30px; }
.st-block {
  position: absolute; top: 4px; bottom: 4px; border-radius: 6px; overflow: hidden; cursor: grab; user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.12); display: flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 11.5px;
  color: #eef2ff; white-space: nowrap; touch-action: none;
}
.st-block:active { cursor: grabbing; }
.st-block.sel { outline: 2px solid var(--accent-ink); outline-offset: -1px; }
.st-clip { background: linear-gradient(180deg, rgba(99, 102, 241, 0.55), rgba(79, 70, 229, 0.4)); }
.st-clip:has(.st-thumb) { padding-left: 0; }
.st-clip.image { background: linear-gradient(180deg, rgba(52, 211, 153, 0.45), rgba(16, 185, 129, 0.32)); }
.st-thumb { flex: none; width: 74px; height: 100%; background: #0b0d16 center / cover no-repeat; border-right: 1px solid rgba(255, 255, 255, 0.1); }
.st-label { overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; gap: 4px; }
.st-dur { margin-left: auto; color: rgba(238, 242, 255, 0.6); font-variant-numeric: tabular-nums; }
.st-trans { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0)); pointer-events: none; z-index: 1; }
.st-layer { top: auto; height: 22px; }
.st-layer.text { background: rgba(251, 191, 36, 0.4); }
.st-layer.image { background: rgba(52, 211, 153, 0.4); }
.st-layer.video { background: rgba(86, 156, 255, 0.45); }
.st-layer.blur { background: repeating-linear-gradient(45deg, rgba(139, 147, 163, 0.45) 0 6px, rgba(139, 147, 163, 0.28) 6px 12px); }
.st-mus { background: linear-gradient(180deg, rgba(244, 114, 182, 0.45), rgba(219, 39, 119, 0.3)); }
.st-h { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; z-index: 2; }
.st-h.l { left: 0; }
.st-h.r { right: 0; }
.st-block.sel .st-h { background: rgba(34, 211, 238, 0.45); }
.st-dragtip { position: fixed; z-index: 36; padding: 3px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--border-2); box-shadow: var(--shadow); font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none; white-space: nowrap; }
.st-block.linked { outline: 2px dashed var(--accent-ink); outline-offset: -2px; }
#st-preview-box:fullscreen { background: #000; display: flex; align-items: center; justify-content: center; }
.st-snap { position: absolute; top: 0; bottom: 0; width: 0; margin-left: -1px; border-left: 2px dashed var(--accent); pointer-events: none; z-index: 19; filter: drop-shadow(0 0 3px var(--accent)); }
.st-playhead { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; pointer-events: none; z-index: 20; box-shadow: 0 0 6px rgba(0, 0, 0, 0.6); }
.st-playhead::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top-color: #fff; }
.st-drop { position: absolute; top: 22px; bottom: 0; width: 3px; margin-left: -1px; background: var(--accent-ink); z-index: 19; pointer-events: none; }
.st-busy { position: absolute; inset: 0; z-index: 25; background: rgba(5, 6, 10, 0.72); display: grid; place-items: center; }
.st-busy-box { width: min(420px, calc(100vw - 32px)); background: var(--panel); border: 1px solid var(--border-2); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.st-busy-box p { margin: 0; }
.st-busy-box .btn { align-self: flex-end; }
.st-open-btn .ico { display: inline-flex; color: var(--accent-ink); }
#st-close .ico { display: inline-flex; }
#exp-studio { align-self: flex-start; }
#exp-studio .ico { display: inline-flex; }
body.st-open .toast { z-index: 45; }
/* Modèles, meilleurs moments, kit de marque, suivi */
.st-top-btn .ico { color: var(--accent-ink); }
.st-layer.progress { background: linear-gradient(90deg, rgba(255, 210, 63, 0.55), rgba(255, 210, 63, 0.2)); }
.mini-btn.hot { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent-ink) 45%, transparent); display: inline-flex; align-items: center; gap: 3px; }
.mini-btn.hot svg { display: block; }
.st-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.st-panel-head .icon-btn svg { display: block; }
.st-tpls { display: flex; flex-direction: column; gap: 8px; }
.st-tpl {
  display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; align-items: center; text-align: left; padding: 8px; border-radius: 10px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text); font: inherit;
}
.st-tpl:hover { border-color: var(--border-2); }
.st-tpl.active { border-color: var(--accent-ink); box-shadow: 0 0 0 1px var(--accent-ink) inset; }
.st-tpl-thumb { flex: none; border-radius: 5px; background: #000; box-shadow: 0 0 0 1px var(--border); }
.st-tpl > canvas { justify-self: center; }
.st-inspector .row-inline .btn { white-space: normal; text-align: left; line-height: 1.3; }
.st-tpl-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.st-tpl-text b { font-size: 13px; }
.st-tpl-text span { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.st-moments { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; counter-reset: moment; }
.st-moments li { padding: 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; counter-increment: moment; }
.st-moment-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.st-moment-top b::before { content: counter(moment) ". "; color: var(--accent-ink); }
.st-moment-top span { color: var(--muted); }
.st-moment-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.st-moment-tags span { font-size: 11px; padding: 2px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-ink); }
.st-moment-text { margin: 0; font-size: 12px; color: var(--muted); font-style: italic; }
.st-moments .btn { align-self: flex-start; }
.st-moments .btn svg, .st-follow svg, .st-inspector .row-inline .btn svg { display: inline-flex; }
.st-follow { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; background: var(--accent-soft); color: var(--accent-ink); }
.st-follow span { flex: 1; }
.st-brand-logo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-brand-logo img { max-width: 64px; max-height: 40px; border-radius: 4px; background: repeating-conic-gradient(#2a2f3c 0 25%, #1c2029 0 50%) 0 0 / 10px 10px; }
.st-brand-logo .btn svg { display: inline-flex; }
.st-brand-none { font-size: 12px; color: var(--faint); }
@media (max-width: 1180px) {
  .st-body { grid-template-columns: 200px minmax(0, 1fr) 260px; }
}
@media (max-width: 920px) {
  .st { overflow: auto; padding-bottom: 16px; }
  .st-top { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
  .st-top-mid { margin-left: 0; order: 3; width: 100%; }
  .st-title { display: none; }
  #st-export { margin-left: auto; }
  .st-body { display: flex; flex-direction: column; flex: none; }
  .st-stage { order: -1; }
  .st-preview { height: 46vh; flex: none; }
  .st-inspector { max-height: none; }
  .st-timeline { order: 0; }
  .st-hint { display: none; }
  .st-zoom { width: 120px; }
}
@media (max-width: 560px) {
  .st-open-btn, #flow-back { padding: 5px 7px; }
  .topbar { gap: 4px; }
  .topbar .topbar-end { gap: 2px; }
  .topbar .mode-switch button { padding: 4px 5px; }
  .st-open-label { display: none; }
  .st-top-label { display: none; }
  .st-top-btn { padding: 5px 8px; }
  .st-labels { width: 112px; }
  .st-labels > div { font-size: 10.5px; padding: 0 6px; }
  .st-tbtn { width: 17px; height: 17px; }
  .st-tbtn[data-tact=lock], .st-tname svg { display: none; }
}

/* --- Thème clair : retouches propres à certains composants ---------------------------- */

.theme-btn { flex: none; }
:root[data-theme="light"] .dropzone { background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.08), transparent 60%), var(--panel); }
:root[data-theme="light"] .seg-control button.active { box-shadow: 0 1px 3px rgba(30, 36, 70, 0.16); }
:root[data-theme="light"] .lib-dupbar { background: rgba(217, 119, 6, 0.08); border-color: rgba(217, 119, 6, 0.35); }
:root[data-theme="light"] .qc-chip { background: rgba(217, 119, 6, 0.1); border-color: rgba(217, 119, 6, 0.3); }
:root[data-theme="light"] .qc-chip.clipped { background: rgba(217, 45, 45, 0.08); border-color: rgba(217, 45, 45, 0.3); }
:root[data-theme="light"] .mini-btn:hover:not(:disabled) { background: rgba(6, 182, 212, 0.2); }
/* Studio vidéo : l'aperçu reste noir (c'est l'image de la vidéo), les blocs de la timeline passent en teintes claires */
:root[data-theme="light"] .st-block { color: var(--text); border-color: rgba(17, 20, 42, 0.1); }
:root[data-theme="light"] .st-dur { color: var(--muted); }
:root[data-theme="light"] .st-clip { background: linear-gradient(180deg, rgba(99, 102, 241, 0.3), rgba(79, 70, 229, 0.22)); }
:root[data-theme="light"] .st-clip.image { background: linear-gradient(180deg, rgba(52, 211, 153, 0.34), rgba(16, 185, 129, 0.24)); }
:root[data-theme="light"] .st-thumb { border-right-color: rgba(17, 20, 42, 0.1); }
:root[data-theme="light"] .st-trans { background: linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0)); }
:root[data-theme="light"] .st-layer.text { background: rgba(245, 158, 11, 0.32); }
:root[data-theme="light"] .st-layer.image { background: rgba(16, 185, 129, 0.3); }
:root[data-theme="light"] .st-layer.video { background: rgba(59, 130, 246, 0.3); }
:root[data-theme="light"] .st-layer.blur { background: repeating-linear-gradient(45deg, rgba(100, 110, 135, 0.3) 0 6px, rgba(100, 110, 135, 0.16) 6px 12px); }
:root[data-theme="light"] .st-layer.progress { background: linear-gradient(90deg, rgba(234, 179, 8, 0.5), rgba(234, 179, 8, 0.18)); }
:root[data-theme="light"] .st-wave { color: rgba(17, 20, 42, 0.28); }
:root[data-theme="light"] .st-mus .st-label { text-shadow: none; }
:root[data-theme="light"] .st-env polyline { stroke: #ca8a04; }
:root[data-theme="light"] .st-env-pt { background: #eab308; }
:root[data-theme="light"] .st-layer.full { background: linear-gradient(180deg, rgba(14, 165, 233, 0.32), rgba(2, 132, 199, 0.22)); }
:root[data-theme="light"] .st-badge { color: #b45309; }
:root[data-theme="light"] .st-xfade { background: linear-gradient(to top right, transparent 48%, rgba(17, 20, 42, 0.45) 49% 51%, transparent 52%), linear-gradient(to bottom right, transparent 48%, rgba(17, 20, 42, 0.45) 49% 51%, transparent 52%); }
:root[data-theme="light"] .st-mus { background: linear-gradient(180deg, rgba(236, 72, 153, 0.28), rgba(219, 39, 119, 0.18)); }
:root[data-theme="light"] .st-kind.music { color: #db2777; }
:root[data-theme="light"] .st-kind.image { color: #059669; }
:root[data-theme="light"] .st-playhead { background: var(--text); box-shadow: 0 0 4px rgba(255, 255, 255, 0.8); }
:root[data-theme="light"] .st-playhead::before { border-top-color: var(--text); }
:root[data-theme="light"] .st-busy { background: rgba(244, 246, 251, 0.78); }
:root[data-theme="light"] .st-brand-logo img { background: repeating-conic-gradient(#dfe3ee 0 25%, #f4f6fb 0 50%) 0 0 / 10px 10px; }
.st-relink-list { margin: 8px 0 14px; padding-left: 20px; max-height: 40vh; overflow: auto; font-size: 13px; }
label.icon-btn { cursor: pointer; }
.st-tx-tools { flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.st-tx { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.st-tx li { display: flex; align-items: flex-start; gap: 4px; border-radius: 6px; }
.st-tx li.now { background: color-mix(in srgb, var(--accent-ink) 12%, transparent); }
.st-tx-text { flex: 1; text-align: left; background: none; border: 0; padding: 5px 6px; color: var(--text); font: inherit; font-size: 13px; line-height: 1.4; cursor: pointer; border-radius: 6px; }
.st-tx-text:hover { background: var(--field); }
.st-tx-cut { flex: none; opacity: 0.55; }
.st-tx li:hover .st-tx-cut { opacity: 1; }
.st-key { position: absolute; bottom: 3px; width: 7px; height: 7px; margin-left: -3.5px; background: #fff; border: 1px solid rgba(0, 0, 0, 0.45); transform: rotate(45deg); pointer-events: none; }
.st-range { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--accent-ink) 13%, transparent); border-left: 2px solid var(--accent-ink); border-right: 2px solid var(--accent-ink); pointer-events: none; z-index: 18; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .chip input { position: absolute; opacity: 0; pointer-events: none; }
.chips .chip:has(input:checked) { color: var(--text); background: var(--accent-soft); border-color: var(--accent-line); }
.chips .chip span { color: inherit; }
.st-checks { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.st-checks li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.35); }
.st-checks li span { flex: 1; }
.st-check-ok { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.dialog-actions .spacer { flex: 1; }
