/* ───────── Régie — système visuel ─────────
   Épuré, arrondi, une seule couleur d'accent.
   Clair par défaut, sombre selon le système, ou forcé via [data-mode]. */
:root {
  color-scheme: light;
  --bg: #f3f3f1;
  --bg-2: #ecece9;
  --side-bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f6f4;
  --surface-3: #ededea;
  --line: rgba(20, 20, 24, .07);
  --line-2: rgba(20, 20, 24, .13);
  --text: #121214;
  --text-2: #5c5c64;
  --text-3: #9b9ba3;
  --shadow-sm: 0 1px 2px rgba(18, 18, 24, .05);
  --shadow: 0 1px 2px rgba(18, 18, 24, .04), 0 8px 24px -10px rgba(18, 18, 24, .10);
  --shadow-lg: 0 2px 6px rgba(18, 18, 24, .05), 0 18px 40px -14px rgba(18, 18, 24, .18);
  --shadow-pop: 0 0 0 1px rgba(18, 18, 24, .06), 0 24px 60px -16px rgba(18, 18, 24, .28);
  --glass: rgba(255, 255, 255, .72);

  --accent: #2f6bff;
  --accent-2: #2457df;
  --accent-ink: #ffffff;
  --accent-text: #2456d6;
  --accent-soft: rgba(47, 107, 255, .10);
  --ok: #18a058;
  --warn: #d08a00;
  --danger: #e5484d;
  --danger-soft: rgba(229, 72, 77, .10);

  --c-pro: #3b82f6;
  --c-call: #14b8a6;
  --c-rdv: #8b5cf6;
  --c-tournage: #f97316;
  --c-montage: #eab308;
  --c-ecriture: #22c55e;
  --c-livraison: #f43f5e;
  --c-perso: #ec4899;
  --c-anniv: #c026d3;
  --c-cours: #0891b2;

  --paper: #ffffff;
  --paper-ink: #1b1b1f;
  --paper-line: #e7e5e1;

  --f-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Geist", "Segoe UI", system-ui, sans-serif;
  --f-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Geist", "Segoe UI", system-ui, sans-serif;
  --f-mono: "SF Mono", "Geist Mono", ui-monospace, Menlo, Consolas, monospace;
  --f-script: "Courier Prime", "Courier New", Courier, monospace;
  --f-serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --r-xs: 8px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --side-w: 256px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #09090b;
    --bg-2: #0e0e11;
    --side-bg: #111114;
    --surface: #131316;
    --surface-2: #1a1a1e;
    --surface-3: #232328;
    --line: rgba(255, 255, 255, .07);
    --line-2: rgba(255, 255, 255, .13);
    --text: #f4f4f5;
    --text-2: #a1a1aa;
    --text-3: #6b6b74;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px -14px rgba(0, 0, 0, .7);
    --shadow-lg: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 20px 44px -16px rgba(0, 0, 0, .8);
    --shadow-pop: 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 70px -18px rgba(0, 0, 0, .85);
    --glass: rgba(19, 19, 22, .72);
    --accent: #4d8bff;
    --accent-2: #6a9dff;
    --accent-text: #86adff;
    --accent-soft: rgba(77, 139, 255, .14);
    --ok: #3ccf7f;
    --warn: #f5b93d;
    --danger: #ff6369;
    --danger-soft: rgba(255, 99, 105, .13);
    --paper: #f8f8f6;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b; --bg-2: #0e0e11; --side-bg: #111114; --surface: #131316; --surface-2: #1a1a1e; --surface-3: #232328;
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .13);
  --text: #f4f4f5; --text-2: #a1a1aa; --text-3: #6b6b74;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 20px 44px -16px rgba(0, 0, 0, .8);
  --shadow-pop: 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 70px -18px rgba(0, 0, 0, .85);
  --glass: rgba(19, 19, 22, .72);
  --accent: #4d8bff; --accent-2: #6a9dff; --accent-text: #86adff; --accent-soft: rgba(77, 139, 255, .14);
  --ok: #3ccf7f; --warn: #f5b93d; --danger: #ff6369; --danger-soft: rgba(255, 99, 105, .13);
  --paper: #f8f8f6;
}
/* choix fait dans l'app : prioritaire sur le thème de l'hôte */
:root[data-mode="light"] {
  color-scheme: light;
  --bg: #f3f3f1; --bg-2: #ecece9; --side-bg: #ffffff; --surface: #ffffff; --surface-2: #f6f6f4; --surface-3: #ededea;
  --line: rgba(20, 20, 24, .07); --line-2: rgba(20, 20, 24, .13);
  --text: #121214; --text-2: #5c5c64; --text-3: #9b9ba3;
  --shadow-sm: 0 1px 2px rgba(18, 18, 24, .05);
  --shadow: 0 1px 2px rgba(18, 18, 24, .04), 0 8px 24px -10px rgba(18, 18, 24, .10);
  --shadow-lg: 0 2px 6px rgba(18, 18, 24, .05), 0 18px 40px -14px rgba(18, 18, 24, .18);
  --shadow-pop: 0 0 0 1px rgba(18, 18, 24, .06), 0 24px 60px -16px rgba(18, 18, 24, .28);
  --glass: rgba(255, 255, 255, .72);
  --accent: #2f6bff; --accent-2: #2457df; --accent-text: #2456d6; --accent-soft: rgba(47, 107, 255, .10);
  --ok: #18a058; --warn: #d08a00; --danger: #e5484d; --danger-soft: rgba(229, 72, 77, .10);
  --paper: #ffffff;
}
:root[data-mode="dark"], .force-dark {
  color-scheme: dark;
  --bg: #09090b; --bg-2: #0e0e11; --side-bg: #111114; --surface: #131316; --surface-2: #1a1a1e; --surface-3: #232328;
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .13);
  --text: #f4f4f5; --text-2: #a1a1aa; --text-3: #6b6b74;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 20px 44px -16px rgba(0, 0, 0, .8);
  --shadow-pop: 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 70px -18px rgba(0, 0, 0, .85);
  --glass: rgba(19, 19, 22, .72);
  --accent: #4d8bff; --accent-2: #6a9dff; --accent-text: #86adff; --accent-soft: rgba(77, 139, 255, .14);
  --ok: #3ccf7f; --warn: #f5b93d; --danger: #ff6369; --danger-soft: rgba(255, 99, 105, .13);
  --paper: #f8f8f6;
}
/* couleurs d'accent au choix (réglages) */
:root[data-accent="vert"] { --accent: #12a150; --accent-2: #0e8a44; --accent-text: #0f8a45; --accent-soft: rgba(18, 161, 80, .11); }
:root[data-accent="violet"] { --accent: #7357ff; --accent-2: #5f45e8; --accent-text: #6246ea; --accent-soft: rgba(115, 87, 255, .11); }
:root[data-accent="orange"] { --accent: #f2711c; --accent-2: #d95f0e; --accent-text: #c95a10; --accent-soft: rgba(242, 113, 28, .12); }
:root[data-accent="rose"] { --accent: #e5397b; --accent-2: #cc2a69; --accent-text: #c92a68; --accent-soft: rgba(229, 57, 123, .11); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-mode="light"])[data-accent="vert"] { --accent: #2fcf7a; --accent-text: #5ee39a; --accent-soft: rgba(47, 207, 122, .14); }
  :root:not([data-theme="light"]):not([data-mode="light"])[data-accent="violet"] { --accent: #8e78ff; --accent-text: #ab9bff; --accent-soft: rgba(142, 120, 255, .15); }
  :root:not([data-theme="light"]):not([data-mode="light"])[data-accent="orange"] { --accent: #ff8a3d; --accent-text: #ffa56a; --accent-soft: rgba(255, 138, 61, .14); }
  :root:not([data-theme="light"]):not([data-mode="light"])[data-accent="rose"] { --accent: #ff5c97; --accent-text: #ff86b0; --accent-soft: rgba(255, 92, 151, .14); }
}
:root[data-mode="dark"][data-accent="vert"], :root[data-theme="dark"]:not([data-mode="light"])[data-accent="vert"] { --accent: #2fcf7a; --accent-text: #5ee39a; --accent-soft: rgba(47, 207, 122, .14); }
:root[data-mode="dark"][data-accent="violet"], :root[data-theme="dark"]:not([data-mode="light"])[data-accent="violet"] { --accent: #8e78ff; --accent-text: #ab9bff; --accent-soft: rgba(142, 120, 255, .15); }
:root[data-mode="dark"][data-accent="orange"], :root[data-theme="dark"]:not([data-mode="light"])[data-accent="orange"] { --accent: #ff8a3d; --accent-text: #ffa56a; --accent-soft: rgba(255, 138, 61, .14); }
:root[data-mode="dark"][data-accent="rose"], :root[data-theme="dark"]:not([data-mode="light"])[data-accent="rose"] { --accent: #ff5c97; --accent-text: #ff86b0; --accent-soft: rgba(255, 92, 151, .14); }

/* ───────── base ───────── */
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-ui);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .25s ease, color .25s ease;
}
* { box-sizing: border-box; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--accent-text); text-decoration: none; }
::selection { background: color-mix(in srgb, var(--accent) 26%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; font-family: var(--f-display); letter-spacing: -0.022em; }
p { margin: 0; }
kbd { font-family: var(--f-ui); font-size: 11px; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text-3); border: 1px solid var(--line); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.lg { width: 22px; height: 22px; }
.tc, .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.eyebrow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); }
.display { font-family: var(--f-display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.06; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* ───────── coquille ───────── */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); height: 100%; }
.side {
  margin: 10px 0 10px 10px;
  background: var(--side-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  transition: background-color .25s ease;
}
.side-head { padding: 16px 14px 10px 16px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; }
.brand-mark svg { width: 30px; height: 30px; display: block; }
.brand-name { font-family: var(--f-display); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.side-close { display: none !important; }
.side-nav { flex: 1; overflow-y: auto; padding: 6px 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px;
  height: 38px; padding: 0 10px; border-radius: var(--r-sm);
  color: var(--text-2); font-weight: 500; font-size: 14px; text-align: left; width: 100%;
  transition: background-color .15s ease, color .15s ease;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.nav-item[aria-current="page"] > svg { color: var(--accent); }
.nav-item .count { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.nav-sep { margin: 18px 10px 6px; display: flex; justify-content: space-between; align-items: center; }
.nav-sep button { color: var(--text-3); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; transition: background-color .15s, color .15s; }
.nav-sep button:hover { color: var(--text); background: var(--surface-2); }
.ptile {
  width: 22px; height: 22px; border-radius: 7px; flex: none; overflow: hidden;
  background: linear-gradient(135deg, var(--pc), color-mix(in srgb, var(--pc) 55%, #000));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.ptile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav-proj .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-new { color: var(--text-3); }
.side-foot { padding: 10px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); }
.storage { padding: 6px 8px 2px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-3); }
.storage b { color: var(--text); font-weight: 600; }
.me-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-sm); text-align: left; width: 100%; transition: background-color .15s; }
.me-row:hover { background: var(--surface-2); }
.me-row .who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.me-row .who b { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-row .who span { font-size: 12px; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); display: inline-block; }
.sync-dot.on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.sync-dot.local { background: var(--warn); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { height: 62px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 18px 0 22px; }
.menu-btn { display: none !important; }
.crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; font-size: 13.5px; color: var(--text-3); }
.crumbs button { padding: 5px 8px; border-radius: 8px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; transition: background-color .15s, color .15s; }
.crumbs button:hover { background: var(--surface-2); color: var(--text); }
.crumbs button:last-child { color: var(--text); font-weight: 600; }
.crumbs .sep { color: var(--text-3); opacity: .6; display: inline-flex; }
.search-pill {
  display: inline-flex; align-items: center; gap: 9px; height: 36px; padding: 0 8px 0 12px;
  width: min(340px, 34vw); border-radius: 999px; color: var(--text-3); font-size: 13.5px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.search-pill:hover { border-color: var(--line-2); }
.search-pill span { flex: 1; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.timer-pill { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.timer-pill .pd { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.view { flex: 1; overflow-y: auto; min-height: 0; outline: none; }
.view.anim > * { animation: viewIn .38s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }
.page { max-width: 1260px; margin: 0 auto; padding: 6px clamp(16px, 3vw, 34px) 72px; }
.scrim { display: none; }
.peers { display: flex; align-items: center; padding: 0 6px 0 10px; }
.peer-av { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--bg); margin-left: -8px; object-fit: cover; background: var(--surface-3); }
.peers .av { margin-left: -8px; border: 2px solid var(--bg); }

/* en-tête de page */
.ph { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 10px 0 24px; }
.ph-l { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ph h1 { font-size: clamp(24px, 2.6vw, 30px); font-weight: 700; letter-spacing: -0.03em; }
.ph p { color: var(--text-2); margin-top: 3px; font-size: 14px; }
.ph-r { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tile {
  width: 52px; height: 52px; border-radius: 15px; flex: none; display: grid; place-items: center;
  color: var(--tc, var(--accent));
  background: linear-gradient(160deg, color-mix(in srgb, var(--tc, var(--accent)) 14%, var(--surface)), color-mix(in srgb, var(--tc, var(--accent)) 28%, var(--surface)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc, var(--accent)) 22%, transparent), var(--shadow-sm);
}
.tile svg.i { width: 24px; height: 24px; stroke-width: 1.8; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 30px 0 12px; }
.section-title h2 { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .13em; color: var(--text-3); font-family: var(--f-ui); }
.link-btn { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 13px; font-weight: 500; padding: 4px 6px; border-radius: 8px; transition: color .15s, background-color .15s; }
.link-btn:hover { color: var(--text); background: var(--surface-2); }
.tb-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

/* ───────── contrôles ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm);
  font-weight: 550; font-size: 13.5px; white-space: nowrap; color: var(--text);
  transition: background-color .15s, border-color .15s, transform .12s var(--ease), box-shadow .15s, filter .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 1px 2px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.18); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn.round { border-radius: 999px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-icon, .icon-btn {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  display: inline-grid; place-items: center; color: var(--text-2); flex: none;
  transition: background-color .15s, color .15s, transform .12s var(--ease);
}
.btn-icon:hover, .icon-btn:hover { background: var(--surface-2); color: var(--text); }
.btn-icon:active, .icon-btn:active { transform: scale(.94); }
.btn-icon.on { background: var(--accent-soft); color: var(--accent-text); }
.btn-icon.sm, .icon-btn.sm { width: 28px; height: 28px; border-radius: 8px; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { height: 28px; padding: 0 12px; border-radius: 999px; color: var(--text-2); font-size: 13px; font-weight: 550; display: inline-flex; align-items: center; gap: 6px; transition: background-color .18s var(--ease), color .15s, box-shadow .18s; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="range"]), .field select, .field textarea, select.input {
  width: 100%; min-height: 38px; padding: 8px 12px;
  background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-sm);
  outline: none; transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.field textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { background: var(--surface-3); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
input[type="color"] { border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); padding: 3px; cursor: pointer; }
input[type="range"] { accent-color: var(--accent); width: 100%; }
.search { position: relative; }
.search > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search input { padding-left: 36px !important; border-radius: 999px !important; background: var(--surface) !important; border: 1px solid var(--line) !important; box-shadow: var(--shadow-sm); }
.search input:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 4px var(--accent-soft) !important; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); transition: transform .15s var(--ease), box-shadow .15s; }
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 550; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.chip .d { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.c { background: color-mix(in srgb, var(--cc) 13%, transparent); color: color-mix(in srgb, var(--cc) 78%, var(--text)); }
.chip.demo { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-3); height: 20px; font-size: 11px; padding: 0 8px; }
.chip-btn { cursor: pointer; transition: opacity .15s, background-color .15s; }
label.chip { cursor: pointer; }
.chip-btn[aria-pressed="false"] { opacity: .45; }
.chip-btn:hover { opacity: 1; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: color-mix(in srgb, var(--bc, var(--accent)) 13%, transparent); color: color-mix(in srgb, var(--bc, var(--accent)) 80%, var(--text)); }
.av {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  font-size: 11.5px; font-weight: 650; color: #fff; letter-spacing: .01em;
  background: color-mix(in srgb, var(--avc, #64748b) 82%, #3a3a44);
}
.av.sm { width: 24px; height: 24px; font-size: 9.5px; }
.av.lg { width: 52px; height: 52px; font-size: 17px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--cc, var(--accent)); }

.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 8px; }
.panel-head h2 { font-size: 15px; font-weight: 650; letter-spacing: -0.015em; }
.panel-body { padding: 4px 18px 18px; }
.empty {
  border: 1.5px dashed var(--line-2); border-radius: var(--r-lg);
  padding: 40px 24px; text-align: center; color: var(--text-2);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.empty .tile { margin-bottom: 4px; }
.empty h3 { color: var(--text); font-size: 16px; font-weight: 650; }
.empty p { max-width: 46ch; }

/* onglets en pilule */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 0 24px; padding: 4px; background: var(--surface-3); border-radius: 999px; width: max-content; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 7px; height: 34px;
  padding: 0 14px; color: var(--text-2); font-weight: 550; font-size: 13.5px;
  border-radius: 999px; white-space: nowrap;
  transition: background-color .2s var(--ease), color .15s, box-shadow .2s;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.tab[aria-selected="true"] svg { color: var(--accent); }
.tab .n { font-size: 11px; font-weight: 650; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* modale */
.modal-bg {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(8, 8, 12, .42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 16px;
  /* une seule rangée qui remplit l'écran : la fenêtre ne peut pas dépasser et son contenu défile */
  grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr);
  animation: fade .2s ease-out;
}
.modal {
  width: min(560px, 100%); max-height: min(100%, calc(100dvh - 32px));
  display: flex; flex-direction: column; overflow: hidden; min-height: 0;
  background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop);
  animation: pop .32s var(--ease);
}
.modal.wide { width: min(840px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 6px; gap: 12px; }
.modal-head h2 { font-size: 18px; font-weight: 700; }
.modal-body { flex: 1 1 auto; padding: 12px 22px 8px; overflow-y: auto; min-height: 0; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal-head, .modal-foot { flex: none; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 16px 22px 20px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }

.toasts { position: fixed; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 550; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: toastIn .35s var(--ease); max-width: 90vw; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }

.menu {
  position: fixed; z-index: 85; min-width: 200px;
  background: var(--surface); border-radius: var(--r);
  box-shadow: var(--shadow-pop); padding: 6px;
  animation: pop .22s var(--ease); transform-origin: top right;
}
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; text-align: left; transition: background-color .12s; }
.menu button:hover { background: var(--surface-2); }
.menu button.danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }

/* palette ⌘K */
.palette-bg { position: fixed; inset: 0; z-index: 90; background: rgba(8, 8, 12, .38); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: fade .18s ease-out; }
.palette { width: min(620px, 100%); background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-pop); overflow: hidden; animation: pop .28s var(--ease); }
.palette-in { display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.palette-in svg { color: var(--text-3); }
.palette-in input { flex: 1; height: 56px; border: 0; outline: none; background: transparent; font-size: 16px; }
.palette-list { max-height: min(56vh, 460px); overflow-y: auto; padding: 8px; }
.palette-group { padding: 10px 10px 4px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); }
.palette-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 11px; text-align: left; }
.palette-item .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.palette-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.palette-item .s { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.palette-item[aria-selected="true"] { background: var(--accent-soft); }
.palette-item[aria-selected="true"] .ic { background: var(--accent); color: var(--accent-ink); }
.palette-foot { display: flex; gap: 14px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
.palette-empty { padding: 28px; text-align: center; color: var(--text-3); }

/* ───────── accueil ───────── */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: 18px 0 28px; }
.hero .eyebrow { margin-bottom: 12px; display: block; }
.hero h1 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 750; letter-spacing: -0.035em; line-height: 1.04; }
.hero h1 .accent { color: var(--accent); display: block; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; text-align: left;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat .eyebrow { font-size: 10.5px; }
.stat b { font-family: var(--f-display); font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--text-2); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.home-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.home-col > .section-title:first-child { margin-top: 30px; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.list-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.ev-row { display: grid; grid-template-columns: 10px 128px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 18px; text-align: left; width: 100%; transition: background-color .15s; }
.ev-row + .ev-row { border-top: 1px solid var(--line); }
.ev-row:hover { background: var(--surface-2); }
.ev-row .dot { width: 8px; height: 8px; }
.ev-row .t { font-size: 13px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.ev-row .ti { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.ev-row .sub { font-size: 12.5px; color: var(--text-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-line { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.task-line:last-child { border-bottom: 0; }
.task-line .ti { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.check {
  width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none;
  display: grid; place-items: center; color: transparent; background: transparent;
  transition: background-color .2s var(--ease), border-color .2s, transform .2s var(--ease);
}
.check:hover { border-color: var(--accent); }
.check.on { background: color-mix(in srgb, var(--ok) 13%, transparent); border-color: color-mix(in srgb, var(--ok) 75%, transparent); color: var(--ok); }
.check svg { width: 12px; height: 12px; stroke-width: 3; }
.notepad { width: 100%; min-height: 140px; resize: vertical; background: transparent; border: 0; outline: none; line-height: 1.6; font-size: 14.5px; color: var(--text); }
.due { font-size: 12px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 4px; }
.due.late { color: var(--danger); }
.due.soon { color: var(--warn); }
.timer { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 6px 0 4px; }
.timer-ring { position: relative; width: 148px; height: 148px; }
.timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring circle { fill: none; stroke-width: 7; }
.timer-ring .bg { stroke: var(--surface-3); }
.timer-ring .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .9s linear; }
.timer-ring .val { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-display); font-size: 34px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.timer-mode { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }

/* ───────── cartes projet ───────── */
.pcard {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; text-align: left;
  min-height: 186px; padding: 18px 18px 16px; border-radius: var(--r-lg); overflow: hidden; color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.22), transparent 55%),
    linear-gradient(140deg, var(--pc), color-mix(in srgb, var(--pc) 52%, #05050a));
  box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 14px 30px -14px color-mix(in srgb, var(--pc) 70%, transparent);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  isolation: isolate;
}
.pcard:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 22px 40px -16px color-mix(in srgb, var(--pc) 80%, transparent); }
.pcard > img.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.pcard.has-cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.72)); }
.pcard .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pcard .client { font-size: 12.5px; font-weight: 550; opacity: .85; }
.pcard .fmt-ic { opacity: .55; }
.pcard .fmt-ic svg.i { width: 34px; height: 34px; stroke-width: 1.4; }
.pcard h3 { font-size: 23px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin-top: 18px; }
.pcard .code { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .7; margin-top: 4px; }
.pcard .bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 16px; }
.glass { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: #fff; background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); white-space: nowrap; }
.pcard .open { transition: background-color .2s, transform .25s var(--ease); }
.pcard:hover .open { background: rgba(255,255,255,.26); }
.pcard:hover .open svg { transform: translateX(2px); }
.pcard .open svg { transition: transform .25s var(--ease); }
.pcard-new {
  min-height: 186px; border-radius: var(--r-lg); border: 1.5px dashed var(--line-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--text-3); font-weight: 550; transition: border-color .2s, color .2s, background-color .2s;
}
.pcard-new:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.pcard-new .plus { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); transition: background-color .2s, transform .3s var(--ease), color .2s; }
.pcard-new:hover .plus { background: var(--accent); color: var(--accent-ink); transform: rotate(90deg); }

/* fiche projet */
.proj-hd { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin: 8px 0 20px; }
.proj-hd-l { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ptile-lg { width: 60px; height: 60px; border-radius: 17px; flex: none; overflow: hidden; display: grid; place-items: center; color: #fff;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.25), transparent 55%), linear-gradient(140deg, var(--pc), color-mix(in srgb, var(--pc) 52%, #05050a));
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--pc) 80%, transparent), inset 0 0 0 1px rgba(255,255,255,.14); }
.ptile-lg img { width: 100%; height: 100%; object-fit: cover; }
.ptile-lg svg.i { width: 26px; height: 26px; }
.proj-hd h1 { font-size: clamp(26px, 3vw, 32px); font-weight: 750; letter-spacing: -0.035em; line-height: 1.1; }
.proj-hd .meta { color: var(--text-2); margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 14px; }
.proj-hd .meta .sep { color: var(--text-3); }
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.step {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 6px; border-radius: 999px;
  font-size: 12.5px; font-weight: 550; color: var(--text-3); background: transparent; box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background-color .25s var(--ease), color .2s, box-shadow .2s;
}
.step .n { width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; background: var(--surface-3); color: var(--text-3); }
.step .n svg { width: 11px; height: 11px; stroke-width: 3; }
.step.done { color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.step.done .n { background: color-mix(in srgb, var(--pc) 22%, transparent); color: var(--pc); }
.step.cur { color: #fff; background: var(--pc); box-shadow: 0 6px 16px -8px var(--pc); }
.step.cur .n { background: rgba(255,255,255,.25); color: #fff; }
.step:hover:not(.cur) { color: var(--text); box-shadow: inset 0 0 0 1px var(--text-3); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.logline { font-size: 18px; line-height: 1.55; color: var(--text); max-width: 62ch; letter-spacing: -0.012em; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 12px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; }
.meter { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .6s var(--ease); }

/* ───────── kanban ───────── */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: var(--surface-3); border-radius: var(--r-lg); padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 180px; transition: background-color .2s, box-shadow .2s; }
.kcol.over { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 6px; }
.kcol-head h3 { font-size: 13.5px; font-weight: 650; font-family: var(--f-ui); letter-spacing: -0.01em; }
.kcol-head .n { font-size: 12px; font-weight: 600; color: var(--text-3); }
.kcol-head .led { width: 8px; height: 8px; border-radius: 50%; }
.kadd { display: flex; }
.kadd input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; background: color-mix(in srgb, var(--surface) 60%, transparent); border: 1px dashed var(--line-2); border-radius: 11px; outline: none; transition: background-color .15s, border-color .15s, box-shadow .15s; }
.kadd input:focus { border-style: solid; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.kcard {
  background: var(--surface); border-radius: 13px; box-shadow: var(--shadow-sm), 0 0 0 1px var(--line);
  padding: 12px 13px; display: flex; flex-direction: column; gap: 9px; cursor: grab; text-align: left; width: 100%;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), opacity .2s;
}
.kcard:hover { box-shadow: var(--shadow), 0 0 0 1px var(--line-2); transform: translateY(-1px); }
.kcard.dragging { opacity: .35; transform: scale(.98); }
.kcard .ti { font-weight: 550; line-height: 1.35; }
.kcard.done .ti { text-decoration: line-through; color: var(--text-3); }
.kcard-foot { display: flex; align-items: center; gap: 8px; }
.prio { font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 999px; }
.prio.haute { color: var(--danger); background: var(--danger-soft); }
.prio.moyenne { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }

/* ───────── équipe ───────── */
.team-group { margin-bottom: 26px; }
.team-group > .eyebrow { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.team-grid.list { grid-template-columns: 1fr; gap: 8px; }
.mcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px 18px; display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.mcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.team-grid.list .mcard { padding: 10px 14px; }
.team-grid.list .mcard .av.lg { width: 38px; height: 38px; font-size: 13px; }
.mcard .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mcard h3 { font-size: 15px; font-weight: 650; font-family: var(--f-ui); letter-spacing: -0.012em; }
.mcard .mail { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }

/* ───────── docs ───────── */
.doc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.doc-thumb { display: flex; flex-direction: column; gap: 9px; text-align: left; }
.doc-thumb .sheet {
  aspect-ratio: 1 / 1.3; background: var(--paper); border-radius: 12px; box-shadow: var(--shadow), 0 0 0 1px var(--line);
  padding: 16px 15px; overflow: hidden; color: var(--paper-ink); position: relative;
  font-family: var(--f-serif); font-size: 6px; line-height: 1.5;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.doc-thumb:hover .sheet { transform: translateY(-3px); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); }
.doc-thumb .sheet::after { content: ""; position: absolute; inset: auto 0 0; height: 42%; background: linear-gradient(transparent, var(--paper)); }
.doc-thumb .sheet h1 { font-family: var(--f-display); font-size: 11.5px; margin-bottom: 4px; }
.doc-thumb .sheet h2 { font-family: var(--f-display); font-size: 8px; margin: 4px 0 2px; }
.doc-thumb .sheet h3 { font-size: 5px; letter-spacing: .1em; text-transform: uppercase; color: #888; }
.doc-thumb .sheet table { width: 100%; border-collapse: collapse; }
.doc-thumb .sheet td, .doc-thumb .sheet th { border: .5px solid #ddd; }
.doc-thumb .name { font-weight: 600; font-size: 14px; }
.doc-new .sheet { display: grid; place-items: center; align-content: center; gap: 8px; background: transparent; border: 1.5px dashed var(--line-2); box-shadow: none; color: var(--text-3); font-family: var(--f-ui); font-size: 13.5px; font-weight: 550; text-align: center; }
.doc-new:hover .sheet { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); box-shadow: none; }
.doc-new .sheet::after { display: none; }

.full-tab { height: 100%; padding: 0 10px 10px; }
.full-tab > * { height: 100%; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.doc-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.doc-outline { border-right: 1px solid var(--line); padding: 18px 12px; overflow-y: auto; background: var(--surface); }
.doc-outline a { display: block; color: var(--text-2); font-size: 13px; padding: 6px 10px; border-radius: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background-color .15s, color .15s; }
.doc-outline a:hover { background: var(--surface-2); color: var(--text); }
.doc-outline a.h2 { padding-left: 20px; }
.doc-outline a.h3 { padding-left: 30px; font-size: 12.5px; }
.doc-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); position: relative; }
.doc-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.doc-title-input { background: transparent; border: 0; outline: none; font-size: 15.5px; font-weight: 650; min-width: 120px; flex: 1; letter-spacing: -0.015em; padding: 6px 8px; border-radius: 8px; transition: background-color .15s; }
.doc-title-input:hover, .doc-title-input:focus { background: var(--surface-2); }
.doc-status { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.toolbar {
  display: flex; align-items: center; gap: 2px; padding: 5px 8px; flex-wrap: wrap;
  margin: 12px auto 0; width: max-content; max-width: calc(100% - 24px);
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line);
  position: relative; z-index: 3; flex: none;
}
.toolbar .sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 5px; }
.toolbar select { height: 30px; background: var(--surface-2); border: 0; border-radius: 8px; padding: 0 8px; font-size: 13px; outline: none; cursor: pointer; }
.toolbar select:hover { background: var(--surface-3); }
.toolbar .btn-icon { width: 30px; height: 30px; border-radius: 8px; }
.toolbar .tb-color { position: relative; }
.toolbar .tb-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.toolbar .tb-color .bar { position: absolute; left: 8px; right: 8px; bottom: 5px; height: 3px; border-radius: 2px; }
.doc-scroll { flex: 1; overflow-y: auto; padding: 22px 16px 90px; }
.doc-page {
  width: min(816px, 100%); min-height: 1056px; margin: 0 auto;
  background: var(--paper); color: var(--paper-ink);
  padding: clamp(28px, 8vw, 88px) clamp(22px, 9vw, 96px);
  border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 20px 50px -20px rgba(0,0,0,.25);
  font-family: var(--f-serif); font-size: 16px; line-height: 1.68;
  outline: none; letter-spacing: 0;
}
.doc-page:empty::before { content: attr(data-ph); color: #9a9a9a; }
.doc-page h1 { font-family: var(--f-display); font-weight: 750; font-size: 34px; line-height: 1.1; letter-spacing: -0.03em; margin: .2em 0 .5em; }
.doc-page h2 { font-family: var(--f-display); font-weight: 700; font-size: 21px; margin: 1.6em 0 .5em; letter-spacing: -0.02em; }
.doc-page h3 { font-family: var(--f-ui); font-size: 11.5px; text-transform: uppercase; letter-spacing: .14em; font-weight: 650; margin: 1.6em 0 .4em; color: #8a8580; }
.doc-page p { margin: 0 0 .85em; }
.doc-page blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 3px solid #2f6bff; font-style: italic; color: #4a4a50; font-size: 18px; }
.doc-page ul, .doc-page ol { margin: 0 0 1em; padding-left: 1.4em; }
.doc-page li { margin: .2em 0; }
.doc-page img { max-width: 100%; border-radius: 8px; display: block; margin: 1em auto; }
.doc-page hr { border: 0; border-top: 1px solid var(--paper-line); margin: 2em 0; }
.doc-page a { color: #2456d6; text-decoration: underline; text-underline-offset: 2px; }
.doc-page table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 14px; }
.doc-page td, .doc-page th { border: 1px solid var(--paper-line); padding: 8px 11px; vertical-align: top; }
.doc-page th { background: #f5f4f1; text-align: left; font-family: var(--f-ui); font-size: 12.5px; font-weight: 650; }
.doc-page .callout { background: #f2f5ff; border-radius: 10px; padding: 14px 16px; margin: 1em 0; font-family: var(--f-ui); font-size: 14.5px; line-height: 1.55; }
.doc-page ul.checklist { list-style: none; padding-left: .2em; }
.doc-page ul.checklist li { position: relative; padding-left: 1.8em; }
.doc-page ul.checklist li::before { content: ""; position: absolute; left: 0; top: .32em; width: 14px; height: 14px; border: 1.5px solid #9a958c; border-radius: 50%; }
.doc-page ul.checklist li.done { color: #9a958c; text-decoration: line-through; }
.doc-page ul.checklist li.done::before { background: #18a058; border-color: #18a058; }
.doc-page .slug { font-family: var(--f-script); font-weight: 700; text-transform: uppercase; margin-top: 1.4em; }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--accent-soft); color: var(--text); font-size: 13.5px; }

/* ───────── séquencier ───────── */
.seq-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.seq-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.seq-stats span { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); font-size: 12.5px; color: var(--text-2); }
.seq-stats b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.seq-part { margin-bottom: 26px; }
.seq-part-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.seq-part-head h3 { font-size: 14px; font-weight: 650; font-family: var(--f-ui); letter-spacing: -0.01em; }
.seq-part-head .rule { flex: 1; height: 1px; background: var(--line); }
.seq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.scard {
  background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow), 0 0 0 1px var(--line);
  display: flex; flex-direction: column; text-align: left; cursor: grab; position: relative;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), opacity .2s;
}
.scard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); }
.scard.dragging { opacity: .35; }
.scard.drop-before { box-shadow: -4px 0 0 var(--accent), var(--shadow); }
.scard-band { height: 0; }
.scard-img { aspect-ratio: 16 / 9; background: var(--surface-3); overflow: hidden; }
.scard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scard-body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 7px; }
.scard-num { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.scard-num b { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 8px; font-size: 12px; font-weight: 700; color: var(--sc); background: color-mix(in srgb, var(--sc) 15%, transparent); }
.slugline { font-family: var(--f-script); font-weight: 700; font-size: 13px; text-transform: uppercase; line-height: 1.3; letter-spacing: 0; }
.scard-sum { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.scard-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.scard-add { display: grid !important; place-items: center; min-height: 130px; box-shadow: none !important; border: 1.5px dashed var(--line-2); color: var(--text-3); cursor: pointer !important; background: transparent !important; }
.scard-add:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft) !important; transform: none !important; }
.strip-wrap { overflow-x: auto; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line); padding: 0 0 14px; }
.strip-ruler { position: relative; height: 30px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.strip-ruler span { position: absolute; top: 8px; font-family: var(--f-mono); font-size: 10.5px; color: var(--text-3); padding-left: 5px; border-left: 1px solid var(--line-2); height: 22px; }
.strip { display: flex; gap: 3px; padding: 0 10px; min-width: max-content; }
.clip {
  height: 80px; border-radius: 10px; padding: 7px 9px; overflow: hidden; text-align: left;
  background: color-mix(in srgb, var(--sc) 20%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sc) 45%, transparent);
  display: flex; flex-direction: column; gap: 2px; flex: none; min-width: 34px; transition: background-color .15s, transform .2s var(--ease);
}
.clip:hover { background: color-mix(in srgb, var(--sc) 32%, var(--surface)); transform: translateY(-1px); }
.clip b { font-size: 11.5px; font-weight: 700; }
.clip span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 550; }
.clip i { font-style: normal; font-family: var(--f-mono); font-size: 10.5px; color: var(--text-2); margin-top: auto; }

/* ───────── slides ───────── */
.deck-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.deck-thumb { display: flex; flex-direction: column; gap: 9px; text-align: left; }
.deck-thumb .frame { border-radius: 14px; overflow: hidden; box-shadow: var(--shadow), 0 0 0 1px var(--line); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.deck-thumb:hover .frame { transform: translateY(-3px); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); }
.slide-render { position: relative; width: 1600px; height: 900px; transform-origin: 0 0; overflow: hidden; letter-spacing: normal; }
.slide-render .el { position: absolute; overflow: hidden; }
.slide-render .el.text { overflow: visible; white-space: pre-wrap; word-wrap: break-word; }
.slide-render .el img { width: 100%; height: 100%; display: block; }
.scaled { position: relative; overflow: hidden; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.scaled > .slide-render { position: absolute; left: 0; top: 0; }
.sl-shell { display: grid; grid-template-columns: 196px minmax(0, 1fr) 276px; min-height: 0; }
.sl-rail { border-right: 1px solid var(--line); overflow-y: auto; padding: 14px 12px 40px; display: flex; flex-direction: column; gap: 12px; }
.sl-rail .thumb { display: grid; grid-template-columns: 18px 1fr; gap: 6px; align-items: start; text-align: left; }
.sl-rail .thumb .no { font-size: 11px; font-weight: 600; color: var(--text-3); padding-top: 3px; font-variant-numeric: tabular-nums; }
.sl-rail .thumb .scaled { border-radius: 8px; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s var(--ease); }
.sl-rail .thumb[aria-current="true"] .scaled { box-shadow: 0 0 0 2px var(--accent), 0 6px 16px -8px var(--accent); }
.sl-rail .thumb.drop-before .scaled { box-shadow: 0 -4px 0 var(--accent); }
.sl-stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.sl-toolbar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sl-canvas-wrap { flex: 1; min-height: 0; display: grid; place-items: center; padding: 24px; overflow: hidden; }
.sl-canvas { position: relative; border-radius: 6px; overflow: visible; box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 24px 60px -20px rgba(0,0,0,.4); }
.sl-canvas .slide-render .el { cursor: move; }
.sl-canvas .slide-render .el.sel { outline: 3px solid var(--accent); outline-offset: 2px; }
.sl-canvas .slide-render .el[contenteditable="true"] { cursor: text; outline-style: dashed; }
.handle { position: absolute; width: 22px; height: 22px; background: var(--accent); border: 4px solid #fff; border-radius: 50%; right: -13px; bottom: -13px; cursor: nwse-resize; z-index: 5; }
.sl-insp { border-left: 1px solid var(--line); overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.layouts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.layouts button { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--text-2); text-align: left; }
.layouts .lt { aspect-ratio: 16/9; border-radius: 8px; position: relative; overflow: hidden; box-shadow: 0 0 0 1px var(--line-2); transition: box-shadow .2s, transform .2s var(--ease); }
.layouts .lt i { position: absolute; border-radius: 2px; opacity: .65; }
.layouts button:hover .lt { box-shadow: 0 0 0 2px var(--accent); transform: translateY(-1px); }
.present { position: fixed; inset: 0; z-index: 100; background: #000; display: grid; place-items: center; cursor: none; animation: fade .3s ease; }
.present .scaled { background: #000; }
.present-ui { position: fixed; bottom: 18px; right: 18px; display: flex; gap: 6px; align-items: center; color: #bbb; font-size: 12.5px; z-index: 101; opacity: 0; transition: opacity .25s; cursor: default; padding: 6px; border-radius: 999px; background: rgba(20,20,22,.8); backdrop-filter: blur(10px); }
.present:hover .present-ui { opacity: 1; }
.present-ui span { padding: 0 8px; font-variant-numeric: tabular-nums; }
.present-ui button { color: #eee; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.08); }
.present-ui button:hover { background: rgba(255,255,255,.16); }

/* ───────── tableau blanc ───────── */
.board-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.board-thumb { display: flex; flex-direction: column; gap: 9px; text-align: left; }
.board-thumb .mini {
  aspect-ratio: 16/10; border-radius: 14px; position: relative; overflow: hidden;
  background: var(--surface) radial-gradient(circle, var(--line-2) 1px, transparent 1.2px) 0 0 / 14px 14px;
  box-shadow: var(--shadow), 0 0 0 1px var(--line); transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.board-thumb:hover .mini { transform: translateY(-3px); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); }
.board-thumb .mini i { position: absolute; border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.bd-shell { position: relative; overflow: hidden; background: var(--bg) !important; touch-action: none; }
.bd-viewport { position: absolute; inset: 0; overflow: hidden; cursor: default; background-image: radial-gradient(circle, var(--line-2) 1px, transparent 1.3px); }
.bd-viewport.panning { cursor: grabbing; }
.bd-viewport.tool-note, .bd-viewport.tool-text, .bd-viewport.tool-rect, .bd-viewport.tool-ellipse, .bd-viewport.tool-frame, .bd-viewport.tool-pen { cursor: crosshair; }
.bd-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.bd-links { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.bd-links path { stroke: var(--text-2); stroke-width: 2; fill: none; }
.bd-item { position: absolute; user-select: none; }
.bd-item.sel { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.bd-item .txt { width: 100%; height: 100%; outline: none; overflow: hidden; white-space: pre-wrap; word-wrap: break-word; }
.bd-item[data-type="note"] { padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 10px 24px -10px rgba(0,0,0,.3); color: #1d1b16; font-size: 16px; line-height: 1.38; border-radius: 10px; }
.bd-item[data-type="text"] { color: var(--text); font-size: 22px; font-weight: 650; line-height: 1.25; letter-spacing: -0.02em; }
.bd-item[data-type="rect"], .bd-item[data-type="ellipse"] { border: 2px solid var(--bc); border-radius: 14px; display: grid; place-items: center; text-align: center; padding: 10px; color: var(--text); font-size: 16px; font-weight: 550; background: color-mix(in srgb, var(--bc) 10%, transparent); }
.bd-item[data-type="ellipse"] { border-radius: 50%; }
.bd-item[data-type="frame"] { border-radius: 20px; background: color-mix(in srgb, var(--surface) 70%, transparent); box-shadow: 0 0 0 1px var(--line-2); }
.bd-item[data-type="frame"] .ftitle { position: absolute; top: -32px; left: 4px; font-weight: 650; font-size: 16px; color: var(--text-2); white-space: nowrap; letter-spacing: -0.01em; }
.bd-item[data-type="image"] img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 10px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.35); pointer-events: none; }
.bd-item[data-type="ink"] svg { overflow: visible; display: block; pointer-events: none; }
.bd-item .rz { position: absolute; right: -9px; bottom: -9px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); cursor: nwse-resize; display: none; }
.bd-item.sel .rz { display: block; }
.bd-tools { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); z-index: 5; display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 16px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); }
.bd-top { position: absolute; left: 14px; right: 14px; top: 14px; z-index: 5; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.bd-top > * { pointer-events: auto; }
.bd-pill { display: flex; align-items: center; gap: 6px; padding: 5px 8px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 14px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); }
.bd-pill input { background: transparent; border: 0; outline: none; font-weight: 650; width: 220px; max-width: 40vw; padding: 4px 6px; border-radius: 7px; }
.bd-pill input:focus { background: var(--surface-2); }
.bd-zoom { position: absolute; right: 14px; bottom: 14px; z-index: 5; }
.bd-ctx { position: absolute; z-index: 6; display: flex; gap: 4px; padding: 6px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-pop); align-items: center; animation: pop .2s var(--ease); }
.cursor-peer { position: absolute; z-index: 7; pointer-events: none; transform: translate(-2px, -2px); transition: left .08s linear, top .08s linear; }
.cursor-peer span { position: absolute; left: 14px; top: 16px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: #fff; white-space: nowrap; }

/* ───────── références ───────── */
.refs-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.folder-list { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; }
.folder-list button { display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 10px; border-radius: 10px; color: var(--text-2); text-align: left; font-weight: 500; transition: background-color .15s, color .15s; }
.folder-list button:hover { background: var(--surface-2); color: var(--text); }
.folder-list button[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.folder-list .n { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.rcard { display: flex; flex-direction: column; gap: 9px; text-align: left; }
.rcard-poster {
  aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden; position: relative;
  background: linear-gradient(160deg, color-mix(in srgb, var(--rc) 22%, var(--surface)), color-mix(in srgb, var(--rc) 40%, var(--surface)));
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 16px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.rcard:hover .rcard-poster { transform: translateY(-3px); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); }
.rcard-poster.wide { aspect-ratio: 1 / 1; }
.rcard-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rcard-poster .ptitle { position: relative; font-family: var(--f-display); font-weight: 750; font-size: 22px; line-height: 1.05; letter-spacing: -0.03em; color: color-mix(in srgb, var(--rc) 55%, var(--text)); }
.rcard-poster .ptype { position: absolute; top: 10px; left: 10px; background: var(--glass) !important; backdrop-filter: blur(8px); color: var(--text) !important; }
.rcard h4 { font-size: 14px; font-weight: 650; font-family: var(--f-ui); letter-spacing: -0.012em; }
.rcard .by { font-size: 12.5px; color: var(--text-3); }
.rcard .why { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ───────── drive ───────── */
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.ftile { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); text-align: left; transition: transform .25s var(--ease), box-shadow .25s var(--ease); min-width: 0; }
.ftile:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 0 0 1px var(--line-2); }
.ftile .fic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--accent-text); background: var(--accent-soft); flex: none; }
.ftile .nm { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ftile .nm b { font-weight: 600; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--f-mono); letter-spacing: 0; }
.ftile .nm span { font-size: 12px; color: var(--text-3); }
.drive-wrap { position: relative; }
.drive-wrap.over::after { content: "Déposez pour importer"; position: absolute; inset: -8px; border-radius: var(--r-lg); border: 2px dashed var(--accent); background: var(--accent-soft); display: grid; place-items: center; font-weight: 650; color: var(--accent-text); font-size: 15px; z-index: 4; }
.ftable-wrap { overflow-x: auto; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.ftable { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.ftable th { text-align: left; font-weight: 600; font-size: 12px; color: var(--text-3); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ftable td { padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ftable tr:last-child td { border-bottom: 0; }
.ftable tbody tr { transition: background-color .12s; }
.ftable tbody tr:hover td { background: var(--surface-2); }
.fname { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fname .ficon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--fc) 14%, transparent); color: var(--fc); }
.fname span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.hint { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 13px; margin: 16px 2px 0; }
.cloud-note { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); margin-top: 18px; font-size: 13.5px; color: var(--text-2); }
.cloud-note b { color: var(--text); }

/* ───────── review ───────── */
.rv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.rv-card { display: flex; flex-direction: column; text-align: left; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow), 0 0 0 1px var(--line); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.rv-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); }
.rv-card .poster { aspect-ratio: 16/9; background: #0b0b0d; position: relative; display: grid; place-items: center; color: #555; overflow: hidden; }
.rv-card .poster video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rv-card .poster .ver { position: absolute; top: 10px; left: 10px; font-size: 11.5px; font-weight: 650; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); color: #fff; padding: 3px 9px; border-radius: 999px; }
.rv-card .poster .play { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(6px); transition: transform .3s var(--ease); }
.rv-card:hover .poster .play { transform: scale(1.08); }
.rv-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.rv-card h3 { font-size: 15px; font-weight: 650; font-family: var(--f-ui); letter-spacing: -0.012em; }
.rv-card .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); }
.status-pill { font-size: 11.5px; font-weight: 650; padding: 3px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.wip { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.status-pill.sent { background: color-mix(in srgb, var(--c-pro) 15%, transparent); color: var(--c-pro); }
.status-pill.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }

.rv-shell { display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: 0; background: #0b0b0d !important; color: var(--text); }
.rv-stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.rv-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; flex-wrap: wrap; }
.rv-top .ttl { min-width: 0; flex: 1; }
.rv-top .title { font-weight: 650; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; display: block; }
.rv-top .sub { font-size: 12px; color: var(--text-3); }
.pill-select { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill-select select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.pill-select .d { width: 7px; height: 7px; border-radius: 50%; background: var(--cc, var(--warn)); }
.rv-video-wrap { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; padding: 4px 16px 10px; }
.rv-video-wrap video { max-width: 100%; max-height: 100%; background: #000; display: block; border-radius: 10px; }
.rv-burn { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); background: rgba(0,0,0,.6); backdrop-filter: blur(6px); color: #fff; font-family: var(--f-mono); font-size: 15px; padding: 4px 12px; border-radius: 8px; pointer-events: none; }
.rv-placeholder { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; color: var(--text-2); max-width: 420px; }
.rv-placeholder h3 { color: var(--text); font-size: 17px; }
.rv-controls { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.rv-track { position: relative; height: 56px; cursor: pointer; }
.rv-track .rail { position: absolute; left: 0; right: 0; top: 10px; height: 4px; background: rgba(255,255,255,.12); border-radius: 999px; }
.rv-track .fill { position: absolute; left: 0; top: 10px; height: 4px; background: #fff; border-radius: 999px; }
.rv-track .range { position: absolute; top: 7px; height: 10px; background: color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 4px; }
.rv-track .ph { position: absolute; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid #0b0b0d; box-shadow: 0 0 0 1px rgba(255,255,255,.5); transform: translateX(-8px); }
.rv-track .mk { position: absolute; top: 27px; transform: translateX(-12px); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: #fff; background: color-mix(in srgb, var(--avc, var(--accent)) 82%, #3a3a44); box-shadow: 0 0 0 2px #0b0b0d; transition: transform .2s var(--ease); }
.rv-track .mk:hover { transform: translateX(-12px) scale(1.15); z-index: 2; }
.rv-track .mk.res { opacity: .45; }
.rv-btns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ctl-group { display: inline-flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.ctl-group .btn-icon { width: 34px; height: 34px; border-radius: 999px; color: var(--text); }
.ctl-group .btn-icon:hover { background: var(--surface-3); }
.ctl-group .btn-icon.play { background: var(--text); color: var(--bg); }
.ctl-group .btn-icon.on { background: var(--accent-soft); color: var(--accent-text); }
.ctl-group select { background: transparent; border: 0; color: var(--text); font-size: 13px; font-weight: 600; padding: 0 6px; height: 34px; outline: none; cursor: pointer; }
.tc-wrap { flex: 1; display: flex; justify-content: center; gap: 8px; align-items: baseline; }
.rv-tc { font-family: var(--f-mono); font-size: 15px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.rv-dur { font-family: var(--f-mono); font-size: 15px; color: var(--text-3); }
.rv-side { border-left: 1px solid var(--line); background: #0f0f12; display: flex; flex-direction: column; min-height: 0; }
.rv-side-head { padding: 12px 14px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rv-comments { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.cm { padding: 14px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); display: flex; gap: 12px; cursor: pointer; transition: background-color .15s, box-shadow .2s; }
.cm:hover { background: var(--surface-3); }
.cm.active { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cm.res { opacity: .5; }
.cm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.cm-head { display: flex; align-items: center; gap: 8px; }
.cm-who { font-weight: 650; font-size: 13.5px; }
.cm-when { font-size: 12px; color: var(--text-3); }
.cm-tc { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; font-family: var(--f-mono); font-size: 12px; font-weight: 500; color: var(--text); background: var(--surface-3); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.cm-tc svg { width: 13px; height: 13px; color: var(--text-3); }
.cm-text { font-size: 14px; white-space: pre-wrap; line-height: 1.45; }
.cm audio, .cm video { width: 100%; max-height: 180px; border-radius: 10px; }
.cm-reply { padding: 10px 12px; border-radius: 12px; background: var(--surface); font-size: 13.5px; }
.cm-reply b { font-size: 12.5px; }
.cm-actions { display: flex; align-items: center; gap: 4px; }
.cm-actions button.lnk { font-size: 12.5px; color: var(--text-3); padding: 4px 6px; border-radius: 7px; display: inline-flex; gap: 5px; align-items: center; }
.cm-actions button.lnk:hover { color: var(--text); background: var(--surface); }
.rv-compose { border-top: 1px solid var(--line); padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.rv-compose textarea { width: 100%; min-height: 48px; max-height: 160px; resize: vertical; background: var(--surface-2); border: 1px solid transparent; border-radius: 14px; padding: 11px 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
.rv-compose textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.rv-compose .tools { display: flex; align-items: center; gap: 2px; }
.send-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); transition: transform .15s var(--ease), filter .15s; margin-left: auto; }
.send-btn:hover { filter: brightness(1.08); }
.send-btn:active { transform: scale(.92); }
.attach-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); border-radius: 999px; padding: 3px 4px 3px 10px; }

/* ───────── calendrier ───────── */
.cal-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 16px; }
.cal-head h1 { font-size: clamp(26px, 3vw, 32px); font-weight: 750; letter-spacing: -0.035em; text-transform: capitalize; min-width: 8ch; }
.cal-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.month-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow), 0 0 0 1px var(--line); overflow: hidden; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month .dow { padding: 12px 12px 8px; font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.day { min-height: 118px; padding: 8px 6px 8px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); transition: background-color .12s; }
.day:nth-child(7n + 8) { border-left: 0; }
.day:hover { background: var(--surface-2); }
.day.out .dn { color: var(--text-3); opacity: .6; }
.day .dn { font-size: 13px; font-weight: 600; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; margin-left: 2px; }
.day.today .dn { background: var(--accent); color: var(--accent-ink); }
.day.weekend:not(.out) { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.ev-pill {
  display: flex; align-items: center; gap: 6px; text-align: left;
  font-size: 12px; line-height: 1.25; padding: 3px 7px; border-radius: 7px; font-weight: 500;
  background: color-mix(in srgb, var(--cc) 12%, transparent); color: var(--text);
  overflow: hidden; white-space: nowrap; width: 100%; transition: background-color .12s;
}
.ev-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cc); flex: none; }
.ev-pill:hover { background: color-mix(in srgb, var(--cc) 22%, transparent); }
.ev-pill .tt { font-size: 11px; color: var(--text-3); flex: none; font-variant-numeric: tabular-nums; }
.ev-pill span { overflow: hidden; text-overflow: ellipsis; }
.ev-pill.cont { border-radius: 4px; }
.ev-pill.cont::before { opacity: 0; }
.ev-pill.deadline { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc) 50%, transparent); }
.more { font-size: 11.5px; color: var(--text-3); padding-left: 8px; text-align: left; }
.week-wrap { border-radius: var(--r-lg); overflow: auto; background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line); max-height: calc(100vh - 230px); }
.week { display: grid; grid-template-columns: 56px repeat(7, minmax(110px, 1fr)); min-width: 820px; position: relative; }
.week .wh { position: sticky; top: 0; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: center; font-size: 12px; color: var(--text-3); text-transform: capitalize; }
.week .wh b { display: grid; place-items: center; margin: 2px auto 0; width: 32px; height: 32px; border-radius: 50%; font-size: 17px; color: var(--text); font-weight: 650; }
.week .wh.today b { background: var(--accent); color: var(--accent-ink); }
.week .allday { grid-column: 1 / -1; display: grid; grid-template-columns: 56px repeat(7, minmax(110px, 1fr)); border-bottom: 1px solid var(--line); }
.week .allday > div { padding: 4px; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); min-height: 28px; }
.week .allday > div:first-child { border-left: 0; font-size: 10.5px; color: var(--text-3); justify-content: center; text-align: right; padding-right: 8px; }
.hours { position: relative; }
.hours .hl { height: 48px; font-size: 10.5px; color: var(--text-3); text-align: right; padding-right: 8px; transform: translateY(-7px); font-variant-numeric: tabular-nums; }
.wcol { position: relative; border-left: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0 47px, var(--line) 47px 48px); cursor: pointer; }
.wev { position: absolute; left: 3px; right: 3px; border-radius: 8px; padding: 4px 7px; font-size: 12px; overflow: hidden; text-align: left; background: color-mix(in srgb, var(--cc) 16%, var(--surface)); box-shadow: inset 3px 0 0 var(--cc); transition: background-color .12s; }
.wev:hover { background: color-mix(in srgb, var(--cc) 26%, var(--surface)); }
.wev b { display: block; font-weight: 600; }
.wev .tt { font-size: 10.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 1; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.agenda-day { padding: 6px 0; }
.agenda-day + .agenda-day { border-top: 1px solid var(--line); }
.agenda-day > .eyebrow { display: block; padding: 12px 18px 4px; }

/* ───────── barre du haut : boutons ronds discrets ───────── */
.top-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--text-2); }
.top-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--line-2); }
.top-btn.add { color: var(--text); }
.top-btn.add svg { transition: transform .3s var(--ease); }
.top-btn.add:hover svg { transform: rotate(90deg); }

/* ───────── panneau latéral (édition) ───────── */
.modal-bg.drawer-bg { place-items: stretch end; padding: 10px; }
.modal.drawer { width: min(620px, 100%); max-height: 100%; height: 100%; overflow: hidden; animation: drawerIn .42s var(--ease); }
.modal.drawer .modal-body { flex: 1; }
.modal.drawer .modal-foot { border-top: 1px solid var(--line); }
@keyframes drawerIn { from { opacity: 0; transform: translateX(48px); } }
.fieldset { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--surface-2); }
.fieldset .lbl { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.fieldset .field input { background: var(--surface); }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); cursor: pointer; font-size: 13.5px; line-height: 1.4; transition: box-shadow .15s; }
.opt:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--accent-soft); }
.opt input { margin-top: 3px; }
.pchip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 4px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 550; color: var(--text-2); transition: background-color .15s, box-shadow .15s, color .15s; }
.pchip:hover { color: var(--text); }
.pchip[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--accent); }
.pchip.add { padding: 0 12px 0 8px; color: var(--text-3); box-shadow: inset 0 0 0 1px var(--line-2); background: transparent; }
.src-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr) auto auto; gap: 6px; align-items: center; }
.src-row .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); }
.src-row .input { min-height: 34px; padding: 4px 10px; }

/* galeries */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.gallery.sm { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
.gallery .g { aspect-ratio: 1; border-radius: 12px; overflow: hidden; position: relative; background: var(--surface-3); }
.gallery .g img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .g .icon-btn { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.55); color: #fff; opacity: 0; transition: opacity .15s; }
.gallery .g:hover .icon-btn { opacity: 1; }
.gallery .g.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: transparent; border: 1.5px dashed var(--line-2); color: var(--text-3); font-size: 12px; font-weight: 550; text-align: center; padding: 8px; transition: border-color .2s, color .2s, background-color .2s; }
.gallery .g.add:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }

/* ───────── personnages ───────── */
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.ccard { display: flex; flex-direction: column; gap: 8px; text-align: left; min-width: 0; }
.ccard .portrait { aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; position: relative; display: block;
  background: radial-gradient(120% 80% at 80% 0%, rgba(255,255,255,.28), transparent 55%), linear-gradient(160deg, var(--pc), color-mix(in srgb, var(--pc) 45%, #05050a));
  box-shadow: var(--shadow), 0 0 0 1px var(--line); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.ccard:hover .portrait { transform: translateY(-3px); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); }
.ccard .portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ccard .portrait .ini { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-display); font-size: 54px; font-weight: 750; letter-spacing: -0.04em; color: rgba(255,255,255,.92); }
.ccard .portrait .role { position: absolute; top: 10px; left: 10px; height: 24px; font-size: 11.5px; }
.ccard .portrait .scn { position: absolute; bottom: 10px; right: 10px; height: 24px; font-size: 11.5px; }
.ccard h3 { font-size: 15px; font-weight: 650; font-family: var(--f-ui); letter-spacing: -0.012em; }
.ccard .meta { font-size: 12.5px; color: var(--text-3); display: block; }
.ccard .log { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ccard-new .portrait { background: transparent; border: 1.5px dashed var(--line-2); box-shadow: none; display: grid; place-items: center; transition: border-color .2s, background-color .2s; }
.ccard-new .portrait .plus { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); transition: transform .3s var(--ease), background-color .2s, color .2s; }
.ccard-new:hover .portrait { border-color: var(--accent); background: var(--accent-soft); transform: none; }
.ccard-new:hover .portrait .plus { background: var(--accent); color: var(--accent-ink); transform: rotate(90deg); }
.sheet-hd { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; margin-bottom: 22px; }
.sheet-portrait { aspect-ratio: 3 / 4; border-radius: 22px; overflow: hidden; position: relative; display: block; width: 100%;
  background: radial-gradient(120% 80% at 80% 0%, rgba(255,255,255,.28), transparent 55%), linear-gradient(160deg, var(--pc), color-mix(in srgb, var(--pc) 45%, #05050a));
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); }
.sheet-portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sheet-portrait .ini { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-display); font-size: 72px; font-weight: 750; letter-spacing: -0.04em; color: rgba(255,255,255,.92); }
.sheet-portrait .change { position: absolute; left: 50%; bottom: 12px; transform: translate(-50%, 6px); opacity: 0; transition: opacity .2s, transform .3s var(--ease); }
.sheet-portrait:hover .change, .sheet-portrait:focus-visible .change { opacity: 1; transform: translate(-50%, 0); }
.sheet-id { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.sheet-name { font-family: var(--f-display); font-size: clamp(28px, 3.4vw, 40px); font-weight: 750; letter-spacing: -0.035em; border: 0; background: transparent; outline: none; width: 100%; padding: 2px 8px; margin-left: -8px; border-radius: 12px; transition: background-color .15s; }
.sheet-name:hover, .sheet-name:focus { background: var(--surface-2); }
textarea.auto { width: 100%; border: 0; background: transparent; resize: none; outline: none; font-size: 14.5px; line-height: 1.55; color: var(--text); min-height: 28px; padding: 6px 8px; margin: 0 -8px; width: calc(100% + 16px); border-radius: 10px; transition: background-color .15s; overflow: hidden; }
textarea.auto:hover, textarea.auto:focus { background: var(--surface-2); }
textarea.auto::placeholder { color: var(--text-3); }
.logline-in { font-size: 16.5px; color: var(--text-2); }
.kv-inline { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 2px 12px; align-items: center; max-width: 560px; }
.kv-inline > label { font-size: 13px; color: var(--text-3); }
.kv-inline input:not([type="checkbox"]) { border: 0; background: transparent; padding: 7px 8px; border-radius: 8px; outline: none; width: 100%; transition: background-color .15s; }
.kv-inline input:not([type="checkbox"]):hover, .kv-inline input:not([type="checkbox"]):focus { background: var(--surface-2); }
.sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sheet-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sheet-card.full { grid-column: 1 / -1; }
.sheet-card h3 { font-family: var(--f-ui); font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); }
.rel { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 10px; border-radius: 12px; background: var(--surface-2); }

/* ───────── séquencier kanban ───────── */
.vbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.vpill { height: 36px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; font-weight: 550; font-size: 13.5px; color: var(--text-2); background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); transition: background-color .2s var(--ease), color .2s, box-shadow .2s; }
.vpill:hover { color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line-2); }
.vpill[aria-pressed="true"] { background: var(--text); color: var(--bg); box-shadow: var(--shadow); }
.vpill.add { background: transparent; box-shadow: none; border: 1.5px dashed var(--line-2); color: var(--text-3); }
.vpill.add:hover { border-color: var(--accent); color: var(--accent-text); }
.kb { display: flex; gap: 14px; overflow-x: auto; padding: 2px 2px 14px; align-items: flex-start; scroll-snap-type: x proximity; }
.kb-col { flex: 0 0 296px; scroll-snap-align: start; background: var(--surface-3); border-radius: var(--r-lg); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.kb-col.reserve { background: transparent; border: 1.5px dashed var(--line-2); flex-basis: 270px; }
.kb-head { display: flex; align-items: center; gap: 8px; padding: 2px 2px 4px 4px; min-height: 34px; }
.kb-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cc); flex: none; transition: transform .2s var(--ease); }
.kb-head button.dot:hover { transform: scale(1.3); }
.kb-title { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font-weight: 650; font-size: 14px; padding: 5px 6px; border-radius: 8px; letter-spacing: -0.01em; transition: background-color .15s; }
.kb-title:hover, .kb-title:focus { background: var(--surface); }
.kb-name { flex: 1; min-width: 0; font-weight: 650; font-size: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 5px 0; }
.kb-head .n { font-size: 12px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.kb-hint { font-size: 12px; color: var(--text-3); padding: 0 4px; }
.kb-list { display: flex; flex-direction: column; gap: 8px; min-height: 48px; border-radius: 12px; padding: 2px; transition: background-color .2s, box-shadow .2s; }
.kb-list.over { background: var(--accent-soft); }
.kb-list.drop-end::after { content: ""; height: 3px; border-radius: 3px; background: var(--accent); }
.kb-card { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); overflow: hidden; text-align: left; transition: box-shadow .2s var(--ease), transform .2s var(--ease), opacity .2s; position: relative; }
.kb-card[draggable="true"] { cursor: grab; }
.kb-card:not([draggable="true"]) { cursor: pointer; }
.kb-card:hover { box-shadow: var(--shadow), 0 0 0 1px var(--line-2); transform: translateY(-1px); }
.kb-card.dragging { opacity: .35; transform: scale(.98); }
.kb-card.drop-before { box-shadow: 0 -4px 0 -1px var(--accent), var(--shadow-sm), 0 0 0 1px var(--line); }
.kb-card.dim { opacity: .28; }
.kb-card .thumb { aspect-ratio: 16 / 8; background: var(--surface-3); overflow: hidden; }
.kb-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kb-card .bd { padding: 11px 12px 12px; display: flex; flex-direction: column; gap: 7px; }
.kb-card .top { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-3); min-width: 0; }
.kb-card .num { min-width: 22px; height: 20px; padding: 0 5px; border-radius: 6px; background: color-mix(in srgb, var(--cc) 15%, transparent); color: color-mix(in srgb, var(--cc) 85%, var(--text)); font-weight: 700; font-size: 11px; display: inline-grid; place-items: center; flex: none; }
.kb-card .kind { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.kb-card .kind.slugline { font-size: 11px; }
.kb-card .ttl { font-weight: 650; font-size: 14px; line-height: 1.3; letter-spacing: -0.01em; }
.kb-card .sum { font-size: 12.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kb-card .ft { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); min-height: 22px; }
.meta-i { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.meta-i svg.i { width: 13px; height: 13px; }
.sdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.avs { display: inline-flex; }
.avs > * { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.avs > *:first-child { margin-left: 0; }
.chrono-chip { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; font-size: 11.5px; font-weight: 600; color: var(--text-2); background: var(--surface-2); padding: 3px 9px 3px 7px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chrono-chip svg.i { width: 13px; height: 13px; color: var(--text-3); }
.kb-add { height: 36px; border-radius: 11px; color: var(--text-3); display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 550; font-size: 13px; transition: background-color .15s, color .15s; }
.kb-add:hover { background: var(--surface); color: var(--text); }
.kb-newcol { flex: 0 0 200px; height: 52px; border-radius: var(--r-lg); border: 1.5px dashed var(--line-2); color: var(--text-3); display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 550; transition: border-color .2s, color .2s, background-color .2s; }
.kb-newcol:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }

/* ───────── calendrier : semaines avec barres continues ───────── */
.mhead { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mhead .dow { padding: 12px 12px 8px; font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.mweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); --mh: 34px; --ml: 24px; height: calc(var(--mh) + 4 * var(--ml) + 6px); overflow: hidden; }
.mbg { border-top: 1px solid var(--line); border-left: 1px solid var(--line); cursor: pointer; transition: background-color .12s; }
.mweek > .mbg:first-child { border-left: 0; }
.mbg:hover { background: var(--surface-2); }
.mbg.weekend { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.mbg.weekend:hover { background: var(--surface-2); }
.mdn, .mcell, .mspan { position: relative; z-index: 1; }
.mdn { pointer-events: none; display: flex; align-items: center; gap: 6px; padding: 6px 0 0 8px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mdn b { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-weight: 600; }
.mdn em { font-style: normal; font-size: 11.5px; color: var(--text-3); font-weight: 550; text-transform: capitalize; }
.mdn.today b { background: var(--accent); color: var(--accent-ink); }
.mdn.out { color: var(--text-3); }
.mdn.out b { opacity: .6; }
.mcell { pointer-events: none; display: flex; flex-direction: column; gap: 3px; padding: 1px 6px 0; min-width: 0; min-height: 0; overflow: hidden; }
.mcell .ev-pill { height: 21px; flex: none; }
.mcell .more { height: 20px; flex: none; display: flex; align-items: center; border-radius: 6px; font-weight: 600; }
.mcell .more:hover { background: var(--surface-2); color: var(--text); }
.mcell > * { pointer-events: auto; }
.mspan { align-self: center; height: 22px; margin: 1px 0; display: flex; align-items: center; gap: 6px; padding: 0 8px; min-width: 0; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-align: left;
  background: color-mix(in srgb, var(--cc) 20%, var(--surface)); color: color-mix(in srgb, var(--cc) 70%, var(--text)); transition: background-color .15s; }
.mspan:hover { background: color-mix(in srgb, var(--cc) 30%, var(--surface)); }
.mspan.s { margin-left: 6px; border-top-left-radius: 7px; border-bottom-left-radius: 7px; }
.mspan.e { margin-right: 6px; border-top-right-radius: 7px; border-bottom-right-radius: 7px; }
.mspan span { overflow: hidden; text-overflow: ellipsis; }
.mspan i { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 550; opacity: .75; flex: none; }
.mspan svg.i { width: 13px; height: 13px; flex: none; }
.mspan.period { background: color-mix(in srgb, var(--cc) 20%, var(--surface)); color: color-mix(in srgb, var(--cc) 62%, var(--text)); box-shadow: inset 3px 0 0 var(--cc); font-weight: 650; }
.mspan.period:hover { background: color-mix(in srgb, var(--cc) 30%, var(--surface)); }
:root[data-mode="dark"] .mspan.period, :root[data-theme="dark"] .mspan.period { background: color-mix(in srgb, var(--cc) 32%, var(--surface)); color: color-mix(in srgb, var(--cc) 35%, #fff); }
@media (prefers-color-scheme: dark) { :root:not([data-mode="light"]):not([data-theme="light"]) .mspan.period { background: color-mix(in srgb, var(--cc) 32%, var(--surface)); color: color-mix(in srgb, var(--cc) 35%, #fff); } }
.mspan.period.s { box-shadow: inset 3px 0 0 var(--cc); }
.ev-pill svg.i { width: 12px; height: 12px; flex: none; color: var(--cc); }
.wallday { grid-column: 1 / -1; display: grid; grid-template-columns: 56px repeat(7, minmax(110px, 1fr)); border-bottom: 1px solid var(--line); padding: 4px 0; row-gap: 2px; }
.wallday .wlbl { grid-column: 1; font-size: 10.5px; color: var(--text-3); text-align: right; padding-right: 8px; align-self: center; }
.wallday .wad { display: flex; flex-direction: column; gap: 2px; padding: 0 3px; min-width: 0; overflow: hidden; }
.wallday .wad .ev-pill { height: 21px; flex: none; }
.wallday .wad .more { height: 20px; flex: none; }

/* ───────── toutes les tâches ───────── */
.nav-item .count.late { color: var(--danger); }
.tadd { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; margin-bottom: 16px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow), 0 0 0 1px var(--line); transition: box-shadow .2s; }
.tadd:focus-within { box-shadow: var(--shadow), 0 0 0 2px var(--accent); }
.tadd .ic { color: var(--text-3); display: inline-flex; }
.tadd input#tAddIn { flex: 1; min-width: 120px; border: 0; outline: none; background: transparent; height: 38px; font-size: 14.5px; }
.tadd select, .tadd input[type="date"] { height: 32px; border: 0; border-radius: 9px; background: var(--surface-2); padding: 0 10px; font-size: 13px; outline: none; max-width: 180px; }
.trow { display: flex; align-items: center; gap: 12px; padding: 11px 16px; transition: background-color .12s; min-width: 0; }
.trow + .trow { border-top: 1px solid var(--line); }
.trow:hover { background: var(--surface-2); }
.trow .tti { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; gap: 1px; }
.trow .tti span { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .tti em { font-style: normal; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow.done .tti span { text-decoration: line-through; color: var(--text-3); }
.trow .due { min-width: 52px; text-align: right; justify-content: flex-end; }
.tproj { display: inline-flex; align-items: center; gap: 7px; max-width: 200px; height: 26px; padding: 0 10px 0 4px; border-radius: 999px; background: var(--surface-2); font-size: 12.5px; color: var(--text-2); font-weight: 550; flex: none; transition: background-color .15s, color .15s; }
.tproj:hover { background: var(--surface-3); color: var(--text); }
.tproj .ptile { width: 18px; height: 18px; border-radius: 6px; }
.tproj span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────── review : dossiers ───────── */
.rv-card .poster .rv-menu { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.5); color: #fff; backdrop-filter: blur(6px); opacity: 0; transition: opacity .15s; }
.rv-card:hover .poster .rv-menu, .rv-card:focus-within .poster .rv-menu { opacity: 1; }
.rv-card.dragging { opacity: .4; }
.drop-on { box-shadow: 0 0 0 2px var(--accent), var(--shadow) !important; background: var(--accent-soft) !important; }

/* ───────── thématiques (séquencier) ───────── */
.theme-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -4px 0 16px; }
.theme-bar > .eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; }
.tchip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap;
  background: color-mix(in srgb, var(--tc) 11%, var(--surface)); color: color-mix(in srgb, var(--tc) 78%, var(--text));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 24%, transparent); transition: background-color .18s var(--ease), color .15s, box-shadow .2s, transform .12s var(--ease); }
.tchip:hover { background: color-mix(in srgb, var(--tc) 19%, var(--surface)); }
.tchip:active { transform: scale(.96); }
.tchip .d { width: 7px; height: 7px; border-radius: 50%; background: var(--tc); flex: none; }
.tchip .n { font-size: 11px; opacity: .65; font-variant-numeric: tabular-nums; }
.tchip[aria-pressed="true"] { background: var(--tc); color: #fff; box-shadow: 0 6px 14px -8px var(--tc); }
.tchip[aria-pressed="true"] .d { background: #fff; }
.tchip.add { --tc: var(--text-3); background: transparent; box-shadow: none; border: 1.5px dashed var(--line-2); color: var(--text-2); padding: 0 11px; }
.tchip.add:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.kb-card .tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ttag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 650; letter-spacing: .01em; white-space: nowrap;
  background: color-mix(in srgb, var(--tc) 14%, transparent); color: color-mix(in srgb, var(--tc) 80%, var(--text)); }
.theme-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.theme-row .swatch { width: 26px; height: 26px; }

/* ───────── arcs des personnages ───────── */
.arcs-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.arcs-axis { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.arcs-axis input { border: 0; background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); border-radius: 999px; padding: 7px 14px; font-weight: 600; color: var(--text); outline: none; width: 230px; transition: box-shadow .15s; }
.arcs-axis input:focus { box-shadow: 0 0 0 2px var(--accent); }
.arcs-legend { display: flex; gap: 6px; flex-wrap: wrap; }
.achip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 4px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); font-size: 13px; font-weight: 550; transition: opacity .2s, box-shadow .2s; }
.achip i { width: 14px; height: 3px; border-radius: 2px; }
.achip[aria-pressed="false"] { opacity: .4; }
.achip:hover { box-shadow: var(--shadow-sm), 0 0 0 1px var(--line-2); }
.arcs-hint { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--r); background: var(--accent-soft); color: var(--text); font-size: 13.5px; margin-bottom: 14px; }
.arcs-hint svg { color: var(--accent-text); margin-top: 2px; }
.arcs-card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow), 0 0 0 1px var(--line); overflow: hidden; }
.arcs-scroll { overflow-x: auto; }
.arcs-grid { display: grid; width: max-content; min-width: 100%; }
.arcs-corner, .arcs-lbl { position: sticky; left: 0; z-index: 2; background: var(--surface); border-right: 1px solid var(--line); }
.arcs-corner { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; padding: 30px 14px 12px; font-size: 11px; color: var(--text-3); text-align: right; }
.arcs-corner span:nth-child(2) { font-weight: 650; color: var(--text-2); text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; }
.arcs-corner.tick-lbl { justify-content: center; padding: 8px 14px; border-top: 1px solid var(--line); }
.arcs-lbl { border-top: 1px solid var(--line); padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; gap: 6px; transition: opacity .2s; }
.arcs-lbl.dim { opacity: .35; }
.arcs-stats { display: flex; flex-direction: column; font-size: 11.5px; color: var(--text-3); line-height: 1.4; font-variant-numeric: tabular-nums; }
.arcs-lane { border-top: 1px solid var(--line); }
.arcs-over svg, .arcs-lane svg { display: block; }
.arcs-ticks { display: flex; border-top: 1px solid var(--line); }
.tick { padding: 7px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; color: var(--text-3); text-align: center; transition: background-color .12s, color .12s; min-width: 0; }
.tick:hover { background: var(--surface-2); color: var(--text); }
.tick b { min-width: 22px; height: 20px; padding: 0 5px; border-radius: 6px; display: inline-grid; place-items: center; font-size: 11px; background: color-mix(in srgb, var(--cc) 15%, transparent); color: color-mix(in srgb, var(--cc) 85%, var(--text)); }
.tick span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.2; width: 100%; }
.arc-svg text { font-family: var(--f-ui); }
.arc-band-lbl { font-size: 11.5px; font-weight: 650; }
.arc-grid { stroke: var(--line); stroke-width: 1; }
.arc-zero { stroke: var(--line-2); stroke-width: 1.2; stroke-dasharray: 4 4; }
.arc-hit { fill: transparent; cursor: pointer; transition: fill .12s; }
.arc-hit:hover { fill: color-mix(in srgb, var(--text) 5%, transparent); }
.arc-tip { position: fixed; z-index: 95; pointer-events: none; max-width: 300px; background: var(--text); color: var(--bg); padding: 9px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow-lg); }
.arc-tip b { display: block; font-weight: 650; margin-bottom: 2px; }
.arc-tip .tip-row { display: flex; align-items: center; gap: 7px; }
.arc-tip .tip-row i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.arc-tip .faint-tip { opacity: .65; }
.arcs-key { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--text-3); }
.arcs-key span { display: inline-flex; align-items: center; gap: 7px; }
.k-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-2); }
.k-dot.hollow { background: transparent; border: 2px dashed var(--text-2); width: 9px; height: 9px; }
.k-diam { width: 9px; height: 9px; background: var(--text-2); transform: rotate(45deg); border-radius: 1px; }
.k-line { width: 22px; height: 2.5px; background: var(--text-2); border-radius: 2px; }
.k-line.dash { background: repeating-linear-gradient(90deg, var(--text-3) 0 3px, transparent 3px 7px); height: 1.5px; }
.arc-ed-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); }
.arc-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); }
.mini-arc .arc-svg { display: block; }

