* {
  font-family: "Open Sans", sans-serif !important;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1);
}

a {
  text-decoration: none;
}

body {
  margin: 0;
  background-color: #f6f8fb;
  display: flex;
  height: 100vh;
  overflow: auto;
}

.sidebar {
  width: 76px;
  background-color: #ffffff;
  border-right: 2px solid #F7F8FA;
  box-shadow: 20px 0 40px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  gap: 24px;
}

.sidebar img {
  border-radius: 50% !important;
}

.sidebar-item {
  display: flex;
  flex-direction: column;
}

.sidebar-item.active {

  color: rgb(185, 153, 153);
  border-radius: 50%;
}

.sidebar-item label {
  color: #394560;
  font-size: 10px;
  text-align: center;
  display: block;

}

.sidebar-item:hover label,
.sidebar-item.active label {
  color: #1AB999;
}

.sidebar-item .icon-container {
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.5s;
  border-radius: 24px;
  border: 1px solid #F2F2F7;
}

.sidebar-item.active .icon-container,
.sidebar-item:hover .icon-container {
  background-color: #1AB999;
  border: 1px solid #1AB999;
}

.sidebar-item .icon-container i {
  width: 24px;
  height: 24px;
}

.sidebar-item.active .icon-container i.icon-map,
.sidebar-item:hover .icon-container i.icon-map {
  background-image: url("/assets/icon-map-active-3363be8e.png");
}

.sidebar-item.active .icon-container i.icon-filter,
.sidebar-item:hover .icon-container i.icon-filter {
  background-image: url("/assets/icon-filter-active-83b54ba1.png");
}

.sidebar-item.active .icon-container i.icon-layout,
.sidebar-item:hover .icon-container i.icon-layout {
  background-image: url("/assets/icon-layout-active-620bea7f.png");
}

.sidebar-item.active .icon-container i.icon-logout,
.sidebar-item:hover .icon-container i.icon-logout {
  background-image: url("/assets/icon-logout-active-72dbc980.png");
}

.sidebar-item .icon-container i.icon-map {
  background-image: url("/assets/icon-map-38544d23.png");
}

.sidebar-item .icon-container i.icon-filter {
  background-image: url("/assets/icon-filter-5b2540ef.png");
}

.sidebar-item .icon-container i.icon-layout {
  background-image: url("/assets/icon-layout-9aa79015.png");
}

.sidebar-item .icon-container i.icon-logout {
  background-image: url("/assets/icon-logout-2c311b39.png");
}

.sidebar-item p {
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
}

.main-panel {
  width: 400px;
  height: 100%;
  background-color: #ffffff;
  border-right: 1px solid #e0e0e0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.section-title-head {
  width: 400px;
  height: 40px;
  background-color: #1AB999;
  color: #FFFFFF;
  text-transform: uppercase;
  font-size: 12px;
  line-height: 20px;
  text-align: start;
  align-items: center;
  display: flex;
  padding: 12px 16px;
}

.main-scroll {
  position: relative;
  overflow-y: auto;
  padding-right: 10px;
  flex-grow: 1;
}

.main-sticky {
  flex-grow: 1;
  z-index: 1000;
}

.main-sticky .link-wrapper {
  height: 320px;
  overflow-x: hidden;
}

.main-scroll::-webkit-scrollbar {
  width: 6px;
}

.main-sticky::-webkit-scrollbar {
  width: 6px;
}

.main-scroll:hover {
  overflow-y: auto;
}

.link-wrapper {
  width: 400px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;

  background-color: #f0f2f5;
  /* 🌈 Remplace cette couleur par celle de ton choix */

}

.btn-view-parcelles {
  background-color: #e0f7f1;
  /* fond du bouton */
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #007b5e;
  text-decoration: none;
}

.btn-view-parcelles:hover {
  background-color: #c6eee5;
  /* au survol */
}

.link-wrapper .sub-title-head {
  font-size: 12px;
  font-weight: bold;
  color: #4a5f91;
}

