/* ALAL Academy STUDIO — interface à la charte d'alalfinance.com :
   monochrome (encre #1f1f1f sur blanc, gris #7a7a7a), General Sans aux graisses
   légères, en-tête en carte flottante arrondie, filets fins, boutons sobres.
   (Les vidéos gardent leur propre style « tableau blanc ».) */
:root {
  --bg: #ffffff;
  --soft: #f6f6f5;
  --ink: #1f1f1f;
  --muted: #7a7a7a;
  --faint: #a7a7a7;
  --line: #eaeaea;
  --line-strong: #cfcfcf;
  --ok: #2f6b4f;
  --ok-soft: #eef4f0;
  --bad: #b3261e;
  --bad-soft: #fbeeed;
  --warn: #8a5a00;
  --warn-soft: #faf4e8;
  --sans: "General Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 14px;
  --radius-btn: 4.5px;
  --shadow: 0 20px 40px rgba(31, 31, 31, 0.08);
  --shadow-soft: 0 6px 18px rgba(31, 31, 31, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; font-weight: 400; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--sans); margin: 0; line-height: 1.12; letter-spacing: -0.01em; }
h1 { font-size: 36px; font-weight: 300; }
h2 { font-size: 22px; font-weight: 400; }
h3 { font-size: 17px; font-weight: 500; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ── En-tête : carte flottante ── */
.top {
  position: sticky; top: 14px; z-index: 5; margin: 14px 18px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 22px; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px);
  border-radius: 22px; box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 30px; width: auto; display: block; }
