/* OperAi Creator : système de design.
   Clair par défaut, sombre quand le système le demande. Violet chaud, rythme de 8 px.
   Sections : jetons, base, contrôles, coquille (barre latérale, barres mobiles), pages, cartes,
   tableaux, accueil, automatisations, éditeur et téléphone, calendrier, composeur, messages, comptes,
   fenêtres et toasts, écrans étroits. */

/* ------------------------------------------------------------------ jetons */
:root {
  --bg: #f6f4f0;
  --bg-deep: #efece6;
  --panel: #ffffff;
  --panel-2: #f3f1ec;
  --panel-3: #e9e6df;
  --line: #e6e2da;
  --line-strong: #d6d1c7;
  --text: #1b1920;
  --text-2: #3f3b4a;
  --muted: #6e6a7b;
  --faint: #a39fae;
  --brand: #6a4cf0;
  --brand-600: #5a3edb;
  --brand-700: #4b32bf;
  --brand-soft: #efeafe;
  --brand-soft-2: #e2daff;
  --brand-ink: #ffffff;
  --coral: #ff6a45;
  --coral-soft: #ffe9e2;
  --ok: #15895a;
  --ok-soft: #e1f4ea;
  --warn: #b26b12;
  --warn-soft: #fdf1dd;
  --danger: #d23a3a;
  --danger-soft: #fde7e7;
  --info: #1b7fb8;
  --info-soft: #e2f1fa;
  --ig: #d8457c;
  --ig-2: #f58529;
  --ig-3: #8a3ab9;
  --yt: #ea3323;
  --tt: #111114;
  --r-xs: 6px;
  --r-s: 10px;
  --r-m: 14px;
  --r-l: 20px;
  --r-xl: 28px;
  --shadow-1: 0 1px 2px rgba(27, 25, 32, 0.05), 0 1px 1px rgba(27, 25, 32, 0.03);
  --shadow-2: 0 2px 6px rgba(27, 25, 32, 0.06), 0 12px 32px rgba(27, 25, 32, 0.08);
  --shadow-3: 0 24px 60px rgba(27, 25, 32, 0.22), 0 4px 12px rgba(27, 25, 32, 0.08);
  --focus: 0 0 0 3px color-mix(in srgb, var(--brand) 28%, transparent);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", "JetBrains Mono", Consolas, "SF Mono", monospace;
  --fs-xs: 11.5px;
  --fs-s: 12.5px;
  --fs-m: 14px;
  --fs-l: 15.5px;
  --fs-xl: 18px;
  --fs-2xl: 22px;
  --fs-3xl: 28px;
  --sidebar: 248px;
  --topbar: 56px;
  --tabbar: 64px;
  /* téléphone de démonstration */
  --ph-bg: #ffffff;
  --ph-bg-2: #f3f3f5;
  --ph-text: #0f0f12;
  --ph-muted: #76767f;
  --ph-line: #e9e9ee;
  --ph-bubble: #efefef;
  --ph-bubble-text: #0f0f12;
  --ph-me: #6a4cf0;
  --ph-btn: #ffffff;
  --ph-btn-text: #0f0f12;
  --ph-system: #f3f3f5;
  --ph-bezel: #16151a;
  --ph-bezel-edge: #3a3842;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131217;
    --bg-deep: #0e0d12;
    --panel: #1b1a21;
    --panel-2: #24222b;
    --panel-3: #2d2b35;
    --line: #2d2b35;
    --line-strong: #3b3845;
    --text: #efedf3;
    --text-2: #c9c6d3;
    --muted: #9b97a8;
    --faint: #6b6877;
    --brand: #9b86ff;
    --brand-600: #8a73fb;
    --brand-700: #7760f0;
    --brand-soft: #2a2550;
    --brand-soft-2: #352e66;
    --brand-ink: #ffffff;
    --coral: #ff7f5f;
    --coral-soft: #42251e;
    --ok: #3fc98a;
    --ok-soft: #153626;
    --warn: #e2a24a;
    --warn-soft: #3a2c15;
    --danger: #ff6b6b;
    --danger-soft: #3f1d1d;
    --info: #5fb5ea;
    --info-soft: #17313f;
    --tt: #2a2a30;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.3), 0 14px 36px rgba(0, 0, 0, 0.35);
    --shadow-3: 0 24px 60px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
    --ph-bg: #000000;
    --ph-bg-2: #121216;
    --ph-text: #f4f4f6;
    --ph-muted: #8e8e98;
    --ph-line: #222228;
    --ph-bubble: #262630;
    --ph-bubble-text: #f4f4f6;
    --ph-me: #7c62ff;
    --ph-btn: #35353f;
    --ph-btn-text: #ffffff;
    --ph-system: #16161b;
    --ph-bezel: #0a0a0d;
    --ph-bezel-edge: #35333d;
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font: var(--fs-m)/1.5 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; color: var(--text); font-weight: 650; letter-spacing: -0.012em; }
h1 { font-size: var(--fs-3xl); line-height: 1.15; }
h2 { font-size: var(--fs-xl); line-height: 1.3; }
h3 { font-size: var(--fs-l); line-height: 1.35; }
h4 { font-size: var(--fs-m); }
p { margin: 0; }
b, strong { font-weight: 620; }
small { font-size: var(--fs-s); }
ul, ol { margin: 0; padding: 0; }
img { max-width: 100%; }
button { font: inherit; color: inherit; }
button, input, select, textarea { font-family: inherit; }
code { font-family: var(--mono); font-size: 12px; background: var(--panel-2); border: 1px solid var(--line); padding: 2px 7px; border-radius: var(--r-xs); word-break: break-all; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--brand) 28%, transparent); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.lead { color: var(--muted); font-size: var(--fs-l); line-height: 1.5; max-width: 62ch; }
.hint { color: var(--muted); font-size: var(--fs-s); line-height: 1.45; display: flex; align-items: flex-start; gap: 6px; }
.hint .ico { flex: none; margin-top: 2px; }
.warn, .warn-text { color: var(--warn); }
.ok-text { color: var(--ok); }
.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.ico { flex: none; display: inline-block; vertical-align: middle; }
.eyebrow { display: inline-block; font-size: var(--fs-xs); font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ------------------------------------------------------------------ contrôles */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--r-s); border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font-weight: 580; font-size: var(--fs-m); cursor: pointer; white-space: nowrap; line-height: 1; box-shadow: var(--shadow-1); transition: background 0.15s, border-color 0.15s, transform 0.08s, box-shadow 0.15s; text-decoration: none; }
.btn:hover { background: var(--panel-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 92%, #fff), var(--brand-600)); border-color: var(--brand-700); color: var(--brand-ink); box-shadow: 0 1px 2px rgba(74, 50, 190, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
.btn.primary:hover { background: linear-gradient(180deg, var(--brand), var(--brand-700)); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); background: var(--panel); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; border-radius: 9px; }
.btn.large { height: 46px; padding: 0 22px; font-size: var(--fs-l); border-radius: 12px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background 0.15s, color 0.15s; padding: 0; text-decoration: none; }
.icon-btn:hover, .icon-btn.active { background: var(--panel-2); color: var(--text); text-decoration: none; }
.icon-btn.small { width: 30px; height: 30px; border-radius: 8px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--brand); cursor: pointer; padding: 4px 0; font-weight: 600; font-size: inherit; }
.link-btn:hover { text-decoration: underline; }
.link-arrow { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--brand); white-space: nowrap; }
.link-arrow .ico { transition: transform 0.15s; }
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover .ico { transform: translateX(2px); }
.input { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: var(--panel); color: var(--text); font: inherit; line-height: 1.4; transition: border-color 0.15s, box-shadow 0.15s; }
.input::placeholder { color: var(--faint); }
.input:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line-strong)); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
.input:disabled { background: var(--panel-2); color: var(--muted); cursor: not-allowed; }
textarea.input { resize: vertical; min-height: 72px; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.input.small { min-height: 34px; padding: 4px 10px; width: auto; font-size: 13px; }
select.input.small { padding-right: 30px; }
input[type="date"].input, input[type="time"].input { min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 560; min-width: 0; }
.field-label { font-size: 13px; color: var(--text-2); font-weight: 560; }
.field.grow { flex: 1; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row > .field { min-width: 140px; flex: 1; }
.fields { display: flex; flex-direction: column; gap: 14px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.form-error { color: var(--danger); font-size: 13px; min-height: 0; }
.form-error:empty { display: none; }
.segmented { display: inline-flex; padding: 3px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px; gap: 2px; flex-wrap: wrap; }
.segmented button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; color: var(--muted); cursor: pointer; font-weight: 560; font-size: 13px; line-height: 1.3; transition: background 0.15s, color 0.15s; white-space: nowrap; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--panel); color: var(--text); box-shadow: var(--shadow-1); }
.segmented button:disabled { opacity: 0.5; cursor: not-allowed; }
.segmented.full { display: flex; }
.segmented.full button { flex: 1; justify-content: center; }
.segmented.small { border-radius: 10px; }
.segmented.small button { padding: 4px 10px; font-size: 12.5px; }
.seg-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--panel-3); color: var(--muted); font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.segmented button.active .seg-count { background: var(--brand-soft); color: var(--brand); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.switch-track { width: 40px; height: 24px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background 0.18s; flex: none; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.18s; }
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch-label { font-size: 13.5px; color: var(--text); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 650; letter-spacing: 0.015em; white-space: nowrap; background: var(--panel-2); color: var(--muted); line-height: 1; }
.pill .ico { flex: none; }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.status-live, .status-published { background: var(--ok-soft); color: var(--ok); }
.status-paused, .status-publishing { background: var(--warn-soft); color: var(--warn); }
.status-draft { background: var(--panel-3); color: var(--muted); }
.status-scheduled { background: var(--brand-soft); color: var(--brand); }
.status-uploaded, .status-reschedule { background: var(--info-soft); color: var(--info); }
.status-failed { background: var(--danger-soft); color: var(--danger); }
.pill.status-live .pill-dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-s); background: var(--brand-soft); color: var(--text); font-size: 13.5px; line-height: 1.45; border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent); }
.notice > .ico { flex: none; color: var(--brand); margin-top: 1px; }
.notice.warn-notice { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.notice.warn-notice > .ico { color: var(--warn); }
.notice.warn-notice ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.notice.warn-notice ul:only-child { margin: 0; }
.notice.warn-notice b { display: block; }
.avatar-init { display: inline-grid; place-items: center; border-radius: 50%; flex: none; font-weight: 700; color: #fff; background: linear-gradient(145deg, hsl(var(--hue, 250) 60% 58%), hsl(calc(var(--hue, 250) + 40) 65% 48%)); letter-spacing: 0.02em; text-transform: uppercase; }
.avatar-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; }
.pf-badge { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: #fff; flex: none; }
.pf-badge.pf-instagram { background: linear-gradient(135deg, #f9a23b 0%, #ee3b74 50%, #8a3ab9 100%); }
.pf-badge.pf-youtube { background: var(--yt); }
.pf-badge.pf-tiktok { background: var(--tt); }
.pf-badge[style*="width: 44px"] { border-radius: 13px; }
.pf-badge[style*="width: 26px"] { border-radius: 8px; }

/* ------------------------------------------------------------------ coquille */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 20px 14px 16px; border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px; color: var(--text); text-decoration: none; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; display: block; flex: none; box-shadow: 0 2px 6px rgba(10, 15, 30, 0.35); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text b { font-family: var(--display); font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.brand-text b span { font-weight: 500; color: var(--text-2); }
.brand-text small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.nav { display: flex; flex-direction: column; gap: 18px; flex: 1; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-section { font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); padding: 0 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; color: var(--text-2); font-weight: 560; font-size: 14px; transition: background 0.15s, color 0.15s; position: relative; }
.nav-link:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.nav-link .nav-ico { color: var(--muted); transition: color 0.15s; }
.nav-link:hover .nav-ico { color: var(--text); }
.nav-link.active { background: var(--brand-soft); color: var(--brand); font-weight: 620; }
.nav-link.active .nav-ico { color: var(--brand); }
.nav-link.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px 0; border-top: 1px solid var(--line); }
.who { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.who b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.main { min-width: 0; flex: 1; }
.topbar, .tabbar { display: none; }

/* ------------------------------------------------------------------ pages et cartes */
.page { max-width: 1200px; margin: 0 auto; padding: 32px 32px 72px; display: flex; flex-direction: column; gap: 20px; width: 100%; }
.page-full { max-width: 1320px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 4px; }
.page-titles { display: flex; flex-direction: column; min-width: 0; }
.page-titles .lead { margin-top: 6px; }
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.section-title h2 { font-size: var(--fs-xl); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.search-box { position: relative; display: flex; align-items: center; flex: 1; min-width: 200px; max-width: 360px; color: var(--faint); }
.search-box > .ico { position: absolute; left: 12px; pointer-events: none; }
.search-box .input { padding-left: 36px; }
.search-box .input:focus { color: var(--text); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); padding: 20px; box-shadow: var(--shadow-1); min-width: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.card-head .muted { margin-top: 2px; font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.table-host { display: flex; flex-direction: column; gap: 8px; }
.table { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow-1); }
.trow { display: grid; gap: 16px; padding: 12px 20px; border-top: 1px solid var(--line); align-items: center; min-width: 0; }
.trow > * { min-width: 0; }
.trow.clickable { cursor: pointer; transition: background 0.12s; }
.trow.clickable:hover { background: var(--panel-2); }
.trow.thead { border-top: 0; padding: 10px 20px; font-size: var(--fs-xs); font-weight: 650; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; background: color-mix(in srgb, var(--panel-2) 60%, var(--panel)); }
.table-foot { color: var(--muted); font-size: var(--fs-s); padding: 0 4px; }
.empty { text-align: center; padding: 56px 24px; background: var(--panel); border: 1px dashed var(--line-strong); border-radius: var(--r-m); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty h2 { margin-top: 8px; font-size: var(--fs-2xl); }
.empty .muted { max-width: 46ch; font-size: var(--fs-l); line-height: 1.5; }
.empty .btn { margin-top: 12px; }
.empty.compact { padding: 32px 20px; gap: 6px; color: var(--faint); border-style: solid; }
.illus { display: block; }
.il-shadow { fill: color-mix(in srgb, var(--text) 7%, transparent); }
.il-card { fill: var(--panel); stroke: var(--line-strong); stroke-width: 1.5; }
.il-line { stroke: var(--line-strong); stroke-width: 4; stroke-linecap: round; fill: none; }
.il-line-f { fill: var(--line-strong); }
.il-dash { stroke: var(--brand); stroke-width: 2; stroke-dasharray: 4 4; fill: none; }
.il-brand { fill: var(--brand); }
.il-brand-2 { fill: #8e5cf2; }
.il-bubble { fill: var(--brand); }
.il-coral { fill: var(--coral); }
.il-white { fill: #fff; }
.il-white-s { stroke: #fff; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mini-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px; color: var(--faint); text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-s); }
.mini-empty .muted { font-size: 13.5px; }
.menu-list { display: flex; flex-direction: column; gap: 2px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: var(--r-s); background: transparent; text-align: left; cursor: pointer; font-weight: 560; color: var(--text); transition: background 0.12s; }
.menu-item:hover { background: var(--panel-2); }
.menu-item .ico { color: var(--muted); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger .ico { color: var(--danger); }
.confirm-body { display: flex; gap: 14px; align-items: flex-start; }
.confirm-body p { font-size: var(--fs-l); line-height: 1.5; padding-top: 6px; }
.confirm-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); flex: none; }
.confirm-ico.danger { background: var(--danger-soft); color: var(--danger); }

/* ------------------------------------------------------------------ connexion */
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--bg); }
.auth-side { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 40px 56px; color: #fff; background: radial-gradient(900px 600px at 20% 0%, rgba(255, 255, 255, 0.16), transparent 60%), radial-gradient(700px 500px at 100% 100%, color-mix(in srgb, var(--coral) 55%, transparent), transparent 60%), linear-gradient(160deg, #5a3edb 0%, #6a4cf0 45%, #8e5cf2 100%); overflow: hidden; }
.auth-side::after { content: ""; position: absolute; inset: auto -120px -160px auto; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, 0.08); pointer-events: none; }
.auth-side .brand, .auth-side .brand-text b, .auth-side .brand-text b span { color: #fff; }
.auth-side .brand-mark { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }
.auth-side-body { display: flex; flex-direction: column; gap: 20px; max-width: 520px; }
.auth-side-body h2 { color: #fff; font-size: 34px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
.auth-side-body > p { color: rgba(255, 255, 255, 0.85); font-size: var(--fs-l); line-height: 1.55; }
.auth-points { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; }
.auth-points li > div { display: flex; flex-direction: column; gap: 2px; }
.auth-points b { color: #fff; font-size: 15px; }
.auth-points span { color: rgba(255, 255, 255, 0.78); font-size: 13.5px; line-height: 1.45; }
.auth-point-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, 0.16); color: #fff; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.auth-side-foot { display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, 0.75); font-size: 12.5px; max-width: 520px; line-height: 1.45; }
.auth-main { display: grid; place-items: center; padding: 32px 24px; }
.auth-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); padding: 36px 32px 28px; box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { font-size: 26px; }
.auth-card .lead { font-size: var(--fs-m); margin-top: -6px; }
.auth-card-brand { display: none; margin-bottom: 8px; }
.auth-card .field { margin-top: 4px; }
.auth-card .btn.primary { margin-top: 8px; }
.auth-switch { text-align: center; color: var(--muted); font-size: 13.5px; }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--faint); font-size: 12px; margin-top: 4px; }

/* ------------------------------------------------------------------ accueil */
.start-card { background: linear-gradient(135deg, color-mix(in srgb, var(--brand-soft) 70%, var(--panel)), var(--panel) 60%); border-color: color-mix(in srgb, var(--brand) 22%, var(--line)); }
.progress-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 140px; }
.progress-label { font-size: var(--fs-s); color: var(--muted); font-weight: 600; }
.progress { width: 140px; height: 6px; border-radius: 999px; background: var(--panel-3); overflow: hidden; display: block; }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #8e5cf2); transition: width 0.3s; }
.checklist { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r-s); background: var(--panel); border: 1px solid var(--line); }
.check > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.check > div small { color: var(--muted); }
.check-mark { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--brand); color: var(--brand); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; background: var(--brand-soft); }
.check.ok { background: color-mix(in srgb, var(--ok-soft) 50%, var(--panel)); border-color: color-mix(in srgb, var(--ok) 25%, var(--line)); }
.check.ok .check-mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.check.ok b { color: var(--muted); font-weight: 560; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi { position: relative; padding: 16px 16px 14px; border-radius: var(--r-m); background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-1); min-width: 0; overflow: hidden; }
.kpi-ico { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--panel-2); color: var(--muted); }
.kpi b { font: 700 var(--fs-3xl)/1.1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; padding-right: 40px; }
.kpi > span { font-size: 13px; color: var(--muted); font-weight: 560; }
.kpi small { color: var(--faint); font-size: var(--fs-s); }
.kpi.tone-brand .kpi-ico { background: var(--brand-soft); color: var(--brand); }
.kpi.tone-coral .kpi-ico { background: var(--coral-soft); color: var(--coral); }
.kpi.tone-ok .kpi-ico { background: var(--ok-soft); color: var(--ok); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); display: inline-block; margin-right: 4px; }
.live-dot.on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.upcoming { list-style: none; display: flex; flex-direction: column; }
.upcoming li { display: flex; align-items: center; gap: 14px; padding: 10px 4px; border-top: 1px solid var(--line); cursor: pointer; border-radius: 8px; transition: background 0.12s; }
.upcoming li:first-child { border-top: 0; }
.upcoming li:hover { background: var(--panel-2); }
.upcoming li > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.upcoming li b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); flex: none; line-height: 1; }
.date-tile b { font-size: 18px; font-weight: 700; }
.date-tile small { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 650; margin-top: 2px; }
.auto-flag { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--brand-soft); color: var(--brand); flex: none; }
.shortcut-list { display: flex; flex-direction: column; gap: 8px; }
.shortcut { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--panel); text-align: left; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.shortcut:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--focus); }
.shortcut > div { flex: 1; display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.shortcut b { font-size: 14px; }
.shortcut small { color: var(--muted); line-height: 1.4; }
.shortcut-arrow { color: var(--faint); transition: transform 0.15s, color 0.15s; }
.shortcut:hover .shortcut-arrow { color: var(--brand); transform: translateX(2px); }
.account-mini { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.account-mini li { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 8px; }
.account-mini li > div { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }

/* ------------------------------------------------------------------ automatisations */
.type-tile { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; background: var(--brand-soft); color: var(--brand); }
.type-tile.large { width: 48px; height: 48px; border-radius: 14px; }
.type-tile.type-comment { background: var(--brand-soft); color: var(--brand); }
.type-tile.type-live_comment { background: var(--danger-soft); color: var(--danger); }
.type-tile.type-dm_keyword { background: var(--info-soft); color: var(--info); }
.type-tile.type-story_reply { background: var(--coral-soft); color: var(--coral); }
.type-tile.type-story_mention { background: var(--warn-soft); color: var(--warn); }
.type-tile.type-default_reply { background: var(--ok-soft); color: var(--ok); }
.recipe-steps { display: flex; align-items: center; gap: 4px; flex: none; }
.recipe-step { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--panel-2); color: var(--text-2); border: 1px solid var(--line); }
.recipe-steps.small .recipe-step { width: 26px; height: 26px; border-radius: 8px; }
.recipe-arrow { width: 8px; height: 2px; background: var(--line-strong); border-radius: 1px; }
.recipe-steps.small .recipe-arrow { width: 6px; }
.rs-comment, .rs-live { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.rs-dm, .rs-reply { background: var(--info-soft); color: var(--info); border-color: transparent; }
.rs-link { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.rs-follow { background: var(--coral-soft); color: var(--coral); border-color: transparent; }
.rs-email { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.rs-clock { background: var(--panel-3); color: var(--text-2); border-color: transparent; }
.rs-story { background: var(--coral-soft); color: var(--coral); border-color: transparent; }
.recipes { display: flex; flex-direction: column; gap: 28px; padding: 4px 0 8px; }
.recipes-head { margin-bottom: 12px; }
.recipes-head h3 { font-size: var(--fs-l); }
.recipes-head .muted { font-size: 13px; }
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 12px; }
.recipe { position: relative; text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--panel); cursor: pointer; display: flex; flex-direction: column; gap: 8px; transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s; color: var(--text); }
.recipe:hover { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.recipe.popular { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--brand-soft) 55%, var(--panel)), var(--panel) 55%); }
.recipe-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.recipe b { font-size: 15px; }
.recipe small { color: var(--muted); line-height: 1.45; flex: 1; }
.recipe-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.recipe-go { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 620; color: var(--brand); opacity: 0; transform: translateX(-4px); transition: opacity 0.15s, transform 0.15s; }
.recipe:hover .recipe-go { opacity: 1; transform: none; }
.auto-table .trow { grid-template-columns: minmax(0, 2.2fr) 120px 90px 100px 110px 220px; }
.auto-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.auto-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.auto-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.auto-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auto-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.cell-updated { font-size: 13px; }

