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

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

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

/* Bloc droit */
.cloisons-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;
}

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

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

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

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

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

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

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

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

/* ============================
   FORMULAIRE À 2 COLONNES
============================ */
.cloisons-form-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* 2 colonnes */
  gap: 2rem;
  /* espace horizontal entre colonnes */
  align-items: start;
  margin-top: 1.5rem;
}

.form-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  /* espace vertical uniforme */
}

/* Labels toujours au-dessus des inputs */
.cloisons-form-2col label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 0.3rem;
}

/* Inputs et selects uniformes */
.cloisons-form-2col input,
.cloisons-form-2col select {
  width: 100%;
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  height: 38px;
  /* hauteur fixe pour tout */
  box-sizing: border-box;
}

.cloisons-form-2col input:focus,
.cloisons-form-2col select:focus {
    border-color: #4FA862 !important;  /* vert */
    outline: none !important;
    box-shadow: none !important;       /* supprime le BLEU */
}


/* Mesures (Longueur / Largeur) */
.measure-row {
  display: flex;
  gap: 0.8rem;
}

.measure-col {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ============================
   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 */
.cloisons-item img.selected {
  outline: 3px solid #4FA862;
  transform: scale(1.1);
  transition: all 0.2s ease;
}

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

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

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

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

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

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

  .cloisons-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;
}