* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  height: 100vh;
  background-color: #ccc;
}

.grid-layout {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  grid-template-rows: repeat(10, 1fr);
  gap: 10px;
  height: 100vh;
  padding: 10px;
}
.data-actions {
  grid-column: 3 / 5;
  grid-row: 1 / 4;
  border-radius: 5px;
  flex-direction: column;
  display: flex;
  padding: 5px;
  align-items: stretch; /* s'étire pour contenir les sections */
  background-color: #f9f9f9; 
  justify-content: center;
  /* margin: auto;*/
}

.section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
}

.date-section {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
}

.adv-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  width: 100%;
}

.data-btn {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  background-color: #ffffff;
  border: 2px solid #ddd;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0; /* permet de s'engager dans le grid */
}

.data-btn:hover {
  background-color: #eef1f4;
  border-color: #bbb;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.data-btn.active-type {
  background-color: #007BFF;    /* bleu vif */
  border-color: #0056b3;
  color: white;
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
  transform: translateY(-1px);
}

#advTable tbody tr.active-adv {
  background-color: #d6e9ff; /* bleu pâle */
  font-weight: 600;
}


.separator {
  width: 90%;
  height: 1px;
  background-color: #ddd;
  margin: 1.5rem auto;
  border: none;
}



#left-sidebar {
  grid-column: 1 / 3;
  grid-row: 1 / 9;
  background-color: #f7f7f7;
  border-radius: 5px;
  border-right: 1px solid #ccc;
  overflow-y: auto;
  padding: 10px;
}
#left-sidebar h2 {
  margin: 0;
  padding: 0;
}
.exit{
  grid-column: 1 / 3;
  grid-row: 10 / 11;
  top: 10px;
  right: 10px;
  background-color: #f44336;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  z-index: 3;
}
/* .edit-data {
  grid-column: 1 / 3;
  grid-row: 9 / 10;
  top: 10px;
  right: 10px;
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  z-index: 3;
} */
 .non-editable {
  background-color: #f0f0f0;
  color: #555;
  cursor: not-allowed;
}

 .section-role{
   grid-column: 1 / 3;
   grid-row: 9 / 10;
   display: flex;
   justify-content: center;
   align-items: center;

 }
.toggle-container{
  width: 120px;
  height: 60px;
  background-color: rgb(76, 146, 62);
  border-radius: 50px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.4s;
  display: flex;
  align-items:  center;
  justify-content: space-between;
  padding: 0 10px;
  box-sizing: border-box;
}

.circle{
  width:50px;
  height:50px;
  background-color: white;
  border-radius: 50%;
  position: absolute;
  top: 5px;
  left: 5px;
  transition: left 0.4s;
  z-index: 2;
}

.text-left, .text-right{
  color: white;
  font-weight: bold;
  font-size: 14px;
  z-index: 1;
}

.on{
  background-color: #6f9bf8;
}
.on .circle{
  left: 60px;
}
#data {
  grid-column: 5 / 7;
  grid-row: 1 / 4;
  height: 100%;
  overflow-y: auto;
  padding: 5px;
  border: solid 1px #0e0e0e;
  border-radius: 5px;
  background-color: rgba(105, 104, 104, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#data::-webkit-scrollbar {
  display: none;
}
#data img {
  max-width: 90%;
  max-height: 100%; /* jamais dépasser #data */
  height: auto;
  border-radius: 5px;
  object-fit: contain;
  display: block;
}

#info-container {
  border-radius: 2px;
  padding-left: 4px;
  font-size: 14.5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: solid 1px #000000;
}

#map-container {
  grid-column: 7 / 21;
  grid-row: 1 / 4;
  height: 100%;
}
#map {
  width: 100%;
  height: 100%;
}