/* ───────── thématiques en T-board ───────── */
.tboard { display: flex; gap: 16px; overflow-x: auto; padding: 6px 2px 18px; align-items: flex-start; scroll-snap-type: x proximity; }
.tcol { flex: 0 0 304px; scroll-snap-align: start; border-radius: var(--r-lg); padding: 14px 10px 10px; display: flex; flex-direction: column; gap: 10px;
  background: color-mix(in srgb, var(--tc) 7%, var(--surface-3)); box-shadow: inset 0 3px 0 var(--tc); }
.tcol.loose { background: transparent; border: 1.5px dashed var(--line-2); box-shadow: none; }
.tcol-head { display: flex; align-items: center; gap: 8px; padding: 0 2px; }
.tcol-head .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--tc); flex: none; transition: transform .2s var(--ease); }
.tcol-head button.dot:hover { transform: scale(1.3); }
.tcol-title, .tcol-name { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; letter-spacing: -0.015em; color: color-mix(in srgb, var(--tc) 50%, var(--text)); }
.tcol-title { border: 0; background: transparent; padding: 5px 6px; border-radius: 8px; outline: none; transition: background-color .15s; }
.tcol-title:hover, .tcol-title:focus { background: var(--surface); }
.tcol-head .n { font-size: 12px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tcol-seq { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: color-mix(in srgb, var(--tc) 78%, var(--text)); background: color-mix(in srgb, var(--tc) 13%, transparent); transition: background-color .15s; }
.tcol-seq:hover { background: color-mix(in srgb, var(--tc) 22%, transparent); }
.tcol-seq svg.i { width: 13px; height: 13px; }
.tslots { display: flex; flex-direction: column; min-height: 52px; padding: 4px 0 2px; border-radius: 12px; transition: background-color .2s; }
.tslots.over { background: color-mix(in srgb, var(--tc) 14%, transparent); }
.tslot-empty { font-size: 12.5px; color: var(--text-3); text-align: center; padding: 14px 0; border: 1.5px dashed var(--line-2); border-radius: 12px; }
.tcard { position: relative; transition: transform .4s var(--ease), margin .4s var(--ease), opacity .2s; }
.tcard + .tcard { margin-top: -9px; }
.tcard:not(.open):hover { transform: translateY(-3px); }
.tcard.dragging { opacity: .35; }
.tcard.drop-before::before { content: ""; position: absolute; left: 6px; right: 6px; top: -5px; height: 3px; border-radius: 3px; background: var(--tc); z-index: 5; }
.t-head { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 4px 6px 10px 4px; border-radius: 12px; background: var(--surface);
  box-shadow: inset 0 4px 0 var(--tc), 0 1px 2px rgba(0,0,0,.06), 0 0 0 1px var(--line); cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: pan-x; transition: box-shadow .3s var(--ease); }
.t-head:hover { box-shadow: inset 0 4px 0 var(--tc), var(--shadow), 0 0 0 1px var(--line-2); }
.grip { width: 22px; height: 30px; display: grid; place-items: center; border-radius: 7px; color: var(--text-3); cursor: grab; flex: none; transform: rotate(90deg); }
.grip:hover { background: var(--surface-2); color: var(--text); }
.t-title { flex: 1; min-width: 0; font-weight: 650; font-size: 14px; letter-spacing: -0.01em; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 8px 0; }
.tcard.open .t-title { white-space: normal; }
.t-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); flex: none; }
.t-meta .av.sm { width: 20px; height: 20px; font-size: 8.5px; }
.t-lift { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); flex: none; transition: transform .4s var(--ease), background-color .15s, color .15s; }
.t-lift:hover { background: var(--surface-2); color: var(--text); }
.tcard.open .t-lift { transform: rotate(180deg); color: var(--tc); }
.t-body { position: relative; z-index: 1; margin: -12px 12px 0; padding: 0 14px; border-radius: 0 0 14px 14px; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line);
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s var(--ease), opacity .3s ease, padding .4s var(--ease); }
.tcard.open { transform: translateY(-4px); margin-bottom: 14px; z-index: 3; }
.tcard.open .t-head { box-shadow: inset 0 4px 0 var(--tc), var(--shadow-lg), 0 0 0 1px var(--line); }
.tcard.open .t-body { max-height: 1000px; opacity: 1; padding: 24px 14px 12px; box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.t-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 10px; }
.t-desc { font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; margin-bottom: 4px; }
.t-sec { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.t-sec .eyebrow { font-size: 10px; }
.t-seq, .t-char { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 26px; padding: 0 10px 0 8px; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: 12px; font-weight: 550; color: var(--text-2); transition: color .15s, box-shadow .15s; }
.t-char { padding-left: 3px; }
.t-seq:hover, .t-char:hover { color: var(--text); box-shadow: 0 0 0 1px var(--line-2); }
.t-seq span, .t-char span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-seq svg.i { width: 13px; height: 13px; color: var(--tc); flex: none; }
.t-char .av.sm { width: 20px; height: 20px; font-size: 8.5px; }
.t-notes { font-size: 13px; color: var(--text-2); white-space: pre-wrap; }
.t-actions { display: flex; align-items: center; gap: 6px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.tadd-card { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; color: var(--text-3); transition: background-color .15s; }
.tadd-card:focus-within, .tadd-card:hover { background: var(--surface); }
.tadd-card input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 13.5px; }
.tcol-new { flex: 0 0 200px; height: 54px; border-radius: var(--r-lg); border: 1.5px dashed var(--line-2); color: var(--text-3); display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 550; transition: border-color .2s, color .2s, background-color .2s; }
.tcol-new:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }

