/* ============================================================================
   HOME SOCIALE V4 (/accueil) — fil, filtres, actions rapides, widgets, lightbox.
   Échelle compacte (texte 12-13px, méta 11px) alignée sur les cartes news.
   S'appuie sur les tokens de v4.css et l'identité de base.css. Dark hérité.
   ============================================================================ */

/* Un display:* explicite écrase l'attribut hidden — on le restaure. */
#v4Feed [hidden], .v4-lightbox[hidden] { display: none !important; }

/* ── Actions rapides ─────────────────── */
.v4-quick {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--v4-surface);
  border: 1px solid var(--v4-border);
  border-radius: var(--v4-radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.v4-quick-btns {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
.v4-quick-btns a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: var(--v4-radius-sm);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
  white-space: nowrap;
}
.v4-quick-btns a.v4-quick-btn-add-game {
  background: var(--blue-light);
  color: var(--blue-mid);
  border: 1px solid rgba(43, 91, 168, 0.16);
}
.v4-quick-btns a.v4-quick-btn-add-game:hover {
  background: #dbe8ff;
  color: var(--blue-mid);
}
.v4-quick-btns a:hover { background: var(--gray-100); color: var(--text); }
.v4-quick-btns i { font-size: 17px; }

/* Bandeau invité */
.v4-guest-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  margin-bottom: 14px;
  border-radius: var(--v4-radius);
  background: var(--blue-light);
  border: 1px solid color-mix(in srgb, var(--blue) 25%, transparent);
  font-size: 13px;
}
.v4-guest-banner .ph-sparkle { color: var(--blue); font-size: 18px; }
.v4-guest-banner span { flex: 1; }

