*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Sora', 'Inter', sans-serif;
  background: #0b0a1a;
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 10%, rgba(244, 114, 182, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(34, 211, 238, 0.06) 0%, transparent 50%);
  color: #e2e8f0;
  min-height: 100vh;
  overflow-x: hidden;
}
#app {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 40px;
  z-index: 1;
}

/* Hero */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
}
.hero h1 {
  font-family: 'Sora', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #60a5fa, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}
.hero .subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  color: #b0bec5;
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.6;
}
.hero .subtitle + .subtitle {
  margin-top: 12px;
}
.hero-strip {
  font-family: 'Sora', sans-serif;
  margin: 18px auto 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.15);
  color: #c4b5fd;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Fil d'Ariane */
.breadcrumb {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 16px 0 0;
  text-align: center;
}
.breadcrumb a {
  color: #a78bfa;
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span[aria-current] { color: #c4b5fd; font-weight: 600; }

/* Sélecteur de catégorie */
.cat-switch-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 0 0 24px;
}
.cat-switch-bar label {
  font-size: 0.88rem;
  color: #b0bec5;
  font-weight: 500;
}
.filter-select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #e2e8f0;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 10px 36px 10px 14px;
  cursor: pointer;
  transition: all 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a78bfa' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 5.5l6.5 6 6.5-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.filter-select:hover, .filter-select:focus {
  border-color: rgba(167, 139, 250, 0.5);
  background-color: rgba(255, 255, 255, 0.1);
  outline: none;
}
.view-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #94a3b8;
  font-size: 1.1rem;
  width: 38px;
  height: 38px;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.view-toggle:hover {
  border-color: rgba(167, 139, 250, 0.5);
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}
.view-toggle.active {
  border-color: rgba(103, 232, 249, 0.5);
  background: rgba(103, 232, 249, 0.1);
  color: #67e8f9;
}

/* Section commune */
.section {
  background: rgba(20, 20, 35, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 36px 32px;
  margin-bottom: 24px;
}
.section h2 {
  font-family: 'Sora', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #60a5fa, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}
.section p {
  color: #b0bec5;
  line-height: 1.7;
  font-size: 0.95rem;
}
.section p + p { margin-top: 12px; }
.section strong { color: #e2e8f0; }
.section:nth-child(odd) { background: rgba(255, 255, 255, 0.04); }
.section:nth-child(even) {
  background: rgba(99, 102, 241, 0.03);
  border-color: rgba(99, 102, 241, 0.1);
}

/* Bloc défis du jour */
.quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.quick-links a {
  display: block;
  text-align: center;
  text-decoration: none;
  color: #e5e7eb;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.quick-links a:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.06);
}

/* Grille de jeux (copie du portail) */
.games-title {
  font-family: 'Sora', sans-serif;
  margin: 6px 0 0;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  color: #c4b5fd;
}
.games-subtitle {
  text-align: center;
  margin: 8px 0 14px;
  color: #b0bec5;
  font-size: 0.95rem;
}
.games-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 24px 0 40px;
  justify-items: center;
}
.game-card {
  background: rgba(20, 20, 35, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, border-color 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  max-width: 330px;
  width: 100%;
  min-height: 330px;
  position: relative;
  overflow: hidden;
}
.game-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(103, 232, 249, 0.35);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.2), 0 0 20px rgba(103, 232, 249, 0.08);
}
.card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.game-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.35), rgba(15, 23, 42, 0.85));
  z-index: 1;
}
.game-card .emoji,
.game-card .name,
.game-card .desc,
.game-card .game-meta,
.game-card .game-cta { position: relative; z-index: 2; }
.game-card .emoji { display: none; font-size: 2.8rem; margin-bottom: 14px; line-height: 1; }
.game-card .name {
  font-family: 'Sora', sans-serif;
  margin-top: 60px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}
.game-card .desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  min-height: 41px;
  line-height: 1.5;
  text-shadow: 0 2px 10px rgba(0,0,0,0.9), 0 0 20px rgba(0,0,0,0.6);
}
.game-meta {
  width: 100%;
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.meta-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.meta-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(15, 23, 42, 1);
}
.game-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244, 114, 182, 1);
  color: #fce7f3;
  background: rgba(100, 20, 60, 0.9);
}
.game-badge.defi {
  border-color: rgba(251, 191, 36, 1);
  color: #fef08a;
  background: rgba(120, 80, 0, 0.9);
}
.game-badge.category {
  border-color: rgba(129, 140, 248, 1);
  color: #e0e7ff;
  background: rgba(55, 48, 120, 0.9);
}
.game-badge.multi20 {
  border-color: rgba(34, 211, 238, 1);
  color: #a5f3fc;
  background: rgba(0, 80, 95, 0.9);
}
.game-cta {
  font-family: 'Sora', sans-serif;
  margin-top: 14px;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ffffff;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid rgba(167, 139, 250, 0.4);
  transition: box-shadow 0.3s;
}
.game-card:hover .game-cta {
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.4);
}

