@font-face {
  font-family: 'Borel';
  src: url('fonts/Borel-Regular.ttf');
}

@font-face {
  font-family: 'Roboto';
  src: url('fonts/Roboto-Regular.ttf');
}

/* ========== Global Styles ========== */

h1, h2, h3 {
     font-family: 'Borel';
    src: url('./fonts/Borel-Regular.ttf') format('truetype');
}

/* Header */
header {
    background-color: rgba(0, 0, 0, 0);
    color: #F5F5F5;
    padding: 20px;
    text-align: center;
}

body {
  font-family: 'Roboto', sans-serif; /* Nom que vous donnez à la police */
  src: url('./fonts/Roboto-Regular.ttf') format('truetype'); /* Format plus ancien */
  font-size: 1.5rem;
  color: #F5F5F5;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: #6495ED;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  overflow-x: hidden; /* Empêche le débordement horizontal */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  cursor: url('3D/curseur.png'), auto;
}


/* ========== Styles pour la modale ========== */
.modal {
  display: none; /* Masquée par défaut */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color:#FB8642;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  width: 80%;
  max-width: 400px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
  font-family: 'Borel', sans-serif;
  margin-bottom: 0px;
  padding :5px;
}

.modal-content p {
  margin-top: 0px;
  font-family: 'Roboto', sans-serif;
  line-height: 1.5;
  padding : 10px;
}

.modal-content button {
  margin-bottom: 20px;
  padding: 12px 30px;
  background-color: #f86e1b;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
}

.modal-content button:hover {
  background-color: #2C6E49;
}

.grid {
  display: grid;
  grid-template-columns: repeat(8, 90px);
  grid-gap: 10px;
}

.card {
  width: 90px;
  height: 90px;
  background-color: #F5F5F5; /* Supprime cette ligne si elle interfère */
  background-image: url('3D/dos-carte.png'); /* Image du dos de la carte */
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.card.flipped img,
.card.matched img {
  display: block;
}

.card.flipped,
.card.matched {
  background-color: #fff;
  cursor: default;
}

footer {
  font-family: 'Borel', sans-serif;
  color: #F5F5F5;
  text-align: center;
  padding-top: 20px;
  height: 10vh;
  font-size: 1rem;
  margin-top: auto; /* Pousse le footer en bas */
  width: 100%;
  
}

@media (max-width: 768px) {
  
  header {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 100%;
    text-align: center; /* Centre le texte */
    padding: 10px 0; /* Ajoute un peu d'espace */
  }
  
  body {
    padding: 10px; /* Ajouter du padding pour éviter les bords trop serrés */
  }

  
  
  .grid {
    grid-template-columns: repeat(3, 1fr); /* Deux colonnes */
    grid-gap: 8px; /* Espacement entre les cartes */
  }
  
  .card {
    width: 100%; /* Les cartes prennent toute la largeur de leur colonne */
    aspect-ratio: 1 / 1; /* Les cartes restent carrées */
    cursor: default; /* Supprimer l'interaction */
  }

  .card img {
    display: block; /* Les images sont visibles par défaut */
  }
  
  footer {
    font-size: 0.85rem; /* Réduit la taille du texte */
    text-align: center; /* Centrage du texte */
    white-space: normal; /* Permet le passage à la ligne */
    line-height: 1.4; /* Espacement entre les lignes */
    margin-top: auto ;
    width: 100%;
    flex-shrink: 0;
    padding: 20px;
    height: 5vh;
  }
  
}
