/* InterFilm — Community & comments */
.community-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 16px 100px;
}

.community-page-title {
  font-family: var(--ff-head);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 900;
  text-transform: uppercase;
  margin: 16px 0 8px;
  letter-spacing: -0.02em;
}

.community-page-sub {
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.cm-sort-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.cm-sort-btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.cm-sort-btn.active,
.cm-sort-btn:hover {
  color: #fff;
  border-color: rgba(247, 127, 0, 0.5);
  background: rgba(247, 127, 0, 0.12);
}

.cm-composer {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.cm-composer-head {
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  color: var(--muted);
}

.cm-composer-inline {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.cm-rating-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.cm-rating-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.45);
}

.cm-star-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cm-star-rating--sm { gap: 3px; }
.cm-star-rating--lg { gap: 6px; }

.cm-star-btn,
.cm-star-display {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: none;
  line-height: 0;
}

.cm-star-rating--sm .cm-star-btn,
.cm-star-rating--sm .cm-star-display {
  width: 18px;
  height: 18px;
}

.cm-star-rating--md .cm-star-btn,
.cm-star-rating--md .cm-star-display {
  width: 28px;
  height: 28px;
}

.cm-star-rating--lg .cm-star-btn,
.cm-star-rating--lg .cm-star-display {
  width: 36px;
  height: 36px;
}

.cm-star-rating--interactive .cm-star-btn {
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.cm-star-rating--interactive .cm-star-btn:hover {
  transform: scale(1.14);
}

.cm-star-icon {
  width: 100%;
  height: 100%;
  fill: rgba(255, 255, 255, 0.1);
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 0.6;
  transition: fill 0.18s ease, stroke 0.18s ease, filter 0.18s ease;
}

.cm-star-btn.active .cm-star-icon,
.cm-star-display.active .cm-star-icon {
  fill: #f77f00;
  stroke: #ffc266;
  stroke-width: 0.4;
  filter: drop-shadow(0 0 5px rgba(247, 127, 0, 0.55));
}

.cm-review-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.cm-stars {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.cm-star {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.cm-star.active {
  background: rgba(247, 127, 0, 0.25);
  border-color: rgba(247, 127, 0, 0.6);
  color: #fff;
}

.cm-textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #fff;
  padding: 12px 14px;
  font: inherit;
  line-height: 1.45;
  box-sizing: border-box;
}

.cm-textarea-sm {
  min-height: 64px;
}

.cm-btn-primary {
  margin-top: 10px;
  background: linear-gradient(135deg, #f77f00, #e8304a);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.cm-btn-sm {
  margin-top: 8px;
  padding: 8px 14px;
  font-size: 11px;
}

.cm-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  margin-left: 8px;
}

.cm-login-box {
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 14px;
}

.cm-login-inline {
  margin-bottom: 12px;
  padding: 12px;
}

.cm-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  overflow: visible;
}

.cm-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  overflow: visible;
}

.cm-avatar-stack {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  cursor: pointer;
  overflow: visible;
}

.cm-avatar-stack--sm {
  width: 32px;
  height: 32px;
}

.cm-avatar-stack-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 1;
  display: block;
  background: #111;
}

.cm-avatar-stack-deco {
  position: absolute;
  top: -15%;
  left: -15%;
  width: 130%;
  height: 130%;
  pointer-events: none;
  z-index: 2;
}

.cm-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.08);
}

.cm-avatar-sm {
  width: 32px;
  height: 32px;
}

.cm-card-meta {
  flex: 1;
  min-width: 0;
}

.cm-author-row {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  max-width: 100%;
}

.cm-role-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  cursor: help;
  line-height: 0;
}

