/* SocialHub — Feuille de style principale
   Direction « contraste vif » : fond clair, barre latérale encre, accent indigo.
   Règle de lecture : un seul niveau d'information par bloc, un titre par bloc,
   les explications longues repliées dans des notes plutôt qu'en paragraphes. */

/* Police auto-hébergée : aucun appel à Google Fonts, aucun transfert d'adresse IP
   hors de l'hébergement OVH. Conforme à la politique de confidentialité publiée.
   Plus Jakarta Sans — SIL Open Font License 1.1 (voir assets/fonts/OFL.txt). */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #F4F5F7;
  --card: #ffffff;
  --ink: #0B1220;
  --ink-2: #414A5A;
  --mut: #667085;
  --line: #E6E8EC;
  --line-2: #D3D7DE;
  --acc: #4338CA;
  --acc-ink: #ffffff;
  --acc-soft: #EEEBFF;
  --ok: #0F7A45;
  --ok-soft: #E7F6EE;
  --warn: #C2410C;
  --warn-soft: #FFF7ED;
  --err: #B42318;
  --err-soft: #FEF3F2;
  --sidebar-bg: #0B1220;
  --sidebar-ink: rgba(255,255,255,.62);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 8px 24px -12px rgba(16,24,40,.12);
  --shadow-lg: 0 2px 4px rgba(16,24,40,.05), 0 18px 40px -18px rgba(16,24,40,.22);
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--acc); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
::selection { background: var(--acc-soft); }