#dataVoie-container {
  position: relative;
  grid-column: 3 / 21;
  grid-row: 4 / 11;
  height: 100%;
  overflow: hidden;
  border: solid 1px #0e0e0e;
  border-radius: 5px;
  background-color: rgba(105, 104, 104, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

.voie-content {
  flex: 1;
  display: none;
  visibility: hidden;
  overflow-y: auto;
  padding: 10px;
  animation-duration: 0.5s;
  animation-fill-mode: both;
}

.voie-content.active {
  display: flex;
  visibility: visible;
  animation-name: slideInUp;
}

@keyframes slideInUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideOutDown {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(100%); opacity: 0; }
}

.voie-toggle {
  position: absolute;
  bottom: 0;
  width: 100%;
  text-align: center;
}

.toggle-tab {
  background-color: #222;
  color: white;
  padding: 5px 10px;
  cursor: pointer;
  width: max-content;
  margin: 0 auto;
  border-radius: 5px 5px 0 0;
  transition: background 0.3s;
  transform: rotate(0deg);
}
.toggle-tab.active {
  transform: rotate(180deg); /* Quand actif, flèche vers le haut */
}
.toggle-tab:hover {
  background-color: #444;
}

.toggle-menu {
  display: block;
  background-color: #333;
  padding: 10px;
  border-top: 1px solid #555;
}

.toggle-menu button {
  margin: 5px;
  padding: 6px 12px;
  background-color: #555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.toggle-menu button:hover {
  background-color: #777;
}
#hub {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 5px;
}
#hub button{
  margin: 5px;
  padding: 25px 40px;
  font-size: 29px;
  background-color: #555;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* Autres styles */
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}




.info-item {
  margin-bottom: 3px;
  display: flex;
  flex-direction: column;
}

.info-item label {
  font-weight: bold;
}

.info-item span {
  margin-left: 5px;
  color: #ddd;
}




/* partie croisement */

#voie-croisement {
  flex-direction: column;
  padding: 10px;
  font-family: Arial, sans-serif;
}
.voie-type-container[data-type="bs"]{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
}
.voie-type-container[data-type="bs"] input {
  text-align: center;
}
.voie-type-container[data-type="bs"] .croisement-img-bs img {
  width: 100%;
  max-width: 550px;
  height: auto;
  border-radius: 8px;
  border: solid 1px blue;
}
.voie-type-container[data-type="bs"] .croisement-img-bs{
  position: relative;
}
.voie-type-container[data-type="bs"] .croisement-img-bs .p2p_g{
  position: absolute;
  top: 32%;
  left: 14%;
  width: 25%;
  height: 10%;
}
.voie-type-container[data-type="bs"] .croisement-img-bs .p2p_d{
  position: absolute;
  top: 32%;
  left: 57%;
  width: 25%;
  height: 10%;
}
.container_coeur2c_h,
.container_coeur2c_b {
  position: relative;
}

.container_coeur2c_h img,
.container_coeur2c_b img {
  width: 100%;
  max-width: 750px;
  height: auto;
}

/* éléments côté gauche */
.container_coeur2c_h .ep_cr_g,
.container_coeur2c_b .ep_cr_g {
  position: absolute;
  top: 4%;
  left: 16.87%;
  width: 7.9%;
  height: 11%;
}
.container_coeur2c_h .ep_cal_g,
.container_coeur2c_b .ep_cal_g {
  position: absolute;
  top: 16%;
  left: 16.87%;
  width: 7.9%;
  height: 11%;
}
.container_coeur2c_h .nb_cal_g,
.container_coeur2c_b .nb_cal_g {
  position: absolute;
  top: 29%;
  left: 16.87%;
  width: 7.9%;
  height: 11%;
}

/* éléments côté droit */
.container_coeur2c_h .ep_cr_d,
.container_coeur2c_b .ep_cr_d {
  position: absolute;
  top: 4%;
  left: 91.31%;
  width: 7.9%;
  height: 11%;
}
.container_coeur2c_h .ep_cal_d,
.container_coeur2c_b .ep_cal_d {
  position: absolute;
  top: 16%;
  left: 91.31%;
  width: 7.9%;
  height: 11%;
}
.container_coeur2c_h .nb_cal_d,
.container_coeur2c_b .nb_cal_d {
  position: absolute;
  top: 29%;
  left: 91.31%;
  width: 7.9%;
  height: 11%;
}

