/* css/pages/index.css */
/* =========================================
   ACCUEIL
   ========================================= */

/* =========================================
   GENERAL / SHARED
   ========================================= */

.games-section,
.news-section {
  padding: 6rem 0;
  padding-bottom: 0;
  width: 100%;
}

/* =========================================
   1. HERO SECTION
   ========================================= */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hero-carousel-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.hero-carousel-slide.active {
  opacity: 1;
}

.hero-carousel-slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.hero-carousel-slide-overlay svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
}

.hero-carousel-slide-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(10, 10, 12, 0) 0%, rgba(10, 10, 12, 0.5) 75%, rgba(10, 10, 12, 1) 100%);
}

.hero-carousel-slide-content {
  position: relative;
  z-index: 3;
  color: #ffffff;
  padding: 0 4rem;
  max-width: 650px;
  text-align: left;
}

.hero-carousel-game-title {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #ffffff;
  text-shadow: 4px 4px 15px rgba(0, 0, 0, 0.75);
}

.hero-carousel-game-title::after {
  content: none !important;
}

.hero-carousel-game-subtitle {
  font-size: 1.8rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1.5rem;
  opacity: 0.9;
  text-shadow: 4px 4px 15px rgba(0, 0, 0, 0.75);
}

.hero-carousel-game-desc {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  margin-bottom: 2rem;
  text-shadow: 4px 4px 15px rgba(0, 0, 0, 0.75);
  height: 7.2rem;
  max-height: 7.2rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.hero-carousel-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hero-carousel-platforms {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-carousel-platform-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  width: 44px;
  height: 44px;
  opacity: 0.7;
}

.hero-carousel-platform-icon {
  width: 32px;
  height: 32px;
}

.hero-carousel-platform-link:hover {
  color: #ffffff;
  transform: scale(1.1);
  opacity: 1;
}

/* Scroll down button */
.scroll-down-container {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
}

.scroll-down-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  animation: bounce 2s infinite;
  padding: 10px;
}

.scroll-down-btn svg {
  width: 35px;
  height: 35px;
  transition: filter 0.2s ease;
}

.scroll-down-btn svg path {
  fill: var(--accent-primary);
}

.scroll-down-btn:hover svg {
  filter: drop-shadow(0 0 8px var(--accent-primary));
}

@keyframes bounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

/* Hero Carousel Cards styling */
.hero-carousel-cards-wrapper {
  position: absolute;
  right: 4rem;
  bottom: 4rem;
  z-index: 10;
  max-width: 500px;
}

.hero-carousel-cards {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-end;
  align-items: center;
}

.hero-carousel-card {
  position: relative;
  width: 140px;
  height: 80px;
  background-size: cover;
  background-position: center;
  border: 2px solid #555555;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  padding: 0;
  outline: none;
}

.hero-carousel-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0) 100%);
  z-index: 1;
  display: flex;
  align-items: flex-end;
  padding: 8px;
}

.hero-carousel-card-title {
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
  margin: 0;
  z-index: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  text-align: left;
}

/* Hover effect: border changes on hover */
.hero-carousel-card:hover {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

/* Active card styling */
.hero-carousel-card.active {
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(218, 165, 33, 0.6);
}

/* Progress bar container and filler */
.hero-carousel-card-progress-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.2);
  z-index: 3;
}

.hero-carousel-card-progress {
  height: 100%;
  width: 0%;
  background-color: var(--accent-primary);
  transition: width 0.05s linear;
}

/* =========================================
   2. GAMES SECTION
   ========================================= */
.games-carousel-wrapper {
  position: relative;
  width: 100%;
  margin-top: 3rem;
  padding-bottom: 1rem;
}

.games-carousel-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  /* Add some padding to prevent box-shadow clipping */
  padding: 2rem 0;
}

.games-carousel-track {
  display: flex;
  align-items: center;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  /* The exact translate value will be set via JS */
}

.games-carousel-slide {
  flex: 0 0 auto;
  /* Width of each slide. 60vw is good for desktop, allowing side cards to show */
  width: 60vw;
  max-width: 800px;
  padding: 0 1rem;
  box-sizing: border-box;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
  opacity: 0.4;
  transform: scale(0.9);
  pointer-events: none;
}

