/* ==== override spécifique page d’accueil ==== */

/* mobile-first empilement + texte */
body.index {
  display: block;
  padding-top: 2rem;
  min-height: auto;
  color: var(--color-text);
}

/* centrer sur desktop */
@media (min-width: 1000px) {
  body.index {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 0;
  }
}

/* boîte centrale (override léger si besoin) */
body.index .center-box {
  /* laisse la taille s’adapter naturellement */
  width: fit-content;
  max-width: 100%;
  margin: 2rem auto;
  padding: 1.5rem 2rem;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* rangée : trois tuiles côte à côte sauf sur petit écran */
body.index .button-row {
  display: flex !important;
  gap: 1.5rem !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  margin-top: 1rem;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px !important;
}

/* tuiles sans largeur contraignante */
body.index .card.btn-tile {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

/* images desktop */
body.index .card.btn-tile img {
  width: 240px;
  height: auto !important;
  display: block !important;
  object-fit: cover;
  min-width: 0 !important;
}

/* responsive : empilement + adaptation */
@media (max-width: 850px) {
  body.index .button-row {
    flex-direction: column !important;
    gap: 1rem !important;
    overflow: visible !important;
  }
  body.index .card.btn-tile {
    width: 100% !important;
    max-width: none !important;
    flex: 1 1 auto !important;
  }
  body.index .card.btn-tile img {
    width: 100% !important;
    max-width: 320px;
  }
  body.index .center-box {
    width: 100% !important;
    max-width: 100% !important;
    margin: 2rem auto !important;
    padding: 1.5rem 2rem !important;
  }
}
