/* BPM 222 — Expérience sociale musicale
   Couche additive pour le fil d'actualité et les walls de profils. */

body.bpm-ui-polish-v216 .bpm222-feed-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 20px 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 15px;
  background: rgba(2,8,18,.5);
}
body.bpm-ui-polish-v216 .bpm222-feed-search {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  color: #8390a8;
}
body.bpm-ui-polish-v216 .bpm222-feed-search > i { font-size: 19px; }
body.bpm-ui-polish-v216 .bpm222-feed-search input {
  width: 100%;
  height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #eef5ff;
  font: inherit;
}
body.bpm-ui-polish-v216 .bpm222-feed-search input::placeholder { color: #707d95; }
body.bpm-ui-polish-v216 .bpm222-feed-search button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.065);
  color: #cad7ea;
  cursor: pointer;
  display: none;
  place-items: center;
}
body.bpm-ui-polish-v216 .bpm222-feed-search.has-value button { display: grid; }
body.bpm-ui-polish-v216 .bpm222-feed-count {
  color: #8fa0ba;
  font-size: 12px;
  white-space: nowrap;
}
body.bpm-ui-polish-v216 .bpm222-feed-count strong { color: #fff; }

body.page-index.bpm-ui-polish-v216 .bpm183-feed-list {
  gap: 12px;
  padding: 0 12px 14px;
}
body.page-index.bpm-ui-polish-v216 .bpm183-post {
  position: relative;
  border: 1px solid rgba(255,255,255,.075) !important;
  border-radius: 18px;
  background: linear-gradient(180deg,rgba(10,16,28,.84),rgba(5,10,19,.72));
  box-shadow: 0 10px 32px rgba(0,0,0,.12);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
body.page-index.bpm-ui-polish-v216 .bpm183-post:hover {
  border-color: rgba(42,145,255,.22) !important;
  box-shadow: 0 16px 42px rgba(0,0,0,.2);
}
body.page-index.bpm-ui-polish-v216 .bpm183-post.is-bpm222-saved {
  border-color: rgba(56,189,248,.34) !important;
}
body.page-index.bpm-ui-polish-v216 .bpm183-post[hidden] { display: none !important; }

body.bpm-ui-polish-v216 .bpm222-save-action.is-saved,
body.bpm-ui-polish-v216 .bpm222-wall-save.is-saved {
  color: #7dd3fc !important;
  background: rgba(14,165,233,.12) !important;
}
body.bpm-ui-polish-v216 .bpm222-save-action i,
body.bpm-ui-polish-v216 .bpm222-wall-save i { transition: transform .16s ease; }
body.bpm-ui-polish-v216 .bpm222-save-action:active i,
body.bpm-ui-polish-v216 .bpm222-wall-save:active i { transform: scale(.86); }

body.bpm-ui-polish-v216 .bpm222-expandable {
  position: relative;
  overflow: hidden;
  transition: max-height .25s ease;
}
body.bpm-ui-polish-v216 .bpm222-expandable.is-collapsed {
  max-height: 7.2em;
}
body.bpm-ui-polish-v216 .bpm222-expandable.is-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.4em;
  pointer-events: none;
  background: linear-gradient(180deg,transparent,rgba(7,12,22,.98));
}
body.bpm-ui-polish-v216 .bpm222-expand-toggle {
  border: 0;
  background: transparent;
  color: #60b8ff;
  padding: 3px 0;
  margin: -4px 0 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}
body.bpm-ui-polish-v216 .bpm222-expand-toggle:hover { color: #b9e4ff; }

body.bpm-ui-polish-v216 .bpm183-post-media.is-image,
body.bpm-ui-polish-v216 .wall-media-image { cursor: zoom-in; }
body.bpm-ui-polish-v216 .bpm183-post-media img,
body.bpm-ui-polish-v216 .wall-media-image img {
  display: block;
  object-fit: contain;
  background: #030711;
}
body.bpm-ui-polish-v216 .bpm222-lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: max(18px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));
  background: rgba(0,3,9,.92);
  backdrop-filter: blur(14px);
}
body.bpm-ui-polish-v216 .bpm222-lightbox[hidden] { display: none; }
body.bpm-ui-polish-v216 .bpm222-lightbox img {
  max-width: min(96vw,1500px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 28px 90px rgba(0,0,0,.55);
}
body.bpm-ui-polish-v216 .bpm222-lightbox-close {
  position: fixed;
  top: max(14px,env(safe-area-inset-top));
  right: max(14px,env(safe-area-inset-right));
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(13,20,34,.86);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}
body.bpm-ui-polish-v216.bpm222-no-scroll { overflow: hidden; }

body.bpm-ui-polish-v216 .bpm222-filter-empty {
  margin: 6px 8px 2px;
  padding: 34px 18px;
  text-align: center;
  border: 1px dashed rgba(255,255,255,.1);
  border-radius: 18px;
  color: #8491aa;
  background: rgba(255,255,255,.018);
}
body.bpm-ui-polish-v216 .bpm222-filter-empty i {
  display: block;
  margin-bottom: 9px;
  color: #4aaeff;
  font-size: 30px;
}
body.bpm-ui-polish-v216 .bpm222-filter-empty strong {
  display: block;
  color: #ecf4ff;
  margin-bottom: 4px;
}

body.bpm-ui-polish-v216 .bpm185-composer.is-dragging {
  border-color: rgba(56,189,248,.62) !important;
  box-shadow: 0 0 0 4px rgba(14,165,233,.12),0 18px 48px rgba(0,0,0,.2) !important;
}
body.bpm-ui-polish-v216 .bpm222-drop-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #7990ad;
  font-size: 11px;
}
body.bpm-ui-polish-v216 .bpm222-comment-countdown {
  align-self: center;
  justify-self: end;
  color: #71809a;
  font-size: 10px;
  min-width: 42px;
  text-align: right;
}
body.page-index.bpm-ui-polish-v216 .bpm185-comment-form {
  grid-template-columns: minmax(0,1fr) auto 38px;
}
body.bpm-ui-polish-v216 .bpm185-comment-form button:disabled,
body.bpm-ui-polish-v216 .wall-comment-compose button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

