/* ============================================================
   SportPulse – Suivis Page CSS (mobile-first)
   Extends news.css styles with post-specific additions
   ============================================================ */

/* Import news base styles */
@import url('/css/news.css');

/* ─── User post cards ─────────────────────────────────────────── */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  margin-bottom: 12px;
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}

.post-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255,255,255,0.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}

/* Post type indicator */
.post-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.post-type-badge.user-post {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-3);
}

.post-type-badge.article-type {
  background: rgba(249,115,22,0.15);
  color: var(--primary-light);
}

/* Post header */
.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 8px;
}

.post-author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
}

.post-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-author-info {
  flex: 1;
  min-width: 0;
}

.post-author-name {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  cursor: pointer;
  transition: color var(--transition);
}

.post-author-name:hover { color: var(--primary); }

.post-author-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-4);
}

.post-author-sport {
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.post-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.follow-btn {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-family: 'Poppins', sans-serif;
}

.follow-btn:hover,
.follow-btn.following {
  background: var(--primary);
  color: white;
}

.follow-btn.following {
  border-color: transparent;
}

/* Post body */
.post-body {
  padding: 0 14px 10px;
}

.post-content {
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.6;
  margin-bottom: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.post-tag {
  font-size: 13px;
  color: var(--accent-light);
  cursor: pointer;
  transition: color var(--transition);
}

.post-tag:hover { color: var(--primary); }

.post-header { cursor: default; }
.post-gallery { cursor: default; }

/* Post footer */
.post-footer {
  padding: 8px 14px 12px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Social proof row */
.social-proof {
  padding: 6px 14px 0;
  font-size: 12px;
  color: var(--text-4);
  display: flex;
  align-items: center;
  gap: 4px;
}

.social-proof-avatars {
  display: flex;
}

.social-proof-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: 1px solid var(--bg-card);
  margin-left: -4px;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.social-proof-avatar:first-child { margin-left: 0; }

/* ─── Compose area (desktop top of feed) ──────────────────────── */
.compose-area {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 14px;
  margin-bottom: 14px;
  display: none;
}

.compose-inner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.compose-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

.compose-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.compose-input-fake {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-4);
  font-size: 14px;
  cursor: pointer;
  transition: border-color var(--transition);
}

.compose-input-fake:hover {
  border-color: rgba(255,255,255,0.15);
  color: var(--text-3);
}

/* ─── Compose post modal ──────────────────────────────────────── */
.compose-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.compose-modal-overlay.open {
  display: flex;
}

.compose-modal {
  background: var(--bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 1px solid var(--border);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.compose-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.compose-modal-title {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
}

.compose-modal-body {
  padding: 16px;
}

.compose-textarea {
  width: 100%;
  min-height: 120px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-1);
  font-size: 15px;
  font-family: inherit;
  padding: 12px 14px;
  resize: none;
  outline: none;
  transition: border-color var(--transition);
  line-height: 1.5;
}

.compose-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* contenteditable placeholder */
.compose-textarea:empty::before {
  content: attr(data-placeholder);
  color: var(--text-4);
  pointer-events: none;
}

/* @mention inline (orange pendant la frappe) */
.compose-textarea .mention-inline {
  color: #f97316;
  font-weight: 600;
}

/* Garde l'ancien selector pour compatibilité si jamais textarea */
.compose-textarea::placeholder { color: var(--text-4); }

.compose-char-count {
  font-size: 12px;
  color: var(--text-4);
  text-align: right;
  margin-top: 4px;
}

.compose-char-count.warning { color: var(--warning); }
.compose-char-count.danger { color: var(--error); }

.compose-sport-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.compose-sport-btn {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-3);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.compose-sport-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.compose-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.compose-actions-left {
  display: flex;
  gap: 6px;
}

.compose-tool-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all var(--transition);
}

.compose-tool-btn:hover {
  color: var(--text-1);
  background: var(--bg-card-hover);
}

.compose-post-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.compose-post-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--primary-glow-strong);
}

.compose-post-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ─── Disabled sport button ───────────────────────────────────── */
.compose-sport-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── Compose image preview ───────────────────────────────────── */
.compose-image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.compose-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.compose-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compose-preview-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  line-height: 1;
  padding: 0;
}

.compose-image-count {
  font-size: 12px;
  color: var(--text-4);
  align-self: center;
  margin-left: 4px;
}

/* ─── Post image gallery ──────────────────────────────────────── */
.post-gallery {
  display: grid;
  gap: 3px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 8px;
  cursor: pointer;
}

.post-gallery-1 { grid-template-columns: 1fr; }
.post-gallery-2 { grid-template-columns: 1fr 1fr; }
.post-gallery-3 { grid-template-columns: 1fr 1fr; }
.post-gallery-4 { grid-template-columns: 1fr 1fr; }
.post-gallery-5 { grid-template-columns: 1fr 1fr; }

