/* Annuaire public des communautés — langage ATHENA (Charte + vitrine) */
.community-registry {
  --cr-emerald: #12d18e;
  --cr-emerald-deep: #0b8a5c;
  --cr-on-accent: #04231a;
  --cr-ink: #0c1116;
  --cr-muted: #6d7a80;
  --cr-soft: #8c979b;
  --cr-line: #e3e8ea;
  --cr-line-soft: #f1f4f5;
  --cr-bg: #f6f8f9;
  --cr-panel: #fff;
  --cr-dark: #0c1116;
  --cr-dark-2: #0a0e10;
  --cr-warn-fg: #8a5a06;
  --cr-warn-bg: #fdf3e2;
  --cr-warn-bd: #f2ddb4;
  --cr-ok-fg: #0b6b47;
  --cr-ok-bg: #e6f8f0;
  --cr-ok-bd: #bfe9d8;
  --cr-info-fg: #1e4f80;
  --cr-info-bg: #eaf2fb;
  --cr-info-bd: #c9dcf0;
  font-family: 'Archivo', system-ui, sans-serif;
  color: var(--cr-ink);
  background: var(--cr-bg);
  -webkit-font-smoothing: antialiased;
}

.community-registry .cr-mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.community-registry .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes crRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes crPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.45); }
}
@keyframes crBar {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.cr-rise { animation: crRise 0.4s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.cr-rise-d1 { animation-delay: 0.06s; }
.cr-rise-d2 { animation-delay: 0.12s; }
.cr-rise-d3 { animation-delay: 0.18s; }

.cr-shell {
  margin-left: -1rem;
  margin-right: -1rem;
  min-height: 70vh;
}
@media (min-width: 640px) {
  .cr-shell { margin-left: -1.5rem; margin-right: -1.5rem; }
}
@media (min-width: 1024px) {
  .cr-shell { margin-left: -2rem; margin-right: -2rem; }
}

.cr-wrap {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
}

/* —— Hero —— */
.cr-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 88% 12%, rgba(18, 209, 142, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 8% 90%, rgba(18, 209, 142, 0.08), transparent 50%),
    linear-gradient(165deg, #0a0e10 0%, #0c1116 48%, #11181d 100%);
  color: #fff;
  border-bottom: 1px solid rgba(18, 209, 142, 0.22);
}
.cr-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--cr-emerald);
  transform-origin: left;
  animation: crBar 0.8s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
.cr-hero__inner {
  position: relative;
  z-index: 1;
  padding: 2.75rem 0 2.5rem;
}
.cr-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  margin: 0 0 1.25rem;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #fff;
  text-decoration: none;
}
.cr-brand span { color: var(--cr-emerald); }
.cr-kicker {
  margin: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cr-emerald);
}
.cr-hero__title {
  margin: 10px 0 0;
  max-width: 16ch;
  font-size: clamp(1.85rem, 4.2vw, 2.85rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}
.cr-hero__lead {
  margin: 14px 0 0;
  max-width: 48ch;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
  color: rgba(232, 238, 235, 0.78);
  text-wrap: pretty;
}
.cr-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1.5rem;
}

.cr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.16s ease;
}
.cr-btn:hover { transform: translateY(-1px); }
.cr-btn:focus-visible {
  outline: 2px solid var(--cr-emerald);
  outline-offset: 2px;
}
.cr-btn--accent {
  background: var(--cr-emerald);
  color: var(--cr-on-accent);
}
.cr-btn--accent:hover {
  background: #1fe09c;
}
.cr-btn--ghost {
  border-color: rgba(255, 255, 255, 0.2);
  color: #e8eeeb;
  background: transparent;
}
.cr-btn--ghost:hover {
  border-color: var(--cr-emerald);
  color: var(--cr-emerald);
}
.cr-btn--ink {
  background: var(--cr-ink);
  color: #fff;
}
.cr-btn--ink:hover {
  background: var(--cr-emerald);
  color: var(--cr-on-accent);
}
.cr-btn--line {
  border-color: var(--cr-line);
  background: var(--cr-panel);
  color: var(--cr-ink);
}
.cr-btn--line:hover {
  border-color: var(--cr-emerald);
  color: var(--cr-emerald-deep);
}
.cr-btn--sm {
  height: 34px;
  padding: 0 12px;
  font-size: 10px;
}

