* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #111;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding: 40px;
  color: white;
}

.game-section {
  max-width: 1200px;
  margin: auto;
  padding: 0 1rem;
}

.custom-carousel {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
  justify-content: space-evenly;
}
/* Carte principale */
.item {
  flex: 1 1 28%;
  max-width: 28%;
  height: 360px;
  cursor: pointer;
  overflow: visible; /* nécessaire pour ne pas couper le zoom */
  transition: transform 0.3s ease;
  position: relative;
}

/* Conteneur intérieur pour gérer le zoom et les coins */
.item-inner {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  transition: transform 0.3s ease;
  will-change: transform;
}

/* Zoom au survol */
.item:hover .item-inner {
  /* transform: scale(1.1); */
  /* z-index: 1; */
  transform: scale(1.1) rotateY(10deg) rotateX(10deg); /* penche de 10 degrés sur l'axe Y */
  z-index: 1;
  transition: transform 0.3s ease;
  transform-origin: center center;
}
.item:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  transform: scale(1.12);

}

.item.hover-mobile .item-inner {
  transform: scale(1.1);
  z-index: 1;
}

.item.hover-mobile {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Texte masqué par défaut, affiché par JS au clic */
.item-desc {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  color: white;
  padding: 15px;
  background: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.8)  100%);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.item-desc.visible {
  display: block;
  opacity: 1;
}
.item-desc h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: bold;
  color: white;
}
.item-desc p {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.3s ease;
  font-size: 0.9rem;
  margin-top: 10px;
  color: white;
}

/* Affiche <p> au survol ou au tap */
.item:hover .item-desc p,
.item.hover-mobile .item-desc p,
.item.clicked-once .item-desc p {
  opacity: 1;
  max-height: 200px; /* hauteur suffisante */
}

header.major .date,
header.major p {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  color: black;
}

header.major h1 {
  color: black;
}



/* Responsive : 2 colonnes */
@media (max-width: 900px) {
  .item {
    flex: 1 1 calc(45% - 24px);
    max-width: calc(45% - 24px);
	height: 280px;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
  }
}

/* Responsive : 1 colonne bien proportionnée */
@media (max-width: 600px) {
  .item {
    flex: 1 1 100%;
    max-width: 320px;
    height: 360px;
    margin: 0 auto;
  }
}
