/* ===========================
   Container Desktop
=========================== */
#block-top-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;              /* horizontal + vertical */
  justify-content: center; /* modules centrés */
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ===========================
   Module général
=========================== */
.module-item {
  width: 373px;
  height: 470px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-sizing: border-box;
}

/* ===========================
   MODULES 1 & 3 : image + texte
=========================== */
.module-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.module-bg .text-top {
  position: absolute;
  top: 100px;
  left: 120px;
  right: 10px;
  font-size: 38px;
  line-height: 42px;
  color: #fff;
}

.module-bg .text-bottom {
  position: absolute;
  bottom: 40px;
  left: 80px;
  right: 10px;
  font-size: 22px;
line-height: 26px;
  color: #fff;
}

/* ===========================
   MODULES 2 & 4 : zone blanche + bouton
=========================== */
.module-white .white-content {
  background: #fff;
  width: 100%;
  height: 330px;  /* proportionnel à 470px */
  padding: 15px;
  box-sizing: border-box;
}

.module-white .white-footer {
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.module-white .btn-custom {
  width: 200px;
  background: #105761;
  color: #fff;
  text-align: center;
  padding: 8px 0;
  text-decoration: none;
  border-radius: 4px;
  display: inline-block;
}

/* ===========================
   MOBILE : empilement vertical
   Garde largeur et hauteur fixes
=========================== */
@media (max-width: 768px) {
  #block-top-modules {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  .module-item {
    width: 373px;    /* largeur fixe conservée */
    height: 470px;   /* hauteur fixe conservée */
  }

  .module-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }

 .module-bg .text-top {
    top: 100px;         /* même que Desktop */
    left: 120px;        /* même que Desktop */
    right: 10px;        /* même que Desktop */
    font-size: 32px;    /* légèrement plus grande pour mobile */
    line-height: 36px;  /* proportionnel à la taille */
    color: #fff;
  }

  .module-bg .text-bottom {
    bottom: 40px;       /* même que Desktop */
    left: 80px;         /* même que Desktop */
    right: 10px;        /* même que Desktop */
    font-size: 20px;    /* plus lisible en mobile */
    line-height: 24px;  /* proportionnel */
    color: #fff;
  }

  .module-white .white-content {
    height: 330px;   /* reste proportionnel */
  }

  .module-white .btn-custom {
    width: 70%;
    max-width: 200px;
  }
}