/* —— Toolbar —— */
.cr-toolbar {
  margin-top: 1.5rem;
  padding: 1rem 0 0.25rem;
}
.cr-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 20px;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--cr-line);
}
.cr-toolbar__title {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.cr-toolbar__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.cr-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--cr-line);
  background: var(--cr-panel);
  font-size: 12px;
  font-weight: 700;
  color: var(--cr-muted);
}
.cr-count__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cr-emerald);
  animation: crPulse 2s ease-in-out infinite;
}
.cr-count__dot--empty {
  background: #c98a12;
  animation: none;
}

.cr-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 1rem;
  align-items: center;
}
.cr-search {
  position: relative;
  flex: 1 1 220px;
  min-width: min(100%, 220px);
  max-width: 360px;
}
.cr-search__input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--cr-line);
  background: var(--cr-panel);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--cr-ink);
  transition: border-color 0.15s ease;
}
.cr-search__input::placeholder { color: var(--cr-soft); font-weight: 500; }
.cr-search__input:focus {
  outline: none;
  border-color: var(--cr-emerald);
}
.cr-search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--cr-soft);
  pointer-events: none;
}
.cr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cr-chip {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--cr-line);
  background: var(--cr-panel);
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cr-muted);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.cr-chip:hover {
  border-color: #c5d0d4;
  color: var(--cr-ink);
}
.cr-chip:focus-visible {
  outline: 2px solid var(--cr-emerald);
  outline-offset: 2px;
}
.cr-chip.is-active {
  border-color: var(--cr-emerald);
  background: var(--cr-ok-bg);
  color: var(--cr-ok-fg);
}

/* —— Grid / cards —— */
.cr-grid {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .cr-grid { grid-template-columns: 1fr 1fr; }
}

.cr-card {
  display: flex;
  flex-direction: column;
  background: var(--cr-panel);
  border: 1px solid var(--cr-line);
  transition: border-color 0.2s cubic-bezier(0.2, 0.7, 0.3, 1),
              box-shadow 0.2s cubic-bezier(0.2, 0.7, 0.3, 1),
              transform 0.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.cr-card:hover {
  border-color: rgba(18, 209, 142, 0.55);
  box-shadow: 0 10px 28px -18px rgba(12, 17, 22, 0.35);
  transform: translateY(-2px);
}
.cr-card.is-hidden { display: none; }

.cr-card__cover {
  position: relative;
  height: 168px;
  overflow: hidden;
  background: var(--cr-dark);
  border-bottom: 1px solid var(--cr-line);
}
.cr-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.cr-card:hover .cr-card__cover img {
  transform: scale(1.03);
}
.cr-card__cover-fallback {
  position: absolute;
  inset: 0;
}
.cr-card__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(10, 14, 16, 0.92) 100%);
  pointer-events: none;
}
.cr-card__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 1;
}
.cr-card__foot {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  z-index: 1;
}
.cr-card__name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
  text-wrap: balance;
}
.cr-card__game {
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}
.cr-card__unit {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.3;
}
.cr-card__logo {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}
.cr-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cr-card__logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
}
@media (max-width: 479px) {
  .cr-card__logo { display: none; }
}

.cr-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cr-pill--glass {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(6px);
}
.cr-pill--live {
  background: rgba(18, 209, 142, 0.95);
  color: var(--cr-on-accent);
}
.cr-pill--warn {
  background: rgba(201, 138, 18, 0.95);
  color: #1a1204;
}
.cr-pill--ok {
  background: var(--cr-ok-bg);
  color: var(--cr-ok-fg);
  border: 1px solid var(--cr-ok-bd);
  border-radius: 0;
}
.cr-pill--info {
  background: var(--cr-info-bg);
  color: var(--cr-info-fg);
  border: 1px solid var(--cr-info-bd);
  border-radius: 0;
}
.cr-pill--muted {
  background: #f1f4f5;
  color: var(--cr-muted);
  border: 1px solid var(--cr-line);
  border-radius: 0;
}
.cr-pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: crPulse 2s ease-in-out infinite;
}

