/* 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: 50%;
  left: 50%;
  width: 122%;
  height: 122%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  object-fit: contain;
  border-radius: 0 !important;
  max-width: none;
  max-height: none;
}

.cm-avatar-stack--sm .cm-avatar-stack-deco {
  width: 124%;
  height: 124%;
}

.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: #34d399; border-color: rgba(52, 211, 153, 0.35); }
.badge-active { color: #c4b5fd; border-color: rgba(155, 140, 248, 0.4); }
.badge-top { color: #fbbf24; border-color: rgba(251, 191, 36, 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: #1a1228; background: linear-gradient(135deg, #c4b5fd, #9b8cf8); border-color: transparent; }
.cm-role-dev { color: #93c5fd; 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, 12, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  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 {
  --pp-bg: #141419;
  width: 100%;
  max-width: 440px;
  max-height: min(90vh, 720px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--pp-bg);
  border: 1px solid rgba(155, 140, 248, 0.22);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 48px rgba(0, 0, 0, 0.65), 0 0 40px rgba(155, 140, 248, 0.08);
  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: 2px;
  background: linear-gradient(90deg, transparent, #9b8cf8, #c4b5fd, #9b8cf8, transparent);
  z-index: 3;
  pointer-events: none;
}

@keyframes cmSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.cm-public-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 8, 14, 0.55);
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: 0.18s ease;
}
.cm-public-close:hover {
  border-color: rgba(155, 140, 248, 0.45);
  color: #fff;
  background: rgba(155, 140, 248, 0.2);
}

.cm-public-sheet--light {
  color: #111;
}
.cm-public-sheet--light .cm-public-close {
  color: rgba(15, 23, 42, 0.7);
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(15, 23, 42, 0.12);
}

#publicProfileContent {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0;
  background: var(--pp-bg, #141419);
  scrollbar-width: thin;
  scrollbar-color: var(--sb-thumb, rgba(155, 140, 248, 0.38)) var(--sb-track, rgba(255, 255, 255, 0.035));
}

.cm-public-profile {
  --pp-accent: #9b8cf8;
  --pp-bg: #141419;
  background: var(--pp-bg);
  min-height: 100%;
  position: relative;
}

.cm-public-profile--light .cm-public-name {
  color: #111 !important;
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  -webkit-text-fill-color: #111 !important;
}
.cm-public-profile--light .cm-public-bio,
.cm-public-profile--light .cm-pe-preview-bio {
  color: #1c1917 !important;
}
.cm-public-profile--light .cm-public-bio--empty,
.cm-public-profile--light .cm-pe-preview-bio.is-empty {
  color: rgba(28, 25, 23, 0.45) !important;
}
.cm-public-profile--light .cm-public-meta-line {
  color: rgba(28, 25, 23, 0.55) !important;
}
.cm-public-profile--light .cm-public-banner-fade {
  background: linear-gradient(180deg, transparent 42%, rgba(255, 255, 255, 0.35) 100%);
}
.cm-public-profile--light .cm-role-member {
  color: #334155;
  border-color: rgba(15, 23, 42, 0.2);
  background: rgba(15, 23, 42, 0.06);
}

.pe-banner-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  max-height: min(42vh, 340px);
  overflow-y: auto;
  padding-right: 4px;
}
.pe-banner-preset {
  position: relative;
  aspect-ratio: 16 / 6;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: #121218;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
}
.pe-banner-preset img,
.pe-banner-preset video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pe-banner-preset.active {
  border-color: #eab308;
  box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.35);
}
.pe-banner-preset--none {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 700;
}
.pe-banner-preset.pe-vip-locked {
  opacity: 0.72;
}
.pe-colors--bg .pe-color {
  width: 28px;
  height: 28px;
  position: relative;
}
.pe-colors--bg .pe-color.pe-vip-locked {
  opacity: 0.65;
}

.cm-public-banner {
  position: relative;
  height: 120px;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--pp-accent) 0%, rgba(155, 140, 248, 0.35) 38%, rgba(10, 10, 16, 0.98) 100%);
}

.cm-public-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  display: block;
  z-index: 0;
}

.cm-public-banner-video {
  pointer-events: none;
  background: #121218;
}

/* Global `video { display:block }` écrase [hidden] — forcer le masquage */
#editMainPreviewBannerImg[hidden],
#editMainPreviewBannerVideo[hidden],
.cm-public-banner-video[hidden] {
  display: none !important;
}

.cm-public-banner-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(10, 10, 16, 0.55) 100%);
  pointer-events: none;
  z-index: 1;
}

.cm-public-banner.has-image {
  background: #121218;
}

.cm-public-profile-body {
  padding: 0 20px 8px;
  position: relative;
  z-index: 2;
  background: transparent;
}

.cm-public-profile-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: -42px;
  padding-bottom: 18px;
}

