@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
/* Example with normalize.css */
@import url('https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css');

/* previous blue: #84b7ed */

html,
body {
  font-family: 'Roboto', sans-serif;
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
  display: flex;
  /* Flexbox layout */
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  /* Stack items vertically */
}

/* Main content container */
#content {
  flex: 1;
  /* Allows the content to take up all available space */
}

header {
  background-color: #0056b3;
  color: white;
  padding: 1rem 0;
  text-align: center;
}

.header-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 20px;
  background-color: #0056b3;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .header-container {
    flex-direction: row;
    justify-content: space-between;
  }
}

.logo-container img {
  width: 80px; /* ~80% of previous size */
  height: auto;
}

.header-title {
  white-space: normal; /* Allow wrapping */
}

.header-title h1 {
  font-size: 1.25rem;
  margin: 0;
  line-height: 1.4;
}


main {
  position: relative;
  background-size: cover; /* Ensures it covers the full section */
  background-position: center; /* Centers the image */
  max-width: 100%;
  background-repeat: no-repeat;
  padding: 20px;
  z-index: 1; /* Ensure it stacks properly */
    /* Placeholder background while waiting for lazy loading */
    background-color: #f3f3f3; /* Light gray background to prevent blank flash */
}

main.lazy-loaded {
  background-image: url('https://eduinforessources.s3.eu-south-2.amazonaws.com/background1.webp');
}
/* Ensure the overlay only covers `main` and not `header` */
main::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.5); /* Adjust transparency */
  z-index: -1; /* Keeps the overlay behind the content */
}

searchSection {
  max-width: 40%;
  margin: 1rem auto;
  padding: 1rem;
  background: rgb(255, 255, 255); */
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

  /* Center content */
  display: flex;
  flex-direction: column;
  align-items: center; /* Centers `.toggle-group` horizontally */
}

.search-toggle-container {
margin-top:15px;

}

ips-container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.ips-popup-container-old {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border: 1px solid #ccc;
  padding: 20px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none; /* Hide it by default */
}

/* Popup container */
.ips-popup-container {
  background: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 999999; /* Ensure it's above the overlay */
  display: block; /* Ensure it's visible */
}

.hidden {
  display: none;
}

.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #ccc;
}

/* Dropdown container */
.dropdown-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 20px;
}
/* Add horizontal padding on desktop */
@media (min-width: 768px) {
  .dropdown-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
/* Dropdown block */
.dropdown {
  display: flex;
  flex-direction: column;
  margin: 0 0.5rem;
  width: 100%;
  max-width: 320px; /* Controls max size on desktop */
  min-width: 250px;
  position: relative;
}

/* Responsive override for small screens */
@media (max-width: 640px) {
  .dropdown {
    max-width: 100%;
    min-width: unset;
    margin: 0;
  }
}

/* Label styling */
.dropdown label {
  font-weight: bold;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

/* Input and select base styling */
.dropdown select,
.dropdown input[type="text"] {
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  outline: none;
  box-sizing: border-box;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* Focus state */
.dropdown select:focus,
.dropdown input[type="text"]:focus {
  border-color: #2563eb; /* Tailwind blue-600 */
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}


/* Suggestions box */
.suggestions {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #ccc;
  max-height: 150px;
  overflow-y: auto;
  background-color: white;
  position: absolute;
  z-index: 1000;
  width: calc(100% - 2px);
  /* Matches the input width minus border */
  top: 100%;
  /* Position suggestions below the input */
  left: 0;
}

.suggestions li {
  padding: 8px;
  cursor: pointer;
}

.suggestions li:hover {
  background-color: #f0f0f0;
}

.suggestion-item {
  cursor: pointer;
  padding: 5px;
}

.suggestion-item:hover {
  background-color: #f0f0f0;
}

/* Button container styling */
.button-container {
  text-align: center;
  margin-top: 1.5rem;
}

/* Filter Section Styles */
.filter-section-lycees,
.filter-section-colleges {
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  font-family: Arial, sans-serif;
  width: 60%;
  /* Take full width of the parent container */
  box-sizing: border-box;
  /* Ensure padding is included in width calculation */
  margin: 0 auto;
}

.filter-button-container {
  display: flex;
  justify-content: center;
  align-items: center; /* Centers vertically (if needed) */
  margin-top: 20px;
}

.lycees-filter-toggle-clickable,
.colleges-filter-clickable {
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  /* Adds margin below the clickable text */
}

.lycees-filter-arrow {
  transition: transform 0.3s ease-in-out;
  cursor: pointer;
}

.expanded .lycees-filter-arrow {
  transform: rotate(180deg);
}

.colleges-filter-arrow {
  transition: transform 0.3s ease-in-out;
  cursor: pointer;
}

.expanded .colleges-filter-arrow {
  transform: rotate(180deg);
}

.predefined-filters-lycees, .predefined-filters-colleges {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom:20px;
}



.predefined-filters-lycees label {
  font-weight: bold;
  font-size: 1rem;
}

.filter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.filter-links > div {
  flex: 1 0 0; /* grow: 1, shrink: 0, basis: 0 */
  max-width: 25%; /* force exactly 4 per row */
  box-sizing: border-box;
  text-align: center;
  background: #f3f3f3;
  padding: 0.5rem;
  border-radius: 4px;
}

.filter-links > div a {
  text-decoration: none;
  color: #0056b3;
  font-size: 1rem;
  display: block;
}


#searchButton:hover,
#compute-ips-button:hover {
  background-color: #003d80;
}

/* Disabled search button styling */
#searchButton:disabled,
#compute-ips-button:disabled {
  background-color: #ccc;
  /* Greyed out */
  cursor: not-allowed;
}

#search-disclaimer-container,
#source-disclaimer-container-colleges,
#source-disclaimer-container-lycees {
  background-color: #f8f9fa;
  /* Light gray background */
  border-left: 5px solid #007bff;
  /* Blue left border */
  padding: 15px 20px;
  /* Padding around the content */
  margin-top: 20px;
  /* Spacing above the disclaimer */
  font-family: 'Arial', sans-serif;
  /* Clean sans-serif font */
  font-size: 14px;
  /* Slightly smaller font for the disclaimer */
  color: #333;
  /* Dark text color for readability */
  border-radius: 5px;
  /* Rounded corners */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  /* Subtle shadow for elevation */
  text-align: justify;
}