@media (max-width: 1440px) or (max-height: 900px) {
  .games-section {
    padding: 3.5rem 0 !important;
  }

  .games-carousel-wrapper {
    margin-top: 1.5rem;
  }

  .games-carousel-slide {
    max-width: 620px;
  }
}

@media (max-width: 768px) {
  .games-carousel-slide {
    width: 85vw;
  }
}

.games-carousel-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
  pointer-events: auto;
}

/* Gradients & Nav Buttons */
.games-nav-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15%;
  min-width: 100px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  /* Let the gradient pass clicks, except on button */
}

.games-nav-overlay.left-nav {
  left: 0;
  background: linear-gradient(to right, rgba(10, 10, 12, 1) 0%, rgba(10, 10, 12, 0.7) 40%, rgba(10, 10, 12, 0) 100%);
}

.games-nav-overlay.right-nav {
  right: 0;
  background: linear-gradient(to left, rgba(10, 10, 12, 1) 0%, rgba(10, 10, 12, 0.7) 40%, rgba(10, 10, 12, 0) 100%);
}

.games-nav-btn {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  /* Re-enable clicks for button */
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.games-nav-btn svg {
  width: 24px;
  height: 24px;
}

.games-nav-btn svg path {
  fill: #ffffff;
}

.games-nav-btn:hover {
  background: var(--accent-primary);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(218, 165, 33, 0.5);
}

/* Pagination and Controls */
.games-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.games-carousel-play-pause {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.3s;
}

.games-carousel-play-pause:hover {
  opacity: 1;
  transform: scale(1.1);
}

.games-carousel-play-pause svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

.games-carousel-pagination {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.games-dot {
  width: 30px;
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease, width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  overflow: hidden;
}

.games-dot.active {
  background: rgba(255, 255, 255, 0.2);
  width: 50px;
  box-shadow: 0 0 10px rgba(218, 165, 33, 0.4);
}

.games-dot.filling::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: var(--accent-secondary);
  transform-origin: left;
  transform: scaleX(0);
  animation: fillAnimation var(--fill-duration, 5s) linear forwards;
}

.games-carousel-controls.is-paused .games-dot.filling::after {
  animation-play-state: paused;
}

@keyframes fillAnimation {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

/* =========================================
   3. ABOUT SECTION
   ========================================= */
.about-section {
  position: relative;
  width: 100%;
  padding: 8rem 0 !important;
  aspect-ratio: 16 / 9;
  min-height: 480px;
  max-height: 680px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.about-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('/assets/images/Team.webp');
  background-size: cover;
  background-position: center;
  filter: blur(3px);
  transform: scale(1.02);
  z-index: 1;
}

.about-background::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 0.5) 13%,
      rgba(0, 0, 0, 0.4) 50%,
      rgba(0, 0, 0, 1) 88%);
  z-index: 2;
}

.about-content {
  position: relative;
  z-index: 3;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-title {
  color: #ffffff;
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  line-height: 1.1;
  text-align: center;
  text-shadow: 4px 4px 15px rgba(0, 0, 0, 0.75);
}

.about-title::after {
  content: none;
}

.about-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: transform 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
  transform: scale(1.1);
  color: var(--accent-primary);
}

.social-icon svg {
  width: 36px;
  height: 36px;
}

.social-icon svg path {
  fill: currentColor;
  transition: fill 0.3s ease;
}