/* élément central (numéro) */
.container_coeur2c_h .coeur2c_num_h,
.container_coeur2c_b .coeur2c_num_b {
  position: absolute;
  top: 79%;
  left: 40%;
  width: 21%;
  height: 14%;
}

.container_coeur2c_h_t,
.container_coeur2c_b_t {
  position: relative;
}
.container_coeur2c_h_t img,
.container_coeur2c_b_t img {
  width: 100%;
  max-width: 500px;
  height: auto;
}


.container_coeur2c_h_t .p2p_g_h,
.container_coeur2c_b_t .p2p_g_b{
  position: absolute;
  top: 29%;
  left: 13%;
  width: 23%;
  height: 11%;
}

.container_coeur2c_h_t .p2p_d_h,
.container_coeur2c_b_t .p2p_d_b{
  position: absolute;
  top: 29%;
  left: 62%;
  width: 23%;
  height: 11%;
}
.container_coeur2c_h_t .coeur2c_num_h_t,
.container_coeur2c_b_t .coeur2c_num_b_t {
  position: absolute;
  top: 79%;
  left: 31%;
  width: 39%;
  height: 14%;
}
.voie-type-container[data-type="to"] {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-evenly;
  gap: 40px;
}

/* Conteneur de gauche */
.voie-type-container[data-type="to"] .croisement-img {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40%;
  gap: 20px;
  max-width: 600px;
}

/* Images à l'intérieur de .croisement-img uniquement (cœur haut/bas) */
.voie-type-container[data-type="to"] .croisement-img img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  border: solid 1px blue; /* Pour test visuel */
}

/* Image de droite uniquement */
.voie-type-container[data-type="to"] .traverse-img {
  position: relative;
  width: 50%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;

}
.voie-type-container[data-type="to"] .traverse-img img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  border: solid 1px blue; /* temporaire pour debug */
}
.voie-type-container[data-type="to"]  input, .voie-type-container[data-type="tj"]  input{
  text-align: center;
}

.traverse-img .p2p_g_h{
  position: absolute;
  top: 16%;
  left: 26.5%;
  width: 20%;
  height: 5%;
}
.traverse-img .p2p_d_h{
  position: absolute;
  top: 16%;
  left: 54.5%;
  width: 20%;
  height: 5%;
}
.traverse-img .libre_passage_g{
  position: absolute;
  top: 42%;
  left: 26.5%;
  width: 20%;
  height: 5%;
}
.traverse-img .libre_passage_d{
  position: absolute;
  top: 42%;
  left: 54.5%;
  width: 20%;
  height: 5%;
}
.traverse-img .p2p_g_b{
  position: absolute;
  top: 70%;
  left: 26.5%;
  width: 20%;
  height: 5%;
}
.traverse-img .p2p_d_b{
  position: absolute;
  top: 70%;
  left: 54.5%;
  width: 20%;
  height: 5%;
}
.traverse-img .coeur2t_num_g{
  position: absolute;
  top: 90%;
  left: 5.5%;
  width: 28%;
  height: 5%;
}
.traverse-img .coeur2t_num_d{
  position: absolute;
  top: 90%;
  right: 4.5%;
  width: 28%;
  height: 5%;
}


.voie-type-container[data-type="tj"] {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  gap: 40px;
}
.voie-type-container[data-type="tj"] .croisement-img {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  max-width: 750px; /* optionnel, pour éviter débordement */
}
.voie-type-container[data-type="tj"] .croisement-img img {
  width: 100%;
  max-width: 750px;
  height: auto;
  border-radius: 8px;
  border: solid 1px blue; /* temporaire pour debug */
}

.voie-type-container[data-type="tj"] .traverse-img {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
}
.voie-type-container[data-type="tj"] .traverse-img img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  border: solid 1px blue; /* temporaire pour debug */

}