/* Mode liste */
.games-grid.list-mode {
  grid-template-columns: 1fr;
  gap: 8px;
}
.games-grid.list-mode .game-card {
  flex-direction: row;
  align-items: center;
  text-align: left;
  max-width: 100%;
  min-height: 0;
  height: auto;
  padding: 12px 18px;
  gap: 14px;
  border-radius: 12px;
  background-image: none !important;
  background: rgba(255, 255, 255, 0.04);
}
.games-grid.list-mode .game-card:hover { transform: translateY(-2px) scale(1); }
.games-grid.list-mode .card-bg,
.games-grid.list-mode .game-card::before,
.games-grid.list-mode .desc,
.games-grid.list-mode .game-meta,
.games-grid.list-mode .game-cta { display: none; }
.games-grid.list-mode .emoji {
  display: flex !important;
  font-size: 1.6rem;
  margin: 0;
  flex-shrink: 0;
}
.games-grid.list-mode .name { margin: 0; font-size: 1rem; text-shadow: none; }

/* FAQ */
.faq-list { display: grid; gap: 12px; margin-top: 8px; }
.faq-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
}
.faq-item[open] {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.06);
}
.faq-item > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: '+';
  font-size: 1.4rem;
  color: #a78bfa;
  font-weight: 700;
  transition: transform 0.2s;
}
.faq-item[open] > summary::after { content: '−'; }
.faq-item .faq-answer {
  padding: 0 20px 16px;
  color: #b0bec5;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Bandeau CTA bas de page */
.cta-portail {
  text-align: center;
  margin-top: 16px;
}
.cta-portail a {
  display: inline-block;
  text-decoration: none;
  font-family: 'Sora', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border: 1px solid rgba(167, 139, 250, 0.45);
  border-radius: 999px;
  padding: 12px 22px;
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cta-portail a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.45);
}

/* Footer */
footer {
  text-align: center;
  padding: 32px 0 16px;
  color: #78909c;
  font-size: 0.8rem;
}
footer a {
  color: #b0bec5;
  text-decoration: none;
  transition: color 0.2s;
}
footer a:hover { color: #a78bfa; }

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Scroll reveal */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes revealScale {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.scroll-reveal { opacity: 0; }
.scroll-reveal.visible { animation: revealUp 0.6s ease-out forwards; }
.game-card.scroll-reveal.visible {
  animation: revealScale 0.75s ease-out forwards;
  animation-delay: calc(var(--i, 0) * 0.04s);
}

/* Responsive */
@media (min-width: 708px) { .games-grid { grid-template-columns: repeat(2, 1fr); } .games-grid.list-mode { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1038px) { .games-grid { grid-template-columns: repeat(3, 1fr); } .games-grid.list-mode { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .hero { padding: 0 16px 16px; }
  #app { padding: 45px 12px 30px; }
  .hero h1 { font-size: 1.4rem; margin-bottom: 8px; }
  .hero .subtitle { font-size: 0.85rem; }
  .hero-strip { font-size: 0.74rem; padding: 7px 10px; }
  .cat-switch-bar { flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 16px; }
  .cat-switch-bar > :not(.cat-switch-label) { flex: 0 0 auto; }
  .filter-select { font-size: 0.78rem; padding: 8px 28px 8px 10px; border-radius: 8px; white-space: nowrap; background-position: right 8px center; }
  .games-grid { margin-top: 0; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .section { padding: 24px 18px; }
  .section h2 { font-size: 1.2rem; }
  .game-card {
    padding: 10px 8px;
    aspect-ratio: 1 / 1;
    min-height: 0;
    max-width: none;
    border-radius: 12px;
    justify-content: flex-end;
  }
  .game-card .name { margin-top: 0; font-size: 0.9rem; margin-bottom: 0; }
  .game-card .desc,
  .game-card .game-meta,
  .game-card .game-cta { display: none; }
  .faq-item > summary { font-size: 0.92rem; padding: 14px 16px; }
  .faq-item .faq-answer { font-size: 0.88rem; padding: 0 16px 14px; }
}