#search-disclaimer-container p {
  margin: 10px 0;
  /* Space between paragraphs */
}

#search-disclaimer-container a {
  color: #007bff;
  /* Link color */
  text-decoration: none;
  /* Remove underline */
}

#search-disclaimer-container a:hover {
  text-decoration: underline;
  /* Underline on hover */
}

#search-disclaimer-container b {
  font-weight: bold;
  /* Make bold text stand out */
}

a:link,
a:visited {
  color: blue;
  text-decoration: underline; /* optional */
}

#searchButton,
#compute-ips-button,
#filterLyceesButton,
#filterCollegesButton {
  padding: 0.7rem 2rem;
  font-size: 1rem;
  color: white;
  background-color: #0056b3;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#searchButton:hover,
#compute-ips-button:hover,
#filterLyceesButton:hover,
#filterCollegesButton:hover {
  background-color: #003d80;
}

/* Popup styling */
.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 1001;
}

.popup p {
  margin: 0;
  font-size: 1rem;
}

.popup button {
  background-color: #0056b3;
  color: white;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 4px;
}

.popup button:hover {
  background-color: #003d80;
}

.top-info-in-perf-lycee-table {
  display: block;
  margin-left: 10px;
  /* You can adjust this value for your preferred starting distance */
}

.top-info-in-perf-lycee-table p,
.top-info-in-perf-lycee-table a {
  margin-left: 0;
  /* Ensure no extra margin is applied */
}

.address-info {
  margin-top: 5px;
}

.top-info-in-perf-lycee-table a {
  display: block;
  margin-top: 5px;
}

/* Style for the table */
table {
  width: 90%;
  margin: 0 auto;
  /* Center the table horizontally */
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  /* Add some shadow to give depth */
}

/* Table headers */
th {
  background-color: #84b7ed;
  /* Green background */
  color: white;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  /* Make header clickable for sorting */
}

/* Table rows */
td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}
  /* On hover add hand */
  td.clickable {
    cursor: pointer;
  }

  .non-clickable td {
    pointer-events: none;  /* Disable clicks */
    cursor: default;       /* Show default cursor */
  }

tr.highlight-result-table-row {
  background-color: #aaccff !important;
  transition: background-color 0.3s ease;
}

tr.highlight-result-table-row:hover {
  background-color: #ffeb3b;
  /* Highlight on hover */
  cursor: pointer;
  /* Optional: change the cursor to pointer */
}

/* Alternate row colors */
tr:nth-child(even) {
  background-color: #f2f2f2;
}

tr:nth-child(odd) {
  background-color: #ffffff;
}

/* Hover effect on rows */
tr:hover {
  background-color: #ddd;
}

/* Popup overlay styling */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 110000;
}