.table-wrapper {
  overflow-x: auto;
}
.croisement-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.croisement-table th,
.croisement-table td {
  padding: 12px;
  border: 1px solid #ddd;
}
.croisement-table thead {
  background-color: #f0f0f0;
  font-weight: bold;
}
.croisement-table tbody td:hover {
  background-color: #f0f8ff;
  transition: background-color 0.2s ease;
  color: black;
}

/* partie écartement */
#voie-ecartement {
  padding: 10px;
  font-family: Arial, sans-serif;
  flex-direction: column;
}
.ecartement-top {
  display: flex;
  width: 100%;
  margin: 2% 0 2% 0;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  justify-content: center;
}
.attaches-image-bs{
  width: 15%;
  height: auto;
  border-radius: 8px;
}
.attaches-image{
  width: 15%;
  max-width: none;
  height: auto;
  border-radius: 8px;
}
@media screen and (max-width: 1920px) {
  .attaches-image {
    width: 14%;
  }
}
.table-wrapper {
  width: 28%;
  min-width: 350px;
  /* overflow: hidden; */
}
.attaches-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 13px;
  table-layout: fixed;
}
.attaches-table th:first-child,
.attaches-table td:first-child {
  width: 50px;
  max-width: 50px;
}
.attaches-table th:nth-child(2),
.attaches-table td:nth-child(2),
.attaches-table th:nth-child(3),
.attaches-table td:nth-child(3) {
  width: 150px;
  max-width: 150px;
}
.attaches-table th:nth-child(2),
.attaches-table th:nth-child(3){
  min-width: 150px;
}


.attaches-table th,
.attaches-table td {
  padding: 6px 8px;
  border: 1px solid #ddd;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.attaches-table tbody tr:nth-child(odd) {
  background-color: #ffffff;
}
.attaches-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}
.attaches-table thead {
  background-color: #f5f5f5;
  font-weight: bold;
}
.attaches-table td:hover {
  background-color: #f0f8ff;
}

.ecartements-image-wrapper {
  position: relative;
  display: inline-block;
  width: 55%;
}
.ecartements-image {
  width: 100%;
  max-height: 300px;
  display: block;
  border-radius: 8px;
}
.ecartement-card {
  position: absolute;
  background-color: #14ff3b;
  border: 1px solid #666666;
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  pointer-events: none;
  white-space: nowrap;
}
.ecartement-card[contenteditable="true"]{
  user-select: text;
  pointer-events: auto; 
  cursor: text;
}

.voie-type-container[data-type="bs"] .ecartement-top .ecartements-image-wrapper .card-1 { top: 17%; left: 4%; }
.voie-type-container[data-type="bs"] .ecartement-top .ecartements-image-wrapper .card-2 { top: 16%; left: 50%; }
.voie-type-container[data-type="bs"] .ecartement-top .ecartements-image-wrapper .card-3 { top: 25%; left: 34.5%; }
.voie-type-container[data-type="bs"] .ecartement-top .ecartements-image-wrapper .card-4 { top: 18%; left: 73%; }
.voie-type-container[data-type="bs"] .ecartement-top .ecartements-image-wrapper .card-5 { top: 46%; left: 72%; }
.voie-type-container[data-type="bs"] .ecartement-top .ecartements-image-wrapper .card-6 { top: 18%; left: 86%; }
.voie-type-container[data-type="bs"] .ecartement-top .ecartements-image-wrapper .card-7 { top: 56%; left: 84%; }

