/* ==============================
   Posts — style flux
   ============================== */
:root{
  --post-bg: var(--surface, #fff);
  --post-border: var(--border, #e5e7eb);
  --post-text: var(--text, #0f1419);
  --post-muted: var(--muted, #536471);
  --post-accent: var(--accent, #1d9bf0);
  --post-danger: #f4212e;
  --post-radius: 16px;
}

/* carte */
.post {
    margin-bottom: 10px;
    padding: 16px 18px;
    padding-top: 5px;
    margin: 0px 0;
    background-color: transparent;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s;
}

.post:hover {
  background-color: #1f24273d;
}

.hr-post-bottom {border: none; border-bottom: 1px solid rgb(14 14 14);}

/* header */
.post-header{ display:flex; align-items:center; gap:9px;}
.post-avatar {
  position: relative;
  top: 10px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  box-shadow: 0px 0px 5px #1d9bf04f;
  object-fit: cover;
  flex: 0 0 auto;
}
.post-author{ font-weight:600; color: var(--post-text); line-height:1;}
.post-author a {text-decoration: none; color: #fff;font-size: 15px;font-weight: 600;}
.post-author a:hover {color: var(--post-accent);}
.post-meta{ font-size:13px; color: var(--post-muted); line-height:1;font-weight: 600;}

/* contenu */
.post-content {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  white-space: pre-wrap;
  font-size: 15px;
  margin: -8px 0 6px 21px;
  color: #fff;
  padding-left: 28px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  position: relative;
  font-weight: 600;
}

.post-content a{ color: var(--post-accent); text-decoration:none }
.post-content a:hover{ text-decoration: underline }

/* médias */
.post-media {
    display: grid;
    gap: 6px;
    margin-top: -4px;
    margin-left: 14px;
    padding-left: 33px;
    position: relative;
}
.post-media img{ width:100%; height:100%; object-fit:cover; display:block; border-radius: 10px!important; cursor: zoom-in; border: 1px solid var(--border);}

/* 1 */
.post-media.one{ grid-template-columns: 1fr }
.post-media.one img{ border-radius: 16px; max-height: 620px }
/* 2 */
.post-media.two{ grid-template-columns: 1fr 1fr }
/* 3 (grande à gauche) */
.post-media.three{
  grid-template-columns: 2fr 1.2fr; grid-template-rows: 1fr 1fr;
}
.post-media.three a:nth-child(1){ grid-row: 1 / span 2; grid-column: 1 }
.post-media.three a:nth-child(2){ grid-row: 1; grid-column: 2 }
.post-media.three a:nth-child(3){ grid-row: 2; grid-column: 2 }
/* 4 (2x2) */
.post-media.four{ grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr }

@media (hover:hover){
  .post-media a:hover img{
    filter: grayscale(20%);
    border: 2px solid var(--post-accent);
  }
}

/* (optionnel) actions */
.post-actions{
  display:flex; align-items:center; justify-content:space-between;
  margin-top: 10px; gap: 8px; color: var(--post-muted); user-select:none;
}
.post-actions .action{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px; border-radius: 999px; cursor:pointer;
  transition: background .18s ease, color .18s ease;
}
.post-actions .action:hover{ background: color-mix(in oklab, var(--post-text) 8%, transparent) }
.post-actions .count{ font-size:.9rem }
.action--reply:hover{ color: var(--post-accent) }
.action--repost:hover{ color: #17bf63 }
.action--like:hover{ color: var(--post-danger) }
.action--share:hover{ color: var(--post-accent) }


/* responsive */

@media (max-width: 420px){
  .post{ padding: 10px 12px }
  .post-avatar{ width:36px; height:36px }
  .post-media.one img{ max-height: 420px }
}

.post-header { position: relative; }
.post-actions-right { position:absolute; top:.5rem; right:.5rem; }

.post-menu-trigger {
    background: transparent;
    color: #808080;
    border: none;
    border-radius: 10px;
    padding: 4px 10px;
    line-height: 1.4;
    cursor: pointer;
    top: -5px;
    right: -7px;
}
.post-menu-trigger:hover { color: #fff; background-color: rgba(255, 255, 255, .12); }

.fa-flag:before {
    position: relative;
    top: 2px;
    content: "\f024";
}

.post-menu {
    position: absolute;
    min-width: 160px;
    background: #000;
    color: #fff;
    border: 2px solid #0f2235;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgb(0 0 0 / 78%);
    padding: 6px;
    z-index: 1;
    top: auto !important;
    left: auto !important;
    margin-top: -30px;
    margin-left: -120px;
}
.post-menu-item {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
  width:100%; text-align:left; background:transparent; color:#e7e7e7;
  border:0; border-radius: 5px; padding: 8px 10px; cursor:pointer;
  font-weight: 600;
  transition: all .2s;
}
.post-menu-item:hover { background: #1f24277a; }
.post-menu-item.danger { color: #ff8983; }
.post-menu-item.danger:hover { background: rgba(179,38,30,.18); color: #ff5951ff; }

.post-footer {
    margin-top: 10px;
    margin-left: 45px;
    margin-bottom: -5px;
    display: flex;
    justify-content: space-between;
}
.post-like, .post-repost, .post-comments, .post-share, .post-ai-btn {
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 6px 10px;
    font-weight: 600;
    font-size: 11px;
    border-radius: 999px;
    transition: all 0.2s;
}
.post-like:hover, .post-repost:hover, .post-comments:hover, .post-share:hover{ background:#333d4252; }
.post-like.is-liked {
    color: #ff5951;
    background-color: rgba(179, 38, 30, .18);
    border-color: #ff5951;
}
.post-like .like-count{ min-width:1ch; }

.post-ai-btn:hover {
  background: #333d4252;
}

.post-ai-btn:hover i {
  color: var(--accent);
  filter: drop-shadow(0 0 4px rgba(0, 174, 255, 0.562));
}

.follow-btn {font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";}

.pv-head, .pv-comments-header {font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";font-size: 13px;font-weight: 600;}

.pv-comment-inner .meta a {font-size: 13px; color: #fff;text-decoration: none;}

.pv-comment-inner .content {font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";font-size: 13px;font-weight: 600;}

.pv-post .post {border:none}

.post-share.is-cooling { transform: scale(0.98); opacity: .8; }

.token.mention.is-loading { opacity: .6; pointer-events: none; }
.token.mention.is-missing { opacity: .85; text-decoration: dotted underline; }

.hr-bottom-post {
  margin: 10px 0 10px;
  border: none;
  border-top: 1px solid #0f2235;
  display: none;
}

/* Animations d’apparition/disparition */
.vui, .vui-center{
  transition: opacity .22s ease, transform .22s ease;
}

/* Cache l’UI quand le conteneur est en état "ui-hidden" */
.pm-video-wrap.ui-hidden .vui{
  opacity: 0;
  pointer-events: none;
}

/* On masque aussi le gros bouton central quand caché (utile si vidéo en pause) */
.pm-video-wrap.ui-hidden .vui-center{
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.post:hover .post-content {
  border-color: #696969;
}

.post:hover .post-media {
  border-color: var(--post-accent);
}

.post-quote .post-content {
    margin: -6px 0 6px 11px;
    font-weight: 600;
    font-size: 14px;
}

.post-quote .pq-avatar {
    position: relative;
    top: 10px;
}

.ai-premium-btn {font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";font-size: 13px;}

span.pq-not-found {
  font-size: 13px;
  margin-top: 3px;
}

.post-quote .post-media {
    margin-left: 6px;
}
.post-quote {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    margin-top: 0px;
    font-weight: 600;
    margin-left: 44px;
    padding-top: 5px;
}