/* ───────── adaptatif ───────── */
.view.is-full { overflow: hidden; }
@media (max-width: 1180px) {
  .home-grid, .overview-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .rv-shell { grid-template-columns: 1fr; height: auto !important; }
  .rv-side { border-left: 0; border-top: 1px solid var(--line); }
  .rv-stage { min-height: 62vh; }
  .rv-comments { max-height: 60vh; }
  .sl-shell { grid-template-columns: 160px minmax(0, 1fr); height: auto !important; }
  .sl-insp { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); max-height: 300px; }
  .view.is-full { overflow: auto; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side {
    position: fixed; z-index: 70; left: 0; top: 0; bottom: 0; width: min(296px, 86vw); margin: 8px;
    transform: translateX(-110%); transition: transform .35s var(--ease);
    padding-top: env(safe-area-inset-top, 0px);
  }
  .side-close { display: inline-grid !important; }
  .app.side-open .side { transform: none; box-shadow: var(--shadow-pop); }
  .app.side-open .scrim { display: block; position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.4); backdrop-filter: blur(3px); animation: fade .2s; }
  .topbar { padding: 0 12px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); }
  .menu-btn { display: inline-grid !important; }
  .search-pill { width: 40px; padding: 0; justify-content: center; }
  .search-pill span, .search-pill kbd { display: none; }
  .crumbs button { max-width: 140px; }
  .crumbs > *:not(:last-child) { display: none; }
  .refs-shell { grid-template-columns: 1fr; }
  .sheet-hd { grid-template-columns: 1fr; }
  .sheet-portrait { max-width: 220px; }
  .sheet-grid { grid-template-columns: 1fr; }
  .kb-col { flex-basis: 84vw; }
  .tcol { flex-basis: 84vw; }
  .src-row { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .src-row input[data-f="url"] { grid-column: 2 / 3; }
  .modal-bg.drawer-bg { padding: 0; }
  .modal.drawer { border-radius: 0; }
  .folder-list { position: static; flex-direction: row; overflow-x: auto; }
  .folder-list button { white-space: nowrap; flex: none; }
  .doc-shell { grid-template-columns: 1fr; }
  .doc-outline { display: none; }
  .sl-shell { grid-template-columns: 1fr; }
  .sl-rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .sl-rail .thumb { width: 130px; flex: none; }
  .sl-canvas-wrap { min-height: 260px; padding: 12px; }
  .kanban { grid-template-columns: repeat(3, minmax(250px, 84vw)); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .day { min-height: 76px; padding: 4px 2px; }
  .ev-pill .tt { display: none; }
  .ev-pill { font-size: 10.5px; padding: 2px 4px; }
  .ev-pill::before { display: none; }
  .ev-row { grid-template-columns: 10px 84px minmax(0, 1fr); }
  .ev-row > .chip { display: none; }
  .mweek { --mh: 28px; --ml: 19px; }
  .mcell .ev-pill { height: 16px; }
  .mcell .more { height: 16px; font-size: 10px; padding-left: 4px; }
  .mspan { height: 17px; }
  .mspan { font-size: 10.5px; padding: 0 4px; }
  .mspan i { display: none; }
  .mdn { padding: 4px 0 0 4px; }
  .trow { flex-wrap: wrap; gap: 8px 10px; }
  .trow .tti { flex-basis: calc(100% - 40px); }
  .tadd { flex-wrap: wrap; }
  .tadd input#tAddIn { flex-basis: 100%; }
  .bd-tools { top: auto; bottom: 14px; left: 50%; transform: translateX(-50%); flex-direction: row; max-width: calc(100% - 28px); overflow-x: auto; }
  .bd-zoom { bottom: 76px; }
  .full-tab { padding: 0 6px 6px; }
  .full-tab > .bd-shell { height: calc(100dvh - 72px); }
  .full-tab > .doc-shell { height: auto; min-height: 100%; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat b { font-size: 24px; }
  .hero h1 { font-size: 32px; }
  .tc-wrap { order: -1; width: 100%; }
}
/* ───────── imports (docs, slides) ───────── */
.imp { display: flex; flex-direction: column; gap: 14px; }
.imp-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 20px 24px; border-radius: 18px; border: 1.5px dashed var(--line-2); background: var(--surface-2); text-align: center; cursor: pointer; transition: border-color .2s, background-color .2s, transform .2s var(--ease); }
.imp-drop:hover, .imp-drop.on { border-color: var(--accent); background: var(--accent-soft); }
.imp-drop.on { transform: scale(1.01); }
.imp-drop b { font-size: 15px; font-weight: 650; }
.imp-drop u { color: var(--accent-text); text-decoration: none; font-weight: 600; }
.imp-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface); color: var(--accent-text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); margin-bottom: 6px; }
.imp-fmts { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.imp-fmts i { font-style: normal; font: 600 10.5px var(--f-mono); padding: 3px 7px; border-radius: 6px; background: var(--surface); color: var(--text-2); box-shadow: 0 0 0 1px var(--line); }
.imp-help { display: grid; gap: 1px; border-radius: 14px; overflow: hidden; background: var(--line); box-shadow: 0 0 0 1px var(--line); }
.imp-help > div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 10px 14px; background: var(--surface); font-size: 13px; }
.imp-help b { font-weight: 600; }
.imp-help span { color: var(--text-2); }
.file-drop-ov { position: fixed; inset: 10px; z-index: 70; pointer-events: none; border-radius: 22px; border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); backdrop-filter: blur(2px); display: grid; place-items: center; animation: fadeIn .18s var(--ease); }
.file-drop-ov > div { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 30px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-lg); color: var(--accent-text); text-align: center; }
.file-drop-ov b { color: var(--text); font-size: 15px; }
.file-drop-ov span { color: var(--text-3); font-size: 12.5px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* file d'envoi */
.tray { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: min(360px, calc(100vw - 32px)); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); overflow: hidden; animation: trayIn .35s var(--ease); }
@keyframes trayIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.tray-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.tray-head b { flex: 1; font-weight: 650; }
.tray-list { max-height: 280px; overflow-y: auto; padding: 6px; }
.tray-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border-radius: 12px; }
.tr-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); }
.tray-row.ok .tr-ic { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.tray-row.ko .tr-ic { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.tr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tr-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-sub { font-size: 12px; color: var(--text-3); }
.tr-sub em { font-style: normal; }
.tr-bar { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin-top: 3px; position: relative; }
.tr-bar i { position: absolute; inset: 0 auto 0 0; width: 35%; border-radius: 4px; background: var(--accent); animation: trInd 1.2s var(--ease) infinite; }
.tray-row.det .tr-bar i { animation: none; transition: width .3s var(--ease); }
.tray-row.ok .tr-bar, .tray-row.ko .tr-bar { display: none; }
@keyframes trInd { 0% { left: -35%; } 100% { left: 100%; } }

/* ───────── tableaux : dossiers ───────── */
.board-thumb { position: relative; }
.board-thumb .bd-menu { position: absolute; top: 8px; right: 8px; background: var(--glass); backdrop-filter: blur(8px); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); opacity: 0; transition: opacity .15s; z-index: 2; }
.board-thumb:hover .bd-menu, .board-thumb:focus-within .bd-menu { opacity: 1; }
.board-thumb.dragging, .ftile.dragging { opacity: .4; }

/* ───────── review : import, version empilée, partage ───────── */
.rv-dropzone { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 48px 24px; border-radius: var(--r-lg); border: 1.5px dashed var(--line-2); background: var(--surface); color: var(--text-2); transition: border-color .2s, background-color .2s; }
.rv-dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.rv-dropzone h3 { color: var(--text); font-size: 17px; }
.rv-dropzone p { max-width: 460px; font-size: 13.5px; }
.rv-dropzone .tile { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.rv-card .poster .ver i { font-style: normal; margin-left: 6px; padding: 0 5px; border-radius: 5px; background: rgba(255,255,255,.22); font-size: 10.5px; }
.rv-card .poster .shared { position: absolute; bottom: 10px; left: 10px; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 650; background: rgba(0,0,0,.55); backdrop-filter: blur(8px); color: #fff; padding: 3px 8px; border-radius: 999px; }
.rv-card .poster .drop-ver-label { position: absolute; inset: 0; display: none; place-items: center; align-content: center; gap: 6px; grid-auto-flow: column; background: color-mix(in srgb, var(--accent) 55%, rgba(0,0,0,.6)); color: #fff; font-weight: 650; font-size: 14px; }
.rv-card.drop-ver { box-shadow: 0 0 0 2.5px var(--accent), var(--shadow-lg) !important; transform: translateY(-3px); }
.rv-card.drop-ver .drop-ver-label { display: grid; }
.rv-share-btn { background: #fff !important; color: #111 !important; border-color: #fff !important; }
.rv-share-btn:hover { filter: brightness(.94); }

.sh-list { display: flex; flex-direction: column; gap: 8px; }
.sh-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--surface-2); transition: box-shadow .3s; }
.sh-row.fresh { box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--accent-soft); animation: shPop .5s var(--ease); }
@keyframes shPop { from { transform: scale(.98); opacity: .4; } }
.sh-row.off { opacity: .6; }
.sh-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface); color: var(--accent-text); box-shadow: 0 0 0 1px var(--line); }
.sh-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sh-main b { font-size: 13.5px; }
.sh-meta { font-size: 12px; color: var(--text-2); }
.sh-url { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: all; }
.sh-views { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); }
.sh-acts { display: flex; gap: 4px; align-items: center; flex: none; }
.opt-secure:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }

/* lecteur : marque, statut sécurisé, dessin, enregistrement */
.rv-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; letter-spacing: -0.01em; color: var(--text); padding-right: 4px; }
.rv-secure { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.rv-anno { position: absolute; z-index: 3; pointer-events: none; overflow: visible; }
.rv-anno.live { pointer-events: auto; cursor: crosshair; touch-action: none; outline: 1.5px dashed rgba(255,255,255,.35); outline-offset: 2px; border-radius: 4px; }
.rv-anno.pop { animation: annoPop .35s var(--ease); }
@keyframes annoPop { from { opacity: 0; transform: scale(1.02); } }
.rv-anno path, .rv-anno rect, .rv-anno ellipse { filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.anno-bar { position: absolute; z-index: 6; top: 10px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 16px; background: rgba(22,22,26,.86); backdrop-filter: blur(14px); box-shadow: 0 12px 30px -10px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08); animation: trayIn .3s var(--ease); max-width: calc(100% - 20px); overflow-x: auto; }
.anno-bar[hidden] { display: none; }
.ab-btn { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #ddd; flex: none; }
.ab-btn:hover:not(:disabled) { background: rgba(255,255,255,.1); }
.ab-btn.on { background: #fff; color: #111; }
.ab-btn:disabled { opacity: .35; }
.ab-col { width: 22px; height: 22px; border-radius: 50%; background: var(--c); margin: 0 3px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.25); transition: transform .15s var(--ease); }
.ab-col.on { box-shadow: 0 0 0 2px rgba(22,22,26,1), 0 0 0 4px #fff; transform: scale(1.05); }
.ab-sep { width: 1px; height: 22px; background: rgba(255,255,255,.14); margin: 0 5px; flex: none; }
.ab-done { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); font-weight: 650; font-size: 13px; margin-left: 4px; flex: none; }
.attach-pill.anno { color: #ff8a80; }
#rvAttach { display: flex; flex-wrap: wrap; gap: 6px; }
#rvAttach:empty { display: none; }
.anno-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: #ff8a80; background: rgba(255,59,48,.12); padding: 3px 8px; border-radius: 999px; }
.cm .via { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--text-3); background: var(--surface-3); padding: 1px 7px; border-radius: 999px; }
.cm-audio { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.cm-audio audio { flex: 1; min-width: 0; height: 32px; }
.cm-video { width: 100%; border-radius: 10px; background: #000; max-height: 220px; }
.rv-track .mk.drw { box-shadow: 0 0 0 2px #0b0b0d, 0 0 0 3.5px #ff3b30; }
.rv-compose .tools .btn-icon.rec { color: #ff3b30; background: rgba(255,59,48,.14); }
.rv-compose.ro { flex-direction: row; align-items: center; gap: 8px; color: var(--text-3); font-size: 13px; padding: 16px; }
.send-btn.busy { opacity: .6; pointer-events: none; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.92); } }
.rec-bar { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 14px; background: rgba(255,59,48,.1); box-shadow: inset 0 0 0 1px rgba(255,59,48,.3); flex-wrap: wrap; }
.rec-bar video { width: 100%; border-radius: 10px; background: #000; max-height: 180px; transform: scaleX(-1); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff3b30; animation: recBlink 1.1s ease-in-out infinite; }
@keyframes recBlink { 50% { opacity: .25; } }

/* filigrane des liens sécurisés */
.wm { position: absolute; inset: 0; z-index: 4; pointer-events: none; background-repeat: repeat; background-position: 0 0, 260px 160px; mix-blend-mode: normal; border-radius: 10px; }
.wm-float { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; font: 600 12px var(--f-ui); color: rgba(255,255,255,.55); text-shadow: 0 1px 2px rgba(0,0,0,.6); white-space: nowrap; transition: transform 1.6s var(--ease); letter-spacing: .01em; }
.is-secure .rv-video-wrap { user-select: none; -webkit-user-select: none; }
.is-secure video { -webkit-touch-callout: none; }

/* mode lien de partage : la page n'affiche que la review */
.share-mode .side, .share-mode .topbar, .share-mode .scrim { display: none !important; }
.share-mode .app { grid-template-columns: minmax(0, 1fr); }
.share-mode .view > .rv-shell { height: 100%; }
.share-mode .view { background: #0b0b0d; }
.share-page { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 32px 16px; background: radial-gradient(90% 70% at 50% 0%, #1b1b22, #0b0b0d) !important; color: var(--text); }
.share-card { width: min(440px, 100%); display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 30px 28px 26px; border-radius: 24px; background: #141418; box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.07); animation: trayIn .45s var(--ease); }
.share-card h2 { font-size: 21px; letter-spacing: -0.02em; }
.share-card .field { width: 100%; }
.sg-check { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 13px; width: 100%; cursor: pointer; }
.sg-check input { margin-top: 3px; flex: none; }
.sg-ic { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.sg-ic.secure { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
@media (max-width: 760px) {
  .imp-help > div { grid-template-columns: 1fr; gap: 2px; }
  .share-mode .view > .rv-shell { height: auto; }
  .anno-bar { top: 6px; }
}
/* ───────── mentions de personnages ───────── */
.mention { display: inline; padding: 1px 7px 1px 6px; border-radius: 7px; white-space: nowrap; cursor: pointer; font-weight: 600; font-family: var(--f-ui); font-size: .92em; letter-spacing: -0.005em;
  color: color-mix(in srgb, var(--mc, var(--accent)) 78%, var(--text)); background: color-mix(in srgb, var(--mc, var(--accent)) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mc, var(--accent)) 22%, transparent); transition: background-color .15s; }
.mention::before { content: "@"; opacity: .45; margin-right: 1px; }
.mention:hover { background: color-mix(in srgb, var(--mc, var(--accent)) 24%, transparent); }
.mention.gone { text-decoration: line-through; opacity: .55; --mc: var(--text-3); }
.mention.flash { animation: mFlash 2s var(--ease); }
@keyframes mFlash { 0%, 60% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--mc, var(--accent)) 45%, transparent); } }
.mention-pop { position: fixed; z-index: 120; width: 260px; max-height: 320px; overflow-y: auto; padding: 6px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); animation: trayIn .18s var(--ease); }
.mp-head { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 6px 8px 4px; }
.mention-pop button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; text-align: left; }
.mention-pop button.on, .mention-pop button:hover { background: var(--surface-2); }
.mention-pop button span { display: flex; flex-direction: column; min-width: 0; }
.mention-pop b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention-pop em { font-style: normal; font-size: 12px; color: var(--text-3); }
.mp-plus { width: 26px; height: 26px; border-radius: 50%; display: grid !important; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.tb-at b { font: 700 16px var(--f-ui); }
.doc-cast { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 8px; border-radius: 9px; font-size: 13px; color: var(--text-2); text-align: left; }
.doc-cast:hover { background: var(--surface-2); color: var(--text); }
.doc-cast span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-cast em { font-style: normal; font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.cite-line { width: 100%; text-align: left; border-bottom: 0 !important; padding: 8px 10px !important; border-radius: 10px; color: var(--text-2); }
.cite-line:hover { background: var(--surface-2); }

/* ───────── tâches : personne, urgence ───────── */
.prio.basse { color: var(--text-3); background: var(--surface-3); }
.who-pick { position: relative; }
.who-cur { width: 100%; display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 12px 0 8px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 550; text-align: left; }
.who-cur:focus-visible { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-soft); }
.who-pop { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); padding: 8px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); animation: trayIn .18s var(--ease); }
.who-pop[hidden] { display: none; }
.who-list { max-height: 260px; overflow-y: auto; margin-top: 6px; display: flex; flex-direction: column; gap: 1px; }
.who-grp { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding: 10px 8px 4px; }
.who-opt { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; text-align: left; }
.who-opt:hover, .who-opt.on { background: var(--surface-2); }
.who-opt b { font-size: 13.5px; font-weight: 600; }
.who-opt em { font-style: normal; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-opt > svg { color: var(--accent-text); }
.who-load { font-size: 12.5px; padding: 6px 8px; }
.urg-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.urg-seg button { display: flex; align-items: center; justify-content: center; gap: 7px; height: 38px; border-radius: 11px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 600; color: var(--text-2); transition: background-color .15s, box-shadow .15s, color .15s; }
.urg-seg .d { width: 8px; height: 8px; border-radius: 50%; background: var(--uc); }
.urg-seg button[aria-pressed="true"] { color: var(--text); background: color-mix(in srgb, var(--uc) 14%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--uc); }
.work-sum { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
.work-x { height: 28px; padding: 0 4px 0 10px; font-size: 12.5px; }
.work-x.on { color: var(--ok); }
.work-x.off { color: var(--text-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.work-x button { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--text-3); }
.work-x button:hover { background: var(--surface-3); color: var(--text); }

/* ───────── calendrier : tâches, personne, passé ───────── */
.cal-who { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--text); cursor: pointer; }
.cal-who select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; outline: none; font: inherit; color: inherit; padding: 0 2px 0 0; cursor: pointer; width: auto; min-height: 0; height: auto; box-shadow: none; border-radius: 0; }
.task-pill { border-radius: 6px; }
.task-pill::before { display: none; }
.task-pill .tw { margin-left: auto; flex: none; font-size: 9.5px; font-weight: 700; padding: 1px 5px; border-radius: 5px; background: color-mix(in srgb, var(--cc) 20%, transparent); }
.task-pill.late { box-shadow: inset 0 0 0 1px var(--danger); opacity: 1 !important; }
.mbg.past { background: repeating-linear-gradient(-45deg, transparent 0 7px, color-mix(in srgb, var(--text) 3.5%, transparent) 7px 8px), color-mix(in srgb, var(--surface-2) 60%, transparent); }
.mbg.past:hover { background-color: var(--surface-2); }
.mbg.is-today { background: color-mix(in srgb, var(--accent) 6%, transparent); box-shadow: inset 0 2px 0 var(--accent); }
.mdn.past b { color: var(--text-3); font-weight: 500; }
.ev-pill.past { opacity: .5; }
.mspan.past { opacity: .62; }
.ev-pill.past:hover, .mspan.past:hover { opacity: .85; }
.week .wh { cursor: pointer; }
.week .wh.past, .week .wh.past b { color: var(--text-3); }
.wcol.past { background: repeating-linear-gradient(to bottom, transparent 0 47px, var(--line) 47px 48px), color-mix(in srgb, var(--surface-2) 70%, transparent); }
.past-shade { position: absolute; left: 0; right: 0; top: 0; background: color-mix(in srgb, var(--surface-2) 75%, transparent); pointer-events: none; z-index: 0; border-bottom: 1px dashed color-mix(in srgb, var(--danger) 35%, transparent); }
.wev.past { opacity: .5; }
.now-line span { position: absolute; left: 6px; top: -9px; font: 600 10px var(--f-mono); color: #fff; background: var(--danger); padding: 1px 5px; border-radius: 5px; }
.ev-row.past { opacity: .5; }
.ev-row.done .ti { text-decoration: line-through; }
/* ───────── personnes : pastilles ───────── */
.pav { width: 28px; height: 28px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; overflow: hidden;
  font: 650 11px/1 var(--f-ui); letter-spacing: .02em; color: color-mix(in srgb, var(--avc) 72%, var(--text));
  background: color-mix(in srgb, var(--avc) 16%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--avc) 28%, transparent); }
.pav img { width: 100%; height: 100%; object-fit: cover; }
.pav.sm { width: 24px; height: 24px; font-size: 9.5px; }
.pav.none { color: var(--text-3); background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-2); border: 0; outline: 1px dashed transparent; }
.pav.none svg { width: 14px; height: 14px; }
.who-cur .wn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-cur .wr { font-size: 12px; color: var(--text-3); font-weight: 500; white-space: nowrap; }
.who-cur:disabled { cursor: default; opacity: .75; }
.who-opt .wo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.who-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.who-hint { display: block; font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.4; }
.who-hint:empty { display: none; }
.acct-on { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 6px 0 8px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.acct-on .wn { flex: 1; font-weight: 600; font-size: 14px; }
.acct .who-list { margin-top: 4px; }

/* ───────── tâche cochée depuis le calendrier ───────── */
.task-pill .tk, .task-row .tk { position: relative; width: 14px; height: 14px; border-radius: 50%; flex: none; display: grid; place-items: center; color: var(--ok); cursor: pointer;
  box-shadow: inset 0 0 0 1.6px var(--cc); background: transparent; transition: box-shadow .25s, background-color .25s, transform .15s var(--ease); }
.task-pill .tk::after, .task-row .tk::after { content: ""; position: absolute; inset: -6px; }
.task-pill .tk svg, .task-row .tk svg { width: 10px; height: 10px; stroke-width: 3.2; stroke-dasharray: 22; stroke-dashoffset: 22; }
.task-pill .tk:hover, .task-row .tk:hover { background: color-mix(in srgb, var(--cc) 22%, transparent); transform: scale(1.12); }
.task-pill.done .tk, .task-row.done .tk { box-shadow: inset 0 0 0 1.6px color-mix(in srgb, var(--ok) 70%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.task-pill.done { background: color-mix(in srgb, var(--text) 5%, transparent); }
.task-pill.done .tk svg, .task-row.done .tk svg { stroke-dashoffset: 0; }
.task-pill.done .lbl, .task-row.done .lbl { text-decoration: line-through; text-decoration-color: color-mix(in srgb, currentColor 60%, transparent); opacity: .65; }
.checking .tk { box-shadow: inset 0 0 0 1.6px var(--ok) !important; background: color-mix(in srgb, var(--ok) 14%, transparent) !important; animation: tkPop .5s cubic-bezier(.3,1.6,.5,1), tkRing .6s ease-out; }
@keyframes tkRing { 0% { outline: 0 solid color-mix(in srgb, var(--ok) 50%, transparent); outline-offset: 0; } 100% { outline: 6px solid transparent; outline-offset: 4px; } }
.checking .tk svg { animation: tkDraw .32s .12s ease-out forwards; }
.checking .lbl { background: linear-gradient(currentColor, currentColor) 0 58% / 0% 1.5px no-repeat; animation: tkStrike .38s .18s ease-out forwards; }
.checking { animation: tkFade .65s ease forwards; }
@keyframes tkPop { 0% { transform: scale(1); } 35% { transform: scale(1.45); } 65% { transform: scale(.88); } 100% { transform: scale(1); } }
@keyframes tkDraw { to { stroke-dashoffset: 0; } }
@keyframes tkStrike { to { background-size: 100% 1.5px; } }
@keyframes tkFade { 0%, 60% { opacity: 1; } 100% { opacity: .65; } }
.tk-spark { position: fixed; z-index: 200; width: 5px; height: 5px; border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); }
.task-row { grid-template-columns: 14px 128px minmax(0, 1fr) auto; }

/* ───────── calendrier : projets en cours ───────── */
.running { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 14px; }
.run-card { display: flex; align-items: stretch; gap: 12px; padding: 12px 14px 12px 12px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); text-align: left; transition: transform .2s var(--ease); }
.run-card:hover { transform: translateY(-2px); }
.rc-bar { width: 4px; border-radius: 4px; background: var(--cc); flex: none; }
.rc-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rc-main b { font-size: 14px; font-weight: 650; }
.rc-main em { font-style: normal; font-size: 12px; color: var(--text-3); display: inline-flex; align-items: center; gap: 6px; }
.rc-dot { width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--text-3); flex: none; }
.run-card.on .rc-dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.run-card.on { box-shadow: var(--shadow-sm), 0 0 0 1px color-mix(in srgb, var(--cc) 45%, var(--line)); }

/* ───────── projet : jours travaillés ───────── */
.wc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.wc-stats span { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 12px; color: var(--text-3); }
.wc-stats b { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.wc-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wc-nav b { font-size: 14px; font-weight: 650; }
.wc-nav .faint { font-size: 12.5px; margin-right: auto; }
.wc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.wc-dow { text-align: center; font-size: 11px; font-weight: 600; color: var(--text-3); padding-bottom: 2px; }
.wc-day { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-2); position: relative; transition: background-color .15s, transform .15s var(--ease), box-shadow .15s; }
.wc-day:hover { transform: scale(1.08); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--pc) 55%, transparent); }
.wc-day.outp { color: var(--text-3); opacity: .55; }
.wc-day.wk:not(.on) { background: repeating-linear-gradient(-45deg, transparent 0 4px, color-mix(in srgb, var(--text) 5%, transparent) 4px 5px); }
.wc-day.on { background: var(--pc); color: #fff; }
.wc-day.on.past { background: color-mix(in srgb, var(--pc) 45%, var(--surface)); color: color-mix(in srgb, var(--pc) 30%, var(--text)); }
.wc-day.extra::after { content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px var(--pc); }
.wc-day.off { color: var(--text-3); text-decoration: line-through; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.wc-day.today { outline: 2px solid var(--text); outline-offset: 1px; }
.wc-day.pop { animation: tkPop .35s cubic-bezier(.3,1.6,.5,1); }
.wc-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--text-2); align-items: center; }
.wc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.lg.on { background: var(--pc); }
.lg.extra { background: var(--pc); box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px var(--pc); }
.lg.off { box-shadow: inset 0 0 0 1.5px var(--line-2); }
/* ───────── modèles d'écriture ───────── */
.tpl-mine { position: relative; cursor: pointer; }
.tpl-mine .tpl-menu { position: absolute; top: 8px; right: 8px; background: var(--glass); backdrop-filter: blur(8px); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); opacity: 0; transition: opacity .15s; }
.tpl-mine:hover .tpl-menu, .tpl-mine:focus-within .tpl-menu { opacity: 1; }
.tpl-mine .sheet { box-shadow: var(--shadow), 0 0 0 1.5px color-mix(in srgb, var(--accent) 35%, var(--line)); }
.tpl-badge { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 650; color: var(--accent-text); background: var(--accent-soft); flex: none; }
.tpl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 16px; margin: 0 0 4px; border-radius: 12px; background: var(--accent-soft); font-size: 12.5px; color: var(--text-2); }
.tpl-bar > span { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; }
.tpl-bar b { color: var(--text); }
.tpl-var { font: 600 11.5px var(--f-mono); padding: 3px 8px; border-radius: 7px; background: var(--surface); color: var(--accent-text); box-shadow: 0 0 0 1px var(--line); }
.tpl-var:hover { box-shadow: 0 0 0 1.5px var(--accent); }
/* ───────── deadlines ───────── */
.ev-pill.has-emo::before { display: none; }
.ev-pill .emo { flex: none; font-size: 11.5px; line-height: 1; }
.ev-pill.deadline { background: color-mix(in srgb, var(--cc) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc) 45%, transparent); font-weight: 600; }
.ev-pill.deadline.late { box-shadow: inset 0 0 0 1.5px var(--danger); }
.ev-pill.done .lbl, .ev-row.done .lbl { text-decoration: line-through; opacity: .6; }
.ev-pill.deadline.done { box-shadow: none; opacity: .7; }
.dl-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-kinds button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 550; color: var(--text-2); }
.dl-kinds button span { font-size: 14px; }
.dl-kinds button[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--accent); }
.dl-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.dl-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 140px 96px 28px; gap: 6px; align-items: center; }
.dl-row select, .dl-row input { min-height: 36px; }
.dl-list { display: flex; flex-direction: column; gap: 2px; }
.dl-item { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 10px; }
.dl-item:hover { background: var(--surface-2); }
.dl-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; }
.dl-emo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); font-size: 15px; flex: none; }
.dl-t { display: flex; flex-direction: column; min-width: 0; }
.dl-t b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-t em { font-style: normal; font-size: 12px; color: var(--text-3); }
.dl-item.done .dl-t b { text-decoration: line-through; color: var(--text-3); }
.dl-item.late .dl-emo { box-shadow: inset 0 0 0 1.5px var(--danger); }
@media (max-width: 760px) { .dl-row { grid-template-columns: 1fr 1fr; } .dl-row [data-f="label"] { grid-column: 1 / -1; order: -1; } }