.voie-type-container[data-type="tj"] .ecartement-top .ecartements-image-wrapper .card-1 { top: 45%; left: 13%; }
.voie-type-container[data-type="tj"] .ecartement-top .ecartements-image-wrapper .card-2 { top: 45%; left: 32%; }
.voie-type-container[data-type="tj"] .ecartement-top .ecartements-image-wrapper .card-3 { top: 45%; left: 61%; }
.voie-type-container[data-type="tj"] .ecartement-top .ecartements-image-wrapper .card-4 { top: 45%; left: 78%; }
.voie-type-container[data-type="tj"] .ecartement-top .ecartements-image-wrapper .card-5 { top: 70%; left: 15%; }
.voie-type-container[data-type="tj"] .ecartement-top .ecartements-image-wrapper .card-6 { top: 50%; left: 43.5%; }
.voie-type-container[data-type="tj"] .ecartement-top .ecartements-image-wrapper .card-7 { top: 40%; left: 49.2%; }
.voie-type-container[data-type="tj"] .ecartement-top .ecartements-image-wrapper .card-8 { top: 19%; left: 78%; }

.voie-type-container[data-type="to"] .ecartement-top .ecartements-image-wrapper .card-1 { top: 45%; left: 13%; }
.voie-type-container[data-type="to"] .ecartement-top .ecartements-image-wrapper .card-2 { top: 45%; left: 32%; }
.voie-type-container[data-type="to"] .ecartement-top .ecartements-image-wrapper .card-3 { top: 45%; left: 61%; }
.voie-type-container[data-type="to"] .ecartement-top .ecartements-image-wrapper .card-4 { top: 45%; left: 78%; }
.voie-type-container[data-type="to"] .ecartement-top .ecartements-image-wrapper .card-5 { top: 70%; left: 15%; }
.voie-type-container[data-type="to"] .ecartement-top .ecartements-image-wrapper .card-6 { top: 50%; left: 43.5%; }
.voie-type-container[data-type="to"] .ecartement-top .ecartements-image-wrapper .card-7 { top: 40%; left: 49.2%; }
.voie-type-container[data-type="to"] .ecartement-top .ecartements-image-wrapper .card-8 { top: 19%; left: 78%; }





/* partie plancher */

#voie-test {
  display: flex;
  gap: 40px;
  padding: 20px;
  font-family: Arial, sans-serif;
  flex-direction: row;
  justify-content: center;
}
.bois_container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 50px;
}
.plancher-section {
  max-width: 450px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.chart-container {
  position: relative;
  width: 250px;
  height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.chart-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px;
  font-weight: bold;
  color: #333;
  pointer-events: none;
  user-select: none;
}
.chart-subtext {
  margin-top: 8px;
  font-size: 14px;
  color: #666;
  text-align: center;
}
.plancher-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 14px;
  table-layout: fixed;
}
.plancher-table th,
.plancher-table td {
  border: 1px solid #ccc;
  padding: 6px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plancher-table thead {
  background-color: #f0f0f0;
  font-weight: bold;
}
.mini-table {
  flex: 0 0 150px; /* largeur fixe */
  border-collapse: collapse;
  height: 50px;
  font-size: 14px;
  text-align: center;
  justify-content: center;
  border: 1px solid #ccc;
}
.mini-table th,
.mini-table td {
  border: 1px solid #ccc;
  padding: 8px 12px;
  background-color: #fafafa;
}
.mini-table thead {
  background-color: #eee;
  font-weight: bold;
}




.table-container {
    display: grid;
    grid-template-columns: repeat(17, 1fr);
    grid-template-rows: repeat(17, 1fr);
    gap: 10px;
    width: 100%;
    max-height: 100%;
    overflow: auto; /* Pour permettre le scroll si besoin */
}


.bavure-table{
    grid-column: 1 / 9;
    grid-row: 1 / 5;
    display: block;
    overflow-y: auto;
    table-layout: fixed;
    border: solid 2px rgb(0, 0, 0);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;

    /* border: solid 1px black; */
}

.ebrechure-table{
    grid-column: 1 / 9;
    grid-row: 5/ 12;
    display: block;
    overflow-y: auto;
    table-layout: fixed;
    border: solid 2px rgb(0, 0, 0);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    /* border: solid 1px rgb(82, 86, 121); */
}
.app-dm-ag{
    grid-column: 1 / 9;
    grid-row: 12 / 16;
    display: block;
    overflow-y: auto;
    table-layout: fixed;
    border: solid 2px rgb(0, 0, 0);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    /* border: solid 1px rgb(82, 86, 121); */
}

.usure_lca{
    grid-column: 9 / 18;
    grid-row: 1 / 10;
    display: block;
    overflow-y: auto;
    table-layout: fixed;
    border: solid 2px rgb(0, 0, 0);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    /* border: solid 1px rgb(82, 86, 121); */
}
.usure_la{
    grid-column: 9 / 18;
    grid-row: 10 / 16;
    display: block;
    overflow-y: auto;
    table-layout: fixed;
    border: solid 2px rgb(0, 0, 0);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    /* border: solid 1px rgb(82, 86, 121); */
}

.bavure-table::-webkit-scrollbar,
.ebrechure-table::-webkit-scrollbar,
.app-dm-ag::-webkit-scrollbar,
.usure_lca::-webkit-scrollbar,
.usure_la::-webkit-scrollbar {
  width: 10px;
  background-color: rgb(255, 255, 255);
  border-top-right-radius: 8px; 
  border-bottom-right-radius: 8px;
}


.bavure-table::-webkit-scrollbar-thumb,
.ebrechure-table::-webkit-scrollbar-thumb,
.app-dm-ag::-webkit-scrollbar-thumb,
.usure_lca::-webkit-scrollbar-thumb,
.usure_la::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #555, #999);
  border-radius: 5px;
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.3);
  cursor: grab;
  z-index: 4;
}