.brand-studio { font-weight: 500; font-size: 11.5px; letter-spacing: 0.28em; padding: 4px 10px 3px; border: 0.67px solid var(--ink); border-radius: var(--radius-btn); line-height: 1.2; }
.credits { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.meter { width: 150px; height: 4px; border-radius: 99px; overflow: hidden; background: var(--line); }
.meter-fill { height: 100%; width: 0; background: var(--ink); transition: width 0.4s; }
.meter-fill.warn { background: var(--warn); }
.meter-fill.full { background: var(--bad); }
.credits-num { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }
.who { display: flex; align-items: center; gap: 8px; }

/* ── Mise en page ── */
.layout { display: grid; grid-template-columns: 300px 1fr; min-height: calc(100vh - 90px); }
.side { padding: 26px 16px 26px 22px; overflow-y: auto; max-height: calc(100vh - 90px); position: sticky; top: 90px; }
.work { padding: 30px 40px 90px 24px; max-width: 1180px; width: 100%; }

.articles { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; }
.articles li + li { border-top: 1px solid var(--line); }
.articles li button {
  width: 100%; text-align: left; background: transparent; border: 0; border-radius: 10px;
  padding: 12px 10px; cursor: pointer; display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: start;
}
.articles li button:hover { background: var(--soft); }
.articles li button.active { background: var(--soft); }
.articles li button.active .art-title { font-weight: 500; }
.art-num { font-weight: 300; font-size: 17px; color: var(--faint); font-variant-numeric: tabular-nums; }
.articles li button.active .art-num { color: var(--ink); }
.art-title { font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-status { grid-column: 2; font-size: 11px; color: var(--muted); margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Pastilles ── */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 500; border: 0.67px solid var(--line-strong); color: var(--muted); background: var(--bg); }
.pill.ok { color: var(--ok); border-color: #cfe0d6; background: var(--ok-soft); }
.pill.todo { color: var(--ink); border-color: var(--ink); }
.pill.bad { color: var(--bad); border-color: #f0cfcc; background: var(--bad-soft); }

/* ── Boutons (comme alalfinance.com) ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-btn); border: 0.67px solid var(--ink); background: var(--bg);
  font-size: 13.5px; font-weight: 400; cursor: pointer; text-decoration: none; color: var(--ink);
  transition: background 0.15s, color 0.15s, opacity 0.15s;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:disabled:hover { background: var(--bg); color: var(--ink); }
.btn-primary, .btn-orange { background: var(--ink); color: #fff; }
.btn-primary:hover, .btn-orange:hover { background: #3a3a3a; border-color: #3a3a3a; }
.btn-primary:disabled:hover, .btn-orange:disabled:hover { background: var(--ink); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); padding: 6px 10px; }
.btn-ghost:hover { background: var(--soft); color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }

/* ── En-tête d'article et étapes ── */
.art-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.art-head .eyebrow { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 8px; }
.art-head h1 { font-size: 36px; font-weight: 300; max-width: 780px; letter-spacing: -0.015em; }

.steps { display: flex; gap: 0; margin: 6px 0 26px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.step {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px 13px 4px; margin-right: 18px; border: 0; background: transparent;
  cursor: pointer; font-size: 14px; color: var(--muted); border-bottom: 1.5px solid transparent; margin-bottom: -1px;
}
.step .num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 0.67px solid var(--line-strong); font-size: 11.5px; font-weight: 500; }
.step:hover { color: var(--ink); }
.step.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.step.active .num { background: var(--ink); border-color: var(--ink); color: #fff; }
.step.done .num { background: var(--ok-soft); border-color: #cfe0d6; color: var(--ok); }
.step:disabled { opacity: 0.4; cursor: not-allowed; }

.panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; margin-bottom: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.hint { color: var(--muted); font-size: 14px; margin: 6px 0 0; }

.seg { display: inline-flex; border: 0.67px solid var(--ink); border-radius: var(--radius-btn); overflow: hidden; }
.seg button { border: 0; background: var(--bg); padding: 8px 14px; cursor: pointer; font-size: 13px; }
.seg button + button { border-left: 0.67px solid var(--ink); }
.seg button.on { background: var(--ink); color: #fff; }

.banner { border-radius: 10px; padding: 12px 16px; margin: 0 0 18px; font-size: 14px; }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner ul { margin: 6px 0 0; padding-left: 18px; }

/* ── Scènes ── */
.scenes { display: grid; gap: 18px; }
.scenes.short { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.scenes.long { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.scene {
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; cursor: pointer; text-align: left; padding: 0;
  display: flex; flex-direction: column; transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.scene:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--line-strong); }
.scene .thumb { background: var(--soft); display: grid; place-items: center; position: relative; }
.scenes.short .thumb { aspect-ratio: 9 / 16; }
.scenes.long .thumb { aspect-ratio: 16 / 9; }
.scene .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene .thumb .placeholder { font-size: 42px; text-align: center; padding: 10px; filter: grayscale(0.15); }
.scene .thumb .placeholder small { display: block; font-size: 12px; color: var(--muted); margin-top: 8px; }
.scene .meta { padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.scene .meta .row { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--muted); }
.scene .meta .num { font-weight: 300; color: var(--ink); font-size: 17px; }
.scene .meta .say { font-size: 12.5px; margin-top: 4px; color: #3d3d3d; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.scene.busy .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0) 70%); background-size: 200% 100%; animation: shine 1.2s infinite linear; }
@keyframes shine { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* ── Écouter ── */
.voices { display: flex; flex-direction: column; }
.voice { display: grid; grid-template-columns: 34px 1fr 300px; gap: 16px; align-items: center; padding: 14px 4px; border-top: 1px solid var(--line); }
.voice:first-child { border-top: 0; }
.voice .num { font-weight: 300; color: var(--faint); font-size: 20px; }
.voice .say { font-size: 14px; }
.voice .act { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.voice audio { width: 100%; height: 34px; }

/* ── Produire ── */
.produce { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.prod-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--bg); display: flex; flex-direction: column; gap: 14px; }
.prod-card video { width: 100%; border-radius: 10px; background: #000; }
.prod-card.short video { max-height: 460px; object-fit: contain; }
.progress { height: 4px; border-radius: 99px; overflow: hidden; background: var(--line); }
.progress div { height: 100%; width: 0; background: var(--ink); transition: width 0.5s; }
.joblog { font-size: 12.5px; color: var(--muted); min-height: 18px; }
.cost { font-size: 13px; color: var(--muted); }
.cost b { color: var(--ink); font-weight: 500; }

.publish { display: flex; flex-direction: column; gap: 14px; }
.copy-block { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--soft); position: relative; }
.copy-block .label { font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.copy-block pre { margin: 0; white-space: pre-wrap; font-family: var(--sans); font-size: 13.5px; max-height: 220px; overflow: auto; }
.copy-block .btn { position: absolute; top: 8px; right: 8px; background: var(--bg); }
.copy-block .btn:hover { background: var(--ink); }

/* ── Déposer ── */
.prompt-box { background: var(--soft); border: 1px dashed var(--line-strong); border-radius: 10px; padding: 14px 16px; font-size: 14px; }
.article-text { white-space: pre-wrap; font-size: 14px; line-height: 1.6; max-height: 360px; overflow: auto; background: var(--soft); border-radius: 10px; padding: 16px 18px; }

/* ── Fenêtres ── */
.editor { border: 0; border-radius: 18px; box-shadow: 0 30px 70px rgba(31, 31, 31, 0.18); padding: 0; width: min(780px, 94vw); background: var(--bg); }
.editor::backdrop { background: rgba(31, 31, 31, 0.28); backdrop-filter: blur(2px); }
.ed-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.ed-head h3 { font-weight: 400; font-size: 19px; }
.ed-body { padding: 20px 22px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; max-height: 70vh; overflow: auto; }
/* Sans min-width: 0, une colonne de grille s'élargit à son contenu le plus large (débordement). */
.ed-body > *, .row3 > *, .row2 > * { min-width: 0; }
.ed-body.single { grid-template-columns: minmax(0, 1fr); }
.ed-preview img { width: 100%; border: 1px solid var(--line); border-radius: 10px; }
.ed-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea { border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 11px; background: var(--bg); transition: border-color 0.15s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field textarea { min-height: 96px; resize: vertical; }
.field .help { font-size: 12px; color: var(--muted); }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.row2 { display: grid; grid-template-columns: 80px 1fr; gap: 8px; margin-bottom: 6px; }
.row2 input, .row2 select { border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; background: var(--bg); }
.emoji-input { font-size: 26px; text-align: center; padding: 4px !important; }
.palette { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.palette button { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; font-size: 20px; width: 36px; height: 36px; cursor: pointer; }
.palette button:hover { border-color: var(--ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 0.67px solid var(--line-strong); background: var(--bg); border-radius: 99px; padding: 5px 12px; cursor: pointer; font-size: 13px; }
.chips button.on { border-color: var(--ink); background: var(--ink); color: #fff; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 30px); opacity: 0; background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 10px; font-size: 14px; transition: all 0.25s; pointer-events: none; z-index: 50; max-width: 90vw; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); }

.empty { max-width: 600px; margin: 70px auto; text-align: center; }
.empty h1 { font-size: 44px; font-weight: 200; letter-spacing: -0.02em; }
.empty p { color: var(--muted); }
.howto { text-align: left; display: inline-flex; flex-direction: column; gap: 10px; margin-top: 22px; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 30px 22px 44px; }
.howto b { font-weight: 500; }

/* ── Connexion et équipe ── */
.login { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: var(--soft); }
.login-card { width: min(410px, 100%); background: var(--bg); border-radius: 22px; box-shadow: var(--shadow); padding: 34px 32px 22px; display: flex; flex-direction: column; gap: 14px; }
.login-logo { height: 46px; width: auto; align-self: center; }
.login-or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12.5px; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-links { display: flex; justify-content: space-between; }
.login-msg { min-height: 20px; margin: 0; font-size: 13.5px; color: var(--bad); }
.login-msg.ok { color: var(--ok); }
.login .field { margin-bottom: 0; }
.team { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.team li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 2px; border-top: 1px solid var(--line); }
.team li:first-child { border-top: 0; }

@media (max-width: 900px) {
  .top { margin: 10px 10px 0; padding: 10px 14px; border-radius: 18px; }
  .layout { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; padding: 18px 14px 6px; }
  .work { padding: 18px 16px 60px; }
  .art-head h1 { font-size: 28px; }
  .produce { grid-template-columns: 1fr; }
  .voice { grid-template-columns: 30px 1fr; }
  .voice .act { grid-column: 1 / -1; }
  .ed-body { grid-template-columns: minmax(0, 1fr); }
  .credits-label, .who .hint { display: none; }
  .meter { width: 70px; }
}

/* ══ Coquille : menu latéral + contenu (refonte) ══════════════════════════ */
.shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; background: var(--soft); }
.nav { position: sticky; top: 0; height: 100vh; background: var(--bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px 14px; gap: 14px; }
.nav-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 8px; text-decoration: none; color: var(--ink); }
.nav-brand img { height: 30px; width: auto; }
.nav-search { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--muted); cursor: pointer; font-size: 13.5px; }
.nav-search:hover { border-color: var(--line-strong); }
.nav-search svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.nav-search kbd { margin-left: auto; font-family: var(--sans); font-size: 11px; border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 6px; background: var(--bg); }
.nav-links { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-group { font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); padding: 14px 10px 6px; }
.nav-item, .nav-new { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: #3d3d3d; text-decoration: none; font-size: 14.5px; border: 0; background: transparent; cursor: pointer; text-align: left; width: 100%; }
.nav-item svg, .nav-new svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav-item:hover, .nav-new:hover { background: var(--soft); color: var(--ink); }
.nav-item.on { background: var(--ink); color: #fff; }
.nav-new { margin-top: 8px; border: 1px dashed var(--line-strong); color: var(--ink); }
.nav-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; text-align: left; width: 100%; }
.me:hover { background: var(--soft); }
.me-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.me-txt b { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-txt small { color: var(--muted); font-size: 11.5px; }
.me-chev { color: var(--muted); font-size: 18px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-grid; place-items: center; font-size: 12px; font-weight: 500; letter-spacing: 0.04em; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; vertical-align: middle; margin-right: 6px; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.avatar.xl { width: 64px; height: 64px; font-size: 20px; font-weight: 400; }
.menu-pop { position: fixed; z-index: 60; width: 248px; background: var(--bg); border-radius: 14px; box-shadow: 0 24px 60px rgba(31, 31, 31, 0.16); padding: 8px; }
.pop-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.pop-head b { display: block; font-weight: 500; font-size: 13.5px; word-break: break-all; }
.pop-head small { color: var(--muted); font-size: 12px; }
.pop-item { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; border: 0; background: transparent; cursor: pointer; }
.pop-item:hover { background: var(--soft); }
.pop-item.danger { color: var(--bad); }

.main { min-width: 0; display: flex; flex-direction: column; }
.bar { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 14px; padding: 14px 36px; background: rgba(246, 246, 245, 0.88); backdrop-filter: blur(8px); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span:last-child { color: var(--ink); }
.crumbs .sep { color: var(--line-strong); }
.bar-actions { margin-left: auto; display: flex; gap: 8px; }
.menu-btn { display: none; border: 0; background: transparent; padding: 6px; cursor: pointer; }
.menu-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.page { padding: 10px 36px 90px; max-width: 1240px; width: 100%; }

/* ── Titres de page ── */
.hero { padding: 26px 0 30px; }
.hero.tight { padding: 14px 0 24px; }
.hero .eyebrow { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 10px; }
.hero h1 { font-size: 46px; font-weight: 200; letter-spacing: -0.025em; }
.hero.tight h1 { font-size: 38px; }
.lead { color: var(--muted); font-size: 16.5px; font-weight: 300; max-width: 720px; margin: 12px 0 0; }

/* ── Chiffres clés ── */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpis.three { grid-template-columns: repeat(3, 1fr); }
.kpi { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px 18px; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: box-shadow 0.2s, transform 0.2s; }
a.kpi:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.kpi-num { font-size: 46px; font-weight: 200; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-num sup { font-size: 15px; font-weight: 400; letter-spacing: 0; margin-left: 3px; vertical-align: super; color: var(--muted); }
.kpi-label { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-weight: 500; font-size: 14px; }
.kpi-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

.cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.link { color: var(--muted); text-decoration: none; font-size: 13.5px; }
.link:hover { color: var(--ink); }

/* ── Galerie de vidéos ── */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.gallery.wide { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.vcard { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 0; overflow: hidden; cursor: pointer; text-align: left; display: flex; flex-direction: column; transition: box-shadow 0.2s, transform 0.2s; }
.vcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.vthumb { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--soft); overflow: hidden; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.vplay { position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: 50%; background: rgba(31, 31, 31, 0.82); color: #fff; display: grid; place-items: center; font-size: 15px; padding-left: 3px; opacity: 0.9; transition: transform 0.2s; }
.vcard:hover .vplay { transform: scale(1.08); }
.vbadge { position: absolute; left: 10px; bottom: 10px; background: rgba(255, 255, 255, 0.94); border-radius: var(--radius-btn); padding: 3px 8px; font-size: 11.5px; font-weight: 500; }
.vmeta { display: grid; grid-template-columns: 26px 1fr; gap: 2px 8px; padding: 12px 14px 14px; }
.vtitle { font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vmeta small { grid-column: 2; color: var(--muted); font-size: 12px; }
.vempty { aspect-ratio: 16 / 9; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--faint); font-size: 13.5px; }
.prod-card.short .vempty { aspect-ratio: 9 / 12; }
.player { background: #000; }
.player video { width: 100%; max-height: 72vh; display: block; }

/* ── Tâches ── */
.trow { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 4px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.panel-head + .trow { border-top: 0; }
.trow:hover { background: var(--soft); }
.tmain { font-size: 14px; display: flex; flex-direction: column; min-width: 0; }
.tmain small, .tside small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tside { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tdot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.tdot.ok { background: var(--ok); }
.tdot.bad { background: var(--bad); }
.tdot.todo { background: var(--ink); }
.tdot.live { animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31, 31, 31, 0.35); } 100% { box-shadow: 0 0 0 9px rgba(31, 31, 31, 0); } }
.progress.mini { width: 120px; display: block; }

.todo { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 4px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 13.5px; }
.todo:hover { background: var(--soft); }

/* ── Articles (cartes) ── */
.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.search { flex: 1; min-width: 220px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 14px; background: var(--bg); }
.search:focus { outline: none; border-color: var(--ink); }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.acard { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s; }
.acard:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--line-strong); }
.acard-top { display: flex; justify-content: space-between; align-items: center; }
.acard-top .art-num { font-size: 24px; color: var(--ink); }
.acard-title { font-size: 15px; line-height: 1.38; min-height: 62px; }
.acard-foot { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
.chip { font-size: 11.5px; padding: 2px 8px; border-radius: var(--radius-btn); background: var(--ink); color: #fff; }
.chip.off { background: var(--soft); color: var(--faint); }

/* ── Étapes de l'atelier ── */
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 4px 0 24px; }
.st { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; text-align: left; transition: border-color 0.15s, box-shadow 0.15s; }
.st:hover { border-color: var(--line-strong); }
.st .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); font-size: 13px; font-weight: 500; flex: none; }
.st-txt { display: flex; flex-direction: column; }
.st-txt b { font-weight: 500; font-size: 14.5px; }
.st-txt small { color: var(--muted); font-size: 12px; }
.st.active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.st.active .num { background: var(--ink); border-color: var(--ink); color: #fff; }
.st.done .num { background: var(--ok-soft); border-color: #cfe0d6; color: var(--ok); }
.st:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Administration ── */
.invite { display: grid; grid-template-columns: minmax(0, 1fr) 170px auto; gap: 10px; margin-bottom: 18px; }
.invite input, .invite select { border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 12px; background: var(--bg); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 8px; border-bottom: 1px solid var(--line); }
.table .right { text-align: right; }
.muted { color: var(--muted); }
.facts { display: grid; grid-template-columns: 160px 1fr; gap: 12px 18px; margin: 4px 0 18px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; background: var(--soft); padding: 1px 6px; border-radius: 4px; }
.bars { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.bar-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) 80px; gap: 12px; align-items: center; font-size: 13.5px; }
.bar-row b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.bar-track { position: relative; height: 8px; border-radius: 99px; background: var(--soft); }
.bar-track span { position: absolute; inset: 0 auto 0 0; background: var(--ink); border-radius: 99px; }
.bar-track i { position: absolute; top: -4px; bottom: -4px; width: 1.5px; background: var(--bad); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 6px; }
.timeline li { position: relative; display: flex; gap: 14px; padding: 0 0 18px 18px; border-left: 1px solid var(--line); font-size: 14px; }
.timeline li:last-child { border-left-color: transparent; }
.tl-dot { position: absolute; left: -5px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--ink); }
.timeline li.done .tl-dot { background: var(--ok); border-color: var(--ok); }
.timeline li.failed .tl-dot { background: var(--bad); border-color: var(--bad); }
.timeline li small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.timeline a { color: var(--ink); }
.account .acc-row { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }

/* ── Recherche rapide ── */
.palette-dlg { border: 0; border-radius: 16px; padding: 0; width: min(560px, 92vw); box-shadow: 0 30px 80px rgba(31, 31, 31, 0.25); margin-top: 14vh; }
.palette-dlg::backdrop { background: rgba(31, 31, 31, 0.28); backdrop-filter: blur(2px); }
.palette-dlg input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 18px 20px; font-size: 16px; outline: none; }
.pal-list { padding: 6px; max-height: 50vh; overflow: auto; }
.pal-item { display: block; width: 100%; text-align: left; padding: 10px 14px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; font-size: 14px; }
.pal-item.on, .pal-item:hover { background: var(--soft); }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .nav { position: fixed; z-index: 30; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform 0.25s; box-shadow: var(--shadow); }
  .shell.nav-open .nav { transform: none; }
  .menu-btn { display: block; }
  .bar { padding: 12px 16px; }
  .page { padding: 6px 16px 70px; }
  .hero h1 { font-size: 34px; }
  .kpis, .kpis.three { grid-template-columns: 1fr 1fr; }
  .kpi-num { font-size: 34px; }
  .stepper { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .invite { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .bar-row { grid-template-columns: 100px minmax(0, 1fr) 64px; }
}

/* ── Moteur du PC ── */
.engine { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 12.5px; }
.engine b { display: block; font-weight: 500; font-size: 13px; }
.engine small { color: var(--muted); font-size: 11.5px; }
.edot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); flex: none; }
.edot.on { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }

/* ── Tableau de bord : le fil de production, la prochaine vidéo ── */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: stretch; gap: 10px; margin-bottom: 22px; }
.lane { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 14px; min-width: 0; }
.lane.done { background: var(--ink); color: #fff; border-color: var(--ink); }
.lane-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.lane-head b { display: block; font-weight: 500; font-size: 14px; }
.lane-head small { color: var(--muted); font-size: 12px; }
.lane.done .lane-head small { color: #a7a7a7; }
.lane-count { font-size: 34px; font-weight: 200; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.lane-dots { display: flex; flex-wrap: wrap; gap: 5px; }
.lane .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; text-decoration: none; color: var(--ink); border: 0.67px solid var(--line-strong); transition: background 0.15s, color 0.15s; }
.lane .dot:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.lane.done .dot { color: #fff; border-color: #7a7a7a; }
.lane.done .dot:hover { background: #fff; color: var(--ink); }
.lane-arrow { align-self: center; color: var(--line-strong); font-size: 18px; }
.next { display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 22px; }
.next-thumb { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #f7f6f1; display: grid; place-items: center; }
.next-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.next-num { font-size: 64px; font-weight: 200; color: var(--muted); }
.next-body h2 { font-weight: 300; font-size: 26px; letter-spacing: -0.02em; margin: 4px 0 6px; }
.next-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.admin-alert { display: block; text-decoration: none; }
.admin-alert u { margin-left: 4px; }
.nav-alert { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-left: auto; box-shadow: 0 0 0 3px var(--warn-soft); }
@media (max-width: 1100px) {
  .flow { grid-template-columns: 1fr 1fr; }
  .lane-arrow { display: none; }
}
@media (max-width: 640px) {
  .flow { grid-template-columns: 1fr; }
  .next { grid-template-columns: 1fr; }
}

/* ── Diffuser partout ── */
.kit-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.kit-tabs button { font: inherit; font-size: 13px; padding: 7px 14px; border-radius: 99px; border: 0.67px solid var(--line-strong); background: var(--bg); color: var(--ink); cursor: pointer; transition: background 0.15s, color 0.15s; }
.kit-tabs button:hover { border-color: var(--ink); }
.kit-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.kit-body { display: grid; gap: 12px; }
.kit-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kit-file { color: var(--ink); background: var(--bg); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; text-decoration: none; padding: 6px 12px; border-radius: var(--radius-btn); border: 0.67px solid var(--ink); }
.kit-file:hover { background: var(--ink); color: #fff; }
.kit-file svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.kit .copy-block pre { padding-right: 76px; }
.kit-note { margin: 0; }
.copy-block .label { display: flex; gap: 10px; align-items: baseline; padding-right: 80px; }
.copy-block .count { letter-spacing: 0; text-transform: none; font-weight: 400; color: var(--faint); }
.copy-block .count.over { color: var(--bad); }
.kit-all { justify-self: start; }
