
/* =========================
   GAME
========================= */

/* =============================================
   COLLECTIONS (grille de 4 cartes)
   ============================================= */

.collections {
  padding: 200px 80px; /* Grands espaces haut/bas */
}

/* Grille fixe de 4 colonnes égales */
.collections-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.collection-card {
  height: 400px;
  background: var(--card-bg);
  position: relative;   /* Permet de positionner .collection-overlay en absolu à l'intérieur */
  overflow: hidden;
  transition: 0.4s;
}

.collection-card:hover {
  transform: scale(1.02); /* Légère mise en avant au survol */
}

/* Texte superposé en bas à gauche de la carte */
.collection-overlay {
  position: absolute;
  bottom: 30px;
  left: 30px;
}

.collection-overlay div {
  font-size: 14px;
  letter-spacing: 1px;
}

.collection-overlay span {
  font-size: 12px;
  opacity: 0.6;
}




/* -------------------------------------------------------
   PARTIE 2 : STYLE INCORPORÉ (ISOLÉ POUR ÉVITER LES CONFLITS)
------------------------------------------------------- */

/* Tout le style de ton second fichier est encapsulé sous .game-style */
.game-style header,
.game-style header a {
  font-size: 1.5em;
  margin: 0;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-style body {
  margin: 0;
  width: 100%;
  background-color: #333;
  padding: 20px 0;
}

.game-style input {
  background-color: #333;
}

.game-style p,
.game-style a,
.game-style ul,
.game-style div,
.game-style input,
.game-style button {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.05em;
  color: #fff;
}

.game-style h1,
.game-style h2,
.game-style h3,
.game-style h4,
.game-style title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  text-align: center;
}

.game-style button {
  width: fit-content;
  padding: 10px 20px;
  margin-bottom: 30px;
  background-color: #03a9f4;
  color: #fff;
  border: 0px solid #333;
  border-radius: 3px;
  text-transform: uppercase;
}

.game-style button:hover {
  background-color: #0095d8;
}

.game-style #chronotime {
  border: none;
}

.game-style .top {
  display: flex;
  justify-content: space-between;
}

.game-style .container {
  width: 650px;
  margin:auto;
  margin-top: 0px;
}

.game-style .flex {
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
}

.game-style .card {
  width: 150px;
  height: 150px;
  cursor: pointer;
  padding-bottom: 10px;
}

.game-style .inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.4s;
}

.game-style .inner p {
  font-size: 3em;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
}

.game-style .card .flipped {
  transform: rotateY(180deg);
  transform-style: preserve-3d;
}

.game-style .front,
.game-style .back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 3px;
}

.game-style .front {
  background: khaki;
}

.game-style .back {
  background: lightblue;
  transform: rotateY(180deg);
  transition: all 0.4s ease-out;
}

.game-style .foundCard {
  background-color: #b5e25a;
}

.game-style .modal {
  display: none;
  position: fixed;
  z-index: 1;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.game-style .modal-content {
  background-color: #111111;
  margin: auto;
  padding: 20px;
  border: 1px solid #333;
  width: 80%;
  text-align: center;
  border-radius: 3px;
}

.game-style .close {
  color: #aaaaaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.game-style .close:hover,
.game-style .close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}



.back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.back span {
  margin-top: 5px;
  font-size: 14px;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

  .game-style .container {
  width: 350px;
  margin: auto;
}

  
  .game-style .card {
  width: 100px;
  height: 100px;
  cursor: pointer;
  padding-bottom: 10px;
  }


  .game-style .top {
    flex-direction: column;
    text-align: center;
  }

  .game-style .flex {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .game-style .flex {
    grid-template-columns: repeat(2, 1fr);
  }
}