:root {
  --bg: #0e1416;
  --panel: #162024;
  --line: #24343a;
  --text: #e8f0f1;
  --muted: #8fa5aa;
  --accent: #358c93;
  --accent-2: #4fb3bb;
  --rec: #e5484d;
  --radius: 12px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif; }
h2 { margin: 0 0 4px; font-size: 22px; }
h3 { margin: 18px 0 8px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
code { background: #0b1012; padding: 1px 6px; border-radius: 5px; color: var(--accent-2); }
.muted { color: var(--muted); margin: 0; }
.hint { color: var(--muted); font-size: 13px; }
.center { text-align: center; }

button, .file-btn { background: var(--accent); color: white; border: 0; border-radius: 9px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; }
button:hover, .file-btn:hover { background: var(--accent-2); }
button:disabled { opacity: .45; cursor: default; }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
button.big { padding: 12px 20px; font-size: 16px; }
button.rec { background: var(--rec); }
button.rec.on { background: #fff; color: var(--rec); }
.file-btn input { display: none; }
input, select, textarea { width: 100%; background: #0b1012; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; }
input[type=range] { padding: 0; accent-color: var(--accent); }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
label { display: block; margin: 8px 0; font-size: 13px; color: var(--muted); }
label > input, label > select, label > textarea { margin-top: 4px; color: var(--text); }
label.check { display: flex; gap: 8px; align-items: center; color: var(--text); }
textarea { resize: vertical; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; padding: 12px 20px; background: rgba(14,20,22,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 12px; height: 12px; border-radius: 4px; background: var(--accent); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { background: transparent; color: var(--muted); padding: 8px 14px; }
.tabs button.on { background: var(--panel); color: var(--text); }
.badge:empty { display: none; }
.badge { background: var(--accent); color: white; border-radius: 99px; padding: 0 7px; font-size: 12px; margin-left: 4px; }

.tab { display: none; padding: 20px; max-width: 1400px; margin: 0 auto; }
.tab.on { display: block; }
/* onglet Scripts */
.scr-layout { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 18px; align-items: start; }
.scr-list { display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 220px); overflow: auto; padding-right: 4px; }
.scr-row { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); cursor: pointer; display: block; width: 100%; font: inherit; }
.scr-row:hover { border-color: var(--muted); }
.scr-row.on { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.scr-row b { display: block; font-weight: 600; font-size: 14px; line-height: 1.3; }
.scr-row small { color: var(--muted); font-size: 12px; }
.scr-tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: #1d2a2e; color: var(--muted); margin-right: 6px; }
.scr-tag.reel { background: #3a2417; color: #f3a774; }
.scr-tag.coaching { background: #17323a; color: #7fd0d8; }
.scr-edit { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.scr-edit h3 { margin: 0; font-size: 18px; line-height: 1.3; }
.scr-hooks { display: flex; flex-direction: column; gap: 6px; }
.scr-hook { text-align: left; background: transparent; border: 1px dashed var(--line); border-radius: 8px; padding: 7px 10px; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.scr-hook:hover { border-color: var(--accent); }
.scr-hook.on { border-style: solid; border-color: var(--accent); background: rgba(53,140,147,.15); }
.scr-edit textarea { width: 100%; min-height: 340px; font-size: 16px; line-height: 1.55; resize: vertical; }
.scr-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.scr-bar .grow { flex: 1; }
@media (max-width: 800px) { .scr-layout { grid-template-columns: 1fr; } .scr-list { max-height: 260px; } }
.row-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
form.inline { display: flex; gap: 8px; min-width: min(520px, 100%); }

/* Enregistrer */
.rec-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
@media (max-width: 900px) { .rec-layout { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px 16px; align-self: start; }
.stage { position: relative; background: black; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; }
.stage video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.guide { position: absolute; inset: 0; pointer-events: none; }
.guide.vertical::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: calc(100% * 9 / 16 * 9 / 16); transform: translateX(-50%); border-left: 2px dashed rgba(255,255,255,.45); border-right: 2px dashed rgba(255,255,255,.45); box-shadow: 0 0 0 9999px rgba(0,0,0,.35); }
/* colonne étroite juste sous la caméra : les yeux bougent peu de gauche à droite */
.prompter { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 34%; min-width: 220px; height: 55%; overflow: hidden; background: linear-gradient(rgba(0,0,0,.78), rgba(0,0,0,.55)); border-radius: 0 0 14px 14px; mask-image: linear-gradient(transparent, black 18%, black 75%, transparent); }
.prompter:empty, .prompter.off { display: none; }
.prompter { cursor: ns-resize; }
.prompter.hold::after { content: "⏸"; position: absolute; top: 8px; right: 10px; font-size: 18px; opacity: .8; }
.panel .num { display: inline-block; min-width: 2.2em; padding: 0 6px; margin-left: 4px; border-radius: 6px; background: var(--accent); color: white; text-align: center; font-variant-numeric: tabular-nums; }
.prompter-text { padding: 0 6% 200%; text-align: center; font-weight: 700; line-height: 1.35; white-space: pre-wrap; will-change: transform; }
.countdown { position: absolute; inset: 0; display: grid; place-items: center; font-size: 140px; font-weight: 900; color: white; text-shadow: 0 4px 30px rgba(0,0,0,.6); pointer-events: none; }
.countdown:empty { display: none; }
.rec-dot { position: absolute; top: 12px; right: 14px; display: none; align-items: center; gap: 8px; background: rgba(0,0,0,.55); padding: 4px 10px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.rec-dot.on { display: flex; }
.rec-dot span { width: 10px; height: 10px; border-radius: 99px; background: var(--rec); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.rec-bar { display: flex; gap: 12px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.upload { display: none; margin-top: 10px; align-items: center; gap: 10px; }
.upload.on { display: flex; }
.bar { flex: 1; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* Grilles */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card video, .card img.thumb { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; background: black; display: block; }
.card .body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .title { font-weight: 600; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { color: var(--muted); font-size: 12px; }
.card .actions { display: flex; gap: 6px; margin-top: auto; flex-wrap: wrap; }
.card .actions button, .card .actions a { flex: 1; padding: 7px 10px; font-size: 13px; text-align: center; }
.status { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--line); align-self: flex-start; }
.status.ready, .status.done { background: rgba(53,140,147,.25); color: var(--accent-2); }
.status.error { background: rgba(229,72,77,.2); color: #ff8a8d; }
.empty { color: var(--muted); padding: 30px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); grid-column: 1 / -1; }
a.btn { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 9px; text-decoration: none; }

/* Studio réaction */
.react-studio { position: fixed; inset: 0; z-index: 10; background: var(--bg); padding: 14px 20px; display: flex; flex-direction: column; gap: 10px; }
.react-studio[hidden] { display: none; }
.react-head { display: flex; gap: 14px; align-items: center; }
.react-head #react-title { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.react-stack { flex: 1; min-height: 0; margin: 0 auto; aspect-ratio: 9 / 16; display: grid; grid-template-rows: 1fr 1fr; border-radius: var(--radius); overflow: hidden; border: 2px solid var(--accent); }
.react-top, .react-bottom { position: relative; background: black; overflow: hidden; }
.react-top video { width: 100%; height: 100%; object-fit: contain; }
.react-bottom video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.react-bottom { border-top: 4px solid var(--accent); }
.react-controls { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.src-progress { width: 220px; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.src-progress i { display: block; height: 100%; width: 0; background: var(--accent); }

/* Montage */
.list { display: flex; flex-direction: column; gap: 12px; }
.take { display: grid; grid-template-columns: 140px 1fr 260px; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; align-items: center; }
@media (max-width: 800px) { .take { grid-template-columns: 1fr; } }
.take video { width: 100%; max-height: 220px; background: black; border-radius: 8px; }
.take .name { font-weight: 700; word-break: break-all; }
.take .side { display: flex; flex-direction: column; gap: 8px; }
.fmt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; background: #0b1012; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; margin-right: 6px; color: var(--accent-2); }
#jobs .job { background: #0b1012; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; }
#jobs .job.error { border-left-color: var(--rec); }
#jobs pre { max-height: 180px; overflow: auto; font-size: 11px; color: var(--muted); white-space: pre-wrap; margin: 8px 0 0; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 99px; animation: rot .8s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes rot { to { transform: rotate(360deg); } }

/* Publications */
.posts .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; font-size: 12px; }
.posts .stats div { background: #0b1012; border-radius: 6px; padding: 4px 6px; }
.posts .stats b { display: block; font-size: 14px; color: var(--text); }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); width: min(560px, 94vw); padding: 6px 20px 18px; }
dialog::backdrop { background: rgba(0,0,0,.6); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(120px); background: var(--panel); border: 1px solid var(--accent); padding: 10px 18px; border-radius: 10px; transition: transform .25s; z-index: 20; max-width: 90vw; }
.toast.on { transform: translateX(-50%); }

/* Bibliothèque */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chips button { background: var(--panel); border: 1px solid var(--line); color: var(--muted); padding: 6px 12px; font-weight: 500; font-size: 13px; }
.chips button.on { background: var(--accent); border-color: var(--accent); color: white; }
.chips button b { font-weight: 700; margin-left: 4px; opacity: .8; }
.lib-tools { display: flex; gap: 10px; align-items: center; margin: 12px 0; flex-wrap: wrap; }
.lib-tools #lib-search { flex: 1; min-width: 220px; }
.lib-list { display: flex; flex-direction: column; gap: 8px; }
.lib-item { display: grid; grid-template-columns: 92px 1fr 150px; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; align-items: start; }
@media (max-width: 760px) { .lib-item { grid-template-columns: 1fr; } }
.lib-item .when { font-size: 12px; color: var(--muted); }
.lib-item .text { font-weight: 600; }
.lib-item .why { color: var(--muted); font-size: 13px; margin-top: 2px; }
.lib-item .src { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.lib-item .src a { color: var(--accent-2); }
.lib-item .right { display: flex; flex-direction: column; gap: 6px; }
.lib-item .right button { padding: 6px 10px; font-size: 13px; }
.tag { font-size: 11px; border-radius: 6px; padding: 1px 6px; border: 1px solid var(--line); color: var(--muted); }
.tag.cat-vente { color: #f0b46b; border-color: #5a4630; }
.tag.cat-coaching { color: var(--accent-2); border-color: #23484c; }
.tag.cat-equipe { color: #b9a3f0; border-color: #3e3560; }
.tag.cat-marche { color: #ff8a8d; border-color: #5a2f31; }
.lib-item.ecarte { opacity: .5; }

/* Table de montage */
.editor { position: fixed; inset: 0; z-index: 12; background: var(--bg); display: grid; grid-template-rows: auto 1fr 64px; }
.editor[hidden] { display: none; }
.ed-head { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.ed-title { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-body { display: grid; grid-template-columns: minmax(260px, 38%) 1fr; gap: 16px; padding: 12px 16px; min-height: 0; }
.ed-left { display: flex; flex-direction: column; gap: 10px; min-height: 0; align-items: center; }
.ed-preview { position: relative; background: black; border-radius: 10px; overflow: hidden; height: 100%; max-height: calc(100vh - 330px); aspect-ratio: 9 / 16; container-type: size; }
.ed-preview.wide { aspect-ratio: 16 / 9; height: auto; width: 100%; }
.ed-preview video { width: 100%; height: 100%; object-fit: cover; }
.ed-cap { position: absolute; left: 8.3%; right: 8.3%; top: 62%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: center; font: 800 6cqh/1.2 Georgia, serif; color: white; text-shadow: 0 2px 8px rgba(0,0,0,.6); text-transform: lowercase; }
.ed-cap b { background: var(--cap-bg, var(--accent)); color: var(--cap-fg, white); border-radius: 4px; padding: 0 4px; font-weight: 800; }
.ed-hook { position: absolute; top: 12%; left: 8%; right: 8%; background: white; color: black; text-align: center; font: 900 2.8cqh/1.1 Montserrat, -apple-system, sans-serif; text-transform: uppercase; padding: .9cqh 2.8cqw; border-radius: 10px; left: 11%; right: 11%; }
.ed-hook:empty, .ed-callout:empty, .ed-cap:empty { display: none; }
.ed-callout { position: absolute; top: 26%; left: 0; right: 0; text-align: center; font: 900 11cqh/1 -apple-system, sans-serif; color: var(--accent-2); -webkit-text-stroke: 3px black; paint-order: stroke; }
.ed-card { position: absolute; top: 57.8%; left: 50%; transform: translateX(-50%); width: 55%; border: 3px solid white; border-radius: 8px; display: none; }
.ed-play { display: flex; gap: 10px; align-items: center; }
.ed-right { display: flex; flex-direction: column; min-height: 0; }
.ed-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.ed-tabs button { background: transparent; color: var(--muted); }
.ed-tabs button.on { background: var(--panel); color: var(--text); }
.ed-pane { flex: 1; min-height: 0; overflow: auto; }
.ed-toolbar { display: flex; gap: 6px; flex-wrap: wrap; position: sticky; top: 0; background: var(--bg); padding-bottom: 6px; z-index: 1; }
.ed-toolbar button, .ed-toolbar .file-btn { padding: 6px 10px; font-size: 13px; }
.file-btn.ghostish { background: transparent; border: 1px solid var(--line); color: var(--text); }
.ed-words { line-height: 2; font-size: 17px; padding: 6px 2px 40px; user-select: none; }
.ed-words span { padding: 2px 1px; border-radius: 4px; cursor: pointer; }
.ed-words span:hover { background: #22343a; }
.ed-words span.cut { text-decoration: line-through; text-decoration-color: #ff6b6b; text-decoration-thickness: 2px; color: #7d5a5c; background: rgba(255,80,80,.08); }
.ed-words span.sel { background: var(--accent); color: #fff; }
.ed-words span.sel.cut { color: #ffd6d6; }
.ed-words span.now { box-shadow: inset 0 -3px 0 var(--accent-2); }
.ed-words span.gap { font-size: 12px; color: var(--muted); background: #172226; margin: 0 2px; padding: 1px 5px; }
.ed-words span.gap.cut { color: #3f4c50; }
.ed-words span.has-callout { color: var(--accent-2); font-weight: 700; }
.ed-words span.has-card { border-bottom: 2px solid #6aa7ff; }
.ed-timeline { position: relative; margin: 0 16px 12px; background: #0b1012; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; overflow: hidden; }
.ed-timeline { height: 64px; background: repeating-linear-gradient(135deg, #1a0f11 0 6px, #241417 6px 12px) !important; }
.ed-timeline .seg { position: absolute; top: 8px; bottom: 16px; background: var(--accent); border-radius: 4px; box-shadow: 0 0 0 1px #0b1012; }
.ed-timeline .hd { position: absolute; top: 0; bottom: 0; width: 10px; cursor: ew-resize; background: rgba(255,255,255,.35); touch-action: none; }
.ed-timeline .hd:hover { background: #fff; }
.ed-timeline .hd.l { left: 0; border-radius: 4px 0 0 4px; }
.ed-timeline .hd.r { right: 0; border-radius: 0 4px 4px 0; }
.ed-timeline .mk { position: absolute; bottom: 4px; width: 3px; height: 10px; border-radius: 2px; }
.ed-timeline .mk.callout { background: #ffd400; }
.ed-timeline .mk.card { background: #6aa7ff; height: 6px; }
.ed-timeline .mk.play { background: #ff8a8d; height: 6px; }
.ed-playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: white; z-index: 2; pointer-events: none; }
.ed-item { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.ed-item h4 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ed-row { display: flex; gap: 8px; align-items: center; margin: 4px 0; }
.ed-row img { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; }
.ed-row .grow { flex: 1; }
.ed-row button { padding: 4px 10px; font-size: 12px; }
@media (max-width: 900px) {
  .editor { grid-template-rows: auto 1fr 54px; }
  .ed-body { grid-template-columns: 1fr; overflow: auto; }
  .ed-preview { height: 46vh; }
  .ed-head { flex-wrap: wrap; }
}
.ed-ask { background: var(--panel); border: 1px solid var(--accent); border-radius: 10px; padding: 8px; margin-bottom: 10px; }
.ed-ask textarea { border: 0; background: transparent; resize: none; padding: 4px; }
.ed-ask textarea:focus { outline: none; }
.ed-ask-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ed-ask-bar button { padding: 6px 12px; font-size: 13px; }
.ed-ask-bar .muted { font-size: 13px; flex: 1; }

/* Zone d'import (onglet Montage) */
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 16px 18px; margin: 0 0 18px; display: grid; gap: 10px; background: rgba(53,140,147,.05); }
.drop.over { border-color: var(--accent); background: rgba(53,140,147,.18); }
.drop-main { display: flex; flex-direction: column; gap: 4px; }
.drop .inline-btn { display: inline; padding: 0; background: none; border: 0; color: var(--accent-2); text-decoration: underline; cursor: pointer; }
.drop .inline-btn input { display: none; }
.drop form.inline { display: flex; gap: 8px; flex-wrap: wrap; }
.drop form.inline input:first-child { flex: 1; min-width: 220px; }
.drop .small { font-size: 12px; margin: 0; }

/* Sélection dans la timeline */
.ed-tsel-bar { display: flex; align-items: center; gap: 10px; margin: 0 16px 6px; min-height: 34px; font-size: 13px; }
.ed-tsel-bar button { padding: 6px 10px; font-size: 13px; }
.ed-tsel-bar kbd { font: inherit; font-size: 11px; opacity: .75; border: 1px solid rgba(255,255,255,.4); border-radius: 4px; padding: 0 4px; margin-left: 4px; }
.ed-timeline { cursor: crosshair; }
.ed-timeline .tsel { position: absolute; top: 0; bottom: 0; background: rgba(255,214,0,.28); border: 2px solid #ffd400; border-radius: 4px; z-index: 1; pointer-events: none; }
.logout { margin-left: auto; color: var(--muted, #8a9599); font-size: 13px; text-decoration: none; white-space: nowrap; }

/* Boutons rapides sous l'aperçu et textes libres sur la vidéo */
.ed-quick { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.ed-quick-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: center; }
.ed-quick-row .muted { font-size: 12px; min-width: 58px; text-align: right; }
.ed-quick .chip { background: var(--panel); border: 1px solid var(--line); color: var(--muted); padding: 4px 10px; font-weight: 500; font-size: 13px; }
.ed-quick .chip.on { background: var(--accent); border-color: var(--accent); color: white; }
.ed-quick .chip.add { color: var(--text); border-style: dashed; }
/* bulle Q&A (question d'abonné) : mêmes proportions que QACard du rendu (1080 px = 100cqw) */
.ed-qa { position: absolute; left: 50%; transform: translateX(-50%); width: 72.2cqw; display: flex; align-items: flex-start; gap: 2.8cqw; background: white; border-radius: 3.1cqw; padding: 3.7cqw 4.1cqw; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-family: Inter, -apple-system, sans-serif; cursor: ns-resize; touch-action: none; user-select: none; }
.ed-qa .av { width: 8.1cqw; height: 8.1cqw; border-radius: 50%; flex-shrink: 0; object-fit: cover; background: linear-gradient(135deg,#F58529,#DD2A7B,#8134AF); color: white; font: 700 3.7cqw/8.1cqw Inter, -apple-system, sans-serif; text-align: center; }
.ed-qa .q { color: #111; font-weight: 500; font-size: 4.26cqw; line-height: 1.22; }
.ed-qa .by { color: #737A86; font-weight: 500; font-size: 3.33cqw; margin-top: 2cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-qa.on { outline: 2px dashed var(--accent); outline-offset: 4px; }
.ed-texts { position: absolute; inset: 0; pointer-events: none; }
.ed-text { position: absolute; transform: translate(-50%, -50%); max-width: 92%; width: max-content; text-align: center; line-height: 1.12; white-space: pre-wrap; border-radius: 0.18em; paint-order: stroke; text-shadow: 0 0.04em 0.18em rgba(0,0,0,.75); cursor: move; pointer-events: auto; touch-action: none; user-select: none; }
.ed-text:hover, .ed-text.on { outline: 2px dashed rgba(255,255,255,.8); outline-offset: 4px; }
.ed-preview.snap-x::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px dashed #ffd400; pointer-events: none; }
.ed-text-row { border-top: 1px solid var(--line); padding: 8px 0 4px; }
.ed-text-row.on textarea { border-color: var(--accent); }
.ed-text-row textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.ed-text-row input[type=color] { width: 34px; height: 26px; padding: 0; border: 0; background: none; }
.ed-quick .chip.cap-preset { padding: 3px 8px; }
.ed-quick .chip.cap-preset b { padding: 0 4px; border-radius: 3px; font-weight: inherit; }
.ed-quick .chip.cap-preset.on { background: #1d2a2e; outline: 2px solid var(--accent); }
.ed-cap.in-pop { animation: cap-pop .14s ease-out; }
.ed-cap.in-fade { animation: cap-fade .18s ease-out; }
.ed-cap.in-slide { animation: cap-slide .24s ease-out; }
.ed-cap b.bounce { display: inline-block; animation: cap-bounce .22s cubic-bezier(.34,1.8,.64,1); }
@keyframes cap-pop { from { transform: scale(.85); } }
@keyframes cap-fade { from { opacity: 0; } }
@keyframes cap-slide { from { opacity: 0; transform: translateY(3cqh); } }
@keyframes cap-bounce { from { transform: scale(.3); } }

/* Écran partagé dans l'aperçu (version simplifiée du rendu) */
.ed-split { display: none; }
.ed-preview.split .ed-split { display: flex; position: absolute; left: 0; right: 0; top: 0; height: 50%; overflow: hidden; flex-direction: column; align-items: center; justify-content: center; text-align: center; border-bottom: 2px solid var(--accent); }
.ed-preview.split video { position: absolute; top: 50%; height: 50%; left: 0; }
.ed-split.keys { background: radial-gradient(circle at 50% 50%, rgba(53,140,147,.4), transparent 60%), #0d1315; }
.ed-split.keys .big { font: 900 14cqw/1 Montserrat, sans-serif; color: white; text-transform: uppercase; padding: 0 4%; }
.ed-split.keys .big.num { font-family: Anton, sans-serif; font-weight: 400; color: var(--accent); }
.ed-split.keys .sub { font: 600 4.2cqw Montserrat, sans-serif; color: rgba(255,255,255,.85); margin-top: 2cqw; }
.ed-split.article { background: #e6e8ea; justify-content: flex-start; }
.ed-split.article .card { background: white; color: #222; margin: 5.5cqw 4.6cqw 0; padding: 3cqw 4.4cqw; border-radius: 6px; text-align: left; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.ed-split.article .src { display: flex; align-items: center; gap: 1.2cqw; font: 800 3.1cqw 'Playfair Display', serif; color: #111; border-bottom: 2px solid #111; padding-bottom: 1.2cqw; }
.ed-split.article .src i { width: 1.5cqw; height: 1.5cqw; background: var(--accent); }
.ed-split.article .src span { margin-left: auto; font: 400 2.2cqw Georgia, serif; color: #777; }
.ed-split.article .hd { font: 800 5.3cqw/1.12 'Playfair Display', serif; color: #111; margin: 2.4cqw 0 2cqw; }
.ed-split.article .bd { font: 3.1cqw/1.5 Georgia, serif; }
.ed-split.article .bd .hl { background: linear-gradient(transparent 52%, #FFE14D 52%, #FFE14D 92%, transparent 92%); }
.ed-split.schema { background: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px) 0 0 / 3.3cqw 3.3cqw, #0c1b2a; color: white; }
.ed-split.schema .ttl { font: 900 5cqw Montserrat, sans-serif; text-transform: uppercase; margin-bottom: 2cqw; }
.ed-split.schema .steps { width: 70%; display: flex; flex-direction: column; align-items: stretch; }
.ed-split.schema .step { display: flex; align-items: center; gap: 2.5cqw; text-align: left; border: 2px dashed rgba(53,140,147,.35); border-radius: 8px; padding: 1.4cqw 2cqw; opacity: .3; }
.ed-split.schema .step.on { border: 2px solid var(--accent); background: rgba(53,140,147,.2); opacity: 1; }
.ed-split.schema .step em { font: normal 900 3.3cqw Montserrat, sans-serif; background: var(--accent); border-radius: 50%; width: 6cqw; height: 6cqw; display: flex; align-items: center; justify-content: center; flex: none; }
.ed-split.schema .step b { display: block; font: 900 4cqw Montserrat, sans-serif; }
.ed-split.schema .step small { display: block; font: 600 2.7cqw Montserrat, sans-serif; opacity: .7; }
.ed-split.schema .arrow { font-size: 3.5cqw; line-height: 1.2; }
.ed-split.motion { background: repeating-linear-gradient(-45deg, transparent 0 4cqw, rgba(255,255,255,.06) 4cqw 6cqw), var(--accent); }
.ed-split.motion.dark { background: repeating-linear-gradient(-45deg, transparent 0 4cqw, rgba(255,255,255,.06) 4cqw 6cqw), #101010; }
.ed-split.motion .big { font: 400 14cqw/1.02 Anton, sans-serif; color: white; text-transform: uppercase; padding: 0 5%; }
.ed-split.motion.dark .big { color: var(--accent); }

/* Écran partagé dans l'aperçu (version simplifiée du rendu) */
.ed-split { display: none; }
.ed-preview.split .ed-split { display: flex; position: absolute; left: 0; right: 0; top: 0; height: 50%; overflow: hidden; flex-direction: column; align-items: center; justify-content: center; text-align: center; border-bottom: 2px solid var(--accent); }
.ed-preview.split video { position: absolute; top: 50%; height: 50%; left: 0; }
.ed-split.keys { background: radial-gradient(circle at 50% 50%, rgba(53,140,147,.4), transparent 60%), #0d1315; }
.ed-split.keys .big { font: 900 14cqw/1 Montserrat, sans-serif; color: white; text-transform: uppercase; padding: 0 4%; }
.ed-split.keys .big.num { font-family: Anton, sans-serif; font-weight: 400; color: var(--accent); }
.ed-split.keys .sub { font: 600 4.2cqw Montserrat, sans-serif; color: rgba(255,255,255,.85); margin-top: 2cqw; }
.ed-split.article { background: #e6e8ea; justify-content: flex-start; }
.ed-split.article .card { background: white; color: #222; margin: 5.5cqw 4.6cqw 0; padding: 3cqw 4.4cqw; border-radius: 6px; text-align: left; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.ed-split.article .src { display: flex; align-items: center; gap: 1.2cqw; font: 800 3.1cqw 'Playfair Display', serif; color: #111; border-bottom: 2px solid #111; padding-bottom: 1.2cqw; }
.ed-split.article .src i { width: 1.5cqw; height: 1.5cqw; background: var(--accent); }
.ed-split.article .src span { margin-left: auto; font: 400 2.2cqw Georgia, serif; color: #777; }
.ed-split.article .hd { font: 800 5.3cqw/1.12 'Playfair Display', serif; color: #111; margin: 2.4cqw 0 2cqw; }
.ed-split.article .bd { font: 3.1cqw/1.5 Georgia, serif; }
.ed-split.article .bd .hl { background: linear-gradient(transparent 52%, #FFE14D 52%, #FFE14D 92%, transparent 92%); }
.ed-split.schema { background: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px) 0 0 / 3.3cqw 3.3cqw, #0c1b2a; color: white; }
.ed-split.schema .ttl { font: 900 5cqw Montserrat, sans-serif; text-transform: uppercase; margin-bottom: 2cqw; }
.ed-split.schema .steps { width: 70%; display: flex; flex-direction: column; align-items: stretch; }
.ed-split.schema .step { display: flex; align-items: center; gap: 2.5cqw; text-align: left; border: 2px dashed rgba(53,140,147,.35); border-radius: 8px; padding: 1.4cqw 2cqw; opacity: .3; }
.ed-split.schema .step.on { border: 2px solid var(--accent); background: rgba(53,140,147,.2); opacity: 1; }
.ed-split.schema .step em { font: normal 900 3.3cqw Montserrat, sans-serif; background: var(--accent); border-radius: 50%; width: 6cqw; height: 6cqw; display: flex; align-items: center; justify-content: center; flex: none; }
.ed-split.schema .step b { display: block; font: 900 4cqw Montserrat, sans-serif; }
.ed-split.schema .step small { display: block; font: 600 2.7cqw Montserrat, sans-serif; opacity: .7; }
.ed-split.schema .arrow { font-size: 3.5cqw; line-height: 1.2; }
.ed-split.motion { background: repeating-linear-gradient(-45deg, transparent 0 4cqw, rgba(255,255,255,.06) 4cqw 6cqw), var(--accent); }
.ed-split.motion.dark { background: repeating-linear-gradient(-45deg, transparent 0 4cqw, rgba(255,255,255,.06) 4cqw 6cqw), #101010; }
.ed-split.motion .big { font: 400 14cqw/1.02 Anton, sans-serif; color: white; text-transform: uppercase; padding: 0 5%; }
.ed-split.motion.dark .big { color: var(--accent); }
.ed-split.keys .big.in0 { animation: key-zoom .3s cubic-bezier(.3,1.4,.6,1); }
.ed-split.keys .big.in1 { animation: key-left .3s cubic-bezier(.3,1.3,.6,1); }
.ed-split.keys .big.in2 { animation: key-up .3s cubic-bezier(.3,1.3,.6,1); }
.ed-split.keys .big.in3 { animation: key-drop .35s cubic-bezier(.3,1.6,.6,1); }
.ed-split.keys .sub { animation: key-up .3s .12s both; background: var(--accent); color: white; border-radius: 6px; padding: .3cqw 2cqw; }
@keyframes key-zoom { from { transform: scale(2.2); opacity: 0; } }
@keyframes key-left { from { transform: translateX(-90cqw) skewX(12deg); } }
@keyframes key-up { from { transform: translateY(20cqw) rotate(-8deg); opacity: 0; } }
@keyframes key-drop { from { transform: translateY(-40cqw); } }
/* Motion « scènes » dans l'aperçu */
.ed-split.scenes { background: linear-gradient(rgba(0,0,0,.045) 1px, transparent 1px) 0 0 / 4cqw 4cqw, linear-gradient(90deg, rgba(0,0,0,.045) 1px, transparent 1px) 0 0 / 4cqw 4cqw, #F2EEE6; color: #151515; justify-content: flex-start; padding-top: 6cqw; gap: 2.4cqw; font-family: Montserrat, sans-serif; }
.ed-split.scenes .ttl { font: 900 5.4cqw/1.05 Montserrat, sans-serif; text-transform: uppercase; animation: key-up .3s; }
.ed-split.scenes span { color: #E8562A; }
.ed-split.scenes .n { display: inline-flex; width: 6cqw; height: 6cqw; border-radius: 50%; background: #E8562A; color: white; font-style: normal; align-items: center; justify-content: center; margin-right: 1.5cqw; }
.ed-split.scenes .el { animation: key-zoom .25s; font-size: 3cqw; }
.ed-split.scenes .el.card, .ed-split.scenes .el.toggle { background: white; border-radius: 2cqw; padding: 1.6cqw 2.4cqw; box-shadow: 0 4px 12px rgba(0,0,0,.1); max-width: 78%; }
.ed-split.scenes .el i { display: inline-block; font: normal 900 4.2cqw Montserrat, sans-serif; border: 3px solid; border-radius: 1cqw; padding: 0 1.8cqw; transform: rotate(-6deg); text-transform: uppercase; }
.ed-split.scenes .el i.red { color: #E03A3A; } .ed-split.scenes .el i.green { color: #1E9E5A; } .ed-split.scenes .el i.orange { color: #E8562A; }
.ed-split.scenes .el u { text-decoration: none; background: #151515; color: white; border-radius: 4cqw; padding: .6cqw 3cqw; font-weight: 900; text-transform: uppercase; }
.ed-split.scenes .el em { font-style: normal; font-size: 7cqw; margin: 0 1cqw; display: inline-block; }
.ed-split.scenes .el em.x { opacity: .5; text-decoration: line-through red; }
.ed-split.scenes .el ol, .ed-split.scenes .el pre { background: #1b1b1b; color: white; border-radius: 2cqw; padding: 1.6cqw 2.4cqw 1.6cqw 6cqw; margin: 0; text-align: left; font-weight: 900; text-transform: uppercase; }
.ed-split.scenes .el pre { padding-left: 2.4cqw; color: #5BD38A; font: 2.6cqw Menlo, monospace; text-transform: none; }
.ed-split.scenes .el strong { display: block; font: 400 16cqw/1 Anton, sans-serif; color: #E8562A; }
.ed-split.scenes.phrase { background: #F2A68C; justify-content: center; }
.ed-split.scenes .ph { font: 900 7cqw/1.1 Montserrat, sans-serif; text-transform: uppercase; animation: key-left .3s; }
.ed-row .kind { font-size: 11px; min-width: 64px; }

/* Content Box */
.car-thumb { position: relative; display: block; aspect-ratio: 4/5; overflow: hidden; background: #000; }
.car-thumb img { width: 100%; height: 100%; object-fit: cover; }
.car-thumb span { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.7); color: white; font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.box-fr { margin-top: 8px; display: grid; gap: 4px; }
.box-fr summary { cursor: pointer; font-size: 13px; color: var(--accent-2); }
.box-fr ol { margin: 6px 0 4px 18px; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.box-fr pre { white-space: pre-wrap; font: 13px/1.5 inherit; font-family: inherit; background: #0f1719; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 6px 0; max-height: 320px; overflow: auto; }
.box-fr .mini { padding: 1px 8px; font-size: 11px; }

/* Supprimer une prise, fenêtre Publier */
.dialog-actions .grow { flex: 1; }
.ghost.danger { color: #e5484d; border-color: color-mix(in srgb, #e5484d 40%, transparent); }
.ghost.danger:hover { background: color-mix(in srgb, #e5484d 12%, transparent); }
#edit-preview { width: 100%; max-height: 300px; background: #000; border-radius: 10px; margin: 4px 0 10px; }
#post-dialog textarea { font: inherit; }
.post-meta { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 10px; }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.take .planned { color: var(--accent); }