/* Popup content styling */
.popup-content {
  position: relative;
  background: #fff;
  padding: 20px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 5px;
  max-width: 90%;
  max-height: 80%;
  overflow: auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

table.popup-table {
  margin: auto;
  /* Center the table */
  border-collapse: collapse;
  /* Neat table borders */
  width: 100%;
  /* Ensure the table takes the full width */
}

/* Popup table styling */
.popup-table {
  width: 100%;
  border-collapse: collapse;
}

.popup-table th,
.popup-table td {
  border: 1px solid #ddd;
  padding: 8px;
}

.popup-table th {
  background-color: #f2f2f2;
  font-weight: bold;
}
.close-cross {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 1.5em;
}

/* Close button styling */
.popup-close-button {
  margin: 10px auto;
  /* Adds margin at the top and centers the button horizontally */
  margin-top: 10px;
  padding: 5px 10px;
  cursor: pointer;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 3px;
  display: block;
  /* Makes the button a block-level element */
}

/* Style for the results section (table and map) */
#lycees-result-container,
#colleges-result-container,
#lycees-stats-container {
  width: 90%;
  margin: 20px auto;
  /* Center horizontally and add spacing */
  background-color: #ffffff;
  /* Optional: Add a background for clarity */
  border: 1px solid #ddd;
  /* Optional: Add a border for visual separation */
  border-radius: 8px;
  /* Optional: Rounded corners */
  padding: 20px;
  /* Add some internal spacing */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  /* Optional: Add depth with shadow */
}

/* ── Map section wrapper — handles centering previously on #openMap ── */
#openMap-wrapper {
  width: 90%;
  margin: 20px auto;
}

/* ── Leaflet map container — flex-child inside the wrapper row ── */
#openMap {
  flex: 1;
  min-width: 0;
  width: 100%;
  margin: 0;
  height: 798px;
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: clip;
  z-index: 1;
}

@media (max-width: 640px) {
  #openMap {
    height: 80vh;
    border-radius: 0;
  }

  /* ── Map legend (établissement-type picker): smaller frame on mobile ── */
  #openMap .leaflet-control-layers {
    padding: 4px 6px !important;
    font-size: 10px !important;
    width: 140px !important;        /* match the sector panel width below */
    box-sizing: border-box;
    opacity: 1 !important;          /* always fully visible */
  }
  #openMap .leaflet-control-layers label {
    font-size: 10px !important;
    gap: 0.25rem !important;
    margin-bottom: 0.1rem !important;
  }
  #openMap .leaflet-control-layers input[type="checkbox"] {
    width: 11px !important;
    height: 11px !important;
  }
  #openMap .leaflet-control-layers img {
    width: 14px !important;
    height: 14px !important;
  }

  /* ── Sectorisation label: match other legend font sizes ── */
  #sector-control-section label span {
    font-size: 10px !important;
    font-weight: 600;
  }
  #sector-control-section {
    margin-top: 3px !important;
    padding-top: 3px !important;
  }

  /* ── Address bar: closer to top of map ── */
  #openMap .leaflet-top.leaflet-left .leaflet-control {
    margin-top: 4px !important;
  }
  #openMap .leaflet-control-zoom {
    margin-top: 8px !important;
  }
  #openMap .address-search-control {
    width: 180px !important;
    padding: 4px 6px !important;
  }

  #openMap-wrapper {
    width: 100%;
    margin: 12px auto;
  }

  /* Position the flex wrapper as the offset parent for the absolutely-positioned
     sector panel — gives the map the full width while the panel floats over it. */
  #openMap-wrapper > div {
    position: relative;
  }

  /* Sector panel stacks BELOW the établissement-type picker (Leaflet layer
     control) in the top-right corner of the map. Same width, 100% opacity. */
  #sector-right-panel {
    position: absolute;
    top: 180px;          /* below the picker (~8px top + ~150-170px tall) */
    right: 8px;
    width: 140px;
    height: auto;
    max-height: calc(80vh - 200px);
    border-radius: 6px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    z-index: 1000;       /* above leaflet panes */
    opacity: 1;
  }
}

.leaflet-container {
  height: 50%;
  width: 50% ;
  border-radius: 12px;
  position: relative;
  z-index: 0;
}



  .leaflet-control-layers label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    margin-bottom: 0.25rem;
  }

  .leaflet-control-layers input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
  }

  .leaflet-control-layers img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .leaflet-control-layers span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }



/* Space below the dropdown container 
.dropdown-container {
  margin-bottom: 20px;
}
*/



/* Add these to your existing CSS file */
.popup-table {
  width: 90%;
  margin: 0 auto;
  /* Center the table horizontally */
  border-collapse: collapse;
  font-family: Arial, sans-serif;
}

.popup-table th {
  background-color: #84b7ed;
  /* Green background */
  color: white;
  padding: 10px;
  text-align: left;
}

.popup-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.popup-table tr:nth-child(even) {
  background-color: #f2f2f2;
}

.popup-table tr:nth-child(odd) {
  background-color: #ffffff;
}

.popup-table tr:hover {
  background-color: #ddd;
}

.popup-table th {
  cursor: pointer;
}


.info-icon {
  cursor: pointer;
  font-size: 1em;
  color: #007bff;
  /* Icon color */
  position: relative;
  display: inline-block;
  margin-left: 8px;
}

.info-icon:hover .ips-tooltip-text,
.info-icon:focus .ips-tooltip-text {
  visibility: visible;
  opacity: 1;
}

.ips-submit-button {
  flex: 1;
  text-align: center;
}

