.group_tag {
  background: #F0F0FF;
  border: 1px solid #7B7DFE;
  color: #7B7DFE;
  border-radius: 6px;
  padding: 8px 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.table-container {
  overflow: auto;
  max-height: 600px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid #EBEBEB;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  background: #fff;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-family: 'Poppins', sans-serif;
}

.table-container table {
  table-layout: fixed;
}

.table-container th,
.table-container td {
  min-width: 150px;
  width: 150px;
}

th, td {
  border: 1px solid #EBEBEB;
  padding: 12px;
  text-align: left;
}

.header-row {
  position: sticky;
  top: 0;
  background-color: #F8F9FA;
  color: #000;
  z-index: 2;
}

.fixed-cell {
  position: sticky;
  left: 0;
  background-color: #F8F9FA;
  z-index: 1;
  color: #000;
  font-size: 12px;
  font-weight: 600 !important;
}

.header-cell {
  background-color: #F8F9FA;
  color: #000 !important;
  font-size: 12px;
  font-weight: 600 !important;
}

.header-row .fixed-cell {
  z-index: 3;
}

.data-cell {
  min-width: 60px;
  font-size: 16px;
  font-weight: 600;
}

/* Controls wrapper */
.tool-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: #FBFBFB;
  border: 1px solid #EBEBEB;
  border-radius: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* Style de base du slider */
#cellWidthSlider {
  -webkit-appearance: none;
  width: 200px;
  height: 6px;
  border-radius: 6px;
  background: #EBEBEB;
  outline: none;
  transition: all .2s;
}

#cellWidthSlider:hover {
  background: #DEE2E6;
}

#cellWidthSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #7B7DFE;
  cursor: pointer;
  transition: all 0.2s;
}

#cellWidthSlider::-webkit-slider-thumb:hover {
  background: #6A6CF0;
  transform: scale(1.1);
}

#cellWidthSlider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #7B7DFE;
  cursor: pointer;
  border: none;
}

#cellWidthSlider::-moz-range-track {
  background: #EBEBEB;
  border: none;
}

#cellWidthSlider::-ms-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #7B7DFE;
  cursor: pointer;
}

#cellWidthSlider::-ms-track {
  background: transparent;
  border-color: transparent;
  color: transparent;
}

#searchInput {
  border: 1px solid #EBEBF4;
  border-radius: 6px;
  padding: 10px 15px;
  width: 300px;
  background: #fff;
  color: #676d8a;
  outline: 0;
  transition: all .35s;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  height: 45px;
}

#searchInput:focus {
  border-color: #7B7DFE;
}

.sort-indicator {
  margin-left: 5px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

th:hover .sort-indicator {
  opacity: 1;
}

th:hover {
  background-color: #E9ECEF;
}

#cellWidthValue {
  color: #6C757D;
  font-size: 12px;
  font-weight: 500;
}

#explications {
  display:none;
}
.explications {
  margin-top:15px;
  color:#000000;
  font-size:13px;
}

.buttons-container {
  display: flex;
  gap: 10px;
  align-items: center;
}

#downloadCSV, #hide_zero {
  background: #000;
  border: 1px solid #000;
  color: #fff;
  border-radius: 6px;
  padding: 8px 16px;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 45px;
}

#downloadCSV:hover, #hide_zero:hover {
  background: #333;
  border-color: #333;
  color: #fff;
}

#groupe_filter, #mode_filter {
  height: 45px;
  border-radius: 6px;
  border: 1px solid #EBEBF4;
  padding: 10px 15px;
  background: #fff;
  color: #676d8a;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  outline: 0;
  transition: all .35s;
}

#groupe_filter:focus {
  border-color: #7B7DFE;
}

.highlight-row {
  background-color: #F8F9FA;
}

.highlight-col {
  background-color: #F0F0F0;
}

.highlight-cell {
  background-color: #E9ECEF;
}

/* Page wrapper */
.tool-page-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  font-family: 'Poppins', sans-serif;
}

.tool-page-header {
  text-align: center;
  margin-bottom: 30px;
}

.tool-page-header h2 {
  color: #000;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 10px;
}

.tool-page-description {
  color: #6C757D;
  font-size: 16px;
  margin: 0;
}

/* Filter container */
#filter_container {
  display: flex;
  gap: 15px;
  padding: 20px;
  background: #FBFBFB;
  border: 1px solid #EBEBEB;
  border-radius: 12px;
  margin-bottom: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.left_filter_container {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.input_box select {
  height: 45px;
  border-radius: 6px;
  border: 1px solid #EBEBF4;
  padding: 10px 15px;
  background: #fff;
  color: #676d8a;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  outline: 0;
  transition: all .35s;
  min-width: 200px;
}

.input_box select:focus {
  border-color: #7B7DFE;
}

/* Group filter buttons */
.commun_group_filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.group_filter {
  background: #F8F9FA;
  border: 1px solid #DEE2E6;
  color: #6C757D;
  border-radius: 6px;
  padding: 8px 16px;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  height: 45px;
  display: flex;
  align-items: center;
}

.group_filter:hover {
  background: #7B7DFE;
  border-color: #7B7DFE;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(123, 125, 254, 0.3);
}

/* Loading state */
.loading-state {
  text-align: center;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #7B7DFE;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .tool-controls,
  #filter_container {
    flex-direction: column;
    align-items: stretch;
  }
  
  #searchInput,
  .input_box select {
    width: 100%;
  }
  
  #cellWidthSlider {
    width: 100%;
  }
  
  .table-container {
    max-height: 400px;
  }
  
  .tool-page-header h2 {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .tool-page-wrapper {
    padding: 10px;
  }
  
  th, td {
    padding: 8px;
    font-size: 11px;
  }
  
  .data-cell {
    font-size: 14px;
  }
}
