/* Sillage — système visuel. Violet profond, neutres lavande, Inter partout : net, professionnel, lisible au soleil comme la nuit. */
@font-face { font-family: Inter; src: url(fonts/inter-latin-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; src: url(fonts/inter-latin-ext-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: CapMontserrat; src: url(fonts/cap-montserrat-900.woff) format('woff'); font-weight: 900; font-display: swap; }
@font-face { font-family: CapMontserrat; src: url(fonts/cap-montserrat-800.woff) format('woff'); font-weight: 700 800; font-display: swap; }
@font-face { font-family: CapMontserrat; src: url(fonts/cap-montserrat-600.woff) format('woff'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: CapAnton; src: url(fonts/cap-anton-400.woff) format('woff'); font-display: swap; }
@font-face { font-family: CapTajawal; src: url(fonts/cap-tajawal-900.woff) format('woff'); font-weight: 900; font-display: swap; }
@font-face { font-family: CapTajawal; src: url(fonts/cap-tajawal-800.woff) format('woff'); font-weight: 700 800; font-display: swap; }
@font-face { font-family: CapTajawal; src: url(fonts/cap-tajawal-500.woff) format('woff'); font-weight: 400 600; font-display: swap; }

:root {
  /* Neutres légèrement lavande, violet profond en couleur de marque, rose en second accent. */
  --bg: #f6f5fb; --surface: #ffffff; --surface-2: #f2f0f8; --surface-3: #e8e5f2;
  --ink: #16131f; --ink-2: #45405a; --mute: #736d88; --line: #e7e4ef; --line-2: #d7d3e4;
  --accent: #6d4aff; --accent-hover: #5a35f0; --accent-ink: #ffffff; --accent-soft: #eeeaff; --accent-2: #e0479e; --accent-2-soft: #fce7f3;
  --gold: #e39a1c; --gold-soft: #fdf0d5;
  --ok: #16803c; --ok-soft: #dcfce7; --warn: #b45309; --warn-soft: #fef3c7; --bad: #c62828; --bad-soft: #fde2e2; --info: #2563eb; --info-soft: #e0eaff;
  --shadow: 0 1px 2px rgba(22, 16, 48, .05), 0 4px 16px rgba(22, 16, 48, .05);
  --shadow-lg: 0 16px 48px rgba(22, 16, 48, .16);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948; --s-other: #a39a8f;
  --r: 14px; --r-sm: 10px; --r-lg: 20px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --side: 248px; --top: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0a13; --surface: #14111d; --surface-2: #1c1928; --surface-3: #252134;
    --ink: #f3f1fa; --ink-2: #cdc8dd; --mute: #958faa; --line: #252134; --line-2: #322d45;
    --accent: #8f75ff; --accent-hover: #a28cff; --accent-ink: #0e0822; --accent-soft: #241c47; --accent-2: #f07ab8; --accent-2-soft: #3a1a2e;
    --gold: #f0b44c; --gold-soft: #3a2c12;
    --ok: #4ade80; --ok-soft: #12301f; --warn: #fbbf24; --warn-soft: #3a2c0f; --bad: #f87171; --bad-soft: #3b1515; --info: #7aa2ff; --info-soft: #16233f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 24px rgba(0, 0, 0, .28); --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767; --s-other: #6f665c;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0a13; --surface: #14111d; --surface-2: #1c1928; --surface-3: #252134;
  --ink: #f3f1fa; --ink-2: #cdc8dd; --mute: #958faa; --line: #252134; --line-2: #322d45;
  --accent: #8f75ff; --accent-hover: #a28cff; --accent-ink: #0e0822; --accent-soft: #241c47; --accent-2: #f07ab8; --accent-2-soft: #3a1a2e;
  --gold: #f0b44c; --gold-soft: #3a2c12;
  --ok: #4ade80; --ok-soft: #12301f; --warn: #fbbf24; --warn-soft: #3a2c0f; --bad: #f87171; --bad-soft: #3b1515; --info: #7aa2ff; --info-soft: #16233f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 24px rgba(0, 0, 0, .28); --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767; --s-other: #6f665c;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
/* Safari (iPhone) gère mal overflow-x: hidden sur body (le body devient la boîte qui défile) : « clip » coupe sans créer de boîte. */
@supports (overflow: clip) { html, body { overflow-x: clip; } }
a { color: inherit; }
img, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num, .tab { font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
.serif { font-family: var(--serif); }

/* Démarrage */
.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot-mark { width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(from 200deg, var(--gold), var(--accent), var(--accent-2), var(--gold)); animation: spin 1.4s linear infinite; mask: radial-gradient(circle, transparent 52%, #000 54%); -webkit-mask: radial-gradient(circle, transparent 52%, #000 54%); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Structure */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: 18px 12px 24px; border-right: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f3c27a, var(--accent) 55%, #6d2a17); box-shadow: inset 0 -3px 6px rgba(0,0,0,.18); flex: none; }
.brand b { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.nav-group { margin-top: 14px; padding: 0 12px 4px; font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 12px; text-decoration: none; color: var(--ink-2); font-weight: 520; position: relative; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 620; }
.nav-item.on::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--accent); }
.nav-item svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.nav-item .count { margin-left: auto; min-width: 22px; padding: 0 7px; height: 20px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.side-foot { margin-top: auto; padding-top: 16px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--line); }
.search { flex: 1; max-width: 520px; position: relative; }
.search input { width: 100%; height: 40px; padding: 0 14px 0 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.search svg { position: absolute; left: 13px; top: 11px; width: 18px; height: 18px; color: var(--mute); }
.search-results { position: absolute; top: 46px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); max-height: 60vh; overflow: auto; padding: 6px; }
.search-results a { display: flex; gap: 10px; align-items: baseline; padding: 9px 10px; border-radius: 10px; text-decoration: none; }
.search-results a:hover, .search-results a.on { background: var(--surface-2); }
.search-results small { color: var(--mute); }
.top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.content { padding: 22px 28px 120px; max-width: 1240px; width: 100%; margin: 0 auto; animation: viewin .22s ease-out; }
@keyframes viewin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.dock { display: none; }

/* Titres de page */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 20px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--serif); font-weight: 560; font-size: 32px; line-height: 1.1; overflow-wrap: anywhere; }
.page-head p { margin: 6px 0 0; color: var(--mute); max-width: 640px; }
.page-head > .grow { min-width: min(100%, 340px); }
.cap::first-letter { text-transform: uppercase; }
.crumbs { font-size: 13px; color: var(--mute); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.section-title { font-family: var(--serif); font-size: 20px; font-weight: 560; margin: 28px 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-title .btn, .section-title .chip, .section-title small, .section-title a { font-family: var(--sans); }

/* Cartes */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; min-width: 0; }
.card.flat { box-shadow: none; }
.card.pad-0 { padding: 0; overflow: hidden; }
.card-title { font-weight: 650; margin: 0 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; }
.card-title small { font-weight: 500; color: var(--mute); }
.card.link { text-decoration: none; display: block; transition: transform .15s, box-shadow .15s; }
.card.link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.sm { gap: 6px; }
.grow { flex: 1; min-width: 0; }
.mute { color: var(--mute); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.bold { font-weight: 650; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.divider { height: 1px; background: var(--line); margin: 14px 0; border: 0; }
.pre { white-space: pre-wrap; }

/* Statistiques */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.stat .label { font-size: 13px; color: var(--mute); font-weight: 550; }
.stat .value { font-family: var(--sans); font-size: 28px; font-weight: 650; line-height: 1.15; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .delta { font-size: 13px; font-weight: 600; margin-top: 2px; }
.up { color: var(--ok); } .down { color: var(--bad); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .08s, background .15s, box-shadow .15s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.dark { background: var(--ink); color: var(--bg); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 32px; padding: 0 11px; border-radius: 10px; font-size: 13.5px; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 16px; border-radius: 14px; }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.sm svg { width: 16px; height: 16px; }
.btn.block { width: 100%; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }

/* Pastilles et étiquettes */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.chip.ok { background: var(--ok-soft); color: var(--ok); } .chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); } .chip.accent { background: var(--accent-soft); color: var(--accent); } .chip.gold { background: var(--gold-soft); color: var(--warn); }
.chip.out { background: transparent; border-color: var(--line-2); }
button.chip { cursor: pointer; }
button.chip.on { background: var(--ink); color: var(--bg); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.pf { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.pf i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Formulaires */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 620; color: var(--ink-2); }
.field > small { color: var(--mute); font-size: 12.5px; }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), .field textarea, .field select, select.input, textarea.input {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.field textarea, textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 8px 0; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check b { display: block; font-weight: 620; }
.check small { color: var(--mute); }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; height: 32px; padding: 0 12px; border-radius: 9px; font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--ink-2); }
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.counter { font-size: 12px; color: var(--mute); text-align: right; }
.counter.over { color: var(--bad); font-weight: 700; }

/* Listes */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); text-decoration: none; min-width: 0; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover, button.list-item:hover { background: var(--surface-2); }
button.list-item { border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; width: 100%; }
.list-item .title { font-weight: 620; }
.list-item .sub { color: var(--mute); font-size: 13px; }
.when { min-width: 54px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.when small { display: block; font-weight: 500; color: var(--mute); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }

/* Vide */
.empty { text-align: center; padding: 36px 20px; color: var(--mute); }
.empty .art { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 20px; background: var(--surface-2); display: grid; place-items: center; color: var(--accent); }
.empty .art svg { width: 30px; height: 30px; }
.empty h3 { color: var(--ink); font-family: var(--serif); font-weight: 560; font-size: 19px; margin-bottom: 4px; }
.empty p { margin: 0 auto 14px; max-width: 420px; }

/* Bandeau d'aide / alertes */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 14px; background: var(--info-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--info) 22%, transparent); }
.notice.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.notice.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.notice.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.notice p { margin: 2px 0 0; }

/* Onglets */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--mute); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabs .on { color: var(--ink); border-bottom-color: var(--accent); }

/* Fenêtres */
.overlay { position: fixed; inset: 0; background: rgba(20, 14, 9, .45); z-index: 80; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100dvh - 40px); overflow: auto; animation: pop .18s ease-out; }
.modal.wide { width: min(900px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px 6px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-head h2 { font-family: var(--serif); font-weight: 560; font-size: 22px; }
.modal-body { padding: 10px 20px 20px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface); flex-wrap: wrap; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* Notifications */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--bg); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: flex-start; animation: pop .2s ease-out; cursor: pointer; }
.toast b { display: block; }
.toast p { margin: 2px 0 0; opacity: .82; font-size: 13.5px; white-space: pre-line; }
.toast .dot { margin-top: 7px; }
.toast.success .dot { color: #6cc08d; } .toast.error .dot { color: #f0857c; } .toast.info .dot { color: #e6b25c; }

/* Progression */
.bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--accent)); border-radius: 4px; transition: width .4s; }
.bar.indeterminate > i { width: 40% !important; animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* Médias */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.media-tile { position: relative; border-radius: 14px; overflow: hidden; background: var(--surface-2); text-decoration: none; border: 1px solid var(--line); display: flex; flex-direction: column; cursor: pointer; }
.media-tile .thumb { aspect-ratio: 4/5; background: var(--surface-3) center/cover no-repeat; position: relative; }
.media-tile .thumb .badge { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.media-tile .thumb .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.66); color: #fff; font-size: 12px; font-weight: 650; padding: 2px 7px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.media-tile .meta { padding: 9px 11px 11px; }
.media-tile .meta b { display: block; font-size: 13.5px; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-tile.sel { outline: 3px solid var(--accent); outline-offset: -3px; }
.media-tile .pick { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.9); border: 2px solid #fff; display: grid; place-items: center; color: var(--accent); font-weight: 800; }
.thumb-icon { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mute); }
.thumb-icon svg { width: 34px; height: 34px; }
.player { width: 100%; border-radius: 14px; background: #000; max-height: 70vh; }
.dropzone { border: 2px dashed var(--line-2); border-radius: var(--r); padding: 26px; text-align: center; background: var(--surface); transition: border-color .15s, background .15s; cursor: pointer; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }

/* Tableau Kanban */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.col { background: var(--surface-2); border-radius: var(--r); padding: 10px; min-height: 120px; display: flex; flex-direction: column; gap: 8px; }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 6px; font-weight: 650; font-size: 13.5px; }
.col-head small { color: var(--mute); font-weight: 600; }
.ticket { background: var(--surface); border-radius: 12px; padding: 11px 12px; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.04); text-decoration: none; display: block; cursor: pointer; }
.ticket:hover { border-color: var(--line-2); }
.ticket b { display: block; font-weight: 620; font-size: 14px; }

/* Calendrier */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cal-h { background: var(--surface-2); padding: 8px; font-size: 12px; font-weight: 650; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; }
.cal-d { background: var(--surface); min-height: 112px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-d.other { background: var(--surface-2); color: var(--mute); }
.cal-d.today .n { background: var(--accent); color: var(--accent-ink); }
.cal-d .n { font-size: 12.5px; font-weight: 700; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.cal-e { font-size: 12px; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; display: block; border-left: 3px solid var(--mute); }
.cal-e.post { border-left-color: var(--accent); } .cal-e.shoot, .cal-e.tournage { border-left-color: var(--gold); } .cal-e.deal { border-left-color: var(--accent-2); } .cal-e.task { border-left-color: var(--info); } .cal-e.invoice, .cal-e.subscription { border-left-color: var(--warn); } .cal-e.externe { border-left-color: var(--line-2); }

/* Copilote */
.chat { display: grid; grid-template-columns: 260px 1fr; gap: 18px; height: calc(100dvh - var(--top) - 70px); }
.chat-side { overflow: auto; }
.chat-main { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.chat-log { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 760px; line-height: 1.6; }
.msg.user { align-self: flex-end; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 18px 18px 4px 18px; max-width: 82%; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; }
.msg.assistant p { margin: 0 0 10px; }
.msg.assistant ul, .msg.assistant ol { margin: 0 0 10px; padding-left: 22px; }
.msg.assistant h3, .msg.assistant h4 { font-family: var(--serif); font-weight: 560; margin: 12px 0 6px; }
.msg .tools { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.msg a { color: var(--accent); font-weight: 600; }
.chat-input { border-top: 1px solid var(--line); padding: 12px; display: flex; gap: 10px; align-items: flex-end; }
.chat-input textarea { flex: 1; resize: none; min-height: 46px; max-height: 180px; border-radius: 14px; border: 1px solid var(--line-2); padding: 12px 14px; background: var(--bg); }
.chat-input textarea:focus { outline: none; border-color: var(--accent); }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; }
.suggest button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 550; font-size: 13.5px; }
.suggest button:hover { background: var(--surface-2); }
.action-card { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 14px; padding: 12px 14px; }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--mute); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* Bouton copilote flottant */
.fab { position: fixed; right: 22px; bottom: 22px; z-index: 30; height: 52px; padding: 0 18px 0 14px; border-radius: 26px; border: 0; background: var(--ink); color: var(--bg); font-weight: 650; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); cursor: pointer; }
.fab .brand-mark { width: 26px; height: 26px; }

