/* Widgets catalogue (base claire — surchargée par body.ch-chess-home) */
.cat-widget {
  border-radius: 0.95rem;
  overflow: hidden;
  border: 2px solid rgba(22, 101, 52, 0.26);
  background: #fff;
  box-shadow: 0 10px 32px rgba(20, 83, 45, 0.1);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: box-shadow 0.18s, transform 0.18s;
}
.cat-widget:hover {
  box-shadow: 0 14px 40px rgba(20, 83, 45, 0.14);
  transform: translateY(-2px);
}
.cat-widget__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #166534 0%, #14532d 100%);
  text-decoration: none;
  cursor: pointer;
}
a.cat-widget__head:hover {
  filter: brightness(1.06);
  color: #fff;
}
div.cat-widget__head {
  cursor: default;
}
.cat-widget__head-ic {
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.95;
}
.cat-widget__banner {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  min-height: 120px;
  background: linear-gradient(145deg, #334155 0%, #1e293b 100%);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.cat-widget__banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cat-widget__banner-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 2.25rem;
  opacity: 0.35;
  color: #94a3b8;
}
.cat-widget__body {
  flex: 1;
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  padding: 0.55rem 0.6rem 0.65rem;
}
.cat-widget__desc {
  font-size: 0.78rem;
  color: #475569;
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 0.65rem 0.15rem;
}
.cat-widget__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cat-widget__list li {
  margin-bottom: 0.35rem;
}
.cat-widget__list li:last-child {
  margin-bottom: 0;
}
.cat-widget-game {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.4rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--vert-900, #14532d);
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(22, 101, 52, 0.15);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.cat-widget-game:hover {
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: 0 4px 14px rgba(20, 83, 45, 0.1);
  transform: translateY(-1px);
}
.cat-widget-game__thumb {
  width: 40px;
  height: 40px;
  border-radius: 0.4rem;
  object-fit: cover;
  flex-shrink: 0;
  background: #e2e8f0;
}
.cat-widget-game__ph {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 0.4rem;
  background: rgba(148, 163, 184, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  opacity: 0.6;
}
.cat-widget-game__title {
  min-width: 0;
  line-height: 1.25;
}
.cat-widget__footer {
  margin-top: auto;
}
.cat-widget__all {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--orange-700, #c2410c);
  background: rgba(254, 243, 199, 0.65);
  text-decoration: none;
  border-top: 2px dashed rgba(22, 101, 52, 0.14);
}
.cat-widget__all:hover {
  background: rgba(254, 215, 170, 0.75);
  color: var(--orange-600, #ea580c);
}
.cat-widget__all-arr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--orange, #ea580c);
  color: #fff;
  font-size: 0.72rem;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Thème sombre — aligné sur l’accueil et les pages Échecs */
body.ch-chess-home {
  background: #1e293b;
  color: #e2e8f0;
}
body.ch-chess-home .page-surface {
  background: transparent;
}
body.ch-chess-home .site-topbar {
  background: linear-gradient(180deg, #475569 0%, #334155 52%, #1e293b 100%);
  border-bottom: 6px solid #0f172a;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.4);
}
body.ch-chess-home .brand-crown-char {
  filter: drop-shadow(3px 3px 0 #0f172a);
}
body.ch-chess-home .brand-type {
  text-shadow: 3px 3px 0 #0f172a, -1px -1px 0 rgba(0, 0, 0, 0.25);
}
body.ch-chess-home .site-nav-main a {
  background: #334155;
  color: #f1f5f9;
  border-color: #64748b;
  box-shadow: 4px 4px 0 #0f172a;
}
body.ch-chess-home .site-nav-main a:hover {
  color: #f8fafc;
  background: #475569;
  box-shadow: 6px 6px 0 #0f172a;
}
body.ch-chess-home .site-nav-main a.nav-active {
  color: #fef08a;
  background: #475569;
}
body.ch-chess-home .auth-inscription {
  background: #fef9c3;
  color: #0f172a;
  border-color: #64748b;
  box-shadow: 4px 4px 0 #0f172a;
}
body.ch-chess-home .auth-connexion {
  background: #334155;
  color: #f1f5f9;
  border-color: #94a3b8;
  box-shadow: 4px 4px 0 #0f172a;
}
body.ch-chess-home .auth-connexion:hover {
  background: #475569;
  color: #f8fafc;
}
body.ch-chess-home .auth-deco {
  background: #334155;
  color: #e2e8f0;
}
body.ch-chess-home .auth-pseudo-label {
  color: #f1f5f9;
}
body.ch-chess-home .auth-user-trigger,
body.ch-chess-home .auth-user-menu.is-open .auth-user-trigger {
  background: #334155;
  color: #f1f5f9;
  border-color: #94a3b8;
  box-shadow: 4px 4px 0 #0f172a;
}
body.ch-chess-home .auth-user-trigger:hover {
  background: #475569;
  color: #f8fafc;
  box-shadow: 6px 6px 0 #0f172a;
}
body.ch-chess-home .auth-user-trigger--current {
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.5), 4px 4px 0 #0f172a;
}
body.ch-chess-home .auth-user-menu.is-open .auth-user-trigger {
  border-color: #fbbf24;
}
body.ch-chess-home .auth-user-chevron {
  color: #f1f5f9;
}
body.ch-chess-home .cat-widget-game .cat-widget-game__title {
  color: #f1f5f9;
}
body.ch-chess-home .cat-widget-game__ph {
  color: #94a3b8;
}
body.ch-chess-home .cat-widget {
  background: #334155;
  border-color: #64748b;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}
body.ch-chess-home .cat-widget__body {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
}
body.ch-chess-home .cat-widget__desc {
  color: #94a3b8;
}
body.ch-chess-home .cat-widget__desc strong {
  color: #e2e8f0;
}
body.ch-chess-home .cat-widget-game {
  background: rgba(51, 65, 85, 0.75);
  border-color: #64748b;
  color: #e2e8f0;
}
body.ch-chess-home .cat-widget-game:hover {
  border-color: #a3e635;
  background: #475569;
}
body.ch-chess-home .cat-widget__footer {
  background: rgba(15, 23, 42, 0.5);
  border-color: #475569;
}
body.ch-chess-home .cat-widget__all {
  background: rgba(30, 41, 59, 0.8);
  border-top-color: #475569;
  color: #fde68a;
}
body.ch-chess-home .cat-widget__all:hover {
  background: rgba(51, 65, 85, 0.95);
  color: #fef08a;
}
