/* Reset box-sizing */
* {
  box-sizing: border-box;
}

/* Centrage du body */
body {
  max-width: 680px;
  margin: auto;
}

h2 {
  text-align: center;
}

/* Container principal */
.container {
  border-radius: 5px;
  background-color: #f2f2f2;
  padding: 20px;
  min-width: 320px;
}

/* Grille des tuiles - remplace float par flexbox */
.row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: -6px; /* ajuste pour les gaps */
}

.col-33 {
  flex: 1 1 calc(33.333% - 12px); /* 3 colonnes avec gaps */
  margin: 6px;
  text-align: center;
  display: flex;
  justify-content: center;  /* centre horizontal */
}

/* Responsive */
@media screen and (max-width: 680px) {
  .col-33 {
    flex: 1 1 calc(50% - 12px); /* 2 colonnes sur tablette */
  }
}

@media screen and (max-width: 480px) {
  .col-33 {
    flex: 1 1 100%; /* 1 colonne sur smartphone */
  }
}

/* Style des boutons */
.button {
  background: #fff;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  margin: 0;  /* marges déjà gérées par flex col-33 */
  text-align: center;
  width: 200px;
  height: 210px;
  text-decoration: none;
}

/* Image */
.button figure {
  margin: 0 0 15px;
  width: 180px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.button figure img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  display: block;
  object-fit: contain;
}

/* Texte */
.button .text {
  font-weight: bold;
  text-transform: uppercase;
  color: #1d368a;
  margin: 0;
  font-size: 16px;
}