.cr-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.1rem 1.15rem 1.2rem;
}
.cr-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cr-excerpt {
  margin: 12px 0 0;
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.65;
  color: #3c474c;
  text-wrap: pretty;
}
.cr-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}
@media (min-width: 480px) {
  .cr-meta { grid-template-columns: 1fr 1fr 1fr; }
}
.cr-meta__cell {
  padding: 10px 11px;
  background: var(--cr-bg);
  border: 1px solid var(--cr-line-soft);
}
.cr-meta__label {
  margin: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cr-soft);
}
.cr-meta__value {
  margin: 4px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cr-ink);
  word-break: break-word;
}

.cr-code-box {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--cr-ok-bd);
  background: var(--cr-ok-bg);
}
.cr-code-box__label {
  margin: 0;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cr-emerald-deep);
}
.cr-code-box__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.cr-code-box__code {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--cr-ok-bd);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: var(--cr-ok-fg);
}
.cr-code-box__hint {
  margin: 0;
  flex: 1 1 160px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--cr-muted);
}

.cr-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--cr-line-soft);
}

/* —— Empty / no results —— */
.cr-empty {
  margin-top: 1.25rem;
  padding: 3rem 1.5rem;
  text-align: center;
  border: 1px dashed #c5d0d4;
  background: var(--cr-panel);
}
.cr-empty__title {
  margin: 8px 0 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.cr-empty__text {
  margin: 8px auto 0;
  max-width: 42ch;
  font-size: 13px;
  line-height: 1.65;
  color: var(--cr-muted);
}
.cr-empty[hidden],
.cr-no-match[hidden] {
  display: none !important;
}

/* —— Aide équipes —— */
.cr-help {
  margin: 2rem 0 2.5rem;
  padding: 1.5rem 1.25rem;
  border: 1px dashed #c5d0d4;
  background: rgba(255, 255, 255, 0.65);
  text-align: center;
}
.cr-help__title {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.cr-help__text {
  margin: 10px auto 0;
  max-width: 62ch;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--cr-muted);
}
.cr-help__text strong {
  font-weight: 700;
  color: var(--cr-ink);
}

@media (prefers-reduced-motion: reduce) {
  .cr-rise,
  .cr-hero::after,
  .cr-count__dot,
  .cr-pulse,
  .cr-card,
  .cr-card__cover img,
  .cr-btn {
    animation: none !important;
    transition: none !important;
  }
}

.cr-card--featured {
  outline: 1px solid rgba(4, 120, 87, 0.35);
  box-shadow: 0 10px 28px -18px rgba(4, 120, 87, 0.55);
}
.cr-pill--featured {
  background: #047857;
  color: #fff;
  border-color: #047857;
}

/* —— Épinglage (administration du site) —— */
.cr-card--pinned {
  outline: 2px solid var(--cr-pin);
  box-shadow: 0 14px 34px -20px var(--cr-pin-glow);
}
.cr-pill--pinned {
  gap: 5px;
  background: var(--cr-pin);
  color: var(--cr-on-pin);
}
.cr-pill--pinned svg { width: 10px; height: 10px; }
.cr-pill--trend {
  background: rgba(12, 17, 22, 0.78);
  color: #7ff0c4;
  border: 1px solid rgba(18, 209, 142, 0.55);
  backdrop-filter: blur(6px);
}

/* —— Recherche —— */
.cr-search { max-width: none; flex: 1 1 100%; }
.cr-search__input { height: 46px; font-size: 14px; padding-right: 44px; }
.cr-search__kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cr-line);
  background: var(--cr-line-soft);
  color: var(--cr-soft);
  font: 700 11px/1 'JetBrains Mono', ui-monospace, monospace;
  pointer-events: none;
}
.cr-search__input:focus + .cr-search__kbd { opacity: 0; }