.cm-role-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.cm-role-icon--founder { color: #fbbf24; filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.35)); }
.cm-role-icon--dev { color: #60a5fa; filter: drop-shadow(0 0 4px rgba(96, 165, 250, 0.3)); }
.cm-role-icon--mod { color: #4ade80; filter: drop-shadow(0 0 4px rgba(74, 222, 128, 0.28)); }
.cm-role-icon--vip { color: #f59e0b; filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.35)); }

.cm-author {
  font-weight: 800;
  font-size: 14px;
  cursor: default;
  display: inline-block;
  max-width: 100%;
  word-break: break-word;
  line-height: 1.3;
}

.cm-author--link {
  cursor: pointer;
}

.cm-author--link:hover {
  opacity: 0.88;
}

.cm-author--strong {
  display: inline;
  font-weight: 800;
}

.cm-reply-head .cm-author--strong {
  margin-right: 2px;
}

.cm-date {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.cm-body {
  margin: 0 0 12px;
  line-height: 1.55;
  word-break: break-word;
}

.cm-votes-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.cm-like-bar {
  margin-top: 10px;
  flex-wrap: wrap;
}

.cm-card .like-login-hint {
  font-size: 11px;
  width: 100%;
  margin-top: 4px;
}

.cm-reply-btn,
.cm-icon-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
}

.cm-reply-box {
  margin-top: 10px;
}

.cm-thread {
  margin-top: 12px;
  padding-left: 12px;
  border-left: 2px solid rgba(247, 127, 0, 0.25);
}

.cm-reply {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  overflow: visible;
  align-items: flex-start;
}

.cm-reply-body p {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.45;
}

.cm-reply-head {
  font-size: 12px;
  color: var(--muted);
}

.cm-loading,
.cm-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
}

.cm-media-section {
  margin-top: 8px;
}

.cm-comments-list {
  display: grid;
  gap: 12px;
}

.cm-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.cm-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.badge-new { color: #22c55e; border-color: rgba(34, 197, 94, 0.35); }
.badge-active { color: #f77f00; border-color: rgba(247, 127, 0, 0.35); }
.badge-top { color: #ffb347; border-color: rgba(255, 179, 71, 0.35); }
.badge-vip { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); }

.cm-role-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.cm-role-founder { color: #fbbf24; background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.35); }
.cm-role-dev { color: #60a5fa; background: rgba(96, 165, 250, 0.12); border-color: rgba(96, 165, 250, 0.3); }
.cm-role-mod { color: #4ade80; background: rgba(74, 222, 128, 0.1); border-color: rgba(74, 222, 128, 0.3); }
.cm-role-vip { color: #fbbf24; background: rgba(251, 191, 36, 0.15); border-color: rgba(251, 191, 36, 0.4); }
.cm-role-member { color: rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); }

.cm-public-modal {
  position: fixed;
  inset: 0;
  z-index: 999999995;
  background: rgba(4, 4, 10, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.cm-public-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.cm-public-sheet {
  width: 100%;
  max-width: 560px;
  max-height: min(92vh, 820px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, rgba(14, 14, 18, 0.98) 0%, rgba(8, 8, 12, 0.99) 100%);
  border: 1px solid rgba(247, 127, 0, 0.22);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 48px rgba(0, 0, 0, 0.6), 0 0 40px rgba(247, 127, 0, 0.06);
  position: relative;
  animation: cmSlideUp 0.32s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.cm-public-sheet::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f77f00, #ff9500, #f77f00);
}

@keyframes cmSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.cm-public-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.18s ease;
}

.cm-public-close:hover {
  border-color: rgba(247, 127, 0, 0.4);
  color: #fff;
  background: rgba(247, 127, 0, 0.12);
}

#publicProfileContent {
  overflow-y: auto;
  padding: 0 0 24px;
  scrollbar-width: thin;
}

.cm-public-profile {
  --pp-accent: #f77f00;
}

.cm-public-banner {
  height: 96px;
  background: linear-gradient(135deg, var(--pp-accent) 0%, rgba(247, 127, 0, 0.35) 35%, rgba(8, 8, 12, 0.98) 100%);
  position: relative;
}

.cm-public-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8, 8, 12, 0.85) 100%);
}

.cm-public-profile-body {
  padding: 0 20px 8px;
}

.cm-public-profile-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: -48px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cm-public-avatar-stack {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.cm-public-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #111;
  border: 4px solid #0a0a0f;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.cm-public-avatar-deco {
  position: absolute;
  top: -15%;
  left: -15%;
  width: 130%;
  height: 130%;
  pointer-events: none;
  z-index: 2;
}

.cm-public-profile-info {
  min-width: 0;
  padding-right: 36px;
}

.cm-public-name {
  margin: 0 0 8px;
  font-family: var(--ff-head);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  word-break: break-word;
  line-height: 1.15;
}

.cm-public-role-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
}

.cm-public-bio {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
  white-space: pre-wrap;
  word-break: break-word;
}

.cm-public-bio--empty {
  color: rgba(255, 255, 255, 0.32);
  font-style: italic;
}

.cm-public-meta-line {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 0.02em;
}

/* Aperçu éditeur profil (style Discord mini) */
.cm-pe-preview-card {
  background: #141419;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.35);
}

.cm-pe-preview-banner {
  height: 64px;
  --pp-accent: #f77f00;
  background: linear-gradient(135deg, var(--pp-accent) 0%, rgba(247, 127, 0, 0.3) 40%, rgba(8, 8, 12, 0.95) 100%);
}

.cm-pe-preview-body {
  padding: 0 16px 20px;
  margin-top: -36px;
  text-align: center;
}

.cm-pe-preview-avatar-wrap {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 12px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cm-pe-preview-avatar-wrap:hover {
  transform: scale(1.04);
}

.cm-pe-preview-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #141419;
  position: relative;
  z-index: 1;
}

.cm-pe-preview-avatar-deco {
  position: absolute;
  top: -15%;
  left: -15%;
  width: 130%;
  height: 130%;
  pointer-events: none;
  z-index: 2;
  display: none;
}

.cm-pe-preview-avatar-edit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: 0.18s ease;
  z-index: 3;
}

.cm-pe-preview-avatar-wrap:hover .cm-pe-preview-avatar-edit {
  opacity: 1;
}

.cm-pe-preview-name {
  font-family: var(--ff-head);
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  word-break: break-word;
}

.cm-pe-preview-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
}

.cm-pe-preview-bio {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.75);
  white-space: pre-wrap;
  word-break: break-word;
}

.cm-pe-preview-bio.is-empty {
  color: rgba(255, 255, 255, 0.28);
  font-style: italic;
}

.cm-pe-preview-role {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.38);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cm-public-tabs {
  display: flex;
  gap: 8px;
  margin: 16px 0 14px;
  padding-bottom: 0;
  border-bottom: none;
}

.cm-public-tab {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.18s ease;
  font-family: var(--ff-body);
}

.cm-public-tab.active {
  color: #fff;
  border-color: rgba(247, 127, 0, 0.45);
  background: rgba(247, 127, 0, 0.1);
}

.cm-public-panel { display: none; }
.cm-public-panel.active { display: block; }

.cm-public-activity-item {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 10px;
}

.cm-public-activity-type {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f77f00;
  margin-bottom: 8px;
}

.cm-public-activity-text {
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

.cm-public-activity-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
}

.cm-public-link-btn {
  border: none;
  background: rgba(247, 127, 0, 0.12);
  color: #f77f00;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.15s ease;
}

.cm-public-link-btn:hover {
  background: rgba(247, 127, 0, 0.22);
  color: #ffb347;
}

.cm-public-media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.cm-public-media-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 110px;
  padding: 12px 8px;
  border-radius: 14px;
  border: 1px solid rgba(247, 127, 0, 0.15);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: 0.18s ease;
  color: inherit;
  font-family: var(--ff-body);
}

