main .vitrage-btn {
  background-color: #eeeeee;
  color: black;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  width: 110px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

main .vitrage-btn:hover {
  background-color: #3d8f51;
  color: white;
}

/* css sur mobile */
@media (max-width: 768px) {
  .vitrage-container {
    flex-direction: column;
    /* Empile les blocs */
  }

  .vitrage-container>div:first-child {
    order: 1;
    /* image en premier */
    width: 100%;
    /* prend toute la largeur */
  }

  .vitrage-container>div:last-child {
    order: 2;
    width: 100%;
    padding-top: 2rem;
  }
}

@media (max-width: 768px) {
  form {
    flex-direction: column;
  }

  /* ✅ Centrer le bouton sur mobile */
  .btn-container {
    justify-content: center !important;
  }

  .btn-container button {
    max-width: 100% !important;
  }
}

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

/* Image gauche */
.vitrage-left {
  flex: 0 0 45%;
}
.vitrage-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

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

/* Titres */
.vitrage-title {
  color: #4FA862;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  text-align: center;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

/* Séparateur */
.vitrage-separator {
  border: none;
  border-top: 1px solid #ddd;
  margin: 1rem 0;
}

/* Grilles de vitrages et cadres */
.vitrage-grid,
.cadre-placeholder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 1rem;
  justify-items: center;
}

.vitrage-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.vitrage-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.vitrage-item img:hover {
  transform: scale(1.05);
}
.vitrage-item span {
  color: #333;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Formulaire 2 colonnes */
.vitrage-form-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
  margin-top: 1.5rem;
  align-items: start;
}

.vitrage-form-2col label {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.3rem;
  display: block;
}

.form-col {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.vitrage-form-2col input,
.vitrage-form-2col select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  font-size: 0.9rem;
  outline: none;
  border-radius: 0;
  transition: border-color 0.2s ease;
}

.vitrage-form-2col input:focus,
.vitrage-form-2col select:focus {
  border-color: #4FA862;
}

/* Ligne de mesures */
.measure-row {
  display: flex;
  gap: 0.8rem;
}
.measure-row input {
  flex: 1;
}

/* Bouton Envoyer */
.submit-area {
  background: #4FA862;
  color: white;
  text-align: center;
  padding: 0.7rem 2rem;
  font-weight: 600;
  cursor: pointer;
  align-self: center;
  width: fit-content;
  margin: 1.2rem auto 0;
  transition: background 0.3s ease;
  user-select: none;
}
.submit-area:hover {
  background: #3c8a56;
}

.vitrage-item img.selected {
  outline: 3px solid #4FA862;
  transform: scale(1.1);
  transition: all 0.2s ease;
}

/* ✅ Responsive professionnel */
@media (max-width: 991px) {
  .vitrage-section {
    flex-direction: column;
    padding: 1rem;
  }

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

  .vitrage-left img {
    height: auto; /* ✅ garde le ratio naturel */
    object-fit: contain; /* ✅ plus de découpe */
    max-height: 350px;
    margin: 0 auto;
  }


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

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

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

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

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

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

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