/* —— Unités en tendance —— */
.cr-trend {
  margin-top: 1.25rem;
  padding: 1.1rem 1.15rem 1.2rem;
  border: 1px solid var(--cr-line);
  background:
    radial-gradient(ellipse 60% 120% at 100% 0%, rgba(18, 209, 142, 0.10), transparent 60%),
    var(--cr-panel);
}
.cr-trend[hidden],
.cr-btn[hidden] { display: none; }
.cr-trend__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px 18px;
}
.cr-kicker--trend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cr-emerald-deep);
}
.cr-kicker--trend svg { width: 14px; height: 14px; }
.cr-trend__title {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.cr-trend__hint {
  margin: 0;
  max-width: 420px;
  font-size: 12px;
  color: var(--cr-muted);
}
.cr-trend__list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.cr-trend__card {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid var(--cr-line);
  background: var(--cr-panel);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.cr-trend__card:hover { border-color: var(--cr-emerald); transform: translateY(-1px); }
.cr-trend__card:focus-visible { outline: 2px solid var(--cr-emerald); outline-offset: 2px; }
.cr-trend__rank {
  flex: 0 0 auto;
  font: 800 13px/1 'JetBrains Mono', ui-monospace, monospace;
  color: var(--cr-emerald-deep);
}
.cr-trend__logo {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--cr-dark);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
}
.cr-trend__logo img { width: 100%; height: 100%; object-fit: cover; }
.cr-trend__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.cr-trend__name {
  font-weight: 800;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cr-trend__meta {
  font-size: 11px;
  color: var(--cr-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cr-trend__signals { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.cr-trend__signal {
  padding: 2px 6px;
  border: 1px solid var(--cr-line);
  background: var(--cr-line-soft);
  font-size: 10px;
  font-weight: 700;
  color: var(--cr-muted);
}
.cr-trend__signal--up {
  border-color: var(--cr-ok-bd);
  background: var(--cr-ok-bg);
  color: var(--cr-ok-fg);
}
.cr-trend__go { color: var(--cr-soft); font-weight: 800; }

/* Jetons d'épinglage (jour). */
.community-registry {
  --cr-pin: #b7791f;
  --cr-on-pin: #1d1303;
  --cr-pin-glow: rgba(183, 121, 31, 0.55);
}

/* —— Mode nuit (préférence athena.bo.theme, sinon le système) —— */
.community-registry[data-cr-theme="dark"] {
  --cr-ink: #e7eeeb;
  --cr-muted: #9aa8ad;
  --cr-soft: #7b898e;
  --cr-line: #22302d;
  --cr-line-soft: #141c1a;
  --cr-bg: #0b1012;
  --cr-panel: #111917;
  --cr-emerald-deep: #3fe0a6;
  --cr-warn-fg: #f2c46a;
  --cr-warn-bg: #2a2212;
  --cr-warn-bd: #4d3c17;
  --cr-ok-fg: #7fe3bd;
  --cr-ok-bg: #10241c;
  --cr-ok-bd: #1d4a39;
  --cr-info-fg: #9cc6f0;
  --cr-info-bg: #12202e;
  --cr-info-bd: #23394f;
  --cr-pin: #e0a43a;
  --cr-on-pin: #1d1303;
  --cr-pin-glow: rgba(224, 164, 58, 0.45);
  color-scheme: dark;
}
.community-registry[data-cr-theme="dark"] .cr-pill--muted { background: var(--cr-line-soft); }
.community-registry[data-cr-theme="dark"] .cr-chip:hover { border-color: #3a4b47; }
.community-registry[data-cr-theme="dark"] .cr-btn--ink { background: var(--cr-emerald); color: var(--cr-on-accent); }
.community-registry[data-cr-theme="dark"] .cr-empty,
.community-registry[data-cr-theme="dark"] .cr-help { background: var(--cr-panel); border-color: var(--cr-line); }
.community-registry[data-cr-theme="dark"] .cr-excerpt,
.community-registry[data-cr-theme="dark"] .cr-help__text { color: var(--cr-muted); }
.community-registry[data-cr-theme="dark"] .cr-card--featured { outline-color: rgba(63, 224, 166, 0.4); }
.community-registry[data-cr-theme="dark"] .cr-card:hover { box-shadow: 0 10px 28px -18px rgba(0, 0, 0, 0.8); }

@media (max-width: 640px) {
  .cr-chips { width: 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .cr-chip { flex: 0 0 auto; }
  .cr-trend__list { grid-template-columns: 1fr; }
}

/* —— Hero : badge « images » + chiffres en mono (inspiration motion.dev) —— */
.cr-hero__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  margin-top: 2.25rem;
}
.cr-hero__aside .ib { margin-top: 30px; }
.cr-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.cr-hero__stats > div {
  padding: 10px 18px 0 0;
  margin-right: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}
.cr-hero__stats > div:last-child { border-right: 0; margin-right: 0; }
.cr-hero__stats dt,
.cr-hero__stats dd {
  margin: 0;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-transform: uppercase;
}
.cr-hero__stats dt {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--cr-emerald);
}
.cr-hero__stats dd {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
}
@media (min-width: 900px) {
  .cr-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 3rem;
  }
  .cr-hero__inner > * { grid-column: 1; }
  .cr-hero__inner > .cr-hero__aside {
    grid-column: 2;
    grid-row: 1 / span 6;
    align-self: center;
    align-items: center;
    margin-top: 0;
  }
}

/* Compteurs des puces de filtre */
.cr-chip__n {
  margin-left: 4px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  font-weight: 700;
  opacity: 0.6;
}
.cr-chip.is-active .cr-chip__n { opacity: 0.85; }

/* —— Cartes mises en valeur : bannière, couleur de marque, chiffres —— */
.cr-card {
  --cr-acc: var(--cr-emerald);
  position: relative;
  overflow: hidden;
}
.cr-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 3;
  background: var(--cr-acc);
  opacity: 0.85;
}
.cr-card:hover {
  border-color: color-mix(in srgb, var(--cr-acc) 60%, transparent);
  box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--cr-acc) 70%, transparent), 0 6px 14px -10px rgba(12, 17, 22, 0.25);
  transform: translateY(-3px);
}
.cr-card__cover { height: 196px; }
.cr-card__cover img { opacity: 0.92; }
.cr-card.has-accent .cr-card__cover-fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--cr-acc) 55%, transparent), transparent 52%),
    linear-gradient(160deg, color-mix(in srgb, var(--cr-acc) 22%, transparent), transparent 60%);
  mix-blend-mode: screen;
}
.cr-card__cover-fallback::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.cr-card__name { font-size: 1.3rem; }