/* ------------------------------------------------------------------ éditeur */
.editor { max-width: 1320px; margin: 0 auto; padding: 24px 32px 80px; display: flex; flex-direction: column; gap: 20px; width: 100%; }
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.editor-title { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.back-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--muted); border: 1px solid var(--line); background: var(--panel); flex: none; transition: background 0.15s, color 0.15s; }
.back-btn:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.editor-name { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.title-input { font: 700 var(--fs-2xl)/1.2 var(--display); letter-spacing: -0.015em; border: 1px solid transparent; background: transparent; color: var(--text); padding: 4px 8px; margin-left: -8px; border-radius: 8px; min-width: 0; width: 100%; max-width: 560px; transition: background 0.15s, border-color 0.15s; }
.title-input:hover { background: var(--panel); border-color: var(--line); }
.title-input:focus { outline: none; background: var(--panel); border-color: var(--brand); box-shadow: var(--focus); }
.editor-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.editor-meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); display: inline-block; }
.save-state { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; }
.save-state.saving { color: var(--faint); }
.save-state.saved { color: var(--ok); }
.save-state.error { color: var(--danger); }
.editor-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.account-select { position: relative; display: inline-flex; align-items: center; }
.account-select .pf-badge { position: absolute; left: 10px; pointer-events: none; width: 18px; height: 18px; border-radius: 5px; }
.account-select select.input.small { padding-left: 36px; min-height: 38px; }
.stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-1); }
.stat b { font: 700 var(--fs-2xl)/1.1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.015em; }
.stat small { color: var(--muted); font-size: var(--fs-s); }
.editor-body { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 32px; align-items: start; }
.editor-left { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.steps-head { display: flex; flex-direction: column; gap: 2px; padding: 0 4px; }
.steps-head h2 { font-size: var(--fs-xl); }
.steps-head .muted { font-size: 13.5px; }
.steps { display: flex; flex-direction: column; gap: 0; position: relative; }
.step { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow-1); transition: border-color 0.15s, background 0.15s; }
.step + .step { margin-top: 12px; }
.step + .step::before { content: ""; position: absolute; left: 35px; top: -13px; width: 2px; height: 12px; background: var(--line-strong); }
.step.on { border-color: color-mix(in srgb, var(--brand) 22%, var(--line)); }
.step.off { background: transparent; border-style: dashed; box-shadow: none; }
.step.off .step-title b { color: var(--muted); }
.step.off .step-title small { color: var(--faint); }
.step-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.step-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; flex: none; box-shadow: 0 0 0 4px var(--brand-soft); transition: background 0.15s, box-shadow 0.15s, color 0.15s; }
.step-num.is-icon { background: var(--panel-2); color: var(--text-2); box-shadow: none; border: 1px solid var(--line); }
.step.off .step-num { background: var(--panel); color: var(--faint); border: 2px dashed var(--line-strong); box-shadow: none; }
.step-title { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.step-title b { font-size: 15px; }
.step-title small { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.step-state { display: flex; align-items: center; gap: 10px; flex: none; }
.step-state .pill { display: inline-flex; }
.step-body { padding: 0 18px 18px 68px; }
.step-off-note { display: flex; align-items: center; gap: 8px; padding: 0 18px 14px 68px; color: var(--faint); font-size: 12.5px; }
.text-field { display: flex; flex-direction: column; gap: 6px; }
.text-field-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.counter { font-size: var(--fs-xs); color: var(--faint); font-variant-numeric: tabular-nums; }
.counter.near { color: var(--warn); font-weight: 650; }
.chip-btn { display: inline-flex; align-items: center; gap: 5px; border: 1px dashed var(--line-strong); background: transparent; color: var(--muted); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s; }
.chip-btn:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: var(--panel); min-height: 44px; align-items: center; transition: border-color 0.15s, box-shadow 0.15s; }
.chips:focus-within { border-color: var(--brand); box-shadow: var(--focus); }
.chip { display: inline-flex; align-items: center; gap: 2px; padding: 4px 4px 4px 11px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 620; font-size: 13px; line-height: 1.2; }
.chip button { display: grid; place-items: center; width: 20px; height: 20px; border: 0; background: transparent; color: inherit; cursor: pointer; border-radius: 50%; padding: 0; }
.chip button:hover { background: color-mix(in srgb, var(--brand) 20%, transparent); }
.chip-input { border: 0; outline: none; background: transparent; color: var(--text); flex: 1; min-width: 160px; font: inherit; padding: 4px 6px; }
.chip-input::placeholder { color: var(--faint); }
.variants { display: flex; flex-direction: column; gap: 8px; }
.variant { display: flex; gap: 6px; align-items: center; }
.variant .input { flex: 1; }
.range-row { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.range-row input { flex: 1; accent-color: var(--brand); }
.range-row b { min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text); }
.advanced { border-top: 1px solid var(--line); padding-top: 10px; }
.advanced summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: 8px; list-style: none; user-select: none; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary .ico { transition: transform 0.15s; }
.advanced[open] summary .ico { transform: rotate(180deg); }
.media-picker { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.media-tile { position: relative; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: var(--panel-2); cursor: pointer; padding: 0; display: grid; place-items: center; color: var(--faint); transition: border-color 0.15s, transform 0.12s; }
.media-tile:hover { transform: translateY(-1px); }
.media-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-none { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.media-check { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, 0.35); color: transparent; display: grid; place-items: center; border: 2px solid #fff; transition: background 0.15s, color 0.15s; }
.media-tile.picked { border-color: var(--brand); }
.media-tile.picked .media-check { background: var(--brand); color: #fff; }
.sub { font-size: 13px; color: var(--muted); margin: 6px 0 0; font-weight: 600; }
.planned-list { display: flex; flex-direction: column; gap: 6px; }
.planned { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--panel); cursor: pointer; text-align: left; color: var(--text); transition: border-color 0.15s, background 0.15s; }
.planned:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.planned.picked { border-color: var(--brand); background: var(--brand-soft); }
.planned small { color: var(--muted); }

/* téléphone de démonstration */
.editor-right { position: sticky; top: 20px; }
.preview { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.preview-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; width: 100%; max-width: 320px; }
.phone { width: 320px; height: 660px; border-radius: 50px; background: var(--ph-bezel); padding: 12px; position: relative; box-shadow: 0 30px 60px rgba(20, 18, 40, 0.3), 0 8px 18px rgba(20, 18, 40, 0.12), inset 0 0 0 1.5px var(--ph-bezel-edge); flex: none; }
.phone::before { content: ""; position: absolute; left: -2px; top: 120px; width: 2px; height: 36px; border-radius: 2px 0 0 2px; background: var(--ph-bezel-edge); }
.phone::after { content: ""; position: absolute; left: -2px; top: 170px; width: 2px; height: 64px; border-radius: 2px 0 0 2px; background: var(--ph-bezel-edge); box-shadow: 0 80px 0 var(--ph-bezel-edge); }
.phone-island { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); width: 100px; height: 28px; border-radius: 16px; background: #000; z-index: 3; }
.phone-island::after { content: ""; position: absolute; right: 12px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: #16161c; box-shadow: inset 0 0 0 2px #0a0a0f; }
.screen { position: relative; height: 100%; border-radius: 38px; background: var(--ph-bg); color: var(--ph-text); overflow: hidden; display: flex; flex-direction: column; font-size: 12.5px; line-height: 1.4; }
.ph-status { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 14px 26px 0; font-size: 13px; font-weight: 650; color: var(--ph-text); flex: none; }
.ph-status-right { display: flex; align-items: center; gap: 5px; }
.ph-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px 10px; border-bottom: 1px solid var(--ph-line); flex: none; }
.ph-top .ph-back { color: var(--ph-text); display: grid; place-items: center; }
.ph-who { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.ph-who b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-who small { font-size: 11px; color: var(--ph-muted); }
.ph-top-actions { display: flex; align-items: center; gap: 14px; color: var(--ph-text); }
.ph-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #8a83ff, #ff8c6b); flex: none; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 11px; }
.ph-avatar.small { width: 26px; height: 26px; font-size: 10px; }
.ph-avatar.other { background: linear-gradient(135deg, #a3abb8, #6b7280); }
.ph-avatar.ring { box-shadow: 0 0 0 2px var(--ph-bg), 0 0 0 4px #e1306c; }
.dm-list { flex: 1; overflow-y: auto; padding: 14px 10px 10px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: none; }
.dm-list::-webkit-scrollbar { display: none; }
.bubble-row { display: flex; }
.bubble-row.in { justify-content: flex-end; }
.bubble { max-width: 82%; border-radius: 20px; padding: 9px 13px; background: var(--ph-bubble); color: var(--ph-bubble-text); line-height: 1.38; white-space: pre-wrap; word-break: break-word; font-size: 12.5px; }
.bubble-row.out .bubble { border-bottom-left-radius: 6px; }
.bubble-row.in .bubble { background: linear-gradient(160deg, var(--ph-me), color-mix(in srgb, var(--ph-me) 80%, #ff6a45)); color: #fff; border-bottom-right-radius: 6px; }
.bubble-row.in + .bubble-row.in .bubble { border-top-right-radius: 6px; }
.bubble-row.out + .bubble-row.out .bubble { border-top-left-radius: 6px; }
.bubble-buttons { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; }
.bubble-btn { display: block; border: 0; border-radius: 12px; padding: 8px 10px; background: var(--ph-btn); color: var(--ph-btn-text); font-weight: 620; font-size: 12px; text-align: center; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
button.bubble-btn:not(:disabled) { cursor: pointer; background: var(--ph-me); color: #fff; }
button.bubble-btn:not(:disabled):hover { filter: brightness(1.1); }
.system { align-self: center; font-size: 11px; color: var(--ph-muted); background: var(--ph-system); padding: 4px 11px; border-radius: 999px; text-align: center; max-width: 92%; margin: 4px 0; }
.system.warn { color: var(--warn); background: var(--warn-soft); }
.ph-compose { display: flex; align-items: center; gap: 8px; padding: 8px 12px 20px; flex: none; }
.ph-compose-cam { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ph-me); color: #fff; flex: none; }
.ph-compose-field { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 38px; padding: 0 6px 0 14px; border-radius: 999px; border: 1px solid var(--ph-line); color: var(--ph-muted); font-size: 12.5px; background: var(--ph-bg); }
.ph-compose-icons { display: flex; align-items: center; gap: 10px; color: var(--ph-text); padding-right: 6px; }
.ph-home { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); width: 110px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--ph-text) 55%, transparent); }
.post-screen .ph-top { border-bottom: 0; padding-bottom: 8px; }
.post-image { position: relative; aspect-ratio: 4 / 5; background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 32%, var(--ph-bg-2)), color-mix(in srgb, var(--coral) 28%, var(--ph-bg-2))); display: grid; place-items: center; color: var(--ph-text); overflow: hidden; flex: none; }
.post-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-image-ph { display: flex; flex-direction: column; align-items: center; gap: 8px; color: color-mix(in srgb, var(--ph-text) 70%, transparent); font-size: 12px; font-weight: 600; text-align: center; padding: 16px; }
.post-image-ph .ico { opacity: 0.8; }
.post-actions { display: flex; align-items: center; gap: 14px; padding: 10px 14px 4px; color: var(--ph-text); }
.post-actions .spacer { flex: 1; }
.post-likes { padding: 0 14px; font-weight: 650; font-size: 12.5px; }
.post-caption { padding: 4px 14px 8px; line-height: 1.4; }
.post-caption b { margin-right: 4px; }
.post-view-comments { padding: 0 14px; color: var(--ph-muted); font-size: 12px; }
.post-screen .dm-list { padding: 0; gap: 0; }
.comments-screen .sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--ph-line); margin: 6px auto 8px; flex: none; }
.sheet-title { text-align: center; font-weight: 650; padding: 2px 0 10px; border-bottom: 1px solid var(--ph-line); font-size: 14px; flex: none; }
.comments-list { flex: 1; overflow-y: auto; padding: 4px 0; }
.comment { display: flex; gap: 10px; padding: 12px 14px 0; }
.comment > div { flex: 1; min-width: 0; }
.comment b { font-size: 12.5px; margin-right: 6px; }
.comment p { color: var(--ph-text); line-height: 1.4; }
.comment small { display: block; color: var(--ph-muted); font-size: 11px; margin-top: 4px; }
.comment.reply { padding-left: 50px; }
.comment-like { color: var(--ph-muted); padding-top: 2px; }
.test-box { width: 320px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-1); }
.test-box-title { display: flex; align-items: center; gap: 10px; }
.test-box-title b { font-size: 15px; }
.test-box-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); flex: none; }
.test-box .muted { font-size: 13px; line-height: 1.45; }
.test-box.live { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.test-box.live .test-box-ico { background: var(--ok-soft); color: var(--ok); }
.sim-row { display: flex; gap: 6px; }
.sim-row .input { flex: 1; }

/* ------------------------------------------------------------------ calendrier */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav .icon-btn { border: 1px solid var(--line); background: var(--panel); }
.cal-period { margin-left: 10px; font-size: var(--fs-xl); text-transform: none; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 248px; gap: 20px; align-items: start; }
.cal-main { min-width: 0; }
.cal-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }
.cal-side .card { padding: 16px; }
.cal-side h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 650; margin-bottom: 10px; }
.legend { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.legend li { display: flex; align-items: center; gap: 10px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sc); flex: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--sc) 20%, transparent); }
.legend-platforms { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.legend-platforms li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.post-draft { --sc: var(--faint); }
.post-scheduled { --sc: var(--brand); }
.post-uploaded, .post-reschedule { --sc: var(--info); }
.post-publishing { --sc: var(--warn); }
.post-published { --sc: var(--ok); }
.post-failed { --sc: var(--danger); }
.drafts-list { display: flex; flex-direction: column; gap: 6px; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow-1); }
.weekday { background: var(--panel); padding: 10px 10px 8px; font-size: var(--fs-xs); font-weight: 650; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.day { background: var(--panel); min-height: 116px; padding: 6px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; min-width: 0; transition: background 0.12s; }
.day:hover { background: color-mix(in srgb, var(--brand-soft) 50%, var(--panel)); }
.day.other { background: color-mix(in srgb, var(--panel-2) 60%, var(--panel)); }
.day.other .daynum { color: var(--faint); }
.day.past { cursor: default; }
.day.past .daynum { color: var(--faint); }
.day.past:hover { background: var(--panel); }
.day.other.past:hover { background: color-mix(in srgb, var(--panel-2) 60%, var(--panel)); }
.day.drop, .col.drop { outline: 2px dashed var(--brand); outline-offset: -3px; background: var(--brand-soft); }
.daynum { font-size: 12.5px; font-weight: 600; color: var(--text-2); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; margin-bottom: 2px; }
.day.today .daynum { background: var(--brand); color: #fff; font-weight: 700; box-shadow: 0 0 0 3px var(--brand-soft); }
.more { font-size: var(--fs-xs); color: var(--muted); padding-left: 6px; font-weight: 600; }
.post-chip { position: relative; display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; padding: 3px 7px 3px 6px; border-radius: 7px; border: 1px solid color-mix(in srgb, var(--pc) 25%, transparent); background: color-mix(in srgb, var(--pc) 10%, var(--panel)); color: var(--text); font-size: var(--fs-xs); cursor: pointer; text-align: left; line-height: 1.3; transition: background 0.12s, box-shadow 0.12s; --pc: var(--brand); }
.post-chip.pf-instagram { --pc: var(--ig); }
.post-chip.pf-youtube { --pc: var(--yt); }
.post-chip.pf-tiktok { --pc: var(--tt); }
.post-chip:hover { background: color-mix(in srgb, var(--pc) 18%, var(--panel)); box-shadow: var(--shadow-1); }
.post-chip[draggable="true"] { cursor: grab; }
.post-chip[draggable="true"]:active { cursor: grabbing; }
.post-chip.dragging { opacity: 0.4; }
.post-chip.post-draft { border-style: dashed; }
.post-chip.post-published { opacity: 0.8; }
.post-chip.post-failed { background: color-mix(in srgb, var(--danger) 10%, var(--panel)); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.post-chip .pf-badge { width: 16px; height: 16px; border-radius: 4px; }
.post-chip.wide { padding: 10px 12px; font-size: 13px; gap: 10px; border-radius: var(--r-s); }
.post-chip.wide .pf-badge { width: 24px; height: 24px; border-radius: 7px; }
.post-time { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; font-weight: 600; }
.post-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.post-chip.wide .post-text { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.chip-status { width: 7px; height: 7px; border-radius: 50%; background: var(--sc); flex: none; }
.post-chip.wide .chip-status { width: 8px; height: 8px; }
.post-auto { display: inline-grid; place-items: center; color: var(--brand); flex: none; }
.chip-kind { color: var(--muted); font-size: var(--fs-xs); flex: none; }
.week { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow-1); }
.week-head { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); scrollbar-gutter: stable; overflow-y: hidden; }
.week-day { padding: 10px 8px; font-size: 12px; color: var(--muted); text-transform: capitalize; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.week-day b { color: var(--text); font-size: 17px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
.week-day.today b { background: var(--brand); color: #fff; }
.week-body { display: grid; grid-template-columns: 56px minmax(0, 1fr); max-height: 640px; overflow-y: auto; scrollbar-gutter: stable; }
.hour { font-size: 10.5px; color: var(--faint); text-align: right; padding: 2px 8px 0 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.cols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.col { position: relative; border-left: 1px solid var(--line); cursor: copy; background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 44px); }
.post-chip.timed { position: absolute; left: 3px; right: 3px; width: auto; height: 26px; z-index: 1; }
.day-list { display: flex; flex-direction: column; gap: 20px; }
.day-list h3 { font-size: 13px; color: var(--muted); margin-bottom: 8px; text-transform: capitalize; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.day-list h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.day-list section { display: flex; flex-direction: column; gap: 6px; }

/* ------------------------------------------------------------------ composeur */
.composer { display: flex; flex-direction: column; gap: 4px; }
.composer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px; }
.composer-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.account-picker { display: flex; flex-direction: column; gap: 6px; }
.account-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--panel); cursor: pointer; text-align: left; color: var(--text); font-weight: 560; transition: border-color 0.15s, background 0.15s; }
.account-opt:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.account-opt.active { border-color: var(--brand); background: var(--brand-soft); box-shadow: var(--focus); }
.account-opt small { color: var(--muted); font-weight: 500; margin-left: auto; }
.account-opt:disabled { cursor: not-allowed; opacity: 0.6; }
.kind-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 6px; }
.kind-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 6px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--panel); cursor: pointer; color: var(--text-2); font-size: 12.5px; font-weight: 580; transition: border-color 0.15s, background 0.15s, color 0.15s; }
.kind-opt:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); color: var(--text); }
.kind-opt.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.kind-opt:disabled { cursor: not-allowed; opacity: 0.6; }
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--r-m); padding: 28px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; background: var(--panel-2); transition: border-color 0.15s, background 0.15s; color: var(--text); }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--panel); color: var(--brand); margin-bottom: 8px; box-shadow: var(--shadow-1); }
.dropzone b { font-size: 14px; }
.dropzone small { color: var(--muted); }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.files:empty { display: none; }
.file { position: relative; border-radius: 10px; overflow: hidden; background: var(--panel-2); aspect-ratio: 9 / 14; display: flex; flex-direction: column; border: 1px solid var(--line); }
.file img, .file video { width: 100%; flex: 1; object-fit: cover; min-height: 0; }
.file span { font-size: 10.5px; padding: 4px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.file .icon-btn { position: absolute; top: 4px; right: 4px; background: rgba(0, 0, 0, 0.55); color: #fff; width: 26px; height: 26px; border-radius: 8px; }
.file .icon-btn:hover { background: rgba(0, 0, 0, 0.75); }
.auto-link { padding: 14px; border-radius: var(--r-s); background: var(--panel-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.auto-link-head { display: flex; align-items: center; gap: 8px; font-weight: 620; font-size: 13.5px; }
.auto-link-head .ico { color: var(--brand); }
.status-line { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }

/* ------------------------------------------------------------------ contacts et messages */
.contacts-table .trow { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.3fr) 110px 130px 70px; }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.person-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - 220px); min-height: 480px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow-1); }
.inbox-list { border-right: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; }
.inbox-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 16px; color: var(--faint); text-align: center; }
.inbox-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; color: var(--text); transition: background 0.12s; position: relative; }
.inbox-item:hover { background: var(--panel-2); }
.inbox-item.active { background: var(--brand-soft); }
.inbox-item.active::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.inbox-main { flex: 1; display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.inbox-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.inbox-line b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.inbox-line small { flex: none; font-size: 11.5px; }
.inbox-main .preview { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; align-items: initial; gap: 0; }
.dot-open { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.thread { display: flex; flex-direction: column; min-width: 0; background: var(--panel); }
.empty-thread { align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 24px; color: var(--muted); }
.empty-thread h3 { color: var(--text); margin-top: 8px; }
.empty-thread .muted { max-width: 38ch; }
.thread-empty-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--brand-soft); color: var(--brand); }
.thread-head { padding: 12px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.thread-who { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.thread-who b { font-size: 15px; }
.thread-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.thread-body .bubble { background: var(--panel); color: var(--text); border: 1px solid var(--line); font-size: 13.5px; border-radius: 16px; max-width: 70%; }
.thread-body .bubble-row.in .bubble { background: var(--brand); color: #fff; border-color: var(--brand); }
.thread-body .bubble small { display: block; margin-top: 4px; font-size: 10.5px; opacity: 0.7; }
.thread-body .bubble-btn { background: var(--panel-2); color: var(--text); box-shadow: none; border: 1px solid var(--line); }
.thread-foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.thread-foot .input { flex: 1; }
.thread-rule { padding: 0 16px 12px; }

/* ------------------------------------------------------------------ comptes */
.platform-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.platform { display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.platform::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; }
.pf-card-instagram::before { background: linear-gradient(90deg, #f9a23b, #ee3b74, #8a3ab9); }
.pf-card-youtube::before { background: var(--yt); }
.pf-card-tiktok::before { background: linear-gradient(90deg, #25f4ee, #111, #fe2c55); }
.platform-title { display: flex; align-items: center; gap: 14px; }
.platform-title > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.platform-title h2 { font-size: var(--fs-xl); }
.platform-title small { font-size: 12.5px; }
.account-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.account-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-s); background: var(--panel-2); border: 1px solid var(--line); }
.account-list li > div { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.account-list li small { font-size: 12.5px; }
.platform-actions { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.platform-actions .btn { align-self: flex-start; }
.server { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px 24px; margin: 4px 0 14px; font-size: 13px; align-items: center; }
.server dt { color: var(--muted); font-weight: 560; }
.server dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.copy-row { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; }
.copy-row code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ------------------------------------------------------------------ fenêtres et toasts */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 13, 25, 0.5); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade-in 0.15s ease-out; }
.modal-backdrop.closing { animation: fade-out 0.12s ease-in forwards; }
.modal { width: min(480px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-3); animation: pop-in 0.18s cubic-bezier(0.2, 0.8, 0.2, 1); }
.modal.wide { width: min(920px, 100%); }
.modal.size-xl { width: min(1080px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 8px; }
.modal-titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.modal-titles h2 { font-size: var(--fs-2xl); }
.modal-titles .muted { font-size: 13.5px; }
.modal-close { flex: none; margin: -6px -8px 0 0; }
.modal-body { padding: 12px 24px 20px; overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-actions .btn.danger { margin-right: auto; }
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--text); color: var(--bg); padding: 11px 14px; border-radius: 12px; box-shadow: var(--shadow-2); max-width: 380px; font-size: 13.5px; font-weight: 560; transition: opacity 0.3s, transform 0.3s; animation: toast-in 0.2s ease-out; pointer-events: auto; }
.toast .ico { flex: none; }
.toast.success { background: var(--ok); color: #fff; }
.toast.error { background: var(--danger); color: #fff; }
.toast.leaving { opacity: 0; transform: translateY(6px); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ écrans étroits */
@media (max-width: 1180px) {
  .editor-body { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auto-table .trow { grid-template-columns: minmax(0, 2fr) 110px 80px 90px 190px; }
  .auto-table .trow > :nth-child(5) { display: none; }
}
@media (max-width: 1000px) {
  .editor-body { grid-template-columns: 1fr; }
  .editor-right { position: static; }
  .preview { align-items: stretch; }
  .preview-head, .test-box { max-width: none; width: 100%; }
  .phone { margin: 0 auto; }
  .cal-layout { grid-template-columns: 1fr; }
  .cal-side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
  .auth-screen { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-card-brand { display: flex; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; z-index: 20; height: var(--topbar); padding: 0 12px 0 16px; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .topbar .brand-text small { display: none; }
  .topbar-actions { display: flex; align-items: center; gap: 2px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .tab-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 10px; color: var(--muted); font-size: 10.5px; font-weight: 600; text-decoration: none; padding: 4px 2px; min-width: 0; transition: color 0.15s, background 0.15s; }
  .tab-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .tab-link:hover { text-decoration: none; color: var(--text); }
  .tab-link.active { color: var(--brand); }
  .tab-link.active .ico { background: var(--brand-soft); border-radius: 10px; padding: 2px 10px; box-sizing: content-box; }
  .main { padding-bottom: calc(var(--tabbar) + 8px); }
  .page, .editor { padding: 20px 16px 48px; gap: 16px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  h1 { font-size: 24px; }
  .lead { font-size: var(--fs-m); }
  .inbox { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .inbox-list { max-height: 300px; border-right: 0; border-bottom: 1px solid var(--line); }
  .inbox.has-thread .inbox-list { display: none; }
  .inbox.has-thread .thread { min-height: calc(100vh - 280px); }
  .thread-body .bubble { max-width: 85%; }
  .composer-grid { grid-template-columns: 1fr; }
  .platform-grid { grid-template-columns: 1fr; }
  .server { grid-template-columns: 1fr; gap: 4px 0; }
  .server dt { margin-top: 10px; }
  .server dt:first-child { margin-top: 0; }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi b { font-size: 24px; }
  .kpi-ico { top: 12px; right: 12px; width: 28px; height: 28px; }
  .card { padding: 16px; border-radius: 12px; }
  .card-head { flex-wrap: wrap; }
  .start-card .card-head { flex-direction: column; }
  .progress-wrap { align-items: flex-start; width: 100%; }
  .progress { width: 100%; }
  .check { flex-wrap: wrap; }
  .check > .btn, .check > .pill { margin-left: 42px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-box { max-width: none; }
  .segmented { display: flex; }
  .segmented button { flex: 1; justify-content: center; }
  .cal-toolbar { flex-direction: column; align-items: stretch; }
  .cal-nav { justify-content: space-between; }
  .cal-period { font-size: var(--fs-l); margin-left: 4px; flex: 1; text-align: center; }
  .cal-side { grid-template-columns: 1fr; }
  .auto-table .trow { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px 14px; }
  .auto-table .trow > :nth-child(2), .auto-table .trow > :nth-child(3), .auto-table .trow > :nth-child(4), .auto-table .trow > :nth-child(5) { display: none; }
  .auto-table .trow.thead { display: none; }
  .auto-actions .btn span { display: none; }
  .contacts-table .trow { grid-template-columns: minmax(0, 1fr) 60px; gap: 10px; padding: 12px 14px; }
  .contacts-table .trow > :nth-child(2), .contacts-table .trow > :nth-child(3), .contacts-table .trow > :nth-child(4) { display: none; }
  .contacts-table .trow.thead { display: none; }
  .trow.thead { padding: 8px 14px; }
  .editor-head { flex-direction: column; align-items: stretch; }
  .editor-actions { justify-content: space-between; }
  .editor-actions .account-select { flex: 1; }
  .editor-actions .account-select select { width: 100%; }
  .title-input { font-size: 20px; }
  .step-head { padding: 12px 14px; gap: 12px; }
  .step-num { width: 32px; height: 32px; font-size: 13px; }
  .step + .step::before { left: 29px; }
  .step-body { padding: 0 14px 16px 14px; }
  .step-off-note { padding: 0 14px 12px 58px; }
  .step-state .pill { display: none; }
  .phone { width: 300px; height: 620px; }
  .day { min-height: 72px; padding: 4px 3px; gap: 2px; }
  .daynum { width: 22px; height: 22px; font-size: 11.5px; }
  .post-chip:not(.wide) { padding: 2px 4px; gap: 3px; justify-content: center; }
  .post-chip:not(.wide) .post-text, .post-chip:not(.wide) .post-time, .post-chip:not(.wide) .post-auto { display: none; }
  .post-chip:not(.wide) .pf-badge { width: 14px; height: 14px; }
  .weekday { padding: 8px 4px; text-align: center; font-size: 10.5px; }
  .week-day { font-size: 11px; }
  .week-day b { font-size: 15px; width: 26px; height: 26px; }
  .modal { border-radius: 16px; max-height: calc(100vh - 16px); }
  .modal-backdrop { padding: 8px; align-items: end; }
  .modal-head { padding: 18px 18px 6px; }
  .modal-body { padding: 10px 18px 16px; }
  .modal-actions { padding: 12px 18px 16px; }
  .modal-actions .btn { flex: 1; }
  .modal-actions .btn.danger { margin-right: 0; flex-basis: 100%; }
  .recipe-grid { grid-template-columns: 1fr; }
  .shortcut { flex-wrap: wrap; }
  .shortcut > div { flex-basis: 100%; order: 3; }
  .shortcut-arrow { margin-left: auto; }
  .empty { padding: 40px 16px; }
  .empty h2 { font-size: var(--fs-xl); }
  .empty .muted { font-size: var(--fs-m); }
  #toasts { left: 16px; right: 16px; bottom: calc(var(--tabbar) + 12px); }
  .toast { max-width: none; }
  .auth-main { padding: 20px 16px; align-items: start; }
  .auth-card { padding: 28px 22px 22px; }
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-row > .field { flex-basis: 100%; }
}
@media (max-width: 400px) {
  .phone { width: 100%; max-width: 300px; height: 600px; border-radius: 44px; }
  .screen { border-radius: 34px; }
  .kind-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* composer helpers: title ideas, frames of the video to pick a thumbnail */
.title-ideas { display: flex; flex-wrap: wrap; gap: 6px; }
.title-ideas:empty { display: none; }
.frames { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.frames:empty { display: none; }
.frames .frame { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: none; cursor: pointer; }
.frames .frame:hover { border-color: var(--brand); }
.frames .frame img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.pf-badge.pf-linkedin { background: #0a66c2; }
.post-chip.pf-linkedin { --pc: #0a66c2; }
.pf-card-linkedin::before { background: #0a66c2; }
.pf-badge.pf-threads { background: #000; }
.post-chip.pf-threads { --pc: #6b6b6b; }
.pf-card-threads::before { background: #000; }

/* language picker */
.sidebar-lang, .auth-lang { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.sidebar-lang { padding: 8px 4px 0; }
.auth-lang { margin-top: 18px; color: rgba(255, 255, 255, 0.85); }
.lang-select { flex: 1; min-width: 0; background: transparent; color: inherit; border: 1px solid var(--line, rgba(127, 127, 127, 0.3)); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 13px; cursor: pointer; }
.auth-lang .lang-select { flex: none; border-color: rgba(255, 255, 255, 0.35); }
.lang-select option { color: #111; }
