/* Iris — interface.
   Gris neutres, le contenu dans un panneau posé sur le fond de la fenêtre, typographie du système.
   Noir et blanc pour la hiérarchie ; le bleu du système uniquement pour la sélection, le focus et les interrupteurs. */

:root, :root[data-theme="dark"] {
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  --app: #0a0a0b;
  --bg: #111112;
  --bg-2: #0c0c0d;
  --sidebar: #0a0a0b;
  --panel: #161617;
  --panel-2: #1c1c1e;
  --panel-3: #262629;
  --btn: #1c1c1e;
  --border: rgba(255, 255, 255, .075);
  --border-2: rgba(255, 255, 255, .12);
  --hover: rgba(255, 255, 255, .05);
  --hover-border: rgba(255, 255, 255, .2);
  --text: #ececee;
  --muted: #a1a1a8;
  --faint: #6d6d74;
  --ink: #ececee;
  --on-ink: #111112;
  --accent: #0a84ff;
  --accent-hover: #3a9bff;
  --accent-text: #52a8ff;
  --accent-soft: rgba(10, 132, 255, .16);
  --accent-border: rgba(10, 132, 255, .5);
  --nav-active: rgba(255, 255, 255, .065);
  --nav-active-text: #f5f5f7;
  --orange: #ececee;
  --orange-hover: #ffffff;
  --star: #ececee;
  --ok: #30a46c;
  --warn: #f5a524;
  --err: #e5484d;
  --ok-text: #4cc38a;
  --warn-text: #f5b93a;
  --err-text: #ff6b6f;
  --ok-bg: rgba(48, 164, 108, .13);
  --warn-bg: rgba(245, 165, 36, .12);
  --err-bg: rgba(229, 72, 77, .13);
  --notice-ok: #7dd9a8;
  --notice-err: #ff9ea1;
  --notice-warn: #f7cd7a;
  --seg-bg: rgba(255, 255, 255, .045);
  --seg-active: #2c2c30;
  --seg-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  --knob: #ffffff;
  --spinner-track: rgba(255, 255, 255, .12);
  --card-shadow: none;
  --thumb-bg: #1a1a1c;
  --glass: #1c1c1e;
  --elevated: #1a1a1c;
  --overlay: rgba(0, 0, 0, .55);
  --stripe: rgba(255, 255, 255, .025);
  --stripe-line: rgba(255, 255, 255, .07);
  --mk-cut: #d4d4d8;
  --mk-flash: #f5a524;
  --mk-flash-glow: rgba(245, 165, 36, .5);
  --checker-a: #1a1a1c;
  --checker-b: #242427;
  --wave-filter: none;
  --t-flash: #f5a524;
  --t-happening: #2ec5a8;
  --t-takeoff: #6ea8ff;
  --t-classique: #c084fc;
  --grad-ig: linear-gradient(45deg, #feda75 0%, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5 100%);
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 18px 50px -12px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --panel-shadow: 0 0 0 1px rgba(255, 255, 255, .06);
  --sidebar-w: 232px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --app: #f1f1f2;
  --bg: #fcfcfc;
  --bg-2: #ffffff;
  --sidebar: #f1f1f2;
  --panel: #ffffff;
  --panel-2: #f6f6f7;
  --panel-3: #ececee;
  --btn: #ffffff;
  --border: #e7e7e9;
  --border-2: #dadadd;
  --hover: rgba(0, 0, 0, .04);
  --hover-border: #c2c2c7;
  --text: #1a1a1c;
  --muted: #616169;
  --faint: #9d9da4;
  --ink: #1a1a1c;
  --on-ink: #ffffff;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-text: #0066cc;
  --accent-soft: rgba(0, 113, 227, .1);
  --accent-border: rgba(0, 113, 227, .45);
  --nav-active: rgba(0, 0, 0, .055);
  --nav-active-text: #1a1a1c;
  --orange: #1a1a1c;
  --orange-hover: #000000;
  --star: #1a1a1c;
  --ok: #2b9a66;
  --warn: #e6a019;
  --err: #dc3e42;
  --ok-text: #1d7a4f;
  --warn-text: #a35c00;
  --err-text: #c62a2f;
  --ok-bg: rgba(43, 154, 102, .09);
  --warn-bg: rgba(230, 160, 25, .12);
  --err-bg: rgba(220, 62, 66, .08);
  --notice-ok: #16623f;
  --notice-err: #a3242a;
  --notice-warn: #7a4a00;
  --seg-bg: rgba(0, 0, 0, .045);
  --seg-active: #ffffff;
  --seg-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 0 0 .5px rgba(0, 0, 0, .06);
  --knob: #ffffff;
  --spinner-track: rgba(0, 0, 0, .1);
  --thumb-bg: #ececee;
  --glass: #ffffff;
  --elevated: #ffffff;
  --overlay: rgba(10, 10, 12, .28);
  --stripe: rgba(0, 0, 0, .03);
  --stripe-line: rgba(0, 0, 0, .07);
  --mk-cut: #1a1a1c;
  --mk-flash: #d18a00;
  --mk-flash-glow: rgba(209, 138, 0, .35);
  --checker-a: #ffffff;
  --checker-b: #ececee;
  --wave-filter: invert(1) brightness(.4);
  --t-flash: #d18a00;
  --t-happening: #0f9b83;
  --t-takeoff: #2f6fdb;
  --t-classique: #9333ea;
  --shadow: 0 18px 50px -16px rgba(0, 0, 0, .25), 0 0 0 1px rgba(0, 0, 0, .07);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .06);
  --panel-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 1px 3px rgba(0, 0, 0, .04);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--text); background: var(--app); overflow: hidden;
  font: 13px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img, video, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--hover-border); }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
h1, h2, h3, .display { font-family: var(--display); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }
.iris-text { color: inherit; }

/* ---------- menu latéral ---------- */
.app { display: flex; height: 100vh; }
.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; width: var(--sidebar-w); z-index: 20;
  background: var(--sidebar); display: flex; flex-direction: column; padding: 10px 8px 10px 10px; overflow-y: auto; overflow-x: hidden;
  transition: width .2s cubic-bezier(.2, .8, .2, 1);
}
.sidebar::-webkit-scrollbar { width: 0; }
.brand { display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 4px 0 6px; margin-bottom: 8px; }
.brand .logo { width: 22px; height: 22px; flex: none; }
.brand .word { font-family: var(--display); font-weight: 650; font-size: 14.5px; letter-spacing: -0.01em; line-height: 1; }
.brand .sub { display: none; }
.sidebar .collapse-btn { margin-left: auto; width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; background: none; border: 0; color: var(--faint); cursor: pointer; flex: none; opacity: 0; transition: opacity .15s, background .12s, color .12s; }
.sidebar:hover .collapse-btn, .sidebar .collapse-btn:focus-visible { opacity: 1; }
.sidebar .collapse-btn:hover { color: var(--text); background: var(--hover); }
.sidebar .collapse-btn span { display: none; }
.nav-search { display: flex; align-items: center; gap: 8px; width: 100%; height: 30px; padding: 0 6px 0 9px; margin: 2px 0 12px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel); color: var(--faint); font-size: 13px; cursor: pointer; transition: border-color .12s, color .12s; box-shadow: var(--shadow-sm); }
.nav-search:hover { border-color: var(--border-2); color: var(--muted); }
.nav-search span { flex: 1; text-align: left; }
.nav-search kbd { font-size: 10.5px; }
.nav-section { font-size: 11.5px; font-weight: 500; color: var(--faint); padding: 16px 8px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 9px; height: 28px; padding: 0 8px; border-radius: 6px; cursor: pointer; margin: 1px 0;
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: 13px; position: relative; transition: background .1s, color .1s;
}
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--nav-active); color: var(--nav-active-text); }
.nav-item .ic { width: 16px; display: inline-flex; justify-content: center; color: var(--faint); flex: none; transition: color .1s; }
.nav-item .ic svg { width: 16px; height: 16px; }
.nav-item:hover .ic, .nav-item.active .ic, .nav-item.open .ic { color: var(--text); }
.nav-item .chev { margin-left: auto; color: var(--faint); transition: transform .2s; display: inline-flex; opacity: 0; }
.nav-item:hover .chev { opacity: 1; }
.nav-item .chev svg { width: 14px; height: 14px; }
.nav-item.open { color: var(--text); }
.nav-item.open .chev { transform: rotate(180deg); }
.nav-item .badge { margin-left: auto; }
.nav-item .badge + .chev { margin-left: 4px; }
.nav-sub { margin: 1px 0 4px 15px; padding-left: 9px; border-left: 1px solid var(--border-2); display: flex; flex-direction: column; gap: 1px; }
.nav-subitem { position: relative; display: flex; align-items: center; gap: 8px; height: 27px; padding: 0 8px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 500; transition: background .1s, color .1s; }
.nav-subitem .ic { color: var(--faint); display: inline-flex; }
.nav-subitem .ic svg { width: 15px; height: 15px; }
.nav-subitem:hover { background: var(--hover); color: var(--text); }
.nav-subitem.active { background: var(--nav-active); color: var(--nav-active-text); }
.nav-subitem.active .ic { color: var(--nav-active-text); }
/* sous-page ouverte : son bout du fil de l'arborescence passe en couleur du texte */
.nav-subitem.active::before { content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 1px; background: var(--text); }
.sidebar-foot { margin-top: auto; padding: 14px 8px 2px; font-size: 11.5px; color: var(--faint); display: flex; flex-direction: column; gap: 5px; }
.sidebar-foot .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 7px; vertical-align: 1px; background: var(--ok); }
.sidebar-foot .dot.off { background: var(--err); }

