/* =====================================================================
   Réseaux sociaux (18/11/2026) : public/social.js. Mêmes composants que Croissance (cartes sombres, une bordure --line,
   rayons 8/10/12, accent violet réservé à l'action et à l'état). Instagram et TikTok : une pastille sobre, pas de couleurs
   de marque criardes.
   ===================================================================== */
html body .app .soc { display: flex; flex-direction: column; gap: 14px; padding-bottom: 32px; }
html body .app .soc h2 { font-size: 15px; font-weight: 650; margin: 0; }
html body .app .soc .card { margin: 0; }
html body .app .soc-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
html body .app .soc-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
html body .app .soc-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
html body .app .soc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
html body .app .soc-empty { padding: 22px 16px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 13.5px; text-align: center; }
html body .app .soc-note, html body .app .soc-paused { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; color: var(--fg-2); line-height: 1.45; }
html body .app .soc-note .i, html body .app .soc-paused .i { flex: none; width: 16px; height: 16px; margin-top: 2px; stroke: var(--accent); }
html body .app .soc-paused { border-color: color-mix(in srgb, #e5484d 45%, var(--line)); background: color-mix(in srgb, #e5484d 8%, var(--surface)); align-items: center; }
html body .app .soc-paused .i { stroke: #e5484d; }
html body .app .soc-paused span { flex: 1; }
html body .app .soc-stop .i { width: 14px; height: 14px; }

/* lignes (prochaines, comptes, historique) */
html body .app .soc-rows { display: flex; flex-direction: column; }
html body .app .soc-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); min-width: 0; }
html body .app .soc-row:last-child { border-bottom: 0; }
html body .app .soc-rt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; font-size: 13px; }
html body .app .soc-rt b { font-weight: 600; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body .app .soc-rt small, html body .app .soc-table small { color: var(--muted); font-size: 12px; }
html body .app .soc-why { color: #e5a03b !important; font-size: 12px; }
html body .app .soc-th { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
html body .app .soc-th img { width: 100%; height: 100%; object-fit: cover; }
html body .app .soc-th .i { width: 16px; height: 16px; stroke: var(--muted); }
html body .app .soc-av { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); color: var(--fg); font-weight: 650; font-size: 13px; border: 1px solid var(--line); }
html body .app .soc-av.instagram { box-shadow: inset 0 0 0 2px color-mix(in srgb, #767675 55%, transparent); }
html body .app .soc-av.tiktok { box-shadow: inset 0 0 0 2px color-mix(in srgb, #25f4ee 45%, transparent); }

/* pastilles : réseau, statut, état du compte, format */
html body .app .soc-pf { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid var(--line); color: var(--fg-2); background: var(--surface-2); vertical-align: middle; }
html body .app .soc-pf.instagram { border-color: color-mix(in srgb, #767675 40%, var(--line)); }
html body .app .soc-pf.tiktok { border-color: color-mix(in srgb, #25f4ee 35%, var(--line)); }
html body .app .soc-st, html body .app .soc-acst { flex: none; display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
html body .app .soc-st.scheduled, html body .app .soc-st.sending { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--accent-soft); }
html body .app .soc-st.published, html body .app .soc-acst.connected { color: #3dd68c; border-color: color-mix(in srgb, #3dd68c 35%, var(--line)); }
html body .app .soc-st.waiting_conn, html body .app .soc-acst.not_connected { color: #e5a03b; border-color: color-mix(in srgb, #e5a03b 35%, var(--line)); }
html body .app .soc-st.failed, html body .app .soc-st.unsure, html body .app .soc-st.expired, html body .app .soc-acst.expired, html body .app .soc-acst.error { color: #f2555a; border-color: color-mix(in srgb, #f2555a 40%, var(--line)); }
html body .app .soc-ck { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 6px; font-size: 10.5px; font-weight: 650; border: 1px solid var(--line); color: var(--muted); }
html body .app .soc-ck.ok { color: #3dd68c; } html body .app .soc-ck.warn { color: #e5a03b; } html body .app .soc-ck.bad { color: #f2555a; border-color: color-mix(in srgb, #f2555a 40%, var(--line)); }
html body .app .soc-ck.info { color: var(--fg-2); }
html body .app .soc-chk-r { font-size: 12.5px; margin: 4px 0 0; } html body .app .soc-chk-r.ok { color: #3dd68c; } html body .app .soc-chk-r.bad { color: #f2555a; }
html body .app .soc-chk-r small { color: var(--muted); }
html body .app .soc-tags { color: var(--accent); font-size: 12.5px; }

/* comptes */
html body .app .soc-acc { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
html body .app .soc-acc-h { display: flex; align-items: center; gap: 10px; }
html body .app .soc-acc p { margin: 0; }
html body .app .soc-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
html body .app td.soc-acts { white-space: nowrap; justify-content: flex-end; }
html body .app .soc-table td { vertical-align: top; }
html body .app .soc-table td .soc-st { margin-bottom: 3px; }

/* bibliothèque */
html body .app .soc-up { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; text-align: left; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
html body .app .soc-consent { flex: 1 1 100%; align-items: flex-start; line-height: 1.45; }
html body .app .soc-consent input { margin-top: 2px; }
html body .app .soc .gr-bar .gr-search input:not(#_s1):not(#_s2) { padding-left: 32px !important; }
html body .app .soc-lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
html body .app .soc-md { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; min-width: 0; }
html body .app .soc-md.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
html body .app .soc-md-sel { position: absolute; top: 6px; left: 6px; z-index: 2; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: color-mix(in srgb, var(--bg) 70%, transparent); }
html body .app .soc-md-th { position: relative; display: grid; place-items: center; aspect-ratio: 9 / 12; width: 100%; padding: 0; border: 0; background: var(--surface-2); cursor: pointer; }
html body .app .soc-md-th img { width: 100%; height: 100%; object-fit: cover; }
html body .app .soc-md-th .i { width: 22px; height: 22px; stroke: var(--muted); }
html body .app .soc-dur { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 11px; font-variant-numeric: tabular-nums; }
html body .app .soc-md-b { display: flex; flex-direction: column; gap: 4px; padding: 8px 9px 10px; font-size: 12.5px; min-width: 0; }
html body .app .soc-md-b b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
html body .app .soc-md-b small { color: var(--muted); font-size: 11.5px; }
html body .app .soc-md-k { display: flex; flex-wrap: wrap; gap: 4px; }

/* calendrier */
html body .app .soc-cal-t { font-size: 14px; font-weight: 650; text-transform: capitalize; margin-left: 4px; }
html body .app .soc-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
html body .app .soc-seg button { height: 30px; padding: 0 11px; border: 0; border-right: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12.5px; cursor: pointer; }
html body .app .soc-seg button:last-child { border-right: 0; }
html body .app .soc-seg button[aria-selected="true"] { background: var(--accent-soft); color: var(--fg); font-weight: 600; }
html body .app .soc-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
html body .app .soc-cal.day { grid-template-columns: 1fr; }
html body .app .soc-cal-h { padding: 8px; font-size: 11.5px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); text-align: center; }
html body .app .soc-day { display: flex; flex-direction: column; gap: 4px; min-height: 104px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
html body .app .soc-cal.week .soc-day { min-height: 340px; }
html body .app .soc-cal.day .soc-day { min-height: 300px; border-right: 0; }
html body .app .soc-day:nth-child(7n) { border-right: 0; }
html body .app .soc-day.out { background: color-mix(in srgb, var(--bg) 40%, var(--surface)); }
html body .app .soc-day.out .soc-dn { opacity: .45; }
html body .app .soc-day.today .soc-dn { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--on-accent, #fff); }
html body .app .soc-day.drop { background: var(--accent-soft); }
html body .app .soc-dn { font-size: 12px; font-weight: 600; color: var(--fg-2); }
html body .app .soc-ev { display: grid; grid-template-columns: auto auto auto 1fr; align-items: center; gap: 5px; padding: 3px 5px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); font-size: 11.5px; min-width: 0; cursor: default; }
html body .app .soc-ev[draggable="true"] { cursor: grab; }
html body .app .soc-ev.scheduled { border-left: 3px solid var(--accent); }
html body .app .soc-ev.published { border-left: 3px solid #3dd68c; }
html body .app .soc-ev.waiting_conn, html body .app .soc-ev.draft { border-left: 3px solid #e5a03b; }
html body .app .soc-ev.failed, html body .app .soc-ev.unsure, html body .app .soc-ev.expired { border-left: 3px solid #f2555a; }
html body .app .soc-ev.draft { opacity: .8; border-style: dashed; }
html body .app .soc-ev-th { display: block; width: 18px; height: 22px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
html body .app .soc-ev-th img { width: 100%; height: 100%; object-fit: cover; }
html body .app .soc-ev-u { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-2); }
html body .app .soc-ev-c { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10.5px; }
html body .app .soc-dot { width: 7px; height: 7px; border-radius: 50%; background: #767675; }
html body .app .soc-dot.tiktok { background: #25f4ee; }

/* fenêtre (compositeur, série, aperçu) */
.soc-modal .soc-mcard { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.soc-modal .soc-mcard.wide { width: min(980px, calc(100vw - 24px)); }
.soc-modal h2 { font-size: 17px; margin: 0; }
.soc-modal .soc-mfoot { display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: -1px; padding-top: 10px; background: inherit; }
.soc-modal .soc-mfoot:empty { display: none; }
.soc-modal .soc-l { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--fg-2); margin-bottom: 10px; }
.soc-modal .soc-l input, .soc-modal .soc-l select, .soc-modal .soc-l textarea, .soc-modal .soc-fs textarea, .soc-modal .soc-fs input { font-weight: 400; }
.soc-modal .soc-row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.soc-modal .soc-fs { display: flex; flex-direction: column; gap: 6px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.soc-modal .soc-fs legend { padding: 0 4px; font-size: 12.5px; font-weight: 600; }
.soc-modal .soc-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; font-weight: 400; }
.soc-modal .soc-checks.soc-sub { padding-left: 22px; }
.soc-chk { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 400; color: var(--fg-2); cursor: pointer; }
.soc-chk input { width: 16px; height: 16px; flex: none; }
.soc-modal .soc-comp { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; }
.soc-modal .soc-lbl { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.soc-modal .soc-pick { display: flex; flex-wrap: wrap; gap: 6px; max-height: 190px; overflow: auto; padding: 2px; }
.soc-modal .soc-pk { position: relative; width: 58px; height: 74px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); overflow: hidden; cursor: pointer; display: grid; place-items: center; }
.soc-modal .soc-pk img { width: 100%; height: 100%; object-fit: cover; }
.soc-modal .soc-pk .i { width: 18px; height: 18px; stroke: var(--muted); }
.soc-modal .soc-pk.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.soc-modal .soc-ord { position: absolute; top: 3px; right: 3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: var(--on-accent, #fff); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.soc-modal .soc-lane { padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.soc-modal .soc-tpl { font-weight: 400; }
.soc-modal .soc-probs { padding: 10px 12px; border: 1px solid color-mix(in srgb, #f2555a 45%, var(--line)); border-radius: 10px; background: color-mix(in srgb, #f2555a 7%, transparent); font-size: 12.5px; margin-bottom: 10px; }
.soc-modal .soc-probs p { margin: 2px 0; }
.soc-modal .soc-prevt { max-height: 260px; overflow: auto; }
.soc-modal .soc-phone { border: 1px solid var(--line); border-radius: 18px; padding: 10px; background: var(--bg); display: flex; flex-direction: column; gap: 8px; position: sticky; top: 0; }
.soc-modal .soc-ph-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.soc-modal .soc-ph-media { aspect-ratio: 9 / 16; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.soc-modal .soc-ph-media img { width: 100%; height: 100%; object-fit: cover; }
.soc-modal .soc-ph-cap { margin: 0; font-size: 12.5px; color: var(--fg-2); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 140px; overflow: auto; }
.soc-modal .soc-pv { display: grid; place-items: center; background: var(--bg); border-radius: 10px; overflow: hidden; }
.soc-modal .soc-pv video, .soc-modal .soc-pv img { max-width: 100%; max-height: 60vh; }
.soc-modal .soc-pf { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid var(--line); color: var(--fg-2); background: var(--surface-2); }
.soc-modal .soc-acst { display: inline-flex; height: 18px; align-items: center; padding: 0 6px; border-radius: 999px; font-size: 10.5px; border: 1px solid var(--line); color: var(--muted); }
.soc-modal .soc-acst.connected { color: #3dd68c; } .soc-modal .soc-acst.not_connected { color: #e5a03b; }
.soc-modal .soc-chk-r { font-size: 12.5px; margin: 4px 0 0; } .soc-modal .soc-chk-r.ok { color: #3dd68c; } .soc-modal .soc-chk-r.bad { color: #f2555a; }
.soc-modal .soc-why { color: #e5a03b; font-size: 12px; }
.soc-modal .soc-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.soc-modal .soc-rt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; font-size: 12.5px; }
.soc-modal .soc-rt small { color: var(--muted); }
.soc-modal .soc-th { width: 32px; height: 32px; border-radius: 6px; background: var(--surface-2); overflow: hidden; display: grid; place-items: center; }
.soc-modal .soc-th img { width: 100%; height: 100%; object-fit: cover; }
.soc-modal .soc-st { display: inline-flex; height: 20px; align-items: center; padding: 0 8px; border-radius: 999px; font-size: 11px; border: 1px solid var(--line); color: var(--muted); }

/* téléphone */
@media (max-width: 760px) {
  html body .app .soc .gr-bar.soc-bar:not(.open) > select { display: block; flex: 1 1 calc(50% - 8px); max-width: none; }
  html body .app .soc .soc-seg { flex: 1 1 100%; }
  html body .app .soc .soc-seg button { flex: 1; }
  html body .app .soc-cols { grid-template-columns: 1fr; }
  html body .app .soc-lib { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html body .app .soc-cal.month .soc-day { min-height: 64px; padding: 3px; }
  html body .app .soc-cal.month .soc-ev { grid-template-columns: auto 1fr; padding: 2px 3px; }
  html body .app .soc-cal.month .soc-ev-th, html body .app .soc-cal.month .soc-ev-u, html body .app .soc-cal.month .soc-ev-c { display: none; }
  html body .app .soc-cal.week { grid-template-columns: 1fr; }
  html body .app .soc-cal.week .soc-cal-h { display: none; }
  html body .app .soc-cal.week .soc-day { min-height: 0; border-right: 0; }
  html body .app td.soc-acts { white-space: normal; }
  .soc-modal .soc-comp { grid-template-columns: 1fr; }
  .soc-modal .soc-phone { position: static; max-width: 240px; }
}

/* (18/11/2026) étapes 2 et 3 : photo du compte, mini-chiffres, configuration (dirigeant), brouillon TikTok, statistiques */
html body .app .soc-av { overflow: hidden; position: relative; }
html body .app .soc-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; background: var(--surface-3); }
html body .app .soc-st.inbox { color: #3dd68c; border-color: color-mix(in srgb, #3dd68c 25%, var(--line)); border-style: dashed; }
html body .app .soc-mini { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0 4px; }
html body .app .soc-mini span { display: flex; flex-direction: column; min-width: 64px; }
html body .app .soc-mini b { font-size: 16px; font-weight: 650; color: var(--fg); font-variant-numeric: tabular-nums; }
html body .app .soc-mini small { color: var(--muted); font-size: 11.5px; }
html body .app .soc-cfg { margin-top: 14px; }
html body .app .soc-cfg summary { cursor: pointer; list-style: revert; }
html body .app .soc-cfg p { margin: 8px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
html body .app .soc-cfg-r { display: grid; grid-template-columns: minmax(0, 210px) minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
html body .app .soc-cfg-r small { color: var(--muted); }
html body .app .soc-cfg-r code { font-size: 12px; overflow-wrap: anywhere; color: var(--fg); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
@media (max-width: 640px) { html body .app .soc-cfg-r { grid-template-columns: minmax(0, 1fr) auto; } html body .app .soc-cfg-r small { grid-column: 1 / -1; } }
html body .app .soc-spark { width: 120px; height: 28px; color: var(--accent); display: block; }
.soc-modal .soc-tt-who { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; font-size: 13px; }
.soc-modal .soc-tt-who img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