#ips_score_placeholder {
  margin-top: 15px;
  text-align: center;
  font-weight: bold;
  color: #333;
}

.ips-tooltip-text {
  visibility: hidden;
  opacity: 0;
  width: 600px;
  background-color: #f9f9f9;
  color: #333;
  font-size: 14px;
  /* Adjust text size here */
  text-align: left;
  border-radius: 5px;
  padding: 10px;
  position: absolute;
  z-index: 1;
  top: 20px;
  left: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ips-tooltip-text a {
  color: #007bff;
  text-decoration: underline;
}


#lycees-filter-container,
#colleges-filter-container {
  display: block;
  width: 100%;
  margin: 0 auto;
  /* Center align the filter section */
  margin-bottom: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background-color: transparent;
  /*display: flex; /* Enables horizontal alignment */
  flex-wrap: wrap;
  /* Allows wrapping if needed */
  align-items: center;
  /* Aligns items vertically */
  justify-content: flex-start;
  /* Aligns items to the left */
  gap: 1rem;
  /* Adds spacing between elements */
}


.filters-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  /*  justify-content: space-between; /* Ensure spacing between items */
}
.filters-container-colleges {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  /*  justify-content: space-between; /* Ensure spacing between items */
}

.filter {
  flex: 1 1 calc(50% - 20px);
  /* Responsive: two filters per row */
  display: flex;
  flex-direction: column;
}

/* Specialty filters - 3 columns row */
.filter-specialites-row {
  display: flex;
  gap: 15px;
  width: 100%;
  margin-top: 10px;
}

.filter-specialite {
  flex: 1 1 calc(33.333% - 10px);
  /* 3 columns for specialty selectors */
  display: flex;
  flex-direction: column;
}

.filter-specialite label {
  font-weight: bold;
  margin-bottom: 5px;
  color: #333;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-specialite select {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
  background-color: white;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.filter-specialite select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.filter-specialite select optgroup {
  font-weight: bold;
  font-style: normal;
  padding: 5px 0;
}

.filter-specialite select option {
  padding: 5px 10px;
  font-weight: normal;
}

/*
.checkbox-group {
  display: flex;
  flex-direction: column;
  margin: 0 0.5rem;
  min-width: 250px;
  gap: 0.5rem;
}


.checkbox-group label {
  font-weight: normal;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}
 

.checkbox-group input[type="checkbox"] {
  transform: scale(1.2);
  margin-right: 0.5rem;
}
 */
.filter label {
  font-weight: bold;
  margin-bottom: 5px;
  color: #333;
  font-size: 16px;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

input[type="number"] {
  align-self: left;
  /*width: 50px;   Set a fixed width */
  text-align: center; /* Center the text inside the input */
  padding: 2px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 5px;
  /* width: 100%; */
  max-width: 50px;
}

.info-icon {
  cursor: pointer;
  font-size: 14px;
  margin-left: 5px;
  color: #007bff;
}

.info-icon:hover {
  color: #0056b3;
}



.info-tooltip {
  position: absolute;
  z-index: 99999;
  background: white;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 320px;
  font-size: 0.875rem;
  pointer-events: auto;
}


/* IPS Modal Overlay (Darkens the background) */
.ips-modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  /* Stay in place */
  z-index: 1;
  /* Sit on top */
  left: 0;
  top: 0;
  width: 100%;
  /* Full width */
  height: 100%;
  /* Full height */
  overflow: auto;
  /* Enable scrolling if needed */
  background-color: rgba(0, 0, 0, 0.4);
  /* Black with transparency */
}

/* IPS Modal Content (The actual box) */
.ips-modal-content {
  background-color: #fff;
  margin: 15% auto;
  /* Center the modal */
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  /* Could be any width you want */
  max-width: 600px;
  /* Maximum width of the modal */
}

/* IPS Close Button */
.ips-popup-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.ips-popup-close:hover,
.ips-popup-close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.slider-container {
  width: 100%;
  display: flex;
  justify-content: flex-start; /* Aligns the slider to the left */
  margin-top: 5px;
  margin-bottom: 15px;
}

input[type="range"] {
  width: 90%;
}

input[type="range"].progress {
  appearance: none;
  width: 90%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, #1762d9 0%, #ccc 0%);
  outline: none;
}

input[type="range"].progress::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  background: #0056b3;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -4px;
}

input[type="range"].progress::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #0056b3;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}


.filter-group-taux,
.filter-group-ips
 {
  display: flex;
  flex-direction: column; /* Stack sliders vertically */
  gap: 10px;
  width: 100%; /* Use full width of parent */
}

.taux-ips-sliders {
  display: flex;
  justify-content: space-between; /* Space items between */
  width: 100%; /* Ensure the container takes up full width */
  margin-top: 20px; /* Adjust this value to control the space above the component */
}

.taux-ips-sliders > div {
  width: 50%; /* Set the width of each slider group */
}