/* ---- Structure ---- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 246px; background: var(--sidebar-bg); color: var(--sidebar-ink); display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; }
.main { flex: 1; margin-left: 246px; padding: 30px 36px 70px; max-width: 1560px; }
@media (max-width: 900px) {
  .sidebar { width: 66px; }
  .sidebar .brand-name, .sidebar .nav-item span, .sidebar .user-meta { display: none; }
  .main { margin-left: 66px; padding: 20px 16px 60px; }
}

/* ---- Barre latérale ---- */
.brand { display: flex; align-items: center; gap: 11px; padding: 22px 20px 18px; }
.brand-logo { width: 32px; height: 32px; border-radius: 9px; background: var(--acc); color: #fff; font-weight: 800; font-size: 15px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-name { font-weight: 700; font-size: 16px; color: #fff; letter-spacing: -.3px; }
.sidebar nav { flex: 1; padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; color: var(--sidebar-ink); font-weight: 600; font-size: 14px; }
.nav-item:hover { background: rgba(255,255,255,.07); text-decoration: none; color: #fff; }
.nav-item.active { background: var(--acc); color: #fff; }
.nav-item svg { flex-shrink: 0; }
/* Messages en attente : une pastille rouge qui bat doucement. Sur une barre
   sombre, un badge blanc discret passait inaperçu toute la journée. */
.nav-item .badge { margin-left: auto; background: #E5484D; color: #fff; font-size: 11px; font-weight: 800; border-radius: 99px; padding: 2px 8px; line-height: 1.35; box-shadow: 0 0 0 0 rgba(229,72,77,.7); animation: badge-pulse 2.2s ease-out infinite; }
.nav-item.active .badge { background: #fff; color: #B42318; animation: none; }
@keyframes badge-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(229,72,77,.65); }
  70%  { box-shadow: 0 0 0 7px rgba(229,72,77,0); }
  100% { box-shadow: 0 0 0 0 rgba(229,72,77,0); }
}
@media (prefers-reduced-motion: reduce) { .nav-item .badge { animation: none; } }

/* Même signal sur la tuile du tableau de bord. */
.stat-tile.alert { border-color: #F5C2C0; background: linear-gradient(180deg, #FFF7F7 0%, #fff 60%); }
.stat-tile.alert .st-value { color: #B42318; }
.stat-tile .st-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #E5484D; margin-left: 7px; vertical-align: 1px; animation: badge-pulse 2.2s ease-out infinite; }
.sidebar-footer { padding: 16px 14px; border-top: 1px solid rgba(255,255,255,.1); }
.user-chip { display: flex; gap: 10px; align-items: center; }
.avatar { width: 32px; height: 32px; border-radius: 9px; background: rgba(255,255,255,.12); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; font-size: 13px; }
.user-name { font-size: 13.5px; font-weight: 700; color: #fff; }
.logout { font-size: 12px; color: var(--sidebar-ink); font-weight: 500; }
.logout:hover { color: #fff; }

/* ---- En-tête de page ---- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; margin: 0; font-weight: 800; letter-spacing: -.7px; }
.page-head .sub { color: var(--mut); font-size: 14px; margin-top: 3px; font-weight: 500; }

/* ---- Cartes ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 15.5px; margin: 0 0 16px; font-weight: 800; letter-spacing: -.2px; display: flex; align-items: center; gap: 9px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid.cols-4 { grid-template-columns: 1fr 1fr; } .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }

/* ---- Boutons ---- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 13.5px; font-weight: 700; cursor: pointer; font-family: var(--font); transition: .12s; box-shadow: var(--shadow); }
.btn:hover { border-color: var(--line-2); background: #FCFCFD; text-decoration: none; }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.primary:hover { background: #3A30B0; border-color: #3A30B0; }
.btn.danger { color: var(--err); }
.btn.danger:hover { background: var(--err-soft); border-color: #FBD3CF; }
.btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ---- Formulaires ---- */
label.lbl { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink); margin: 0 0 7px; }
.input, textarea.input, select.input { width: 100%; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: 14.5px; font-family: var(--font); background: #FCFCFD; color: var(--ink); font-weight: 500; transition: .12s; }
.input:focus { outline: 0; border-color: var(--acc); background: #fff; box-shadow: 0 0 0 3px rgba(67,56,202,.1); }
.input::placeholder { color: #98A2B3; font-weight: 400; }
textarea.input { resize: vertical; min-height: 0; line-height: 1.6; }
#body { min-height: 150px; }
.input.field-error, select.field-error { border-color: var(--err); box-shadow: 0 0 0 3px rgba(180,35,24,.1); }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.hint { font-size: 12.5px; color: var(--mut); margin-top: 7px; line-height: 1.55; font-weight: 500; }
/* Aide repliée : le détail existe, mais il ne prend de la place que si on le demande. */
.help { margin-top: 7px; }
.help > summary { list-style: none; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--mut); display: inline-flex; gap: 6px; align-items: center; user-select: none; }
.help > summary::-webkit-details-marker { display: none; }
.help > summary::before { content: '?'; width: 15px; height: 15px; border-radius: 50%; background: #EDEFF2; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.help > summary:hover { color: var(--ink); }
.help[open] > summary { color: var(--acc); }
.help[open] > summary::before { background: var(--acc-soft); color: var(--acc); }
.help-body { font-size: 12.5px; color: var(--mut); line-height: 1.55; font-weight: 500; margin-top: 8px; padding-left: 21px; }
.hint .mono, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: #F4F5F7; padding: 2px 6px; border-radius: 5px; color: var(--ink-2); }
.small { font-size: 12.5px; }
.muted { color: var(--mut); }

/* ---- Pastilles d'état ---- */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 7px; letter-spacing: .01em; }
.pill.published { background: var(--ok-soft); color: var(--ok); }
.pill.scheduled { background: var(--acc-soft); color: var(--acc); }
.pill.draft { background: #F4F5F7; color: var(--mut); }
.pill.failed { background: var(--err-soft); color: var(--err); }
.pill.partial { background: var(--warn-soft); color: var(--warn); }

/* ---- Messages ---- */
.flash { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 18px; font-weight: 600; border: 1px solid transparent; line-height: 1.55; }
.flash.flash-success { background: var(--ok-soft); color: var(--ok); border-color: #BFE8D2; }
.flash.flash-error { background: var(--err-soft); color: var(--err); border-color: #FBD3CF; }
.flash.flash-info { background: var(--warn-soft); color: #7C2D12; border-color: #FED7AA; }
.flash.small { font-size: 12.5px; padding: 11px 14px; font-weight: 500; }

/* ---- Tableaux ---- */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 800; color: var(--mut); text-transform: uppercase; letter-spacing: .05em; padding: 0 14px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 14px; border-bottom: 1px solid #F1F2F4; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: #FCFCFD; }
/* Pile de logos : superposés faute de place, dépliés au survol. */
.net-stack { display: inline-flex; align-items: center; vertical-align: -4px; }
.net-stack .ns-item { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px #fff; margin-left: -7px; transition: margin-left .16s ease; flex: none; }
.net-stack .ns-item:first-child { margin-left: 0; }
.net-stack:hover .ns-item { margin-left: 3px; }
.net-stack:hover .ns-item:first-child { margin-left: 0; }
.net-dot { display: inline-flex; align-items: center; vertical-align: -3px; margin-right: 7px; }

/* ---- Vide ---- */
.empty { text-align: center; padding: 30px 20px; color: var(--mut); font-weight: 500; font-size: 13.5px; }
.empty .big { margin-bottom: 10px; opacity: .4; }
.empty .big .ico { width: 26px; height: 26px; }

/* ---- Tuiles de statistiques ---- */
.stat-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.stat-tile .st-label { font-size: 12px; font-weight: 700; color: var(--mut); display: flex; align-items: center; gap: 7px; text-transform: uppercase; letter-spacing: .04em; }
.stat-tile .st-value { font-size: 30px; font-weight: 800; margin-top: 7px; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.stat-tile .st-delta { font-size: 12.5px; font-weight: 700; margin-top: 3px; }
.st-delta.up { color: var(--ok); }
.st-delta.down { color: var(--err); }
.st-delta.flat { color: var(--mut); }

/* ---- Éditeur ---- */
.publish-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.publish-bar #submit-btn { margin-left: auto; }
.publish-bar #schedule-wrap .input { width: auto; font-size: 13px; padding: 8px 10px; }
.publish-bar #submit-status { flex-basis: 100%; }
.compose-grid { display: grid; grid-template-columns: minmax(400px, 1fr) minmax(400px, 470px); gap: 20px; align-items: start; }
@media (max-width: 1150px) { .compose-grid { grid-template-columns: 1fr; } }
.char-counter { font-size: 12px; color: var(--mut); text-align: right; margin-top: 5px; font-variant-numeric: tabular-nums; font-weight: 600; }
.char-counter.over { color: var(--err); font-weight: 800; }
.chan-chip { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: #fff; padding: 7px 14px 7px 7px; border-radius: 12px; font-size: 13.5px; font-weight: 700; cursor: pointer; color: var(--mut); transition: .12s; }
.chan-chip:hover { border-color: var(--line-2); }
.chan-chip.selected { border-color: var(--acc); background: var(--acc-soft); color: var(--acc); }
.cc-name { white-space: nowrap; }
.media-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.media-thumb { position: relative; width: 82px; height: 82px; border-radius: 12px; overflow: hidden; border: 1.5px solid var(--line); background: #0B1220; }
.media-thumb img, .media-thumb video { width: 100%; height: 100%; object-fit: cover; }
.media-thumb .rm { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%; background: rgba(11,18,32,.7); color: #fff; border: 0; cursor: pointer; font-size: 12px; line-height: 1; }
.upload-zone { border: 1.5px dashed var(--line-2); border-radius: 12px; padding: 13px 16px; text-align: center; color: var(--mut); cursor: pointer; transition: .12s; font-size: 13px; font-weight: 600; background: #FCFCFD; }
.upload-zone:hover, .upload-zone.drag { border-color: var(--acc); background: var(--acc-soft); color: var(--acc); }
.tabs { display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); padding: 4px; border-radius: 12px; margin-bottom: 18px; flex-wrap: wrap; width: fit-content; max-width: 100%; }
.tab { padding: 8px 13px; font-size: 13px; font-weight: 700; color: var(--mut); border: 0; background: none; cursor: pointer; border-radius: 9px; display: inline-flex; gap: 8px; align-items: center; font-family: var(--font); }
.tab.active { background: var(--acc-soft); color: var(--acc); }
.preview-device { display: inline-flex; gap: 4px; background: #fff; border: 1px solid var(--line); padding: 4px; border-radius: var(--radius-sm); }
.preview-device button { font-size: 12px; padding: 5px 11px; border-radius: 7px; border: 0; background: none; cursor: pointer; font-weight: 700; color: var(--mut); font-family: var(--font); }
.preview-device button.active { background: var(--acc-soft); color: var(--acc); }

/* ---- Sélecteur de format ---- */
.fmt-row { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; background: #fff; border: 1px solid var(--line); padding: 4px; border-radius: 12px; width: fit-content; }
.fmt-chip { border: 0; background: none; border-radius: 9px; padding: 8px 15px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--mut); font-family: var(--font); transition: .12s; }
.fmt-chip:hover { color: var(--ink); }
.fmt-chip.on { background: var(--acc-soft); color: var(--acc); }
.fmt-chip:disabled { opacity: .45; cursor: not-allowed; }

/* ---- Onglets de rédaction ---- */
#compose-tabs { margin: -4px 0 20px; }
.compose-panel { animation: cp-in .12s ease-out; }
@keyframes cp-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.lbl-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.lbl-row label.lbl { margin-bottom: 7px; }
.tab-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--acc); display: inline-block; }
.tab .tab-dot { margin-left: 2px; }
#general-note { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---- Réglages réseau dans l'éditeur ---- */
.block-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--mut); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.net-settings { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
#custom-tabs-wrap { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.custom-panel { padding-top: 2px; }
.tt-creator { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #FCFCFD; margin-bottom: 18px; }
.tt-toggle { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; cursor: pointer; line-height: 1.45; font-weight: 600; }
.tt-toggle input { margin-top: 3px; flex: none; width: 17px; height: 17px; accent-color: var(--acc); }
.tt-toggle.is-forced { opacity: .5; cursor: not-allowed; }
.tt-toggle.is-forced input { cursor: not-allowed; }
select.field-error { border-color: var(--err); }

/* ---- Scène d'aperçu ---- */
#preview-net-label { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.preview-stage { background: #EDEEF1; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; justify-content: center; min-height: 320px; }
.preview-frame { width: 100%; max-width: 480px; transition: max-width .2s; }
.preview-frame.mobile { max-width: 360px; }

/* ---- Calendrier ---- */
.cal-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.cal-title { font-size: 18px; font-weight: 800; min-width: 180px; text-transform: capitalize; letter-spacing: -.3px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--line); gap: 1px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cal-dow { background: #FCFCFD; padding: 10px 6px; text-align: center; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); }
.cal-cell { background: #fff; min-height: 112px; padding: 7px; position: relative; }
.cal-cell.other { background: #FAFAFB; }
.cal-cell.today { background: var(--acc-soft); }
.cal-cell .d { font-size: 12px; font-weight: 700; color: var(--mut); }
.cal-cell.today .d { color: var(--acc); }
.cal-cell.dropover { outline: 2px dashed var(--acc); outline-offset: -3px; }
.cal-ev { display: flex; gap: 5px; align-items: center; margin-top: 5px; padding: 4px 7px; border-radius: 7px; font-size: 11.5px; font-weight: 700; cursor: grab; background: var(--acc-soft); color: var(--acc); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-ev.published { background: var(--ok-soft); color: var(--ok); cursor: pointer; }
.cal-ev.failed, .cal-ev.partial { background: var(--err-soft); color: var(--err); }
.cal-ev .t { opacity: .7; font-weight: 600; }
.cal-ev .ev-txt { overflow: hidden; text-overflow: ellipsis; }
.cal-ev .net-stack { flex: none; }

/* ---- Boîte de réception ---- */
.inbox-layout { display: grid; grid-template-columns: 350px 1fr; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .inbox-layout { grid-template-columns: 1fr; } }
.inbox-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; max-height: calc(100vh - 210px); overflow-y: auto; }
.inbox-item { display: flex; gap: 11px; padding: 14px 15px; border-bottom: 1px solid #F1F2F4; cursor: pointer; transition: .1s; }
.inbox-item:hover { background: #FCFCFD; }
.inbox-item.active { background: var(--acc-soft); }
.inbox-item.unread { box-shadow: inset 3px 0 0 var(--acc); }
.inbox-item .ii-avatar { width: 38px; height: 38px; border-radius: 11px; background: #EEF0F3; display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--mut); flex-shrink: 0; overflow: hidden; }
.inbox-item .ii-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ii-top { display: flex; justify-content: space-between; gap: 8px; }
.ii-name { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ii-time { font-size: 11.5px; color: var(--mut); flex-shrink: 0; font-weight: 600; }
.ii-body { font-size: 13px; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: 2px; }
.ii-tags { display: flex; gap: 6px; margin-top: 6px; align-items: center; }
.ii-kind { font-size: 10.5px; font-weight: 800; color: var(--mut); text-transform: uppercase; letter-spacing: .05em; }
.inbox-detail { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; min-height: 320px; }
.thread { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; max-height: 420px; overflow-y: auto; padding-right: 6px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.45; font-weight: 500; }
.bubble.in { background: #F1F2F4; align-self: flex-start; border-bottom-left-radius: 5px; }
.bubble.out { background: var(--acc); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
.bubble .bt { font-size: 10.5px; opacity: .6; margin-top: 4px; font-weight: 600; }
.reply-box { display: flex; gap: 10px; margin-top: 14px; }
.reply-box textarea { flex: 1; min-height: 46px; }
.inbox-filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.fgroup { display: inline-flex; gap: 4px; background: #fff; border: 1px solid var(--line); padding: 4px; border-radius: 12px; flex-wrap: wrap; }
.fchip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 9px; border: 0; background: none; font-size: 12.5px; font-weight: 700; color: var(--mut); cursor: pointer; font-family: var(--font); }
.fchip:hover { color: var(--ink); }
.fchip.on { background: var(--acc-soft); color: var(--acc); }

/* ---- Statistiques ---- */
.period-box { margin-bottom: 18px; padding: 16px 20px; }
.period-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.period-row .field { margin: 0; }
.period-row .input { width: auto; }
.chart-box { position: relative; height: 300px; }
.chart-box.sm { height: 220px; }
.stats-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; gap: 4px; background: #fff; border: 1px solid var(--line); padding: 4px; border-radius: var(--radius-sm); }
.seg button { border: 0; background: none; padding: 7px 14px; font-size: 12.5px; font-weight: 700; color: var(--mut); cursor: pointer; font-family: var(--font); border-radius: 7px; }
.seg button.on { background: var(--acc-soft); color: var(--acc); }

/* ---- Réglages : sections repliables ---- */
.cfg { border-top: 1px solid var(--line); }
.cfg:first-of-type { border-top: 0; }
.cfg > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 2px; font-weight: 700; font-size: 14px; user-select: none; }
.cfg > summary::-webkit-details-marker { display: none; }
.cfg > summary:hover { color: var(--acc); }
.cfg-name { display: inline-flex; align-items: center; gap: 10px; }
.cfg-name::before { content: '›'; font-size: 17px; color: var(--mut); transition: transform .15s; display: inline-block; }
.cfg[open] > summary .cfg-name::before { transform: rotate(90deg); }
.cfg-body { padding: 4px 0 22px 26px; }
@media (max-width: 700px) { .cfg-body { padding-left: 0; } }
.url-list { margin: 4px 0 16px; display: grid; gap: 6px; }
.url-list > div { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 12.5px; }
.url-list > div > span:first-child { color: var(--mut); font-weight: 700; min-width: 150px; }

/* ---- Suivi de publication ---- */
.pg-overlay { position: fixed; inset: 0; background: rgba(11,18,32,.55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; animation: pg-in .15s ease-out; }
@keyframes pg-in { from { opacity: 0; } to { opacity: 1; } }
.pg-box { background: #fff; border-radius: var(--radius); padding: 26px 28px; width: 100%; max-width: 460px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.5); }
.pg-box h3 { margin: 0 0 16px; font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.pg-bar { height: 7px; border-radius: 99px; background: #EDEFF2; overflow: hidden; }
.pg-fill { height: 100%; width: 0; background: var(--acc); border-radius: 99px; transition: width .4s ease; }
.pg-meta { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--mut); margin-top: 8px; }
.pg-list { margin-top: 18px; display: flex; flex-direction: column; gap: 2px; }
.pg-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 13.5px; font-weight: 600; }
.pg-row.is-live { background: var(--acc-soft); }
.pg-row.is-done { color: var(--ok); }
.pg-row.is-failed { background: var(--err-soft); color: var(--err); }
.pg-ico { display: inline-flex; flex: none; }
/* Roue de la ligne en cours. L'emplacement est réservé sur toutes les lignes :
   sans cela, l'apparition de la roue décalerait le nom du compte à chaque étape. */
.pg-spin { flex: none; width: 13px; height: 13px; margin-left: -4px; border-radius: 50%;
  border: 2px solid var(--acc); border-top-color: transparent; visibility: hidden; }
.pg-row.is-live .pg-spin { visibility: visible; animation: pg-spin .7s linear infinite; }
.pg-row.is-done .pg-spin { border-color: var(--ok); border-top-color: transparent; }
.pg-row.is-failed .pg-spin { border-color: var(--err); border-top-color: transparent; }
@keyframes pg-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pg-row.is-live .pg-spin { animation-duration: 2.4s; } }
.pg-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-tag { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; background: #EDEFF2; color: var(--mut); padding: 2px 6px; border-radius: 5px; }
.pg-step { font-size: 12px; color: var(--mut); font-weight: 700; text-align: right; flex: none; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-row.is-live .pg-step { color: var(--acc); }
.pg-row.is-failed .pg-step, .pg-row.is-done .pg-step { color: inherit; }
.pg-err { flex-basis: 100%; font-size: 12px; font-weight: 500; margin: 0; line-height: 1.45; }
.pg-box .hint { margin-top: 16px; }

/* ---- Connexion ---- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(120% 100% at 20% 0%, #1B2440 0%, #0B1220 55%); padding: 20px; }
.login-card { background: #fff; border-radius: 20px; padding: 40px; width: 100%; max-width: 410px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.55); }
.login-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 28px; }
.login-links { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.login-links a { font-size: 12.5px; font-weight: 700; color: var(--mut); text-decoration: none; }
.login-links a:hover { color: var(--acc); text-decoration: underline; }
.login-brand .brand-logo { width: 46px; height: 46px; font-size: 21px; border-radius: 13px; }
.login-brand h1 { font-size: 22px; margin: 0; font-weight: 800; letter-spacing: -.5px; }
.login-brand .sub { font-size: 13px; color: var(--mut); font-weight: 500; }

/* ---- Modale ---- */
.modal-back { position: fixed; inset: 0; background: rgba(11,18,32,.55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; backdrop-filter: blur(3px); }
.modal { background: #fff; border-radius: 18px; max-width: 580px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 26px; box-shadow: var(--shadow-lg); }
.modal h3 { margin: 0 0 16px; font-size: 18px; font-weight: 800; }
.hidden { display: none !important; }

/* ---- Avatar générique ---- */
.sh-avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; overflow: hidden; position: relative; flex: none; }
.sh-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ===================== PRÉVISUALISATIONS RÉSEAUX ===================== */
/* ---- Facebook ---- */
.fb-post { background: #fff; border-radius: 8px; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); font-family: Helvetica, Arial, sans-serif; color: #050505; }
.fb-head { display: flex; gap: 8px; padding: 12px 16px 0; }
.fb-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #e4e6eb; }
.fb-name { font-size: 15px; font-weight: 600; line-height: 1.25; }
.fb-meta { font-size: 13px; color: #65676b; display: flex; align-items: center; gap: 4px; }
.fb-body { padding: 8px 16px 12px; font-size: 15px; line-height: 1.33; white-space: pre-wrap; word-wrap: break-word; }
.fb-body.long { font-size: 14px; }
.fb-media { display: grid; gap: 2px; background: #000; }
.fb-media img { width: 100%; display: block; object-fit: cover; }
.fb-media.g1 img { max-height: 500px; object-fit: contain; background: #000; }
.fb-media.g2 { grid-template-columns: 1fr 1fr; } .fb-media.g2 img { aspect-ratio: 1/1.35; }
.fb-media.g3 { grid-template-columns: 1fr 1fr; } .fb-media.g3 img:first-child { grid-column: span 2; aspect-ratio: 2/1.1; } .fb-media.g3 img { aspect-ratio: 1/.95; }
.fb-media.g4 { grid-template-columns: 1fr 1fr; } .fb-media.g4 img { aspect-ratio: 1/.95; }
.fb-more { position: relative; }
.fb-more::after { content: attr(data-more); position: absolute; inset: 0; background: rgba(0, 0, 0, .45); color: #fff; font-size: 26px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.fb-linkcard { border: 1px solid #dddfe2; border-radius: 0; background: #f0f2f5; }
.fb-linkcard img { width: 100%; aspect-ratio: 1.91/1; object-fit: cover; display: block; }
.fb-linkcard-body { padding: 10px 12px; }
.fb-linkcard-host { font-size: 12px; color: #65676b; text-transform: uppercase; }
.fb-linkcard-title { font-size: 16px; font-weight: 600; color: #050505; margin-top: 2px; }
.fb-stats { display: flex; justify-content: space-between; padding: 10px 16px; font-size: 14px; color: #65676b; border-bottom: 1px solid #ced0d4; margin: 0 0; }
.fb-actions { display: flex; padding: 4px 12px; }
.fb-actions span { flex: 1; text-align: center; padding: 8px 0; font-size: 14px; font-weight: 600; color: #65676b; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ---- Instagram ---- */
.ig-post { background: #fff; border: 1px solid #dbdbdb; border-radius: 4px; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #262626; }
.ig-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.ig-avatar-ring { padding: 2px; border-radius: 50%; background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.ig-avatar { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; display: block; background: #efefef; }
.ig-username { font-size: 13px; font-weight: 600; }
.ig-dots { margin-left: auto; font-weight: 700; letter-spacing: 1px; }
.ig-media { position: relative; background: #000; }
.ig-media img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.ig-media.portrait img { aspect-ratio: 4/5; }
.ig-carousel-dots { display: flex; gap: 4px; justify-content: center; padding: 10px 0 0; }
.ig-carousel-dots i { width: 6px; height: 6px; border-radius: 50%; background: #c7c7c7; }
.ig-carousel-dots i.on { background: #0095f6; }
.ig-count { position: absolute; top: 12px; right: 12px; background: rgba(0, 0, 0, .75); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.ig-actionbar { display: flex; gap: 14px; padding: 10px 12px 6px; align-items: center; }
.ig-actionbar svg { width: 24px; height: 24px; }
.ig-actionbar .bookmark { margin-left: auto; }
.ig-likes { padding: 0 12px; font-size: 13px; font-weight: 600; }
.ig-caption { padding: 4px 12px 14px; font-size: 13px; line-height: 1.4; word-wrap: break-word; }
.ig-caption .u { font-weight: 600; margin-right: 5px; }
.ig-caption .more { color: #8e8e8e; }
.ig-nomedia { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; color: #8e8e8e; background: #fafafa; font-size: 13px; text-align: center; padding: 20px; }

/* ---- LinkedIn ---- */
/* ---- Aperçu Threads ---- */
.th-post { display: flex; gap: 12px; background: #fff; border-radius: 12px; padding: 16px; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #000; border: 1px solid #dbdbdb; }
.th-col { display: flex; flex-direction: column; align-items: center; flex: none; }
.th-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #efefef; }
.th-line { width: 2px; flex: 1; background: #e0e0e0; margin-top: 8px; border-radius: 2px; min-height: 12px; }
.th-body { flex: 1; min-width: 0; }
.th-head { display: flex; align-items: center; gap: 8px; }
.th-name { font-size: 15px; font-weight: 600; }
.th-time { font-size: 15px; color: #999; }
.th-text { font-size: 15px; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; margin-top: 2px; }
.th-text a { color: #1a73e8; text-decoration: none; }
.th-ph { color: #b0b0b0; }
.th-media { margin-top: 10px; border-radius: 10px; overflow: hidden; border: 1px solid #e0e0e0; }
.th-media img, .th-media video { width: 100%; display: block; max-height: 430px; object-fit: cover; }
.th-carousel { margin-top: 10px; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.th-carousel img, .th-carousel video { width: 68%; flex: none; border-radius: 10px; border: 1px solid #e0e0e0; object-fit: cover; max-height: 380px; }
.th-actions { display: flex; gap: 20px; margin-top: 12px; color: #000; }
.th-actions svg { width: 20px; height: 20px; }

.li-post { background: #fff; border-radius: 8px; border: 1px solid #e0dfdd; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: rgba(0, 0, 0, .9); }
.li-head { display: flex; gap: 8px; padding: 12px 16px 0; }
.li-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #f3f2f0; }
.li-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.li-sub { font-size: 12px; color: rgba(0, 0, 0, .6); }
.li-body { padding: 10px 16px 12px; font-size: 14px; line-height: 1.43; white-space: pre-wrap; word-wrap: break-word; }
.li-see-more { color: rgba(0, 0, 0, .6); cursor: pointer; }
.li-media img { width: 100%; display: block; max-height: 480px; object-fit: cover; }
.li-media.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; } .li-media.grid2 img { aspect-ratio: 1/1; }
.li-social { display: flex; align-items: center; gap: 5px; padding: 8px 16px; font-size: 12px; color: rgba(0, 0, 0, .6); border-bottom: 1px solid #e0dfdd; }
.li-reactions { display: flex; }
.li-reactions img { width: 16px; height: 16px; border-radius: 50%; border: 1px solid #fff; margin-left: -4px; }
.li-actions { display: flex; padding: 4px 8px; }
.li-actions span { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 4px; font-size: 13.5px; font-weight: 600; color: rgba(0, 0, 0, .6); }

/* ---- TikTok (rendu vertical plein écran) ---- */
.tt-post { position: relative; width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 9/16; background: #000; border-radius: 10px; overflow: hidden; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #fff; }
.tt-post video, .tt-post img.tt-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tt-nomedia { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: #8a8a8a; font-size: 12.5px; background: #101010; }
.tt-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.15) 38%, rgba(0,0,0,0) 60%); }
.tt-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: center; gap: 16px; padding: 12px; font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.tt-top .on { position: relative; }
.tt-top .on::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: -5px; width: 22px; height: 2px; background: #fff; border-radius: 2px; }
.tt-top .off { opacity: .65; font-weight: 500; }
.tt-bottom { position: absolute; left: 0; right: 54px; bottom: 0; padding: 0 12px 14px; }
.tt-user { font-size: 14px; font-weight: 700; margin-bottom: 5px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.tt-caption { font-size: 12.5px; line-height: 1.35; text-shadow: 0 1px 3px rgba(0,0,0,.6); word-wrap: break-word; }
.tt-caption .more { opacity: .75; }
.tt-music { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-top: 7px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.tt-rail { position: absolute; right: 6px; bottom: 14px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.tt-rail .act { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.tt-rail .avatar-ring { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid #fff; overflow: hidden; background: #333; }
.tt-rail .avatar-ring img { width: 100%; height: 100%; object-fit: cover; }
.tt-count { position: absolute; top: 44px; right: 10px; background: rgba(0,0,0,.6); border-radius: 99px; padding: 2px 9px; font-size: 11px; font-weight: 600; }
.tt-privacy { margin-top: 10px; font-size: 11.5px; color: var(--warn); background: var(--warn-soft); border: 1px solid #f5dcae; border-radius: 8px; padding: 7px 10px; }

/* ---- Aperçu vertical : Reel et Story ---- */
.vp{position:relative;width:100%;max-width:300px;margin:0 auto;aspect-ratio:9/16;background:#000;
  border-radius:12px;overflow:hidden;color:#fff;
  font-family:-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif}
.vp video,.vp img:not(.vp-av){position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.vp-nomedia{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  text-align:center;padding:24px;color:#8a8a8a;font-size:12.5px;background:#101010}
.vp-shade{position:absolute;inset:0;background:linear-gradient(to top,rgba(0,0,0,.75) 0%,rgba(0,0,0,.12) 42%,rgba(0,0,0,0) 62%)}
.vp-shade.top{background:linear-gradient(to bottom,rgba(0,0,0,.55) 0%,rgba(0,0,0,0) 26%)}
.vp-progress{position:absolute;top:9px;left:10px;right:10px;height:2.5px;background:rgba(255,255,255,.35);border-radius:2px}
.vp-progress span{display:block;width:32%;height:100%;background:#fff;border-radius:2px}
.vp-head{position:absolute;top:19px;left:10px;right:10px;display:flex;align-items:center;gap:8px;font-size:12.5px}
.vp-av{width:26px;height:26px;border-radius:50%;object-fit:cover;flex:none;background:#334155}
.vp-av.sm{width:22px;height:22px}
.vp-name{font-weight:600;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.vp-ago{opacity:.75;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.vp-reply{position:absolute;left:12px;right:12px;bottom:12px;border:1px solid rgba(255,255,255,.55);
  border-radius:999px;padding:8px 14px;font-size:12.5px;opacity:.9}
.vp-tag{position:absolute;top:12px;left:12px;font-size:14px;font-weight:700;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.vp-rail{position:absolute;right:8px;bottom:16px;display:flex;flex-direction:column;align-items:center;gap:15px}
.vp-act{display:flex;flex-direction:column;align-items:center;gap:3px;font-size:11.5px;
  text-shadow:0 1px 3px rgba(0,0,0,.6)}
.vp-bottom{position:absolute;left:0;right:52px;bottom:0;padding:0 12px 14px}
.vp-user{display:flex;align-items:center;gap:7px;font-size:13px;font-weight:600;margin-bottom:6px;
  text-shadow:0 1px 3px rgba(0,0,0,.6)}
.vp-caption{font-size:12.5px;line-height:1.35;text-shadow:0 1px 3px rgba(0,0,0,.6);word-wrap:break-word}
.vp-caption .more{opacity:.75}

/* ---- Aperçu vidéo longue YouTube ---- */
.yt-card{max-width:360px;margin:0 auto;font-family:-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif}
.yt-thumb{position:relative;aspect-ratio:16/9;background:#000;border-radius:12px;overflow:hidden}
.yt-thumb video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.yt-dur{position:absolute;right:8px;bottom:8px;background:rgba(0,0,0,.8);color:#fff;
  font-size:11.5px;font-weight:600;padding:2px 5px;border-radius:4px}
.yt-meta{display:flex;gap:11px;padding:12px 2px 0}
.yt-title{font-size:14.5px;font-weight:600;line-height:1.3;color:#0f0f0f;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.yt-sub{font-size:12.5px;color:#606060;margin-top:2px}

/* Partage manuel vers X : vignettes cliquables pour récupérer les médias,
   que X n'autorise pas à joindre automatiquement. */
.media-thumb.x-dl { display: block; cursor: pointer; text-decoration: none; }
.media-thumb.x-dl:hover { border-color: var(--acc); }
.x-dl-badge { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 0; text-align: center;
  background: rgba(11,18,32,.78); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: .2px; }
.media-thumb.x-dl:hover .x-dl-badge { background: var(--acc); }
