/* Communication — un tableau par client (intègre SocialColony). Lisible d'abord : cartes pleines, contrastes francs. */
html[data-wide] #app { max-width: 1240px; }
.com { --c1: var(--deep); --c2: var(--navy); --c3: var(--accent); --soft: #F4F8FC;
  --li: #0A66C2; --ig: #D62976; --fb: #1877F2; --bl: #2F855A; --html: #6B5B95;
  display: flex; flex-direction: column; gap: 16px; color: var(--ink); }
.com * { box-sizing: border-box; }
.com .card { background: var(--paper); border-radius: 16px; padding: 14px 16px; box-shadow: 0 8px 24px rgba(20, 40, 60, .08), 0 1px 2px rgba(20, 40, 60, .05); }
.com h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; font-weight: 800; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.com h2 .n { background: var(--c3); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 12px; letter-spacing: 0; }
.com .muted { color: var(--muted); }
.com .grid { display: grid; gap: 16px; align-items: start; }
.com .g2 { grid-template-columns: 1.4fr 1fr; }
.com .g3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .com .g2, .com .g3 { grid-template-columns: 1fr; } }

/* en-tête */
.com-hero { background: var(--c2); color: #fff; border-radius: 18px; padding: 16px 20px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; position: relative; overflow: hidden; }
.com-hero .logo { width: 64px; height: 64px; border-radius: 16px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; z-index: 1; }
.com-hero .logo img { max-width: 52px; max-height: 52px; }
.com-hero .who { flex: 1; min-width: 220px; z-index: 1; }
.com-hero h1 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.com-hero .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.12); color: #fff; }
.pill.ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; }
.pill.ko::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #F87171; }
.pill.kw { background: var(--c3); }
.com-hero .actions { z-index: 1; display: flex; gap: 8px; }
.cbtn { appearance: none; border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 700; cursor: pointer; font-size: 13px; background: #eef2f6; color: var(--ink); }
.cbtn.pri { background: var(--c3); color: var(--ink); }
.cbtn.blue { background: var(--c1); color: #fff; }
.cbtn.ghost { background: none; color: var(--muted); }
.cbtn.sm { padding: 7px 12px; font-size: 13px; }
.cbtn:focus-visible { outline: 3px solid var(--c1); outline-offset: 2px; }

/* compteurs */
.kpis4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 700px) { .kpis4 { grid-template-columns: repeat(2, 1fr); } }
.kpi4 { background: var(--paper); border-radius: 16px; padding: 14px 16px; box-shadow: 0 4px 14px rgba(20, 40, 60, .06); }
.kpi4 b { display: block; font-size: 23px; line-height: 1; letter-spacing: -.02em; }
.kpi4 small { color: var(--muted); font-weight: 600; }
.kpi4 .bar { height: 6px; background: #ece7dc; border-radius: 999px; margin-top: 10px; overflow: hidden; }
.kpi4 .bar i { display: block; height: 100%; background: var(--c1); border-radius: 999px; }
.kpi4.warn .bar i { background: var(--c3); }
.kpi4.good .bar i { background: #3f8f6a; }

/* plan */
.plan-but { font-size: 16px; font-weight: 700; line-height: 1.35; margin: 0 0 8px; }
.badge { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: #FFF1E2; color: #A84E00; }
.badge.ok { background: #E3F6EC; color: #17663f; }
.timeline-bar { position: relative; height: 10px; background: #ece7dc; border-radius: 999px; margin: 14px 0 6px; }
.timeline-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--c1), #6aa8f5); border-radius: 999px; }
.timeline-bar .ev { position: absolute; top: -4px; width: 4px; height: 18px; background: var(--c3); border-radius: 2px; }
.dates { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); font-weight: 600; }
.piliers { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.pilier { display: grid; grid-template-columns: 130px 1fr 40px; gap: 10px; align-items: center; font-size: 14px; }
.pilier .t { height: 10px; border-radius: 999px; background: #ece7dc; overflow: hidden; }
.pilier .t i { display: block; height: 100%; border-radius: 999px; }
.indic { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.indic li { font-size: 14px; display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed #e3ddd1; padding-bottom: 6px; }

/* à valider */
.valid { display: grid; gap: 12px; }
.vitem { display: grid; grid-template-columns: 120px 1fr; gap: 14px; border: 1px solid #e6e0d4; border-radius: 14px; padding: 12px; }
.vitem .thumb { width: 120px; aspect-ratio: 4 / 5; border-radius: 10px; background: var(--soft); background-size: cover; background-position: center; display: grid; place-items: center; text-align: center; font-size: 12px; color: var(--muted); padding: 6px; }
.vitem .head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); font-weight: 600; }
.vitem h3 { margin: 6px 0 4px; font-size: 16px; }
.vitem p { margin: 0 0 10px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; max-height: 7.4em; overflow: hidden; }
.vitem .row3 { display: flex; gap: 8px; flex-wrap: wrap; }
.canal { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 9px 2px 3px; color: #fff; font-size: 12px; font-weight: 700; }
.canal .ic { width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; font-size: 10px; font-weight: 900; }
.canal.linkedin { background: var(--li); } .canal.instagram { background: var(--ig); } .canal.facebook { background: var(--fb); } .canal.blog { background: var(--bl); } .canal.site { background: var(--html); }
.st { border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; background: #ece7dc; color: #445; }
.st.a_valider { background: #FFF1E2; color: #A84E00; } .st.feu_vert, .st.programmee { background: #E3F6EC; color: #17663f; }
.st.retouche { background: #FDECEC; color: #a12a2a; } .st.publiee { background: #E6EEFB; color: #1B57A8; } .st.refusee { background: #eee; color: #777; text-decoration: line-through; }

/* calendrier */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head b { font-size: 17px; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .dow { font-size: 11px; font-weight: 800; color: #8a98a1; text-transform: uppercase; text-align: center; padding: 4px 0; }
.cal .cday { min-width: 0; min-height: 92px; border-radius: 10px; background: #f7f9fb; padding: 5px; display: flex; flex-direction: column; gap: 3px; }
.cal .cday.out { opacity: .4; }
.cal .cday.today { outline: 2px solid var(--c1); background: #fff; }
.cal .cday .d { font-size: 12px; font-weight: 800; color: var(--muted); display: flex; justify-content: space-between; }
.cal .cday .d .evd { color: var(--c3); font-size: 10px; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .chip2 { max-width: 100%; display: block; border: 0; text-align: left; border-radius: 6px; padding: 3px 6px; font-size: 11px; font-weight: 700; color: #fff; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .chip2.linkedin { background: var(--li); } .cal .chip2.instagram { background: var(--ig); } .cal .chip2.facebook { background: var(--fb); } .cal .chip2.blog { background: var(--bl); } .cal .chip2.site { background: var(--html); }
.cal .chip2.idee { opacity: .55; }
.weeks { display: grid; gap: 4px; margin-top: 10px; font-size: 12px; color: var(--muted); }
@media (max-width: 700px) { .cal .cday { min-height: 64px; } .cal .chip2 { font-size: 0; height: 8px; padding: 0; } }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--k); }

/* grille instagram */
.igrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 12px; overflow: hidden; }
.igrid .cell { aspect-ratio: 4 / 5; background: var(--soft); background-size: cover; background-position: center; border: 0; padding: 8px; display: flex; align-items: flex-end; font-size: 11px; font-weight: 700; color: var(--ink); text-align: left; cursor: pointer; position: relative; }
.igrid .cell.idee { background: repeating-linear-gradient(135deg, #f1f5f9 0 8px, #e8eef4 8px 16px); color: var(--muted); }
.igrid .cell .date { position: absolute; top: 6px; left: 6px; background: rgba(255,255,255,.9); border-radius: 5px; padding: 1px 5px; font-size: 10px; }

/* événements, débat, demandes */
.evs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.evs li { display: grid; grid-template-columns: 58px 1fr; gap: 10px; align-items: start; }
.evs .when { background: #FFF1E2; color: #A84E00; border-radius: 10px; text-align: center; padding: 6px 2px; font-weight: 800; font-size: 12px; line-height: 1.15; }
.evs .when b { display: block; font-size: 19px; }
.evs .what b { display: block; font-size: 14px; }
.evs .what span { font-size: 13px; color: var(--muted); }
.evs a { color: var(--c1); font-size: 12px; }
.debat { display: grid; gap: 8px; }
.idea { border-radius: 12px; padding: 10px 12px; border: 1px solid #e6e0d4; font-size: 14px; }
.idea.in { background: #F3FBF7; border-color: #CDEBDC; } .idea.out { background: #F7F8FA; opacity: .85; }
.idea .who { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.idea .pc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; font-size: 13px; }
.idea .pc div { background: #f7f9fb; border-radius: 8px; padding: 6px 8px; }
.idea .why { margin-top: 6px; font-size: 13px; font-style: italic; color: #445; }
.tabs2 { display: flex; gap: 6px; margin-bottom: 10px; }
.tabs2 button { border: 1px solid #ddd6c8; background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }
.tabs2 button.on { background: var(--c2); color: #fff; border-color: transparent; }
.dem { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dem li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid #ece7dc; padding-bottom: 8px; font-size: 14px; }

/* fenêtre */
.modal-bg { position: fixed; inset: 0; background: rgba(13, 32, 51, .55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 20px; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 22px; color: var(--ink); }
.modal h3 { margin: 0 0 12px; font-size: 20px; }
.modal label { display: block; font-weight: 700; font-size: 14px; margin: 12px 0 6px; }
.modal input, .modal select, .modal textarea { width: 100%; border: 1px solid #d9d2c4; border-radius: 10px; padding: 10px 12px; font-size: 15px; background: #fff; }
.modal textarea { min-height: 90px; }
.modal .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.preview-post { border: 1px solid #e3ddd1; border-radius: 14px; overflow: hidden; }
.preview-post .ph { display: flex; gap: 10px; align-items: center; padding: 10px 12px; font-weight: 700; font-size: 14px; }
.preview-post .ph i { width: 34px; height: 34px; border-radius: 50%; background: var(--c1); display: block; }
.preview-post img { width: 100%; display: block; }
.preview-post .tx { padding: 10px 12px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.note-box { background: #FDECEC; color: #7a1f1f; border-radius: 10px; padding: 8px 10px; font-size: 13px; margin-top: 8px; }

/* liste des clients */
.com-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.com-list button { text-align: left; border: 0; cursor: pointer; }
@media (max-width: 520px) {
  .vitem { grid-template-columns: 84px 1fr; gap: 10px; }
  .vitem .thumb { width: 84px; }
  .vitem .row3 .cbtn.sm { padding: 6px 10px; }
  .com-hero h1 { font-size: 22px; }
  .pilier { grid-template-columns: 96px 1fr 36px; }
}
.modal.com > * { flex-shrink: 0; }
.modal { display: block; } .modal.com { gap: 0; } .modal .preview-post { margin-top: 12px; }

/* ---- navigation des vues ---- */
.com-nav { display: flex; gap: 6px; flex-wrap: wrap; background: var(--paper); border-radius: 14px; padding: 6px; box-shadow: 0 4px 14px rgba(20, 40, 60, .06); }
.com-nav button { border: 0; background: none; border-radius: 10px; padding: 7px 12px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }
.com-nav button:hover { background: #f4f0e8; color: var(--ink); }
.com-nav button.on { background: var(--c2); color: #fff; }
.com-nav button:last-child { margin-left: auto; }

/* ---- Atelier ---- */
.at-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.at-head .grow { flex: 1; min-width: 280px; }
.at-nav { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; font-size: 13px; }
.at-title { width: 100%; font-size: 18px; font-weight: 800; border: 0; border-bottom: 2px solid transparent; padding: 4px 0; background: none; letter-spacing: -.01em; }
.at-title:focus { outline: none; border-bottom-color: var(--c1); }
.small2 { font-size: 13px; display: flex; gap: 8px; margin-top: 6px; }
.at-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.at-grid { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .at-grid { grid-template-columns: 1fr; } }
.at-stage { display: grid; gap: 12px; }
.netabs { display: flex; gap: 6px; flex-wrap: wrap; }
.netabs button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #ddd6c8; background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; cursor: pointer; }
.netabs button.on { background: var(--c2); color: #fff; border-color: transparent; }
.netdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.seg { display: inline-flex; background: #ece7dc; border-radius: 10px; padding: 3px; gap: 2px; width: fit-content; }
.seg button { border: 0; background: none; border-radius: 8px; padding: 6px 12px; font-weight: 700; font-size: 13px; cursor: pointer; color: #4a5a64; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.pv-wrap { background: #ece7dc; border-radius: 18px; padding: 28px; display: grid; place-items: center; }
.pv { background: #fff; border-radius: 12px; width: min(500px, 100%); box-shadow: 0 6px 20px rgba(20, 40, 60, .10); overflow: hidden; }
.pv-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; }
.pv-head .grow { flex: 1; display: grid; }
.pv-head small { color: var(--muted); font-size: 12px; }
.pv-av { width: 38px; height: 38px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 800; }
.pv-net { color: #fff; border-radius: 6px; padding: 2px 7px; font-size: 11px; font-weight: 900; }
.pv-title { padding: 0 14px 6px; font-weight: 800; font-size: 16px; }
.pv-text { padding: 4px 14px 14px; white-space: pre-wrap; line-height: 1.5; font-size: 14px; }
.pv-media img, .pv-media video { width: 100%; display: block; }
.pv-media.sq { aspect-ratio: 4 / 5; background: #f4f0e8; display: grid; place-items: center; color: #a12a2a; font-weight: 700; overflow: hidden; }
.pv-media.sq img, .pv-media.sq video { height: 100%; object-fit: cover; }
.pv.net-instagram .pv-text { padding-top: 12px; }
.pv-link { margin: 0 14px 14px; border: 1px solid #e3ddd1; border-radius: 8px; padding: 8px 10px; font-size: 13px; color: var(--muted); }
.chk { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.chk li { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.chk .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 12px; flex: none; }
.chk .warn .ic { background: #FFF1E2; color: #A84E00; }
.chk .ok .ic { background: #E3F6EC; color: #17663f; }
.at-edit { display: grid; gap: 8px; }
.at-edit label { font-weight: 800; font-size: 13px; color: var(--ink); margin-top: 8px; display: flex; justify-content: space-between; align-items: center; }
.at-edit textarea, .at-edit input, .at-edit select { width: 100%; border: 1px solid #d9d2c4; border-radius: 10px; padding: 10px 12px; font-size: 14px; background: #fff; }
.at-edit textarea { resize: vertical; line-height: 1.5; }
.vbox { display: grid; gap: 6px; background: #f7f3ec; border-radius: 12px; padding: 10px 12px 12px; }
.cnt { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--muted); }
.cnt .ko { color: #c0392b; }
.link2 { border: 0; background: none; color: var(--c1); font-weight: 700; cursor: pointer; font-size: 13px; padding: 0; }
.mthumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.mt { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; position: relative; background: #f4f0e8; }
.mt img, .mt video { width: 100%; height: 100%; object-fit: cover; }
.mt .rm, .mt .mv { position: absolute; top: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(13, 32, 51, .75); color: #fff; cursor: pointer; font-weight: 800; line-height: 1; }
.mt .rm { right: 4px; }
.mt .mv { left: 4px; }
.mt.add { display: grid; place-items: center; font-size: 28px; color: var(--muted); border: 2px dashed #cfd8df; background: #fff; cursor: pointer; }
.hidden-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.chips2 { display: flex; gap: 6px; flex-wrap: wrap; }
.chip3 { display: inline-flex; gap: 6px; align-items: center; border: 1px solid #ddd6c8; background: #fff; border-radius: 999px; padding: 6px 11px; font-size: 13px; font-weight: 700; cursor: pointer; }
.chip3.on { background: #eef4f0; border-color: var(--c1); color: #2c4a3b; }
.chip3.off { opacity: .55; }
.g2f { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.note-box.info { background: #eef4f0; color: #2c4a3b; }

/* ---- Médiathèque ---- */
.mt-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dropzone { display: grid; place-items: center; gap: 4px; text-align: center; border: 2px dashed #cfd8df; border-radius: 14px; padding: 22px; cursor: pointer; background: #faf7f1; position: relative; margin-bottom: 16px; }
.dropzone b { font-size: 16px; }
.dropzone span { color: var(--muted); font-size: 13px; }
.dropzone.over, .dropzone:hover { border-color: var(--c1); background: #eef4f0; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.mgrid.pick { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); max-height: 60vh; overflow: auto; }
.mcard { display: grid; gap: 4px; border: 1px solid #e6e0d4; border-radius: 12px; padding: 8px; background: #fff; text-align: left; font-size: 13px; }
button.mcard { cursor: pointer; }
button.mcard.sel { outline: 3px solid var(--c1); }
.mcard img, .mcard video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; background: #f4f0e8; }
.mcard .pic { position: relative; }
.mcard .kind { position: absolute; left: 6px; top: 6px; background: rgba(255, 255, 255, .92); border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 800; }
.mcard .rm { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(13, 32, 51, .75); color: #fff; cursor: pointer; font-weight: 800; }
.used { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; }
.used a { color: var(--c1); }
.ltab { width: 100%; border-collapse: collapse; font-size: 14px; }
.ltab th, .ltab td { padding: 8px; border-bottom: 1px solid #ece7dc; text-align: center; }
.ltab td:first-child, .ltab th:first-child { text-align: left; }
