/* ===== Container principal ===== */
#multiStepForm , #multiStepFormUpdate , #multiStepFormUpdateWallpaper{
  max-width: 96%;
  margin: 60px auto;
  padding: 40px 50px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.07);
  position: relative;
  overflow: auto;
}
#multiStepFormUpdate , #multiStepFormUpdateWallpaper{
	max-width : 100%!important;
}
/* ===== Titres de section ===== */
#multiStepForm h6 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 30px;
  position: relative;
  padding-left: 12px;
  border-left: 4px solid #000;
}

/* ===== Champs de formulaire ===== */
.fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.rideau-info .row{
	margin-bottom:1rem;
}
.fields .row , .signature-fields{
	display: flex!important;
    align-items: center!important;
    justify-content: space-between!important;
	gap:1rem;
}
.signature-fields{
	float:right;
	margin:2rem;
}
.signature-fields canvas{
	width : 100%;
}
.fields .row > div{
	flex:1;
}
.field {
  display: flex;
  flex-direction: column;
}

.field label {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: #444;
}

.field input,
.field select {
  padding: 12px 16px;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid #dcdfe6;
  background-color: #f9fafc;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.field input:focus,
.field select:focus {
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.15);
  background-color: #fff;
  outline: none;
}

/* ===== Étapes du formulaire ===== */
.step {
  display: none;
  animation: fadeIn 0.4s ease forwards;
  opacity: 0;
}
.step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Groupe de champs pour dimensions des murs ===== */
#dimensions_murs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.mur-dimensions-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background-color: #f9f9f9;
  margin-bottom: 20px;
  transition: box-shadow 0.3s ease;
}

.mur-dimensions-group:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.mur-dimensions-group .mur-label {
  flex-basis: 100%;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.mur-dimensions-group .field {
  flex: 1 1 45%;
  min-width: 140px;
}
#dimensions_murs_1,
#dimensions_murs_2,
#dimensions_murs_3,
#dimensions_murs_4,
#dimensions_murs_5 {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mur-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.mur-row .field {
  flex: 1;
  min-width: 120px;
}
.murs-infos , .mur_info_item , .mur_info_details, .mur_info_item .mur_infos_header{
	display: flex;
    flex-direction: column;
    gap: 1rem;
}
.mur_info_item{
	border : 1px solid #ccc;
	border-radius : 8px;
    padding: 2rem;
}
.mur_info_item .mur_infos_header{
	flex-direction : row;
	align-items:center;
	justify-content:space-between;
}
.mur_info_item .mur_infos_header > *{
	margin:0!important;
}
.mur_info_item  .mur_info_details{
	margin-top : 2rem!important;
}
/* ===== Boutons ===== */
.form-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 30px;
}

#multiStepForm button , #multiStepFormUpdate button , #multiStepFormUpdateWallpaper button{
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  margin-top: 2rem;
}

.next-step , .next-update-step{
  background-color: #0D47A1 !important;
  color: white;
}

.next-step:hover , .next-update-step:hover{
  background: linear-gradient(135deg, #3c77e0, #2d5ce1);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(79, 142, 247, 0.3);
}

.prev-step , .prev-update-step{
    background-color: #F5F5F5!important;
    color: #000!important;
    border: 1px solid #CCCCCC!important;
}

.prev-step:hover , .prev-update-step:hover{
  background-color: #dddddd;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}
.add-another-step {
  background-color: #E3F2FD!important;
  color: #0D47A1!important;
  border: 1px solid #90CAF9!important;
  transition : all 0.3s ease!important;
}

.form-buttons #submit {
  background-color: #2E7D32;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition : all 0.3s ease!important;
}
.form-buttons #submit:hover {
  background-color: #388E3C;
}
.add-another-step:hover , .form-buttons #submit:hover{
	transform: translateY(-2px)!important;
}
/* ===== Responsive ===== */
@media (max-width: 768px) {
  #dimensions_murs {
    grid-template-columns: 1fr;
  }

  .mur-dimensions-group .field {
    flex: 1 1 100%;
  }
  .fields .row , .signature-fields{
		flex-direction:column!important;
	    align-items:start!important;
	   justify-content:start!important;
   }
}

/* Pdf section */
.preview_pdfy{
	display:none!important;
}
#container_pdf , #prise_de_mesure_pdf_{
  width: max-content;
  max-width: unset;
  overflow: visible;
}
 #prise_de_mesure_pdf_ h2 , #prise_de_mesure_pdf_update h2{
    font-size: 4rem;
    line-height: 73px;
}
.preview_pdf {
  margin-top: 1rem;
  border: 1px solid;
  width: 1500px; 
  height: auto; 
  background: #fff;
  box-sizing: border-box;
  overflow: hidden !important;
   margin-bottom: 10px;
  page-break-inside: avoid;
}
.preview_pdf:last-child {
  page-break-after: auto;
}
.preview_pdf .preview_pdf_head {
	display : flex;
	border-bottom : 1px solid;
}
.preview_pdf .logo{
	display : flex;
	align-items : center;
	justify-content : center;
}
.preview_pdf .preview_pdf_head > div {
    border-right: 1px solid;
    padding: 2rem;
    flex: 1;
    line-height: 12px;
}
.preview_pdf .preview_pdf_head .title{
	flex-basis : 10%;
}
.preview_pdf .preview_pdf_head > div:last-child{
	border-right : none!important;
}