.cm-public-media-card:hover {
  border-color: rgba(247, 127, 0, 0.45);
  background: rgba(247, 127, 0, 0.08);
  transform: translateY(-2px);
}

.cm-public-media-icon { width: 36px; height: 36px; color: #f77f00; }
.cm-public-media-icon svg { width: 100%; height: 100%; }

.cm-public-media-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
}

.cm-public-media-action { font-size: 10px; color: rgba(255, 255, 255, 0.4); }

.cm-public-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}

@media (min-width: 768px) {
  .cm-public-modal {
    align-items: center;
    padding: 24px;
  }

  .cm-public-sheet {
    border-radius: 22px;
    max-height: min(88vh, 820px);
    animation: cmPopIn 0.32s cubic-bezier(0.34, 1.2, 0.64, 1);
  }

  @keyframes cmPopIn {
    from { transform: scale(0.94); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }
}

@media (max-width: 520px) {
  .cm-public-media-grid { grid-template-columns: repeat(2, 1fr); }
  .cm-public-profile-info { padding-right: 0; }
}

@media (max-width: 480px) {
  .community-page {
    padding-bottom: 120px;
  }

  .cm-star-rating--lg .cm-star-btn {
    width: 32px;
    height: 32px;
  }

  .cm-star-rating--sm .cm-star-display {
    width: 16px;
    height: 16px;
  }

  .cm-star {
    width: 26px;
    height: 26px;
    font-size: 10px;
  }

  .cm-card {
    padding: 14px;
  }

  .cm-votes {
    gap: 6px;
  }

  .cm-vote {
    padding: 8px 10px;
    min-height: 36px;
  }

  .cm-like-bar .like-btn {
    min-height: 36px;
    padding: 6px 12px;
  }
}