.link-wrapper .stat-section {
  width: 368px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-wrapper .stat-box {
  width: 180px;
  background-color: #f1fdf6;
  border: 1px solid #1AB999;
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  text-align: center;
  align-items: center;
  gap: 4px;
}

.link-wrapper .stat-box i {
  font-size: 24px;
  color: #007b5e;
}

.link-wrapper .stat-box .text-muted {
  font-size: 12px;
  font-weight: 400;
  line-height: 13px;
  letter-spacing: 0%;
}

.link-wrapper .stat-box label {
  font-weight: bold;
  font-size: 20px;
  color: #394560;
}

.link-wrapper .stat-box span {
  font-size: 10px;
  line-height: 100%;
}

.link-wrapper-seconde {
  width: 400px;
  min-height: auto;
  height: auto !important;
  padding: 8px 32px 64px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.main-scroll {
  overflow-y: auto !important;
  height: calc(100vh - 40px);
}


.link-wrapper-seconde .sub-title-body {
  font-size: 12px;
  font-weight: bold;
  color: #4a5f91;
}

.link-wrapper-seconde {
  border-radius: 8px;
  display: flex !important;
  flex-direction: column;
  gap: 8px;
}

.active {
  display: block !important;
}

.none {
  display: none !important;
}

.card-container.active {
  display: block;
}

.link-wrapper-seconde .fonkontany-container,
.link-wrapper-seconde .districts-container,
.link-wrapper-seconde .commune-container {
  width: 368px;
  height: 253px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.region-header,
.district-header,
.commune-header,
.fokontany-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.region-header-container,
.district-header-container,
.commune-header-container,
.fokotany-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  padding-bottom: 0;
}

.region-box {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  padding: 14px;
  margin-bottom: 16px;
  width: 368px;
  height: 253px;
}

.region-title {
  font-weight: 600;
  color: #1AB999;
  font-size: 14px;
}

.region-meta {
  font-size: 10px;
  color: #555;
}

.carte-fokontany,
.carte-region,
.carte-district,
.carte-commune {
  background: #F7F8FA;
  border: 2px solid #F7F8FA;
  border-radius: 8px;
  width: 368px;
  position: relative;
}

.carte-fokontany h2,
.carte-region h2,
.carte-district h2,
.carte-commune h2 {
  color: #00b090;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.carte-fokontany .surface,
.carte-region .surface,
.carte-district .surface,
.carte-commune .surface {
  background: #ffffff;
  border: 1px solid #EBEEF2;
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #606C80;
}

.carte-fokontany .info,
.carte-region .info,
.carte-district .info,
.carte-commune .info {
  padding: 0px 20px;
}

.carte-fokontany .info p,
.carte-region .info p,
.carte-district .info p,
.carte-commune .info p {
  margin: 0;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
}

.carte-fokontany .info p span,
.carte-region .info p span,
.carte-district .info p span,
.carte-commune .info p span {
  font-weight: bold;
  font-size: 12px;
}

.carte-fokontany .fokontany-actions,
.carte-region .region-actions,
.carte-district .district-actions,
.carte-commune .commune-actions {
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  height: 32px;
  background: #ffffff;
  border-radius: 0 0 8px 8px;
}

.carte-fokontany .fokontany-actions i,
.carte-region .region-actions i,
.carte-district .district-actions i,
.carte-commune .commune-actions i {
  font-size: 16px;
  margin-left: 2px;
}

.icon-see-map {
  background-image: url("/assets/icon-see-map-bddfb167.png");
  width: 16px;
  height: 16px;
}

.sidebar-icon {
  width: 24px;
  height: 24px;
}

.icon-producteur {
  background-image: url("/assets/icon-producteur-e9d4fbef.png");
}

.icon-parcelle {
  background-image: url("/assets/icon-parcelle-6a67b797.png");
}

.icon-surface {
  background-image: url("/assets/icon-surface-d442c658.png");

}

.icon-semence {
  background-image: url("/assets/icon-semence-0f0d70cd.png");
}

.icon-superficie {
  background-image: url("/assets/icon-semence-0f0d70cd.png");
}

.icon-population {
  background-image: url("/assets/icon-population-3f66e537.png");
}

.icon-fertilisant {
  background-image: url("/assets/icon-fertilisant-19197fc6.png");
}

.icon-administration {
  background-image: url("/assets/icon-administration-3f66e537.png");
}

.btn-view-region,
.btn-view-district,
.btn-view-commune,
.btn-view-fokontany {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.map-panel {
  flex-grow: 1;
  background-color: #eaeff5;
  overflow: hidden;
}

.panel-content {
  width: 400px !important;
  display: none;
}

.panel-content.active {
  display: block;
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.custom-leaflet-popup .leaflet-popup-content-wrapper {
  border-radius: 15px;
  border: 2px solid #ffe24d;
  background: #fff;
  box-shadow: 1px 2px 8px #bbb;
  padding: 0;
}

.region-badge-popup {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 24px 16px 24px;
}

.region-badge {
  background: #fff;
  color: #5f6368;
  border: none;
  border-radius: 999px;
  font-weight: 400;
  font-size: 16px;
  padding: 8px 24px;
  margin: 2px 0 0 0;
  box-shadow: 0 1.5px 4px rgba(60, 64, 67, 0.15);
  font-family: 'Roboto', Arial, sans-serif;
}

.leaflet-tooltip.region-label {
  background: #fffacd;
  color: #222;
  border: 1px solid #ffe24d;
  font-weight: bold;
  font-size: 14px;
  border-radius: 6px;
  box-shadow: 1px 1px 6px #aaa;
  padding: 4px 10px;
}

.highlighted {
  box-shadow: 0 0 0 3px rgba(74, 137, 220, 0.5);
  transition: box-shadow 0.3s ease;
}

.location-marker .marker-label {
  background: white;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 12px;
  white-space: nowrap;
  border: 1px solid #ccc;
}

.region-badge {
  font-weight: bold;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.8);
  padding: 2px 5px;
  border-radius: 3px;
  border: 1px solid #ccc;
}

.stat-section-district {
  width: 368px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.card {
  background-color: white;
  width: 368px;
  height: 330px;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  position: relative;
}

.header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.header img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.header-text {
  display: flex;
  flex-direction: column;
}

.name {
  font-weight: 600;
  font-size: 16px;
}

.badge-container {
  margin-top: 4px;
}

.badge {
  font-size: 11px;
  background-color: #eef0f3;
  color: #333;
  border-radius: 8px;
  padding: 2px 8px;
  margin-right: 5px;
}

.badge.green {
  background-color: #e4f7ec;
  color: #24a148;
}

.info {
  font-size: 12px;
  line-height: 1.6;
  font-weight: 700;
}

.info span {
  display: inline-block;
  width: 150px;
  color: #555;
  font-size: 10px;
}


.photo-individu {
  width: 40px;
  height: 40px;
  border-radius: 20px;
}

#map-controls {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

#btn-back {
  padding: 6px 12px;
  background: #1AB999;
  border: 1px solid #ccc;
  border-radius: 2px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#btn-back:hover {
  background: #f0f0f0;
}

#individus-list-container {
  display: none;
  width: 100%;
  height: 100%;
  background-color: #f1f1f1; 
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow-y: auto;
  padding: 2%;
  opacity: 0.5;
  z-index: 99999 !important;
}

/* Section d'en-tête */
.header-section {
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.header-section h1 {
  font-size: 18px;
  color: #333;
  margin-bottom: 10px;
  font-weight: 800;
}

.header-info {
  color: #1AB999;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 20px;
  display: block;
}

/* Barre de recherche */
.search-container {
  margin-bottom: 20px;
}

.search-box {
  width: 100%;
  max-width: 400px;
  padding: 12px 45px;
  border: 1px solid #EEF2FF;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background-image: url("/assets/icon-search-input-f899aad0.png");
  background-position: 2% 50%;
  background-repeat: no-repeat;
}

.search-box:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Container des tableaux - Layout en deux colonnes */
.tables-container {
  display: flex;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
  width: 100%;
}

/* Wrapper pour chaque tableau */
.table-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 400px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Container de tableau individuel */
.table-container {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  flex-grow: 1;
}

/* Styles des tableaux */
.producer-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  align-self: flex-start;
}

.producer-table th {
  background-color: #ffffff;
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;

}

.producer-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: middle;
}

.producer-table tr:hover {
  background-color: #93a4b6;
}

.producer-table tr:last-child td {
  border-bottom: none;
}

/* Cellule de checkbox */
.checkbox-cell {
  width: 40px;
  text-align: center;
  padding: 8px;
}

.checkbox-cell input[type="checkbox"] {
  cursor: pointer;
  transform: scale(1.2);
}

/* Badge de type de contrat */
.contract-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
}

.contract-badge.proprietaire {
  background-color: #e3f2fd;
  color: #1976d2;
}

.contract-badge.co-gestion {
  background-color: #e8f5e8;
  color: #2e7d32;
}

.contract-badge.locataire {
  background-color: #fff3e0;
  color: #f57c00;
}

/* Contrôles de pagination */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
  padding: 20px 0;
}

