/* zsocial.css — onglets Amis, Messages, Fil, Missions de Mon compte (039 · 23/10/2026). Mobile d'abord. */
.zs-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--z-line); min-width: 0; }
.zs-row:last-child { border-bottom: 0; }
.zs-who { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; min-height: 44px; }
.zs-who:disabled { cursor: default; }
.zs-av { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font-weight: 900; color: #fff; font-size: 17px;
  background: linear-gradient(145deg, hsl(var(--h, 160) 55% 42%), hsl(var(--h, 160) 60% 24%)); border: 2px solid rgba(255,255,255,.25); }
.zs-av img { width: 100%; height: 100%; object-fit: cover; }
.zs-av.big { width: 84px; height: 84px; font-size: 34px; }
.zs-dot { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--z-acc); border: 2px solid var(--z-panel); }
.zs-name { min-width: 0; }
.zs-name b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zs-name small { display: block; color: var(--z-mut); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zs-acts { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.zs-acts .z-btn, .zs-btn { min-height: 40px; }
.zs-h { margin: 18px 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--z-mut); }
.zs-empty { color: var(--z-mut); font-size: 14px; padding: 8px 0; }
.zs-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--z-red); color: #fff; font-size: 11px; font-weight: 900; line-height: 1; }
.zs-badge[hidden] { display: none; }
.zs-search { position: relative; }
.zs-search .z-input { padding-left: 38px; }
.zs-search::before { content: "🔎"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 15px; opacity: .8; pointer-events: none; }
.zs-note { font-size: 12.5px; color: var(--z-mut); margin: 6px 0 0; }

/* messages : liste + conversation (côte à côte à partir de 768 px) */
.zs-dm { display: grid; gap: 12px; }
.zs-dm-list .zs-row { cursor: pointer; }
.zs-dm-last { color: var(--z-mut); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zs-thread { display: flex; flex-direction: column; min-height: 320px; max-height: calc(100dvh - 160px); scroll-margin-top: 76px; }
.zs-thread[hidden] { display: none; }
.zs-thread-head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--z-line); }
.zs-back { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--z-line); background: transparent; color: var(--z-text); font-size: 20px; cursor: pointer; }
.zs-msgs { flex: 1; overflow-y: auto; padding: 10px 2px; display: flex; flex-direction: column; gap: 6px; overscroll-behavior: contain; }
.zs-msg { max-width: 82%; padding: 8px 12px; border-radius: 14px; background: var(--z-panel-2); font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; align-self: flex-start; }
.zs-msg.me { align-self: flex-end; background: rgba(53,255,193,.16); border: 1px solid rgba(53,255,193,.35); }
.zs-msg time { display: block; font-size: 10.5px; color: var(--z-mut); margin-top: 3px; text-align: right; }
.zs-compose { display: flex; gap: 8px; padding-top: 8px; border-top: 1px solid var(--z-line); }
.zs-compose textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; }
.zs-compose .z-btn { min-height: 44px; flex: none; }
.zs-locked { padding: 10px 12px; border-radius: 10px; background: rgba(255,198,26,.08); border-left: 3px solid var(--z-gold); font-size: 13px; color: var(--z-text); }
@media (min-width: 768px) {
  .zs-dm.open { grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); }
  .zs-dm.open .zs-back { display: none; }
}
@media (max-width: 767px) { .zs-dm.open .zs-dm-list { display: none; } }

/* fil d'actualité */
.zs-post { padding: 12px 0; border-bottom: 1px solid var(--z-line); }
.zs-post:last-child { border-bottom: 0; }
.zs-post.pinned { border-left: 3px solid var(--z-gold); padding-left: 10px; }
.zs-post-head { display: flex; align-items: center; gap: 10px; }
.zs-post-head .zs-who { min-height: 40px; }
.zs-post-txt { margin: 8px 0 0 50px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.45; }
.zs-post-txt a { color: var(--z-acc); display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.zs-post-bar { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 0 50px; }
.zs-pill { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--z-line); background: transparent; color: var(--z-mut); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.zs-pill.on { color: var(--z-red); border-color: var(--z-red); }
.zs-pill:hover { color: var(--z-text); }
.zs-comments { margin: 8px 0 0 50px; display: grid; gap: 6px; }
.zs-comment { font-size: 13.5px; background: var(--z-bg-2); border-radius: 10px; padding: 6px 10px; overflow-wrap: anywhere; }
.zs-comment b { margin-right: 6px; }
.zs-receipt { margin: 8px 0 0 50px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--z-gold); background: rgba(255,198,26,.06); font-size: 13.5px; }
@media (pointer: coarse) { .zs-pill { min-height: 44px; } .zs-acts .z-btn, .zs-btn { min-height: 44px; } }
@media (max-width: 479px) { .zs-post-txt, .zs-post-bar, .zs-comments, .zs-receipt { margin-left: 0; } }

/* missions */
.zs-mission { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--z-line); }
.zs-mission:last-child { border-bottom: 0; }
.zs-mission b { overflow-wrap: anywhere; }
.zs-bar { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--z-bg-2); overflow: hidden; border: 1px solid var(--z-line); }
.zs-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--z-acc), var(--z-acc-2)); }
.zs-reward { color: var(--z-gold); font-weight: 800; font-size: 13px; }

/* fenêtre profil / signalement : plein écran sur mobile, centrée sur PC */
.zs-modal-back { position: fixed; inset: 0; z-index: 9500; background: rgba(0,0,0,.72); display: grid; place-items: center; padding: 16px; }
.zs-modal-back[hidden] { display: none; }
.zs-modal { position: relative; width: 100%; max-width: 480px; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--z-panel); border: 1px solid var(--z-line); border-radius: 16px; padding: 20px; box-shadow: 0 16px 48px rgba(0,0,0,.5); }
.zs-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--z-text); font-size: 22px; cursor: pointer; }
.zs-prof-top { display: flex; gap: 16px; align-items: center; padding-right: 40px; }
.zs-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.zs-stats div { background: var(--z-bg-2); border-radius: 10px; padding: 8px; text-align: center; }
.zs-stats b { display: block; font-size: 18px; }
.zs-stats small { color: var(--z-mut); font-size: 11.5px; }
.zs-prof-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.zs-prof-acts .z-btn { min-height: 44px; flex: 1 1 140px; }
.zs-link { background: none; border: 0; color: var(--z-mut); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; min-height: 44px; padding: 0 6px; }
@media (max-width: 479px) {
  .zs-modal-back { padding: 0; }
  .zs-modal { max-width: none; height: 100dvh; max-height: none; border-radius: 0; border: 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
}
.zs-toggles label { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; cursor: pointer; }
.zs-toggles input[type=checkbox] { width: 20px; height: 20px; flex: none; accent-color: var(--z-acc); }
/* U13 : fenêtre profil à table (js/zprofile.js) — translucide, la table reste visible derrière */
.zs-modal-back.zs-glass { background: rgba(0,0,0,.35); }
.zs-glass .zs-modal { background: rgba(12,18,30,.9); border-color: rgba(255,255,255,.16); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--z-text, #eaf1ff); }
.zs-glass .zs-stats div { background: rgba(255,255,255,.07); }
.zs-full { flex: 1 1 100%; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
@media (max-width: 479px) { .zs-glass .zs-modal { height: auto; max-height: 100dvh; margin-top: auto; border-radius: 16px 16px 0 0; } .zs-modal-back.zs-glass { align-items: end; } }