.cr-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--cr-line);
  background: var(--cr-bg);
}
.cr-stat {
  min-width: 0;
  padding: 0.7rem 0.85rem 0.75rem;
  border-left: 1px solid var(--cr-line-soft);
}
.cr-stat:first-child { border-left: 0; }
.cr-stat dt {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cr-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cr-stat dd {
  margin: 3px 0 0;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--cr-ink);
}
.cr-stat dd small { font-size: 0.75rem; font-weight: 800; color: var(--cr-muted); }
.cr-stat:first-child dd { color: color-mix(in srgb, var(--cr-acc) 75%, var(--cr-ink)); }

.cr-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 0 1 auto;
}
.cr-excerpt--empty { font-style: italic; color: var(--cr-soft); }
.cr-card__body > .cr-tags + .cr-excerpt { margin-top: 12px; }

.cr-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.cr-fact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cr-muted);
}
.cr-fact--live { color: var(--cr-emerald-deep); }
.cr-stars {
  font-size: 12px;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #f5b301 var(--v, 0%), var(--cr-line) var(--v, 0%));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cr-code {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 6px 6px 6px 12px;
  border: 1px dashed var(--cr-ok-bd);
  background: var(--cr-ok-bg);
  min-width: 0;
}
.cr-code__label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cr-emerald-deep);
}
.cr-code__value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cr-ok-fg);
}
.cr-code__copy {
  flex: none;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--cr-ok-bd);
  background: var(--cr-panel);
  color: var(--cr-ink);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.cr-code__copy:hover { border-color: var(--cr-emerald); color: var(--cr-emerald-deep); }
.cr-card__actions { margin-top: auto; padding-top: 14px; }
.cr-card__body > .cr-code + .cr-card__actions,
.cr-card__body > .cr-facts + .cr-card__actions,
.cr-card__body > .cr-excerpt + .cr-card__actions { margin-top: 16px; }
.cr-card__body { gap: 0; }
.cr-card__body::after { content: ""; flex: 1 0 0; order: 98; }
.cr-card__actions { order: 99; }