body.collapsed { --sidebar-w: 56px; }
body.collapsed .sidebar { padding: 10px 8px; }
body.collapsed .brand { flex-direction: column; height: auto; padding: 4px 0 8px; gap: 10px; }
body.collapsed .brand .word, body.collapsed .brand .sub { display: none; }
body.collapsed .sidebar .collapse-btn { margin-left: 0; opacity: 1; }
body.collapsed .nav-item > span:not(.ic), body.collapsed .nav-section, body.collapsed .nav-sub,
body.collapsed .nav-item .chev, body.collapsed .sidebar-foot { display: none; }
body.collapsed .nav-item { justify-content: center; padding: 0; height: 32px; }
body.collapsed .nav-item.child-active { background: var(--nav-active); color: var(--nav-active-text); }
body.collapsed .nav-item.child-active .ic { color: var(--text); }
body.collapsed .nav-search { justify-content: center; padding: 0; }
body.collapsed .nav-search span, body.collapsed .nav-search kbd { display: none; }
body.collapsed .collapse-btn svg { transform: rotate(180deg); }

/* ---------- contenu : un panneau posé sur le fond de la fenêtre ---------- */
.main {
  margin: 8px 8px 8px var(--sidebar-w); height: calc(100vh - 16px); flex: 1; min-width: 0; overflow: auto; position: relative;
  padding: 0 32px 96px; background: var(--bg); border-radius: 12px; box-shadow: var(--panel-shadow);
  transition: margin-left .2s cubic-bezier(.2, .8, .2, 1);
}
.topright {
  position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px; height: 48px;
  margin: 0 -32px 4px; padding: 0 14px 0 32px; background: var(--bg); border-bottom: 1px solid var(--border);
}
.crumb { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 13px; color: var(--faint); font-weight: 500; }
.crumb b { color: var(--text); font-weight: 500; }
.crumb .sep { color: var(--border-2); font-weight: 400; }
.controls { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.flags { display: inline-flex; gap: 2px; align-items: center; padding: 2px; border-radius: 7px; background: var(--seg-bg); }
.flags button { border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 500; height: 24px; min-width: 32px; padding: 0 8px; border-radius: 5px; cursor: pointer; transition: color .1s; }
.flags button:hover { color: var(--text); }
.flags button.active { background: var(--seg-active); color: var(--text); box-shadow: var(--seg-shadow); }
.top-row { display: contents; }
/* SFW : un bouton qui reste enfoncé quand le flou est actif */
.sfw { display: inline-flex; align-items: center; height: 28px; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; user-select: none; letter-spacing: .02em; transition: background .12s, color .12s; }
.sfw:hover { background: var(--hover); color: var(--text); }
.sfw input { display: none; }
.sfw .track { display: none; }
.sfw::before { content: ""; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; background: var(--faint); transition: background .15s, box-shadow .15s; }
.sfw:has(input:checked) { background: var(--seg-active); color: var(--text); box-shadow: var(--seg-shadow); }
.sfw:has(input:checked)::before { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.theme-btn { width: 28px; height: 28px; border-radius: 7px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: color .12s, background .12s; }
.theme-btn:hover { color: var(--text); background: var(--hover); }

.page-head { display: flex; align-items: flex-end; gap: 16px; margin: 28px 0 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.page-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; max-width: 640px; }
.page-head > div:first-child { flex: 1 1 360px; min-width: 0; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.status-pill { position: fixed; bottom: 20px; left: calc(var(--sidebar-w) + 40px); z-index: 25; background: var(--elevated); border-radius: 9px; padding: 9px 13px; font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; max-width: 420px; box-shadow: var(--shadow); }
.back-link { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); text-decoration: none; font-weight: 500; margin-bottom: 8px; font-size: 13px; }
.back-link:hover { color: var(--text); }

/* ---------- accueil (ancien en-tête) ---------- */
.hero { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin: 28px 0 22px; }
.hero .hello { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
.hero .date { color: var(--muted); font-size: 13px; margin-top: 5px; }
.hero .quick { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* ---------- éléments ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--card-shadow); }
.card + .card { margin-top: 12px; }
.card h2, .card h3 { margin: 0 0 3px; font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.card .sub { color: var(--muted); margin: 0 0 14px; font-size: 13px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .spacer { flex: 1; }
.label, .field > label { font-size: 12px; font-weight: 500; color: var(--muted); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
kbd { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; font-family: var(--font); font-size: 11px; font-weight: 500; color: var(--muted); background: var(--panel-2); border: 1px solid var(--border-2); border-radius: 4px; line-height: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: 7px; border: 1px solid var(--border-2); background: var(--btn); color: var(--text); box-shadow: var(--shadow-sm);
  font-weight: 500; font-size: 13px; cursor: pointer; white-space: nowrap; text-decoration: none; user-select: none;
  transition: background .12s, border-color .12s, opacity .12s, transform .06s;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--panel-2); border-color: var(--hover-border); }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary, .btn-orange { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn-primary:hover, .btn-orange:hover { background: var(--ink); border-color: var(--ink); opacity: .86; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn-ghost:hover { background: var(--hover); color: var(--text); border-color: transparent; }
.btn-danger { color: var(--err-text); }
.btn-danger:hover { background: var(--err-bg); border-color: transparent; }
.modal-foot .btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.modal-foot .btn-danger:hover { background: var(--err); opacity: .88; }
.btn-icon-danger { color: var(--err-text); border-color: transparent; background: transparent; box-shadow: none; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-xs { height: 22px; padding: 0 7px; font-size: 12px; border-radius: 5px; gap: 4px; }
.btn-xs svg { width: 13px; height: 13px; }
.btn-lg { height: 36px; padding: 0 16px; font-size: 14px; border-radius: 8px; }
.btn-icon { width: 30px; padding: 0; }
.btn-sm.btn-icon { width: 28px; }
.btn-xs.btn-icon { width: 22px; }
.btn-block { width: 100%; }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 500; background: var(--panel-3); color: var(--muted); border: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge.grad { background: var(--ink); color: var(--on-ink); }
.badge.ok { background: var(--ok-bg); color: var(--ok-text); }
.badge.err { background: var(--err-bg); color: var(--err-text); }
.badge.warn { background: var(--warn-bg); color: var(--warn-text); }
.badge.red { background: var(--err); color: #fff; }
.badge.blue { background: var(--accent-soft); color: var(--accent-text); }
.nav-item .badge.grad { background: var(--panel-3); color: var(--text); height: 17px; min-width: 17px; justify-content: center; padding: 0 5px; font-size: 10.5px; border-radius: 9px; }
.pbadge { display: inline-flex; align-items: center; height: 16px; padding: 0 5px; border-radius: 4px; font-size: 9.5px; font-weight: 700; letter-spacing: .02em; color: #fff; }
.pbadge.of { background: #00aff0; } .pbadge.mym { background: #e11d48; } .pbadge.fanvue { background: #16a34a; } .pbadge.fansly { background: #1c9bef; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--border-2); background: transparent; font-size: 12.5px; font-weight: 500; color: var(--muted); cursor: default; white-space: nowrap; transition: background .1s, color .1s, border-color .1s; }
.chip svg { width: 13px; height: 13px; }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--hover-border); color: var(--text); }
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stars { display: inline-flex; gap: 1px; color: var(--star); font-size: 13px; letter-spacing: 1px; }
.stars button { background: none; border: 0; padding: 0 1px; cursor: pointer; color: var(--border-2); font-size: inherit; line-height: 1; transition: color .1s; }
.stars button:hover { color: var(--muted); }
.stars button.on { color: var(--star); }
.stars .off { color: var(--border-2); }
.stars.big { font-size: 17px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field .hint { font-size: 12px; color: var(--faint); }
.input, .select, .textarea {
  width: 100%; height: 32px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--border-2);
  background: var(--bg-2); color: var(--text); outline: none; font-size: 13px; transition: border-color .12s, box-shadow .12s;
}
.textarea { height: auto; min-height: 76px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 28px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2390909a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; }
.select option { background: var(--elevated); color: var(--text); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--hover-border); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input-sm { height: 28px; font-size: 12.5px; border-radius: 6px; }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 20px; }
input[type="color"] { width: 34px; height: 30px; border: 1px solid var(--border-2); border-radius: 7px; background: var(--bg-2); padding: 3px; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; }
.range-row { display: grid; grid-template-columns: 1fr 64px; align-items: center; gap: 10px; }
.range-row output { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 500; }
.switch input { display: none; }
.switch .track { width: 30px; height: 18px; border-radius: 999px; background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--border); position: relative; transition: background .18s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--knob); transition: transform .18s cubic-bezier(.2, .8, .2, 1); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.switch input:checked + .track { background: var(--accent); box-shadow: none; }
.switch input:checked + .track::after { transform: translateX(12px); }

.seg { display: inline-flex; background: var(--seg-bg); border-radius: 8px; padding: 2px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--muted); height: 26px; padding: 0 11px; border-radius: 6px; cursor: pointer; font-weight: 500; font-size: 12.5px; transition: color .1s; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--seg-active); color: var(--text); box-shadow: var(--seg-shadow); }
.seg.block { display: flex; }
.seg.block button { flex: 1 1 auto; white-space: nowrap; }

.progress { height: 4px; background: var(--panel-3); border-radius: 2px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .3s ease; }
.progress.indeterminate > i { width: 35% !important; animation: indet 1.2s infinite ease-in-out; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--spinner-track); border-top-color: var(--text); animation: spin .7s linear infinite; flex: none; }
.spinner.lg { width: 26px; height: 26px; border-width: 2.5px; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .ic { width: 40px; height: 40px; margin: 0 auto 14px; display: grid; place-items: center; color: var(--muted); border-radius: 10px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.empty .ic svg { width: 19px; height: 19px; }
.empty h3 { margin: 0 0 4px; color: var(--text); font-size: 14px; font-weight: 600; }
.empty p { margin: 0 auto 16px; max-width: 420px; font-size: 13px; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.notice.ok { background: var(--ok-bg); border-color: transparent; color: var(--notice-ok); }
.notice.warn { background: var(--warn-bg); border-color: transparent; color: var(--notice-warn); }
.notice.err { background: var(--err-bg); border-color: transparent; color: var(--notice-err); }
.notice b { color: inherit; font-weight: 600; }
.notice svg { flex: none; margin-top: 1px; width: 16px; height: 16px; }
.bar-ok { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; background: var(--ok-bg); color: var(--ok-text); font-weight: 500; font-size: 13px; }
.bar-ok .right { margin-left: auto; font-weight: 400; opacity: .8; font-size: 12.5px; }
.bar-ok .btn { flex: none; }
/* Récupérer : connexion du compte, bien en vue tant qu'elle manque */
.connect-card.required { border-color: var(--accent-border); box-shadow: 0 0 0 3px var(--accent-soft); }
.connect-ic { width: 32px; height: 32px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); }
.nudge > .card { animation: nudge 1.2s ease; }
@keyframes nudge { 30% { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); } }

/* tableaux */
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 9px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: transparent; }
.table td { padding: 9px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 13px; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover td { background: var(--hover); }
.table tr:last-child td { border-bottom: 0; }
.table tr.pinned td { background: var(--panel-2); }
.table tr.pinned td:first-child { box-shadow: inset 2px 0 0 var(--text); }
.table tr.warnrow td:first-child { box-shadow: inset 2px 0 0 var(--warn); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; }
.handle-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 3px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 500; margin: 2px 4px 2px 0; }
.handle-chip .ig { width: 15px; height: 15px; border-radius: 50%; background: var(--grad-ig); flex: none; }
.cell-input { background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 4px 7px; width: 100%; color: inherit; font: inherit; transition: border-color .1s; }
.cell-input:hover { border-color: var(--border-2); }
.cell-input:focus { border-color: var(--accent); background: var(--bg-2); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.plat { width: 26px; height: 26px; border-radius: 7px; display: inline-grid; place-items: center; border: 1px solid var(--border-2); background: transparent; color: var(--faint); cursor: pointer; margin-right: 4px; filter: grayscale(1); opacity: .5; }
.plat.on { filter: none; opacity: 1; }
.plat.on.ig { background: var(--grad-ig); color: #fff; border-color: transparent; }
.plat.on.tw { background: #111; color: #fff; border-color: transparent; }
.star-btn { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border-2); background: transparent; color: var(--faint); cursor: pointer; display: grid; place-items: center; }
.star-btn.on { color: var(--text); border-color: var(--text); }

/* chiffres clés : une bande à filets (chaque case trace son filet gauche et haut, ceux du bord sont masqués) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 20px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--card-shadow); }
.stats.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { position: relative; background: var(--panel); padding: 14px 18px 15px; margin: -1px 0 0 -1px; border-left: 1px solid var(--border); border-top: 1px solid var(--border); transition: background .12s; }
.stat[style*="pointer"]:hover { background: var(--panel-2); }
.stat .k { font-size: 12px; font-weight: 500; color: var(--muted); }
.stat .v { font-family: var(--display); font-size: 24px; font-weight: 600; letter-spacing: -0.025em; margin-top: 6px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .h { font-size: 12px; color: var(--faint); margin-top: 3px; }
.stat.warn .v { color: var(--warn-text); }
.stat.ok .v { color: var(--text); }
.card .stats, .stats.loose { gap: 12px; background: transparent; border: 0; border-radius: 0; overflow: visible; box-shadow: none; }
.card .stats .stat, .stats.loose .stat { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); }

/* ---------- bibliothèque : identités en bulles ---------- */
.lib { display: flex; flex-direction: column; gap: 12px; }
.idpanel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px 8px; box-shadow: var(--card-shadow); }
.idpanel .bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding-left: 2px; }
.idpanel .bar .title { font-weight: 500; font-size: 12px; color: var(--muted); }
.idpanel .search { position: relative; margin-left: auto; width: 220px; }
.idpanel .search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 14px; height: 14px; }
.idpanel .search .input { padding-left: 29px; height: 28px; border-radius: 7px; font-size: 12.5px; }
.idpanel .filter { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.idpanel .filter select { background: none; border: 0; color: var(--muted); font-weight: 500; cursor: pointer; }
.stories { display: flex; gap: 2px; overflow-x: auto; padding: 4px 0 4px; scroll-snap-type: x proximity; }
.stories::-webkit-scrollbar { height: 6px; }
.story { flex: none; width: 80px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 4px; border-radius: 9px; cursor: pointer; background: none; border: 0; color: var(--text); scroll-snap-align: start; position: relative; transition: background .1s; }
.story:hover { background: var(--hover); }
.story .ring { width: 56px; height: 56px; border-radius: 50%; padding: 2px; background: var(--border-2); display: grid; place-items: center; transition: background .15s; }
.story .ring .avatar { width: 100%; height: 100%; border: 2px solid var(--panel); }
.story.fresh .ring { background: var(--accent); }
.story.active .ring { background: var(--ink); }
.story .nm { font-size: 12px; font-weight: 500; max-width: 76px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.story.active .nm { color: var(--text); font-weight: 600; }
.story .sub { font-size: 11px; color: var(--faint); margin-top: -4px; display: flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.story .count { position: absolute; top: 4px; right: 11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 600; display: grid; place-items: center; border: 2px solid var(--panel); font-variant-numeric: tabular-nums; }
.story.add .ring { background: transparent; border: 1px dashed var(--border-2); }
.story.add .ring span { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; color: var(--faint); }
.story.add:hover .ring { border-color: var(--hover-border); }
.story.add:hover .ring span { color: var(--text); }
.stories .empty-note { color: var(--faint); font-size: 13px; padding: 18px 8px; }
.idgroup-sep { flex: none; width: 1px; margin: 12px 6px; background: var(--border); }
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--muted); overflow: hidden; background: var(--panel-3); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 26px; height: 26px; font-size: 11.5px; }
.avatar.lg { width: 44px; height: 44px; font-size: 17px; box-shadow: 0 0 0 1px var(--border); }
.flag { font-size: 13px; line-height: 1; }
.ig-mini { width: 12px; height: 12px; border-radius: 50%; background: var(--grad-ig); display: inline-block; flex: none; }
.tw-mini { width: 12px; height: 12px; border-radius: 50%; background: #1d9bf0; display: inline-block; flex: none; }
.new-id { border: 1px dashed var(--border-2); border-radius: 8px; padding: 10px; text-align: center; color: var(--muted); font-weight: 500; cursor: pointer; background: none; width: 100%; }
.new-id:hover { color: var(--text); border-color: var(--hover-border); }

.libmain { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; min-height: 60vh; transition: border-color .15s, background .15s; box-shadow: var(--card-shadow); }
.libhead { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.libhead .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.libhead .who .h { font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: -0.015em; display: flex; align-items: center; gap: 7px; }
.libhead .who .s { font-size: 12px; color: var(--faint); margin-top: 1px; }
.libhead .actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.libhead .drive-line { display: flex; align-items: center; gap: 5px; max-width: 420px; }
.libhead .drive-line svg { flex: none; }
.libbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.libbar .select { width: auto; height: 28px; font-size: 12.5px; padding: 0 26px 0 10px; border-radius: 7px; }

.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.tile { position: relative; aspect-ratio: 9 / 16; border-radius: 8px; overflow: hidden; background: var(--thumb-bg); outline: 2px solid transparent; outline-offset: 2px; cursor: pointer; container-type: inline-size; transition: outline-color .12s; }
.tile:hover { outline-color: var(--border-2); }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; }
.tile .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.tile::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 48px; background: linear-gradient(rgba(0, 0, 0, .4), transparent); pointer-events: none; }
.tile .tbar { position: absolute; left: 6px; right: 6px; top: 6px; display: flex; gap: 3px; align-items: center; z-index: 2; }
.tile .tbar .date { background: rgba(0, 0, 0, .6); color: #fff; font-size: 10.5px; font-weight: 600; padding: 0 6px; height: 20px; display: inline-flex; align-items: center; border-radius: 5px; margin-right: auto; white-space: nowrap; flex: none; font-variant-numeric: tabular-nums; }
.tile .tbar button, .tile .tbar a { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 0; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; text-decoration: none; transition: background .12s; }
.tile .tbar button svg, .tile .tbar a svg { width: 13px; height: 13px; }
@container (max-width: 215px) { .tile .tbar .date { padding: 0 5px; font-size: 10px; } .tile .tbar button, .tile .tbar a { width: 20px; height: 20px; } }
.tile .tbar button:hover, .tile .tbar a:hover { background: rgba(0, 0, 0, .85); }
.tile .tbar button.on-flash { background: #f5a524; color: #1c1300; }
.tile .tbar button.on-dispo { background: #30a46c; color: #fff; }
.tile .tbar button.on-banger { background: #e5484d; color: #fff; }
.tile .tbar button.on-sel { background: var(--accent); }
.tile .playc { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.tile .playc span { width: 36px; height: 36px; border-radius: 50%; background: rgba(0, 0, 0, .5); display: grid; place-items: center; color: #fff; }
.tile .tags { position: absolute; left: 6px; bottom: 6px; right: 6px; display: flex; gap: 3px; flex-wrap: wrap; z-index: 2; }
.tile .tags span { font-size: 9.5px; font-weight: 650; padding: 2px 5px; border-radius: 4px; color: #fff; letter-spacing: .03em; }
.tile .tags .t-vt { background: rgba(0, 0, 0, .75); display: inline-flex; align-items: center; gap: 3px; }
.tile .tags .t-banger { background: #e5484d; } .tile .tags .t-flash { background: #c98a0c; } .tile .tags .t-dispo { background: #2b9a66; } .tile .tags .t-drive { background: rgba(0, 0, 0, .55); }
.tile .tags .t-sent { background: rgba(0, 0, 0, .75); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.selected { outline-color: var(--accent); }
body.sfw-on .id-head .avatar img, body.sfw-on .chip .avatar img, body.sfw-on .tile img, body.sfw-on .tile video, body.sfw-on .blurable img, body.sfw-on .blurable video, body.sfw-on .blurable canvas, body.sfw-on .ig-tile img, body.sfw-on .out-card .cover img, body.sfw-on .tpl-thumb img, body.sfw-on .media-thumb img, body.sfw-on .story .avatar img { filter: blur(16px) saturate(.8); transform: scale(1.1); }

.bulkbar { position: fixed; left: calc(var(--sidebar-w) + 40px); right: 40px; bottom: 22px; z-index: 30; background: var(--elevated); border-radius: 11px; padding: 7px 8px 7px 14px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; animation: slideUp .2s cubic-bezier(.2, .8, .2, 1); }
@keyframes slideUp { from { transform: translateY(10px); opacity: 0; } }
.bulkbar .count { font-weight: 600; margin-right: 6px; font-variant-numeric: tabular-nums; }

.dropzone { border: 1px dashed var(--border-2); border-radius: var(--radius); padding: 40px 20px; text-align: center; color: var(--muted); transition: all .15s; }
.dropzone.over, .libmain.over { border-color: var(--accent); background: var(--accent-soft); }

/* textes (Bios, CTA, Noms…) */
.textlist { display: flex; flex-direction: column; gap: 6px; }
.textrow { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); transition: border-color .12s; }
.textrow:hover { border-color: var(--border-2); }
.textrow .t { flex: 1; white-space: pre-wrap; word-break: break-word; font-size: 13px; }
.textrow.used .t { color: var(--faint); text-decoration: line-through; }
.textrow .acts { display: flex; gap: 4px; flex: none; }

/* ---------- templates ---------- */
.info-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.info-card b { color: var(--text); font-weight: 600; }
.tpl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
.tpl-row { display: flex; gap: 16px; align-items: center; padding: 12px 14px 12px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .12s; box-shadow: var(--card-shadow); }
.tpl-row:hover { border-color: var(--border-2); }
.tpl-thumb { width: 64px; height: 112px; border-radius: 7px; overflow: hidden; background: var(--thumb-bg); flex: none; cursor: pointer; }
.tpl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tpl-row .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tpl-row .top { display: flex; align-items: center; gap: 10px; }
.tpl-row .name { font-weight: 600; }
.tpl-row .name-input { flex: 1; min-width: 0; height: 30px; padding: 0 7px; border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--text); font-family: var(--display); font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; margin: 0; width: auto; }
.tpl-row .name-input:hover { border-color: var(--border-2); }
.tpl-row .name-input:focus { outline: none; border-color: var(--accent); background: var(--bg-2); box-shadow: 0 0 0 3px var(--accent-soft); }
/* les infos d'une template : une ligne de texte, pas des pastilles */
.tpl-row .chips { gap: 3px 14px; }
.tpl-row .chips .chip { height: auto; padding: 0; gap: 5px; border: 0; border-radius: 0; background: none; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.tpl-row .chips .chip svg { width: 13px; height: 13px; color: var(--faint); }
.tpl-row .acts { display: flex; gap: 6px; }

/* ---------- éditeur de template ---------- */
.editor { display: grid; grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.editor .left { position: sticky; top: 64px; display: flex; flex-direction: column; gap: 12px; }
.editor .right { display: flex; flex-direction: column; gap: 12px; }
.editor .right .card + .card { margin-top: 0; }
.name-input { font-family: var(--display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; background: transparent; border: 1px solid transparent; border-radius: 7px; padding: 1px 7px; margin-left: -8px; width: min(520px, 100%); outline: none; }
.name-input:hover { border-color: var(--border-2); }
.name-input:focus { border-color: var(--accent); background: var(--bg-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.save-state { font-size: 12px; color: var(--faint); display: inline-flex; align-items: center; gap: 5px; }
.player { position: relative; background: #000; border-radius: 9px; overflow: hidden; display: grid; place-items: center; }
.player video { width: 100%; max-height: 56vh; background: #000; }
.player.vertical video { max-height: 62vh; width: auto; margin: 0 auto; }
.timeline { position: relative; height: 68px; margin-top: 12px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border-2); overflow: hidden; cursor: pointer; user-select: none; }
.timeline .wave { position: absolute; inset: 14px 0 10px; width: 100%; height: calc(100% - 24px); object-fit: fill; opacity: .25; pointer-events: none; filter: var(--wave-filter); }
.timeline .seg { position: absolute; top: 0; bottom: 0; border-right: 1px solid var(--stripe-line); pointer-events: none; }
.timeline .seg:nth-child(odd) { background: var(--stripe); }
.timeline .mk { position: absolute; top: 0; bottom: 0; width: 14px; margin-left: -7px; cursor: pointer; z-index: 2; }
.timeline .mk::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--mk-cut); }
.timeline .mk.flash::before { background: var(--mk-flash); box-shadow: 0 0 8px 1px var(--mk-flash-glow); width: 3px; }
.timeline .mk.black::before { background: #000; box-shadow: 0 0 0 1px #8e8e96; width: 3px; }
.timeline .mk::after { content: ""; position: absolute; left: 2px; top: 0; width: 10px; height: 9px; background: var(--mk-cut); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.timeline .mk.flash::after { background: var(--mk-flash); }
.timeline .mk.black::after { background: #555; }
.timeline .mk.sel::after, .timeline .mk.sel::before { background: var(--accent); box-shadow: none; }
.timeline .head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); z-index: 3; pointer-events: none; }
/* fin de l'exemple (le pourquoi d'un Happening) */
.timeline .endzone { position: absolute; top: 0; bottom: 0; right: 0; z-index: 1; pointer-events: none; border-left: 2px solid var(--t-happening);
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--t-happening) 16%, transparent) 0 6px, transparent 6px 12px); }
.timeline .endzone span { position: absolute; right: 6px; top: 4px; font-size: 10px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--t-happening); }
.timeline .endgrip { position: absolute; top: 0; bottom: 0; width: 16px; margin-left: -8px; cursor: ew-resize; z-index: 4; }
.timeline .endgrip::after { content: ""; position: absolute; left: 5px; top: 50%; width: 6px; height: 22px; margin-top: -11px; border-radius: 3px; background: var(--t-happening); box-shadow: 0 0 0 2px var(--bg-2); }
.timeline-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; color: var(--muted); align-items: center; }
.timeline-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-title .num { display: none; }
.section-title h3 { margin: 0; font-size: 14px; }
.section-title p { margin: 1px 0 0; color: var(--faint); font-size: 12.5px; }
.text-layer { border: 1px solid var(--border); border-radius: 9px; padding: 12px; background: var(--panel-2); display: flex; flex-direction: column; gap: 10px; }
.text-layer + .text-layer { margin-top: 10px; }
.text-preview-wrap { display: flex; gap: 14px; align-items: flex-start; }
.text-preview { width: 190px; flex: none; position: sticky; top: 64px; display: flex; flex-direction: column; gap: 6px; }
.text-preview canvas { width: 100%; height: auto; }
/* scène : placer les textes à la souris */
.tstage { position: relative; width: 100%; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-2); background: #111; touch-action: none; }
.tstage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
.tstage canvas:focus-visible { box-shadow: 0 0 0 2px var(--accent) inset; }
.tstage-hint { font-size: 11.5px; color: var(--faint); line-height: 1.4; }
.text-layer.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.exact-note { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.exact-note.on { color: var(--ok-text); }
.exact-note .btn { margin-left: auto; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { border: 1px solid var(--border-2); background: transparent; border-radius: 8px; padding: 5px 10px 5px 6px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 12.5px; color: var(--text); transition: border-color .1s; }
.swatch:hover { border-color: var(--hover-border); }
.swatch.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.swatch .sw { width: 20px; height: 20px; border-radius: 5px; flex: none; }
.ring-sw { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ring-sw > span { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(160deg, #8e8e96, #4a4a50); box-shadow: 0 0 0 2px #fff; }
.ring-sw.plain { background: none !important; }
.ring-sw.plain > span { width: 24px; height: 24px; box-shadow: none; }

/* ---------- éditeur (textes sur une vidéo) ---------- */
.ed { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 18px; align-items: start; }
.ed-stage { position: relative; background: #000; border-radius: 9px; overflow: hidden; aspect-ratio: 9 / 16; width: 100%; }
.ed-stage video { width: 100%; height: 100%; object-fit: cover; }
.ed-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ed-stage .grab { position: absolute; cursor: move; border: 1px dashed rgba(255, 255, 255, .55); border-radius: 4px; }
.ed-stage .grab.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ed-ctrl { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ed-panel { display: flex; flex-direction: column; gap: 12px; }
.tl { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-top: 16px; }
.tl-scroll { overflow-x: auto; position: relative; }
.tl-inner { position: relative; min-width: 100%; }
.tl-ruler { position: relative; height: 22px; border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 10px; color: var(--faint); }
.tl-ruler span { position: absolute; top: 3px; transform: translateX(-50%); }
.tl-ruler i { position: absolute; bottom: 0; width: 1px; height: 6px; background: var(--border-2); }
.tl-track { position: relative; height: 40px; margin-top: 8px; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--border); }
.tl-track.video { background: var(--panel-2); }
.tl-clip { position: absolute; top: 5px; bottom: 5px; border-radius: 5px; background: var(--ink); color: var(--on-ink); font-size: 11.5px; font-weight: 500; padding: 0 10px; display: flex; align-items: center; cursor: grab; overflow: hidden; white-space: nowrap; }
.tl-clip.sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.tl-clip .h { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.tl-clip .h.l { left: 0; } .tl-clip .h.r { right: 0; }
.tl-cut { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--t-flash); opacity: .85; }
.tl-head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); z-index: 5; pointer-events: none; }
.tl-head::before { content: ""; position: absolute; top: -4px; left: -4px; width: 10px; height: 10px; background: var(--accent); clip-path: polygon(0 0, 100% 0, 50% 100%); }

/* ---------- vidéos finies ---------- */
.tabs { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--seg-bg); margin-bottom: 16px; }
.tabs button { background: none; border: 0; height: 26px; padding: 0 11px; color: var(--muted); font-weight: 500; font-size: 12.5px; cursor: pointer; border-radius: 6px; display: inline-flex; gap: 6px; align-items: center; transition: color .1s; }
.tabs button svg { width: 14px; height: 14px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); background: var(--seg-active); box-shadow: var(--seg-shadow); }
.job-list { display: flex; flex-direction: column; gap: 8px; }
.job-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 12px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); }
.job-row .thumb { width: 46px; height: 64px; border-radius: 6px; background: var(--panel-3); overflow: hidden; display: grid; place-items: center; color: var(--faint); }
.job-row .title { font-weight: 600; }
.job-row .stage { font-size: 12px; color: var(--muted); margin: 2px 0 7px; }
.out-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
.out-card { border-radius: var(--radius); overflow: hidden; background: var(--panel); border: 1px solid var(--border); display: flex; flex-direction: column; transition: border-color .12s, box-shadow .12s; }
.out-card:hover { border-color: var(--border-2); }
.out-card .cover { position: relative; aspect-ratio: 9 / 16; background: #000; cursor: pointer; overflow: hidden; }
.out-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.out-card .cover .play { position: absolute; inset: 0; display: grid; place-items: center; }
.out-card .cover .play span { width: 42px; height: 42px; border-radius: 50%; background: rgba(0, 0, 0, .5); display: grid; place-items: center; color: #fff; }
.out-card .cover .tag { position: absolute; left: 8px; top: 8px; }
.out-card .cover .badge.grad { background: rgba(0, 0, 0, .7); color: #fff; }
.out-card .cover .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.out-card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 7px; border-top: 1px solid var(--border); }
.out-card .body .name { font-weight: 500; font-size: 12.5px; }
.out-card .body .meta { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.out-card .body .acts { display: flex; gap: 6px; }

/* ---------- planning des chatteurs ---------- */
.sched { width: 100%; border-collapse: separate; border-spacing: 4px; }
.sched th { font-size: 12px; font-weight: 500; color: var(--muted); padding: 4px; text-align: center; }
.sched th:first-child { text-align: left; }
.sched td.name { font-weight: 500; padding-right: 10px; white-space: nowrap; }
.sched .cell { width: 100%; height: 34px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel-2); cursor: pointer; font-weight: 600; font-size: 11.5px; color: var(--faint); transition: transform .08s; }
.sched .cell:active { transform: scale(.97); }
.sched .cell.present { background: var(--ok-bg); border-color: transparent; color: var(--ok-text); }
.sched .cell.late { background: var(--warn-bg); border-color: transparent; color: var(--warn-text); }
.sched .cell.absent { background: var(--err-bg); border-color: transparent; color: var(--err-text); }
.sched .cell.off { background: var(--panel-3); color: var(--faint); }
.sched .today { color: var(--text); }

/* ---------- graphiques ---------- */
.chart { width: 100%; height: 220px; }
.chart path.area { fill: var(--accent-soft); }
.chart path.line { fill: none; stroke: var(--accent); stroke-width: 1.75; }
.chart text { fill: var(--faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.chart line.grid { stroke: var(--border); }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bars .b { display: grid; grid-template-columns: 140px 1fr 60px; gap: 10px; align-items: center; font-size: 13px; }
.bars .b .track { height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.bars .b .track i { display: block; height: 100%; background: var(--ink); border-radius: inherit; }

/* ---------- fenêtres, menus, notifications ---------- */
.modal-back { position: fixed; inset: 0; background: var(--overlay); z-index: 100; display: grid; place-items: center; padding: 24px; animation: fadeIn .14s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: var(--elevated); border: 0; border-radius: 14px; box-shadow: var(--shadow); animation: pop .18s cubic-bezier(.2, .8, .2, 1); overflow: hidden; }
.modal.wide { width: min(980px, 100%); }
.modal.xwide { width: min(1180px, 100%); }
@keyframes pop { from { transform: translateY(6px) scale(.985); opacity: 0; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; min-width: 0; }
.modal-body { padding: 16px 20px 18px; overflow: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--border); }
.video-modal { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; }
.picker { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; min-height: 420px; }
.picker .list { max-height: 55vh; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.picker-items { max-height: 55vh; overflow: auto; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.pick-row:hover { background: var(--hover); }
.pick-row.selected { border-color: var(--accent-border); background: var(--accent-soft); }
.pick-row .th { width: 40px; height: 40px; border-radius: 6px; background: var(--panel-3); overflow: hidden; display: grid; place-items: center; color: var(--faint); flex: none; }
.pick-row .th img { width: 100%; height: 100%; object-fit: cover; }
.pick-row .th.folder { color: var(--muted); background: var(--panel-2); }
.source-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.source-item:hover { background: var(--hover); }
.source-item.active { background: var(--nav-active); }
.source-item .ic { width: 30px; height: 30px; border-radius: 7px; background: var(--panel-3); display: grid; place-items: center; flex: none; color: var(--muted); }
.source-item .name { font-weight: 500; font-size: 13px; }
.source-item .meta { font-size: 11.5px; color: var(--faint); }
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-weight: 500; min-width: 0; }
.crumbs button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 6px; font-weight: 500; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs button:hover { color: var(--text); background: var(--hover); }
.crumbs button:last-child { color: var(--text); }
.crumbs .sep { color: var(--faint); }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { position: relative; background: var(--elevated); color: var(--text); border-radius: 10px; padding: 10px 12px 10px 12px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 9px; max-width: 420px; animation: slideUp .2s cubic-bezier(.2, .8, .2, 1); font-weight: 500; font-size: 13px; }
.toast svg { width: 16px; height: 16px; flex: none; }
.toast.ok svg { color: var(--ok); }
.toast.info svg { color: var(--accent); }
.toast.err svg { color: var(--err); }
.toast .btn { margin-left: 6px; }
.menu { position: absolute; z-index: 150; min-width: 210px; background: var(--elevated); border: 0; border-radius: 10px; padding: 4px; box-shadow: var(--shadow); animation: pop .12s ease; max-height: 60vh; overflow: auto; }
.menu button { display: flex; width: 100%; align-items: center; gap: 9px; text-align: left; background: none; border: 0; padding: 0 8px; height: 30px; border-radius: 6px; cursor: pointer; font-weight: 500; font-size: 13px; color: var(--text); }
.menu button svg { width: 15px; height: 15px; color: var(--muted); }
.menu button:hover { background: var(--hover); }
.menu button.btn-danger, .menu button.btn-danger svg { color: var(--err-text); }
.menu .label { padding: 7px 8px 3px; font-size: 11.5px; color: var(--faint); }
.loading-page { display: grid; place-items: center; padding: 80px; color: var(--muted); gap: 12px; }

/* ---------- recherche rapide (⌘K) ---------- */
.cmdk-back { position: fixed; inset: 0; z-index: 300; background: var(--overlay); display: flex; justify-content: center; align-items: flex-start; padding: 13vh 16px 16px; animation: fadeIn .12s ease; }
.cmdk { width: min(620px, 100%); max-height: min(560px, 76vh); display: flex; flex-direction: column; background: var(--elevated); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; animation: pop .16s cubic-bezier(.2, .8, .2, 1); }
.cmdk-top { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px 0 16px; border-bottom: 1px solid var(--border); color: var(--faint); }
.cmdk-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 15px; color: var(--text); }
.cmdk-input::placeholder { color: var(--faint); }
.cmdk-list { overflow: auto; padding: 6px; }
.cmdk-group { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 500; color: var(--faint); }
.cmdk-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; cursor: pointer; color: var(--muted); font-size: 13.5px; }
.cmdk-item.active { background: var(--nav-active); color: var(--text); }
.cmdk-ic { display: inline-flex; color: var(--faint); }
.cmdk-item.active .cmdk-ic { color: var(--text); }
.cmdk-label { flex: 1; min-width: 0; font-weight: 500; }
.cmdk-hint { font-size: 12px; color: var(--faint); white-space: nowrap; }
.cmdk-empty { padding: 28px 12px; text-align: center; color: var(--faint); }
.cmdk-foot { display: flex; align-items: center; gap: 14px; height: 38px; padding: 0 14px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--faint); }
.cmdk-foot > span { display: inline-flex; align-items: center; gap: 4px; }
.cmdk-foot kbd { margin-right: 2px; }

/* ---------- photos de profil, Instagram, Drive ---------- */
.photos-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
.photos-layout .panel { position: sticky; top: 64px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.photo-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 10px; align-items: center; transition: border-color .12s; }
.photo-card:hover { border-color: var(--border-2); }
.photo-card canvas { width: 146px; height: 146px; cursor: grab; touch-action: none; }
.photo-card .checker, .checker { border-radius: 8px; padding: 6px; background-color: var(--checker-a); background-image: linear-gradient(45deg, var(--checker-b) 25%, transparent 25%), linear-gradient(-45deg, var(--checker-b) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--checker-b) 75%), linear-gradient(-45deg, transparent 75%, var(--checker-b) 75%); background-size: 14px 14px; background-position: 0 0, 0 7px, 7px -7px, -7px 0; }
.photo-card .name { width: 100%; text-align: center; background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 3px 6px; font-weight: 500; font-size: 12.5px; outline: none; }
.photo-card .name:focus { border-color: var(--accent); background: var(--bg-2); }
.photo-card .acts { display: flex; gap: 6px; }
.photo-card .pp-name { width: 100%; text-align: center; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.photo-card .pp-drive { display: inline-flex; vertical-align: -1px; margin-right: 5px; color: var(--faint); }
.pp-folder { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.pp-folder:first-of-type { border-top: 0; }
.pp-folder .ic { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--border); flex: none; }
.pp-colors { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 16px; }
.pp-colors .label { margin-right: 4px; }
.pp-dot { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border-2); cursor: pointer; padding: 0; position: relative; display: grid; place-items: center; color: var(--muted); background: var(--panel-2); transition: transform .12s; }
.pp-dot:hover { transform: scale(1.08); }
.pp-dot.active { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--text); }
.pp-dot.random { color: #fff; border-color: transparent; }
.pp-dot.random svg { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .45)); }
.pp-colors .btn { margin-left: 4px; }
.pp-dot.custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.crop-stage { display: grid; place-items: center; padding: 10px; }
.crop-stage canvas { width: 360px; height: 360px; max-width: 100%; cursor: grab; touch-action: none; }
.cat-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cat-card { text-align: left; border: 1px solid var(--border-2); background: var(--btn); border-radius: 9px; padding: 11px 12px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; color: var(--muted); transition: border-color .12s, box-shadow .12s; }
.cat-card b { color: var(--text); font-weight: 600; display: block; }
.cat-card small { font-size: 11.5px; color: var(--faint); }
.cat-card:hover { border-color: var(--hover-border); }
.cat-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.cat-card.active svg { color: var(--accent); }
.ig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
.ig-tile { position: relative; aspect-ratio: 4 / 5; border-radius: 7px; overflow: hidden; background: var(--thumb-bg); cursor: pointer; }
.ig-tile img { width: 100%; height: 100%; object-fit: cover; }
.ig-tile .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.ig-tile .kind { position: absolute; left: 6px; top: 6px; display: inline-flex; align-items: center; gap: 4px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 10.5px; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.ig-tile .acts { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .12s; }
.ig-tile:hover .acts { opacity: 1; }
.ig-tile .acts .btn { background: rgba(0, 0, 0, .65); border-color: transparent; color: #fff; box-shadow: none; }
.ig-job { padding: 16px 18px; }
.ig-head { display: flex; align-items: center; gap: 12px; }
.ig-head .kind-ic { width: 36px; height: 36px; border-radius: 50%; background: var(--grad-ig); color: #fff; display: grid; place-items: center; flex: none; }
.src-table { display: flex; flex-direction: column; gap: 6px; }
.src-row { display: grid; grid-template-columns: 36px minmax(0, 1.4fr) 220px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 11px; border-radius: 9px; background: var(--panel); border: 1px solid var(--border); }
.src-row .ic { width: 36px; height: 36px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); }
.fs-browser { border: 1px solid var(--border-2); border-radius: 9px; overflow: hidden; }
.fs-browser .bar { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.fs-list { max-height: 360px; overflow: auto; }
.fs-row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--border); }
.fs-row:hover { background: var(--hover); }
.fs-row .n { cursor: pointer; font-weight: 500; flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; }
.fs-row .n svg { color: var(--muted); flex: none; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.steps li { counter-increment: step; position: relative; padding-left: 24px; color: var(--muted); }
.steps li::before { content: counter(step) "."; position: absolute; left: 0; top: 0; width: 18px; text-align: right; color: var(--faint); font-weight: 500; font-variant-numeric: tabular-nums; }
.steps li b { color: var(--text); font-weight: 600; }
.settings-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }

@media (max-width: 1200px) {
  .cat-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .editor, .ed { grid-template-columns: 1fr; }
  .editor .left { position: static; }
  .video-modal { grid-template-columns: 1fr; }
  .tpl-list { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  body:not(.collapsed) { --sidebar-w: 56px; }
  .brand .word, .brand .sub, .nav-item > span:not(.ic), .nav-section, .nav-sub, .nav-item .chev, .sidebar-foot, .nav-search span, .nav-search kbd { display: none; }
  .sidebar { padding: 10px 8px; }
  .brand { flex-direction: column; height: auto; padding: 4px 0 8px; }
  .sidebar .collapse-btn { display: none; }
  .nav-item { justify-content: center; padding: 0; height: 32px; }
  .nav-search { justify-content: center; padding: 0; }
  .main { padding: 0 16px 96px; }
  .topright { margin: 0 -16px 4px; padding: 0 10px 0 16px; }
  .photos-layout, .picker { grid-template-columns: 1fr; }
  .idpanel .search { width: 150px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crumb { display: none; }
  .bulkbar { left: calc(var(--sidebar-w) + 16px); right: 16px; }
}

/* ---------- types de vidéos : Flash, Happening, Take off, Classique ---------- */
.type-ic { width: 26px; height: 26px; flex: none; border-radius: 7px; display: inline-grid; place-items: center; background: var(--panel); border: 1px solid var(--border-2); color: var(--text); box-shadow: var(--shadow-sm); }
.type-ic svg { width: 14px; height: 14px; }
.type-ic.none { background: transparent; border-style: dashed; color: var(--muted); box-shadow: none; }
.type-title { display: flex; align-items: center; gap: 12px; }
.type-title .type-ic { width: 30px; height: 30px; border-radius: 8px; }
.type-title .type-ic svg { width: 16px; height: 16px; }
.type-badge { display: inline-flex; align-items: center; gap: 5px; height: 18px; padding: 0 6px 0 5px; border-radius: 5px; font-size: 11px; font-weight: 500; white-space: nowrap; flex: none; background: var(--panel-3); color: var(--muted); }
.type-badge svg { display: none; }
.type-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; }
.type-badge.t-flash::before { background: var(--t-flash); }
.type-badge.t-happening::before { background: var(--t-happening); }
.type-badge.t-takeoff::before { background: var(--t-takeoff); }
.type-badge.t-classique::before { background: var(--t-classique); }
.type-badge.t-flash, .type-badge.t-happening, .type-badge.t-takeoff, .type-badge.t-classique { color: var(--text); }
.type-badge.none { color: var(--faint); }
.type-badge.none::before { display: none; }
.type-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.type-card { text-align: left; border: 1px solid var(--border-2); background: var(--btn); border-radius: 9px; padding: 11px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; color: var(--muted); transition: border-color .12s, box-shadow .12s; font: inherit; }
.type-card b { color: var(--text); font-weight: 600; }
.type-card small { font-size: 11.5px; color: var(--faint); line-height: 1.4; }
.type-card:hover { border-color: var(--hover-border); }
.type-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.type-switch { display: inline-flex; align-self: flex-start; gap: 2px; padding: 2px; border-radius: 7px; background: var(--seg-bg); }
.type-switch button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; height: 22px; padding: 0 9px; border-radius: 5px; color: var(--faint); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; transition: color .1s; }
.type-switch button svg { width: 12px; height: 12px; }
.type-switch button:hover { color: var(--text); }
.type-switch button.active { background: var(--seg-active); color: var(--text); box-shadow: var(--seg-shadow); }
.type-row { display: flex; align-items: center; gap: 12px; margin: -4px 0 18px; }
.tpl-section + .tpl-section { margin-top: 28px; }
.tpl-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; min-width: 0; }
.tpl-section-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.tpl-section-head .count { font-size: 11.5px; font-weight: 500; color: var(--muted); background: var(--panel-3); border-radius: 5px; padding: 0 6px; font-variant-numeric: tabular-nums; }
.to-sort { margin-bottom: 18px; }
.to-sort-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--border); min-width: 0; }
@media (max-width: 900px) { .type-cards { grid-template-columns: 1fr; } }

.type-tabs { display: flex; flex-wrap: wrap; margin-bottom: 12px; }
.type-tabs .n { font-size: 11.5px; font-weight: 500; color: var(--faint); margin-left: 1px; font-variant-numeric: tabular-nums; }
.type-tabs button.active .n { color: var(--muted); }
.type-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.type-pick button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 6px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--btn); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; transition: border-color .12s, box-shadow .12s, color .12s; }
.type-pick button svg { width: 16px; height: 16px; }
.type-pick button:hover { color: var(--text); border-color: var(--hover-border); }
.type-pick button.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--text); }
.tpl-empty { padding: 16px 18px; border: 1px dashed var(--border-2); border-radius: var(--radius); color: var(--faint); font-size: 13px; }

/* ---------- Veille : bouton « + Veille Iris » pour la barre de favoris ---------- */
.veille-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: center; }
.bm-zone { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px; border: 1px dashed var(--border-2); border-radius: 9px; background: var(--panel-2); }
.bookmarklet { cursor: grab; font-size: 13.5px; padding: 8px 14px; }
.bookmarklet:active { cursor: grabbing; }
@media (max-width: 900px) { .veille-grid { grid-template-columns: 1fr; } }

/* Veille : compte cliquable, récupération depuis la ligne */
.acc-cell { display: flex; align-items: center; gap: 2px; min-width: 0; }
.acc-link { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-weight: 500; color: var(--text); text-decoration: none; padding: 3px 6px; border-radius: 6px; }
.acc-link:hover { background: var(--hover); }
.acc-link svg { flex: none; color: var(--muted); }
.acc-edit { opacity: 0; transition: opacity .12s; }
tr:hover .acc-edit, .acc-edit:focus { opacity: 1; }
.veille-scrap { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.scrap-run { display: inline-flex; align-items: center; gap: 6px; }
.scrap-run .spinner { width: 12px; height: 12px; }
.scrap-err { display: inline-flex; align-items: center; gap: 4px; color: var(--err-text); }

/* « Faire un montage » : ce que fera le montage (ta vidéo, la fin de l'exemple, la photo flash) */
.plan { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-bar { position: relative; display: flex; gap: 2px; height: 28px; }
.plan-seg { min-width: 0; border-radius: 6px; display: flex; align-items: center; padding: 0 9px; font-size: 11.5px; font-weight: 500; overflow: hidden; }
.plan-seg span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-seg.rush { background: var(--ink); color: var(--on-ink); }
.plan-seg.end { color: var(--t-happening); border: 1px solid color-mix(in srgb, var(--t-happening) 50%, transparent); background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--t-happening) 14%, transparent) 0 6px, transparent 6px 12px); }
.plan-flash { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--t-flash); box-shadow: 0 0 0 2px var(--bg); }
.text-place { display: flex; gap: 14px; align-items: flex-start; }
.text-place-stage { width: 170px; flex: none; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 720px) { .text-place, .text-preview-wrap { flex-direction: column; } .text-place-stage, .text-preview { width: min(220px, 100%); position: static; } }

/* Vidéos finies : une section par ID */
.id-section + .id-section { margin-top: 28px; }
.id-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.id-head .id-name { font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.id-head .id-name .faint { font-family: var(--font); font-size: 12px; font-weight: 400; }
.avatar.xs { width: 16px; height: 16px; font-size: 8.5px; margin-left: -4px; }
.chip.active .avatar.xs { box-shadow: 0 0 0 1px var(--on-ink); }
/* Bibliothèque : Reels à ranger */
.tidy-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* lignes à choisir : template d'un montage, textes de l'éditeur */
.idrow { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 8px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; transition: background .1s, border-color .1s; }
.idrow + .idrow { margin-top: 2px; }
.idrow:hover { background: var(--hover); }
.idrow.active { background: var(--accent-soft); border-color: var(--accent-border); }
.idrow .nm { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 500; font-size: 13px; color: var(--text); }
.idrow .tpl-thumb { box-shadow: 0 0 0 1px var(--border); }

/* Vidéos finies : sélection de plusieurs vidéos */
.out-card .cover .sel-btn { position: absolute; right: 8px; top: 8px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .5); color: #fff; cursor: pointer; }
.out-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.out-card.selected .cover .sel-btn { background: var(--accent); }
.bulkbar .spacer { flex: 1; }

/* Bibliothèque › RAW : montage en 1 clic (le type choisi ici, le bouton ⚡ sur chaque vidéo) */
.quickbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 9px 12px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel-2); }
.quickbar-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.quickbar-title svg { color: var(--accent); }
.quickbar .seg button { display: inline-flex; align-items: center; gap: 5px; }
.quickbar .seg button svg { width: 13px; height: 13px; }
.quickbar .seg button .n { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.quickbar .seg button.active .n { color: var(--muted); }
.quickbar .seg button:disabled { opacity: .4; cursor: not-allowed; }
.tile .tbar button.quick { background: var(--accent); color: #fff; }
.tile .tbar button.quick:hover { background: var(--accent-hover); }

/* ---------- connexion ---------- */
body.auth-page { overflow: auto; }
.auth-wrap { min-height: 100%; display: grid; place-items: center; padding: 48px 16px; }
.auth-card { width: 100%; max-width: 360px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 28px 28px 24px; box-shadow: var(--panel-shadow); }
.auth-brand { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 24px; }
.auth-card h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.auth-sub { margin: 6px 0 22px; color: var(--muted); font-size: 13px; }
.auth-form { gap: 14px; }
.auth-form .input { height: 36px; }
.auth-pass { position: relative; }
.auth-pass .input { padding-right: 40px; }
.auth-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 6px; background: transparent; color: var(--faint); display: grid; place-items: center; cursor: pointer; }
.auth-eye:hover, .auth-eye.on { color: var(--text); background: var(--hover); }
.auth-submit { height: 36px; margin-top: 4px; }
.auth-card > .btn-block { height: 36px; }
.auth-foot { margin: 18px 0 0; font-size: 12px; color: var(--faint); }
/* compte connecté (barre du haut) */
.me-btn { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--panel-3); color: var(--text); font-size: 11.5px; font-weight: 600; display: grid; place-items: center; cursor: pointer; margin-left: 2px; transition: box-shadow .12s; }
.me-btn:hover { box-shadow: 0 0 0 3px var(--hover); }