/* =========================================
   4. NEWS SECTION
   ========================================= */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.news-card {
  background-color: var(--bg-secondary);
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.news-card-image {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.news-category {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--accent-primary);
  color: var(--bg-primary);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.news-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.news-card-date {
  font-size: 0.9rem;
  color: var(--accent-secondary);
  font-weight: 600;
}

.news-card-title {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin: 0;
  transition: color 0.3s ease;
}



.news-card-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.news-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 4rem;
}

.news-footer-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.news-footer-text {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.news-socials {
  display: flex;
  gap: 1rem;
}

.news-socials .social-icon svg {
  width: 32px;
  height: 32px;
}

.news-more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: #ffffff;
  font-weight: 500;
  font-size: 1.1rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.news-more-link svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.news-more-link svg path {
  fill: currentColor;
}

.news-more-link:hover {
  color: var(--accent-primary);
}

.news-more-link:hover svg {
  transform: translateX(5px);
}

@media (max-width: 768px) {

  /* General Sections */
  .games-section,
  .news-section {
    padding: 3rem 0;
  }

  /* Hero Section */
  .hero-carousel-slide {
    justify-content: center;
  }

  .hero-carousel-slide-overlay svg {
    display: none;
  }

  .hero-carousel-slide-overlay::after {
    background: linear-gradient(to bottom, rgba(10, 10, 12, 0.4) 0%, rgba(10, 10, 12, 0.75) 60%, rgba(10, 10, 12, 0.95) 100%);
  }

  .hero-carousel-slide-content {
    padding: 0 1.5rem;
    max-width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-carousel-game-title {
    font-size: 2.2rem;
  }

  .hero-carousel-game-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .hero-carousel-game-desc {
    font-size: 0.95rem;
    height: 5.4rem;
    max-height: 5.4rem;
    -webkit-line-clamp: 4;
    margin-bottom: 1.5rem;
  }

  .hero-carousel-actions {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .hero-carousel-cards-wrapper {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    bottom: 1.2rem;
    max-width: 100%;
  }

  .hero-carousel-cards {
    gap: 0.8rem;
    justify-content: center;
  }

  .hero-carousel-card {
    width: 90px;
    height: 52px;
  }

  .hero-carousel-card-title {
    font-size: 0.65rem;
  }

  .scroll-down-container {
    bottom: 4rem;
  }

  .scroll-down-btn svg {
    width: 28px;
    height: 28px;
  }

  /* Games Section */
  .games-carousel-slide {
    width: 90vw;
  }

  .games-nav-overlay {
    width: 10%;
    min-width: 45px;
  }

  .games-nav-btn {
    width: 40px;
    height: 40px;
  }

  .games-nav-btn svg {
    width: 20px;
    height: 20px;
  }

  .games-section .game-card-top-content {
    padding: 1.25rem 1rem;
    width: 85%;
  }

  .games-section .game-card-title {
    font-size: 1.3rem;
  }

  .games-section .game-card-desc {
    display: none;
  }

  .games-section .game-card-footer-transition {
    display: none;
  }

  .games-section .game-card-footer {
    margin-top: auto;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.75) 45%, rgba(0, 0, 0, 0.98) 100%);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 2.5rem 1rem 1rem 1rem;
  }

  .games-section .game-tags {
    width: 100%;
    flex-wrap: nowrap;
  }

  .games-section .game-tag {
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
    gap: 0.2rem;
  }

  .games-section .tag-icon,
  .games-section .game-tag svg {
    width: 11px;
    height: 11px;
  }

  .games-section .game-card-link {
    font-size: 0.75rem;
    gap: 0.3rem;
  }

  .games-section .game-card-link .link-arrow,
  .games-section .game-card-link svg {
    width: 12px;
    height: 12px;
  }

  /* About Section */
  .about-section {
    padding: 4rem 1.5rem !important;
    aspect-ratio: auto;
    min-height: 360px;
  }

  .about-title {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
  }

  /* News Section */
  .news-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .news-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
  }

  .news-footer-left {
    align-items: center;
    gap: 1rem;
  }

  .news-footer-text {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .hero-carousel-slide-content {
    padding: 0 1rem;
  }

  .hero-carousel-game-title {
    font-size: 1.8rem;
  }

  .hero-carousel-game-subtitle {
    font-size: 1rem;
  }

  .hero-carousel-game-desc {
    font-size: 0.9rem;
    height: 4.2rem;
    max-height: 4.2rem;
    -webkit-line-clamp: 3;
  }

  .hero-carousel-cards-wrapper {
    right: 1rem;
    bottom: 1rem;
  }

  .hero-carousel-card {
    width: 75px;
    height: 44px;
  }

  .hero-carousel-cards {
    gap: 0.5rem;
  }

  .about-title {
    font-size: 1.8rem;
  }
}