.cm-public-avatar-stack {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

.cm-public-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #111;
  border: 4px solid var(--pp-bg, #0e0e14);
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.cm-public-avatar-deco {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 122%;
  height: 122%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  object-fit: contain;
  border-radius: 0 !important;
  aspect-ratio: 1 / 1;
}

.cm-public-profile-info {
  min-width: 0;
  padding-right: 28px;
}

.cm-public-name {
  margin: 0 0 8px;
  font-family: var(--ff-head);
  font-size: 1.4rem;
  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(180, 170, 210, 0.45);
  letter-spacing: 0.02em;
}

.cm-public-profile--info-only .cm-public-profile-body {
  padding-bottom: 24px;
}

.cm-public-profile--info-only .cm-public-profile-head {
  margin-bottom: 0;
  border-bottom: none;
}

/* Aperçu éditeur = même look que le profil public */
.cm-pe-preview-card.cm-public-profile {
  background: var(--pp-bg, #14141c);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.cm-pe-preview-banner.cm-public-banner {
  height: 120px;
  cursor: pointer;
}
.cm-pe-preview-banner-edit {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0.85;
  transition: opacity 0.15s, background 0.15s;
}
.cm-pe-preview-banner:hover .cm-pe-preview-banner-edit {
  opacity: 1;
  background: rgba(0, 0, 0, 0.75);
}
.cm-pe-preview-body.cm-public-profile-body {
  background: transparent;
  padding: 0 18px 22px;
  margin-top: 0;
  text-align: left;
}
.cm-pe-preview-avatar-wrap.cm-public-avatar-stack {
  width: 96px;
  height: 96px;
  margin: 0;
  cursor: pointer;
}
.cm-pe-preview-avatar-wrap:hover {
  transform: none;
}
.cm-pe-preview-avatar-img.cm-public-avatar-img {
  border-color: var(--pp-bg, #0e0e14);
}
.cm-pe-preview-avatar-deco.cm-public-avatar-deco {
  display: none;
  width: 120%;
  height: 120%;
}
.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.cm-public-name {
  font-size: 1.35rem;
  margin-bottom: 8px;
}
.cm-pe-preview-badges {
  display: contents;
}
.cm-pe-preview-badges .cm-badges {
  display: contents;
}
.cm-pe-preview-bio.cm-public-bio {
  margin: 0 0 10px;
}
.cm-pe-preview-bio.is-empty,
.cm-pe-preview-bio.cm-public-bio--empty {
  color: rgba(255, 255, 255, 0.32);
  font-style: italic;
}

/* legacy overrides below are superseded by public-profile hybrid above */
.cm-pe-preview-card:not(.cm-public-profile) {
  background: var(--pp-bg, #141419);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  overflow: hidden;
}

.cm-pe-preview-banner:not(.cm-public-banner) {
  height: 88px;
  aspect-ratio: auto;
  min-height: 0;
  --pp-accent: #f77f00;
  background: linear-gradient(135deg, var(--pp-accent) 0%, rgba(155, 140, 248, 0.28) 40%, rgba(8, 8, 12, 0.95) 100%);
  position: relative;
  cursor: pointer;
  background-size: cover;
  background-position: center;
}
.cm-pe-preview-banner.has-image:not(.cm-public-banner) {
  background-color: #1a1a22;
}
.cm-pe-preview-banner.has-image:not(.cm-public-banner)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(8, 8, 12, 0.55) 100%);
  pointer-events: none;
}

.pe-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.pe-banner-pick,
.pe-banner-clear {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 11px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pe-banner-pick {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}
.pe-banner-pick:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(155, 140, 248, 0.4);
}
.pe-banner-clear {
  background: transparent;
  border: 1px solid rgba(232, 48, 74, 0.35);
  color: #ff8a96;
}
.pe-banner-clear:hover {
  background: rgba(232, 48, 74, 0.12);
}
.pe-banner-recrop {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 11px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  background: rgba(155, 140, 248, 0.1);
  border: 1px solid rgba(155, 140, 248, 0.35);
  color: #c4b5fd;
}
.pe-banner-recrop:hover {
  background: rgba(155, 140, 248, 0.18);
}
.pe-banner-hint {
  margin: 10px 0 0;
  font-size: 11.5px;
  color: var(--muted, rgba(255,255,255,0.4));
  line-height: 1.4;
}

/* Cadreur bannière — style Discord (cadre blanc + hors-cadre assombri) */
.pe-banner-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 999999995;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.pe-banner-crop-modal[hidden] { display: none !important; }
.pe-banner-crop-box {
  width: min(640px, 100%);
  background: #121218;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
}
.pe-banner-crop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.pe-banner-crop-head h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}
.pe-banner-crop-head p {
  margin: 0;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.4;
}
.pe-banner-crop-x {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  flex-shrink: 0;
}
.pe-banner-crop-x:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.pe-banner-crop-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 2.4 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #0a0a0f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.pe-banner-crop-viewport.is-dragging { cursor: grabbing; }
.pe-banner-crop-viewport img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none !important;
  width: auto;
  height: auto;
  pointer-events: none;
  transform-origin: 0 0;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
.pe-banner-crop-frame {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  border: 2px solid #fff;
  border-radius: 4px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.58);
  pointer-events: none;
}
.pe-banner-crop-frame::before,
.pe-banner-crop-frame::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.22);
  pointer-events: none;
}
/* Guides règle des tiers */
.pe-banner-crop-frame::before {
  left: 33.333%;
  top: 0;
  bottom: 0;
  width: 1px;
  box-shadow: 33.333% 0 0 rgba(255, 255, 255, 0.22);
}
.pe-banner-crop-frame::after {
  top: 33.333%;
  left: 0;
  right: 0;
  height: 1px;
  box-shadow: 0 33.333% 0 rgba(255, 255, 255, 0.22);
}
.pe-banner-crop-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  pointer-events: none;
}
.pe-banner-crop-corner--tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.pe-banner-crop-corner--tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.pe-banner-crop-corner--bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.pe-banner-crop-corner--br { bottom: -2px; right: -2px; border-left: none; border-top: none; }
.pe-banner-crop-zoom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 16px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 700;
}
.pe-banner-crop-zoom input[type="range"] {
  flex: 1;
  accent-color: #eab308;
}
.pe-banner-crop-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.pe-banner-crop-cancel,
.pe-banner-crop-confirm {
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.pe-banner-crop-cancel {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
}
.pe-banner-crop-confirm {
  background: #fff;
  color: #111;
}
.pe-banner-crop-confirm:hover { background: #f2f2f2; }

/* pe-preview visuals are defined above with cm-public-profile hybrid */

.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-width: 420px;
    max-height: min(86vh, 680px);
    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;
  }
}