/* ---------- activité & paie des VA ---------- */
.snapshot { color: var(--faint); }
.va-table tr.clickable { cursor: pointer; }
.va-table td:first-child { white-space: nowrap; }
.va-sub { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.va-accounts { display: flex; flex-wrap: wrap; max-width: 560px; }
a.handle-chip { color: var(--text); text-decoration: none; transition: border-color .12s, background .12s; }
a.handle-chip:hover { border-color: var(--hover-border); background: var(--panel-3); }
.linklog { display: flex; flex-direction: column; max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.linklog-day { position: sticky; top: 0; z-index: 1; padding: 7px 12px; font-size: 12px; font-weight: 600; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.linklog-day:first-letter { text-transform: uppercase; }
.linklog-row { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
.linklog-row:last-child { border-bottom: 0; }
.linklog-row .mono { width: 42px; flex: none; }

/* Activité & paie des VA : les codes de la fiche de référence (cartes séparées, titres en capitales, pastilles Instagram) */
.va-title { display: flex; align-items: center; gap: 10px; }
.va-title svg { color: var(--muted); }
.va-title .snapshot { font-family: var(--font); font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--faint); margin-left: 4px; }
.va-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.va-stats .stat { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); padding: 16px 20px 18px; box-shadow: var(--card-shadow); }
.va-stats .stat .k { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 600; color: var(--faint); }
.va-stats .stat .v { font-size: 30px; font-weight: 700; margin-top: 10px; }
.va-stats .stat.warn { border-color: rgba(245, 165, 36, .55); box-shadow: 0 0 0 3px var(--warn-bg); }
.va-table th { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 600; color: var(--faint); padding: 14px 16px; }
.va-table td { padding: 14px 16px; }
.va-table td:first-child > div:first-child { font-weight: 700 !important; }
.va-table .badge { height: 22px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.va-table tr.warnrow td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.tier-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--panel); color: var(--muted); font-size: 12px; white-space: nowrap; }
.ig-chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px 0 5px; margin: 3px 6px 3px 0; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s; }
.ig-chip:hover { background: var(--panel-3); border-color: var(--hover-border); }
.ig-chip:hover .at { text-decoration: underline; text-underline-offset: 2px; }
.ig-logo { width: 18px; height: 18px; border-radius: 5px; background: var(--grad-ig); display: grid; place-items: center; flex: none; }
.linklog-row .ig-chip { height: 24px; margin: 0; }
@media (max-width: 900px) { .va-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.textrow .used-by { flex: none; font-size: 12px; color: var(--faint); white-space: nowrap; margin-left: 8px; }
.pp-sent { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11.5px; color: var(--faint); padding: 2px 2px 0; }