.taux-ips-sliders > div:first-child {
  margin-right: auto; /* First item is aligned to the left */
}

.taux-ips-sliders > div:last-child {
  margin-left: auto; /* Second item is aligned to the left of the second half */
}

.toggle-group {
  display: flex;
  gap: 10px;
  justify-content: flex-start; /* Aligns the buttons to the left */
}

.toggle-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch; /* Makes buttons full width */
}

/* Styles for all buttons */
/*
.toggle-button {
  padding: 8px 16px;
  border: 2px solid #84b7ed;
  border-radius: 20px;
  background-color: #84b7ed;
  color: white;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.toggle-button-filter-lycees,
.toggle-button-filter-colleges {
  width: 180px;  
  height: 35px;
  padding: 4px 8px;
  border: 1px solid #84b7ed;
  border-radius: 20px;
  background-color: #84b7ed;
  color: white;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  text-align: center;
  white-space: nowrap;
}


.toggle-button.inactive, 
.toggle-button-filter-lycees.inactive, 
.toggle-button-filter-colleges.inactive {
  background-color: rgb(240, 240, 240);
  color: #0056b3;
}
*/
/* Toggle button styles - minimal CSS to allow Tailwind classes to work */
.toggle-button,
.toggle-button-filter-lycees,
.toggle-button-filter-colleges,
.toggle-button-filter-stats,
.toggle-button-filter-stats-colleges {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  border: 1px solid transparent;
}

/* Hover states - subtle lift effect */
.toggle-button:hover,
.toggle-button-filter-lycees:hover,
.toggle-button-filter-colleges:hover,
.toggle-button-filter-stats:hover,
.toggle-button-filter-stats-colleges:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Compare etablissement cell click */
.compare-toggle-cell {
  user-select: none;
}

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

.result-animate-in {
  animation: fadeSlideIn 0.5s ease-out;
}
/*
#eduinfo-tooltip {
  background-color: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 12px 16px;
  max-width: 500px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  font-size: 0.875rem;
  line-height: 1.5;
}
*/


/* Specialité select: match departement input font size (text-sm on desktop) */
.filter-select {
  font-size: 0.875rem; /* matches sm:text-sm on #departement */
}

/* Force table header flex rows to stay on a single line */
#lycees-table-container th div,
#colleges-table-container th div {
  flex-wrap: nowrap;
  white-space: nowrap;
}

/* ── Freeze first column in result tables (all screen sizes) ── */

#lycees-table-container th:first-child,
#colleges-table-container th:first-child {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 3;
}

#lycees-table-container td:first-child,
#colleges-table-container td:first-child {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  z-index: 2;
  background-color: #ffffff;
}

#lycees-table-container tbody tr:nth-child(even) td:first-child,
#colleges-table-container tbody tr:nth-child(even) td:first-child {
  background-color: #f9fafb; /* gray-50 */
}

#lycees-table-container tbody tr.bg-blue-100 td:first-child,
#colleges-table-container tbody tr.bg-blue-100 td:first-child {
  background-color: #dbeafe !important; /* highlighted row */
}

#lycees-table-container tbody tr:hover td:first-child,
#colleges-table-container tbody tr:hover td:first-child {
  background-color: #fefce8 !important; /* yellow-50 hover */
}

#lycees-table-container tbody tr:hover td:first-child,
#colleges-table-container tbody tr:hover td:first-child {
  background-color: #fefce8; /* yellow-50 */
}

/* Default size (desktop/tablet) */
.astuce-box-college,
.astuce-box-lycee {
  font-size: 0.875rem; /* ~14px */
  line-height: 1.4;
  margin-top: 4px !important;
  margin-bottom: 4px !important;
}

/* Mobile override */
@media (max-width: 640px) {
  .astuce-box-college,
  .astuce-box-lycee {
    font-size: 0.6rem; /* ~11.2px */
  }
}

/* ============================================================================
   NEW: Improved Filter UI Styles
   ============================================================================ */

/* Simple Filter Header */
.filter-header-simple {
  margin-bottom: 12px;
}

/* Predefined Filters - Match Main Search Style */
.predefined-filters-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.predefined-filters-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
}

.predefined-filter-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

/* Match the main search toggle button style */
.preset-toggle-button {
  text-align: center;
  padding: 4px 16px;
  border-radius: 6px;
  background: #dbeafe;
  color: #1e40af;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: 0.875rem;
  white-space: nowrap;
}

.preset-toggle-button:hover {
  background: #bfdbfe;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preset-toggle-button:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .preset-toggle-button {
    padding: 4px 12px;
    font-size: 0.75rem;
  }
}

/* Active Filter Tags */
.active-filters-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
  display: none; /* Hidden by default */
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e7f1ff;
  border: 1px solid #0d6efd;
  padding: 4px 8px 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  color: #0d6efd;
  font-weight: 500;
}

