/* ============================
   SECTION produit
============================ */
.produit-section {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 2rem;
  padding: 3rem;
  box-sizing: border-box;
}

/* Image gauche */
.produit-left {
  flex: 0 0 45%;
  /*display: flex;*/
  align-items: center;
  justify-content: center;
}

.produit-left img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Bloc droit */
.produit-right {
  flex: 0 0 55%;
  background: #fff;
  border: 2px solid #0b9866;
  border-radius: 5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: center;
}

.produit-content {
  width: 90%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 0;
}

/* ============================
   TITRES ET SÉPARATEURS
============================ */
.produit-title {
  color: #4FA862;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  text-align: center;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.produit-separator {
  border: none;
  border-top: 1px solid #ddd;
  margin: 1rem 0;
}

/* ============================
   GRILLES D'IMAGES
============================ */
.produit-grid,
.cadre-placeholder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 1rem;
  justify-items: center;
}

.produit-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.produit-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.produit-item img:hover {
  transform: scale(1.05);
}

.produit-item span {
  color: #333;
  font-weight: 500;
  font-size: 0.9rem;
}


/* ============================
   BOUTON D’ENVOI
============================ */
.submit-area {
  background: #4FA862;
  color: white;
  text-align: center;
  padding: 0.7rem 2rem;
  font-weight: 600;
  cursor: pointer;
  align-self: center;
  margin: 1.5rem auto 0;
  border-radius: 4px;
  transition: background 0.3s ease;
  user-select: none;
}

.submit-area:hover {
  background: #3c8a56;
}

/* État sélectionné des images */
.produit-item img.selected {
  outline: 3px solid #4FA862;
  transform: scale(1.1);
  transition: all 0.2s ease;
}

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 991px) {
  .produit-section {
    flex-direction: column;
    padding: 1rem;
  }

  .produit-left,
  .produit-right {
    flex: 0 0 100%;
  }

  .produit-content {
    width: 100%;
    padding: 1rem;
  }

  .produit-grid,
  .cadre-placeholder {
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 0.6rem;
  }

  .produit-item img {
    width: 65px;
    height: 65px;
  }

  .produit-item span {
    font-size: 0.8rem;
  }

  .produit-form-2col {
    grid-template-columns: 1fr;
  }

  .measure-row {
    flex-direction: column;
  }

  .submit-area {
    width: 100%;
  }
}

/* --- MODAL GLOBALE --- */
.custom-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: white;
  padding: 1.8rem 2.5rem;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  opacity: 0;
  visibility: hidden;
  transition: 0.25s ease;
  z-index: 9999;
  font-family: sans-serif;
  text-align: center;
  min-width: 300px;
}

/* Apparition */
.custom-modal.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* Styles différents */
.modal-error {
  border-left: 6px solid #D9534F;
}

.modal-success {
  border-left: 6px solid #4FA862;
}

.custom-modal h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.custom-modal p {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.85;
}