.table-espace {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  font-size: 1.05rem; /* Texte agrandi */
  border: 1px solid #ccc;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  overflow: hidden;
  table-layout: fixed;
  word-wrap: break-word;
	 page-break-inside: avoid;
  break-inside: avoid;
}

.table-espace thead th {
  background: linear-gradient(to right, #e9ecef, #f8f9fa);
  color: #333;
  padding: 14px 12px; /* Plus d’espace */
  font-weight: 600;
  text-align: center;
  border-bottom: 2px solid #ccc;
  border-right: 1px solid #ddd;
  font-size: 1.1rem; /* Titre des colonnes un peu plus grand */
}
.table-espace thead tr:first-child th {
    background-color: #d1ecf1;
    color: #000000;
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: 2px solid #000000;
}

.table-espace tbody td {
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid #eee;
  border-right: 1px solid #f0f0f0;
  vertical-align: middle;
  background-color: #fff;
  color: #444;
  font-size: 1.05rem;
  word-wrap: break-word;
}
.table-espace tr {
  page-break-inside: avoid;
  break-inside: avoid;
}
/* Lignes paires plus claires */
.table-espace tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Surlignage au survol (utile sur écran) */
.table-espace tbody tr:hover {
  background-color: #f3f8ff;
}

/* Supprimer la bordure de la dernière colonne */
.table-espace thead th:last-child,
.table-espace tbody td:last-child {
  border-right: none;
}

/* Largeur minimale pour chaque colonne */
.table-espace th,
.table-espace td {
  min-width: 90px;
}
.page-break {
  page-break-before: always;
  break-before: page;
}
canvas {
  width: 100%;
  max-width: 300px;
  height: auto;
  border: 1px solid #ccc;
  touch-action: none; /* important pour le mobile */
}

#prise_de_mesure_pdf_ .table-espace td {
  vertical-align: middle; /* ou top */
  padding: 5px;
  overflow-wrap: break-word;
  word-break: break-word;
}

#prise_de_mesure_pdf_ .table-espace tbody tr:nth-child(even) {
    background-color: transparent!important;
}
#measuresContainerUpdate .mur{
    margin-bottom: 2rem;
    padding: 1rem 2rem;
    border: 1px solid #ccc;
    border-radius: 8px;

}
/**/
.wallpaper-block {
  display: none;
}
.wallpaper-block.active {
  display: block;
}
.wallp-block {
  border: 1px solid #ccc;
  margin: 15px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  background-color: #fdfdfd;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* En-tête repliable */
.wallpaper-block .wallp-header {
  background-color: #f3f3f3;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.wallpaper-block .wallp-header:hover {
  background-color: #e0e0e0;
}

.wallpaper-block .toggle-icon {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.wallpaper-block .wallp-header.collapsed .toggle-icon {
  transform: rotate(180deg);
}

/* Contenu caché/affiché */
.wallpaper-block .wallp-details {
  padding: 16px;
  display: block;
}

.wallpaper-block .row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}

.wallpaper-block .field {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
}


/**/
@media (max-width: 600px) {
  #multiStepForm {
    padding: 20px 16px;
  }

  #multiStepForm h6 {
    font-size: 1.2rem;
    margin-bottom: 20px;
  }

  .form-buttons button{
	margin: 3px!important;
   }

  .form-buttons button {
    width: 100%;
  }
  .final-step .form-buttons div{
		flex-direction : column!important;
   }
   .fields .row , .signature-fields{
		flex-direction:column!important;
	    align-items:start!important;
	   justify-content:start!important;
   }
	#multiStepFormUpdate{
		padding : 40px 13px!important;
	}
	#multiStepFormUpdate .rideau-block .row , #multiStepFormUpdate .rideau-block .row .field , .mur-row .field , #measuresContainerUpdate .mur .field{
		width : 100%;
	}
	#multiStepFormUpdate .rideau-block .row .field{
		flex:1!important;
	}
	.mur_info_item {
		padding: 1rem!important;
	}
	.mur_info_item  .mur_info_details {
		margin-top: 1rem!important;
	}
	.mur-row{
		flex-direction: column!important;
		align-items: center!important;
		justify-content: center!important;
	}
	#prise_de_mesure_pdf_update{
		width:fit-content!important;
		min-width:fit-content!important;
		max-width:fit-content!important;
	}
	#multiStepFormUpdateWallpaper{
		padding : 40px 25px!important;
	}
	#measuresContainerUpdate .mur{
		padding:1rem!important;
	}
	
}