/* Studio ShortCut — thème sombre d'éditeur vidéo, accent vert Flowera. */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(/fonts/inter/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(/fonts/inter/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(/fonts/inter/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(/fonts/inter/inter-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(/fonts/jetbrains-mono/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #0d0e10;
  --panel: #141518;
  --panel-2: #1a1c20;
  --raised: #222429;
  --hover: #2a2d33;
  --line: #26292e;
  --line-2: #34373e;
  --text: #ecedef;
  --muted: #a2a5ac;
  --faint: #70737b;
  --accent: #5fd38d;
  --accent-hover: #78dea0;
  --accent-ink: #06140c;
  --accent-soft: rgba(95, 211, 141, 0.12);
  --accent-line: rgba(95, 211, 141, 0.34);
  --danger: #f2826b;
  --warn: #f2c14e;
  --t-clip: #5a93ff;
  --t-image: #e584c3;
  --t-text: #c58cff;
  --t-motion: #a48bff;
  --t-code: #8f7dff;
  --t-caption: #f0b443;
  --t-music: #46c582;
  --t-sfx: #39b9cb;
  --t-filter: #8d93a0;
  --t-transition: #8d93a0;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
button, select, textarea, input { font: inherit; color: inherit; }
code { font: 12.5px "JetBrains Mono", ui-monospace, monospace; background: var(--raised); padding: 1px 5px; border-radius: 5px; }
a { color: inherit; }
.icon { flex: none; display: block; }
.spacer { flex: 1; }
.muted { color: var(--muted); font-weight: 400; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.t-clip { --c: var(--t-clip); }
.t-image { --c: var(--t-image); }
.t-text { --c: var(--t-text); }
.t-motion { --c: var(--t-motion); }
.t-code { --c: var(--t-code); }
.t-caption { --c: var(--t-caption); }
.t-music { --c: var(--t-music); }
.t-sfx { --c: var(--t-sfx); }
.t-filter { --c: var(--t-filter); }
.t-transition { --c: var(--t-transition); }

/* ——— Boutons ——— */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: 8px; border: 1px solid var(--line-2); background: var(--raised); color: var(--text);
  cursor: pointer; font-weight: 500; font-size: 13px; white-space: nowrap; text-decoration: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn:hover:not(:disabled) { background: var(--hover); }
.btn:disabled { opacity: 0.42; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.accent { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.btn.accent:hover:not(:disabled) { background: rgba(95, 211, 141, 0.2); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { color: var(--text); background: var(--raised); }
.btn.small { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
.btn.icon-only { width: 32px; padding: 0; justify-content: center; }
.btn.wide { width: 100%; justify-content: center; }
.btn.round { width: 40px; height: 40px; border-radius: 50%; padding: 0; justify-content: center; background: var(--text); color: var(--bg); border: 0; }
.btn.round:hover:not(:disabled) { background: #fff; }

.pill {
  padding: 3px 10px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line);
  color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap;
}

/* ——— Logo ——— */
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; letter-spacing: -0.015em; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.logo-word b { color: var(--accent); font-weight: 700; }

/* ——— Accueil ——— */
.home { min-height: 100vh; }
.home-top { display: flex; align-items: center; gap: 12px; padding: 16px 28px; border-bottom: 1px solid var(--line); background: var(--panel); }
.claude-state { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.claude-state.on { color: var(--accent); }
.home-main { max-width: 1180px; margin: 0 auto; padding: 40px 28px 64px; }
.home-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.home-head h1 { font-size: 30px; letter-spacing: -0.025em; margin: 0 0 6px; font-weight: 700; }
.home-head p { color: var(--muted); margin: 0; max-width: 620px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.poster { position: relative; aspect-ratio: 4 / 5; background: #000; display: flex; align-items: center; justify-content: center; }
.poster video { width: 100%; height: 100%; object-fit: contain; display: block; }
.poster-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--faint); font-size: 13px; }
.badge {
  position: absolute; top: 10px; left: 10px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.62);
  font-size: 11.5px; font-weight: 600; color: #fff; backdrop-filter: blur(4px); font-variant-numeric: tabular-nums;
}
.badge.right { left: auto; right: 10px; }
.card-body { padding: 12px 14px 14px; }
.card-title { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.card-meta { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.card-style { display: inline-block; margin-top: 8px; font-size: 11.5px; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 6px; }

.page-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 24px 0; }
.page-loading.full { height: 100vh; justify-content: center; }
.page-error { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--muted); }

.notice {
  display: flex; gap: 12px; padding: 14px; border-radius: 12px; background: var(--accent-soft);
  border: 1px solid var(--accent-line); color: var(--text); font-size: 13px;
}
.notice > .icon { color: var(--accent); margin-top: 1px; }
.notice b { display: block; margin-bottom: 4px; }
.notice p { margin: 0; color: var(--muted); line-height: 1.5; }
.notice.bad { background: rgba(242, 130, 107, 0.1); border-color: rgba(242, 130, 107, 0.35); }
.notice.bad > .icon { color: var(--danger); }

.empty-panel { margin: auto; padding: 32px 24px; text-align: center; color: var(--muted); max-width: 320px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-panel p { margin: 0; }

/* ——— Éditeur ——— */
/* En haut : le panneau (Claude, élément, versions), l'aperçu, les médias. En bas : la timeline, sur toute la largeur.
   Les colonnes et les zones sont posées par l'éditeur selon les panneaux ouverts ; les tailles se règlent à la souris. */
.editor {
  height: 100vh;
  display: grid;
  grid-template-rows: 52px minmax(180px, 1fr) min(var(--tl-h, 36vh), calc(100vh - 52px - 180px));
}

/* Poignées de redimensionnement : invisibles au repos, un filet vert au survol et pendant le geste. */
.split { z-index: 6; touch-action: none; }
.split::after { content: ""; position: absolute; background: var(--accent); opacity: 0; transition: opacity 0.12s; }
.split-x { position: absolute; top: 0; bottom: 0; width: 8px; cursor: col-resize; }
.split-x.at-right { right: -4px; }
.split-x.at-left { left: -4px; }
.split-x::after { top: 0; bottom: 0; left: 3px; width: 2px; }
.split-y { grid-area: tl; align-self: start; position: relative; height: 8px; margin-top: -4px; cursor: row-resize; }
.btn.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.btn.toggle.on { color: var(--accent); }
.split-y::after { left: 0; right: 0; top: 3px; height: 2px; }
.split:hover::after, body.resizing-x .split-x::after, body.resizing-y .split-y::after { opacity: 1; }
body.resizing-x, body.resizing-x * { cursor: col-resize !important; user-select: none; }
body.resizing-y, body.resizing-y * { cursor: row-resize !important; user-select: none; }

.top { grid-area: top; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 8px; border-bottom: 1px solid var(--line); background: var(--panel); min-width: 0; }
.back { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-weight: 500; padding: 6px 10px 6px 4px; border-radius: 8px; }
.back:hover { color: var(--text); background: var(--raised); }
.top-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; margin-left: 6px; }
.top-title .name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.ver { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; padding: 0 8px; }

.preview { grid-area: preview; display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 16px 20px 12px; gap: 12px; }
.stage-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.stage { position: relative; background: #000; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 24px 60px rgba(0, 0, 0, 0.5); }
.stage video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; cursor: pointer; }
/* L'image exacte du projet, posée sur la vidéo quand celle-ci est en retard sur les retouches (à l'arrêt). */
.stage .exact { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; pointer-events: none; }
/* L'aperçu en direct : le cadre isolé où le moteur dessine, mis à l'échelle de la zone ; les clics vont à la page. */
.stage iframe.live { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; pointer-events: none; background: #000; color-scheme: normal; }
.stage .live-hit { position: absolute; inset: 0; cursor: default; touch-action: none; user-select: none; }
.stage .live-hit.playing { cursor: pointer; }
/* Le cadre de l'élément sélectionné, ses poignées aux coins, et les repères quand il est centré. */
.sel-box { position: absolute; box-sizing: border-box; border: 1.5px solid var(--accent); border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45); pointer-events: none; }
.sel-box.movable { pointer-events: auto; cursor: move; }
.sel-handle { position: absolute; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 1.5px solid var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.sel-handle.nw { left: -6px; top: -6px; cursor: nwse-resize; }
.sel-handle.se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.sel-handle.ne { right: -6px; top: -6px; cursor: nesw-resize; }
.sel-handle.sw { left: -6px; bottom: -6px; cursor: nesw-resize; }
.sel-box.at-l .sel-handle.nw, .sel-box.at-l .sel-handle.sw { left: 1px; }
.sel-box.at-r .sel-handle.ne, .sel-box.at-r .sel-handle.se { right: 1px; }
.sel-box.at-t .sel-handle.nw, .sel-box.at-t .sel-handle.ne { top: 1px; }
.sel-box.at-b .sel-handle.sw, .sel-box.at-b .sel-handle.se { bottom: 1px; }
.sel-guide { position: absolute; background: var(--accent); opacity: 0.9; pointer-events: none; }
.sel-guide.x { left: 50%; top: 0; bottom: 0; width: 1px; }
.sel-guide.y { top: 50%; left: 0; right: 0; height: 1px; }
.stage-empty.over { background: rgba(0, 0, 0, 0.55); pointer-events: none; }
.preview:fullscreen { background: #000; padding: 14px 20px 12px; }
.preview:fullscreen .stage { border-radius: 0; box-shadow: none; }
.stage-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); text-align: center; padding: 20px; }
.stage-empty p { margin: 0 0 6px; }
.stage-job {
  position: absolute; left: 14px; right: 14px; bottom: 14px; background: rgba(13, 14, 16, 0.9);
  border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; backdrop-filter: blur(8px);
}
.job-title { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; }
.bar { height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; margin: 9px 0 6px; }
.bar > div { width: 100%; height: 100%; background: var(--accent); transform-origin: left center; transition: transform 0.3s; }
.bar.big { height: 8px; border-radius: 4px; margin: 12px 0 8px; }
.job-pct { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.transport { display: flex; align-items: center; gap: 10px; min-width: 0; }
.transport-keys { display: flex; align-items: center; gap: 2px; }
.transport .btn.round { margin: 0 4px; }
.frame-no { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tc { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; white-space: nowrap; }
.render-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--accent); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.render-state.stale { color: var(--warn); }
.render-state.working { color: var(--muted); }

/* ——— Panneau de droite ——— */
.side { grid-area: side; position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--line); background: var(--panel); }
.tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--line); }
.tabs button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border: 0; background: transparent;
  border-radius: 8px; color: var(--muted); cursor: pointer; font-weight: 500; font-size: 13px; position: relative;
}
.tabs button:hover { color: var(--text); }
.tabs button.on { background: var(--raised); color: var(--text); }
.tabs .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.tab-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ——— Médias (à droite) ——— */
.media-wrap { grid-area: media; position: relative; min-height: 0; min-width: 0; border-left: 1px solid var(--line); background: var(--panel); display: flex; }
.media { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.media-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--line); min-height: 51px; }
.media-title { font-weight: 600; font-size: 13.5px; }
.media-head .muted { font-size: 12.5px; }
.media-list { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.media-item { display: flex; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.media-thumb { position: relative; flex: none; width: 64px; height: 84px; border-radius: 7px; overflow: hidden; background: #000; display: grid; place-items: center; color: var(--t-music); }
.media-thumb.k-audio { background: color-mix(in srgb, var(--t-music) 16%, var(--panel)); }
.media-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.media-thumb.k-image img { object-fit: contain; background: var(--raised); }
.media-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.media-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-meta { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.media-actions { display: flex; align-items: center; gap: 6px; margin-top: auto; flex-wrap: wrap; }
.media-used { font-size: 11.5px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.media-actions .btn.icon-only { width: 26px; margin-left: auto; }
.media-up { display: flex; gap: 10px; padding: 10px; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--muted); }
.media-up-text { flex: 1; min-width: 0; }
.media-up .bar { margin: 6px 0 0; }
.media-drop {
  position: absolute; inset: 6px; border: 2px dashed var(--accent); border-radius: 12px; background: rgba(13, 14, 16, 0.86);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--accent); font-weight: 600; pointer-events: none;
}

/* Chat */
.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-list { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.chat-empty { margin: auto 0; text-align: center; color: var(--muted); padding: 8px 4px; display: flex; flex-direction: column; align-items: center; }
.chat-empty > .icon { color: var(--accent); }
.chat-empty p { margin: 10px 0 0; max-width: 290px; }
.ideas { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; align-self: stretch; }
.idea { text-align: left; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; font-size: 13px; }
.idea:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.msg { font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; max-width: 88%; background: var(--raised); padding: 9px 12px; border-radius: 12px 12px 4px 12px; white-space: pre-wrap; }
.msg.user .about { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.msg.claude { padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.msg.claude p { margin: 4px 0; white-space: pre-wrap; }
.who { display: flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 12.5px; margin-bottom: 4px; }
.step { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; padding: 2px 0; }
.step > .icon { color: var(--accent); }
.step.bad, .step.bad > .icon { color: var(--danger); }
.step.live > .icon { color: var(--muted); }
.cost { margin-top: 6px; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.composer { border-top: 1px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.composer.off { opacity: 0.55; }
.composer textarea {
  width: 100%; resize: none; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 10px 12px; outline: none; line-height: 1.45;
}
.composer textarea:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.composer-bar { display: flex; align-items: center; gap: 8px; }
.composer select { height: 32px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 0 8px; font-size: 12.5px; color: var(--muted); max-width: 220px; min-width: 0; }
.chip-sel {
  display: flex; align-items: center; gap: 6px; align-self: flex-start; max-width: 100%; padding: 4px 4px 4px 10px;
  border-radius: 8px; background: var(--raised); border: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted);
}
.chip-sel span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-sel .x { border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 3px; border-radius: 5px; }
.chip-sel .x:hover { background: var(--hover); color: var(--text); }

/* Élément sélectionné */
.insp { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.insp-head { display: flex; gap: 12px; align-items: center; }
.swatch { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); flex: none; }
.insp-titles { min-width: 0; }
.insp-title { font-weight: 600; font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.insp-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.fields { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 7px 12px; margin: 0; font-size: 13px; }
.fields dt { color: var(--faint); }
.fields dd { margin: 0; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: 11.5px; padding: 1px 7px; border-radius: 6px; background: var(--raised); border: 1px solid var(--line-2); }
.insp-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.insp-params { display: flex; flex-direction: column; gap: 10px; }
.hint { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.5; }
.quote { margin: 0; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; white-space: pre-wrap; font-size: 13.5px; line-height: 1.5; }
.code-head { font-size: 12px; color: var(--faint); }
.code {
  background: #0a0b0d; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 0;
  font: 11.5px/1.6 "JetBrains Mono", ui-monospace, monospace; color: #c9d1d9; overflow: auto; max-height: 440px; white-space: pre;
}
.code.small { max-height: 200px; }

/* Versions */
.versions { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.vers-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.vers-bar .muted { font-size: 12.5px; }
.vers { list-style: none; margin: 0; padding: 6px 0; overflow-y: auto; flex: 1; min-height: 0; }
.vers li { display: flex; gap: 10px; padding: 9px 12px 9px 14px; align-items: flex-start; }
.vers li:hover { background: var(--panel-2); }
.vers li.cur { background: var(--accent-soft); }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.a-claude { background: rgba(95, 211, 141, 0.16); color: var(--accent); }
.a-user { background: rgba(90, 147, 255, 0.16); color: var(--t-clip); }
.a-system { background: var(--raised); color: var(--muted); }
.v-body { flex: 1; min-width: 0; }
.v-sum { font-size: 13px; line-height: 1.38; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.v-meta { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.v-go { opacity: 0; flex: none; }
.vers li:hover .v-go, .v-go:focus-visible { opacity: 1; }

/* ——— Timeline ——— */
.tl { grid-area: tl; display: flex; flex-direction: column; min-height: 0; min-width: 0; border-top: 1px solid var(--line); background: var(--panel); user-select: none; }
.tl-bar { display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 10px; border-bottom: 1px solid var(--line); }
.tools { display: flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); }
.tools button { width: 30px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.tools button:hover { color: var(--text); }
.tools button.on { background: var(--accent); color: var(--accent-ink); }
.tl-live { font-size: 12px; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-title { font-weight: 600; font-size: 13px; }
.tl-meta { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tl-bar .btn.icon-only { width: 28px; height: 28px; }
.tl-body { flex: 1; min-height: 0; display: flex; overflow-y: auto; overflow-x: hidden; }
.tl-names { flex: 0 0 204px; border-right: 1px solid var(--line); background: var(--panel); height: max-content; min-height: 100%; }
.tl-corner { border-bottom: 1px solid var(--line); background: var(--panel-2); }
.tl-name { display: flex; align-items: center; gap: 7px; padding: 0 6px 0 12px; color: var(--muted); font-size: 12.5px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.tl-track { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tl-name.off .tl-track, .tl-name.off > .icon:first-child { opacity: 0.45; }
.tl-toggle { flex: none; width: 26px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.tl-toggle:hover { background: var(--raised); color: var(--text); }
.tl-toggle[aria-pressed="true"] { color: var(--warn); }
.tl-volume { flex: none; width: 58px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.tl-volume:disabled { opacity: 0.35; cursor: default; }
.tl-scroll { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; height: max-content; min-height: 100%; }
.tl-content { position: relative; min-height: 100%; }
.tl-ruler { position: relative; border-bottom: 1px solid var(--line); cursor: ew-resize; background: var(--panel-2); }
.tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line-2); }
.tick span { position: absolute; left: 5px; top: 5px; font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tick.minor { top: 65%; border-color: var(--line-2); }
.tl-row { position: relative; border-bottom: 1px solid var(--line); }
.tl-row.off .tl-obj { opacity: 0.38; }
.tl-row.target { background: var(--accent-soft); }
.tl.tool-pointer .tl-obj { cursor: grab; }
.tl.tool-cut .tl-obj, .tl.tool-cut .tl-row { cursor: col-resize; }
.tl.locked .tl-obj { cursor: default; }
.tl-obj.moving { z-index: 4; opacity: 0.92; box-shadow: inset 0 0 0 1px var(--c), 0 0 0 2px var(--accent), 0 8px 18px rgba(0, 0, 0, 0.45); cursor: grabbing; }
.tl-guide { position: absolute; top: 0; bottom: 0; left: 0; width: 1px; background: var(--warn); pointer-events: none; z-index: 4; }
.tl-cut { position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-left: 1px dashed var(--danger); pointer-events: none; z-index: 6; }
.tl-obj {
  position: absolute; display: flex; align-items: center; gap: 5px; padding: 0 7px; border: 0; border-radius: 5px; margin: 0;
  background: color-mix(in srgb, var(--c) 28%, var(--panel-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent);
  color: #f4f4f6; font-size: 11.5px; line-height: 1; text-align: left; overflow: hidden; white-space: nowrap; cursor: pointer;
}
.tl-obj > .icon { color: color-mix(in srgb, var(--c) 70%, #fff); }
.tl-obj:hover { background: color-mix(in srgb, var(--c) 42%, var(--panel-2)); }
.tl-obj.sel { background: color-mix(in srgb, var(--c) 50%, var(--panel-2)); box-shadow: inset 0 0 0 1px var(--c), 0 0 0 2px #fff; z-index: 3; }
.tl-obj.thin { padding: 0; }
.tl-obj.locked { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255, 255, 255, 0.05) 6px 12px); }
.tl-label { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tl-lock { margin-left: auto; opacity: 0.8; }
.tl-row.kind-video .tl-obj { font-weight: 500; }
.tl-playhead { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; z-index: 5; }
.tl-playhead .knob { position: absolute; top: 0; left: -5px; width: 12px; height: 13px; background: var(--accent); border-radius: 2px 2px 7px 7px; }

/* ——— Fenêtre d'export ——— */
.modal-back {
  position: fixed; inset: 0; z-index: 40; background: rgba(5, 6, 8, 0.64); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  width: min(540px, 100%); max-height: min(92vh, 880px); overflow-y: auto; background: var(--panel);
  border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); display: flex; flex-direction: column;
}
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 16px 6px 22px; }
.modal-head > div { flex: 1; min-width: 0; }
.modal-head h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.015em; }
.modal-head p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.modal-body { padding: 14px 22px 18px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.modal-foot .muted { font-size: 12.5px; }
.exp-group { display: flex; flex-direction: column; gap: 7px; }
.exp-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.choice { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.choice button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 12px; min-width: 0; text-align: left;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer;
}
.choice button:hover { border-color: var(--faint); }
.choice button.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice-label { font-weight: 600; font-size: 13.5px; }
.choice-hint { font-size: 11.5px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choice button.on .choice-hint { color: var(--accent); }
.exp-hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.exp-note { display: flex; gap: 8px; margin: 0; font-size: 12px; color: var(--faint); line-height: 1.5; }
.exp-note > .icon { margin-top: 1px; }
.exp-run { display: flex; flex-direction: column; padding: 6px 0 2px; }
.exp-run p { margin: 12px 0 0; font-size: 12.5px; }
.exp-done { display: flex; flex-direction: column; gap: 16px; }
.exp-ok { display: flex; align-items: center; gap: 12px; }
.exp-ok > .icon { color: var(--accent); }
.exp-ok b { display: block; font-size: 16px; }
.exp-ok span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.exp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.path { font: 12px "JetBrains Mono", ui-monospace, monospace; color: var(--muted); }
.exp-past { padding: 12px 22px 16px; border-top: 1px solid var(--line); }
.exp-past ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.exp-past li { display: flex; align-items: center; gap: 6px; padding: 7px 8px 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.past-text { flex: 1; min-width: 0; }
.past-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.past-meta { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }

.verify { border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel-2); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.verify-head { display: flex; align-items: center; gap: 12px; }
.verify-head > .icon { color: var(--accent); }
.verify-text { flex: 1; min-width: 0; }
.verify-text b { font-size: 13.5px; }
.verify-text p { margin: 2px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.verify-step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.verify-step.bad { color: var(--danger); }
.verdict { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.45; padding: 9px 10px; border-radius: 9px; background: var(--raised); }
.verdict > .icon { margin-top: 1px; }
.verdict.ok > .icon { color: var(--accent); }
.verdict.warn > .icon { color: var(--warn); }
.verdict.error > .icon { color: var(--danger); }
.findings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; }
.finding { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.45; }
.finding > .icon { margin-top: 1px; }
.finding.ok > .icon { color: var(--accent); }
.finding.info > .icon { color: var(--muted); }
.finding.warn > .icon { color: var(--warn); }
.finding.error > .icon { color: var(--danger); }
.finding-text { flex: 1; min-width: 0; }
.finding-title { font-weight: 500; font-size: 13px; }
.finding-title .at { margin-left: 8px; border: 0; background: var(--raised); color: var(--muted); border-radius: 5px; padding: 0 6px; font-size: 11.5px; font-variant-numeric: tabular-nums; cursor: pointer; }
.finding-title .at:hover { color: var(--text); }
.finding-title .by { margin-left: 6px; font-size: 11px; color: var(--accent); font-weight: 400; }
.finding-detail { color: var(--muted); }
.finding-fix { color: var(--text); }
.verify-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.verify-foot .muted { font-size: 12px; }

/* ——— Notifications ——— */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; align-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: min(600px, 92vw); padding: 10px 12px 10px 14px;
  border-radius: 10px; background: #25282e; border: 1px solid var(--line-2); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5); font-size: 13px;
  animation: rise 0.18s ease-out;
}
.toast > .icon { color: var(--accent); }
.toast.error { border-color: rgba(242, 130, 107, 0.45); }
.toast.error > .icon { color: var(--danger); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* ——— Écrans étroits (panneau du navigateur, petit portable) ——— */
@media (max-width: 860px) {
  /* Pas la place pour trois colonnes : les panneaux deviennent des volets qui glissent par-dessus (mêmes boutons). */
  .editor { grid-template-columns: minmax(0, 1fr) !important; grid-template-areas: "top" "preview" "tl" !important; }
  .side, .media-wrap { position: fixed; z-index: 30; top: 52px; bottom: 0; background: var(--panel); }
  .side { left: 0; width: min(var(--side-w, 360px), 90vw); border-right: 1px solid var(--line-2); box-shadow: 24px 0 60px rgba(0, 0, 0, 0.55); }
  .media-wrap { right: 0; width: min(var(--media-w, 290px), 90vw); border-left: 1px solid var(--line-2); box-shadow: -24px 0 60px rgba(0, 0, 0, 0.55); }
  .split-x { display: none; }
  .top-title .pill { display: none; }
  .wide-only, .frame-no { display: none; }
  .tl-names { flex-basis: 168px; }
  .tl-volume { width: 40px; }
  .home-top, .home-main { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 560px) {
  .render-state { display: none; }
  .ver { display: none; }
  .tl-names { flex-basis: 128px; }
  .tl-volume { display: none; }
  .transport { gap: 6px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
}

/* Les champs qu'on modifie sur place dans la fiche d'un élément. */
.edit-block, .edit-words { display: flex; flex-direction: column; gap: 8px; }
.edit-words { flex-direction: row; flex-wrap: wrap; }
.edit-words .edit-label { flex: 0 0 100%; }
.edit-words .edit-row { flex: 1 1 96px; min-width: 0; }
.edit-field { display: flex; flex-direction: column; gap: 4px; }
.edit-label { font-size: 12px; color: var(--muted); }
.edit-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.edit-swatch { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-2); }
input.edit, textarea.edit {
  width: 100%; min-width: 0; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px;
  color: var(--text); font: inherit; line-height: 1.4; resize: vertical;
}
input.edit:hover, textarea.edit:hover { border-color: var(--faint); }
input.edit:focus, textarea.edit:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.media-item[draggable="true"] { cursor: grab; }
.media-item[draggable="true"]:active { cursor: grabbing; }

/* ——— Nouveau projet ——— */
.modal.wide { width: min(640px, 100%); }
.style-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.style-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 11px 13px; text-align: left; cursor: pointer;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2);
}
.style-card:hover { border-color: var(--faint); }
.style-card.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.style-text { font-size: 12px; color: var(--muted); line-height: 1.45; }
.dropzone {
  display: flex; align-items: center; gap: 12px; padding: 16px; border: 1.5px dashed var(--line-2); border-radius: 12px;
  color: var(--muted); font-size: 13px; line-height: 1.45;
}
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.dropzone > .icon { color: var(--faint); }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.file-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.file-list li { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); font-size: 13px; }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ——— Mode simple : pas de timeline ; sous l'aperçu, un curseur et quelques interrupteurs ——— */
.editor.simple { grid-template-rows: 52px minmax(0, 1fr); }
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--raised); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 4px 11px; border-radius: 7px; font-size: 12.5px; font-weight: 500; color: var(--muted); cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.simple-bar { display: flex; flex-direction: column; gap: 10px; }
.scrub { display: flex; align-items: center; gap: 12px; }
.scrub input[type="range"] {
  flex: 1; min-width: 0; height: 18px; margin: 0; appearance: none; background: none; cursor: pointer;
}
.scrub input[type="range"]::-webkit-slider-runnable-track {
  height: 5px; border-radius: 3px; background: linear-gradient(to right, var(--accent) var(--at, 0%), var(--raised) var(--at, 0%));
}
.scrub input[type="range"]::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; margin-top: -4.5px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
.scrub input[type="range"]::-moz-range-track { height: 5px; border-radius: 3px; background: var(--raised); }
.scrub input[type="range"]::-moz-range-progress { height: 5px; border-radius: 3px; background: var(--accent); }
.scrub input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
.scrub-time { font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.simple-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.simple-select { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px 0 9px; height: 30px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel-2); color: var(--muted); }
.simple-select select { border: 0; background: none; font-size: 13px; padding: 4px 2px; cursor: pointer; color: var(--text); }
.simple-select select:disabled { cursor: default; color: var(--faint); }
.simple-asks { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.editor.simple .transport .tc, .editor.simple .transport .frame-no { display: none; }

/* ——————————————————————————————————————————————————————————————————————————————————————————————
   La page des projets : le style du site (tuiles douces, fond lilas, violet pour l'action).
   Choisi par Fantin le 6 octobre 2026 ; l'éditeur, lui, garde le thème sombre ci-dessus.
   La classe `doux` est posée sur <html> quand aucun projet n'est ouvert (app.tsx et /theme.js).
   —————————————————————————————————————————————————————————————————————————————————————————————— */
@font-face { font-family: "Bricolage Grotesque"; font-weight: 700; font-display: swap; src: url(/fonts/bricolage-grotesque/bricolage-grotesque-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-display: swap; src: url(/fonts/figtree/figtree-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-display: swap; src: url(/fonts/figtree/figtree-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-display: swap; src: url(/fonts/figtree/figtree-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-display: swap; src: url(/fonts/figtree/figtree-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Big Shoulders Display"; font-weight: 900; font-display: swap; src: url(/fonts/big-shoulders-display/big-shoulders-display-latin-900-normal.woff2) format("woff2"); }

html.doux {
  color-scheme: light;
  --bg: oklch(0.953 0.022 300);
  --panel: #fff;
  --panel-2: oklch(0.953 0.022 300);
  --raised: oklch(0.953 0.022 300);
  --hover: oklch(0.925 0.034 300);
  --line: oklch(0.88 0.03 300);
  --line-2: oklch(0.88 0.03 300);
  --text: oklch(0.25 0.06 300);
  --muted: oklch(0.44 0.05 300);
  --faint: oklch(0.47 0.05 300);
  --accent: oklch(0.5 0.21 292);
  --accent-hover: oklch(0.43 0.2 292);
  --accent-ink: #fff;
  --accent-soft: oklch(0.5 0.21 292 / 0.09);
  --accent-line: oklch(0.5 0.21 292 / 0.35);
  --danger: oklch(0.5 0.19 18);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
}
html.doux body { font: 15px/1.5 "Figtree", system-ui, sans-serif; font-feature-settings: normal; }
html.doux ::selection { background: var(--accent); color: var(--accent-ink); }

/* La barre : une pilule blanche qui flotte, le logo du site. Un bandeau du fond couvre ce qui dépasserait au-dessus. */
html.doux body::before { content: ""; position: fixed; inset: 0 0 auto; z-index: 4; height: 34px; background: var(--bg); pointer-events: none; }
html.doux .home-top { position: sticky; top: 12px; z-index: 5; margin: 12px auto 0; width: min(1180px, calc(100% - 56px)); padding: 9px 20px 9px 22px; border: 0; border-radius: 999px; box-shadow: 0 10px 26px -16px rgb(0 0 0 / 0.22); }
html.doux .marque { display: inline-flex; align-items: center; font: 900 28px/1 "Big Shoulders Display", "Arial Narrow", sans-serif; text-transform: uppercase; letter-spacing: 0.005em; }
html.doux .marque-coupe { width: 0.15em; height: 1.02em; margin: 0 0.09em; background: var(--accent); rotate: 18deg; }
html.doux .pill { padding: 4px 11px; border: 0; background: var(--raised); font-size: 12.5px; }
html.doux .claude-state { font-size: 13.5px; font-weight: 500; }
html.doux .claude-state.on .icon { animation: doux-scintille 2.6s ease-in-out infinite; }
@keyframes doux-scintille { 0%, 100% { scale: 1; rotate: 0deg; } 50% { scale: 1.18; rotate: 12deg; } }

html.doux .home-main { padding-top: 36px; }
html.doux .home-head { align-items: center; animation: doux-monte 0.7s var(--ease) backwards; }
html.doux .home-head h1 { font: 700 clamp(30px, 4vw, 44px)/1.05 var(--display); letter-spacing: -0.03em; margin-bottom: 8px; }
html.doux .home-head p { font-size: 16px; }

/* Les boutons : des pilules */
html.doux .btn { height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--raised); font-size: 14.5px; font-weight: 600; transition: background-color 0.2s var(--ease), translate 0.25s var(--ease), box-shadow 0.25s var(--ease); }
html.doux .btn:hover:not(:disabled) { background: var(--hover); }
html.doux .btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 14px 24px -14px oklch(0.5 0.21 292 / 0.8); }
html.doux .btn.primary:hover:not(:disabled) { background: var(--accent-hover); translate: 0 -2px; }
html.doux .btn.primary:active:not(:disabled) { translate: 0 1px; }
html.doux .btn.ghost { background: transparent; }
html.doux .btn.ghost:hover:not(:disabled) { background: var(--raised); }
html.doux .btn.small { height: 30px; padding: 0 12px; font-size: 13px; }
html.doux .btn.icon-only { width: 40px; padding: 0; }
html.doux .btn.small.icon-only { width: 30px; }
html.doux .home-head .btn.primary { height: 50px; padding: 0 24px 0 20px; font-size: 16px; }

/* Les projets : des tuiles blanches qui se posent une à une */
html.doux .cards { gap: 14px; }
html.doux .card { padding: 9px; border: 0; border-radius: 26px; opacity: 0; transition: translate 0.35s var(--ease), box-shadow 0.35s var(--ease); }
html.doux .card.vu { opacity: 1; animation: doux-pose 0.7s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 65ms); }
html.doux .card:hover { transform: none; translate: 0 -5px; box-shadow: 0 22px 36px -24px oklch(0.3 0.08 300 / 0.5); }
html.doux .poster { overflow: hidden; border-radius: 18px; background: var(--raised); }
html.doux .badge { top: 9px; left: 9px; padding: 3px 10px; border-radius: 999px; background: #fff; color: var(--text); backdrop-filter: none; }
html.doux .badge.right { left: auto; right: 9px; }
html.doux .card-body { padding: 12px 8px 8px; }
html.doux .card-title { font: 700 17px/1.25 var(--display); letter-spacing: -0.015em; }
html.doux .card-meta { font-size: 13.5px; }
html.doux .card-style { padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
html.doux .empty-panel { max-width: 380px; margin-top: 24px; padding: 40px 28px; border-radius: 28px; background: var(--panel); font-size: 16px; animation: doux-pose 0.7s var(--ease) backwards; }
html.doux .empty-panel > .icon { box-sizing: content-box; padding: 12px; border-radius: 16px; background: oklch(0.9 0.06 300); color: var(--text); }
html.doux .notice { border: 0; border-radius: 16px; font-size: 14.5px; }
html.doux .notice.bad { background: oklch(0.94 0.035 18); }
@keyframes doux-pose { from { opacity: 0; translate: 0 16px; scale: 0.94; } }
@keyframes doux-monte { from { opacity: 0; translate: 0 22px; } }

/* La fenêtre « Nouveau projet » */
html.doux .modal-back { background: oklch(0.25 0.06 300 / 0.42); backdrop-filter: none; }
html.doux .modal { border: 0; border-radius: 28px; box-shadow: 0 36px 70px -30px oklch(0.25 0.08 300 / 0.6); animation: doux-pose 0.5s var(--ease) backwards; }
html.doux .modal-head { padding: 24px 20px 6px 28px; }
html.doux .modal-head h2 { font: 700 26px/1.1 var(--display); letter-spacing: -0.025em; }
html.doux .modal-head p { margin-top: 6px; font-size: 14.5px; }
html.doux .modal-body { padding: 16px 28px 22px; gap: 20px; }
html.doux .modal-foot { padding: 16px 20px 18px 28px; border-top: 0; }
html.doux .modal-foot .muted { font-size: 13.5px; }
html.doux .exp-label { font-size: 14px; color: var(--text); }
html.doux input.edit, html.doux textarea.edit { padding: 11px 14px; border: 2px solid transparent; border-radius: 12px; }
html.doux input.edit:hover, html.doux textarea.edit:hover { border-color: var(--line); }
html.doux input.edit:focus, html.doux textarea.edit:focus { border-color: var(--accent); background: var(--panel); box-shadow: none; }
html.doux .choice button, html.doux .style-card { border: 2px solid transparent; border-radius: 16px; transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), scale 0.25s var(--ease); }
html.doux .choice button:hover, html.doux .style-card:hover { border-color: var(--line); }
html.doux .choice button.on, html.doux .style-card.on { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); box-shadow: none; }
html.doux .choice button:active, html.doux .style-card:active { scale: 0.98; }
html.doux .choice-label { font-size: 15px; }
html.doux .choice-hint, html.doux .style-text { font-size: 13px; }
html.doux .choice-hint { white-space: normal; overflow: visible; }
html.doux .choice button.on .choice-hint, html.doux .style-card.on .style-text { color: oklch(0.93 0.04 292); }
html.doux .dropzone { padding: 20px; border: 2px dashed var(--line); border-radius: 18px; background: var(--raised); font-size: 14.5px; transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease); }
html.doux .dropzone.over { background: var(--panel); }
html.doux .dropzone > .icon { box-sizing: content-box; padding: 10px; border-radius: 14px; background: var(--panel); color: var(--text); }
html.doux .file-list li { padding: 6px 6px 6px 12px; border: 0; border-radius: 12px; font-size: 14px; animation: doux-monte 0.4s var(--ease) backwards; }
html.doux .check, html.doux .exp-note { font-size: 14.5px; }
html.doux .toast { border: 0; border-radius: 16px; background: var(--text); color: #fff; box-shadow: 0 18px 34px -18px oklch(0.25 0.08 300 / 0.7); }
html.doux .toast > .icon { color: oklch(0.91 0.07 165); }

@media (max-width: 860px) {
  html.doux .home-top { width: calc(100% - 36px); }
  html.doux .home-top .pill { display: none; }
  html.doux .claude-state { white-space: nowrap; }
  html.doux .choice { grid-auto-flow: row; }
  html.doux .home-head { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html.doux *, html.doux *::before, html.doux *::after { animation: none !important; transition: none !important; }
  html.doux .card { opacity: 1; }
}


/* Créer un compte ou se connecter (studio en ligne) : une mosaïque de tuiles dans le style du site (apps/site/DESIGN.md).
   À gauche la tuile où l'on agit ; à droite ce qui attend le client, et deux tuiles vivantes (sous-titres, musique). */
html.doux a.marque { color: inherit; text-decoration: none; }
.login { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; width: min(1180px, calc(100% - 56px)); margin: 0 auto; padding: 30px 0 64px; }
.login-card { display: flex; flex-direction: column; gap: 16px; padding: clamp(24px, 3.6vw, 48px); border-radius: 28px; background: var(--panel); animation: doux-pose 0.7s var(--ease) backwards; }
.login-card h1 { margin: 8px 0 0; font: 700 clamp(32px, 3.9vw, 52px)/1.03 var(--display, inherit); letter-spacing: -0.03em; text-wrap: balance; }
.login-card p { margin: 0; max-width: 33rem; color: var(--muted); font-size: 16.5px; line-height: 1.5; }
.login-card p b { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.login-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }

/* Le choix : une puce pleine de violet veut dire « choisi ». */
.login-choix { display: flex; flex-wrap: wrap; gap: 8px; }
.login-choix button { padding: 9px 17px; border: 2px solid transparent; border-radius: 999px; background: var(--bg); color: var(--text); font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), scale 0.2s var(--ease); }
.login-choix button:hover { border-color: var(--line); }
.login-choix button:active { scale: 0.97; }
.login-choix button.on { border-color: transparent; background: var(--accent); color: var(--accent-ink); }
.login-choix button:focus-visible, .login-links button:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }

.login-champ { display: flex; flex-direction: column; gap: 8px; }
.login-champ span { font-size: 14.5px; font-weight: 600; }
.login-champ input { width: 100%; height: 56px; padding: 0 17px; border: 2px solid transparent; border-radius: 11px; outline: none; background: var(--bg); color: var(--text); caret-color: var(--accent); font-family: inherit; font-size: 17px; transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease); }
.login-champ input::placeholder { color: var(--faint); }
.login-champ input:hover { border-color: var(--line); }
.login-champ input:focus { border-color: var(--accent); background: var(--panel); }
.login-champ input.code { font: 600 26px/1 "JetBrains Mono", ui-monospace, monospace; letter-spacing: 0.3em; text-align: center; }
.login-champ input.code::placeholder { font: 400 17px/1 "Figtree", system-ui, sans-serif; letter-spacing: 0; }
.login-erreur { padding: 11px 16px; border-radius: 11px; background: oklch(0.94 0.035 18); color: var(--danger); font-size: 15px; font-weight: 600; }

/* Le bouton principal du site : une pilule violette, la flèche dans son rond blanc. */
.login-bouton { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.9em; padding: 0.45em 0.45em 0.45em 1.35em; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-family: inherit; font-size: 18px; font-weight: 700; line-height: 1.15; cursor: pointer; box-shadow: 0 16px 29px -14px oklch(0.5 0.21 292 / 0.75); transition: translate 0.25s var(--ease), background-color 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.login-fleche { display: grid; place-items: center; width: 2.4em; height: 2.4em; border-radius: 50%; background: var(--accent-ink); color: var(--accent); transition: translate 0.25s var(--ease); }
.login-bouton:hover:not(:disabled) { background: var(--accent-hover); translate: 0 -2px; box-shadow: 0 21px 35px -14px oklch(0.5 0.21 292 / 0.85); }
.login-bouton:hover:not(:disabled) .login-fleche { translate: 0.2em 0; }
.login-bouton:active:not(:disabled) { translate: 0 1px; }
.login-bouton:focus-visible { outline: 3px solid var(--text); outline-offset: 4px; }
.login-bouton:disabled { opacity: 0.55; box-shadow: none; cursor: default; }
.login-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-top: auto; padding-top: 8px; }
.login-links button { padding: 8px 13px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-family: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer; }
.login-links button:hover:not(:disabled) { background: var(--bg); color: var(--text); }
.login-links button:disabled { cursor: default; }

/* À droite : la suite (le temps en cours a un fond lilas, son numéro passe au violet), puis deux tuiles de piste. */
.login-cote { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; gap: 14px; }
.login-tuile { padding: clamp(20px, 2.3vw, 30px); border-radius: 28px; background: var(--panel); animation: doux-pose 0.7s var(--ease) backwards; }
.login-tuile:nth-child(1) { animation-delay: 0.1s; }
.login-tuile:nth-child(2) { animation-delay: 0.2s; }
.login-tuile:nth-child(3) { animation-delay: 0.3s; }
.login-tuile h2 { margin: 0; font: 700 19px/1.2 var(--display, inherit); letter-spacing: -0.02em; }
.login-tuile.menthe { background: oklch(0.91 0.07 165); }
.login-tuile.dragee { background: oklch(0.92 0.05 350); }
.login-suite { grid-column: 1 / -1; }
.login-suite h2 { font-size: clamp(23px, 2.4vw, 30px); line-height: 1.05; letter-spacing: -0.03em; }
.login-suite ol { display: flex; flex-direction: column; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; }
.login-suite li { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 17px; animation: login-temps 7.5s step-end infinite; animation-delay: calc(var(--i) * 2.5s); }
.login-suite .rang { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: var(--bg); font: 700 16.5px/1 var(--display, inherit); animation: login-rang 7.5s step-end infinite; animation-delay: inherit; }
.login-suite b { display: block; font-size: 16.5px; font-weight: 600; }
.login-suite small { display: block; color: var(--muted); font-size: 14.5px; line-height: 1.38; }
@keyframes login-temps { 0% { background: oklch(0.9 0.06 300); } 33.4% { background: transparent; } }
@keyframes login-rang { 0% { background: var(--accent); color: var(--accent-ink); } 33.4% { background: var(--bg); color: inherit; } }
.login-mots { display: flex; flex-wrap: wrap; gap: 4px 1px; margin: 16px 0 0 -7px; font: 700 clamp(20px, 2vw, 25px)/1.15 var(--display, inherit); letter-spacing: -0.02em; }
.login-mots span { padding: 3px 7px; border-radius: 9px; animation: login-mot 3.5s step-end infinite; animation-delay: calc(var(--i) * 0.7s); }
@keyframes login-mot { 0% { background: var(--text); color: #fff; } 20% { background: transparent; color: inherit; } }
.login-egaliseur { display: flex; align-items: flex-end; gap: 6px; height: 58px; margin-top: 16px; }
.login-egaliseur i { width: 9px; border-radius: 999px; background: var(--text); animation: login-bat var(--d) ease-in-out infinite alternate; }
@keyframes login-bat { from { height: 22%; } to { height: 100%; } }

@media (max-width: 880px) {
  .login { grid-template-columns: minmax(0, 1fr); width: min(580px, calc(100% - 36px)); padding-top: 22px; }
}
@media (max-width: 440px) {
  .login-bouton { align-self: stretch; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .login-card, .login-tuile, .login-suite li, .login-suite .rang, .login-mots span, .login-egaliseur i { animation: none; }
  .login-egaliseur i:nth-child(odd) { height: 55%; }
  .login-egaliseur i:nth-child(even) { height: 90%; }
}