/* Wall des profils : amélioration additive, sans changer les fonctions. */
body.bpm-ui-polish-v216 .wall-card {
  position: relative;
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 12px 34px rgba(0,0,0,.12);
  transition: border-color .18s ease, box-shadow .18s ease;
}
body.bpm-ui-polish-v216 .wall-card:hover {
  border-color: rgba(42,145,255,.2);
  box-shadow: 0 16px 42px rgba(0,0,0,.18);
}
body.bpm-ui-polish-v216 .wall-card.is-bpm222-saved { border-color: rgba(56,189,248,.34); }
body.bpm-ui-polish-v216 .wall-social-row { flex-wrap: wrap; }
body.bpm-ui-polish-v216 .wall-social-row .bpm222-wall-action {
  border: 0;
  background: transparent;
}
body.bpm-ui-polish-v216 .wall-comment-compose { position: relative; }
body.bpm-ui-polish-v216 .wall-comment-compose .bpm222-comment-countdown {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
body.bpm-ui-polish-v216 .wall-comment-compose input { padding-right: 58px; }

@media (prefers-reduced-motion: no-preference) {
  body.bpm-ui-polish-v216 .bpm222-reveal {
    animation: bpm222Reveal .32s ease both;
  }
  @keyframes bpm222Reveal {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 760px) {
  body.bpm-ui-polish-v216 .bpm222-feed-tools {
    grid-template-columns: 1fr;
    margin: 0 10px 12px;
    gap: 5px;
  }
  body.bpm-ui-polish-v216 .bpm222-feed-count { padding-left: 30px; }
  body.page-index.bpm-ui-polish-v216 .bpm183-feed-list { padding-inline: 8px; gap: 9px; }
  body.page-index.bpm-ui-polish-v216 .bpm183-post { border-radius: 16px; }
  body.page-index.bpm-ui-polish-v216 .bpm183-post-actions {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  body.page-index.bpm-ui-polish-v216 .bpm183-post-actions > span { display: none; }
  body.page-index.bpm-ui-polish-v216 .bpm183-post-actions > button {
    width: 100%;
    justify-content: center;
  }
  body.page-index.bpm-ui-polish-v216 .bpm185-comment-form {
    grid-template-columns: minmax(0,1fr) 38px;
  }
  body.page-index.bpm-ui-polish-v216 .bpm185-comment-form .bpm222-comment-countdown {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    padding-left: 12px;
  }
  body.bpm-ui-polish-v216 .bpm222-lightbox { padding: 10px; }
  body.bpm-ui-polish-v216 .bpm222-lightbox img { border-radius: 10px; max-height: 84vh; }
}

body.bpm-ui-polish-v216 .bpm183-post-head { position: relative; }
body.bpm-ui-polish-v216 .bpm222-post-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  right: 0;
  width: min(220px,75vw);
  padding: 7px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 14px;
  background: rgba(8,13,23,.98);
  box-shadow: 0 18px 55px rgba(0,0,0,.42);
  backdrop-filter: blur(18px);
}
body.bpm-ui-polish-v216 .bpm222-post-menu[hidden] { display: none; }
body.bpm-ui-polish-v216 .bpm222-post-menu button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: transparent;
  color: #dce8f9;
  text-align: left;
  cursor: pointer;
}
body.bpm-ui-polish-v216 .bpm222-post-menu button:hover,
body.bpm-ui-polish-v216 .bpm222-post-menu button:focus-visible {
  background: rgba(42,127,255,.14);
  outline: none;
}
body.bpm-ui-polish-v216 .bpm222-post-menu button.is-danger { color: #fda4af; }