.table-container table  {
    width: 100%;
    height: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 14px;
    text-align: center;
}
.table-container table th:first-child,
.table-container table td:first-child{
  width: 43%; /* largeur fixe */
  min-width: 150px;
  max-width: 43%;
  overflow: hidden; 
  text-overflow: ellipsis;
}
.table-container table thead tr , #summary-table_bs thead tr, #summary-table_tj thead tr {
    color: #111827; /* gris foncé (quasi noir) */
    font-weight: 600;
    text-align: left;
    position: sticky;
    top: 0;
    padding: 8px;
}
.table-container table th, #summary-table_bs th, #summary-table_tj th {
  background-color: #d8d7d7;
  color: #111827;
  font-weight: 600;
  text-align: left;
  position: static;
  top: 0;
  /* padding: 8px; */
  /* border-bottom: 3px solid #bed2fa; */
  z-index: 10; /* important */
}



.table-container table tbody tr:nth-child(even), #summary-table_bs tbody tr:nth-child(even) , #summary-table_tj tbody tr:nth-child(even) {
  background-color: #ffffff;
}

.table-container table tbody tr:nth-child(odd),#summary-table_bs tbody tr:nth-child(odd) , #summary-table_tj tbody tr:nth-child(odd) {
  background-color: #f9fafb;
}

.table-container table tbody td, #summary-table_bs td, #summary-table_tj td {
  padding: 6px 10px;
  color: #1f2937;
}

.table-container table tbody td:first-child , #summary-table_bs tbody td:first-child, #summary-table_tj tbody td:first-child {
  background-color: #f3f4f6; /* comme le header */
  font-weight: 500;
}
.voie-type-container[data-type="summary"] {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 20px;
}

#show-summary, #show-detail {
  display: block;
  position: absolute;
  top: 10px;
  right: 2px;
  background-color: #4f46e5; /* violet */
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  border: solid 1px #000000;
}

#new-measure-btn{
    display: block;
  position: absolute;
  top: 10px;
  left: 2px;
  background-color: #4f46e5; /* violet */
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  border: solid 1px #000000;
}
.tooltip {
  position: absolute;
      bottom: 100%;       /* au-dessus du bouton */
    left: 0%;
    /* transform: translateX(-50%); */
  background: #333;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  /* transform: translate(-50%, -100%); */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.tooltip.show {
  opacity: 1;
}

#summary-table_bs, #summary-table_tj{
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 14px;
  border: solid 3px #000000;
  border-radius: 8px;
}