/* 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-filter-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 100%;
}
.cr-select {
  display: block;
  min-width: min(100%, 160px);
  flex: 1 1 140px;
  max-width: 220px;
}
.cr-select select {
  width: 100%;
  height: 40px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--cr-line);
  background: var(--cr-panel);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--cr-ink);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7c86' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.15s ease;
}
.cr-select select:focus {
  outline: none;
  border-color: var(--cr-emerald);
}
.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;
  }
}