/* Étapes */
.steps { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--mute); font-size: 13px; font-weight: 600; }
.steps .bar { flex: 1; max-width: 220px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.choice { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .12s, box-shadow .15s; box-shadow: var(--shadow); }
.choice:hover { border-color: var(--accent); transform: translateY(-2px); }
.choice.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.choice b { font-weight: 650; font-size: 15px; }
.choice small { color: var(--mute); }
.choice .ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.choice .ico svg { width: 20px; height: 20px; }

/* Accueil */
.hero { background: radial-gradient(120% 140% at 0% 0%, #f4cf9f 0%, #e79a6d 35%, #c4532d 70%, #6b2a17 100%); color: #fff; border-radius: var(--r-lg); padding: 24px 26px; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255,240,210,.55), transparent 65%); }
.hero h1 { font-family: var(--serif); font-weight: 560; font-size: 34px; line-height: 1.1; position: relative; z-index: 1; }
.hero p { margin: 8px 0 0; opacity: .92; max-width: 560px; position: relative; z-index: 1; }
.hero .row { position: relative; z-index: 1; margin-top: 16px; }
.hero .btn { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); color: #fff; backdrop-filter: blur(6px); }
.hero .btn:hover { background: rgba(255,255,255,.28); }
.setup-step { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.setup-step:last-child { border-bottom: 0; }
.setup-step .tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; }
.setup-step.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.setup-step.done .t { color: var(--mute); text-decoration: line-through; }

/* Graphiques */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--mute); font-size: 11px; font-family: var(--sans); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.chart-tip { position: absolute; top: 4px; transform: translateX(-10%); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 7px 10px; pointer-events: none; min-width: 120px; z-index: 3; }
.chart-tip .key { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.heat { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 10.5px; color: var(--mute); }
.heat div { aspect-ratio: 1; border-radius: 3px; background: var(--surface-2); }

/* Tableau */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 650; color: var(--mute); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
.table .r { text-align: right; }
.table-wrap { overflow-x: auto; }

/* Markdown */
.md p { margin: 0 0 10px; } .md h2, .md h3 { font-family: var(--serif); font-weight: 560; margin: 16px 0 6px; } .md ul { margin: 0 0 10px; padding-left: 20px; } .md code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }

/* Transcription */
.transcript { max-height: 420px; overflow: auto; line-height: 1.9; padding: 4px 2px; }
.transcript span { cursor: pointer; border-radius: 4px; padding: 1px 1px; }
.transcript span:hover { background: var(--gold-soft); }
.transcript span.now { background: var(--accent-soft); color: var(--accent); }
.transcript .pause { color: var(--mute); font-size: 12px; }
.clip-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.clip-row:last-child { border-bottom: 0; }
.score { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-variant-numeric: tabular-nums; background: conic-gradient(var(--accent) calc(var(--s) * 1%), var(--surface-3) 0); position: relative; }
.score::after { content: attr(data-v); position: absolute; inset: 4px; background: var(--surface); border-radius: 50%; display: grid; place-items: center; font-size: 13px; }

/* Liste + détail */
.split { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } .split.has-sel > :first-child { display: none; } .split:not(.has-sel) > :last-child { display: none; } }

/* Petits écrans */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat { grid-template-columns: 1fr; }
  .chat-side { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .side.open { display: flex; position: fixed; inset: 0; z-index: 90; width: 100%; height: 100dvh; padding-top: max(18px, env(safe-area-inset-top)); }
  .topbar { padding: 0 16px; padding-top: env(safe-area-inset-top); height: calc(var(--top) + env(safe-area-inset-top)); }
  .content { padding: 14px 16px calc(110px + env(safe-area-inset-bottom)); }
  .page-head h1 { font-size: 27px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .span2 { grid-column: auto; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .dock { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .dock a, .dock button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 8px; font-size: 11px; font-weight: 600; color: var(--mute); text-decoration: none; border: 0; background: none; position: relative; }
  .dock .on { color: var(--accent); }
  .dock svg { width: 23px; height: 23px; }
  .dock .plus { width: 46px; height: 46px; border-radius: 16px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin-top: -4px; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 40%, transparent); }
  .dock .badge { position: absolute; top: 4px; left: 55%; min-width: 18px; height: 18px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; display: grid; place-items: center; padding: 0 5px; }
  .fab { display: none; }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); right: 16px; }
  .chat { height: calc(100dvh - var(--top) - 150px - env(safe-area-inset-bottom)); }
  .chat-log { padding: 14px; }
  .modal { border-radius: 22px 22px 0 0; width: 100%; max-height: 92dvh; align-self: end; }
  .overlay { padding: 0; place-items: end center; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero h1 { font-size: 28px; }
  .clip-row { grid-template-columns: 1fr; }
  .board { grid-auto-columns: 82%; }
  .cal-d { min-height: 64px; }
  .cal-e { font-size: 0; height: 6px; padding: 0; border-left-width: 0; }
  .hide-m { display: none !important; }
}
@media (min-width: 861px) { .show-m { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ===================== Design v2 — éditorial « heure dorée » ===================== */
:root { --ease: cubic-bezier(.2, .8, .2, 1); --aurora-1: #b9a5ff; --aurora-2: #7c5cff; --aurora-3: #4a2bd4; --aurora-4: #1d0f4a; --aurora-5: #e0479e; }
:root { --glass: color-mix(in srgb, var(--surface) 72%, transparent); }

/* Grain argentique (texture discrète sur les surfaces « photo »). */
.grain { position: relative; isolation: isolate; }
.grain::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .14; mix-blend-mode: overlay; border-radius: inherit;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.grain > * { position: relative; z-index: 1; }

/* Aurore : dégradé vivant, lent, apaisé. */
.aurora { background: radial-gradient(60% 80% at 15% 20%, var(--aurora-1) 0%, transparent 60%), radial-gradient(55% 75% at 85% 15%, var(--aurora-2) 0%, transparent 62%),
  radial-gradient(70% 90% at 70% 100%, var(--aurora-4) 0%, transparent 60%), radial-gradient(60% 70% at 20% 100%, var(--aurora-5) 0%, transparent 65%), var(--aurora-3);
  background-size: 140% 140%; animation: aurora 18s ease-in-out infinite alternate; color: #fff; }
@keyframes aurora { 0% { background-position: 0% 0%; } 50% { background-position: 60% 40%; } 100% { background-position: 100% 100%; } }

/* Titres : accent italique. */
.page-head h1 em, .hero h1 em, .display em { font-style: italic; font-weight: 420; color: var(--accent); }
.hero h1 em { color: #fff6e8; }
.display { font-family: var(--serif); font-weight: 520; letter-spacing: -.025em; line-height: 1.02; }

/* Apparition en cascade. */
.stagger > * { animation: rise .5s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .04s; } .stagger > *:nth-child(3) { animation-delay: .08s; } .stagger > *:nth-child(4) { animation-delay: .12s; }
.stagger > *:nth-child(5) { animation-delay: .16s; } .stagger > *:nth-child(6) { animation-delay: .2s; } .stagger > *:nth-child(n+7) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Cartes : relief plus doux, bord lumineux au survol. */
.card { border-radius: var(--r); transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s; }
.card.link:hover, .lift:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px rgba(60, 30, 10, .35); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.card-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }

/* Squelettes de chargement. */
.skel { border-radius: 12px; background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 40%, var(--surface-2) 80%); background-size: 300% 100%; animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Accueil v2 */
.hero2 { border-radius: 28px; padding: 26px 28px; min-height: 230px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; box-shadow: 0 30px 60px -30px rgba(90, 40, 15, .55); overflow: hidden; }
.hero2 h1 { font-size: 46px; margin-top: 4px; }
.hero2 .sub { opacity: .92; font-size: 16px; max-width: 560px; margin-top: 8px; }
.hero2 .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.hero2 .chip { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(8px); height: 30px; font-size: 13px; }
.hero2 .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.hero2 .actions .btn { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .32); color: #fff; backdrop-filter: blur(8px); }
.hero2 .actions .btn.light { background: #fff; color: #3b1d12; border-color: transparent; }
.hero2 .actions .btn:hover { background: rgba(255, 255, 255, .26); }
.hero2 .actions .btn.light:hover { background: #fff6ec; }
.glass-card { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .26); border-radius: 20px; padding: 16px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #fff; }
.glass-card .card-kicker { color: rgba(255, 255, 255, .78); }
.timeline { position: relative; display: flex; flex-direction: column; gap: 2px; }
.timeline .tl { display: grid; grid-template-columns: 56px 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 6px; border-radius: 12px; text-decoration: none; }
.timeline .tl:hover { background: var(--surface-2); }
.timeline .tl .t { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.timeline .tl .ic { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; color: #fff; }
.timeline .tl .ic svg { width: 14px; height: 14px; }
.timeline .tl.now { background: var(--accent-soft); }
.timeline .day { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); padding: 10px 6px 4px; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 148px; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.strip > * { scroll-snap-align: start; }
.kpi, .card.link.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .v { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi svg.spark { width: 100%; height: 38px; margin-top: 6px; }
.progress-ring { --p: 0; width: 52px; height: 52px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0); display: grid; place-items: center; flex: none; }
.progress-ring::before { content: attr(data-v); width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.next-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.next-step { border: 1px dashed var(--line-2); border-radius: 14px; padding: 12px 14px; text-decoration: none; display: flex; gap: 10px; align-items: flex-start; transition: border-color .2s, background .2s; }
.next-step:hover { border-color: var(--accent); background: var(--accent-soft); }
.next-step .n { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }

/* Tuiles médias façon galerie : titre sur l'image, aperçu vidéo au survol. */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.tile { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface-3); text-decoration: none; color: #fff; display: block; box-shadow: var(--shadow); transform: translateZ(0); }
.tile img, .tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .3s; }
.tile:hover img { transform: scale(1.05); }
.tile video { opacity: 0; }
.tile.playing video { opacity: 1; }
.tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.72) 100%); pointer-events: none; }
.tile .cap { position: absolute; left: 12px; right: 12px; bottom: 11px; z-index: 2; }
.tile .cap b { display: block; font-weight: 650; font-size: 14px; line-height: 1.25; text-shadow: 0 1px 8px rgba(0,0,0,.4); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .cap small { opacity: .8; font-size: 12px; }
.tile .tl-badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 5px; z-index: 2; flex-wrap: wrap; }
.tile .tl-badges .chip { height: 22px; font-size: 11.5px; background: rgba(0,0,0,.5); color: #fff; backdrop-filter: blur(6px); }
.tile .tl-badges .chip.accent { background: var(--accent); color: #fff; }
.tile .dur2 { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; backdrop-filter: blur(6px); }
.tile .icon-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mute); }
.tile .sel-dot { position: absolute; top: 10px; right: 10px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); display: grid; place-items: center; color: #fff; font-weight: 800; }
.tile.selected { outline: 3px solid var(--accent); outline-offset: 2px; }
.tile.selected .sel-dot { background: var(--accent); border-color: var(--accent); }
.bulkbar { position: sticky; bottom: 16px; z-index: 25; margin: 16px auto 0; width: fit-content; max-width: 100%; display: flex; gap: 8px; align-items: center; padding: 8px 10px 8px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); flex-wrap: wrap; }
.bulkbar .btn { height: 34px; border-radius: 999px; }

/* Centre de notifications. */
.bell { position: relative; }
.bell .dotc { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }
.panel { position: absolute; right: 0; top: 48px; width: min(400px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 50; animation: pop .18s var(--ease); }
.panel .nt { display: flex; gap: 10px; padding: 10px; border-radius: 12px; text-decoration: none; }
.panel .nt:hover { background: var(--surface-2); }
.panel .nt.unread { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.panel .nt .dot { margin-top: 6px; }

/* Palette de commandes. */
.palette { width: min(640px, 100%); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .18s var(--ease); align-self: start; margin-top: 10vh; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 18px 20px; font-size: 17px; background: transparent; outline: none; }
.palette .items { max-height: 56vh; overflow: auto; padding: 6px; }
.palette .it { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.palette .it.on, .palette .it:hover { background: var(--surface-2); }
.palette .it .ico { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.palette .it .ico svg { width: 16px; height: 16px; }
.palette .grp { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding: 10px 12px 4px; }
.kbd { font: 600 11px var(--sans); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--mute); }

/* Statistiques : petits multiples par plateforme. */
.pfcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.pfcard { position: relative; overflow: hidden; }
.pfcard .bar-top { position: absolute; left: 0; top: 0; right: 0; height: 3px; }

/* Barre latérale : carte utilisateur. */
.usercard { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-top: 10px; }
.brand-mark { position: relative; overflow: hidden; }
.brand-mark::after { content: ''; position: absolute; inset: -40%; background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%); transform: translateX(-100%); animation: sheen 6s ease-in-out infinite; }
@keyframes sheen { 0%, 70% { transform: translateX(-100%); } 85%, 100% { transform: translateX(100%); } }

@media (max-width: 860px) {
  .hero2 { grid-template-columns: 1fr; padding: 22px 18px; border-radius: 24px; }
  .hero2 h1 { font-size: 36px; }
  .next-steps { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .panel { position: fixed; right: 12px; top: calc(var(--top) + env(safe-area-inset-top)); }
}
@media (prefers-reduced-motion: reduce) { .aurora { animation: none; } .brand-mark::after { animation: none; } }

.hero2 h1 em { color: #fff3df; }
.search .input { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.kpi > * { max-width: 100%; min-width: 0; }
@media (max-width: 860px) { .timeline .tl { grid-template-columns: 48px 22px minmax(0, 1fr); } .timeline .tl > :last-child { display: none; } }
.kpi .ellipsis, .kpi .clamp2 { display: block; }

.cal-post { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px; border-radius: 8px; background: var(--accent-soft); text-decoration: none; min-width: 0; }
.cal-post img, .cal-post .ph { width: 22px; height: 30px; border-radius: 5px; object-fit: cover; flex: none; background: var(--surface-3); }
.cal-post b { font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .cal-post { padding: 1px; } .cal-post span { display: none; } .cal-post img, .cal-post .ph { width: 100%; height: 26px; } }
.segmented { flex: none; }

/* ===== v2.1 : juridique, signatures, registres ===== */
.sigpad { position: relative; border-radius: var(--r); background: #fffef9; border: 1px dashed var(--line-2); overflow: hidden; touch-action: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
.sigpad canvas { display: block; width: 100%; cursor: crosshair; touch-action: none; }
.sigpad-line { position: absolute; left: 34px; right: 18px; bottom: 34px; border-bottom: 1px solid #d9cfc2; pointer-events: none; }
.sigpad-x { position: absolute; left: 14px; bottom: 30px; font-size: 13px; color: #b0a495; pointer-events: none; }
.sigpad-clear { position: absolute; top: 6px; right: 6px; color: #6d6359 !important; }
.qrshare { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.qrshare .qr { width: 156px; height: 156px; flex: none; padding: 10px; border-radius: var(--r); background: #fff; box-shadow: var(--shadow); }
.qrshare .qr svg { width: 100%; height: 100%; display: block; }
.linkbox { font: 12.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); word-break: break-all; color: var(--ink-2); }
.paper { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; font: 13.5px/1.65 var(--sans); white-space: pre-wrap; max-height: 52vh; overflow: auto; color: var(--ink-2); }
.paper::first-line { font-weight: 700; letter-spacing: .04em; color: var(--ink); }
.reg-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-align: left; width: 100%; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.reg-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.reg-card .reg-seal { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.reg-card .reg-seal.ok { background: var(--ok-soft); color: var(--ok); }
.reg-card .reg-seal.warn { background: var(--warn-soft); color: var(--warn); }
.reg-card .reg-seal.bad { background: var(--bad-soft); color: var(--bad); }
.reg-card .reg-seal.accent { background: var(--accent-soft); color: var(--accent); }
.reg-card b { display: block; }
.reg-card .sub { font-size: 13px; color: var(--mute); margin-top: 2px; }
.reg-card .reg-side { text-align: right; display: grid; gap: 4px; justify-items: end; }
.reg-list { display: grid; gap: 10px; }
@media (max-width: 640px) { .reg-card { grid-template-columns: auto minmax(0, 1fr); } .reg-card .reg-side { grid-column: 1 / -1; justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; align-items: center; } }
.meter { display: grid; gap: 6px; }
.meter .track { position: relative; height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter .track i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--accent); }
.meter .track i.gift { background: var(--gold); }
.meter .track b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .55; }
.hero-band { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: center; padding: 22px 24px; border-radius: var(--r-lg); background: radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 60%), var(--surface); border: 1px solid var(--line); margin-bottom: 18px; }
.hero-band h2 { font: 600 22px/1.25 var(--serif); }
.hero-band h2 em { color: var(--accent); }
.hero-band p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }
@media (max-width: 760px) { .hero-band { grid-template-columns: 1fr; padding: 18px; } }
.steps-inline { display: grid; gap: 10px; counter-reset: st; }
.steps-inline > div { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; font-size: 14px; }
.steps-inline > div::before { counter-increment: st; content: counter(st); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13px; }
.due { font-size: 12.5px; font-weight: 600; }
.due.bad { color: var(--bad); } .due.warn { color: var(--warn); } .due.ok { color: var(--ok); }
.seal-sm { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink-2); }
.seal-sm svg { width: 18px; height: 18px; }
.seal-sm.ok { background: var(--ok-soft); color: var(--ok); } .seal-sm.warn { background: var(--warn-soft); color: var(--warn); } .seal-sm.bad { background: var(--bad-soft); color: var(--bad); }
textarea.paper { resize: vertical; min-height: 380px; }
.carousel-row { display: flex; gap: 10px; align-items: center; overflow-x: auto; padding: 12px 2px 2px; margin-top: 12px; border-top: 1px solid var(--line); scrollbar-width: thin; }
.car-item { position: relative; width: 64px; height: 88px; flex: none; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.car-item img { width: 100%; height: 100%; object-fit: cover; }
.car-tools { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; background: linear-gradient(transparent, rgba(0,0,0,.65)); opacity: 0; transition: opacity .15s; }
.car-item:hover .car-tools, .car-item:focus-within .car-tools { opacity: 1; }
@media (hover: none) { .car-tools { opacity: 1; } }
.car-tools button { border: 0; background: none; color: #fff; padding: 4px 6px; cursor: pointer; font-size: 13px; }
.car-add { width: 64px; height: 88px; flex: none; border-radius: 10px; border: 1.5px dashed var(--line-2); background: none; display: grid; place-items: center; align-content: center; gap: 2px; color: var(--mute); cursor: pointer; font-size: 11.5px; }
.car-add:hover { border-color: var(--accent); color: var(--accent); }
.chip.bad { border-color: var(--bad); color: var(--bad); }
.cal-date { width: 42px; flex: none; display: grid; justify-items: center; line-height: 1.05; padding: 5px 0; border-radius: 10px; background: var(--surface-2); }
.cal-date b { font: 600 17px/1 var(--serif); }
.cal-date small { font-size: 10.5px; color: var(--mute); text-transform: uppercase; letter-spacing: .04em; }
.phone-frame { border-radius: 30px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; }
.phone-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.phone-head .brand-mark { width: 26px; height: 26px; }
.phone-head .tiny { margin-left: auto; }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.ig-cell { position: relative; aspect-ratio: 3 / 4; background: var(--surface-2); overflow: hidden; display: block; }
.ig-cell img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.ig-cell:hover img { transform: scale(1.04); }
.ig-cell.next::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px var(--accent); pointer-events: none; }
.ig-badge { position: absolute; left: 6px; top: 6px; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); }
.ig-views { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 600; color: #fff; display: inline-flex; align-items: center; gap: 3px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
@media (max-width: 760px) { .grid[style*="minmax(0,420px)"] { grid-template-columns: 1fr !important; } }
.blur-stage { position: relative; margin: 0 auto; border-radius: 14px; overflow: hidden; background: #000; cursor: crosshair; touch-action: none; user-select: none; }
.blur-stage video { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.blur-zone { position: absolute; border: 2px solid #fff; border-radius: 6px; background: rgba(255,255,255,.18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 0 0 1px rgba(0,0,0,.4); pointer-events: none; }
.blur-zone.drawing { border-style: dashed; background: rgba(196,83,45,.25); }
.card.flat { box-shadow: none; }
/* Voyages */
.trip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.trip-card { position: relative; display: grid; gap: 4px; padding: 18px; min-height: 150px; border-radius: var(--r-lg); color: #fff; text-decoration: none; overflow: hidden;
  background: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.18), transparent 50%), linear-gradient(135deg, var(--accent-2), #1d3a41 70%); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.trip-card:nth-child(3n+2) { background: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.18), transparent 50%), linear-gradient(135deg, var(--accent), #6e2a14 75%); }
.trip-card:nth-child(3n+3) { background: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.2), transparent 50%), linear-gradient(135deg, #b98222, #5b3c0c 75%); }
.trip-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.trip-card b { font: 600 21px/1.2 var(--serif); margin-top: auto; }
.trip-top { display: flex; justify-content: space-between; align-items: center; opacity: .92; }
.trip-count { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,.2); backdrop-filter: blur(6px); }
.trip-grid.past .trip-card { filter: saturate(.55); opacity: .85; }
.wx-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.wx-day { flex: none; min-width: 92px; display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.wx-day b { font: 600 22px/1.1 var(--serif); }
/* Inspirations */
.mood { columns: 4 230px; column-gap: 14px; }
.mood-card { break-inside: avoid; display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; text-align: left; cursor: pointer; transition: transform .15s, box-shadow .15s; color: inherit; }
.mood-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mood-card img { width: 100%; display: block; max-height: 380px; object-fit: cover; background: var(--surface-2); }
.mood-ph { height: 120px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); }
.mood-body { display: grid; gap: 6px; padding: 12px 14px; justify-items: start; }
.mood-body b { font-size: 14px; line-height: 1.35; }
/* Modèles, objectifs */
.snip { text-align: left; display: grid; gap: 8px; cursor: pointer; border: 1px solid var(--line); color: inherit; font: inherit; }
.snip:hover { border-color: var(--line-2); }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.goal { display: grid; gap: 6px; text-align: left; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; font: inherit; cursor: pointer; width: 100%; }
.goal:last-child { border-bottom: 0; }
/* Prompteur */
.prompter { position: relative; height: min(72vh, 760px); border-radius: var(--r-lg); background: #0d0b09; overflow: hidden; box-shadow: var(--shadow-lg); }
.prompter-cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; transform: scaleX(-1); }
.prompter-text { position: absolute; inset: 0; overflow-y: auto; padding: 0 8%; color: #f6efe6; font-family: var(--sans); font-weight: 600; line-height: 1.45; white-space: pre-wrap; scrollbar-width: none; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.prompter-text::-webkit-scrollbar { display: none; }
.prompter-text.mirror { transform: scaleX(-1); }
.prompter-pad { height: 42%; }
.prompter-empty { height: 100%; display: grid; place-items: center; text-align: center; color: #9b8f82; font-size: 20px; }
.prompter-line { position: absolute; left: 0; right: 0; top: 42%; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .7; pointer-events: none; }
.prompter-rec { position: absolute; top: 14px; right: 16px; color: #ff4d4d; font-weight: 800; font-size: 13px; letter-spacing: .08em; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
@media (max-width: 900px) { .grid[style*="minmax(0,1fr) 300px"] { grid-template-columns: 1fr !important; } }
.thumb-result img { width: 100%; border-radius: 12px; box-shadow: var(--shadow); }

.reg-card > span { min-width: 0; }
.reg-card .sub { overflow-wrap: anywhere; }
.segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.segmented::-webkit-scrollbar { display: none; }
.segmented > button { flex: none; }
.reg-card .sub { display: block; } .reg-card .ellipsis { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
input[type=range], input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
/* Réglages par réseau */
.pf-settings { border-top: 1px solid var(--line); padding-top: 8px; }
.pf-settings-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; padding: 2px 0 8px; }
.music-list { display: grid; gap: 6px; max-height: 320px; overflow: auto; padding: 4px; border-radius: 12px; background: var(--surface-2); }
.music-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--surface); }
.music-row img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex: none; }
.queue-grid td, .queue-grid th { text-align: center; padding: 6px 4px; }
.queue-grid .slot { width: 30px; height: 26px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; }
.queue-grid .slot.on { background: var(--accent); border-color: var(--accent); box-shadow: 0 2px 8px rgba(196,83,45,.35); }

/* ---------- Montage étudié ---------- */
.h3 { font-size: 20px; font-weight: 560; }
.step-dots { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 16px; flex-wrap: wrap; }
.step-dots button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--mute); border-radius: 999px; padding: 6px 14px 6px 6px; font: inherit; font-size: 13.5px; cursor: pointer; }
.step-dots button:disabled { cursor: default; opacity: .6; }
.step-dots b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 12px; }
.step-dots .on button { border-color: var(--accent); color: var(--ink); }
.step-dots .on b, .step-dots .done b { background: var(--accent); color: #fff; }
.opt-group { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.opt-title { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; }
.opt-title b, .brief-item h4 b { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 12px; flex: none; }
.cap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(148px, 100%), 1fr)); gap: 10px; }
.cap-tile { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; aspect-ratio: 5 / 4; display: flex; flex-direction: column; justify-content: space-between; align-items: stretch; padding: 10px; color: #fff; text-align: center; font: inherit;
  background: radial-gradient(120% 90% at 30% 10%, #8a6a4f 0%, #4a3a30 45%, #1c1714 100%); transition: transform .12s, box-shadow .15s; }
.cap-tile:hover { transform: translateY(-2px); }
.cap-tile.on { box-shadow: 0 0 0 3px var(--accent); border-color: var(--accent); }
.cap-tile .cap-sample { margin: auto 0; line-height: 1.15; overflow-wrap: anywhere; }
.cap-tile small { font-size: 11.5px; opacity: .9; text-align: left; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.cap-none { background: var(--surface-2); color: var(--ink); }
.cap-none small { text-shadow: none; }
.stage-line { list-style: none; display: flex; padding: 0; margin: 0 0 16px; gap: 4px; }
.stage-line li { flex: 1; text-align: center; font-size: 12.5px; color: var(--mute); padding-top: 9px; border-top: 3px solid var(--line); min-width: 0; }
.stage-line li.done { border-color: var(--accent); color: var(--ink); }
.stage-line li.on { border-color: var(--gold, #c99a2e); color: var(--ink); font-weight: 600; }
.out-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.out-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.out-card video { width: 100%; aspect-ratio: 9 / 16; max-height: 420px; object-fit: contain; background: #000; border-radius: 10px; }
.edl-bar { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; }
.edl-bar i, .lg-sq { background: var(--accent); }
.edl-bar i.illustration, .lg-sq.illustration { background: var(--gold, #c99a2e); }
.lg-sq { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.caption-box { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.pre { white-space: pre-wrap; }
.brief { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 12px; align-items: start; }
.brief-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.brief-item h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 14.5px; font-weight: 650; }
.brief-list { margin: 0; padding-left: 18px; font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; }
.hook3 { display: grid; gap: 8px; font-size: 13.5px; }
.hook3 > div { display: flex; flex-direction: column; gap: 2px; }
.score-bars { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.score-bars span { font-size: 11.5px; color: var(--mute); display: inline-flex; align-items: center; gap: 4px; }
.score-bars i { display: inline-block; width: 34px; height: 5px; border-radius: 3px; background: var(--surface-2); position: relative; overflow: hidden; }
.score-bars i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--v); background: var(--accent); }
.thumb-mini { width: 54px; height: 54px; border-radius: 10px; background: var(--surface-2) center / cover no-repeat; flex: none; }

/* ===================== Design v3 — violet pro ===================== */
/* Titres : Inter serré, graisse marquée ; l'accent des titres devient un dégradé violet → rose. */
.page-head h1, .hero h1, .hero2 h1, .display { font-family: var(--sans); font-weight: 720; letter-spacing: -.032em; font-style: normal; }
.page-head h1 { font-size: 30px; line-height: 1.12; }
.section-title { font-family: var(--sans); font-weight: 680; font-size: 18px; letter-spacing: -.015em; }
.modal-head h2, .empty h3, .md h2, .md h3, .msg.assistant h3, .msg.assistant h4, .serif, .h3 { font-family: var(--sans); font-weight: 680; letter-spacing: -.02em; }
.page-head h1 em, .display em, .section-title em {
  font-style: normal; font-weight: inherit; color: var(--accent);
  background: linear-gradient(92deg, var(--accent) 10%, var(--accent-2) 95%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero h1 em, .hero2 h1 em, .auth-art .display em { background: none; -webkit-text-fill-color: currentColor; color: #e6ddff; }
.card-kicker, .nav-group { letter-spacing: .07em; }

/* Marque. */
.brand b { font-family: var(--sans); font-size: 19px; font-weight: 760; letter-spacing: -.03em; }
.brand-mark { background: radial-gradient(circle at 34% 28%, #d9ccff 0%, #8a6bff 38%, #5b34ec 64%, #2a1179 100%); box-shadow: inset 0 -3px 6px rgba(20, 6, 70, .35), 0 4px 12px -4px rgba(91, 52, 236, .55); }
.boot-mark { background: conic-gradient(from 200deg, var(--accent-2), var(--accent), #2a1179, var(--accent-2)); }

/* Barre latérale : surface claire, entrée active en pastille violette. */
.side { background: var(--surface); }
.nav-item { border-radius: 10px; padding: 8px 11px; font-weight: 540; }
.nav-item:hover { background: var(--surface-2); }
.nav-item.on { background: var(--accent-soft); color: var(--accent); box-shadow: none; font-weight: 640; }
.nav-item.on::before { display: none; }
.nav-item.on svg { opacity: 1; }
.usercard { background: var(--surface-2); border-color: transparent; }

/* Barre du haut. */
.topbar { background: color-mix(in srgb, var(--bg) 82%, transparent); }
.search input { border-radius: 10px; background: var(--surface); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Cartes : bord net, ombre légère, survol discret. */
.card, .stat, .choice, .brief-item, .media-tile, .tile { border-radius: var(--r); }
.card.link:hover, .lift:hover { box-shadow: 0 14px 34px -16px rgba(40, 20, 120, .28); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.stat .value { font-weight: 720; letter-spacing: -.03em; }

/* Boutons. */
.btn { height: 38px; border-radius: 10px; font-weight: 600; letter-spacing: -.005em; transition: background .15s, box-shadow .15s, border-color .15s, transform .08s; }
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff) 0%, var(--accent) 100%); border-color: color-mix(in srgb, var(--accent) 80%, #000);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.dark { background: var(--ink); color: var(--bg); }
.btn.sm { height: 32px; border-radius: 8px; }
.btn.lg { height: 46px; border-radius: 12px; }

/* Champs. */
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), .field textarea, .field select, select.input, textarea.input { border-radius: 10px; }
.segmented { border-radius: 10px; }
.segmented button { border-radius: 8px; }
.segmented button.on { color: var(--accent); }

/* Puces : état « choisi » en violet. */
.chip { border-radius: 999px; }
button.chip.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
button.chip:not(.on):hover { border-color: var(--accent); color: var(--accent); }

/* Onglets, progression, sélection. */
.tabs .on { color: var(--accent); }
.bar > i { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.overlay { background: rgba(12, 8, 30, .5); backdrop-filter: blur(2px); }
.toast { border-radius: 12px; }
.toast.info .dot { color: #b9a5ff; }

/* Accueil et écran de connexion : aurore violette. */
.hero { background: radial-gradient(120% 140% at 0% 0%, #b9a5ff 0%, #7c5cff 38%, #4a2bd4 70%, #1d0f4a 100%); }
.hero::after { background: radial-gradient(circle, rgba(230, 220, 255, .5), transparent 65%); }
.hero2 { box-shadow: 0 30px 60px -30px rgba(60, 30, 170, .55); border-radius: 22px; }
.hero2 .actions .btn.light { color: #2a1670; }
.hero2 .actions .btn.light:hover { background: #f3efff; }
.timeline .tl.now { background: var(--accent-soft); }
.next-step .n { background: var(--accent); color: var(--accent-ink); }

/* Sous-titres (aperçu) : fond plus froid, accordé au violet. */
.cap-tile { background: radial-gradient(120% 90% at 30% 10%, #5b4a8f 0%, #2c2347 48%, #120e1f 100%); }
/* Tuiles sans image (sons, documents) : fond violet doux plutôt que gris. */
.tile:not(:has(img)) { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 26%, var(--surface-3)) 0%, var(--surface-3) 75%); }
.tile .icon-fallback { color: var(--accent); }
/* Bouton copilote : sombre dans les deux modes, liseré en mode sombre. */
.fab { background: linear-gradient(180deg, #2a2342, #16131f); color: #fff; border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 12px 30px -10px rgba(22, 16, 48, .55); }

/* ---------- Fil de production : la salle de montage, en direct ---------- */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes angle { to { --ang: 360deg; } }
.fil { display: flex; flex-direction: column; gap: 16px; margin-bottom: 22px; }
/* Bandeau cinéma, sombre dans les deux thèmes */
.sl { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-lg); padding: 24px 26px 20px; color: #f4f1ff; display: flex; flex-direction: column; gap: 22px;
  background: radial-gradient(120% 140% at 0% 0%, #2b1a5c 0%, transparent 55%), radial-gradient(90% 120% at 100% 100%, #3a1340 0%, transparent 60%), linear-gradient(135deg, #150f2b 0%, #0b0915 100%);
  box-shadow: 0 30px 60px -30px rgba(40, 20, 110, .6), inset 0 0 0 1px rgba(255, 255, 255, .06); }
.sl::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px); }
.sl-bg { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(64px); opacity: .55; }
.b1 { width: 400px; height: 400px; background: #6d4aff; top: -170px; left: -90px; animation: drift1 14s ease-in-out infinite alternate; }
.b2 { width: 340px; height: 340px; background: #e0479e; bottom: -190px; right: 6%; opacity: .42; animation: drift2 17s ease-in-out infinite alternate; }
.b3 { width: 260px; height: 260px; background: #3b6cf6; top: 25%; left: 42%; opacity: .2; animation: drift1 21s ease-in-out infinite alternate-reverse; }
.sl.is-live .blob { animation-duration: 8s; }
@keyframes drift1 { to { transform: translate(130px, 60px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-150px, -40px) scale(.9); } }
/* Pellicule des rushes qui défile en fond */
.sl-strip { position: absolute; z-index: -1; top: -30px; bottom: -30px; right: -60px; width: 58%; opacity: .2; overflow: hidden; transform: rotate(-7deg); display: flex; align-items: center;
  -webkit-mask: linear-gradient(90deg, transparent, #000 35%, #000 80%, transparent); mask: linear-gradient(90deg, transparent, #000 35%, #000 80%, transparent); }
.sl-track { display: flex; gap: 10px; width: max-content; animation: reel 70s linear infinite; }
.sl.is-live .sl-track { animation-duration: 36s; }
.sl-track span { width: 82px; height: 146px; border-radius: 10px; background-size: cover; background-position: center; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); }
@keyframes reel { to { transform: translateX(-50%); } }
.sl-top { display: flex; gap: 22px; align-items: center; }
.sl-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.sl-kicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(236, 230, 255, .7); }
.live { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px; border-radius: 99px; background: rgba(255, 70, 110, .16); color: #ff9db5; letter-spacing: .06em; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #ff4d79; animation: livepulse 1.4s ease-out infinite; }
.live.ok { background: rgba(74, 222, 128, .15); color: #86efac; }
@keyframes livepulse { from { box-shadow: 0 0 0 0 rgba(255, 77, 121, .7); } to { box-shadow: 0 0 0 8px rgba(255, 77, 121, 0); } }
.sl-time { display: inline-flex; align-items: center; gap: 5px; color: rgba(236, 230, 255, .6); letter-spacing: 0; text-transform: none; font-weight: 600; }
.sl-title { margin: 0; font-size: clamp(23px, 2.6vw, 33px); font-weight: 780; letter-spacing: -.035em; line-height: 1.12;
  background: linear-gradient(92deg, #ffffff 0%, #e4dbff 45%, #ffb4dc 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dots { display: inline-flex; gap: 5px; margin-left: 10px; vertical-align: middle; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: #c9b8ff; animation: dotb 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .18s; } .dots i:nth-child(3) { animation-delay: .36s; }
@keyframes dotb { 0%, 80%, 100% { opacity: .3; transform: none; } 40% { opacity: 1; transform: translateY(-4px); } }
.sl-now { display: flex; align-items: center; gap: 10px; min-height: 32px; font-size: 14.5px; line-height: 1.45; color: rgba(240, 236, 255, .9); }
.sl-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(166, 139, 255, .22); color: #ddd2ff; flex: none; position: relative; }
.sl.is-live .sl-av::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(from 0deg, #a68bff, #f07ab8, transparent 70%); animation: spin 1.1s linear infinite;
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%); mask: radial-gradient(circle, transparent 60%, #000 62%); }
.sl-av.ok { background: rgba(74, 222, 128, .18); color: #86efac; }
.sl-typed { min-width: 0; overflow-wrap: anywhere; }
.caret { display: inline-block; width: 2px; height: 1.05em; background: #c9b8ff; margin-left: 3px; vertical-align: -3px; animation: caret 1s steps(2) infinite; }
/* Anneau : un arc par étape */
.ring { width: 136px; height: 136px; position: relative; flex: none; }
.ring > svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.r-bg, .r-fg { fill: none; stroke-width: 9; }
.r-bg { stroke: rgba(255, 255, 255, .1); stroke-dasharray: 92 608; }
.r-fg { stroke: url(#ringg); transition: stroke-dasharray .8s var(--ease); filter: drop-shadow(0 0 6px rgba(166, 139, 255, .65)); }
.r-fg.running { animation: ringpulse 1.6s ease-in-out infinite; }
@keyframes ringpulse { 50% { opacity: .6; } }
.ring-c { position: absolute; inset: 0; display: grid; place-items: center; }
.ring-c b { font-size: 34px; font-weight: 790; letter-spacing: -.045em; color: #fff; }
.ring-c small { font-size: 15px; color: rgba(255, 255, 255, .6); margin-left: 1px; }
.ring-ok { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #a68bff, #f07ab8); color: #fff; box-shadow: 0 0 0 9px rgba(166, 139, 255, .16), 0 12px 30px -8px rgba(240, 122, 184, .7); animation: popin .7s var(--ease) both; }
@keyframes popin { from { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.1); opacity: 1; } }
/* Frise des 7 étapes, reliées par un rail lumineux */
.sl-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); position: relative; }
.sl-rail { position: absolute; left: calc(100% / 14); right: calc(100% / 14); top: 19px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .12); }
.sl-rail i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--at) / 6 * 100%); border-radius: 3px; background: linear-gradient(90deg, #4ade80, #a68bff 55%, #f07ab8); box-shadow: 0 0 12px rgba(166, 139, 255, .85); transition: width 1.2s var(--ease); }
.sl.is-live .sl-rail i::after { content: ''; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 14px 4px rgba(240, 122, 184, .9), 0 0 32px 10px rgba(166, 139, 255, .55); animation: comet 1.4s ease-in-out infinite; }
@keyframes comet { 50% { transform: scale(1.35); } }
.sn { position: relative; min-width: 0; }
.sn button { all: unset; box-sizing: border-box; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer; padding: 0 2px; border-radius: 12px; }
.sn button:focus-visible { outline: 2px solid #c9b8ff; outline-offset: 3px; }
.sn-dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; position: relative; z-index: 1; background: #1d1636; color: rgba(236, 230, 255, .5); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .14); transition: transform .3s var(--ease), background .4s, box-shadow .4s; }
.sn:hover .sn-dot { transform: translateY(-2px); }
.sn.done .sn-dot { background: linear-gradient(135deg, #22c55e, #4ade80); color: #052e14; box-shadow: 0 0 0 4px rgba(74, 222, 128, .14); }
.sn.running .sn-dot { background: linear-gradient(135deg, #7c5cff, #e0479e); color: #fff; box-shadow: 0 0 0 5px rgba(166, 139, 255, .22), 0 0 28px rgba(224, 71, 158, .6); transform: scale(1.1); }
.sn.running .sn-dot::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid transparent; border-top-color: #fff; border-right-color: rgba(255, 255, 255, .35); animation: spin 1.2s linear infinite; }
.sn.error .sn-dot { background: #7f1d1d; color: #fecaca; }
.sn b { font-size: 12.5px; font-weight: 700; color: #f4f1ff; line-height: 1.2; }
.sn.waiting b { color: rgba(236, 230, 255, .5); }
.sn small { font-size: 11px; color: rgba(236, 230, 255, .5); }
.sn.done small { color: #86efac; }
.sn.running small { color: #ffb4dc; font-weight: 650; }
.sn.running b { margin-top: 6px; }
/* Ce que l'équipe a apporté, en chiffres */
.sl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.slst { border-radius: 14px; padding: 12px 14px; background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: flex; flex-direction: column; gap: 3px; min-width: 0; transition: background .5s, box-shadow .5s; }
.slst b { font-size: 27px; font-weight: 790; letter-spacing: -.035em; color: rgba(255, 255, 255, .3); line-height: 1.08; }
.slst.on b { color: #fff; }
.slst b small { font-size: 14px; color: rgba(255, 255, 255, .5); font-weight: 650; margin-left: 2px; letter-spacing: 0; }
.slst > span { font-size: 12px; color: rgba(236, 230, 255, .66); line-height: 1.35; }
.slst.big.on { background: linear-gradient(135deg, rgba(124, 92, 255, .38), rgba(224, 71, 158, .3)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 10px 30px -14px rgba(224, 71, 158, .6); }
.slst .up { font-style: normal; color: #86efac; font-weight: 750; }
/* Étapes détaillées + journal */
.prod { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.prod-steps { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pstep { border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); box-shadow: var(--shadow); scroll-margin-top: calc(var(--top) + 12px); animation: rise .45s var(--ease) both; }
.pstep.running { border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, conic-gradient(from var(--ang), var(--accent), var(--accent-2), transparent 28%, transparent 62%, var(--accent)) border-box;
  animation: angle 3s linear infinite; box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--accent) 75%, transparent); }
.pstep.waiting { background: transparent; border-style: dashed; box-shadow: none; padding: 12px 16px; gap: 8px; }
.pstep.done { border-color: color-mix(in srgb, var(--ok) 20%, var(--line)); }
.pstep-h { display: flex; gap: 12px; align-items: flex-start; }
.pn { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; font-weight: 780; font-size: 14px; background: var(--surface-2); color: var(--mute); }
.pstep.running .pn { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 80%, transparent); }
.pstep.done .pn { background: var(--ok-soft); color: var(--ok); }
.pstep.error .pn { background: var(--bad-soft); color: var(--bad); }
.pstep-h h3 { margin: 4px 0 2px; font-size: 16px; font-weight: 750; letter-spacing: -.015em; }
.pstep-h p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.pstep.waiting .pstep-h h3 { color: var(--ink-2); font-size: 15px; }
.pstep.waiting .pstep-h p { color: var(--mute); }
.ptime { font-size: 12px; color: var(--mute); padding: 3px 9px; border-radius: 99px; background: var(--surface-2); white-space: nowrap; }
.pstep.running .ptime { color: var(--accent); background: var(--accent-soft); font-weight: 650; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 44px; }
.pchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mute); padding: 4px 10px; border-radius: 99px; background: var(--surface-2); }
.phase-agents { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 8px; }
.agent { border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; min-width: 0; transition: border-color .3s, box-shadow .3s, transform .3s; }
.agent.running { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 0 0 3px var(--accent-soft), 0 12px 26px -16px color-mix(in srgb, var(--accent) 75%, transparent); transform: translateY(-1px); }
.agent.error { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.agent-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.agent-top b { display: block; font-size: 13.5px; font-weight: 700; }
.agent-top small { display: block; font-size: 11.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent.running .agent-top small { color: var(--accent); font-weight: 650; }
.agent.done .agent-top small { color: var(--ok); }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; position: relative; flex: none; color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--accent-2-soft)); }
.agent.running .av { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.agent.running .av::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(from 0deg, var(--accent), var(--accent-2), transparent 72%); animation: spin 1s linear infinite;
  -webkit-mask: radial-gradient(circle, transparent 57%, #000 59%); mask: radial-gradient(circle, transparent 57%, #000 59%); }
.agent.done .av { background: var(--ok-soft); color: var(--ok); }
.agent.error .av { background: var(--bad-soft); color: var(--bad); }
.agent.skipped .av { background: var(--surface-2); color: var(--mute); }
.av-ok { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); animation: popin .5s var(--ease) both; }
.vox { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; flex: none; }
.vox i { width: 3px; height: 5px; border-radius: 2px; background: linear-gradient(var(--accent-2), var(--accent)); animation: vox .9s ease-in-out infinite; }
.vox i:nth-child(2) { animation-delay: -.3s; } .vox i:nth-child(3) { animation-delay: -.6s; } .vox i:nth-child(4) { animation-delay: -.15s; }
@keyframes vox { 0%, 100% { height: 4px; } 50% { height: 18px; } }
.aline { font-size: 12.5px; line-height: 1.4; color: var(--ink-2); min-height: 35px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.agent.running .aline::after { content: '▍'; margin-left: 2px; color: var(--accent); animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.pbar { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .6s var(--ease); }
.agent.done .pbar i { background: var(--ok); }
.agent.running .pbar i { background-size: 200% 100%; animation: teamflow 1.6s linear infinite; background-image: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent)); }
@keyframes teamflow { to { background-position: -200% 0; } }
/* Résultat d'une étape */
.pres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pres.one { grid-template-columns: minmax(0, 1fr); }
.pres-col { border-radius: 14px; background: var(--surface-2); padding: 14px; display: flex; flex-direction: column; gap: 9px; min-width: 0; animation: rise .5s var(--ease) both; }
.pres-col + .pres-col { animation-delay: .12s; }
.pres-k { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 760; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.pk-ico { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; flex: none; }
.now { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.now li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; animation: rise .4s var(--ease) both; }
.now li:not(:has(.now-k)) { grid-template-columns: minmax(0, 1fr); padding-left: 16px; position: relative; }
.now li:not(:has(.now-k))::before { content: ''; position: absolute; left: 2px; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.now-k { font-size: 11.5px; font-weight: 680; color: var(--mute); padding-top: 1px; }
.hooks { display: grid; gap: 8px; padding-top: 4px; }
.hk { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); animation: rise .45s var(--ease) both; }
.hk.win { border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--accent), var(--accent-2)) border-box; box-shadow: 0 12px 26px -16px color-mix(in srgb, var(--accent) 85%, transparent); }
.hk-win { position: absolute; top: -9px; right: 10px; display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 760; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 99px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.gain { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; border-radius: 16px; color: #f4f1ff; background: radial-gradient(120% 160% at 0% 0%, #2b1a5c, transparent 60%), linear-gradient(135deg, #1a1233, #240f36); animation: rise .5s var(--ease) both; }
.gain > div { display: flex; flex-direction: column; }
.gain .tiny { color: rgba(236, 230, 255, .66); }
.gain b.num { font-size: 32px; font-weight: 790; letter-spacing: -.035em; line-height: 1.05; color: rgba(255, 255, 255, .55); }
.gain .after b.num { background: linear-gradient(92deg, #fff, #ffb4dc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gain-arrow { color: rgba(236, 230, 255, .5); }
.gain-delta { margin-left: auto; padding: 6px 12px; border-radius: 99px; background: rgba(74, 222, 128, .16); color: #86efac; font-weight: 760; font-size: 13px; }
.experts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.xp { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; background: var(--surface); animation: rise .5s var(--ease) both; }
.xp:nth-child(2) { animation-delay: .1s; } .xp:nth-child(3) { animation-delay: .2s; }
.xp-h { display: flex; align-items: center; gap: 10px; }
.xp-v { color: var(--ink-2); font-style: italic; }
.gauge { width: 48px; height: 48px; position: relative; flex: none; display: grid; place-items: center; }
.gauge > svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.g-bg, .g-fg { fill: none; stroke-width: 3.4; }
.g-bg { stroke: var(--surface-3); }
.g-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: var(--v) 100; animation: gfill 1.3s var(--ease) both; }
@keyframes gfill { from { stroke-dasharray: 0 100; } }
.gauge b { font-size: 14px; font-weight: 790; }
.fix { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; align-items: start; }
.prio { font-size: 10.5px; font-weight: 720; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); color: var(--mute); }
.prio.haute { background: var(--warn-soft); color: var(--ink); }
.sc { display: grid; grid-template-columns: 82px minmax(0, 1fr) 32px; gap: 10px; align-items: center; }
.sc-bar { height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.sc-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); animation: grow 1.1s var(--ease) both; }
@keyframes grow { from { width: 0; } }
.sc b { text-align: right; }
/* Journal en mode console */
.prod-journal { position: sticky; top: calc(var(--top) + 12px); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; color: #e9e4ff;
  background: radial-gradient(120% 60% at 100% 0%, rgba(124, 92, 255, .25), transparent 60%), linear-gradient(180deg, #17112c, #0d0a18); box-shadow: 0 20px 44px -24px rgba(30, 16, 80, .6), inset 0 0 0 1px rgba(255, 255, 255, .06); }
.pj-h { display: flex; align-items: center; justify-content: space-between; color: rgba(233, 228, 255, .55); }
.prod-journal .live { font-size: 11px; font-weight: 760; text-transform: uppercase; }
.prod-journal .live.off { background: rgba(255, 255, 255, .08); color: rgba(233, 228, 255, .75); }
.prod-journal .live.off i { animation: none; background: currentColor; }
.journal { max-height: min(calc(100vh - var(--top) - 100px), 620px); overflow-y: auto; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; padding-right: 4px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.jl { display: grid; grid-template-columns: auto 20px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 12.5px; line-height: 1.45; color: rgba(233, 228, 255, .78); animation: jin .4s var(--ease) both; }
.jl time { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 10.5px; color: rgba(233, 228, 255, .38); padding-top: 2px; }
.jl b { color: #fff; font-weight: 650; }
.jl.last { color: #fff; }
.jl.last > span:last-child { background: linear-gradient(90deg, rgba(166, 139, 255, .2), transparent); border-radius: 6px; padding: 0 4px; margin: 0 -4px; }
.jav { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: rgba(166, 139, 255, .18); color: #c9b8ff; }
.jav.done { background: rgba(74, 222, 128, .15); color: #86efac; }
@keyframes jin { from { opacity: 0; transform: translateY(-6px); } }
.pj-empty { font-size: 13px; color: rgba(233, 228, 255, .55); }
.qa { border-radius: 10px; padding: 8px 10px; background: var(--ok-soft); display: flex; flex-direction: column; gap: 2px; }
.qa.a-revoir { background: var(--warn-soft); }
/* Confettis de fin */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti i { position: absolute; top: -14px; border-radius: 2px; animation: confetti 3s cubic-bezier(.2, .6, .4, 1) both; }
@keyframes confetti { from { transform: translate(0, 0) rotate(var(--r)); opacity: 1; } to { transform: translate(var(--x), 106vh) rotate(calc(var(--r) + 720deg)); opacity: .85; } }

/* ---------- Choix au lancement d'un montage ---------- */
.lc-row { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.lc-h { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 720; }
.lc-h svg { color: var(--accent); }
.lc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-sub { display: flex; flex-direction: column; gap: 6px; }
/* Après le montage : reprendre ses choix ou retoucher, depuis n'importe quel onglet */
.mctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: -4px 0 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.mctl .grow { min-width: 220px; }
/* Et maintenant ? (après le montage) */
.nxt { margin: -4px 0 18px; display: flex; flex-direction: column; gap: 12px; border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--accent), var(--accent-2)) border-box; }
.nxt-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.nxt-steps > li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.nxt-steps > li:first-child { border-top: 0; padding-top: 2px; }
.nxt-steps .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); flex: none; margin-top: 1px; }
.nxt-steps > li > .grow { min-width: 240px; flex: 1 1 320px; }
.nxt-pub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.nxt-pub > .grow { flex: 1 1 200px; min-width: 0; }
.nxt-next { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 8px; margin-top: 8px; }
.nxt-idea { padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line-2); }
/* Prochaines vidéos */
.nv-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.nv-card { display: flex; flex-direction: column; gap: 14px; }
.nv-card.planned { border-color: var(--ok); }
.nv-head { display: flex; gap: 14px; align-items: flex-start; }
.nv-img { width: 96px; height: 170px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface-2); }
.nv-img.ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--mute); }
.nv-title { font-family: var(--serif); font-size: 22px; font-weight: 560; margin: 6px 0 6px; line-height: 1.2; }
.nv-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.nv-k { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin: 8px 0 6px; }
.nv-list { margin: 0; padding-left: 18px; font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; }
.nv-list.num li::marker { color: var(--accent); font-weight: 700; }
.nv-decor { margin: 0; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 10px; font-size: 13.5px; }
.nv-decor dt { color: var(--mute); } .nv-decor dd { margin: 0; }
.nv-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }
@media (max-width: 760px) { .nv-cols { grid-template-columns: minmax(0, 1fr); } .nv-img { width: 72px; height: 128px; } }
.nv-card.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.nv-sel { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.nv-sel input { width: 16px; height: 16px; accent-color: var(--accent); }
.nv-batch { position: sticky; bottom: 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--accent); box-shadow: var(--shadow-lg); }
/* Radar du jour */
.radar { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.rd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 18px; }
.rd-col { min-width: 0; }
.rd-k { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin: 6px 0 6px; }
.rd-k svg { color: var(--accent); }
.rd-list { margin: 0; padding-left: 16px; font-size: 13px; display: flex; flex-direction: column; gap: 5px; line-height: 1.4; }
@media (max-width: 1100px) { .rd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .rd-grid { grid-template-columns: minmax(0, 1fr); } .rd-head { flex-direction: column; align-items: flex-start; } .radar .vp-title { font-size: 16px; } }
/* Barre « Tourner ensemble » : ses boutons restent à gauche du bouton Copilote (fixé en bas à droite). */
@media (min-width: 701px) { .nv-batch { padding-right: 160px; } }

/* ---- Propositions : fiche de tournage lisible d'un coup d'œil ---- */
@keyframes nvin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.nv-card { animation: nvin .4s ease-out both; }
@media (prefers-reduced-motion: reduce) { .nv-card { animation: none; } }
.nv-card.kept { border-color: var(--ok); }
.nv-hero { display: flex; gap: 16px; align-items: flex-start; padding: 14px 16px 14px 14px; margin: -2px -2px 0; border-radius: 14px; background: linear-gradient(135deg, var(--accent-soft), transparent 60%); }
.nv-promise { margin: 2px 0 8px; font-size: 15.5px; line-height: 1.4; color: var(--accent); font-weight: 600; letter-spacing: -.01em; }
.nv-line { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; margin-top: 4px; line-height: 1.4; }
.nv-line svg { flex: none; color: var(--accent); margin-top: 3px; }
.nv-insp { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; line-height: 1.4; border-left: 3px solid var(--accent); }
.nv-insp-k { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-right: 6px; }
.nv-insp-t { margin-top: 2px; }
.nv-hooks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hk { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.hk.best { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hk-text { font-family: var(--serif); font-size: 17px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.hk-spoken { font-size: 13px; color: var(--mute); line-height: 1.4; flex: 1; }
.hk-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hk-foot .num { font-size: 13px; color: var(--accent); }
.meter { flex: 1 1 60px; min-width: 50px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.sb { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sb li { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 6px 0 12px; }
.sb li::before { content: ''; position: absolute; left: 16px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.sb li:first-child::before { top: 14px; } .sb li:last-child::before { bottom: auto; height: 14px; }
.sb-n { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 0 3px var(--surface); }
.sb-body { min-width: 0; padding-top: 5px; }
.sb-t { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; margin-bottom: 4px; }
.sb-say { font-size: 14.5px; line-height: 1.45; font-weight: 600; }
.sb-see { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--mute); margin-top: 3px; line-height: 1.4; }
.sb-see svg { flex: none; margin-top: 3px; }
.nv-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dtile { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.dtile-h { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin-bottom: 4px; }
.dtile-h svg { color: var(--accent); }
.dtile-v { font-size: 13.5px; line-height: 1.4; }
.hk-foot .chip, .nv-hero .chip { white-space: normal; height: auto; min-height: 20px; line-height: 1.3; padding: 2px 8px; max-width: 100%; }
.nv-shots { margin: 0; padding-left: 22px; font-size: 13.5px; display: flex; flex-direction: column; gap: 6px; }
.nv-shots li { display: flex; gap: 8px; align-items: flex-start; }
.nv-shots li::marker { color: var(--accent); font-weight: 700; }
.shot-type { flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--mute); margin-top: 1px; }
.shot-type.plan { background: var(--accent-soft); color: var(--accent); }
.shot-type.detail { background: #fdebd3; color: #8a5300; } .shot-type.broll { background: #e2f1e5; color: #2d6a3e; } .shot-type.son { background: #e7e9f7; color: #3a4a9a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .shot-type.detail { background: #3a2a10; color: #f0c070; } :root:not([data-theme="light"]) .shot-type.broll { background: #15301c; color: #8fd3a0; } :root:not([data-theme="light"]) .shot-type.son { background: #1e2340; color: #aab5ff; } }
:root[data-theme="dark"] .shot-type.detail { background: #3a2a10; color: #f0c070; } :root[data-theme="dark"] .shot-type.broll { background: #15301c; color: #8fd3a0; } :root[data-theme="dark"] .shot-type.son { background: #1e2340; color: #aab5ff; }
.nv-foot .fg { color: var(--fg); }
.nv-why { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nv-why .input { flex: 1 1 260px; }
.nv-ctx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.nv-ctx-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.nv-ctx-l { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.nv-ctx-f textarea.input { resize: vertical; min-height: 54px; font-size: 13.5px; }
.nv-wait { margin-top: 12px; border-color: var(--accent); }
.wk { margin-top: 14px; }
.wk-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wk-day { min-width: 0; padding: 6px; border-radius: 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; min-height: 64px; }
.wk-day.today { outline: 2px solid var(--accent); outline-offset: -2px; }
.wk-h { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.wk-day.today .wk-h { color: var(--accent); }
.wk-item { all: unset; cursor: pointer; display: block; font-size: 12px; line-height: 1.3; padding: 4px 6px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wk-item:hover, .wk-item:focus-visible { border-color: var(--accent); }
.wk-item.ok { border-color: var(--ok); } .wk-item.shoot { background: var(--accent-soft); border-color: transparent; }
.wk-empty { color: var(--line-2); font-size: 12px; }
.nv-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -6px 0 12px; }
.nv-filters-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.dtile.cover { grid-column: span 2; } .dtile.warn { background: #fbefd9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dtile.warn { background: #33270f; } }
:root[data-theme="dark"] .dtile.warn { background: #33270f; }
.nv-ctx-link { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 760px) { .wk-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .dtile.cover { grid-column: span 2; } }
.nv-ctx-once { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 760px) { .nv-hooks, .nv-ctx-grid { grid-template-columns: minmax(0, 1fr); } .nv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nv-hero { flex-direction: column; } }
.lc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.lc-card { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); min-width: 0; transition: border-color .15s, box-shadow .15s, transform .15s; }
.lc-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); transform: translateY(-1px); }
.lc-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lc-card.on { border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--accent), var(--accent-2)) border-box; box-shadow: 0 10px 22px -16px color-mix(in srgb, var(--accent) 85%, transparent); }
.lc-card.off { opacity: .7; }
.lc-card b { font-size: 13px; font-weight: 700; }
.lc-card small { font-size: 11.5px; color: var(--mute); line-height: 1.35; }
.lc-n { font-size: 11px; font-weight: 650; color: var(--accent); margin-top: 2px; }
.lc-ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 2px; }
.lc-card.on .lc-ico { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.lc-tracks { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: var(--surface-2); animation: rise .35s var(--ease) both; }
.lc-track { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: var(--surface); min-width: 0; }
.lc-track.on { box-shadow: 0 0 0 2px var(--accent); }
.lc-play { all: unset; cursor: pointer; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.lc-play:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Validation du plan avant la fabrication ---------- */
.vp { border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--accent), var(--accent-2)) border-box; box-shadow: 0 18px 40px -26px color-mix(in srgb, var(--accent) 80%, transparent); margin-bottom: 16px; }
.vp-title { display: block; font-size: 18px; font-weight: 760; letter-spacing: -.02em; }
.vp-row { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.vp-h { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 720; }
.vp-h > b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); flex: none; }
.vp-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.vp-line.off .input { opacity: .55; text-decoration: line-through; }
.vp-illus { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.vp-illus.off { opacity: .55; }
.vp-illus input { margin-top: 3px; accent-color: var(--accent); }
.vp-prompt { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.vp-pass { display: flex; flex-direction: column; gap: 4px; }
.vp-seg { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 10px; background: var(--surface-2); min-width: 0; }
.vp-seg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vp-seg > b { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.vp-seg > span:last-child { font-weight: 650; color: var(--accent); min-width: 44px; text-align: right; }
.vp-seg.off { opacity: .5; } .vp-seg.off .small { text-decoration: line-through; } .vp-seg.off > span:last-child { color: var(--mute); }
@media (max-width: 600px) { .vp-seg .tiny.mute { display: none; } }

/* ---------- Onglets d'un montage ---------- */
.mtabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 4px 0 18px; }
.mtab { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); min-width: 0; transition: border-color .2s, box-shadow .2s, transform .2s; }
.mtab:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); transform: translateY(-1px); }
.mtab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mtab.on { border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--accent), var(--accent-2)) border-box; box-shadow: 0 12px 26px -18px color-mix(in srgb, var(--accent) 80%, transparent); }
.mt-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--mute); }
.mtab.on .mt-ico { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.mt-txt { display: flex; flex-direction: column; min-width: 0; }
.mt-txt b { font-size: 13.5px; font-weight: 720; line-height: 1.25; }
.mtab:not(.on) .mt-txt b { color: var(--ink-2); }
.mt-txt small { font-size: 11.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px; }
.mt-live { width: 7px; height: 7px; border-radius: 50%; background: #ff4d79; flex: none; animation: livepulse 1.4s ease-out infinite; }
.tab-empty { padding: 22px; }
.out-card .qa .tiny { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Avant / après */
.ba { display: flex; flex-direction: column; gap: 14px; }
.ba-stats { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.ba-stats > div { display: flex; flex-direction: column; min-width: 110px; }
.ba-stats b.num { font-size: 28px; font-weight: 780; letter-spacing: -.03em; line-height: 1.1; }
.ba-stats small { font-size: 12px; }
.ba-out { padding: 10px 14px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.ba-out .tiny, .ba-out small { color: rgba(255, 255, 255, .8); }
.ba-arrow { color: var(--mute); }
.ba-sw { display: inline-block; width: 12px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ba-sw.kept { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.ba-sw.drop { background: repeating-linear-gradient(45deg, var(--bad) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1px var(--bad); }
.ba-sw.rest { background: var(--surface-3); }
.ba-rush { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.ba-rush b { min-width: 0; }
.ba-bar { position: relative; height: 22px; border-radius: 7px; background: var(--surface-3); overflow: hidden; }
.ba-bar i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.ba-bar i.kept { background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 0 1px var(--surface); animation: grow .9s var(--ease) both; }
.ba-bar i.drop { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--bad) 70%, transparent) 0 3px, transparent 3px 6px); }
.ba-ticks { display: flex; justify-content: space-between; }
.ba-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ba-done { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; line-height: 1.45; }
.ba-done li::marker { color: var(--accent); font-weight: 760; }
.ba-players { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ba-players figure { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ba-players figcaption { font-weight: 650; }
.ba-players figure:last-child figcaption { color: var(--accent); }
.ba-players video { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; background: #000; }
@media (max-width: 1100px) { .mtabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ba-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .mtab { padding: 9px 10px; gap: 8px; } .mt-ico { width: 30px; height: 30px; } .mt-txt b { font-size: 12.5px; } .ba-stats { gap: 10px; } .ba-stats b.num { font-size: 23px; } .ba-stats > div { min-width: 0; } }
@media (prefers-reduced-motion: reduce) { .mt-live, .ba-bar i.kept { animation: none; } }

/* ---------- Nouveau montage ---------- */
.new-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.drop-big { padding: 34px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; border-radius: var(--r); background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 60%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line-2)); }
.drop-big:hover { border-color: var(--accent); }
.drop-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--accent); color: #fff; display: grid; place-items: center; margin-bottom: 4px; box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.files { display: flex; flex-direction: column; gap: 6px; }
.file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); min-width: 0; }
.file-bar { width: 110px; }
.team-preview { position: sticky; top: calc(var(--top) + 12px); border: 0; color: #f4f1ff; background: radial-gradient(120% 70% at 0% 0%, #2b1a5c, transparent 60%), linear-gradient(160deg, #150f2b, #0b0915); box-shadow: 0 24px 50px -28px rgba(40, 20, 110, .6); }
.team-preview .card-kicker { color: #c9b8ff; }
.team-preview .tiny.mute { color: rgba(233, 228, 255, .62); }
.tp-phase { display: flex; flex-direction: column; gap: 6px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.tp-phase:last-child { border-bottom: 0; }
.tp-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 720; text-transform: uppercase; letter-spacing: .05em; color: #fff; }
.tp-h b { width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, #7c5cff, #e0479e); color: #fff; display: grid; place-items: center; font-size: 11px; }
.tp-agents { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.tp-agent { display: inline-flex; gap: 6px; align-items: center; }
.tp-agent .av { width: 24px; height: 24px; background: rgba(166, 139, 255, .2); color: #d6c9ff; }
.tp-agent b { color: rgba(244, 241, 255, .9); }
@media (max-width: 1180px) {
  .prod { grid-template-columns: minmax(0, 1fr); }
  .prod-journal { position: static; order: -1; }
  .prod-journal .journal { max-height: 210px; }
}
@media (max-width: 860px) {
  .new-grid { grid-template-columns: minmax(0, 1fr); }
  .team-preview { position: static; }
  .pres, .experts { grid-template-columns: minmax(0, 1fr); }
  .phase-agents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phase-agents[data-n="1"] { grid-template-columns: minmax(0, 1fr); }
  .sl { padding: 20px 18px 16px; gap: 18px; }
  .sl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ring { width: 108px; height: 108px; }
  .ring-c b { font-size: 27px; }
  .sl-strip { width: 85%; }
}
@media (max-width: 600px) {
  .sn b, .sn small { display: none; }
  .sn.running b { display: block; position: absolute; top: 46px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11.5px; color: #ffb4dc; }
  .sl-steps:has(.sn.running) { padding-bottom: 22px; }
  .sn-dot { width: 34px; height: 34px; }
  .sl-rail { top: 16px; }
  .sl-top { align-items: flex-start; gap: 12px; }
  .ring { width: 84px; height: 84px; }
  .ring-c b { font-size: 21px; } .ring-c small { font-size: 12px; }
  .ring-ok { width: 46px; height: 46px; }
  .sl-title { font-size: 22px; }
  .sl-now { font-size: 13.5px; }
  .slst { padding: 10px 12px; } .slst b { font-size: 22px; }
  .now li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pstep { padding: 14px; }
  .pchips { padding-left: 0; }
  .gain b.num { font-size: 26px; }
  .gain-delta { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .blob, .sl-track, .sl-rail i::after, .sn.running .sn-dot::after, .pstep, .pstep.running, .sl-av::before, .agent.running .av::before, .agent.running .pbar i, .vox i, .live i, .r-fg.running, .dots i, .caret, .now li, .pres-col, .xp, .hk, .gain, .jl, .sc-bar i, .g-fg { animation: none !important; }
}
/* Tableaux : jamais plus larges que l'écran ; un long message se coupe au lieu d'élargir la page. */
.table-wrap { max-width: 100%; }
.table td { overflow-wrap: anywhere; }
.list-item .grow { overflow-wrap: anywhere; }
/* Tuile « Sans sous-titres » lisible malgré le fond sombre des aperçus. */
.cap-grid .cap-tile.cap-none { background: var(--surface-2); color: var(--ink-2); }
.cap-grid .cap-tile.cap-none .cap-sample { color: var(--ink-2); text-shadow: none; }

/* ---------- Barre latérale réduite (ordinateur) ---------- */
.nav-toggle { border: 0; background: none; color: var(--mute); cursor: pointer; width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.nav-toggle:hover { background: var(--surface-2); color: var(--ink); }
.nav-toggle svg { width: 18px; height: 18px; }
@media (min-width: 861px) {
  .shell.nav-min { grid-template-columns: 72px 1fr; }
  .nav-min .side { padding: 16px 10px 20px; }
  .nav-min .side > .row.between { flex-direction: column; gap: 2px; }
  .nav-min .brand { padding: 4px 0 6px; }
  .nav-min .brand b, .nav-min .nav-label, .nav-min .usercard .grow { display: none; }
  .nav-min .nav-group { height: 1px; margin: 10px 8px 6px; padding: 0; font-size: 0; background: var(--line); overflow: hidden; }
  .nav-min .nav-item { justify-content: center; padding: 10px 0; gap: 0; }
  .nav-min .nav-item.on::before { display: none; }
  .nav-min .nav-item .count { position: absolute; top: 3px; right: 5px; margin: 0; min-width: 18px; height: 18px; font-size: 11px; padding: 0 5px; }
  .nav-min .usercard { padding: 8px 0; justify-content: center; gap: 0; }
  .nav-min .side-foot .nav-item { padding: 10px 0; }
}
/* ---------- Guide « Comment ça marche ici » ---------- */
.guide-btn.on { background: var(--accent-soft); color: var(--accent); }
.guide { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) auto; gap: 18px; align-items: start; padding: 16px 18px; margin: -6px 0 20px; border-radius: 16px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.guide-what { font-size: 14.5px; line-height: 1.45; }
.guide-what b { display: block; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.guide-steps { margin: 0; padding: 0; list-style: none; counter-reset: g; display: grid; gap: 7px; }
.guide-steps li { counter-increment: g; display: flex; gap: 10px; font-size: 13.5px; line-height: 1.4; }
.guide-steps li::before { content: counter(g); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 860px) { .guide { grid-template-columns: 1fr; gap: 12px; } .guide .btn { justify-self: start; } }
/* ---------- Publications ---------- */
.stepn { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; align-items: center; justify-content: center; margin-right: 9px; vertical-align: middle; }
.pub-thumb { width: 44px; height: 58px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-2); }
.pub-thumb.ph { display: inline-flex; align-items: center; justify-content: center; color: var(--mute); }
.pub-thumb.ph svg { width: 18px; height: 18px; }
.pub-empty { padding: 26px 24px; }
.chip.dim { opacity: .7; }
.chip .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.chip .dot.ok { background: var(--ok, #2f9e62); }
.spend-strip { padding: 12px 16px; margin-top: 4px; gap: 12px; }
/* ---------- « Tout le reste » ---------- */
.plus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 8px; }
.plus-tile { display: flex; gap: 12px; align-items: center; padding: 12px 14px; text-decoration: none; color: inherit; }
.plus-tile b { display: block; font-size: 14.5px; }
.plus-tile small { color: var(--mute); font-size: 12.5px; line-height: 1.3; display: block; }
.plus-ico { width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.plus-ico svg { width: 19px; height: 19px; }
/* ---------- Mobile : une vraie appli ---------- */
.sticky-m { display: none; }
@media (max-width: 860px) {
  .hero2 { grid-template-columns: 1fr; padding: 18px 16px 16px; min-height: 0; gap: 12px; border-radius: 20px; }
  .hero2 h1 { font-size: 30px; }
  .hero2 .sub { font-size: 14.5px; margin-top: 4px; }
  .hero2 .actions { margin-top: 12px; }
  .hero2 .actions .btn { flex: 1 1 auto; justify-content: center; }
  .hero2 .glass-card { padding: 12px 14px; }
  .hero2 .glass-card .display { font-size: 19px !important; }
  .page-head { margin: 2px 0 14px; }
  .page-head p { font-size: 14px; }
  .guide { padding: 12px 14px; margin: -2px 0 14px; }
  .guide-what { font-size: 13.5px; }
  .guide-steps li { font-size: 13px; }
  .section-title { margin: 20px 0 10px; font-size: 17px; }
  .card { padding: 14px; }
  .list-item { padding: 12px 12px; min-height: 56px; }
  .btn { min-height: 42px; }
  .btn.sm { min-height: 34px; }
  .spend-strip { flex-wrap: wrap; }
  .sticky-m { position: fixed; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 35; display: flex; gap: 10px; align-items: center; padding: 10px 16px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .dock .plus { width: 40px; height: 40px; margin-top: -14px; border-radius: 14px; }
  .dock button.on { color: var(--accent); }
  .nv-filters, .tabs { -webkit-overflow-scrolling: touch; }
}
.nxt-trials { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
/* ---------- Atelier IA ---------- */
.at-ready { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.at-ready li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.at-ready li .n { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--warn-soft); color: var(--warn); flex: none; }
.at-ready li.ok .n { background: var(--ok-soft); color: var(--ok); }
.at-refs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.at-ref { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.at-ref img { width: 100%; height: 100%; object-fit: cover; display: block; }
.at-ref button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.at-decors { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.at-decor { padding: 10px; display: grid; grid-template-columns: 84px 1fr; gap: 10px; align-items: start; }
.at-decor-img { width: 84px; aspect-ratio: 9 / 16; border-radius: 10px; background: var(--surface-2) center / cover; display: inline-flex; align-items: center; justify-content: center; color: var(--mute); }
.at-prompt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.at-preset { margin-top: 6px; padding: 12px; border-radius: 14px; background: var(--accent-soft); }
@media (max-width: 860px) { .at-decors { grid-template-columns: 1fr; } }
.rt-row { display: flex; gap: 12px; align-items: flex-end; padding: 10px 0; border-top: 1px solid var(--line); }
.rt-row:first-of-type { border-top: 0; }
/* ---------- Atelier IA v2 : écrans ---------- */
.at-home { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.at-step { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; padding: 18px; }
.at-step.primary { background: linear-gradient(160deg, var(--accent-soft), var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.at-step-top { display: flex; justify-content: space-between; align-items: center; }
.at-step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.at-step.done .at-step-n { background: var(--ok); }
.at-step-ico { color: var(--accent); }
.at-step-ico svg { width: 26px; height: 26px; }
.at-step-title { font-size: 18px; }
.at-step-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; flex: 1; }
.at-step-lines li { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mute); }
.at-step-lines li.ok { color: var(--ink); }
.at-step-lines li.ok svg { color: var(--ok); }
.at-step .btn { align-self: flex-start; }
.at-items { display: grid; gap: 8px; }
.at-item { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.at-item-thumb { width: 48px; aspect-ratio: 9 / 16; border-radius: 8px; background: var(--surface-3) center / cover; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--mute); }
.at-stepper { display: flex; gap: 10px; margin: 4px 0; flex-wrap: wrap; }
.at-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--mute); }
.at-dot i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: inline-block; }
.at-dot.done { color: var(--ink); } .at-dot.done i { background: var(--ok); }
.at-dot.now { color: var(--accent); font-weight: 650; } .at-dot.now i { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.at-dot.bad i { background: var(--bad); }
.at-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.at-creator { display: flex; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.at-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.at-avatar.lg { width: 52px; height: 52px; font-size: 18px; } .at-avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.at-add { display: grid; gap: 8px; padding: 12px 14px; }
.at-style { display: flex; gap: 14px; align-items: flex-start; }
.at-style-thumb { width: 72px; aspect-ratio: 9 / 16; border-radius: 10px; background: var(--surface-2) center / cover; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--mute); }
.at-timeline { display: flex; gap: 4px; margin: 8px 0; }
.at-tl { min-width: 0; padding: 6px 6px; border-radius: 8px; background: var(--accent-soft); display: grid; gap: 2px; overflow: hidden; }
.at-tl b { font-size: 12px; color: var(--accent); }
.at-recette { display: grid; gap: 6px; }
.at-rec-row { display: flex; gap: 10px; align-items: flex-start; }
.at-screen h2 { font-size: 24px; font-weight: 720; letter-spacing: -.02em; margin: 4px 0 4px; }
.at-screen > p { margin: 0 0 14px; }
.at-screen { display: grid; gap: 12px; }
.at-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.at-choices.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .at-choices.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.at-choices.decors { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.at-choice { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left; padding: 12px; cursor: pointer; font: inherit; color: inherit; border: 2px solid transparent; }
.at-choice.on { border-color: var(--accent); background: var(--accent-soft); }
.at-choice-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.at-choice.on .at-choice-ico { background: var(--accent); color: var(--accent-ink); }
.at-choice-thumb { width: 100%; aspect-ratio: 9 / 12; border-radius: 10px; background: var(--surface-2) center / cover; }
.at-advanced summary { cursor: pointer; color: var(--mute); }
.at-progress-steps { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.at-progress-steps button { flex: 1; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--mute); font: inherit; font-weight: 600; white-space: nowrap; }
.at-progress-steps button i { width: 20px; height: 20px; border-radius: 50%; background: var(--line); color: var(--ink); font-style: normal; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.at-progress-steps button.on { background: var(--accent-soft); color: var(--accent); } .at-progress-steps button.on i { background: var(--accent); color: var(--accent-ink); }
.at-progress-steps button.done { color: var(--ink); cursor: pointer; } .at-progress-steps button.done i { background: var(--ok); color: #fff; }
@media (max-width: 860px) { .at-home { grid-template-columns: 1fr; } .at-choices.three { grid-template-columns: 1fr; } .at-choices.two { grid-template-columns: 1fr; } .at-style { flex-direction: column; } .at-progress-steps button span { display: none; } }
.at-items { grid-template-columns: minmax(0, 1fr); }
.at-item { min-width: 0; }
.at-style > .grow { min-width: 0; }
.at-style select.input { max-width: 100%; min-width: 0; }
.at-progress-steps button i { flex: none; }
@media (max-width: 860px) {
  .at-item { flex-wrap: wrap; }
  .at-item > .btn, .at-item > a.btn { width: 100%; justify-content: center; }
  .at-progress-steps button { flex: 0 0 auto; padding: 8px; }
  .at-progress-steps button.on span { display: inline; }
}
@media (max-width: 860px) { .at-style select.input, .at-style .segmented, .at-style .check { width: 100% !important; } .at-style .row { flex-direction: column; align-items: stretch; } }
.snd-list { display: grid; gap: 4px; max-height: 56vh; overflow-y: auto; }
.snd-row { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); }
.snd-row img, .snd-ph { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; color: var(--mute); }
.snd-chip { gap: 5px; }
/* ---------- Bibliothèque de rushes ---------- */
.lib-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; margin-bottom: 14px; }
.lib-upload { display: flex; gap: 14px; align-items: center; cursor: pointer; padding: 14px 16px; border: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.lib-upload b { display: block; font-size: 16px; } .lib-upload small { color: var(--mute); display: block; }
.lib-upload-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.lib-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; align-content: center; padding: 10px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.lib-stats b { color: var(--ink); font-size: 16px; margin-right: 3px; } .lib-stats .warn b { color: var(--warn); }
.lib-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; margin-bottom: 8px; }
.lib-group { display: flex; gap: 12px; align-items: center; padding: 10px 12px; }
.lib-group-thumbs { display: grid; grid-template-columns: repeat(2, 30px); gap: 3px; flex: none; }
.lib-group-thumbs a { width: 30px; aspect-ratio: 3 / 4; border-radius: 6px; background: var(--surface-3) center / cover; display: block; }
.lib-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 14px 0 8px; }
.lib-chips { display: grid; gap: 6px; margin-bottom: 14px; }
.lib-day-head { font-weight: 650; font-size: 13.5px; margin: 14px 0 8px; position: sticky; top: calc(var(--top) + 6px); z-index: 3; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); padding: 4px 0; width: fit-content; border-radius: 8px; }
.tile .tl-badges .chip.ok { background: var(--ok); color: #fff; } .tile .tl-badges .chip.gold { background: #f2b705; color: #2a1d00; }
@media (max-width: 860px) { .lib-top { grid-template-columns: 1fr; } .lib-groups { grid-template-columns: 1fr; } }
.modal.wide { width: min(1120px, 100%); }
.rush-head { padding: 14px 18px 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.rush-head h2 { font-size: 19px; }
.modal.wide > .page-head { display: none; }
/* ---------- Finition : calme, cohérence, chargement ---------- */
:root { --line: #ebe9f2; --line-2: #dcd8e8; --bg: #f7f6fb; --mute: #767089; --shadow: 0 1px 2px rgba(22, 16, 48, .04), 0 6px 20px rgba(22, 16, 48, .045); --aurora-1: #c6b7ff; --aurora-2: #9b84ff; --aurora-3: #6a4ce0; --aurora-4: #2a1a66; --aurora-5: #e9a0c8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --line: #221e30; --line-2: #2f2a42; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 22px rgba(0, 0, 0, .22); } }
:root[data-theme="dark"] { --line: #221e30; --line-2: #2f2a42; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 22px rgba(0, 0, 0, .22); }
.grain::after { opacity: .08; }
.card { padding: 20px; }
.card-title { margin-bottom: 12px; }
.page-head { margin: 8px 0 22px; }
.page-head p { line-height: 1.5; }
.section-title { margin: 30px 0 12px; }
.content { animation: viewin .28s var(--ease); }
.btn { transition: background .18s, box-shadow .18s, border-color .18s, transform .1s, opacity .18s; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .chip:focus-visible, .nav-item:focus-visible, .tile:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip { height: 28px; padding: 0 11px; transition: background .15s, color .15s, border-color .15s; }
.chip.on { background: var(--accent); color: var(--accent-ink); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), .field textarea, .field select, select.input, textarea.input { transition: border-color .15s, box-shadow .15s; }
.list-item { transition: background .15s; }
a.list-item:hover, .list-item.link:hover { background: var(--surface-2); }
.tile { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.tile:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -14px rgba(22, 16, 48, .35); }
.notice { line-height: 1.45; }
.toast { animation: viewin .25s var(--ease); }
/* Squelettes */
.skel { border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skel-tile { aspect-ratio: 4 / 5; border-radius: 16px; }
/* Barre d'activité réseau */
.netbar { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 95; pointer-events: none; opacity: 0; transition: opacity .2s; }
.netbar.on { opacity: 1; }
.netbar i { display: block; height: 100%; width: 30%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: netrun 1.1s ease-in-out infinite; }
@keyframes netrun { from { transform: translateX(-100%); } to { transform: translateX(400%); } }
@media (max-width: 860px) { .card { padding: 16px; } .page-head { margin: 4px 0 16px; } .section-title { margin: 22px 0 10px; } }
.boot-shell .side, .boot-shell .topbar { opacity: .9; }
.boot-shell .brand-mark::after { animation: none; }
/* ---------- Bibliothèque v3 ---------- */
.lib-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 4px; border-radius: 14px; background: var(--surface-2); margin: 4px 0 12px; }
.lib-tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 0; border-radius: 10px; background: none; color: var(--mute); font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.lib-tabs button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.lib-tabs button .n { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--mute); }
.lib-tabs button.on .n { background: var(--accent-soft); color: var(--accent); }
.lib-todo { margin: 6px 0 14px; padding: 12px 14px; border-radius: 16px; background: var(--accent-soft); }
.lib-todo-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.lib-todo .lib-groups { margin: 0; }
.lib-todo .lib-group { background: var(--surface); border-radius: 12px; }
.lib-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.lib-search { flex: 1 1 260px; display: flex; align-items: center; gap: 6px; padding: 0 6px 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--mute); }
.lib-search input { border: 0 !important; background: none !important; box-shadow: none !important; flex: 1; padding-left: 0; }
.lib-tools select.input { height: 40px; }
.lib-day { margin: 0 0 18px; }
.lib-day-head { display: flex; gap: 10px; align-items: center; margin: 14px 0 10px; font-weight: 650; font-size: 14px; position: static; background: none; backdrop-filter: none; padding: 0; width: auto; }
.lib-day-head .mute { font-weight: 500; }
.lib-day-actions { margin-left: auto; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.lib-grid.dense { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rt { cursor: pointer; border-radius: 14px; outline: 2px solid transparent; transition: outline-color .15s, transform .25s var(--ease); }
.rt:hover { transform: translateY(-2px); }
.rt.on { outline-color: var(--accent); }
.rt-img { position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: var(--surface-3); }
.rt-img img, .rt-img video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rt-img video { opacity: 0; transition: opacity .25s; }
.rt:hover .rt-img video { opacity: 1; }
.rt-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mute); }
.rt-dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11.5px; font-weight: 650; padding: 2px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.rt-fav { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .35); color: #fff; opacity: 0; transition: opacity .15s; cursor: pointer; font-size: 14px; }
.rt:hover .rt-fav, .rt-fav.on { opacity: 1; } .rt-fav.on { background: #f2b705; color: #2a1d00; }
.rt-check { position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .3); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.rt-check.on { background: var(--accent); border-color: var(--accent); }
.rt-state { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; }
.rt-state.bad { background: var(--bad); }
.rt-ai { position: absolute; left: 8px; bottom: 8px; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #fff; }
.rt-cap { padding: 8px 4px 2px; }
.rt-cap b { display: block; font-size: 13.5px; font-weight: 620; }
.rt-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 3px; font-size: 12px; color: var(--mute); }
.rt-pill { padding: 1px 7px; border-radius: 999px; background: var(--surface-2); font-size: 11px; font-weight: 600; color: var(--mute); }
.rt-pill.ok { background: var(--ok-soft); color: var(--ok); }
.rt-dots { display: flex; gap: 5px; align-items: center; margin-top: 5px; }
.rt-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.rt-dots i.on { background: var(--ok); }
.rt-tag { font-size: 11px; color: var(--accent); background: var(--accent-soft); padding: 0 6px; border-radius: 999px; }
@media (max-width: 860px) { .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .lib-grid.dense { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .lib-tools select.input { flex: 1 1 40%; } .rt-fav { opacity: 1; } .lib-day-actions .btn span { display: none; } }
@media (max-width: 860px) {
  .rush-head { flex-wrap: wrap; gap: 8px; padding: 12px 14px 10px; }
  .rush-head > .grow { flex: 1 1 100%; }
  .rush-head > .row { width: 100%; justify-content: flex-start !important; }
  .rush-head h2 { font-size: 16px; }
  .lib-day-actions .lbl { display: none; }
  .lib-day-actions .btn { padding: 6px 9px; }
  .lib-day-head { flex-wrap: nowrap; }
  .lib-day-head > span:first-child { white-space: nowrap; }
}
/* ---------- Bibliothèque v4 : sections par catégorie + filtres ---------- */
:root { --cat-raw: #1f6feb; --cat-render: #6a47e0; --cat-ai: #d63384; --cat-photo: #0d9488; --cat-audio: #ea580c; --cat-stock: #64748b; --cat-reference: #a16207; }
.lib-cats { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 4px; border-radius: 14px; background: var(--surface-2); margin: 4px 0 12px; }
.lib-cats button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 0; border-radius: 10px; background: none; color: var(--mute); font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; --c: var(--accent); }
.lib-cats button.cat-raw { --c: var(--cat-raw); } .lib-cats button.cat-render { --c: var(--cat-render); } .lib-cats button.cat-ai { --c: var(--cat-ai); } .lib-cats button.cat-photo { --c: var(--cat-photo); } .lib-cats button.cat-audio { --c: var(--cat-audio); } .lib-cats button.cat-stock { --c: var(--cat-stock); } .lib-cats button.cat-reference { --c: var(--cat-reference); }
.lib-cats button svg { color: var(--c); }
.lib-cats button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.lib-cats button .n { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--mute); }
.lib-cats button.on .n { background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.lib-filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.fsel { appearance: none; -webkit-appearance: none; height: 34px; padding: 0 28px 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6880' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; color: var(--ink); font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; max-width: 240px; text-overflow: ellipsis; }
.fsel:hover { border-color: var(--accent); }
.fsel.on { background-color: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 650; }
.lib-tools .fsel { height: 40px; border-radius: 12px; }
.lib-clear { margin-left: auto; }
.lib-sec { margin: 0 0 26px; padding-top: 6px; }
.lib-sec-head { display: flex; gap: 12px; align-items: center; margin: 0 0 12px; padding: 0 0 10px; border-bottom: 1px solid var(--line); --c: var(--accent); }
.lib-sec.cat-raw { --c: var(--cat-raw); } .lib-sec.cat-render { --c: var(--cat-render); } .lib-sec.cat-ai { --c: var(--cat-ai); } .lib-sec.cat-photo { --c: var(--cat-photo); } .lib-sec.cat-audio { --c: var(--cat-audio); } .lib-sec.cat-stock { --c: var(--cat-stock); } .lib-sec.cat-reference { --c: var(--cat-reference); }
.lib-sec-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--c); flex: none; }
.lib-sec-head h2 { font-size: 17px; margin: 0; display: flex; align-items: baseline; gap: 8px; }
.lib-sec-head h2 .n { font-size: 12.5px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); padding: 1px 8px; border-radius: 999px; }
.lib-sec .lib-todo { margin-top: 0; }
.lib-more { width: 100%; justify-content: center; margin: 10px 0 4px; }
.lib-empty { padding: 14px 2px 4px; }
.lib-edit { margin: 0 0 16px; }
.lib-edit-head { display: flex; gap: 10px; align-items: center; margin: 0 0 8px; }
.rt { --c: var(--accent); }
.rt.cat-raw { --c: var(--cat-raw); } .rt.cat-render { --c: var(--cat-render); } .rt.cat-ai { --c: var(--cat-ai); } .rt.cat-photo { --c: var(--cat-photo); } .rt.cat-audio { --c: var(--cat-audio); } .rt.cat-stock { --c: var(--cat-stock); } .rt.cat-reference { --c: var(--cat-reference); }
.rt-cat { position: absolute; left: 8px; top: 8px; font-size: 10.5px; font-weight: 750; letter-spacing: .02em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: var(--c); color: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.rt-state { left: auto; right: 8px; top: 42px; }
.rt-plats { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.rt-plats span { font-size: 10.5px; font-weight: 650; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); color: var(--ink); }
.rt.cat-audio .rt-img { aspect-ratio: 16 / 9; background: linear-gradient(135deg, color-mix(in srgb, var(--cat-audio) 22%, var(--surface-3)), var(--surface-3)); }
.rt.cat-audio .rt-ph { color: var(--cat-audio); }
@media (max-width: 860px) {
  .lib-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin: 0 -16px 12px; padding-left: 16px; padding-right: 16px; }
  .fsel { flex: none; max-width: 200px; }
  .lib-clear { margin-left: 0; flex: none; }
  .lib-sec-head h2 { font-size: 15.5px; }
  .lib-sec-head .small { display: none; }
  .lib-edit-head .lbl { display: none; }
}
@media (min-width: 861px) { .lib-cats { flex-wrap: wrap; } }
/* Sélecteur de médias aligné sur la bibliothèque */
.pick-top { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; }
.pick-top .lib-search { flex: 1 1 auto; min-width: 0; }
.pick-top > span { flex: none; }
.pick-cats { margin: 0 0 10px; }
.pick-filters { margin: 0 0 12px; }
.rt-fav:disabled { display: none; }
@media (max-width: 860px) {
  .modal, .modal.wide { width: 100%; max-width: 100vw; overflow-x: hidden; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pick-filters { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .pick-cats { flex-wrap: nowrap; }
}
/* Bibliothèque v4.1 : import rangé, case à cocher directe, usages explicites */
.lib-upload-card { display: flex; flex-direction: column; gap: 10px; padding: 0; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.lib-upload-card .lib-upload { border: 0; background: none; padding: 16px 18px 4px; }
.lib-upload-opts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 0 18px 14px; }
.rt-check { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .35); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 800; cursor: pointer; opacity: 0; transition: opacity .15s, transform .15s; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.rt:hover .rt-check, .rt.selecting .rt-check, .rt-check.on { opacity: 1; }
.rt-check:hover { transform: scale(1.08); }
.rt-check.on { background: var(--accent); border-color: var(--accent); }
.rt-fav { top: auto; left: 8px; bottom: 8px; right: auto; }
.rt-use { display: flex; gap: 5px; align-items: center; margin-top: 4px; font-size: 12px; color: var(--mute); line-height: 1.25; }
.rt-use svg { flex: none; }
.rt-use.ok { color: var(--ok); font-weight: 600; }
.rt-use.soon { color: var(--warn, #b45309); font-weight: 600; }
.rt.cat-render .rt-use.ok { color: var(--cat-render); }
@media (max-width: 860px) { .rt-check { opacity: .92; } .rt-fav { opacity: 0; } .rt-fav.on { opacity: 1; } .lib-upload-opts { padding: 0 14px 12px; } }
/* Fenêtres : jamais plus larges que l'écran, même avec un contenu qui défile horizontalement */
.overlay > .modal { max-width: 100%; min-width: 0; }
.lib-cats, .lib-filters, .pick-top { min-width: 0; }
.modal-body { min-width: 0; }
.overlay { grid-template-columns: minmax(0, 1fr); }
/* ---------- Nouveau montage v3 : une colonne, réglages en cartes + fenêtres ---------- */
.new-one { display: flex; flex-direction: column; gap: 14px; max-width: 960px; }
.new-src { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drop-lib { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; border-radius: 16px; border: 1.5px dashed var(--line-2); background: var(--surface-2); padding: 22px 16px; transition: border-color .15s, background .15s; }
.drop-lib:hover { border-color: var(--accent); background: var(--accent-soft); }
.drop-lib:focus-visible { outline: 2px solid var(--accent); }
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.pk { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pk-img { position: relative; aspect-ratio: 4 / 5; border-radius: 12px; background: var(--surface-3) center/cover no-repeat; display: grid; place-items: center; color: var(--mute); overflow: hidden; }
.pk-x { position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.pk-x:hover { background: var(--bad); }
.pk-state { position: absolute; left: 6px; top: 6px; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; }
.pk-state.ok { background: var(--ok); } .pk-state.bad { background: var(--bad); }
.pk-bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent); transition: width .3s; }
.lc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.lc-set { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, transform .2s var(--ease), box-shadow .2s; min-width: 0; }
.lc-set:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-1px); box-shadow: var(--shadow); }
.lc-set:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lc-set.custom { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }
.lc-set-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.lc-set.custom .lc-set-ico { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.lc-set-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lc-set-txt b { font-size: 13.5px; font-weight: 700; }
.lc-set-val { font-size: 12.5px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-set.custom .lc-set-val { color: var(--accent); font-weight: 600; }
.lc-set-edit { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 650; color: var(--accent); flex: none; }
.lc-toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; padding-top: 4px; }
.lc-chips .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: inline-block; line-height: 24px; }
.tp-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.tp-step { flex: 1 0 118px; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.tp-step b { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 11px; }
.tp-step > span:not(.tp-icons) { font-size: 11.5px; font-weight: 650; line-height: 1.2; }
.tp-icons { display: flex; gap: 3px; } .tp-icons i { width: 20px; height: 20px; border-radius: 6px; background: var(--surface); color: var(--mute); display: grid; place-items: center; }
.studio-nav { display: none; }
@media (max-width: 860px) {
  .new-src { grid-template-columns: 1fr; }
  .drop-big, .drop-lib { padding: 16px 14px; }
  .lc-grid, .lc-toggles { grid-template-columns: 1fr; }
  .pk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .studio-nav { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); margin: 0 0 14px; }
  .studio-nav a { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; border-radius: 10px; font-size: 12.5px; font-weight: 650; color: var(--mute); text-decoration: none; white-space: nowrap; }
  .studio-nav a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
  .studio-nav a svg { color: var(--accent); }
}
.studio-nav a { min-width: 0; }
.studio-nav .s { display: none; }
@media (max-width: 480px) { .studio-nav .l { display: none; } .studio-nav .s { display: inline; } }
@media (max-width: 860px) { .opt-title { flex-wrap: wrap; } .opt-title > .tiny { flex: 1 1 100%; padding-left: 30px; margin-top: -4px; } .modal-body { overflow-x: hidden; } }

/* Publier ce montage d'un geste (Et maintenant ?) */
.pub-all { margin-top: 8px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); }

/* « Cet écran » sur téléphone : compact, le bouton Compris dans le coin */
@media (max-width: 640px) {
  .guide { position: relative; padding: 10px 12px 12px; gap: 8px; margin-bottom: 14px; }
  .guide-what { font-size: 13px; line-height: 1.4; padding-right: 76px; }
  .guide-what b { font-size: 10.5px; margin-bottom: 2px; }
  .guide-steps { gap: 5px; }
  .guide-steps li { font-size: 12.5px; line-height: 1.35; gap: 8px; }
  .guide-steps li::before { width: 18px; height: 18px; font-size: 10.5px; }
  .guide > .btn { position: absolute; top: 10px; right: 10px; height: 30px; padding: 0 10px; }
}

/* iPhone : Safari zoome sur un champ de moins de 16 px ; cibles tactiles plus franches */
@media (max-width: 640px) {
  .input, .field input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), .field textarea, .field select, select.input, textarea.input, .nv-ctx-f textarea.input, .chat-input textarea, .palette input, .fsel { font-size: 16px; }
  button.chip, a.chip, .nv-filters .chip, .lib-cats button { min-height: 36px; padding: 0 13px; font-size: 13px; }
  .segmented button { height: 38px; }
  .btn.sm { height: 36px; }
  .nv-hooks .hk { padding: 10px 12px; }
}

/* À partir d'une vidéo : original → résultat */
.vv-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vv-thumb { width: 60px; height: 96px; border-radius: 10px; background: var(--surface-3) center/cover; flex: none; display: grid; place-items: center; color: var(--mute); }
.vv-thumb.ph { background: var(--surface-2); }
.vv-arrow { color: var(--mute); display: inline-flex; }

.vv-ideas .chip { white-space: normal; height: auto; min-height: 28px; padding: 5px 11px; text-align: left; line-height: 1.3; max-width: 100%; }

/* ---------- Refaire un reel : le lien en grand, quatre choix, une ligne par reel, la fiche avec le plan ---------- */
.at-hero { background: linear-gradient(160deg, var(--accent-soft), var(--surface) 70%); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.at-hero-head { display: flex; gap: 14px; align-items: flex-start; }
.at-hero-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.at-hero-ico svg { width: 22px; height: 22px; }
.at-hero-title { display: block; font-size: 20px; line-height: 1.2; margin: 2px 0 4px; }
.at-hero-link .input { font-size: 16px; }
.at-hero-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.at-hero-opts .segmented { flex-wrap: wrap; } .at-hero-opts .segmented button { flex: 1 1 auto; }
.at-hero-link-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.at-hero-link-card .at-hero-title { font-size: 18px; }
.vv-thumb.sm { width: 42px; height: 68px; border-radius: 8px; }
.rm-row { text-decoration: none; color: inherit; }
.rm-lines { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.rm-lines li { font-size: 14px; } .rm-lines li span + span { margin-left: 8px; }
.rm-shots { display: grid; gap: 6px; }
.rm-shot { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); }
.rm-shot.off { opacity: .6; }
.rm-shot-thumb { width: 36px; height: 58px; border-radius: 7px; background: var(--surface-3) center/cover; flex: none; display: grid; place-items: center; color: var(--mute); }
@media (max-width: 640px) {
  .at-hero-head { flex-direction: column; gap: 8px; }
  .at-hero-link { flex-wrap: wrap; } .at-hero-link .btn { width: 100%; }
  .at-hero-opts { grid-template-columns: 1fr; }
  .at-hero-link-card { flex-wrap: wrap; } .at-hero-link-card .btn { width: 100%; }
}

/* ---------- Créateurs suivis : cartes avec photo, fiche, grille de leurs vidéos ---------- */
.cr-add-row .input:first-child { flex: 1; min-width: 0; }
.cr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.cr-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; text-decoration: none; color: inherit; }
.cr-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface-2); }
.cr-avatar.ini { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent); background: var(--accent-soft); }
.cr-avatar.lg { width: 56px; height: 56px; } .cr-avatar.xl { width: 84px; height: 84px; font-size: 26px; }
.cr-head { display: flex; gap: 16px; align-items: flex-start; }
.cr-bio { white-space: pre-line; max-height: 4.6em; overflow: hidden; }
.cr-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cr-post { display: grid; gap: 5px; min-width: 0; }
.cr-post-thumb { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 10px; background: var(--surface-2) center / cover; color: var(--mute); }
.cr-post-thumb svg { position: absolute; inset: 0; margin: auto; }
.cr-dur { position: absolute; right: 6px; bottom: 6px; font-size: 11px; font-weight: 650; color: #fff; background: rgba(0,0,0,.55); padding: 1px 6px; border-radius: 6px; }
.cr-tag { position: absolute; left: 6px; top: 6px; font-size: 10.5px; font-weight: 700; color: var(--accent-ink); background: var(--accent); padding: 2px 6px; border-radius: 6px; }
.cr-post .btn.sm { padding: 0 8px; }
@media (max-width: 640px) {
  .row.nowrap.cr-add-row { flex-wrap: wrap; } .cr-add-row .input, .cr-add-row .btn { width: 100%; max-width: none !important; flex: 1 1 100%; }
  .cr-head { flex-wrap: wrap; } .cr-head > .btn { width: 100%; }
  .cr-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) { .studio-nav a { padding: 8px 2px; font-size: 11.5px; gap: 4px; } }

/* ===================== Design v4 — le fil : fait, maintenant, prévu ===================== */
.fil-filters { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 2px 0 10px; }
.fil-filters .lib-search { flex: 1 1 240px; }
.fil-filters .check.sm { padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.fil-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.fil-kinds .chip { height: 30px; white-space: nowrap; }
@media (max-width: 640px) { .fil-kinds { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin: 0 -16px 4px; padding-left: 16px; scrollbar-width: none; } }
.fday { font-size: 12.5px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; margin: 18px 2px 8px; }
.fday:first-child { margin-top: 6px; }
.fl { display: grid; grid-template-columns: 50px 26px minmax(0, 1fr) auto 26px; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 6px; cursor: pointer; text-align: left; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.fl:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.fl.quiet { opacity: .72; }
.fl.bad { border-left: 3px solid var(--bad); } .fl.warn { border-left: 3px solid var(--warn); }
.fl-t { font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; }
.fl-s { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--mute); }
.fl-s.ok { background: var(--ok-soft); color: var(--ok); } .fl-s.bad { background: var(--bad-soft); color: var(--bad); } .fl-s.warn { background: var(--warn-soft); color: var(--warn); } .fl-s.accent { background: var(--accent-soft); color: var(--accent); }
.fl-main { min-width: 0; font-size: 14px; line-height: 1.35; }
.fl-who { color: var(--mute); margin-right: 5px; }
.fl-who::after { content: '·'; margin-left: 5px; }
.fl-title { font-weight: 600; }
.fl-detail { display: block; color: var(--mute); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.fl-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.fl-chip.ok { background: var(--ok-soft); color: var(--ok); } .fl-chip.warn { background: var(--warn-soft); color: var(--warn); } .fl-chip.bad { background: var(--bad-soft); color: var(--bad); }
.fl-go { color: var(--mute); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; }
.fl-go:hover { background: var(--accent-soft); color: var(--accent); }
.fl.compact { padding: 7px 10px; margin-bottom: 4px; grid-template-columns: 46px 24px minmax(0, 1fr) auto 24px; }
.fl.compact .fl-main { font-size: 13.5px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.facts > div { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.now-card { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-decoration: none; color: inherit; }
.now-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.now-card .bar { margin-top: 6px; }
.now-eta { text-align: right; font-size: 12.5px; color: var(--mute); white-space: nowrap; display: grid; gap: 1px; }
.now-eta b { color: var(--ink); font-size: 14.5px; }
@media (max-width: 640px) {
  .fl { grid-template-columns: 44px 24px minmax(0, 1fr) 24px; gap: 8px; }
  .fl-meta { grid-column: 2 / span 2; justify-content: flex-start; }
  .fl-go { grid-row: 1; grid-column: 4; }
  .fl.compact { grid-template-columns: 42px 22px minmax(0, 1fr) 22px; }
  .now-card { grid-template-columns: 40px minmax(0, 1fr); }
  .now-eta { grid-column: 2; text-align: left; }
}

/* Accueil v4 : à faire, prévu, fil des 24 h */
.home-cols { align-items: start; }
.todo { display: grid; grid-template-columns: 30px minmax(0, 1fr) 18px; gap: 10px; align-items: center; padding: 8px 4px; text-decoration: none; color: inherit; border-top: 1px solid var(--line); }
.todo:first-child { border-top: 0; }
.todo-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--mute); }
.todo-ico.todo { background: var(--accent-soft); color: var(--accent); } .todo-ico.error { background: var(--bad-soft); color: var(--bad); } .todo-ico.warn { background: var(--warn-soft); color: var(--warn); } .todo-ico.ok { background: var(--ok-soft); color: var(--ok); }
.todo b { display: block; font-size: 14px; line-height: 1.3; } .todo small { display: block; color: var(--mute); font-size: 12.5px; }
.todo .todo-t { font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; min-width: 42px; }
.todo-go { color: var(--mute); }
.hero2 .actions .btn.verb { font-weight: 700; }
/* Studio v4 : trois portes, vidéos prêtes */
.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.door { display: grid; gap: 8px; align-content: start; padding: 18px; text-decoration: none; color: inherit; }
.door.primary { border-color: var(--accent); background: linear-gradient(160deg, var(--accent-soft), var(--surface) 70%); }
.door-ico { width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.door > b { font-size: 18px; letter-spacing: -.01em; }
.door .btn { justify-self: start; margin-top: 4px; }
.door-note { color: var(--accent); font-weight: 600; }
.piece-thumb { width: 52px; height: 68px; border-radius: 8px; background: var(--surface-3) center/cover; flex: none; }
.piece-pub { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.list-item.piece { align-items: center; }
@media (max-width: 800px) { .doors { grid-template-columns: 1fr; } }
/* Publier v4 : la semaine jour par jour */
.wk7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wk7-day { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; min-height: 230px; display: flex; flex-direction: column; gap: 6px; }
.wk7-day.today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.wk7-h { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 4px 6px; border-bottom: 1px solid var(--line); margin-bottom: 2px; font-size: 13px; }
.wk7-h b { text-transform: capitalize; } .wk7-day.today .wk7-h b { color: var(--accent); }
.wk7-h span { color: var(--mute); }
.wk7-post { display: flex; gap: 8px; align-items: flex-start; padding: 6px; border-radius: 10px; background: var(--surface-2); text-decoration: none; color: inherit; font-size: 12.5px; line-height: 1.3; }
.wk7-post:hover { background: var(--accent-soft); }
.wk7-post img, .wk7-post .ph { width: 30px; height: 40px; border-radius: 6px; object-fit: cover; flex: none; background: var(--surface-3); }
.wk7-post.published { border-left: 3px solid var(--ok); } .wk7-post.scheduled { border-left: 3px solid var(--accent); } .wk7-post.failed, .wk7-post.partial { border-left: 3px solid var(--bad); } .wk7-post.draft { opacity: .75; }
.wk7-post small { display: block; font-size: 11px; }
.pfdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.wk7-ev { display: block; padding: 5px 7px; border-radius: 9px; font-size: 12px; text-decoration: none; color: inherit; background: var(--gold-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk7-ev.deal { background: var(--accent-2-soft); }
.wk7-empty { color: var(--mute); font-size: 12px; text-align: center; margin: auto 0; }
@media (max-width: 900px) { .wk7 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .wk7-day { min-height: 120px; } }
@media (max-width: 560px) { .wk7 { grid-template-columns: minmax(0, 1fr); } .wk7-day { min-height: 0; } .wk7-day.empty:not(.today) { display: none; } }
/* Business : barre d'onglets commune (même composant que la barre Studio) */
.biz-nav { margin: 0 0 14px; }
.biz-nav { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); margin: 0 0 14px; max-width: 820px; }
.biz-nav a { flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; border-radius: 10px; font-size: 12.5px; font-weight: 650; color: var(--mute); text-decoration: none; white-space: nowrap; }
.biz-nav a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.biz-nav a svg { color: var(--accent); }

/* ===== Nombres et dates : jamais coupés ===== */
.fl-t { white-space: nowrap; }
.fl-t.day { font-size: 11px; font-weight: 600; letter-spacing: 0; }
.stat .value, .kpi .v, .lib-stats b, .now-eta b, .facts b, .fl-chip, .delta, .door-note, .wk7-h span { font-variant-numeric: tabular-nums; }
.stat .value, .kpi .v { overflow-wrap: normal; word-break: normal; }
.table td.num, .table th.r, .table td.date { white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 640px) {
  .biz-nav a svg { display: none; }
  .biz-nav a { padding: 8px 4px; font-size: 12px; }
}

/* ===== Plateau d'envoi des rushes ===== */
.up-tray { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(90px + env(safe-area-inset-bottom)); z-index: 60; width: min(460px, calc(100vw - 32px)); padding: 12px 14px; display: grid; gap: 8px; }
.up-tray .up-row { display: grid; gap: 4px; }
.up-tray .up-row .bar { height: 5px; }
.up-tray .up-hint { line-height: 1.35; }
@media (min-width: 1024px) { .up-tray { bottom: 24px; left: auto; right: 24px; transform: none; } }

/* ===== Médiathèque : mes catégories ===== */
.lib-mine { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -4px 0 12px; }
.lib-mine > .small { margin-right: 4px; }
.lib-mine .chip { height: 30px; cursor: pointer; border: 1px solid transparent; }
.lib-mine .chip .n { font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--mute); margin-left: 2px; }
.lib-mine .chip.on { background: var(--accent); color: #fff; } .lib-mine .chip.on .n { background: rgba(255, 255, 255, .22); color: #fff; }
.lib-mine .chip.out { background: transparent; border-color: var(--line-2); color: var(--ink-2); }
@media (max-width: 640px) { .lib-mine { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: -4px -16px 12px; padding: 0 16px 4px; } }
.up-tray .row.between { flex-wrap: wrap; }
.up-tray .num { white-space: nowrap; }

/* ===== Refaire un reel : trois étapes ===== */
.rm-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 4px 0; }
.rm-step .n { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; display: grid; place-items: center; margin-top: 1px; }
.rm-step.done .n { background: var(--ok-soft); color: var(--ok); }
.rm-step.off { opacity: .55; }
.rm-step h3 { margin: 0 0 8px; font-size: 15.5px; font-weight: 650; }
.rm-choices { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.rm-choices .choice:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.rm-choices .choice small.ok { color: var(--ok); font-weight: 600; } .rm-choices .choice small.down { color: var(--bad); font-weight: 600; }
.rm-go { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 4px; }
.rm-nets .chip { cursor: pointer; height: 30px; }
@media (max-width: 640px) { .rm-step { grid-template-columns: 24px minmax(0, 1fr); gap: 8px; } .rm-go .btn { width: 100%; justify-content: center; } }

/* ===== Montage : musique par réseau ===== */
.snd-rows { display: grid; gap: 8px; margin-top: 10px; }
.snd-row2 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.snd-row2 .snd-net { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 13px; min-width: 96px; }
.snd-row2 > .grow { flex: 1 1 220px; min-width: 0; }

/* ===== Format : badge sur les tuiles, carte « Modif rapide » ===== */
.rt-fmt { position: absolute; right: 8px; top: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.fmt-btns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fmt-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.fmt-btn:hover:not(:disabled) { border-color: var(--accent); }
.fmt-btn:disabled { cursor: default; opacity: .9; } .fmt-btn.cur { border-color: var(--accent); background: var(--accent-soft); }
.fmt-btn b { font-size: 13px; } .fmt-btn small { font-size: 10.5px; color: var(--mute); text-align: center; line-height: 1.2; }
.fmt-ico { display: block; border: 2px solid var(--accent); border-radius: 3px; }
.fmt-ico.r9-16 { width: 14px; height: 24px; } .fmt-ico.r16-9 { width: 28px; height: 16px; } .fmt-ico.r1-1 { width: 20px; height: 20px; } .fmt-ico.r4-5 { width: 18px; height: 22px; }
@media (max-width: 640px) { .fmt-btns { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== Sons tendance : choix sans défiler ===== */
.snd-top { display: flex; gap: 8px; align-items: center; }
.snd-genres { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.snd-genres .chip { flex: none; cursor: pointer; }
.snd-row.sel { cursor: pointer; } .snd-row.sel:hover { background: var(--accent-soft); } .snd-row.on { outline: 2px solid var(--accent); }
.snd-row .snd-pick { color: var(--accent); font-weight: 650; font-size: 12.5px; white-space: nowrap; }
@media (max-width: 640px) { .snd-list { max-height: calc(100dvh - 260px); } .snd-row .snd-pick span { display: none; } }

/* ===== Poste de réglage du son ===== */
.snd-studio .snd-sec { display: grid; gap: 8px; }
.snd-sec-t { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14.5px; }
.snd-sec-t .n { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.snd-cur { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.snd-cur img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; }
.snd-studio input[type=range] { width: 100%; }
.snd-studio .snd-list { max-height: 38vh; }
.fmt-card .segmented { flex-wrap: wrap; } .fmt-card .segmented button { flex: 1 1 auto; }

/* ===== Mini-lecteur du son (en bas du poste, façon Spotify) ===== */
.snd-player { position: sticky; bottom: -14px; z-index: 3; display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #15121f; color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); margin-top: 4px; }
.snd-player .mute, .snd-player .tiny { color: rgba(255, 255, 255, .72); }
.snd-player .btn.sm { background: #fff; color: #15121f; border: 0; }
.snd-play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.snd-bar { position: relative; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .18); margin-top: 6px; cursor: pointer; overflow: visible; }
.snd-bar i { position: absolute; top: 0; height: 100%; pointer-events: none; }
.snd-win { background: rgba(255, 255, 255, .28); border-radius: 5px; outline: 1px dashed rgba(255, 255, 255, .6); }
.snd-prog { left: 0; background: var(--accent); border-radius: 5px; }
.snd-dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; top: -2px; transform: translateX(-50%); box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }

/* ===== Bibliothèque : avis compacts sur téléphone ===== */
.lib-notices { display: contents; }
@media (max-width: 640px) { .lib-notices .notice p { display: none; } .lib-notices .notice { padding: 10px 12px; } }

/* ===== Refaire un reel : rushes choisis ===== */
.rm-rushes { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.rm-chosen { display: flex; flex-wrap: wrap; gap: 6px; }
.rm-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 3px 4px 3px 3px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; }
.rm-chip .th { width: 26px; height: 34px; border-radius: 6px; background: var(--surface-3) center / cover; flex: none; }
.rm-chip button { border: 0; background: none; color: var(--mute); cursor: pointer; padding: 2px; display: grid; place-items: center; }

/* ===== Lecteur unique, en bas à droite (façon Spotify) ===== */
.mini-player { position: fixed; right: 20px; bottom: 20px; z-index: 95; width: 340px; display: grid; grid-template-columns: 44px minmax(0, 1fr) 40px 22px; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 16px; background: #15121f; color: #fff; box-shadow: 0 12px 32px rgba(0, 0, 0, .35); animation: rise .2s var(--ease) both; }
.mp-cover { width: 44px; height: 44px; border-radius: 10px; background: #2a2440 center / cover; display: grid; place-items: center; color: rgba(255, 255, 255, .7); }
.mp-main { min-width: 0; display: grid; gap: 3px; }
.mp-title { font-weight: 650; font-size: 13px; }
.mp-bar { position: relative; height: 5px; margin: 4px 0 1px; border-radius: 3px; background: rgba(255, 255, 255, .2); cursor: pointer; }
.mp-bar::before { content: ''; position: absolute; inset: -9px 0; }
.mp-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: #fff; }
.mini-player.playing .mp-bar i { background: var(--accent); }
.mp-bar b { position: absolute; top: -4px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.mp-time { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 10.5px; color: rgba(255, 255, 255, .6); min-height: 20px; }
.mp-sub { flex: 1 1 auto; text-align: center; min-width: 0; color: rgba(255, 255, 255, .55); }
.mp-mark { display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 999px; padding: 2px 9px; background: #fff; color: #15121f; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.mp-play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: #15121f; display: grid; place-items: center; cursor: pointer; }
.mp-close { width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; cursor: pointer; align-self: start; }
@media (max-width: 760px) {
  .mini-player { left: 10px; right: 10px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom)); }
  body:has(.overlay) .mini-player { bottom: calc(80px + env(safe-area-inset-bottom)); }
  body:has(.mini-player) .overlay .modal-body { padding-bottom: 96px; }
}

/* ===== Poste « Musique de la vidéo » : 1) choisir, 2) régler sur la vidéo ===== */
.modal.music-modal { width: min(820px, 100%); display: flex; flex-direction: column; overflow: hidden; height: min(720px, calc(100dvh - 200px)); }
.modal.music-modal .modal-body { flex: 1 1 auto; min-height: 0; overflow: hidden; padding: 6px 20px 12px; display: flex; flex-direction: column; }
.modal.music-modal .modal-foot { position: static; align-items: center; flex-wrap: nowrap; }
.mu-sum { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); min-width: 0; overflow: hidden; }
.mu-sum > .ellipsis { min-width: 0; }
.mu-pick { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-height: 0; }
.mu-pick > :not(.mu-list) { flex: none; }
.mu-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.mu-cats .chip { cursor: pointer; height: 30px; }
.mu-cats .chip .n { font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--mute); margin-left: 4px; }
.mu-cats .chip.on .n { background: rgba(255, 255, 255, .22); color: inherit; }
.mu-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 4px; padding-right: 2px; }
.mu-row { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; }
.mu-row:hover { background: var(--surface-2); }
.mu-row.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.mu-row.special .mu-cover { background: var(--surface-3); color: var(--accent); }
.mu-cover { width: 40px; height: 40px; border-radius: 9px; flex: none; display: grid; place-items: center; background: #2a2440 center / cover; color: #fff; }
.mu-row:not(.special) .mu-cover svg { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.mu-check { width: 22px; display: grid; place-items: center; color: var(--accent); flex: none; }
.mu-adjust { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; flex: 1 1 auto; min-height: 0; align-items: start; }
.mu-video { position: relative; width: 100%; aspect-ratio: 9 / 16; max-height: 100%; border-radius: 14px; overflow: hidden; background: #000; cursor: pointer; }
.mu-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mu-play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #15121f; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); pointer-events: none; }
.mu-left { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; overflow-y: auto; max-height: 100%; }
.mu-track { display: grid; gap: 1px; min-width: 0; padding: 2px 2px 0; }
.mu-set { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.mu-set input[type=range] { width: 100%; accent-color: var(--accent); }
.mu-presets { display: flex; gap: 6px; flex-wrap: wrap; } .mu-presets .chip { cursor: pointer; height: 28px; }
@media (max-width: 760px) {
  .modal.music-modal { height: 92dvh; max-height: 92dvh; }
  .modal.music-modal .modal-body { padding: 6px 14px 10px; }
  .mu-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; }
  .mu-cats .chip { flex: none; }
  .mu-adjust { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
  .modal.music-modal .modal-foot { gap: 8px; padding: 10px 14px; }
  .modal.music-modal .modal-foot .btn { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 760px) { .sl-steps .sn:last-child.running b, .sl-steps .sn:nth-last-child(2).running b { left: auto; right: 0; transform: none; } .sl-steps .sn:first-child.running b { left: 0; transform: none; } }
/* Musique au lancement : le catalogue dans la fenêtre de réglage, liste bornée */
.lc-music .mu-pick { gap: 8px; } .lc-music .mu-list { max-height: min(52vh, 460px); }

/* ===== Quoi tourner : fiche courte dans la liste, fiche complète en feuille ===== */
.nv-lite { gap: 10px; padding: 12px; }
.nv-lite-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 18px; gap: 12px; align-items: start; cursor: pointer; }
.nv-thumb { width: 64px; height: 96px; border-radius: 10px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; color: var(--mute); }
.nv-lite .nv-title { font-size: 16px; margin: 6px 0 2px; line-height: 1.25; }
.nv-lite .nv-promise { margin: 0 0 4px; font-size: 13.5px; }
.nv-open { color: var(--mute); align-self: center; }
.nv-lite-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nv-lite-actions .nv-sel { margin-left: auto; }
.modal .nv-card { box-shadow: none; border: 0; padding: 0; animation: none; }
.bv-item { gap: 10px; align-items: center; }
.bv-num { display: grid; justify-items: end; line-height: 1.1; } .bv-num b { font-size: 15px; } .bv-num small { font-size: 11px; color: var(--mute); }

/* ===== Messages V2 (22/10) : « À traiter » / « Fans et autres », fiche plein écran sur téléphone ===== */
.inbox-grid { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); align-items: start; }
.inbox-list { max-height: calc(100dvh - 230px); overflow: auto; }
.inbox-filters { gap: 8px; align-items: center; }
.inbox-filters .chip { height: 32px; padding: 0 12px; }
@media (max-width: 900px) {
  .inbox-grid { grid-template-columns: 1fr; }
  .inbox-list { max-height: none; overflow: visible; }
  .inbox-sel .inbox-head, .inbox-sel .inbox-list { display: none; }
  .inbox-page:not(.inbox-sel) .inbox-detail { display: none; }
}

/* Résultats V2 (22/10) : comptes sur deux colonnes compactes au téléphone (6 comptes = 1 écran au lieu de 2,3). */
@media (max-width: 600px) {
  .pfcards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pfcard { padding: 12px; }
  .pfcard .kpi .v { font-size: 22px; }
  .pfcard .kpi .small { font-size: 11.5px; }
  .pfcard svg.spark { height: 30px; }
}
img.img-broken { visibility: hidden; }
@media (max-width: 600px) { .ret-chart svg text { font-size: 19px; } }
.nxt-res { margin-top: 14px; display: grid; gap: 4px; }
button.nxt-res-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--surface-2); border: 0; border-radius: 12px; padding: 10px 12px; cursor: pointer; color: inherit; font: inherit; }
button.nxt-res-row:hover { background: var(--accent-soft); }

/* Refaire un reel : le son, et le résultat sur la fiche (22/10) */
.rm-sound { display: flex; flex-wrap: wrap; gap: 6px; }
.rm-sound .chip { height: 34px; padding: 0 12px; gap: 6px; }
.rm-result { display: flex; gap: 18px; align-items: flex-start; }
.rm-player { flex: none; width: 240px; }
.rm-player video { width: 100%; aspect-ratio: 9 / 16; border-radius: 14px; background: #000; display: block; }
.rm-sound-box { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface-2); margin-top: 4px; }
@media (max-width: 640px) {
  .rm-result { flex-direction: column; }
  .rm-player { width: 100%; max-width: 320px; margin: 0 auto; }
}

/* Formules d'équipe au lancement d'un montage (22/10) */
.team-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.team-plan { display: grid; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.team-plan:hover { border-color: var(--accent); }
.team-plan.on { border-color: var(--accent); background: var(--accent-soft); }
.tp-step.off { opacity: .35; }
.tp-icons i.off { opacity: .3; }
@media (max-width: 760px) { .team-plans { grid-template-columns: 1fr; } }
/* Refaire un reel : vignettes qui se lisent, lecteur en fenêtre (22/10) */
button.rm-play { position: relative; border: 0; padding: 0; cursor: pointer; background-size: cover; background-position: center; }
.rm-play-ico { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .28); border-radius: inherit; transition: background .15s; }
button.rm-play:hover .rm-play-ico { background: rgba(0, 0, 0, .45); }
.rm-row-link { color: inherit; text-decoration: none; }
.modal.rm-video-modal { width: min(420px, calc(100vw - 32px)); }
.rm-modal-video { width: 100%; max-height: min(74dvh, 720px); aspect-ratio: 9 / 16; object-fit: contain; background: #000; border-radius: 14px; display: block; }

/* Réglages → Automatismes : une ligne par automatisme, l'état et le bouton à droite. */
.auto-row { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.auto-row:first-of-type { border-top: 0; }
.auto-row > .btn { flex: none; margin-top: 2px; }
@media (max-width: 600px) { .auto-row { flex-direction: column; gap: 8px; } }

/* Messages › Répondre en lot : une carte par message, la réponse à relire dessous. */
.batch-list { display: flex; flex-direction: column; gap: 10px; }
.batch-item { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--surface); }
.batch-item.off { opacity: .62; }
.batch-check { display: flex; padding-top: 2px; }
.batch-check input { width: 20px; height: 20px; accent-color: var(--accent); }

/* Retouches › Le texte à l'écran : aperçu 9:16 sur l'image de la vidéo, réglages à côté. */
.look-grid { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
.look-prev { position: relative; aspect-ratio: 9 / 16; background: #222 center / cover no-repeat; border-radius: 14px; overflow: hidden; flex: none; }
.look-prev-txt { position: absolute; left: 8%; right: 8%; text-align: center; overflow-wrap: anywhere; }
.look-row { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 700px) { .look-grid { grid-template-columns: 1fr; justify-items: center; } .look-grid > .stack { width: 100%; } }

/* Reel refait › Changer un plan : les rushes en vignettes, le moment au curseur avec l'aperçu. */
.shot-pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.shot-pick { display: flex; flex-direction: column; gap: 3px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; cursor: pointer; min-width: 0; }
.shot-pick.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.shot-pick-thumb { aspect-ratio: 9 / 16; border-radius: 8px; background: #222 center / cover no-repeat; }
.shot-pick.more { align-items: center; justify-content: center; color: var(--muted); }
.shot-video { width: 150px; aspect-ratio: 9 / 16; object-fit: cover; background: #000; border-radius: 12px; flex: none; }

/* Messages : trois zones ; messages privés comme dans les applis (non lus en rouge, sans réponse en bleu). */
.inbox-areas { margin: 4px 0 12px; }
.inbox-areas .segmented button { white-space: nowrap; }
/* Téléphone : les catégories tiennent sur une ligne qui glisse, la liste remonte. */
@media (max-width: 640px) { .inbox-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; } .inbox-cats::-webkit-scrollbar { display: none; } .inbox-cats .chip { flex: none; } }
.area-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--surface-2); color: var(--ink-2, var(--ink)); }
.area-n.red { background: var(--bad); color: #fff; }
.area-n.blue { background: var(--info); color: #fff; }
.dm-nets { display: flex; gap: 6px; flex-wrap: wrap; }
.dm-nets .chip { gap: 6px; }
.dm-row { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; align-items: flex-start; gap: 12px; }
.dm-row.on { background: var(--surface-2); }
.dm-row.unread b { font-weight: 800; }
.dm-row.unread .dm-prev { color: var(--ink); font-weight: 600; }
.dm-prev { color: var(--muted); }
.dm-dot { position: absolute; top: 0; right: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--bad); border: 2px solid var(--surface); }
.dm-dot.static { position: static; display: inline-block; vertical-align: -1px; border: 0; width: 9px; height: 9px; }
.dm-tag { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--info-soft); color: var(--info); }
.dm-ava { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex: none; background: var(--surface-2); }
.dm-ava img { width: 100%; height: 100%; object-fit: cover; }
.dm-thread { display: flex; flex-direction: column; gap: 10px; padding: 0; overflow: hidden; height: calc(100dvh - 230px); min-height: 420px; }
.dm-thead { gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.dm-msgs { flex: 1; overflow: auto; padding: 8px 14px; display: flex; flex-direction: column; gap: 6px; }
.dm-day { align-self: center; margin: 8px 0 2px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.dm-msg { display: flex; flex-direction: column; max-width: 78%; gap: 2px; }
.dm-msg.in { align-self: flex-start; }
.dm-msg.out { align-self: flex-end; align-items: flex-end; }
.dm-bubble { padding: 9px 13px; border-radius: 18px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.dm-msg.in .dm-bubble { background: var(--surface-2); border-bottom-left-radius: 6px; }
.dm-msg.out .dm-bubble { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.dm-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 14px 14px; border-top: 1px solid var(--line); }
.dm-compose textarea { resize: none; min-height: 44px; font-size: 16px; }
.dm-closed { padding: 12px 14px 14px; border-top: 1px solid var(--line); color: var(--muted); }
@media (max-width: 760px) { .dm-thread { height: calc(100dvh - 120px); } }

/* Reels à refaire aujourd'hui (veille du matin) */
.vl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.vl-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); min-width: 0; }
.vl-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--surface-2) center / cover no-repeat; color: var(--muted); }
.vl-views { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 12px; font-weight: 600; }
.vl-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; flex: 1; min-width: 0; }
.vl-title { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
@media (max-width: 760px) { .vl-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; } .vl-card { scroll-snap-align: start; } }
.vl-lane { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.vl-rushes { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.vl-rushes span { width: 30px; height: 40px; border-radius: 6px; background: var(--surface-2) center / cover no-repeat; border: 1px solid var(--line); }
.vl-rushes small { color: var(--mute); font-size: 12px; margin-left: 4px; }
.vl-shots { margin: 0; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }

/* Explorer : les vidéos des comptes suivis */
.ex-creators { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.ex-cr { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; width: 70px; padding: 6px 2px; border-radius: 12px; border: 1px solid transparent; background: none; cursor: pointer; font-size: 12px; color: var(--ink-2); }
.ex-cr .cr-avatar { width: 48px; height: 48px; }
.ex-cr span.ellipsis { max-width: 66px; }
.ex-cr.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.ex-grid.compact { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.ex-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); min-width: 0; }
.ex-card.off { opacity: .55; }
.ex-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 9 / 14; background: var(--surface-2) center / cover no-repeat; color: var(--mute); }
.ex-views { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 12px; font-weight: 600; }
.ex-body { display: flex; flex-direction: column; gap: 5px; padding: 9px 10px 10px; flex: 1; min-width: 0; }
.ex-title { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ex-who { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); text-decoration: none; min-width: 0; }
.cr-avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.ex-acts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.ex-acts .btn.sm { padding: 0 8px; }
@media (max-width: 760px) { .ex-grid, .ex-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.ex-grid.home-hot { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ex-grid.home-hot .ex-thumb { aspect-ratio: 4 / 5; }
@media (max-width: 760px) { .ex-grid.home-hot { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Écrans tactiles (téléphone, iPad, paysage) : la liste des messages et les conversations défilent avec la page, jamais dans une
   petite boîte (un iPhone Pro Max en paysage dépasse 900 px : la liste faisait 200 px de haut et ne défilait pas au doigt). */
@media (pointer: coarse) {
  .inbox-list { max-height: none; overflow: visible; }
  .dm-thread { height: auto; min-height: 0; overflow: visible; }
  .dm-msgs { overflow: visible; flex: none; }
  .dm-compose { position: sticky; bottom: calc(62px + env(safe-area-inset-bottom)); background: var(--surface); z-index: 5; border-radius: 0 0 var(--r) var(--r); }
}
.inbox-list, .dm-msgs { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.dm-msgs { min-height: 0; }
/* Rushes présélectionnés : visibles (lecture au clic), changeables */
.vl-rush { position: relative; width: 34px; height: 46px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface-2) center / cover no-repeat; cursor: pointer; display: grid; place-items: center; color: #fff; padding: 0; }
.vl-rush svg { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.vl-change { border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 12.5px; cursor: pointer; padding: 2px 4px; margin-left: auto; }
.rm-chosen.big { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.rm-rush { position: relative; display: grid; gap: 3px; min-width: 0; }
.rm-rush .th { aspect-ratio: 9 / 14; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2) center / cover no-repeat; cursor: pointer; display: grid; place-items: center; color: #fff; padding: 0; }
.rm-rush .th svg { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .7)); }
.rm-rush .x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; cursor: pointer; }
.rm-row-acts { display: flex; align-items: center; gap: 2px; flex: none; }
@media (max-width: 760px) { .rm-row-acts { flex-direction: column; align-items: flex-end; } }
.cr-post.off { opacity: .5; }

/* ===== Carte vidéo unique (veille, explorateur, fiche d'un créateur, Aujourd'hui) ===== */
.vc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.vc { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
a.vc:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.vc.off { opacity: .55; }
.vc-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; background: var(--surface-2) center / cover no-repeat; color: var(--mute); }
.vc-views { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 12px; font-weight: 600; }
.vc-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 11px 11px; flex: 1; min-width: 0; }
.vc-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.vc-chips .chip { height: 22px; font-size: 11.5px; padding: 0 8px; }
.vc-title { font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.vc-who { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); text-decoration: none; min-width: 0; }
.vc-who img, .vc-ini { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex: none; }
.vc-ini { display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 800; }
.vc-meta { font-size: 12px; color: var(--mute); }
.vc-why { font-size: 12.5px; line-height: 1.4; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vc-acts { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-top: 4px; }
.vc-acts .btn.sm { width: 100%; justify-content: center; }
.vc-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.vc-act { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-height: 32px; padding: 0 4px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-act span { overflow: hidden; text-overflow: ellipsis; }
.vc-act svg { flex: none; }
.vc-act:hover { border-color: var(--accent); color: var(--accent); }
.vc-act:disabled { opacity: .5; cursor: default; }
@media (max-width: 760px) {
  .vc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vc-act { min-height: 36px; }
}
.vc-grid.home-hot { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .vc-grid.home-hot { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.vl-rushes { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.vc-acts .btn.sm { white-space: normal; height: auto; min-height: 34px; line-height: 1.2; padding: 6px 8px; text-align: center; }

/* ===================== Finitions (23/10/2026) ===================== */
/* Chiffres à chasse fixe : compteurs, durées, vues, heures et tableaux ne bougent plus quand ils changent. */
.kpi, .kpi .v, .num, .chip, .badge, .vc-views, .vl-views, .ex-views, .rt-dur, .cr-dur, .dur, .fl, .fl time, time, td, th, .dm-day, .bv-num, .rm-chosen .tiny, .vc-meta { font-variant-numeric: tabular-nums; }
/* Titres équilibrés, paragraphes courts sans mot orphelin. */
h1, h2, h3, h4, .card-title, .section-title, .vc-title, .ex-title, .vl-title, .modal-head h2, .notice b, .at-hero-title { text-wrap: balance; }
.page-head p, .notice p, .vc-why, .small.mute, .tiny.mute { text-wrap: pretty; }
/* Appui : un léger rétrécissement, des transitions précises (jamais « all »). */
.btn, button.chip, a.chip, .vc-act, .choice, .segmented button, .ex-cr, .vl-rush, .rm-rush .th { transition: transform .12s cubic-bezier(.22, 1, .36, 1), background-color .15s ease-out, border-color .15s ease-out, box-shadow .15s ease-out, color .15s ease-out; }
.btn:active:not(:disabled), button.chip:active, a.chip:active, .vc-act:active:not(:disabled), .choice:active, .segmented button:active, .ex-cr:active { transform: scale(.97); }
/* Images : un liseré discret, jamais teinté, qui suit le thème. */
.vc-thumb, .cr-avatar, .vc-who img, .rt-img img, .vl-rush, .rm-rush .th, .lib-group-thumbs a, .pub-thumb { outline: 1px solid color-mix(in srgb, var(--ink) 9%, transparent); outline-offset: -1px; }
/* Écran tactile : des cibles au doigt et des champs à 16 px (sinon iOS zoome). */
@media (pointer: coarse) {
  .btn { min-height: 40px; }
  .btn.sm { min-height: 36px; }
  .btn.icon { min-width: 40px; }
  button.chip, a.chip { min-height: 34px; padding-left: 12px; padding-right: 12px; }
  .segmented button { min-height: 36px; }
  .vc-act { min-height: 38px; }
  .check input[type=checkbox], .check input[type=radio] { width: 22px; height: 22px; }
  input:not([type=checkbox]):not([type=radio]):not([type=range]), textarea, select { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn:active:not(:disabled), button.chip:active, a.chip:active, .vc-act:active:not(:disabled), .choice:active, .segmented button:active, .ex-cr:active { transform: none; }
  a.vc:hover { transform: none; }
}
@media (pointer: coarse) { .rt-check, .rt-fav { width: 36px; height: 36px; font-size: 15px; } }
.auto-band { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-size: 13.5px; line-height: 1.45; }
.auto-band svg { color: var(--accent); flex: none; margin-top: 2px; }
.auto-band a { flex: none; font-weight: 600; color: var(--accent); }

/* Accueil : le résumé du jour mène à « À faire aujourd'hui ». */
.hero2 .hero-sum { display: block; background: none; border: 0; padding: 0; font-family: inherit; font-weight: inherit; line-height: inherit; color: inherit; text-align: left; cursor: pointer; }
.hero2 .hero-sum:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --- Langues : sélecteur, arabe (droite à gauche, police Tajawal) --- */
.lang-switch { display: inline-flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--surface-2); margin: 6px 10px; }
.lang-switch button { font: 600 11.5px/1 var(--sans, inherit); letter-spacing: .04em; color: var(--mute); background: none; border: 0; border-radius: 8px; padding: 7px 9px; cursor: pointer; min-width: 34px; }
.lang-switch button:hover { color: var(--text); }
.lang-switch button.on { background: var(--surface); color: var(--accent); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.lang-switch.floating { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 14px; z-index: 50; margin: 0; }
[dir="rtl"] .lang-switch.floating { right: auto; left: 14px; }
.nav-min .lang-switch { flex-direction: column; }
@font-face { font-family: 'Tajawal'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('fonts/cap-tajawal-500.woff') format('woff'); }
@font-face { font-family: 'Tajawal'; font-style: normal; font-weight: 700 900; font-display: swap; src: url('fonts/cap-tajawal-800.woff') format('woff'); }
[lang="ar"] body, [lang="ar"] input, [lang="ar"] button, [lang="ar"] textarea, [lang="ar"] select { font-family: 'Tajawal', 'Inter', 'Segoe UI', system-ui, sans-serif; }
[lang="ar"] .serif, [lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3 { font-family: 'Tajawal', 'Inter', system-ui, sans-serif; letter-spacing: 0; }
[lang="ar"] body { font-size: 15.5px; line-height: 1.65; }
[dir="rtl"] .side { border-right: 0; border-left: 1px solid var(--line); }
[dir="rtl"] .nav-item.on::before { left: auto; right: -12px; }
[dir="rtl"] .search input { padding: 0 40px 0 14px; }
[dir="rtl"] .search svg { left: auto; right: 13px; }
[dir="rtl"] .toasts { right: auto; left: 20px; }
[dir="rtl"] .fab { right: auto; left: 22px; padding: 0 14px 0 18px; }
[dir="rtl"] .panel { right: auto; left: 0; }
[dir="rtl"] .bell .dotc { right: auto; left: 6px; }
[dir="rtl"] .media-tile .thumb .badge, [dir="rtl"] .ig-badge, [dir="rtl"] .ig-views, [dir="rtl"] .tile .tl-badges { left: auto; right: 8px; }
[dir="rtl"] .media-tile .thumb .dur, [dir="rtl"] .media-tile .pick, [dir="rtl"] .tile .dur2, [dir="rtl"] .tile .sel-dot { right: auto; left: 8px; }
[dir="rtl"] .modal-foot { justify-content: flex-start; }
[dir="rtl"] .kbd, [dir="rtl"] .mono, [dir="rtl"] code, [dir="rtl"] input[type="email"], [dir="rtl"] input[type="url"], [dir="rtl"] input[type="password"], [dir="rtl"] input[type="number"] { direction: ltr; unicode-bidi: isolate; text-align: left; }
[dir="rtl"] .num, [dir="rtl"] .tabular { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 760px) {
  [dir="rtl"] .toasts { left: 16px; right: auto; }
  [dir="rtl"] .panel { left: 12px; right: auto; }
  [dir="rtl"] .dock .badge { left: auto; right: 55%; }
}
