/* Communautés (/communautes/, /c/<slug>/) — rendered by learnfloo-v2/convex/publicSite.ts */

.cm-hero { padding-bottom: 40px; }
.cm-hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 8px; }
.cm-hero p { font-size: 1.1rem; }
.cm-link { color: var(--primary); font-weight: 600; }
.cm-link:hover { text-decoration: underline; }
.cm-search {
  display: flex; align-items: center; gap: 10px;
  max-width: 620px; margin: 28px auto 0;
  padding: 12px 18px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 50px;
  box-shadow: var(--shadow);
  cursor: text;
}
.cm-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.cm-search svg { width: 20px; height: 20px; color: var(--text-secondary); flex-shrink: 0; }
.cm-search input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--text); }

.cm-main { padding-top: 32px; padding-bottom: 80px; }
.cm-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 32px; }
.cm-chip {
  padding: 8px 16px; border-radius: 50px;
  border: 1px solid var(--border); background: var(--bg);
  font: inherit; font-size: 0.9rem; font-weight: 500; cursor: pointer;
  transition: all var(--transition);
}
.cm-chip:hover { border-color: var(--primary); color: var(--primary); }
.cm-chip.active { background: var(--text); color: #fff; border-color: var(--text); }

.cm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cm-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.cm-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(37, 99, 235, 0.35); }
.cm-card[hidden] { display: none; }
.cm-card-cover, .cm-side-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.cm-cover-empty {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
  color: #fff; font-size: 2rem; font-weight: 800;
}
.cm-card-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.cm-card-title { display: flex; align-items: center; gap: 10px; }
.cm-card-title strong { font-size: 1.05rem; font-weight: 700; }
.cm-card-logo, .cm-logo-empty { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.cm-logo-empty { display: flex; align-items: center; justify-content: center; background: var(--primary-bg); color: var(--primary); font-weight: 700; font-size: 0.9rem; }
.cm-card-body p {
  color: var(--text-secondary); font-size: 0.92rem; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cm-card-meta { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.9rem; color: var(--text-secondary); }
.cm-card-meta b { color: var(--text); }
.cm-dot { color: #c7cbd1; }
.cm-rating { color: var(--gold); font-weight: 600; }
.cm-stars { color: var(--amber); letter-spacing: 1px; }
.cm-empty { text-align: center; color: var(--text-secondary); padding: 48px 0; }

/* About page */
.cm-about { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; padding-top: 110px; padding-bottom: 80px; align-items: start; }
.cm-about-main { min-width: 0; }
.cm-about h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.cm-rating-line { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); margin-bottom: 20px; }
.cm-rating-line b { color: var(--text); }
.cm-video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.cm-video iframe, .cm-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cm-about-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 20px; }
.cm-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 24px; font-size: 0.95rem; }
.cm-facts li { display: flex; align-items: center; gap: 6px; }
.cm-avatar-xs { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.cm-rich { font-size: 1rem; line-height: 1.75; color: #1f2937; }
.cm-rich p { margin-bottom: 14px; }
.cm-rich h1, .cm-rich h2, .cm-rich h3, .cm-rich h4 { font-weight: 700; margin: 24px 0 10px; line-height: 1.3; }
.cm-rich h1 { font-size: 1.5rem; } .cm-rich h2 { font-size: 1.3rem; } .cm-rich h3 { font-size: 1.15rem; } .cm-rich h4 { font-size: 1rem; }
.cm-rich ul, .cm-rich ol { padding-left: 24px; margin-bottom: 14px; }
.cm-rich li { margin-bottom: 4px; }
.cm-rich blockquote { border-left: 4px solid var(--primary); background: var(--primary-bg); padding: 12px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 16px 0; }
.cm-rich img { border-radius: var(--radius-sm); margin: 12px 0; }
.cm-rich a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.cm-rich code { background: var(--bg-alt); padding: 1px 6px; border-radius: 4px; font-size: 0.9em; }
.cm-rich pre { background: var(--bg-alt); padding: 12px 16px; border-radius: var(--radius-sm); overflow-x: auto; margin-bottom: 14px; }
.cm-rich hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }

.cm-reviews { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.cm-reviews h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 20px; }
.cm-review { display: flex; gap: 12px; margin-bottom: 16px; }
.cm-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cm-review-body { flex: 1; background: var(--bg-alt); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.cm-review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 6px; }
.cm-review-body p { font-size: 0.95rem; line-height: 1.6; white-space: pre-line; }
.cm-review-meta { display: block; margin-top: 8px; font-size: 0.8rem; color: var(--text-secondary); }

.cm-side { position: sticky; top: 90px; }
.cm-side-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); overflow: hidden; box-shadow: var(--shadow); }
.cm-side-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.cm-side-body h2 { font-size: 1.15rem; font-weight: 700; margin: 0; }
.cm-side-url { font-size: 0.8rem; color: var(--text-secondary); margin-top: -8px; }
.cm-side-body > p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.55; }
.cm-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: var(--radius-sm); text-align: center; }
.cm-stats > div { padding: 10px 4px; }
.cm-stats > div + div { border-left: 1px solid var(--border); }
.cm-stats b { display: block; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.cm-stats span { font-size: 0.72rem; color: var(--text-secondary); }
.cm-join { width: 100%; }
.cm-side-note { text-align: center; font-size: 0.78rem; color: var(--text-secondary); }
.cm-powered { text-align: center; font-size: 0.8rem; color: var(--text-secondary); margin-top: 14px; }
.cm-powered a { font-weight: 600; }
.cm-404 { text-align: center; padding-top: 140px; min-height: 60vh; }
.cm-404 h1 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.cm-404 p { color: var(--text-secondary); margin-bottom: 24px; }

@media (max-width: 992px) { .cm-grid { grid-template-columns: repeat(2, 1fr); } .cm-about { grid-template-columns: 1fr; } .cm-side { position: static; } }
@media (max-width: 600px) { .cm-grid { grid-template-columns: 1fr; } .cm-about { padding-top: 96px; } }

/* Block editor layout inside the about text */
.cm-rich .columns-wrapper { display: grid; gap: 1rem; margin: 1.25rem 0; grid-template-columns: 1fr 1fr; }
.cm-rich .columns-wrapper[data-count="3"] { grid-template-columns: 1fr 1fr 1fr; }
.cm-rich .column-block { min-width: 0; }
.cm-rich .column-block > *:first-child { margin-top: 0; }
.cm-rich iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-sm); margin: 12px 0; }
.cm-rich u { text-underline-offset: 3px; }
@media (max-width: 640px) { .cm-rich .columns-wrapper, .cm-rich .columns-wrapper[data-count="3"] { grid-template-columns: 1fr; } }
