/* Sillage — système visuel. Chaleureux, éditorial, 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: Fraunces; src: url(fonts/fraunces-latin-wght-normal.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Fraunces; src: url(fonts/fraunces-latin-wght-italic.woff2) format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  --bg: #f6f1ea; --surface: #fffdf9; --surface-2: #f1eae0; --surface-3: #e9e0d4;
  --ink: #1d1915; --ink-2: #4a433c; --mute: #857b70; --line: #e6ddd1; --line-2: #d8cdbf;
  --accent: #c4532d; --accent-ink: #ffffff; --accent-soft: #f6e1d6; --accent-2: #2a5a63; --accent-2-soft: #dbe9ea;
  --gold: #d79a3b; --gold-soft: #f7e7c8;
  --ok: #2f7a4d; --ok-soft: #dcefe2; --warn: #a8691a; --warn-soft: #f6e6c9; --bad: #b3261e; --bad-soft: #f8dcd8; --info: #2b5c9e; --info-soft: #dde7f5;
  --shadow: 0 1px 2px rgba(40, 28, 16, .06), 0 6px 24px rgba(40, 28, 16, .06);
  --shadow-lg: 0 12px 48px rgba(40, 28, 16, .18);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948; --s-other: #a39a8f;
  --r: 16px; --r-sm: 11px; --r-lg: 22px;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: Fraunces, 'Iowan Old Style', Georgia, serif;
  --side: 248px; --top: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #13110f; --surface: #1c1916; --surface-2: #25211d; --surface-3: #2e2924;
    --ink: #f3ece3; --ink-2: #d5ccc1; --mute: #a1968a; --line: #302a24; --line-2: #3d362f;
    --accent: #e37a52; --accent-ink: #1a0f0a; --accent-soft: #3a241b; --accent-2: #7fb3ba; --accent-2-soft: #1d3034;
    --gold: #e6b25c; --gold-soft: #3a2f1c;
    --ok: #6cc08d; --ok-soft: #1c3226; --warn: #e3a64e; --warn-soft: #3a2c17; --bad: #f0857c; --bad-soft: #3c1e1b; --info: #8db4ea; --info-soft: #1c2a3d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 24px rgba(0, 0, 0, .25); --shadow-lg: 0 12px 48px rgba(0, 0, 0, .5);
    --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"] {
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767; --s-other: #6f665c;
  --bg: #13110f; --surface: #1c1916; --surface-2: #25211d; --surface-3: #2e2924;
  --ink: #f3ece3; --ink-2: #d5ccc1; --mute: #a1968a; --line: #302a24; --line-2: #3d362f;
  --accent: #e37a52; --accent-ink: #1a0f0a; --accent-soft: #3a241b; --accent-2: #7fb3ba; --accent-2-soft: #1d3034;
  --gold: #e6b25c; --gold-soft: #3a2f1c;
  --ok: #6cc08d; --ok-soft: #1c3226; --warn: #e3a64e; --warn-soft: #3a2c17; --bad: #f0857c; --bad-soft: #3c1e1b; --info: #8db4ea; --info-soft: #1c2a3d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 24px rgba(0, 0, 0, .25); --shadow-lg: 0 12px 48px rgba(0, 0, 0, .5);
  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; }
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; }
.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; } }