/* ── Barre de filtres (sticky sous la topbar) ───────────── */
.v4-feedbar {
  position: sticky;
  top: calc(var(--v4-topbar-h) + 8px);
  z-index: 40;
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: var(--v4-radius);
  background: color-mix(in srgb, var(--v4-surface) 80%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--v4-border);
  box-shadow: var(--shadow-sm);
}
.v4-feedbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.v4-audience {
  display: flex;
  gap: 3px;
  background: var(--gray-100);
  border-radius: 999px;
  padding: 3px;
  flex-shrink: 0;
}
.v4-audience-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  transition: var(--transition);
  white-space: nowrap;
}
.v4-audience-btn:hover { color: var(--text); }
.v4-audience-btn.active { background: var(--blue); color: #fff; }
.v4-audience-btn.active i { color: #fff; }

/* Chips catégories : padding vertical réservé (overflow-x force overflow-y ;
   sans lui, le translateY du survol serait rogné — piège vécu sur le POC). */
.v4-cats {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 3px 0;
  flex: 1;
  min-width: 0;
}
.v4-cats::-webkit-scrollbar { display: none; }
.v4-cat {
  --cat-color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1.5px solid color-mix(in srgb, var(--cat-color) 35%, transparent);
  background: var(--v4-surface);
  color: var(--cat-color);
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.v4-cat i { color: var(--cat-color); font-size: 14px; }
.v4-cat:hover { border-color: var(--cat-color); transform: translateY(-1px); }
.v4-cat.active { background: var(--cat-color); border-color: var(--cat-color); color: #fff; }
.v4-cat.active i { color: #fff; }
.v4-cat--all      { --cat-color: #16a34a; }
.v4-cat--game_add { --cat-color: #16a34a; }
.v4-cat--news     { --cat-color: #2563eb; }
.v4-cat--photo    { --cat-color: #db2777; }
.v4-cat--review   { --cat-color: #7c3aed; }
.v4-cat--comments { --cat-color: #0891b2; }
.v4-cat--toplist  { --cat-color: #d97706; }

/* ── Pill nouveaux posts ────────────────────────────────── */
.v4-newposts {
  position: sticky;
  top: calc(var(--v4-topbar-h) + 64px);
  z-index: 39;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 auto 10px;
  border: none;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
}
.v4-newposts i { color: #fff; }
.v4-newposts:hover { background: var(--blue-flash); }

/* ── Cartes du fil ──────────────────────────────────────── */
.v4-feedlist { display: flex; flex-direction: column; gap: 12px; }
.v4-post {
  background: var(--v4-surface);
  border: 1px solid var(--v4-border);
  border-radius: var(--v4-radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.v4-post:hover { box-shadow: var(--shadow); }
.v4-post--enter { animation: v4PostIn 0.3s ease; }
@keyframes v4PostIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Masquage « Moi » */
#v4Feed.v4-hide-own .v4-post[data-mine="1"] { display: none; }

/* Header */
.v4-post-head { display: flex; align-items: center; gap: 10px; }
.v4-post-avatar-wrap { position: relative; flex-shrink: 0; }
.v4-post-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.v4-post-online {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--v4-surface);
}
.v4-post-headmain { flex: 1; min-width: 0; }
.v4-post-headline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 12px;
  line-height: 1.35;
}
.v4-post-user { font-weight: 700; color: var(--pseudo); }
.v4-post-user:hover { text-decoration: underline; }
.v4-post-user.pseudo-pro { color: var(--pseudo-pro); }
.v4-post-action { color: var(--text-muted); }
.v4-post-action strong { color: var(--text); }
.v4-post-time { display: block; font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* Chip type — couleur par variante de carte */
.v4-post-chip {
  --chip-color: var(--blue);
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--chip-color) 12%, transparent);
}
.v4-post-chip i { color: var(--chip-color); font-size: 14px; }
.v4-post--game    .v4-post-chip { --chip-color: #16a34a; }
.v4-post--photo   .v4-post-chip { --chip-color: #db2777; }
.v4-post--review  .v4-post-chip { --chip-color: #7c3aed; }
.v4-post--comment .v4-post-chip { --chip-color: #0891b2; }
.v4-post--news    .v4-post-chip { --chip-color: #2563eb; }
.v4-post--toplist .v4-post-chip { --chip-color: #d97706; }
.v4-post--newuser .v4-post-chip { --chip-color: #f5c518; }

/* Corps */
.v4-post-body { margin-top: 10px; }
.v4-post-text {
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-line;
  word-break: break-word;
  margin: 0 0 8px;
}
.v4-post-text:last-child { margin-bottom: 0; }
.v4-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.v4-clamp.expanded { -webkit-line-clamp: unset; }
.v4-expand {
  border: none;
  background: none;
  color: var(--blue);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 0 0;
}
.v4-expand:hover { text-decoration: underline; }

/* game_add / toplist */
.v4-post-game { display: flex; gap: 12px; }
.v4-post-jaqlink { flex-shrink: 0; }
.v4-post-jaq {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: var(--v4-radius-sm);
  background: var(--gray-100);
  padding: 4px;
  transition: transform var(--transition);
}
.v4-post-jaqlink:hover .v4-post-jaq { transform: scale(1.05); }
.v4-post-gameinfo { flex: 1; min-width: 0; }
.v4-post-gametitle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 7px;
}
.v4-post-gamename { font-weight: 800; font-size: 13px; color: var(--game-name); }
a.v4-post-gamename:hover, a .v4-post-gamename:hover { text-decoration: underline; }
.v4-post-itemtype { font-size: 10px; }
.v4-post-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}
.v4-post-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--gray-100);
  padding: 3px 8px;
  border-radius: 999px;
}
.v4-post-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted);
  background: var(--gray-100);
  padding: 6px 9px;
  border-radius: var(--v4-radius-sm);
}

/* Photos */
.v4-post-photobtn {
  display: block;
  width: 100%;
  border: none;
  background: none;
  padding: 0;
  border-radius: var(--v4-radius);
  overflow: hidden;
  cursor: zoom-in;
}
.v4-post-photo {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--v4-radius);
  transition: transform 0.3s ease;
}
.v4-post-photobtn:hover .v4-post-photo { transform: scale(1.015); }

/* Contexte (avis, commentaires) */
.v4-post-ctx {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: var(--v4-radius-sm);
  background: var(--gray-100);
  margin-bottom: 9px;
  transition: var(--transition);
}
.v4-post-ctx:hover { background: var(--gray-200); }
.v4-post-ctx:last-child { margin-bottom: 0; }
.v4-post-ctx-jaq {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 6px;
  background: var(--v4-surface);
  flex-shrink: 0;
}
.v4-post-ctx-thumb {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.v4-post-ctx-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.v4-post-ctx-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  min-width: 0;
}
.v4-post-ctx-label > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v4-post-quote {
  margin: 0 0 9px;
  padding: 7px 11px;
  border-left: 3px solid #0891b2;
  background: var(--gray-100);
  border-radius: 0 var(--v4-radius-sm) var(--v4-radius-sm) 0;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
}

/* News */
.v4-post-newstype { margin-bottom: 7px; }
.v4-post-newstitle {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
}
.v4-post-newstitle:hover { color: var(--blue); }
.v4-post-newsimg {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--v4-radius);
  margin-bottom: 9px;
}
.v4-post-newsbody { font-size: 12px; line-height: 1.5; word-break: break-word; }
.v4-post-newsbody.v4-clamp { -webkit-line-clamp: 5; }
.v4-post-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
}
.v4-post-more:hover { text-decoration: underline; }
.v4-post-more i { color: var(--blue); }

/* Toplistes */
.v4-post-toplist {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
}
.v4-post-medal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--text-muted);
}
.v4-post-medal--1 { background: #f5c51826; color: #b45309; }
.v4-post-medal--1 i { color: #f5c518; }
.v4-post-medal--2 { background: #c0c0c02e; color: #6b7280; }
.v4-post-medal--2 i { color: #9ca3af; }
.v4-post-medal--3 { background: #cd7f3226; color: #92400e; }
.v4-post-medal--3 i { color: #cd7f32; }
.v4-post-toplistname { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }

/* Nouveau membre */
.v4-post-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--v4-radius-sm);
  background: linear-gradient(120deg,
    color-mix(in srgb, #f5c518 10%, var(--v4-surface)),
    color-mix(in srgb, var(--blue) 8%, var(--v4-surface)));
}
.v4-post-welcomemsg {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}
.v4-post-welcomemsg i { color: #f5c518; font-size: 18px; }

/* Footer : réactions + commentaires */
.v4-post-foot {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.v4-post-foot .v4-post-comments { flex-basis: 100%; }

/* Réactions */
.v4-react-wrap { position: relative; display: flex; align-items: center; gap: 6px; }
.v4-react-btn .v4-react-current { font-size: 15px; line-height: 1; display: inline-flex; }
.v4-react-btn .v4-react-current i { font-size: 15px; }
.v4-react-btn--on { color: var(--blue); font-weight: 700; }
.v4-react-picker {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 60;
  display: flex;
  gap: 2px;
  background: var(--v4-surface);
  border: 1px solid var(--v4-border);
  border-radius: 999px;
  padding: 4px 6px;
  box-shadow: var(--shadow-lg);
  animation: v4PostIn 0.15s ease;
}
.v4-react-pick {
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.12s ease, background var(--transition);
}
.v4-react-pick:hover { transform: scale(1.3) translateY(-2px); }
.v4-react-pick.active { background: var(--blue-light); }
.v4-react-summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 999px;
}
.v4-react-emojis { font-size: 12px; letter-spacing: -2px; }
.v4-post-actionbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  transition: var(--transition);
}
.v4-post-actionbtn:hover { background: var(--gray-100); color: #0891b2; }
.v4-post-actionbtn i { font-size: 15px; }
.v4-post-comments { margin-top: 9px; }
.v4-comments-list { display: flex; flex-direction: column; gap: 4px; }
.v4-comments-loading { padding: 8px 0; color: var(--text-muted); }
.v4-comments-loading i { animation: v4Spin 0.8s linear infinite; display: inline-block; font-size: 16px; }
@keyframes v4Spin { to { transform: rotate(360deg); } }
.v4-comments-list .photo-comment { padding: 6px 0; }
.v4-comment-form { display: flex; gap: 8px; margin-top: 8px; }
.v4-comment-input { flex: 1; font-size: 13px; }
.v4-comment-send { flex-shrink: 0; }
.v4-comment-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
}
.v4-comment-login:hover { text-decoration: underline; }

/* ── Skeletons ──────────────────────────────────────────── */
.v4-skeletons { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.v4-skel {
  background: var(--v4-surface);
  border: 1px solid var(--v4-border);
  border-radius: var(--v4-radius);
  padding: 12px 14px;
}
.v4-skel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.v4-skel-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.v4-skel-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.v4-skel-line { height: 10px; border-radius: 5px; }
.v4-skel-body { height: 76px; border-radius: var(--v4-radius-sm); }
.v4-shimmer {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 400% 100%;
  animation: v4Shimmer 1.4s ease infinite;
}
@keyframes v4Shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* ── États vide / fin ───────────────────────────────────── */
.v4-feedempty { text-align: center; padding: 44px 16px; color: var(--text-muted); }
.v4-feedempty i { font-size: 38px; display: block; margin-bottom: 10px; color: var(--gray-400); }
.v4-feedempty p { font-size: 13.5px; }
.v4-feedend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}
#v4Sentinel { height: 1px; }

/* ── Widgets spécifiques accueil ────────────────────────── */
.v4-widget-empty { font-size: 12.5px; color: var(--text-muted); }
.v4-widget-newsicon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gray-100);
  font-size: 15px;
}
.v4-w-pro { color: var(--pseudo-pro) !important; }

/* ── Lightbox ───────────────────────────────────────────── */
.v4-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 12, 22, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
}
.v4-lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--v4-radius-sm);
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.6);
}
.v4-lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.v4-lightbox-close:hover { background: rgba(255, 255, 255, 0.24); }
.v4-lightbox-close i { color: #fff; font-size: 20px; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .v4-quick { padding: 10px 12px; }
  .v4-quick-btns { width: 100%; justify-content: center; }
  .v4-quick-btns a span { display: none; }
  .v4-quick-btns a { padding: 8px 14px; }
  .v4-quick-btns i { font-size: 20px; }
  .v4-post { padding: 11px 12px; }
  .v4-post-jaq { width: 56px; height: 56px; }
  .v4-post-photo { max-height: 330px; }
}
