/**************************************************************/
/*  Styles généraux                                           */
/**************************************************************/
.Home {
  background-color: #fff;
}

.Home-info-title-text,
.Home-partenaire-title-text,
.Home-occasion-title-text,
.Home-location-title-text {
  margin-left: 4%;
  font-weight: bold;
  font-size: 22px;
  position: absolute;
  z-index: 1;
}

.Home-info-title-background-image,
.Home-partenaire-title-background-image,
.Home-occasion-title-background-image,
.Home-location-title-background-image {
  margin-top: 70px;
  margin-left: 7%;
  z-index: 2;
}

.Home-info-title-logo {
  position: absolute;
  margin-left: 85%;
  margin-top: -30px;
}
@media (max-width: 768px) {
  .Home-info-title-logo {
    display: none;
  }
}

.Home-info-text-text {
  margin-top: 20px;
  margin-left: 4%;
  width: 40%;
  font-weight: bold;
  font-size: 13px;
}

/**************************************************************/
/*  Partenaires : bande défilante                             */
/**************************************************************/
.Home-partenaire-logo-wrapper {
  overflow: hidden;
  width: 100%;
  margin-top: 30px;
}
.logo-track {
  display: flex;
  width: calc(200% + 40px);
  animation: scroll 30s linear infinite;
}
.logo-track a {
  flex: 0 0 auto;
}
.logo-track .partenaire {
  width: 165px;
  height: 100px;
  margin-right: 20px;
  border-radius: 15px;
}
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 20px)); }
}
@media (max-width: 768px) {
  .logo-track {
    animation-duration: 20s;
  }
}
@media (max-width: 480px) {
  .logo-track {
    animation-duration: 15s;
  }
}

/**************************************************************/
/*  Occasions / Locations : conteneur + cartes                */
/**************************************************************/
.Home-occasion, 
.Home-location {
  margin-top: 30px;
}

.machines-container {
  display: flex;
  flex-wrap: nowrap;       /* Desktop => pas de wrap => le script masque */
  overflow: hidden;        /* Coupe ce qui dépasse */
  gap: 30px;               /* Espace horizontal entre cartes */
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;         /* Marge interne latérale */
  justify-content: center; /* Centre les cartes quand il y a de la place */
  box-sizing: border-box;
}

.machine-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 0 0 auto;
  width: 380px;            /* Largeur desktop */
  height: 550px;           /* Hauteur fixe */
  padding: 20px;
  background-color: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: 0.3s;
  overflow: hidden;
}
.machine-card:hover {
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Image */
.machine-card .machine-img {
  width: 100%;
  height: 260px;
  overflow: hidden;
  border-radius: 15px;
  flex-shrink: 0;
}
.machine-card .machine-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Textes */
.machine-card .CategorieMachine {
  font-style: italic;
  font-size: 14px;
  color: #ffde59;
  margin: 10px 0 5px;
}
.machine-card .NomMachine {
  font-weight: 500;
  font-size: 20px;
  margin-bottom: 8px;
}
.machine-card .ModeleMachine {
  font-size: 15px;
  font-weight: 300;
  margin-left: 5px;
}
.machine-card .EtatMachine {
  color: gold;
  font-size: 18px;
  margin: 10px 0;
}
.machine-card .EtatMachine .machine-text {
  font-size: 15px;
  font-weight: 300;
  color: black;
}
.machine-card .PrixOccasion,
.machine-card .PrixLocation {
  font-size: 19px;
  font-weight: 400;
  color: red;
  margin-top: 8px;
}

/* Lien encapsulant la carte */
.machine-link {
  text-decoration: none;
  color: inherit;
}
.machine-link:hover {
  text-decoration: none;
}

/**************************************************************/
/*   Empêcher tout débordement horizontal global              */
/**************************************************************/
html, body {
  overflow-x: hidden;
}

* {
  max-width: 100%;
}

/**************************************************************/
/*       Media queries (tablettes, smartphones)               */
/**************************************************************/
@media (max-width: 768px) {
  /* On wrap pour tout afficher en colonne => plus de masquage */
  .machines-container {
    flex-wrap: wrap !important;
    justify-content: center !important;
    padding: 0 10px; /* on réduit un peu la marge latérale */
  }

  .machine-card {
    width: 320px;      /* Plus étroite en mobile */
    height: 500px;
    margin: 15px;      /* Espace autour, et centrage */
  }
  .machine-card .machine-img {
    height: 220px;
  }

  .Home-info-title-text,
  .Home-partenaire-title-text,
  .Home-occasion-title-text,
  .Home-location-title-text {
    font-size: 18px;
  }
  .Home-info-title-logo {
    display: none;
  }
  .Home-info-text-text {
    width: 80%;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .machines-container {
    padding: 0 5px;
  }
  .machine-card {
    width: 260px;
    height: 460px;
    margin: 15px;
  }
  .machine-card .machine-img {
    height: 180px;
  }

  .Home-info-title-text,
  .Home-partenaire-title-text,
  .Home-occasion-title-text,
  .Home-location-title-text {
    font-size: 16px;
  }
  .Home-info-title-logo {
    display: none;
  }
  .Home-info-text-text {
    width: 95%;
    font-size: 11px;
  }
}