.filter-tag-remove {
  background: none;
  border: none;
  color: #0d6efd;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.filter-tag-remove:hover {
  background: #0d6efd;
  color: white;
}

/* Header Row Layout */
.filter-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Horizontal Grid Layout for Filters */
.filters-grid-horizontal {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Filter Row Section - Horizontal Layout */
.filter-row-section {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.filter-row-section:hover {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.filter-row-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.filter-row-icon {
  font-size: 16px;
}

.filter-row-title {
  font-size: 13px;
  font-weight: 600;
  color: #495057;
}

.filter-section-badge {
  background: #0d6efd;
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  display: none; /* Hidden when 0 */
  margin-left: auto;
}

.filter-row-content {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Inline Filter Groups */
.filter-inline-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-inline-label {
  font-size: 12px;
  font-weight: 500;
  color: #6c757d;
  margin-right: 4px;
}

.filter-inline-divider {
  width: 1px;
  height: 24px;
  background: #dee2e6;
  margin: 0 4px;
}

/* Compact Toggle Buttons */
.toggle-button-compact {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #cbd5e0;
  border-radius: 5px;
  background: white;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.toggle-button-compact.active {
  background: #0d6efd;
  color: white;
  border-color: #0d6efd;
}

.toggle-button-compact.inactive {
  background: white;
  color: #6c757d;
  opacity: 0.7;
}

.toggle-button-compact:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Small Compact Toggle Buttons (for stats) */
.toggle-button-compact-small {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  background: white;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.toggle-button-compact-small.active {
  background: #0d6efd;
  color: white;
  border-color: #0d6efd;
}

.toggle-button-compact-small.inactive {
  background: white;
  color: #6c757d;
  opacity: 0.7;
}

.toggle-button-compact-small:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Two-Column Slider Grid */
.sliders-two-column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  width: 100%;
}

.filter-group-taux,
.filter-group-ips {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Standardize slider widths and reduce font sizes in performance section */
.sliders-two-column-grid .filter {
  width: 100%;
}

.sliders-two-column-grid .filter label {
  font-size: 12px;
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
}

.sliders-two-column-grid .slider-container {
  width: 100%;
  margin-bottom: 8px;
}

.sliders-two-column-grid input[type="range"] {
  width: 100%;
  max-width: none;
}

.sliders-two-column-grid input[type="number"] {
  width: 60px;
  font-size: 12px;
  padding: 4px 6px;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
  .filter-header-simple {
    margin-bottom: 10px;
  }

  .filter-row-label {
    padding: 6px 10px;
  }

  .filter-row-icon {
    font-size: 14px;
  }

  .filter-row-title {
    font-size: 12px;
  }

  .filter-row-content {
    padding: 8px 10px;
    gap: 8px;
  }

  .filter-inline-label {
    font-size: 11px;
  }

  .filter-inline-divider {
    height: 20px;
  }

  .toggle-button-compact {
    padding: 4px 8px;
    font-size: 11px;
  }

  .toggle-button-compact-small {
    padding: 3px 7px;
    font-size: 10px;
  }

  .sliders-two-column-grid {
    grid-template-columns: 1fr;
  }

  .filter-tag {
    font-size: 10px;
    padding: 3px 6px 3px 8px;
  }
}

/* ============================================================================
   Filter Collapse/Expand Styles
   ============================================================================ */

/* Collapse Header */
.filter-collapse-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.filter-collapse-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  color: #495057;
}

.filter-collapse-btn:hover {
  background: #f8f9fa;
  border-color: #cbd5e0;
}

.filter-collapse-icon {
  flex-shrink: 0;
}

.filter-collapse-text {
  white-space: nowrap;
}

.filter-collapse-chevron {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  margin-left: 4px;
}

.filter-collapse-chevron.rotated {
  transform: rotate(180deg);
}

/* Collapsible Content */
.filter-collapsible-content {
  max-height: 2000px;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 1;
}

.filter-collapsible-content.collapsed {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
}

/* External Collapse Button (Outside Frame) */
.filter-collapse-btn-external {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  color: #495057;
  margin-bottom: 12px;
}

.filter-collapse-btn-external:hover {
  color: #2563eb;
}

.filter-collapse-btn-external .filter-collapse-icon {
  flex-shrink: 0;
  transition: stroke 0.3s ease;
}

.filter-collapse-btn-external .filter-collapse-icon.filter-icon-active {
  stroke: #16a34a;
}

.filter-collapse-btn-external .filter-collapse-text {
  white-space: nowrap;
}

.filter-collapse-btn-external .filter-collapse-chevron {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  margin-left: 4px;
}

.filter-collapse-btn-external .filter-collapse-chevron.rotated {
  transform: rotate(180deg);
}

/* Inline Filter Collapse Button (in title) */
.filter-collapse-btn-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e0e7ff;
  border: none;
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  color: #4338ca;
}

.filter-collapse-btn-inline:hover {
  background: #c7d2fe;
  color: #3730a3;
}

.filter-collapse-btn-inline .filter-collapse-icon {
  flex-shrink: 0;
  transition: stroke 0.3s ease;
}

.filter-collapse-btn-inline .filter-collapse-icon.filter-icon-active {
  stroke: #16a34a;
}

.filter-collapse-btn-inline .filter-collapse-text {
  white-space: nowrap;
}

.filter-collapse-btn-inline .filter-collapse-chevron {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  margin-left: 2px;
}

.filter-collapse-btn-inline .filter-collapse-chevron.rotated {
  transform: rotate(180deg);
}

/* Collapsible Content with Frame */
.filter-collapsible-content-with-frame {
  max-height: 2000px;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin-bottom 0.3s ease;
  opacity: 1;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  width: 100%; /* Use full width of parent container */
}

.filter-collapsible-content-with-frame.collapsed {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  padding: 0;
  border: none;
}

/* Mobile Adjustments */
@media (max-width: 640px) {
  .filter-collapse-header {
    gap: 8px;
    margin-bottom: 10px;
  }

  .filter-collapse-btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .filter-collapse-btn-external {
    padding: 6px 12px;
    font-size: 13px;
  }

  .filter-collapse-icon {
    width: 16px;
    height: 16px;
  }

  .filter-collapse-chevron {
    width: 14px;
    height: 14px;
  }

  .filter-collapsible-content-with-frame {
    padding: 15px;
  }
}

/* 3-column Filter Grid Layout */
.filters-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
}

.filter-grid-cell {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-grid-cell-full {
  grid-column: 1 / -1; /* Span all columns */
}

.filter-cell-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px; /* Bigger font for section names */
  font-weight: 600;
  color: #2c3e50;
  padding-bottom: 8px;
  border-bottom: 2px solid #dee2e6;
}

.filter-cell-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Filter labels (Type, Secteur, etc.) should be smaller than section headers */
.filter-cell-content .filter label {
  font-size: 13px;
  font-weight: 500;
}

/* Filters within grid cells should use full width */
.filter-cell-content .filter {
  flex: 1 1 100%;
  width: 100%;
}

/* Filter groups within grid cells should use full width */
.filter-cell-content .filter-group-taux,
.filter-cell-content .filter-group-ips {
  width: 100%;
}

/* Filter label row: label and number input on same row */
.filter-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 10px;
}

.filter-label-row label {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
}

.filter-label-row input[type="number"] {
  width: 70px;
  padding: 4px 8px;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
}

/* Dual range slider styles */
.dual-range-filter {
  width: 100%;
}

.dual-range-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dual-range-inputs input[type="number"] {
  width: 60px;
  padding: 4px 6px;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  font-size: 13px;
  text-align: center;
}

.dual-range-inputs span {
  color: #6b7280;
  font-size: 13px;
}

.dual-range-slider {
  margin-top: 12px;
  margin-bottom: 8px;
  height: 8px;
}

/* noUiSlider customization */
.dual-range-slider .noUi-connect {
  background: #1762d9;
}

.dual-range-slider .noUi-handle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #1762d9;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dual-range-slider .noUi-handle:before,
.dual-range-slider .noUi-handle:after {
  display: none;
}

/* Responsive adjustments for 3-column grid */
@media (max-width: 1200px) {
  .filters-grid-2x2 {
    grid-template-columns: 1fr; /* Stack on smaller screens */
    gap: 12px;
  }

  .filter-grid-cell-full {
    grid-column: 1;
  }

  .filter-grid-cell {
    padding: 12px;
  }
}

/* Mobile filter fixes */
@media (max-width: 640px) {
  /* Remove body horizontal padding - Tailwind p-4 overridden with !important */
  html body {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }

  /* Reduce search section horizontal padding */
  searchSection {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  /* Reduce outer result container vertical padding */
  #lycees-result-container,
  #colleges-result-container {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  /* Compact frame padding */
  .filter-collapsible-content-with-frame {
    padding: 6px;
  }

  /* Tight gap between filter cells */
  .filters-grid-2x2 {
    gap: 6px;
  }

  /* Tight padding and gap inside filter cells */
  .filter-grid-cell {
    padding: 6px 8px;
    gap: 4px;
  }

  /* Tight gap between filter items within a cell */
  .filter-cell-content {
    gap: 6px;
  }

  /* Tighten label rows (Type:, Secteur:, Taux réussite minimum, IPS, etc.) */
  .filter-cell-content .filter,
  .filter-cell-content .filter-group-taux,
  .filter-cell-content .filter-group-ips,
  .filter-label-row {
    margin-bottom: 0;
    padding-bottom: 0;
  }
  .filter-cell-content > * + * {
    margin-top: 4px;
  }
  .filter-cell-content .filter > label,
  .filter-cell-content .filter-group-taux > label,
  .filter-cell-content .filter-group-ips > label {
    font-size: 12px;
    margin-bottom: 2px;
  }

  /* Slim toggle buttons */
  .toggle-button-filter-lycees,
  .toggle-button-filter-colleges,
  .toggle-button-filter-stats,
  .toggle-button-filter-stats-colleges {
    min-height: 28px;
    padding: 3px 8px;
  }

  /* Slim sliders + range inputs */
  input[type="range"] {
    margin-top: 2px;
    margin-bottom: 2px;
  }
  .dual-range-inputs {
    margin-top: 2px;
  }

  /* 2-column grid for toggle button groups on mobile */
  .toggle-group-vertical {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  /* Allow button text to wrap inside 2-col grid cells */
  .toggle-button-filter-lycees,
  .toggle-button-filter-colleges,
  .toggle-button-filter-stats,
  .toggle-button-filter-stats-colleges {
    white-space: normal;
    height: auto;
    min-height: 34px;
    line-height: 1.3;
    text-align: center;
    justify-content: center;
  }

  /* Long-text buttons span both columns */
  #section_internationale_lycees,
  #section_internationale_colleges,
  #inclure_communes_limitrophes_lycees,
  #inclure_communes_limitrophes_colleges {
    grid-column: 1 / -1;
  }

  /* Allow preset buttons to wrap rather than overflow */
  .predefined-filter-buttons {
    flex-wrap: wrap;
  }

  /* Allow button text to wrap on narrow screens */
  .preset-toggle-button {
    white-space: normal;
    text-align: left;
    line-height: 1.3;
    height: auto;
    min-height: 32px;
  }

  /* Stack specialty filters vertically */
  .filter-specialites-row {
    flex-direction: column;
    gap: 10px;
  }

  .filter-specialite {
    flex: none;
    width: 100%;
  }

  /* Smaller number inputs in filter rows */
  .filter-label-row input[type="number"],
  .dual-range-inputs input[type="number"] {
    width: 52px;
    font-size: 12px;
    padding: 3px 5px;
  }

  /* Smaller section header — tighter padding + bottom border distance */
  .filter-cell-header {
    font-size: 13px;
    padding-bottom: 4px;
    margin-bottom: 4px;
    gap: 4px;
  }
  .filter-row-icon {
    font-size: 13px;
  }

  /* Compact filter toggle button */
  .filter-collapse-btn-inline {
    font-size: 11px;
    padding: 3px 8px;
    gap: 4px;
  }

  .filter-collapse-btn-inline .filter-collapse-icon {
    width: 13px !important;
    height: 13px !important;
  }

  .filter-collapse-btn-inline .filter-collapse-chevron {
    width: 11px !important;
    height: 11px !important;
  }
}

/* ── Sectorisation right panel ── */
#sector-right-panel {
  height: 798px;
  width: 140px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-left: 2px solid #a78bfa;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border-radius: 0 8px 8px 0;
  overflow: hidden;
}

/* Sector button — hidden unless sectorisation is active */
.sector-btn { display: none; }
#lycees-result-container.sector-active .sector-btn { display: table-cell; }

/* Commune-scoped secteur row highlight */
#result-table-lycees tr.sector-commune-highlight {
  background: #f5f3ff !important;
}

/* box-shadow on <tr> doesn't render in Chrome — apply the purple left border to the first cell */
#result-table-lycees tr.sector-commune-highlight > td:first-child {
  border-left: 3px solid #7c3aed !important;
}