/* Carte épinglée : vitrine pleine largeur, bannière à gauche. */
@media (min-width: 900px) {
  .cr-card--spot {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }
  .cr-card--spot .cr-card__cover {
    grid-column: 1;
    grid-row: 1 / span 2;
    height: auto;
    min-height: 340px;
    border-bottom: 0;
    border-right: 1px solid var(--cr-line);
  }
  .cr-card--spot .cr-stats { grid-column: 2; grid-row: 1; }
  .cr-card--spot .cr-card__body { grid-column: 2; grid-row: 2; }
  .cr-card--spot .cr-card__name { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
  .cr-card--spot .cr-card__logo { width: 64px; height: 64px; }
  .cr-card--spot .cr-stat dd { font-size: 1.6rem; }
  .cr-card--spot .cr-excerpt { -webkit-line-clamp: 6; }
}
@media (max-width: 479px) {
  .cr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cr-stat:nth-child(3) { border-left: 0; }
  .cr-stat:nth-child(n + 3) { border-top: 1px solid var(--cr-line-soft); }
}
.community-registry[data-cr-theme="dark"] .cr-stats { background: #0d1513; }
.community-registry[data-cr-theme="dark"] .cr-card:hover { box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--cr-acc) 55%, transparent), 0 10px 28px -18px rgba(0, 0, 0, 0.8); }
@media (prefers-reduced-motion: reduce) {
  .cr-card:hover { transform: none; }
}

/* Communautés qui soutiennent Athena (DonorService::tenantSupport) */
.cr-pill--supporter { color: #fff; background: linear-gradient(135deg, #d9467a, #b5367f); border-color: transparent; }
.cr-pill--supporter svg { width: 12px; height: 12px; }
.cr-card.cr-card--supporter { box-shadow: 0 0 0 1px rgba(217, 70, 122, .55), 0 10px 30px -18px rgba(217, 70, 122, .7); }
.cr-card.cr-card--supporter::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 3; background: linear-gradient(90deg, #f5b301, #d9467a 55%, #7c3aed); pointer-events: none; }

/* —— Barre de filtres : recherche, bouton « Filtres », tri —— */
.cr-filters { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.cr-filters__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
}
.cr-filters__bar .cr-search { flex: 1 1 260px; max-width: none; }
.cr-fbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--cr-line);
  background: var(--cr-panel);
  color: var(--cr-ink);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.cr-fbtn[hidden] { display: none; }
.cr-fbtn svg { width: 16px; height: 16px; }
.cr-fbtn:hover { border-color: var(--cr-emerald); color: var(--cr-emerald-deep); }
.cr-fbtn:focus-visible { outline: 2px solid var(--cr-emerald); outline-offset: 2px; }
.cr-fbtn__n {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cr-emerald);
  color: var(--cr-on-accent);
  font: 800 11px/1 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0;
}
.cr-fbtn__n[hidden] { display: none; }
.cr-sortbox {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 190px;
  height: 46px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--cr-line);
  background: var(--cr-panel);
  cursor: pointer;
}
.cr-sortbox::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--cr-soft);
  border-bottom: 2px solid var(--cr-soft);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.cr-sortbox:focus-within { border-color: var(--cr-emerald); }
.cr-sortbox__label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cr-soft);
  line-height: 1.2;
}
.cr-sortbox select {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: var(--cr-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}
.cr-sortbox select:focus { outline: none; }
.cr-sortbox select option { color: #0c1116; background: #fff; }

/* Puces des filtres actifs */
.cr-active {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}
.cr-active[hidden] { display: none; }
.cr-active__label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cr-soft);
}
.cr-active__list { display: contents; list-style: none; margin: 0; padding: 0; }
.cr-active__list li { display: inline-flex; }
.cr-apill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--cr-ok-bd);
  background: var(--cr-ok-bg);
  color: var(--cr-ok-fg);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.cr-apill svg { width: 12px; height: 12px; opacity: 0.75; }