/* ───────── annuler ───────── */
.toast { display: flex; align-items: center; gap: 12px; }
.toast-undo { font: inherit; font-weight: 700; color: inherit; padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.16); }
.toast-undo:hover { background: rgba(255,255,255,.26); }

/* ───────── contacts ───────── */
.av.xl { width: 64px; height: 64px; font-size: 20px; }
img.av { object-fit: cover; }
.photo-row { display: flex; align-items: center; gap: 16px; }
.ppl-pick { display: flex; flex-direction: column; gap: 2px; max-height: 340px; overflow-y: auto; }
.ppl-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; text-align: left; }
.ppl-row:hover { background: var(--surface-2); }
.ppl-row > svg { color: var(--accent-text); }
.pr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pr-main b { font-size: 14px; font-weight: 600; }
.pr-main em, .pr-proj { font-style: normal; font-size: 12px; color: var(--text-3); }
.ppl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.ppl-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); text-align: left; transition: transform .2s var(--ease), box-shadow .2s; }
.ppl-card:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 0 0 1px var(--line-2); }
.pc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pc-main b { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.pc-main em { font-style: normal; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-proj { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pc-chip { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; color: color-mix(in srgb, var(--pc, var(--text-3)) 70%, var(--text)); background: color-mix(in srgb, var(--pc, var(--text-3)) 14%, transparent); }
.pc-chip.lg { font-size: 12.5px; padding: 4px 10px; }
/* ───────── bandeaux système ───────── */
.sys-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 10px 0; padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.45; }
.sys-bar > span { flex: 1; min-width: 240px; }
.sys-bar.err { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 35%, transparent); }
.sys-bar.warn { background: color-mix(in srgb, var(--warn) 14%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 40%, transparent); }
/* ───────── connexion (site + app iPhone) ───────── */
body.auth-open .app { display: none; }
.auth-screen { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); overflow-y: auto;
  background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--accent) 14%, var(--bg)), var(--bg)); }
