:root {
  --bg: #f6f5f2; --card: #fff; --ink: #1d1d1f; --muted: #6b6b70; --line: #e3e1dc;
  --accent: #e8590c; --accent-ink: #fff; --ok: #2b8a3e; --ok-bg: #ebfbee; --err: #c92a2a; --err-bg: #fff5f5; --warn-bg: #fff9db;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
a { color: var(--accent); }
h1 { font-size: 1.6rem; margin: .4em 0 .6em; }
h2 { font-size: 1.15rem; margin: 0 0 .6em; }
h3 { font-size: 1.05rem; margin: 0; }
code { background: #f1efea; padding: 0 4px; border-radius: 4px; font-size: .9em; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; text-decoration: none; color: var(--ink); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.narrow { max-width: 420px; margin: 40px auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; margin: 0; }
a.tile:hover { border-color: var(--accent); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .92rem; }
label.check { flex-direction: row; align-items: center; font-weight: 400; gap: 6px; }
input, textarea, select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; }
input[type=checkbox] { width: auto; }
input[type=file] { border-style: dashed; }
textarea.prompt { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; background: #fbfaf8; }
fieldset { border: 1px solid var(--line); border-radius: 8px; display: flex; gap: 16px; flex-wrap: wrap; }
button, .button { font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; display: inline-block; margin: 6px 6px 0 0; }
button:hover, .button:hover { border-color: var(--ink); }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.primary:hover { filter: brightness(1.05); border-color: var(--accent); }
.danger { background: var(--err); border-color: var(--err); color: #fff; }
.danger-text { color: var(--err); }
button.link { background: none; border: none; padding: 0; margin: 0; color: var(--accent); font-weight: 500; }
form.inline { display: inline; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 8px 0; }
.inline-form label { flex: 1 1 160px; }
.inline-form input[type=file] { flex: 1 1 200px; width: auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; font-weight: 400; }
.crumbs { font-size: .9rem; color: var(--muted); margin: 0; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; white-space: pre-line; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.error { background: var(--err-bg); color: var(--err); }
.badge { display: inline-block; font-size: .78rem; padding: 2px 8px; border-radius: 99px; background: #f1efea; color: var(--muted); width: fit-content; font-weight: 600; }
.s-image_ok, .s-images, .s-clips, .s-monte { background: #e7f5ff; color: #1864ab; }
.s-clip_ok, .s-publie { background: var(--ok-bg); color: var(--ok); }
.s-prompt_pret, .s-decoupe { background: var(--warn-bg); color: #8f6b00; }
.chip { display: inline-block; background: #f1efea; border-radius: 99px; padding: 2px 10px; margin: 0 4px 4px 0; font-size: .88rem; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; }
.steps li { padding: 6px 12px; border-radius: 99px; background: #ecebe7; font-size: .9rem; }
.steps li a { color: inherit; text-decoration: none; }
.steps li.done { background: var(--ok-bg); color: var(--ok); }
.steps li.done::before { content: "✓ "; }
.steps li.current { background: var(--accent); color: #fff; font-weight: 600; }
table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
details { margin: 10px 0; }
summary { cursor: pointer; font-weight: 600; }
details.warn { background: var(--warn-bg); padding: 8px 12px; border-radius: 8px; }
.scene-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.dialogue { margin: 2px 0; }
.assets { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.assets figure { margin: 0; width: 140px; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #f1efea; }
.assets figure.retenue { border-color: var(--ok); }
.assets img, .assets video { width: 100%; aspect-ratio: 9/16; object-fit: cover; display: block; background: #000; }
.assets figcaption { font-size: .8rem; padding: 4px 6px; display: flex; justify-content: space-between; gap: 4px; }
.thumb { width: 100%; height: 140px; object-fit: contain; background: #f1efea; border-radius: 8px; }
img.ref { max-width: 100%; max-height: 360px; border-radius: 8px; border: 1px solid var(--line); }
.palette span { display: inline-block; width: 16px; height: 16px; border-radius: 4px; vertical-align: middle; margin-right: 4px; border: 1px solid var(--line); }
.tile textarea { font-size: .88rem; }
@media (max-width: 600px) { main { padding: 10px; } h1 { font-size: 1.3rem; } }