/* Show the building icon only for établissements de secteur */
#result-table-lycees tr.sector-commune-highlight .sector-school-icon {
  display: inline !important;
}

/* Search funnel — section labels, separator hint, field badges */
.search-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin-bottom: -4px;
}

.search-section-label--or {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9ca3af;
  font-weight: 600;
  margin-top: 4px;
}

.search-section-label--or::before,
.search-section-label--or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.search-field-hint {
  font-size: 0.6rem;
  color: #9ca3af;
  text-align: center;
  margin: -8px 0;
  font-style: italic;
}

.search-field-badge {
  font-size: 0.6rem;
  font-weight: 500;
  color: #9ca3af;
  background: #f3f4f6;
  border-radius: 4px;
  padding: 1px 5px;
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
}

.search-field-badge--primary {
  color: #4f46e5;
  background: #eef2ff;
}

/* Search field validation — input wrapper, status icon, state colours */
.input-row {
  position: relative;
}

.field-status-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  pointer-events: none;
  display: none;
}

.field-warn   .field-status-icon,
.field-invalid .field-status-icon,
.field-valid  .field-status-icon { display: block; }

.field-warn   .input-row input { border-color: #f59e0b !important; }
.field-invalid .input-row input { border-color: #ef4444 !important; }
.field-valid  .input-row input { border-color: #22c55e !important; }

.suggestion-empty {
  padding: 6px 12px;
  color: #ef4444;
  font-style: italic;
  font-size: 0.75rem;
  pointer-events: none;
  cursor: default;
}