.cr-apill:hover svg { opacity: 1; }
.cr-apill:focus-visible,
.cr-active__clear:focus-visible { outline: 2px solid var(--cr-emerald); outline-offset: 2px; }
.cr-active__clear {
  border: 0;
  background: none;
  padding: 4px 2px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--cr-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.cr-active__clear:hover { color: var(--cr-ink); }

/* —— Panneau des filtres (fenêtre modale ; affiché en ligne sans JavaScript) —— */
.cr-fdialog {
  display: none;
  padding: 0;
  border: 1px solid var(--cr-line);
  background: var(--cr-panel);
  color: var(--cr-ink);
  width: min(720px, calc(100vw - 32px));
  max-height: min(86vh, 860px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.55);
}
.cr-fdialog[open] { display: block; }
.cr-fdialog.is-inline { position: static; width: auto; max-height: none; margin: 0; box-shadow: none; }
.cr-fdialog.is-inline .cr-fdialog__close,
.cr-fdialog.is-inline .cr-fdialog__apply { display: none; }
.cr-fdialog::backdrop { background: rgba(6, 10, 12, 0.6); backdrop-filter: blur(3px); }
.cr-fdialog__panel {
  display: flex;
  flex-direction: column;
  max-height: inherit;
}
.cr-fdialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--cr-line);
}
.cr-fdialog__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.cr-fdialog__close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--cr-line);
  background: transparent;
  color: var(--cr-ink);
  cursor: pointer;
}
.cr-fdialog__close svg { width: 16px; height: 16px; }
.cr-fdialog__close:hover { border-color: var(--cr-emerald); color: var(--cr-emerald-deep); }
.cr-fdialog__close:focus-visible { outline: 2px solid var(--cr-emerald); outline-offset: 2px; }
.cr-fdialog__body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 20px 8px;
}
.cr-fdialog__foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--cr-line);
  background: var(--cr-line-soft);
}
.cr-fdialog__apply { flex: 0 1 auto; min-width: 200px; }

.cr-facet {
  border: 0;
  margin: 0;
  padding: 16px 0;
  min-width: 0;
}
.cr-facet + .cr-facet { border-top: 1px solid var(--cr-line-soft); }
.cr-facet__title {
  padding: 0;
  margin-bottom: 10px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cr-muted);
}
.cr-facet__find {
  width: 100%;
  height: 36px;
  margin-bottom: 10px;
  padding: 0 10px;
  border: 1px solid var(--cr-line);
  background: var(--cr-bg);
  color: var(--cr-ink);
  font: inherit;
  font-size: 13px;
}
.cr-facet__find:focus { outline: none; border-color: var(--cr-emerald); }
.cr-facet__opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cr-facet__opts--scroll { max-height: 196px; overflow-y: auto; padding: 2px; }
.cr-opt {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--cr-line);
  background: var(--cr-panel);
  font-size: 13px;
  font-weight: 600;
  color: var(--cr-ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cr-opt[hidden] { display: none; }
.cr-opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.cr-opt:hover { border-color: #c5d0d4; }
.cr-opt:has(input:checked) {
  border-color: var(--cr-emerald);
  background: var(--cr-ok-bg);
  color: var(--cr-ok-fg);
}
.cr-opt:has(input:focus-visible) { outline: 2px solid var(--cr-emerald); outline-offset: 2px; }
.cr-opt__n {
  font: 700 11px/1 'JetBrains Mono', ui-monospace, monospace;
  color: var(--cr-soft);
}
.cr-opt:has(input:checked) .cr-opt__n { color: inherit; opacity: 0.8; }
.community-registry[data-cr-theme="dark"] .cr-opt:hover { border-color: #3a4b47; }
.community-registry[data-cr-theme="dark"] .cr-fdialog::backdrop { background: rgba(0, 0, 0, 0.7); }

@media (max-width: 640px) {
  .cr-filters__bar .cr-search { flex: 1 1 100%; }
  .cr-fbtn { flex: 1 1 0; justify-content: center; }
  .cr-sortbox { flex: 1 1 0; min-width: 0; }
  /* Feuille du bas sur mobile */
  .cr-fdialog.is-modal {
    width: 100vw;
    max-width: 100vw;
    max-height: 90vh;
    margin: auto 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }
  .cr-fdialog__head, .cr-fdialog__foot { padding-left: 16px; padding-right: 16px; }
  .cr-fdialog__body { padding-left: 16px; padding-right: 16px; }
  .cr-fdialog__foot { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .cr-fdialog__apply { flex: 1 1 auto; min-width: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .cr-fdialog.is-modal[open] { animation: crSheetIn 0.18s ease-out; }
}
@keyframes crSheetIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