/* 3-image: first spans 2 cols */
.post-gallery-3 .gallery-item:first-child {
  grid-column: 1 / -1;
}

/* 5-image: 2 on top (each 50%), 3 on bottom (each 33%) */
.post-gallery-5 {
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
}
.post-gallery-5 .gallery-item:nth-child(1) {
  grid-column: 1 / 3;
  grid-row: 1;
}
.post-gallery-5 .gallery-item:nth-child(2) {
  grid-column: 3 / 4;
  grid-row: 1;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  max-height: 260px;
  background: var(--bg-2);
}

.post-gallery-1 .gallery-item { max-height: 320px; }
.post-gallery-2 .gallery-item { max-height: 200px; }
.post-gallery-4 .gallery-item { max-height: 160px; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img { transform: scale(1.03); }

.gallery-more {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
}

/* ─── Lightbox ────────────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.open { display: flex; }

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  backdrop-filter: blur(4px);
  transition: background var(--transition);
  z-index: 1;
}

.lightbox-close:hover { background: rgba(255,255,255,0.25); }

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  backdrop-filter: blur(4px);
  transition: background var(--transition);
  z-index: 1;
  line-height: 1;
}

.lightbox-arrow:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  background: rgba(0,0,0,0.5);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

/* ─── Desktop overrides ───────────────────────────────────────── */
@media (min-width: 1024px) {
  .compose-area {
    display: block;
  }

  .compose-modal {
    border-radius: var(--radius-xl);
    max-width: 560px;
  }

  .compose-modal-overlay {
    align-items: center;
  }
}

/* ─── Sponsor / pub card (identique à news.css) ──────────────── */
.sponsor-card {
  display: block;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(249,115,22,.18);
  background: var(--bg-card);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative;
}
.sponsor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(249,115,22,.15);
  border-color: rgba(249,115,22,.4);
}
.sponsor-card-inner { display: flex; flex-direction: column; }
.sponsor-img-wrap { width: 100%; height: 180px; overflow: hidden; }
.sponsor-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.sponsor-card:hover .sponsor-img-wrap img { transform: scale(1.03); }
.sponsor-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.sponsor-body-noimg { padding: 20px; }
.sponsor-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.sponsor-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); background: rgba(249,115,22,.1); border: 1px solid rgba(249,115,22,.25); padding: 2px 8px; border-radius: 99px; }
.sponsor-sport-tag { font-size: 10px; font-weight: 600; text-transform: uppercase; color: var(--text-4); letter-spacing: .5px; }
.sponsor-name { font-size: 16px; font-weight: 800; color: var(--text-1); font-family: 'Poppins', sans-serif; line-height: 1.2; }
.sponsor-tagline { font-size: 13px; color: var(--text-3); line-height: 1.4; margin-top: 2px; }
.sponsor-cta { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 4px; }
.sponsor-cta span { transition: transform .2s ease; }
.sponsor-card:hover .sponsor-cta span { transform: translateX(4px); }

/* modal share-mp → voir news.css (chargé par les deux pages) */

/* ─── Modal post utilisateur ─────────────────────────────────── */
.post-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 99;
  align-items: flex-end;
  justify-content: center;
}
.post-modal-overlay.open { display: flex; }

.post-modal-container {
  background: var(--bg-card);
  width: 100%;
  max-width: 640px;
  max-height: 92dvh;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUpModal 0.28s cubic-bezier(0.32,0.72,0,1);
}

@keyframes slideUpModal {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.post-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  position: sticky;
  top: 0;
  background: var(--bg-main);
  border-bottom: 1px solid var(--border);
  z-index: 1;
}

.post-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
}

.post-modal-close {
  background: var(--bg-hover);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-modal-body { flex: 1; overflow-y: auto; min-height: 0; }

.post-modal-post { padding: 14px 16px 0; }

.post-modal-author {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.post-modal-footer {
  border-top: 1px solid var(--border);
  margin: 10px -16px 0;
  padding: 6px 16px;
}

.post-modal-comments-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  padding: 12px 16px 6px;
  border-top: 1px solid var(--border);
}

.post-modal-comments { padding: 0 16px 16px; }

/* ─── Post modal composer ─────────────────────────────────────── */
.post-modal-composer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 10px 16px 14px;
  background: var(--bg-card);
}

.modal-reply-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-3);
  background: var(--bg-2);
  border-left: 2px solid var(--primary);
  border-radius: 6px;
  padding: 5px 10px;
  margin-bottom: 8px;
}

.reply-chip-name {
  font-weight: 600;
  color: var(--primary);
}

.reply-chip-cancel {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-4);
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
  line-height: 1;
}

.modal-composer-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-comment-input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-1);
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}

.modal-comment-input:focus { border-color: var(--primary); }
.modal-comment-input::placeholder { color: var(--text-4); }