.prev-btn,
.next-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.prev-btn:hover,
.next-btn:hover {
  background-color: #0056b3;
}

.prev-btn:disabled,
.next-btn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

/* Numéros de page */
.page-numbers {
  display: flex;
  gap: 5px;
}

.page-numbers button {
  background-color: transparent;
  border: 1px solid #ddd;
  padding: 8px 12px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
}

.page-numbers button:hover {
  background-color: #f8f9fa;
}

.page-numbers button.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

/* Informations de pagination */
.pagination-info {
  font-size: 14px;
  color: #666;
  margin-left: 15px;
}

/* Responsive design */
@media (max-width: 768px) {
  .tables-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .producer-table th,
  .producer-table td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .pagination-controls {
    flex-wrap: wrap;
    gap: 10px;
  }

  .page-numbers {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .producer-list-container {
    padding: 15px;
    z-index: 99999;
  }

  .search-box {
    max-width: 100%;
  }

  .producer-table th,
  .producer-table td {
    padding: 6px 8px;
    font-size: 11px;
    z-index: 99999 !important;
  }

  .checkbox-cell {
    width: 30px;
  }
}

.status-badge {

  padding: 4px 8px;
  border-radius: 10px;
  font-size: 10px;
  margin-left: 5px;
  font-weight: 800;
}

.status-badge.proprietaire {

  background: #DAD7FE;
  color: #4339F2
}

.status-badge.locataire {
  background: #E4F3FA;
  color: #17A5E6;
}

.status-badge.cogestion {
  background: #DEF7EC;
  color: #00C037;
}

table.alternate-color tbody tr:nth-child(odd) {
  background-color: #EFF0F4;
  /* Couleur pour les lignes impaires */
}

table.alternate-color tbody tr:nth-child(even) {
  background-color: #ffffff;
  /* Couleur pour les lignes paires */
}

.producer-name {
  font-size: 12px;
  font-weight: 800;

}

.producer-cin {
  font-size: 12px;
}

.header-title {
  display: flex;
  justify-content: space-between;
}

/* Désactive le scroll du parent quand la liste des individus est active */
.main-panel.show-individu .main-scroll {
    overflow: hidden; /* Empêche le double scroll */
}

/* Style du conteneur de la liste des individus */
#individus-list {
    max-height: none;
    transition: max-height 0.3s ease;
    height: 100vh;
    overflow-y: auto; /* Active le scroll uniquement ici */
    position: relative; /* Nécessaire pour le positionnement absolu des enfants */
    padding-bottom: 70px; /* Réserve de l'espace pour les boutons */
    margin-bottom: 20px; /* Marge optionnelle */
}
#individus-list.active {
  max-height: calc(100vh - 120px); /* Ajustez selon votre header/footer */
  overflow-y: auto;
}

