:root {
  --backdrop: blur(8px);
  --text: #f4f6fb;
  --muted: #c5c9d6;
  --accent: #7cf2d0;
  --panel: #12141a;
  --link: #8aa8ff;
  --primary: #7cf2d0;
  --bg: #0d0d0f;
  --border: #222227;
  --gap: 12px;
  --thumb-w: 220px;
  --ui-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ===== BASE ===== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.main {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui-font);
  line-height: 1.6;
}

/* ===== HERO ===== */
.hero {
  position: relative; height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background: linear-gradient(90deg, #16202b, #11151c);
}
.bg-video {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.overlay { position: relative; z-index: 1; }
.hero__actions { margin-top: 20px; display: flex; gap: 12px; justify-content: center; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block; padding: 12px 16px; border-radius: 10px;
  background: #1a1f29; color: var(--text); border: 1px solid var(--border);
  font-weight: 700; text-decoration: none;
  transition: all 0.3s ease;
}
.btn--primary { background: var(--primary); color: #072018; border-color: #59e9bd; }
.btn--primary:hover { background: #5ddbb2; }
.btn--ghost { background: transparent; border-color: var(--border); }

/* ===== NEWS ===== */
.news { padding: 40px 24px; max-width: 1100px; margin: 0 auto; }
.news__header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.news__list { display: grid; gap: 16px; }
.news__item { background: var(--panel); padding: 16px; border-radius: 12px; border: 1px solid var(--border); }
.news__item h3 { margin: 0 0 8px; }

/* ===== GRID (CREATIONS) ===== */
.grid { padding: 32px 24px; max-width: 1100px; margin: 0 auto; }
.grid__header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.grid__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.card img { width: 100%; height: 160px; object-fit: cover; }
.card__body { padding: 14px; }

/* ===== HUB (Community) ===== */
.hub {
  padding: 64px 24px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}
.hub__header h2 { font-size: 32px; margin-bottom: 8px; }
.hub__header p { color: var(--muted); margin-bottom: 32px; }
.hub__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.hub__item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.hub__item:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.hub__icon { width: 48px; height: 48px; object-fit: contain; }

/* ===== DEALS ===== */
.deals { margin: 12px 0 0; padding: 40px 24px; background: linear-gradient(90deg, #16202b, #11151c); text-align: center; }

/* ===== CAROUSEL (global only; header-specific carousel chips/indicators remain untouched) ===== */
.hero-carousel { margin-top: 0; margin-bottom: -50px; position: relative; height: 700px; background: #000; }
.carousel-section { margin-top: 60px; padding: 60px 40px 40px; max-width: 1400px; margin-left: auto; margin-right: auto; }
.carousel-container { display: flex; gap: 20px; align-items: stretch; }
.carousel-main { flex: 1; position: relative; overflow: hidden; border-radius: 8px; background: #111; min-height: 500px; }
.carousel-slide {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 0.8s ease;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 50px;
  background-size: cover; background-position: center;
}
.carousel-slide.active { opacity: 1; }
.slide-logo { font-size: 64px; font-weight: 900; margin-bottom: 0; letter-spacing: 2px; text-transform: uppercase; }
.slide-subtitle { font-size: 18px; color: #ffffff; margin-bottom: 30px; }
.slide-button {
  display: inline-block; padding: 12px 30px; background: #ffffff; color: #000; text-decoration: none;
  font-weight: 600; font-size: 13px; border-radius: 10px; border: 1px solid #fff; transition: background .2s;
  text-transform: uppercase; letter-spacing: .5px; width: fit-content;
}
.slide-button:hover { background: #92929244; color: #ffffff; }

/* Carousel chips/indicators (global) */
.carousel-chips { display: flex; flex-direction: column; gap: 15px; width: 280px; }
.chip { background: #11111100; }
.carousel-indicators { position: absolute; bottom: 30px; left: 50px; display: flex; gap: 10px; z-index: 10; }
.indicator { width: 40px; height: 3px; background: rgba(255,255,255,0.3); cursor: pointer; transition: background .3s; }
.indicator.active { background: #fff; }

/* ===== NEWSWIRE ===== */
.newswire-section { padding: 60px 40px; max-width: 1400px; margin: 0 auto; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.section-title { font-size: 28px; font-weight: 700; }
.view-all { color: #999; text-decoration: none; font-size: 13px; font-weight: 500; }
.view-all:hover { color: #fff; }
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  align-items: start;
  /* assure qu'on a une seule ligne visible (sécurité si CSS seul masque les extras) */
  max-width: 100%;
}
.news-card { background: #111; border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform .3s; }
.news-card:hover { transform: translateY(-5px); }
.news-image { width: 100%; height: 200px; background: linear-gradient(135deg, #333 0%, #111 100%); display: flex; align-items: center; justify-content: center; font-size: 48px; }
.news-content { padding: 25px; }
.news-tag { color: #f90; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; font-weight: 600; }
.news-title { font-size: 18px; font-weight: 600; line-height: 1.4; margin-bottom: 12px; }
.news-date { color: #666; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }

/* ===== GAMES CATALOG ===== */
.games-catalog { padding: 60px 40px; max-width: 1400px; margin: 0 auto; background: #0a0a0a; margin-bottom: 40px; }
.games-grid { 
  display: grid; 
  grid-template-columns: repeat(5, 1fr);
  align-items: start;
  gap: 20px; 
  /* assure qu'on a une seule ligne visible (sécurité si CSS seul masque les extras) */
  max-width: 100%;
}
.game-item { background: #111; border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform .3s; }
.game-item:hover { transform: scale(1.05); }
.game-cover { width: 100%; height: 280px; background: linear-gradient(135deg, #222 0%, #111 100%); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }
.game-name { padding: 7px; font-size: 16px; font-weight: 600; text-align: center; }

/* ===== GAME SECTION ===== */
.game-section { position: relative; min-height: 600px; background-size: cover; background-position: center; margin-bottom: 60px; }
.game-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.8)); }
.game-content { position: relative; max-width: 1400px; margin: 0 auto; padding: 80px 40px; min-height: 600px; display: flex; flex-direction: column; justify-content: flex-end; }
.game-logo { max-width: 300px; margin-bottom: 20px; }
.game-description { font-size: 16px; max-width: 600px; margin-bottom: 30px; line-height: 1.6; }
.game-buttons { display: flex; gap: 15px; margin-bottom: 30px; }
.game-platforms { display: flex; gap: 15px; align-items: center; }
.platform-icon { height: 20px; opacity: 0.7; }

/* ===== STORE SECTION ===== */
.store-section { padding: 20px 40px; max-width: 1400px; margin: 0 auto; background: #141414; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 30px; }
.store-card { background: #1a1a1a; border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform .3s; }
.store-card:hover { transform: translateY(-5px); }
.store-image { width: 100%; height: 250px; background: linear-gradient(135deg, #333 0%, #111 100%); }
.store-content { padding: 20px; }
.store-tag { display: inline-block; background: #f90; color: #000; padding: 4px 10px; border-radius: 3px; font-size: 10px; font-weight: 700; margin-bottom: 10px; text-transform: uppercase; }
.store-title { font-size: 16px; font-weight: 600; margin-bottom: 15px; }

/* ===== ANIMATIONS (scroll reveal) ===== */
section { opacity: 0; transform: translateY(20px); transition: all 0.8s ease; }
section.visible { opacity: 1; transform: translateY(0); }

/* ===== COMMON NAV / LOGO / LINKS (global helpers only) ===== */
.logo { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: 1px; }
.nav-links { display: flex; gap: 35px; list-style: none; }
.nav-links a { color: #999; text-decoration: none; font-size: 13px; font-weight: 500; transition: color .2s; text-transform: uppercase; }
.nav-links a:hover { color: #fff; }

/* ===== CAROUSEL ===== */
.hero-carousel { margin-top: 0px; margin-bottom: -50px; position: relative; height: 700px; background: #000; }
.carousel-section { margin-top: 60px; padding: 60px 40px 40px; max-width: 1400px; margin-left: auto; margin-right: auto; }
.carousel-container { display: flex; gap: 20px; align-items: stretch; }
.carousel-main { flex: 1; position: relative; overflow: hidden; border-radius: 8px; background: #111; min-height: 500px; }
.carousel-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.8s ease; display: flex; flex-direction: column; justify-content: flex-end; padding: 50px; background-size: cover; background-position: center; }
.carousel-slide.active { opacity: 1; }
.slide-logo { font-size: 64px; font-weight: 900; margin-bottom: 0px; letter-spacing: 2px; text-transform: uppercase; }
.slide-image { margin-bottom: 0px; }
.slide-subtitle { font-size: 18px; color: #ffffff; margin-bottom: 30px; }
.slide-button { display: inline-block; padding: 12px 30px; background: #ffffff; color: #000000; text-decoration: none; font-weight: 600; font-size: 13px; border-radius: 10px; border: 1px solid #fff; transition: background 0.2s; text-transform: uppercase; letter-spacing: 0.5px; width: fit-content; }
.slide-button:hover { background: #92929244; color: #ffffff; }

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .carousel-container { gap: 12px; }
  .games-grid, .news-grid, .store-grid { gap: 16px; }
}
@media (max-width: 968px) {
  .carousel-container { flex-direction: column; }
  .news-grid, .games-grid { grid-template-columns: 2fr 1fr; }
}
@media (max-width: 768px) {
  .news-grid, .store-grid { grid-template-columns: 2fr 1fr; }
  .hero { height: auto; padding: 80px 16px; }
  .games-grid {
    grid-template-columns: 1fr;
  }
}