.auth-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 30px 26px 24px; border-radius: 26px; background: var(--surface); box-shadow: var(--shadow-pop), 0 0 0 1px var(--line); animation: pop .4s var(--ease); }
.auth-logo { display: grid; place-items: center; margin-bottom: 4px; }
.auth-card h1 { text-align: center; font-size: 24px; letter-spacing: -0.02em; }
.auth-sub { text-align: center; color: var(--text-2); font-size: 14px; margin: -6px 0 6px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.auth-field input { min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 16px; color: var(--text); outline: none; }
.auth-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.auth-go { min-height: 50px; justify-content: center; font-size: 16px; border-radius: 14px; margin-top: 4px; }
.auth-msg { font-size: 13.5px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--text); }
.auth-msg.err { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.auth-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.auth-links button { font-size: 13.5px; color: var(--accent-text); font-weight: 600; padding: 6px 2px; }

/* ───────── iPhone : barre d'onglets, encoche, gestes ───────── */
.tabbar { display: none; }
html, body { overscroll-behavior: none; }
button, a, [role="button"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
@media (max-width: 760px) {
  .app { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .topbar { padding-top: env(safe-area-inset-top); top: 0; height: calc(56px + env(safe-area-inset-top)); }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px); box-shadow: 0 -1px 0 var(--line); }
  .tb-item { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 2px; border-radius: 12px; font-size: 10.5px; font-weight: 600; color: var(--text-3); }
  .tb-item svg { width: 23px; height: 23px; }
  .tb-item[aria-current="page"] { color: var(--accent-text); }
  .tb-dot { position: absolute; top: 4px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--surface); }
  .view { padding-bottom: calc(76px + env(safe-area-inset-bottom)); scroll-padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .view.is-full { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  /* les champs à 16 px évitent le zoom automatique de l'iPhone */
  input, select, textarea, [contenteditable="true"] { font-size: 16px !important; }
  /* fenêtres : panneau qui monte du bas */
  .modal-bg:not(.drawer-bg) { place-items: end center; padding: env(safe-area-inset-top) 0 0; }
  .modal-bg:not(.drawer-bg) .modal { width: 100%; max-height: min(100%, calc(100dvh - env(safe-area-inset-top) - 10px)); border-radius: 24px 24px 0 0; animation: sheetUp .38s var(--ease); }
  .modal-bg:not(.drawer-bg) .modal-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .modal.drawer .modal-head { padding-top: calc(20px + env(safe-area-inset-top)); }
  .modal.drawer .modal-foot { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
  .tray { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .menu button { min-height: 44px; }
  .btn, .icon-btn { min-height: 40px; }
  .side { padding-bottom: env(safe-area-inset-bottom); }
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ───────── documents : écriture à plusieurs (révision, commentaires, séquences, partage) ───────── */
.doc-canvas { display: grid; grid-template-columns: minmax(0, 816px); justify-content: center; align-items: start; gap: 22px; }
.doc-shell.side-on .doc-canvas { grid-template-columns: minmax(0, 816px) 300px; }
.doc-paper { position: relative; min-width: 0; }
.doc-paper > .doc-page { position: relative; width: 100%; }
.doc-ov { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.doc-ov > * { pointer-events: auto; }
.doc-shell[data-mode="view"] .doc-page { cursor: text; caret-color: transparent; }
.toolbar .off { opacity: .32; pointer-events: none; }
.toolbar select:disabled { opacity: .32; }
.doc-status.err { color: var(--danger); }
.doc-count { margin-left: auto; }
.doc-mode { gap: 6px; }
.doc-mode span { font-weight: 600; }
.doc-shell[data-mode="suggest"] .doc-mode { background: color-mix(in srgb, #16a34a 14%, var(--surface)); color: color-mix(in srgb, #16a34a 75%, var(--text)); box-shadow: inset 0 0 0 1px color-mix(in srgb, #16a34a 35%, transparent); }
.doc-shell[data-mode="view"] .doc-mode { background: var(--surface-2); }
.doc-mode-ro { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--surface-2); height: 30px; padding: 0 11px; border-radius: 9px; }
.doc-cm-btn { gap: 6px; }
.doc-cm-btn b { font-variant-numeric: tabular-nums; }
.doc-cm-btn.on { background: var(--accent-soft); color: var(--accent-text); }
.doc-peers { display: inline-flex; align-items: center; }
.doc-peers .peer { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.doc-peers .peer:first-child { margin-left: 0; }
.doc-peers .more { --avc: #64748b; }

/* suggestions : une couleur par auteur (classe sc0…sc7, gardée dans le texte) */
.doc-page .sc0 { --sc: #3b6cf6; } .doc-page .sc1 { --sc: #d6409f; } .doc-page .sc2 { --sc: #16a34a; } .doc-page .sc3 { --sc: #f2711c; }
.doc-page .sc4 { --sc: #7357ff; } .doc-page .sc5 { --sc: #0ea5a4; } .doc-page .sc6 { --sc: #e5484d; } .doc-page .sc7 { --sc: #c28a00; }
.doc-page ins.sg { text-decoration: none; color: color-mix(in srgb, var(--sc, #16a34a) 82%, #000); background: color-mix(in srgb, var(--sc, #16a34a) 11%, transparent); border-bottom: 1.5px solid color-mix(in srgb, var(--sc, #16a34a) 70%, transparent); border-radius: 2px; }
.doc-page del.sg { text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: color-mix(in srgb, var(--sc, #e5484d) 85%, transparent); color: color-mix(in srgb, var(--sc, #e5484d) 60%, var(--paper-ink)); opacity: .85; }
.doc-page [data-sgp] { box-shadow: -14px 0 0 -11px var(--sc, #16a34a); }
.doc-page .sg-on { outline: 2px solid color-mix(in srgb, var(--sc, var(--accent)) 55%, transparent); outline-offset: 1px; }
::highlight(rg-comment) { background-color: rgba(255, 196, 0, .30); }
::highlight(rg-comment-on) { background-color: rgba(255, 170, 0, .62); }
.doc-page img.img-off { min-height: 60px; background: var(--surface-2); border-radius: 8px; }

/* bulle « commenter » à côté de la sélection */
.cm-bubble { position: absolute; right: -14px; transform: translate(100%, -2px); display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); animation: trayIn .15s var(--ease); white-space: nowrap; }
.cm-bubble:hover { background: var(--accent); color: #fff; }
.doc-shell.side-on .cm-bubble { right: -10px; }

/* marge : commentaires et suggestions */
.doc-side { position: relative; min-width: 0; }
.doc-side:not(.open) { display: none; }
.side-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 8px 6px 8px 10px; margin-bottom: 8px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); font-size: 12.5px; }
.side-head b { font-weight: 650; color: var(--text-2); }
.side-cards { position: relative; }
.doc-side:not(.sheet) .cm-card { position: absolute; left: 0; right: 0; transition: top .22s var(--ease), box-shadow .15s; }
.cm-card { background: var(--surface); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); font-size: 13.5px; cursor: pointer; margin-bottom: 10px; }
.cm-card.on { box-shadow: var(--shadow-lg), 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); cursor: default; z-index: 2; }
.cm-card.sg { border-left: 3px solid color-mix(in srgb, #16a34a 60%, transparent); }
.cm-card.resolved { opacity: .62; }
.cm-card.orphan { background: var(--surface-2); }
.cm-head { display: flex; align-items: center; gap: 8px; }
.cm-who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.cm-who b { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-who span { font-size: 11.5px; color: var(--text-3); }
.cm-head .ok, .side-head .ok { color: var(--ok); } .cm-head .no, .side-head .no { color: var(--danger); }
.cm-head .ok:hover { background: color-mix(in srgb, var(--ok) 14%, transparent); } .cm-head .no:hover { background: var(--danger-soft); }
.cm-text { margin: 6px 0 0 32px; color: var(--text); line-height: 1.45; overflow-wrap: anywhere; }
.cm-text.sgx { margin-left: 32px; color: var(--text-2); }
.cm-text ins { text-decoration: none; color: #16794a; background: rgba(22, 163, 74, .12); border-radius: 3px; padding: 0 2px; }
.cm-text del { color: #b42318; text-decoration-thickness: 1.5px; }
.cm-msg + .cm-msg { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.cm-orphan { font-size: 11.5px; color: var(--text-3); margin-bottom: 6px; font-style: italic; }
.cm-more { font-size: 12px; margin: 6px 0 0 32px; }
.cm-reply { display: flex; gap: 6px; align-items: flex-end; margin-top: 10px; }
.cm-reply textarea, .cm-card textarea { flex: 1; width: 100%; resize: none; border: 0; border-radius: 10px; background: var(--surface-2); padding: 8px 10px; font: inherit; font-size: 13.5px; color: var(--text); outline: none; min-height: 36px; }
.cm-card textarea:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cm-card.draft textarea { margin-top: 8px; min-height: 64px; }
.cm-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 8px; }
.side-empty { font-size: 13px; padding: 4px 10px; line-height: 1.5; }

/* présence : où écrivent les autres */
.peer-mark { position: absolute; left: clamp(8px, 4.5vw, 52px); width: 3px; border-radius: 3px; background: var(--pc); pointer-events: none !important; transition: top .2s var(--ease), height .2s var(--ease); }
.peer-mark span { position: absolute; top: -2px; right: 8px; white-space: nowrap; font: 600 10.5px var(--f-ui); color: #fff; background: var(--pc); padding: 2px 6px; border-radius: 6px 6px 2px 6px; }

/* séquences liées : pastille en marge */
.seq-run { position: absolute; left: clamp(10px, 6vw, 70px); width: 3px; border-radius: 3px; background: color-mix(in srgb, var(--qc) 70%, transparent); pointer-events: none !important; }
.seq-chip { position: absolute; left: 4px; transform: translateY(-1px); display: inline-flex; align-items: center; gap: 4px; max-width: clamp(28px, 7vw, 62px); height: 22px; padding: 0 6px; border-radius: 7px; font: 650 11px var(--f-ui); color: color-mix(in srgb, var(--qc) 80%, #000); background: color-mix(in srgb, var(--qc) 15%, var(--paper)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--qc) 35%, transparent); overflow: hidden; }
.seq-chip svg.i { width: 12px; height: 12px; flex: none; }
.seq-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.seq-chip:hover { max-width: 220px; z-index: 3; background: color-mix(in srgb, var(--qc) 24%, var(--paper)); }
.seq-handle { position: absolute; left: 6px; display: inline-flex; align-items: center; height: 22px; padding: 0 4px; border-radius: 7px; color: var(--text-3); background: transparent; opacity: .55; }
.seq-handle svg.i { width: 12px; height: 12px; }
.seq-handle:hover { opacity: 1; color: var(--accent-text); background: var(--accent-soft); }
.doc-page [data-seq].seq-on { animation: mFlash 2.2s var(--ease); border-radius: 4px; }
.seq-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 7px; font: 700 11px var(--f-ui); color: color-mix(in srgb, var(--qc) 80%, #000); background: color-mix(in srgb, var(--qc) 16%, transparent); flex: none; }
.seq-pop { position: fixed; z-index: 120; width: 340px; max-height: min(70vh, 560px); overflow-y: auto; padding: 8px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); animation: trayIn .18s var(--ease); }
.seq-pop.pick .input { width: 100%; margin: 2px 0 6px; }
.seq-list button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; text-align: left; }
.seq-list button:hover, .seq-list button.on { background: var(--surface-2); }
.seq-list .n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 8px; font: 700 11.5px var(--f-ui); color: color-mix(in srgb, var(--qc) 80%, #000); background: color-mix(in srgb, var(--qc) 16%, transparent); flex: none; }
.seq-list .t { display: flex; flex-direction: column; min-width: 0; }
.seq-list .t b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seq-list .t em { font-style: normal; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seq-list .new { color: var(--accent-text); }
.seq-list .new svg.i, .seq-list .rm svg.i { width: 26px; flex: none; }
.seq-list .rm { color: var(--danger); }
.seq-card-h { display: flex; align-items: flex-start; gap: 10px; padding: 6px 4px 8px; }
.seq-card-h .n { display: inline-grid; place-items: center; min-width: 30px; height: 30px; border-radius: 9px; font: 700 13px var(--f-ui); color: color-mix(in srgb, var(--qc, var(--accent)) 80%, #000); background: color-mix(in srgb, var(--qc, var(--accent)) 16%, transparent); flex: none; }
.seq-card-h div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.seq-card-h b { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.seq-card-h em { font-style: normal; font-size: 12px; color: var(--text-3); text-transform: none; }
.seq-card-b { display: flex; flex-direction: column; gap: 10px; padding: 0 4px 6px; font-size: 13.5px; }
.seq-card-b .sum { margin: 0; color: var(--text-2); line-height: 1.5; white-space: pre-wrap; }
.seq-card-b .sec .eyebrow { margin-bottom: 6px; }
.seq-card-b .tags { display: flex; gap: 4px; flex-wrap: wrap; }
.pchip.static { cursor: default; height: 28px; }
.seq-src { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.seq-src li { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); min-width: 0; }
.seq-src li svg.i { flex: none; color: var(--text-3); }
.seq-src a { color: var(--accent-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seq-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seq-imgs img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; }
.seq-card-f { display: flex; gap: 6px; padding: 8px 4px 2px; border-top: 1px solid var(--line); }

/* partage */
.share-box .banner.warn { border-radius: 12px; background: color-mix(in srgb, var(--warn) 16%, var(--surface)); align-items: flex-start; }
.share-new { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.share-new .field { margin: 0; }
.share-new select { max-width: 100%; }
.share-list { display: flex; flex-direction: column; gap: 6px; }
.share-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.share-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.share-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.share-main b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-main span { font-size: 12px; }
.share-role { width: auto; min-height: 30px; padding: 2px 10px; font-size: 12.5px; }

/* invité d'un lien de partage */
.docshare .view { background: var(--bg); }
.docshare .ds-wrap { height: 100%; padding: 0; }
.docshare .ds-wrap > .doc-shell { height: 100%; }
.ds-brand { display: grid; place-items: center; flex: none; }
.ds-info { display: flex; align-items: center; gap: 8px; padding: 6px 14px; font-size: 12.5px; color: var(--text-2); background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ds-info b { color: var(--text); }
.ds-info .btn { gap: 6px; }
.doc-shell.guest .doc-outline #docCast:empty { display: none; }

@media (max-width: 1179px) {
  .doc-side.sheet.open { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-height: 62dvh; overflow-y: auto; padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.22); animation: sheetUp .22s var(--ease); }
  .doc-side.sheet .side-head { background: var(--bg); }
}
@media (max-width: 760px) {
  .doc-bar { gap: 6px; padding: 8px 10px; }
  .doc-bar .doc-count, .doc-bar .doc-status { display: none; }
  .doc-mode span, #docShare span { display: none; }
  .doc-title-input { min-width: 0; flex-basis: 100%; order: 10; }
  .toolbar { width: auto; max-width: calc(100% - 16px); flex-wrap: nowrap; overflow-x: auto; margin: 8px 8px 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .toolbar::-webkit-scrollbar { display: none; }
  .toolbar > * { flex: none; }
  .doc-scroll { padding: 12px 6px 120px; }
  .seq-chip { max-width: 18px; padding: 0; justify-content: center; left: 1px; }
  .seq-chip svg.i, .seq-chip span { display: none; }
  .seq-run { left: 8px; }
  .peer-mark { left: 3px; }
  .peer-mark span { display: none; }
  .cm-bubble { right: 8px; transform: translate(0, -110%); }
  .doc-side.sheet.open { max-height: 72dvh; }
  .seq-pop { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; max-height: 75dvh; border-radius: 18px 18px 0 0; padding: 10px 10px calc(14px + env(safe-area-inset-bottom)); animation: sheetUp .22s var(--ease); }
  .share-row { flex-wrap: wrap; }
  .share-main { flex-basis: calc(100% - 50px); }
  .ds-info { padding: 6px 10px; }
}
@media (min-width: 761px) and (max-width: 1499px) {
  .doc-shell.side-on { grid-template-columns: minmax(0, 1fr); }
  .doc-shell.side-on .doc-outline { display: none; }
}

/* liste des documents : menu ⋯ sur chaque vignette */
.doc-item { position: relative; cursor: pointer; }
.doc-item .doc-menu { position: absolute; top: 8px; right: 8px; background: var(--glass); backdrop-filter: blur(8px); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); opacity: 0; transition: opacity .15s; }
.doc-item:hover .doc-menu, .doc-item:focus-within .doc-menu { opacity: 1; }
@media (hover: none) { .doc-item .doc-menu { opacity: 1; } }

/* ───────── beatsheet : frise en 3 actes ───────── */
.bs { display: flex; flex-direction: column; gap: 12px; }
.bs-full { height: 100%; overflow-y: auto; padding: 12px 8px 28px; }
.bs-pname { font-size: 15px; font-weight: 650; margin-right: 4px; white-space: nowrap; }
.bs-q { text-align: center; padding: 2px 0 0; }
.bs-q .eyebrow { display: block; margin-bottom: 2px; }
.bs-q textarea { display: block; width: min(880px, 100%); margin: 0 auto; resize: none; overflow: hidden; border: 0; outline: none; background: transparent; text-align: center; color: var(--text); font: italic 600 clamp(19px, 2.3vw, 27px)/1.3 var(--f-serif); padding: 6px 12px; border-radius: 12px; transition: background-color .15s; }
.bs-q textarea:hover, .bs-q textarea:focus { background: var(--surface-2); }
.bs-q textarea::placeholder { color: var(--text-3); font-weight: 500; }
.bs-vname, .bs-qtext { display: none; }
.bs-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bs-colorby { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 4px 0 11px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-2); }
.bs-colorby select { border: 0; background: transparent; font: 600 12.5px var(--f-ui); color: var(--text); outline: none; cursor: pointer; padding-right: 6px; }
.bs-legend { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.bs-lg { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px 0 6px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.bs-lg:hover { box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); }
.bs-lg .sw { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.bs-lg em { font-style: normal; color: var(--text-3); font-variant-numeric: tabular-nums; }
.bs-lg input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.bs-lg-hint { font-size: 12.5px; }
.bs-banner { border-radius: 12px; }
.bs-colors { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bs-pick { position: relative; display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; }
.bs-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* la feuille : papier quadrillé, ligne au feutre, repères manuscrits (comme les fiches de structure) */
.bs-scroll { position: relative; overflow-x: auto; overflow-y: hidden; padding: 14px 22px 20px; border-radius: 18px; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  background-color: var(--paper); color: var(--paper-ink);
  background-image: linear-gradient(rgba(70, 100, 150, .075) 1px, transparent 1px), linear-gradient(90deg, rgba(70, 100, 150, .075) 1px, transparent 1px);
  background-size: 22px 22px; box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 18px 40px -22px rgba(0,0,0,.35); }
.bs-grid { position: relative; display: grid; grid-template-rows: 40px 36px 26px minmax(56px, auto) var(--ch, 162px); column-gap: 8px; width: max-content; }
.bs-act { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; margin: 0 2px; padding: 0 12px; border-radius: 10px; text-align: left; overflow: hidden;
  background: color-mix(in srgb, var(--ac) 13%, transparent); box-shadow: inset 0 3px 0 var(--ac); color: color-mix(in srgb, var(--ac) 72%, #000); transition: background-color .15s; }
.bs-act:hover { background: color-mix(in srgb, var(--ac) 20%, transparent); }
.bs-act b { font: 800 12.5px var(--f-ui); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.bs-act span { font-size: 11.5px; font-weight: 600; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-phase { position: relative; align-self: end; min-width: 0; height: 32px; margin: 0 4px; padding: 0 8px; font: 700 20px/1 'Caveat', var(--f-ui); color: var(--pc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bs-phase::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: 0; height: 6px; border: 2px solid color-mix(in srgb, var(--pc) 55%, transparent); border-bottom: 0; border-radius: 6px 6px 0 0; }
.bs-phase span { position: relative; top: -3px; }
.bs-phase:hover span { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.bs-cap-l { align-self: end; justify-self: start; font: 700 17px/1 'Caveat', var(--f-ui); color: var(--paper-ink); transform: rotate(-9deg); transform-origin: left bottom; white-space: nowrap; margin-bottom: 6px; }
.bs-cap-l.end { justify-self: end; transform: rotate(0); transform-origin: right bottom; }
.bs-ln { position: relative; }
.bs-ln::before { content: ""; position: absolute; left: -5px; right: -5px; top: 50%; height: 4px; margin-top: -2px; background: #232326; border-radius: 3px; }
.bs-ln.cap::before { left: 50%; }
.bs-ln.cap.end::before { left: -5px; right: 50%; }
.bs-ln.cap::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #232326; border-radius: 2px; }
.bs-ln i { position: absolute; z-index: 1; background: var(--bc); }
.bs-ln.beat i { left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; box-shadow: 0 0 0 3px var(--paper); }
.bs-ln.pivot i { left: 50%; top: -3px; bottom: -3px; width: 4px; margin-left: -2px; border-radius: 2px; }
.bs-lab, .bs-pivot { align-self: start; justify-self: center; max-width: 100%; margin-top: 4px; padding: 2px 5px 3px; border-radius: 8px; font: 700 18px/1.02 'Caveat', var(--f-ui); color: var(--bc); text-align: center; overflow-wrap: anywhere; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: background-color .15s; }
.bs-lab { cursor: grab; }
.bs-lab:hover, .bs-pivot:hover { background: color-mix(in srgb, var(--bc) 11%, transparent); }
.bs-pivot { font-size: 19px; }
.bs-pivot small { display: block; margin-top: 3px; font: 700 10px/1.2 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; opacity: .78; }
.bs-slot { position: relative; min-width: 0; }
.bs-bline::before { content: ""; position: absolute; left: 50%; top: -8px; bottom: 6px; border-left: 2px dashed color-mix(in srgb, var(--bc) 65%, transparent); }
.bs-pline { position: relative; }
.bs-pline::before { content: ""; position: absolute; left: 50%; margin-left: -2px; top: -8px; bottom: 6px; width: 4px; border-radius: 2px; background: color-mix(in srgb, var(--bc) 78%, transparent); }
.bs-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; border: 2px dashed rgba(0,0,0,.14); border-radius: 14px; color: #8a8580; font-size: 12.5px; font-weight: 600; text-align: center; }
.bs-empty .btn { background: #fff; color: #333; }
.bs-tail { border: 2px dashed rgba(0,0,0,.07); border-radius: 14px; }
.bs-card { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; gap: 5px; padding: 10px 11px 9px; text-align: left; border-radius: 14px; overflow: hidden; color: #1c1d20;
  background: #fff linear-gradient(color-mix(in srgb, var(--cc) 8%, transparent), color-mix(in srgb, var(--cc) 8%, transparent));
  box-shadow: inset 0 4px 0 var(--cc), 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px color-mix(in srgb, var(--cc) 30%, rgba(0,0,0,.08));
  cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .15s var(--ease), box-shadow .15s; }
.bs-card:hover { transform: translateY(-2px); box-shadow: inset 0 4px 0 var(--cc), 0 10px 22px -10px rgba(0,0,0,.35), 0 0 0 1px color-mix(in srgb, var(--cc) 50%, rgba(0,0,0,.08)); }
.bs-card .top { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 2px; padding-right: 18px; }
.bs-card .num { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: var(--cc); color: #fff; font: 700 11px var(--f-ui); flex: none; }
.bs-card .kind { flex: 1; min-width: 0; font: 700 10px var(--f-ui); letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--cc) 72%, #000); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-card .dur { flex: none; font: 600 11px var(--f-mono); font-style: normal; color: #6b6b72; }
.bs-card .top, .bs-card .ttl, .bs-card .ft { flex: none; }
.bs-card .ttl { font: 650 13.5px/1.25 var(--f-ui); letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bs-card .sum { flex: 0 1 auto; min-height: 0; font-size: 12px; line-height: 1.38; color: #5c5c64; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bs-grid.small .bs-card .sum { -webkit-line-clamp: 1; }
.bs-grid.big .bs-card .sum { -webkit-line-clamp: 4; }
.bs-rslot .bs-card .sum { display: none; }
.bs-grid.small .bs-card .ttl { font-size: 13px; }
.bs-card .ft { margin-top: auto; display: flex; align-items: center; gap: 2px; min-width: 0; }
.bs-card .ft .av { margin-right: -5px; box-shadow: 0 0 0 2px #fff; }
.bs-card .more-n { margin-left: 8px; font-size: 11px; font-weight: 700; color: #6b6b72; }
.bs-card .mi { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: #6b6b72; }
.bs-card .mi svg.i { width: 13px; height: 13px; }
.bs-card .stdot { width: 8px; height: 8px; border-radius: 50%; background: var(--sd); margin-left: 6px; flex: none; }
.bs-card .bs-more { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: rgba(255,255,255,.92); color: #5c5c64; box-shadow: 0 0 0 1px rgba(0,0,0,.08); opacity: 0; transition: opacity .15s; cursor: pointer; }
.bs-card:hover .bs-more, .bs-card:focus-visible .bs-more { opacity: 1; }
@media (hover: none) { .bs-card .bs-more { opacity: .85; } }
.bs-card.compact { padding: 9px 8px 8px; }
.bs-card.compact .ttl { -webkit-line-clamp: 4; font-size: 12px; }
.bs-card.compact .kind, .bs-card.compact .dur { display: none; }
.bs-ghost { position: fixed !important; left: 0; top: 0; z-index: 300; margin: 0; pointer-events: none; opacity: .96; box-shadow: 0 20px 44px -12px rgba(0,0,0,.5) !important; transition: none !important; }
.bs-dragging { opacity: .28; }
body.bs-drag-on, body.bs-drag-on * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.bs-ind { display: none; position: absolute; top: 76px; bottom: 0; width: 4px; margin-left: -2px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); z-index: 5; pointer-events: none; }
.bs-reserve { padding: 12px 14px 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); transition: box-shadow .15s, background-color .15s; }
.bs-reserve.over { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.bs-reserve header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; }
.bs-reserve header b { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; }
.bs-res-list { display: flex; flex-wrap: wrap; gap: 10px; }
.bs-res-list:empty { min-height: 40px; border: 2px dashed var(--line-2); border-radius: 12px; }
.bs-rslot { width: 160px; height: 128px; }
.bs-empty-state { max-width: 560px; margin: 30px auto; }
@media (max-width: 760px) {
  .bs-scroll { padding: 10px 14px 16px; border-radius: 14px; }
  .bs-tools { gap: 6px; }
  .bs-legend { order: 10; width: 100%; }
  .bs-rslot { width: 142px; height: 118px; }
  .bs-q textarea { font-size: 19px; }
}
@media print {
  @page { size: A3 landscape; margin: 10mm; }
  body.bs-printing > *:not(#bsPrintRoot) { display: none !important; }
  #bsPrintRoot { color: #111; background: #fff; }
  #bsPrintRoot * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #bsPrintRoot .bs-tools, #bsPrintRoot .bs-banner, #bsPrintRoot .bs-more, #bsPrintRoot .bs-ind, #bsPrintRoot .bs-empty .btn, #bsPrintRoot .bs-q .eyebrow { display: none !important; }
  #bsPrintRoot .bs-q { margin-bottom: 8mm; }
  #bsPrintRoot .bs-qtext { display: block; font: italic 600 26px/1.3 'Source Serif 4', Georgia, serif; color: #111; text-align: center; }
  #bsPrintRoot .bs-vname { display: block; margin-top: 4px; font: 600 12px var(--f-ui); color: #666; text-align: center; letter-spacing: .04em; }
  #bsPrintRoot .bs-scroll { overflow: visible; box-shadow: none; padding: 0; background-color: #fff; }
  #bsPrintRoot .bs-grid { zoom: var(--bs-print-zoom, 1); }
  #bsPrintRoot .bs-card { break-inside: avoid; }
}

/* ───────── polices, couleurs : fenêtres flottantes partagées ───────── */
.pop { position: fixed; z-index: 1200; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); padding: 10px; max-width: calc(100vw - 16px); animation: popIn .14s var(--ease); }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.font-pop { width: 270px; padding: 6px; }
.fp-search input { width: 100%; height: 34px; border-radius: 9px; border: 0; background: var(--surface-2); padding: 0 11px; font-size: 13.5px; outline: none; color: var(--text); }
.fp-list { max-height: min(60vh, 440px); overflow-y: auto; margin-top: 4px; overscroll-behavior: contain; }
.fp-cat { font: 650 10.5px var(--f-ui); text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); padding: 12px 10px 4px; }
.fp-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; padding: 7px 10px; border-radius: 8px; font-size: 17px; line-height: 1.25; color: var(--text); }
.fp-item:hover { background: var(--surface-2); }
.fp-item.on { color: var(--accent-text); background: var(--accent-soft); }
.color-pop { width: 238px; }
.cp-title { font: 650 12px var(--f-ui); color: var(--text-2); margin: 2px 2px 9px; }
.cp-title .faint { font-weight: 500; }
.cp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.cp-sw { aspect-ratio: 1; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); transition: transform .12s var(--ease); }
.cp-sw:hover { transform: scale(1.12); }
.cp-sw.on { box-shadow: inset 0 0 0 1px rgba(0,0,0,.14), 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.cp-sw.none { background: linear-gradient(135deg, transparent 44%, #e5484d 44% 56%, transparent 56%), var(--surface-2); }
.cp-foot { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.cp-foot:empty { display: none; }
.cp-custom { position: relative; overflow: hidden; cursor: pointer; }
.cp-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.toolbar .tb-font { height: 30px; display: inline-flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 7px 0 9px; background: var(--surface-2); border-radius: 8px; font-size: 13.5px; width: 128px; color: var(--text); }
.toolbar .tb-font:hover { background: var(--surface-3); }
.toolbar .tb-font span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolbar .tb-font:disabled { opacity: .32; }
.toolbar .tb-style { height: 30px; gap: 5px; }
.style-pop { width: min(470px, calc(100vw - 16px)); }
.dst-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
:where(.dst) { --d-acc: #2f6bff; }
.dst { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 10px 9px; border-radius: 11px; background: var(--paper); color: var(--paper-ink); box-shadow: 0 0 0 1px var(--line); text-align: left; transition: box-shadow .15s, transform .15s var(--ease); }
.dst:hover { transform: translateY(-1px); }
.dst.on { box-shadow: 0 0 0 2px var(--accent); }
.dst-aa { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.dst-aa b { font-family: var(--d-head, var(--f-display)); font-size: 25px; font-weight: var(--d-h1w, 750); line-height: 1; color: var(--d-acc); }
.dst-aa i { font-family: var(--d-body, var(--f-serif)); font-style: normal; font-size: 12.5px; color: #555; }
.dst-l { font: 650 12.5px var(--f-ui); }
.dst-d { font: 11px/1.3 var(--f-ui); color: #7a7a80; }
@media (max-width: 560px) { .dst-grid { grid-template-columns: repeat(2, 1fr); } }

/* ───────── styles de document ───────── */
:where(.doc-page, .doc-thumb .sheet) { --d-acc: #2f6bff; }
.doc-page { font-family: var(--d-body, var(--f-serif)); font-size: var(--d-size, 16px); }
.doc-page h1 { font-family: var(--d-head, var(--f-display)); font-weight: var(--d-h1w, 750); text-transform: var(--d-h1t, none); letter-spacing: var(--d-h1ls, -0.03em); color: var(--d-h1c, inherit); }
.doc-page h2 { font-family: var(--d-head, var(--f-display)); color: var(--d-h2c, inherit); }
.doc-page h3 { font-family: var(--d-kick, var(--f-ui)); color: var(--d-h3c, #8a8580); }
.doc-page blockquote { border-left-color: var(--d-acc); }
.doc-thumb .sheet { font-family: var(--d-body, var(--f-serif)); }
.doc-thumb .sheet h1, .doc-thumb .sheet h2 { font-family: var(--d-head, var(--f-display)); color: var(--d-h2c, inherit); }
.doc-thumb .sheet h1 { color: var(--d-h1c, inherit); text-transform: var(--d-h1t, none); }
.th-epure { --d-body: 'Inter', system-ui, sans-serif; --d-head: 'Inter', system-ui, sans-serif; --d-kick: 'Inter', sans-serif; --d-acc: #1c64f2; --d-h2c: var(--d-acc); --d-h3c: var(--d-acc); --d-size: 15.5px; --d-h1w: 700; --d-h1ls: -0.035em; }
.doc-page.th-epure { line-height: 1.75; }
.doc-page.th-epure h2 { font-size: 19px; }
.doc-page.th-epure .callout:not([class*="c-"]) { background: #f6f7f9; }
.th-plateforme { --d-body: Arial, Helvetica, sans-serif; --d-head: 'Gotham', 'Gotham Book', 'Montserrat', sans-serif; --d-kick: 'Gotham', 'Montserrat', sans-serif; --d-acc: #e5484d; --d-size: 15px; --d-h1w: 800; --d-h1ls: -0.01em; --d-h1t: uppercase; --d-h3c: var(--d-acc); }
.doc-page.th-plateforme h2 { border-bottom: 2px solid var(--d-acc); padding-bottom: 6px; text-transform: uppercase; letter-spacing: .03em; font-size: 17px; font-weight: 800; }
.doc-page.th-plateforme h3 { font-weight: 800; }
.th-editorial { --d-body: 'Lora', Georgia, serif; --d-head: 'Playfair Display', Georgia, serif; --d-kick: 'Inter', sans-serif; --d-acc: #b7791f; --d-size: 16.5px; --d-h1w: 700; --d-h1ls: -0.01em; --d-h3c: var(--d-acc); }
.doc-page.th-editorial h1 { font-size: 42px; }
.doc-page.th-editorial h2 { font-size: 25px; font-weight: 700; }
.doc-page.th-editorial blockquote { font-family: 'Playfair Display', serif; font-size: 23px; line-height: 1.4; border-left: 0; padding: .2em 1.4em; text-align: center; color: var(--d-acc); }
.th-moderne { --d-body: 'Open Sans', sans-serif; --d-head: 'Montserrat', sans-serif; --d-kick: 'Montserrat', sans-serif; --d-acc: #7048e8; --d-size: 15px; --d-h1w: 800; --d-h1ls: -0.025em; --d-h3c: var(--d-acc); }
.doc-page.th-moderne h2 { padding-left: 12px; border-left: 4px solid var(--d-acc); font-weight: 750; }
.th-elegant { --d-body: 'EB Garamond', Garamond, serif; --d-head: 'Cormorant Garamond', Garamond, serif; --d-kick: 'Cormorant Garamond', serif; --d-acc: #1e3a8a; --d-size: 18px; --d-h1w: 600; --d-h1ls: 0; --d-h2c: var(--d-acc); }
.doc-page.th-elegant h1 { font-size: 44px; text-align: center; }
.doc-page.th-elegant h2 { font-size: 27px; font-weight: 600; }
.doc-page.th-elegant h3 { text-align: center; letter-spacing: .32em; font-size: 12.5px; font-weight: 600; }
.th-manuscrit { --d-body: 'Patrick Hand', 'Kalam', cursive; --d-head: 'Caveat', cursive; --d-kick: 'Caveat', cursive; --d-acc: #1c64f2; --d-size: 19px; --d-h1w: 700; --d-h1ls: 0; --d-h2c: var(--d-acc); }
.doc-page.th-manuscrit h1 { font-size: 48px; }
.doc-page.th-manuscrit h2 { font-size: 31px; }
.doc-page.th-manuscrit h3 { font-size: 21px; text-transform: none; letter-spacing: 0; font-weight: 700; }
.th-scenario { --d-body: 'Courier Prime', 'Courier New', monospace; --d-head: 'Courier Prime', 'Courier New', monospace; --d-kick: 'Courier Prime', monospace; --d-acc: #1b1b1f; --d-size: 15px; --d-h1w: 700; --d-h1ls: 0; --d-h1t: uppercase; --d-h3c: #1b1b1f; }
.doc-page.th-scenario h1 { text-align: center; font-size: 21px; text-decoration: underline; text-underline-offset: 4px; }
.doc-page.th-scenario h2 { font-size: 15.5px; text-transform: uppercase; letter-spacing: 0; }
.doc-page.th-scenario h3 { letter-spacing: 0; font-size: 14px; }
/* paragraphes : chapô, petit texte */
.doc-page p.lead { font-size: 1.24em; line-height: 1.55; color: #3d3d44; margin-bottom: 1.1em; }
.doc-page p.small { font-size: .82em; line-height: 1.5; color: #6b6b72; }
/* encadrés de couleur */
.doc-page .callout { position: relative; }
.doc-page .callout.c-info { --cc: #1c64f2; } .doc-page .callout.c-idea { --cc: #d29b00; } .doc-page .callout.c-ok { --cc: #2b8a3e; }
.doc-page .callout.c-warn { --cc: #e8590c; } .doc-page .callout.c-alert { --cc: #e5484d; } .doc-page .callout.c-note { --cc: #6b7280; } .doc-page .callout.c-accent { --cc: var(--d-acc); }
.doc-page .callout[class*="c-"] { background: color-mix(in srgb, var(--cc) 8%, #fff); box-shadow: inset 4px 0 0 var(--cc); border-radius: 4px 10px 10px 4px; padding-left: 46px; }
.doc-page .callout[class*="c-"]::before { position: absolute; left: 16px; top: 14px; width: 18px; text-align: center; font: 800 15px/1.5 var(--f-ui); color: var(--cc); }
.doc-page .callout.c-info::before { content: "i"; font-family: Georgia, serif; font-style: italic; }
.doc-page .callout.c-idea::before { content: "💡"; font-size: 14px; }
.doc-page .callout.c-ok::before { content: "✓"; }
.doc-page .callout.c-warn::before { content: "⚠"; }
.doc-page .callout.c-alert::before { content: "!"; }
.doc-page .callout.c-note::before { content: "✎"; }
.doc-page .callout.c-accent::before { content: "◆"; font-size: 12px; top: 16px; }
/* étiquettes de couleur */
.doc-page .tag { display: inline-block; padding: .02em .6em; border-radius: 999px; font: 650 .76em/1.65 var(--f-ui); letter-spacing: .01em; vertical-align: .1em; background: color-mix(in srgb, var(--tgc) 14%, #fff); color: color-mix(in srgb, var(--tgc) 82%, #000); }
.tag.tg-blue { --tgc: #1c64f2; } .tag.tg-green { --tgc: #2b8a3e; } .tag.tg-yellow { --tgc: #c99400; } .tag.tg-orange { --tgc: #e8590c; }
.tag.tg-red { --tgc: #e5484d; } .tag.tg-purple { --tgc: #7048e8; } .tag.tg-grey { --tgc: #6b7280; }
/* tableaux : épuré, rayé, en-tête de couleur, mise en colonnes */
.doc-page table.t-clean td, .doc-page table.t-clean th { border-left: 0; border-right: 0; border-top: 0; }
.doc-page table.t-clean th { background: transparent; border-bottom: 2px solid var(--paper-ink); }
.doc-page table.t-striped td, .doc-page table.t-striped th { border: 0; }
.doc-page table.t-striped tbody tr:nth-child(odd) td { background: #f5f5f2; }
.doc-page table.t-striped th { background: transparent; border-bottom: 2px solid var(--paper-line); }
.doc-page table.t-accent th { background: var(--d-acc); color: #fff; border-color: var(--d-acc); }
.doc-page table.t-accent { border-radius: 8px; overflow: hidden; }
.doc-page table.cols2, .doc-page table.cols3 { table-layout: fixed; font-size: inherit; margin: 1.2em 0; }
.doc-page table.cols2 td, .doc-page table.cols3 td { border: 0; padding: 0 22px 0 0; }
.doc-page table.cols2 td:last-child, .doc-page table.cols3 td:last-child { padding-right: 0; }
.doc-shell[data-mode="edit"] .doc-page table.cols2 td, .doc-shell[data-mode="edit"] .doc-page table.cols3 td { outline: 1px dashed #e2e0db; outline-offset: 4px; }
@media (max-width: 620px) { .doc-page table.cols2 td, .doc-page table.cols3 td { display: block; width: auto; padding: 0 0 12px; } }

/* ───────── tableaux blancs : mise en forme, sélection multiple, guides, direct ───────── */
.bd-item .txt { display: flex; flex-direction: column; }
.bd-item .txt.va-top { justify-content: flex-start; }
.bd-item .txt.va-middle { justify-content: center; }
.bd-item .txt.va-bottom { justify-content: flex-end; }
.bd-item[data-type="rect"], .bd-item[data-type="ellipse"] { display: block; }
.bd-item.shape-rect { border-radius: 3px; }
.bd-item.shape-round { border-radius: 14px; }
.bd-item.shape-pill { border-radius: 999px; padding-inline: 18px; }
.bd-item.shape-ellipse { border-radius: 50%; }
.bd-item.shape-diamond { background: none !important; border: 0 !important; padding: 0; }
.bd-item.shape-diamond .bd-shape { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.bd-item.shape-diamond .txt { position: relative; padding: 16% 20%; }
.bd-item.shadow { box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 14px 30px -12px rgba(0,0,0,.38); }
.bd-item.shape-diamond.shadow { box-shadow: none; filter: drop-shadow(0 10px 14px rgba(0,0,0,.22)); }
.bd-item[data-type="text"].hl { border-radius: 8px; padding: 4px 10px; color: #1d1b16; }
.bd-item.peer-sel { outline: 2px solid var(--pc); outline-offset: 4px; border-radius: 6px; }
.bd-item.peer-sel::after { content: attr(data-peer); position: absolute; left: -2px; top: -30px; background: var(--pc); color: #fff; font: 600 11.5px var(--f-ui); padding: 2px 8px; border-radius: 999px; white-space: nowrap; pointer-events: none; }
.bd-marquee { position: absolute; z-index: 4; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); border-radius: 3px; pointer-events: none; }
.bd-guides { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; z-index: 3; }
.bd-guides line { stroke: #f0368c; }
.bd-ctx { flex-wrap: wrap; justify-content: center; max-width: min(760px, calc(100% - 16px)); gap: 2px; padding: 5px; }
.bd-ctx .btn-icon { width: 30px; height: 30px; border-radius: 8px; }
.bd-ctx .btn-icon.on { background: var(--accent-soft); color: var(--accent-text); }
.bc-sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 4px; }
.bc-font { height: 30px; padding: 0 6px 0 9px; border-radius: 8px; background: var(--surface-2); font-size: 14px; display: inline-flex; align-items: center; gap: 4px; max-width: 140px; white-space: nowrap; overflow: hidden; color: var(--text); }
.bc-font:hover { background: var(--surface-3); }
.bc-size { font-size: 12px; min-width: 22px; text-align: center; color: var(--text-2); }
.bc-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.bc-dot[style*="transparent"] { background: linear-gradient(135deg, transparent 44%, #e5484d 44% 56%, transparent 56%), var(--surface-2); }
[data-op="hl"] { position: relative; }
[data-op="hl"] .bc-dot { position: absolute; right: 3px; bottom: 3px; width: 9px; height: 9px; }
.bc-a { font: 800 14px/1 var(--f-ui); border-bottom: 3px solid var(--c); padding: 0 2px 1px; }
.bc-line { width: 18px; height: 3px; border-radius: 2px; background: var(--c); box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.bd-share { height: 38px; border-radius: 12px; box-shadow: var(--shadow-lg); }
.bd-ro { height: 24px; font-size: 11.5px; }
.bd-shell.ro .bd-item { cursor: default; }
#bdPeers .av { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
#bdPeers .av:first-child { margin-left: 0; }
@media (max-width: 760px) { .bd-share span { display: none; } .bd-share { width: 38px; padding: 0; justify-content: center; } }

/* ───────── travail à plusieurs : membres, accès, partagés avec moi ───────── */
.proj-people { gap: 8px; }
.proj-people .avs { display: inline-flex; }
.proj-people .avs .av { width: 24px; height: 24px; font-size: 10px; margin-left: -7px; box-shadow: 0 0 0 2px var(--surface); }
.proj-people .avs .av:first-child { margin-left: 0; }
.collab-box .banner { border-radius: 10px; }
.cb-invite { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.cb-invite .btn { height: 40px; }
.cb-list, .cb-access { display: flex; flex-direction: column; gap: 6px; }
.cb-row { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.cb-row.on { background: var(--accent-soft); }
.cb-row .av { flex: none; }
.cb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cb-main b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-main span { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-row select.cb-role { width: auto; flex: none; min-width: 140px; max-width: 46%; min-height: 34px; height: 34px; padding: 0 10px; font-size: 13px; background-color: var(--surface); }
.cb-add { align-self: flex-start; margin-top: 2px; }
.cb-link { padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 13.5px; }
.cb-link p { margin: 0 0 10px; }
.cb-url { display: flex; gap: 6px; flex-wrap: wrap; }
.cb-url input { flex: 1; min-width: 180px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); padding: 0 10px; font: 12.5px var(--f-mono); color: var(--text); }
.sh-badge { position: absolute; left: 10px; top: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px 3px 6px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); color: var(--text-2); font-size: 11px; }
.sh-badge .avs { display: inline-flex; }
.sh-badge .av { width: 18px; height: 18px; font-size: 8px; margin-left: -5px; box-shadow: 0 0 0 1.5px var(--surface); }
.sh-badge .av:first-child { margin-left: 0; }
.doc-thumb.doc-item { position: relative; }
.role-chip { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--surface-3); color: var(--text-2); margin-right: 4px; }
.role-chip.r-edit { background: color-mix(in srgb, #2b8a3e 14%, transparent); color: #2b8a3e; }
.role-chip.r-suggest { background: color-mix(in srgb, #1c64f2 14%, transparent); color: #1c64f2; }
.role-chip.r-comment { background: color-mix(in srgb, #c99400 16%, transparent); color: #a07600; }
.nav-owner { margin-left: auto; font-size: 10px; font-weight: 650; color: var(--text-3); background: var(--surface-3); border-radius: 999px; padding: 1px 6px; }
.shared-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; text-align: left; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.shared-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); }
.shared-card .sc-top { display: flex; align-items: center; gap: 10px; font-size: 15.5px; }
.shared-card .sc-by { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); }
.proj-hd .meta .av { width: 20px; height: 20px; font-size: 9px; margin-right: 6px; vertical-align: -5px; }
.bd-pill[hidden], .bd-ctx[hidden], .bd-marquee[hidden] { display: none !important; }

/* ───────── petits éléments partagés : champ avec unité, fichiers joints, boutons radio ───────── */
.inp-unit { display: flex; align-items: center; background: var(--surface-2); border-radius: var(--r-sm); border: 1px solid transparent; min-height: 38px; padding-right: 10px; }
.inp-unit:focus-within { border-color: var(--accent); }
.inp-unit input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; outline: none; padding: 8px 10px 8px 12px; font-variant-numeric: tabular-nums; color: var(--text); min-height: 0 !important; }
.inp-unit span { color: var(--text-3); font-size: 12.5px; white-space: nowrap; }
.inp-unit.sm { min-height: 30px; }
.inp-unit.sm input { padding: 4px 6px 4px 9px; font-size: 13px; width: 70px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchips:empty { display: none; }
.fchip { display: inline-flex; align-items: center; gap: 2px; border-radius: 9px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); max-width: 100%; }
.fchip-open { display: inline-flex; align-items: center; gap: 6px; padding: 5px 4px 5px 9px; font-size: 12.5px; color: var(--text); min-width: 0; }
.fchip-open span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.fchip-open:hover span { text-decoration: underline; }
.fchip-x { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--text-3); margin-right: 2px; }
.fchip-x:hover { background: var(--surface-3); color: var(--text); }
.radio-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.radio-row:has(input:checked) { background: var(--accent-soft); }
.radio-row input { margin-top: 3px; accent-color: var(--accent); }
.radio-row span { display: flex; flex-direction: column; gap: 2px; }
.radio-row b { font-weight: 600; font-size: 14px; }
.radio-row em { font-style: normal; font-size: 12.5px; color: var(--text-3); }
.meter.full i { background: #e5484d; }
.meter.inf i { width: 100%; background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 10px); opacity: .5; }
.empty.sm { padding: 18px 10px; }
.empty.sm .tile { width: 44px; height: 44px; }
button.storage { width: 100%; text-align: left; border-radius: 10px; transition: background-color .15s; }
button.storage:hover { background: var(--surface-2); }

/* ───────── budget ───────── */
.bud { display: flex; flex-direction: column; gap: 16px; }
.bud .panel-head h2 { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bud-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.bud-kpis, .bud-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.bud-top { align-items: end; margin-bottom: 12px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); min-width: 0; }
.kpi span { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.kpi b { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi em { font-style: normal; font-size: 12px; color: var(--text-3); }
.kpi.main { background: var(--accent-soft); }
.kpi.main b { color: var(--accent-text); }
.kpi.neg b { color: #e5484d; }
.bud-bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: 12px 0 6px; }
.bud-bar.big { height: 9px; }
.bud-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .6s var(--ease); }
.bud-bar.over i { background: #e5484d; }
.bud-hint { font-size: 12.5px; margin: 6px 0 0; }
.bud-bill { border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.bud-cats { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.bud-cat { display: grid; grid-template-columns: minmax(120px, 190px) 1fr 90px 112px; align-items: center; gap: 12px; padding: 4px 0; }
.bc-name { text-align: left; font-size: 13.5px; font-weight: 550; padding: 4px 8px; border-radius: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-name:hover, .bc-name[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); }
.bc-bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bc-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bud-cat.over .bc-bar i { background: #e5484d; }
.bc-spent { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-2); }
.bud-exp { position: relative; }
.exp-list { display: flex; flex-direction: column; }
.exp-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto auto 110px; align-items: center; gap: 12px; padding: 10px 18px; text-align: left; border-top: 1px solid var(--line); transition: background-color .15s; }
.exp-row:hover { background: var(--surface-2); }
.ex-date { font-size: 12.5px; color: var(--text-3); }
.ex-main { display: flex; flex-direction: column; min-width: 0; }
.ex-main b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-main em { font-style: normal; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-who { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.ex-st { height: 22px; font-size: 11.5px; }
.ex-st.refund { background: color-mix(in srgb, #e8590c 14%, transparent); color: #c4500a; }
.ex-st.refunded { background: color-mix(in srgb, #2b8a3e 14%, transparent); color: #2b8a3e; }
.ex-files { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.ex-nofile { font-style: normal; font-size: 11.5px; color: #c4500a; }
.ex-amt { text-align: right; font-weight: 650; font-size: 14px; }
.exp-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); flex-wrap: wrap; }
.exp-foot b { color: var(--text); font-size: 15px; }
.ex-drop { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; border: 1.5px dashed var(--line-2); transition: border-color .15s, background-color .15s; }
.ex-drop.on { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 760px) {
  .bud-cat { grid-template-columns: minmax(0, 1fr) 80px 96px; }
  .bud-cat .bc-bar { grid-column: 1 / -1; grid-row: 2; }
  .exp-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px 14px; }
  .exp-row .ex-date { grid-column: 1; grid-row: 2; }
  .exp-row .ex-main { grid-column: 1; grid-row: 1; }
  .exp-row .ex-amt { grid-column: 2; grid-row: 1; }
  .exp-row .ex-files { grid-column: 2; grid-row: 2; justify-self: end; }
  .exp-row .ex-who, .exp-row > span:nth-child(4) { display: none; }
  .kpi b { font-size: 19px; }
}

/* ───────── cours ───────── */
.crs-grid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.crs-card { display: flex; gap: 14px; text-align: left; padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.crs-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); }
.cc-band { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--cc), color-mix(in srgb, var(--cc) 60%, #000)); }
.cc-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cc-main b { font-size: 15.5px; font-weight: 650; letter-spacing: -0.01em; }
.cc-main em { font-style: normal; font-size: 13px; color: var(--text-3); }
.cc-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; font-size: 12.5px; color: var(--text-2); }
.cc-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.cc-has { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.cc-has i { font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: color-mix(in srgb, var(--cc) 13%, transparent); color: color-mix(in srgb, var(--cc) 80%, var(--text)); }
.crs-hd { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.crs-ic { flex: none; width: 56px; height: 56px; border-radius: 17px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--cc), color-mix(in srgb, var(--cc) 60%, #000)); box-shadow: 0 10px 24px -12px var(--cc); }
.crs-ic svg { width: 26px; height: 26px; }
.crs-hd-main { flex: 1; min-width: 220px; }
.crs-title { width: 100%; background: transparent; border: 0; outline: none; font: 750 28px/1.15 var(--f-display); letter-spacing: -0.03em; color: var(--text); padding: 2px 6px; margin-left: -6px; border-radius: 8px; }
.crs-title:hover, .crs-title:focus { background: var(--surface-2); }
.crs-hd .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-2); margin-top: 2px; }
.crs-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.crs-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.crs .panel-head h2 { display: inline-flex; align-items: center; gap: 8px; }
.crs-add { display: flex; flex-wrap: wrap; gap: 8px; }
.crs-video { width: 100%; border-radius: 12px; background: #000; display: block; max-height: 62vh; }
.crs-embed { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.crs-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.crs-extlink { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; background: var(--surface-2); color: var(--text); }
.crs-extlink span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.crs-extlink em { font-style: normal; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crs-sub { font-size: 12.5px; margin: 8px 0 0; }
.crs-tr { max-height: 420px; overflow-y: auto; white-space: pre-wrap; font: 14.5px/1.7 var(--f-serif); color: var(--text-2); padding-right: 6px; }
.crs-tr mark { background: #fff3a3; color: #1b1b1f; border-radius: 3px; padding: 0 2px; }
.crs-tr-edit, .crs-notes { width: 100%; min-height: 220px; resize: vertical; border: 0; outline: none; border-radius: 12px; background: var(--surface-2); padding: 12px 14px; font: 14.5px/1.65 var(--f-serif); color: var(--text); }
.crs-notes { min-height: 140px; font-family: var(--f-ui); font-size: 14px; }
.crs-tq { width: 210px; }
.crs-tq input { min-height: 30px !important; padding-top: 4px !important; padding-bottom: 4px !important; font-size: 13px; }
.crs-list { display: flex; flex-direction: column; padding: 0 8px 8px; }
.crs-li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; text-align: left; }
.crs-li:hover { background: var(--surface-2); }
.crs-li.past { opacity: .55; }
.cl-d { flex: none; width: 48px; display: flex; flex-direction: column; align-items: center; padding: 4px 0; border-radius: 10px; background: color-mix(in srgb, var(--cc) 12%, transparent); color: color-mix(in srgb, var(--cc) 80%, var(--text)); }
.cl-d b { font-size: 12.5px; font-weight: 700; }
.cl-d em { font-style: normal; font-size: 10.5px; text-transform: capitalize; }
.cl-m { display: flex; flex-direction: column; min-width: 0; }
.cl-m b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-m em { font-style: normal; font-size: 12px; color: var(--text-3); }
.crs-ex { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; }
.crs-ex:hover { background: var(--surface-2); }
.crs-ex.done .ce-main b { text-decoration: line-through; color: var(--text-3); }
.ce-main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.ce-main b { font-size: 13.5px; font-weight: 550; }
.ce-main em { font-style: normal; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crs-file { display: flex; align-items: center; gap: 6px; padding: 2px 4px 2px 0; border-radius: 10px; }
.crs-file:hover { background: var(--surface-2); }
.cf-main { flex: 1; display: flex; align-items: center; gap: 10px; padding: 7px 10px; text-align: left; min-width: 0; }
.cf-main > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.cf-main b { font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-main em { font-style: normal; font-size: 12px; color: var(--text-3); }
.cf-ic { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--cc) 12%, transparent); color: color-mix(in srgb, var(--cc) 80%, var(--text)); }
#crsSup { position: relative; }
/* le récap visuel */
.crs-recap { --cc: #0891b2; display: flex; flex-direction: column; gap: 16px; }
.rc-head { padding: 18px 20px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--cc) 16%, var(--surface)), color-mix(in srgb, var(--cc) 5%, var(--surface))); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc) 22%, transparent); }
.rc-kick { display: inline-flex; align-items: center; gap: 6px; font: 650 11px var(--f-ui); text-transform: uppercase; letter-spacing: .12em; color: color-mix(in srgb, var(--cc) 75%, var(--text)); }
.rc-line { margin: 8px 0 0; font: 650 20px/1.35 var(--f-display); letter-spacing: -0.015em; color: var(--text); }
.rc-points { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.rc-pt { position: relative; padding: 14px 14px 14px 16px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 3px 0 0 var(--pc); display: flex; flex-direction: column; gap: 5px; }
.rc-n { position: absolute; top: 10px; right: 12px; font: 800 22px/1 var(--f-display); color: color-mix(in srgb, var(--pc) 35%, transparent); }
.rc-pt b { font-size: 14.5px; font-weight: 650; padding-right: 26px; color: color-mix(in srgb, var(--pc) 70%, var(--text)); }
.rc-pt p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.rc-keys { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rc-keys .eyebrow { margin: 0 6px 0 0; }
.rc-key { padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: color-mix(in srgb, var(--cc) 12%, transparent); color: color-mix(in srgb, var(--cc) 80%, var(--text)); }
.rc-next p { margin: 6px 0 0; font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.rc-auto { margin: 0; font-size: 12px; color: var(--text-3); font-style: italic; }
@media (max-width: 960px) { .crs-layout { grid-template-columns: 1fr; } .crs-title { font-size: 23px; } }
/* récap en PDF : une feuille A4 propre */
#printRoot { display: none; }
@page recap { size: A4 portrait; margin: 14mm; }
@media print {
  html.printing body > *:not(#printRoot) { display: none !important; }
  html.printing #printRoot { display: block; page: recap; color: #111; background: #fff; }
  #printRoot * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #printRoot .crs-recap { --surface: #fff; --surface-2: #f5f6f8; --text: #111; --text-2: #333; --text-3: #666; }
  #printRoot .rc-pt { break-inside: avoid; }
}

/* ───────── stockage ───────── */
.stor-me { display: flex; gap: 16px; align-items: flex-start; }
.stor-ic { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.stor-ic.ok { background: color-mix(in srgb, #e5484d 12%, transparent); color: #e5484d; }
.stor-main { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stor-main > b { font-size: 16px; font-weight: 650; }
.stor-main > span { font-size: 13.5px; color: var(--text-2); }
.stor-use { font-size: 13.5px; color: var(--text-2); margin-top: 4px; }
.stor-steps { margin: 6px 0 8px; padding-left: 20px; font-size: 13.5px; color: var(--text-2); display: flex; flex-direction: column; gap: 4px; }
.stor-steps li.done { color: var(--text-3); text-decoration: line-through; }
.stor-users { display: flex; flex-direction: column; }
.stor-u { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(130px, 200px) auto auto; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line); }
.su-main { display: flex; flex-direction: column; min-width: 0; }
.su-main b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-main span { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-use { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-variant-numeric: tabular-nums; }
.su-use em { font-style: normal; color: var(--text-3); }
.su-kind { height: 22px; font-size: 11.5px; }
@media (max-width: 760px) { .stor-u { grid-template-columns: auto minmax(0, 1fr) auto; } .stor-u .su-use { grid-column: 2 / -1; } .stor-u .su-kind { display: none; } }

.bud-pay .wc-stats { display: none; }