.modal-comment-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.modal-comment-send:hover { opacity: 0.85; }

.post-modal-loading {
  padding: 40px;
  text-align: center;
  color: var(--text-3);
}


/* ── Engagers modal (likes / reposts / commentaires / partage) ── */
.engagers-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.55); backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.engagers-overlay.open { opacity: 1; pointer-events: all; }
.engagers-sheet {
  width: 100%; max-width: 540px;
  background: var(--bg-2); border-radius: 18px 18px 0 0;
  max-height: 70vh; display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.engagers-overlay.open .engagers-sheet { transform: translateY(0); }
.engagers-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px; border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.engagers-sheet-title { font-weight: 700; font-size: 15px; color: var(--text-1); }
.engagers-sheet-close {
  background: none; border: none; color: var(--text-3); font-size: 18px;
  cursor: pointer; padding: 4px 8px; border-radius: 8px; line-height: 1;
}
.engagers-sheet-close:hover { background: var(--bg-3); }
.engagers-list { overflow-y: auto; flex: 1; padding: 8px 0; }
.engager-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; cursor: pointer; transition: background .15s;
}
.engager-row:hover { background: var(--bg-3); }
.engager-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-3); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--text-2); flex-shrink: 0; overflow: hidden;
}
.engager-avatar img { width: 100%; height: 100%; object-fit: cover; }
.engager-name { font-size: 14px; font-weight: 600; color: var(--text-1); }
.engager-pseudo { font-size: 12px; color: var(--text-3); }
.engagers-empty { padding: 32px 18px; text-align: center; color: var(--text-3); font-size: 14px; }
.engagers-loading { padding: 32px 18px; text-align: center; color: var(--text-3); font-size: 14px; }
.modal-action-btn {
  display: flex; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer;
  color: var(--text-2); font-size: 13px; padding: 7px 10px;
  border-radius: 10px; transition: background .15s, color .15s;
}
.modal-action-btn:hover { background: var(--bg-3); color: var(--text-1); }
.modal-action-btn.liked    { color: #ef4444; }
.modal-action-btn.reposted { color: #10b981; }
.modal-action-btn.commented { color: #10b981; }
.modal-action-btn .ma-icon { font-size: 16px; }
.modal-action-btn .ma-count { font-weight: 700; }
.modal-action-btn .ma-label { color: var(--text-3); font-size: 12px; }

/* ─── YouTube media ──────────────────────────────────────────── */
.yt-thumb-wrap {
  position: relative;
  display: inline-block;
  line-height: 0;
}
.yt-thumb-wrap.card-thumbnail-wrap {
  max-width: 42%;
  flex-shrink: 0;
  align-self: center;
}
.yt-thumb-wrap.card-thumbnail-wrap .card-thumbnail {
  max-width: 100%;
}
.yt-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(0,0,0,.15);
}
.yt-modal-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}
.yt-modal-iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* ─── Layout vidéo (YouTube inline, Twitter-style) ──────────── */
.layout-video {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.card-body-video {
  padding: 10px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.layout-video .card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-1);
  margin-bottom: 2px;
}
.layout-video .card-summary {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.yt-inline-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
  overflow: hidden;
  margin-top: 8px;
  border-radius: 0;
}
.yt-inline-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity .2s;
}
.yt-inline-player:hover .yt-inline-thumb { opacity: .85; }
.yt-inline-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: transform .15s;
}
.yt-inline-player:hover .yt-inline-play { transform: scale(1.08); }
.yt-inline-player.yt-playing .yt-inline-play { display: none; }
.yt-inline-iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

@media (min-width: 640px) {
  .yt-inline-player {
    max-width: 480px;
  }
}

@media (min-width: 640px) {
  .yt-inline-player {
    margin-left: auto;
    margin-right: auto;
  }
}

.mp4-inline-player .yt-inline-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Mention dropdown ───────────────────────────────────────────── */
.mention-dropdown {
  /* position + size posés inline par JS */
}
.mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.mention-item.active,
.mention-item:active {
  background: var(--bg-2);
}
.mention-item-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-2);
  overflow: hidden;
  flex-shrink: 0;
}
.mention-item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mention-item-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.mention-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mention-item-pseudo {
  font-size: 0.75rem;
  color: var(--text-3);
}

/* ─── Mention chips (compose textarea) ──────────────────────────── */
.mention-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 0 2px;
}
.mention-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary-glow, rgba(99,102,241,0.15));
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--primary, #6366f1);
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.mention-chip:hover {
  background: var(--primary-glow, rgba(99,102,241,0.25));
}

/* ─── Mention link dans le contenu des posts ─────────────────────── */
.post-content .mention-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  padding: 0 2px;
  transition: background 0.15s;
}
.post-content .mention-link:hover {
  background: var(--primary-glow, rgba(99,102,241,0.15));
  text-decoration: underline;
}
