/* === WRAPPER GLOBAL === */
.customhome-wrapper {
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  padding: 0;
  /* plus de padding pour coller bloc 1 à gauche et bloc droit à droite */
  padding-top: 30px;
}

.customhome-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 30px;
  /* espace horizontal entre bloc 1 et colonne droite */
}

/* === BLOC GÉNÉRAL === */
.customhome-block-wrapper {
  position: relative;
  overflow: hidden;
  flex: 1;
}

.customhome-block {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 400px;
  overflow: hidden;
}

/* === IMAGE === */
.image-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.customhome-block:hover .image-container img {
  transform: scale(1.04);
}

/* === OVERLAY === */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 70px 0 0 40px;
  transition: background 0.3s ease;
}

.overlay::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(0% - 20px);
  height: calc(100% - 20px);
  transform: translate(-50%, -50%);
  border-top: 1px solid #ffffff49;
  border-bottom: 1px solid #ffffff49;
  transition: 0.3s ease-in-out;
}

.overlay::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% - 20px);
  height: calc(0% - 20px);
  transform: translate(-50%, -50%);
  border-left: 1px solid #ffffff49;
  border-right: 1px solid #ffffff49;
  transition: 0.3s ease-in-out;
}

.customhome-block-wrapper:hover .overlay::after {
  width: calc(100% - 20px);
  border-top: 1px solid #fff;
  border-bottom: 1px solid #fff;
}

.customhome-block-wrapper:hover .overlay::before {
  height: calc(100% - 20px);
  border-left: 1px solid #fff;
  border-right: 1px solid #fff;
}


/* === CONTENU (titre + bouton) === */
.overlay .content {
  z-index: 2;
  display: flex;
  flex-direction: column;
  max-height: 100%;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.overlay .content h2 {
  font-size: 24px;
}

.overlay .content p {
  font-size: 18px;
}

.overlay h3 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.btn-custom {
  display: inline-block;
  margin-top: 40px;
  padding: 8px 18px;
  border: 2px solid #fff;
  color: #fff;
  text-transform: uppercase;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  max-width: fit-content;
}

.btn-custom:hover {
  border: 2px solid #000;
  color: #000;
}

.customhome-block-wrapper.block-2 .btn-custom {
  border: 2px solid #000;
  color: #000;
}

/* === COLONNES DROITE ET ESPACEMENT === */
.customhome-right {
  display: flex;
  flex-direction: column;
  gap: 30px;
  /* espace vertical entre bloc 2 et bas */
}

.customhome-block-wrapper.block-2,
.customhome-block-wrapper.block-3,
.customhome-block-wrapper.block-4 {
  margin: 0;
  /* colle bloc droit au bord du container */
}

.customhome-bottom {
  display: flex;
  flex-direction: row;
  gap: 30px;
  /* espace horizontal entre bloc 3 et 4 */
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
  .customhome-block {
    min-height: 300px;
  }

  .overlay {
    padding: 20px;
  }

  .overlay h3 {
    font-size: 1.4rem;
  }
}

@media (max-width: 768px) {
  .customhome-row {
    flex-direction: column;
    gap: 20px;
    /* réduit l'espace sur mobile */
  }

  .customhome-right {
    flex-direction: column;
    gap: 20px;
  }

  .customhome-bottom {
    flex-direction: column;
    gap: 20px;
  }

  .customhome-block {
    min-height: 0;
  }

  .overlay .content h2 {
    font-size: 18px;
  }

  .overlay .content p {
    display: none;
  }

  .overlay h3 {
    font-size: 1rem;
  }

  .btn-custom {
    font-size: 0.8rem;
    padding: 4px 10px;
  }
      .overlay {
        padding: 5px;
    }
}