/* Section des boutons FIXÉE en bas */
.section-action-to-filter-home {
    position: fixed; /* Changé de absolute à fixed */
    bottom: 10px; /* Placé en bas de l'écran */
    background: #9292B2;
    display: flex;
    gap: 16px;
    z-index: 0; /* Augmenté pour s'assurer qu'il reste au-dessus */
    border-top: 1px solid #ddd;
    align-items: center;
    padding: 12px 16px; /* Ajustement du padding */
    box-sizing: border-box; /* Inclut le padding dans la largeur */
}
.icon-close-reset {
    display: block;
    width: 16px;
    height: 16px;
    background-image: url("/assets/icon-close-reset-d1d494ce.png");
}
.icon-check-apply {
    display: block;
    width: 16px;
    height: 16px;
    background-image: url("/assets/icon-check-apply-9496d08e.png");
}

.apply-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;

}

.reset-btn {
    background: none;
    color: #666;
    border: none;
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    margin-top: 10px;
    width: 100%;
}

.reset-btn {
    display: flex;
    gap: 8px;
    color: #fff;
    font-size: 12px;
    align-items: center;
}

.apply-btn {
    display: flex;
    gap: 8px;
    background: #003399;
    border-radius: 24px;
    align-items: center;
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 24px;
  cursor: pointer;
  color:red;
}

.stat-card {
  background: #e5edf1;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  margin-bottom: 16px;
  width: 368px;
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #1ab999;
}

.stat-card-badge {
  background: #eafaf3;
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  color: #1ab999;
}

.stat-card-body div {
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.stat-card-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  color: #1ab999;
  font-size: 10px; /* ou 11px si tu veux plus petit */
  font-weight: 600; /* optionnel : un peu plus clean */
}

#page-loader {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.45);
  z-index: 999999;
}

.loader-box {
  background: white;
  padding: 25px 35px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 6px 25px rgba(0,0,0,0.2);
  font-size: 15px;
  color: #333;
}

.spinner {
  width: 35px;
  height: 35px;
  border: 4px solid #ddd;
  border-top-color: #2bb673;
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
