.acf-block-bottin-des-membres {
  --sidebar-width: 280px;
  --gap: 1.5rem;
  max-width: var(--wp--style--global--content-size, 1300px);
  margin: 0 auto;
}

/* Layout principal */
.bottin-container {
  display: grid;
  grid-template-columns: var(--sidebar-width) auto minmax(0, 1fr);
  gap: var(--gap);
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  border-radius: 8px;
}

.filter-section h4 {
  margin-top: 0;
  color: var(--wp--preset--color--primary-blue);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Séparateur */
.bottin-separator {
  width: 1px;
  background-color: rgba(4, 28, 100, 0.1);
  margin: 0 calc(var(--gap) / -2);
}

/* Sidebar avec filtres */
.bottin-filters {
  padding: 20px 10px 0px;
  border-radius: 8px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  background: var(--wp--preset--color--white);
  border: 1px solid rgba(4, 28, 100, 0.1);
}

/* Zone principale avec recherche et grid */
.bottin-main {
  width: 100%;
  min-width: 0;
  background: var(--wp--preset--color--white);
  border-radius: 8px;
}

/* Barre de recherche */
.bottin-search {
  width: 100%;
}
#bottin-grid .gridjs-search-input,
#bottin-grid .gridjs-search {
  width: 100%;
}

.bottin-search input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Responsive */
@media (max-width: 992px) {
  .bottin-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .bottin-separator {
    width: 100%;
    height: 1px;
    margin: 0;
  }

  .bottin-filters {
    position: relative;
    background-color: #f5f5f7;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
  }
}

@media (max-width: 768px) {
  .acf-block-bottin-des-membres {
    --gap: 1rem;
  }

  /* Amélioration du layout des sections de filtres sur mobile */
  .filter-section {
    width: 100%;
  }

  /* Ajustement des groupes de checkboxes pour mobile */
  .checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
  }
}

/* Styles pour les filtres */
.filter-group {
  margin-bottom: 1rem;
}

.filter-group h3 {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.filter-option {
  margin-bottom: 0.375rem;
}

.filter-option label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
}

/* Styles pour Grid.js */
.gridjs-wrapper {
  border: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gridjs-table {
  width: 100%;
}

.gridjs-pagination {
  border: none !important;
  padding: 0.75rem !important;
}
/* Search bar */
.gridjs-search-container {
  position: relative;
  width: 100%;
  background: var(--wp--preset--color--soft-white);
  border-radius: 8px;
  padding: 4px;
}

.gridjs-search-container svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  z-index: 1;
  pointer-events: none;
}

.gridjs-search input {
  padding-left: 40px !important;
  width: 100%;
  height: 40px;
  border: 1px solid rgba(4, 28, 100, 0.05);
  border-radius: 8px;
  background: var(--wp--preset--color--white);
  color: var(--wp--preset--color--primary-blue);
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.gridjs-search input::placeholder {
  color: #6b7280;
}

.gridjs-search input:focus {
  outline: none;
  border-color: var(--wp--preset--color--primary-blue);
  box-shadow: 0 2px 12px rgba(4, 28, 100, 0.08);
}

#bottin-grid .gridjs-thead {
  display: none;
}

#bottin-grid td.gridjs-td {
  border: none;
  width: 9999px;
  border-radius: 8px;
}

#bottin-grid .gridjs-tbody {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: transparent;
  margin: 8px 0;
}

#bottin-grid .gridjs-wrapper,
#bottin-grid .gridjs-footer {
  box-shadow: none !important;
}

#bottin-grid .member-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#bottin-grid .member-info-header {
  display: flex;
  justify-content: space-between;
}

#bottin-grid .member-info-header-role {
  font-size: 0.8rem;
  color: #545f71;
}

#bottin-grid .member-info-header-right-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #545f71;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 8px;
}

#bottin-grid .member-info-header-left h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 8px 0;
}

#bottin-grid .member-info-separator {
  width: 100%;
  height: 1px;
  background-color: #ddd;
}

#bottin-grid .bottin-member-pro-places {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#bottin-grid .bottin-member-pro-place {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 8px;
  padding: 8px;
  font-size: 0.8rem;
  flex: 1 1 300px;
  min-width: 300px;
}
#bottin-grid .bottin-member-pro-place-name {
  font-weight: 600;
  font-size: 0.85rem;
}
#bottin-grid .bottin-member-pro-place-location,
#bottin-grid .bottin-member-pro-place-no-place {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #545f71;
}
@media (max-width: 639px) {
  #bottin-grid .bottin-member-pro-place {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
  }
}

.bottin-container .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bottin-container .checkbox-group input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  border: 2px solid #0f172a;
  width: 20px;
  height: 20px;
  cursor: pointer;
  position: relative;
  border-radius: 4px;
}

.bottin-container .checkbox-group input[type="checkbox"]:checked {
  background-color: #0f172a;
  outline: none;
}
/* remoce outline */
.bottin-container .checkbox-group input[type="checkbox"]:focus {
  outline: none;
}

.bottin-container .checkbox-group input[type="checkbox"]:checked::after {
  content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M9 16.2l-3.5-3.5 1.4-1.4L9 13.4l7.1-7.1 1.4 1.4z"/></svg>');
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
}
.bottin-container .checkbox-group label {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bottin-container h4 {
  font-size: 0.85rem;
  font-weight: 600;
}

.bottin-container .select2-selection__rendered {
  font-size: 0.8rem;
  padding: 10px;
}

.bottin-container .select2-selection {
  height: auto !important;
}
.filter-section-separator {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
}

.filter-section-separator ._separator_ {
  width: 50%;
  height: 1px;
  background-color: #e5e7eb;
}

/* Style du container select2 dans le bottin */
.bottin-container .select2-container--default .select2-selection--single {
  display: flex;
  height: 40px;
  padding: 10px;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  border-radius: 6px;
  border: 1px solid var(--Primary, #545f71);
  background: var(--White, #fff);
}

/* Style du texte sélectionné */
.bottin-container
  .select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  color: #545f71;
  padding: 0;
  line-height: normal;
}

/* Style du placeholder */
.bottin-container
  .select2-container--default
  .select2-selection--single
  .select2-selection__placeholder {
  color: #545f71;
}

/* Style de la flèche */
.bottin-container
  .select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  height: 100%;
  right: 10px;
}

/* Style du dropdown */
.bottin-container .select2-container--default .select2-dropdown {
  border: 1px solid #545f71;
  border-radius: 6px;
  margin-top: 4px;
}

/* Style des options dans le dropdown */
.bottin-container .select2-container--default .select2-results__option {
  padding: 10px;
  color: #545f71;
}

/* Style de l'option survolée/focus */
.bottin-container
  .select2-container--default
  .select2-results__option--highlighted[aria-selected] {
  background-color: #f5f5f5;
  color: #545f71;
}

/* Style de l'option sélectionnée */
.bottin-container
  .select2-container--default
  .select2-results__option[aria-selected="true"] {
  background-color: #e9ecef;
}

/* Style de base pour l'input text dans le bottin */
.bottin-container .akkomq-input-text input[type="text"] {
  display: flex;
  height: 40px;
  padding: 10px;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  border-radius: 6px;
  border: 1px solid var(--Primary, #545f71);
  background: var(--White, #fff);
  color: #545f71;
  width: 100%;
  box-sizing: border-box;
}

/* Style du placeholder */
.bottin-container .akkomq-input-text input[type="text"]::placeholder {
  color: #545f71;
}

/* Style au focus */
.bottin-container .akkomq-input-text input[type="text"]:focus {
  outline: none;
  border-color: #545f71;
}

/* Style en cas d'erreur */
.bottin-container .akkomq-input-text.has-error input[type="text"] {
  border-color: #dc3545;
}

.shimmer-wrapper {
  position: relative;
  overflow: hidden;
  background-color: transparent;
  border-radius: 8px;
  margin: 8px 0;
  width: 100%;
}

.shimmer-search,
.shimmer-card {
  position: relative;
  background-color: #e9ecef;
  border-radius: 6px;
  margin-bottom: 1rem;
  width: 100%;
  overflow: hidden;
}

.shimmer-search {
  height: 40px;
}

.shimmer-card {
  padding: 16px;
  height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: start;
}

/* Mise à jour du style pour l'élément shimmer */
.shimmer-element {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.6) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%);
  animation: shimmerAnimation 2s infinite;
}

@keyframes shimmerAnimation {
  100% {
    transform: translateX(100%);
  }
}

/* Style pour les select multiples */
.bottin-container .select2-container--default .select2-selection--multiple {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 40px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--Primary, #545f71);
  background: var(--White, #fff);
  box-sizing: border-box;
}

.bottin-container .select2-selection__choice__remove:hover {
  background-color: transparent;
}

.bottin-container .select2-selection__choice__display {
  margin-left: 16px;
}

/* Style des tags sélectionnés */
.bottin-container
  .select2-container--default
  .select2-selection--multiple
  .select2-selection__choice {
  background-color: #e9ecef;
  border: none;
  border-radius: 4px;
  padding: 3px 6px;
  margin: 2px;
  color: #545f71;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: fit-content;
}

/* Style du texte dans le tag */
.bottin-container
  .select2-container--default
  .select2-selection--multiple
  .select2-selection__choice__display {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Style du conteneur de texte */
.bottin-container
  .select2-container--default
  .select2-selection--multiple
  .select2-selection__rendered {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 0;
  margin: 0;
  line-height: normal;
  box-sizing: border-box;
}

/* Style du champ de recherche */
.bottin-container
  .select2-container--default
  .select2-selection--multiple
  .select2-search__field {
  margin: 0;
  height: 20px;
  flex: 1;
  min-width: 80px;
}

/* Style du bouton de suppression des tags */
.bottin-container
  .select2-container--default
  .select2-selection--multiple
  .select2-selection__choice__remove {
  color: #545f71;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
}

/* Cards styling */
.bottin-member-card {
  background: var(--wp--preset--color--white);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(4, 28, 100, 0.1);
  transition: all 0.2s ease;
}

.bottin-member-card:hover {
  box-shadow: 0 4px 16px rgba(4, 28, 100, 0.1);
  transform: translateY(-1px);
  border-color: var(--wp--preset--color--primary-blue);
}

.member-info-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.member-info-header-left h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--wp--preset--color--primary-blue);
  margin: 0 0 6px 0;
}

.member-info-header-role {
  font-size: 0.8rem;
  color: var(--wp--preset--color--deep-blue);
  opacity: 0.85;
}

.member-info-header-right-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--wp--preset--color--soft-white);
  border-radius: 6px;
  color: var(--wp--preset--color--primary-blue);
  font-weight: 500;
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.member-info-header-right-link:hover {
  border-color: var(--wp--preset--color--primary-blue);
  background: rgba(4, 28, 100, 0.05);
  gap: 8px;
}

.member-info-separator {
  height: 1px;
  background: rgba(4, 28, 100, 0.1);
  margin: 12px 0;
}

/* Professional places styling */
.bottin-member-pro-places {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.bottin-member-pro-place {
  background: var(--wp--preset--color--soft-white);
  padding: 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.bottin-member-pro-place:hover {
  border-color: var(--wp--preset--color--primary-blue);
  background: rgba(4, 28, 100, 0.02);
}

.bottin-member-pro-place-name {
  font-weight: 500;
  color: var(--wp--preset--color--primary-blue);
  font-size: 0.85rem;
  margin-bottom: 6px;
  display: block;
}

.bottin-member-pro-place-location {
  color: var(--wp--preset--color--deep-blue);
  opacity: 0.85;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.bottin-member-pro-place-no-place {
  color: #6b7280;
  font-style: italic;
  padding: 12px;
  text-align: center;
  background: #f9fafb;
  border-radius: 8px;
  width: 100%;
  font-size: 0.8rem;
}

/* Pagination styling */
.gridjs-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  margin-top: 16px;
  border-top: 1px solid rgba(4, 28, 100, 0.1);
}

.gridjs-pagination button {
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--wp--preset--color--soft-white);
  color: var(--wp--preset--color--primary-blue);
  font-weight: 500;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gridjs-pagination button:hover:not(:disabled) {
  border-color: var(--wp--preset--color--primary-blue);
  background: rgba(4, 28, 100, 0.05);
}

.gridjs-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gridjs-pagination .gridjs-currentPage {
  background: var(--wp--preset--color--primary-blue);
  color: var(--wp--preset--color--white);
}

.gridjs-pagination .gridjs-currentPage:hover {
  background: rgba(4, 28, 100, 0.8);
}

.gridjs-summary {
  color: #6b7280;
  font-size: 0.8rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .bottin-main {
    padding: 12px;
  }

  .bottin-member-card {
    padding: 12px;
  }

  .bottin-member-pro-places {
    grid-template-columns: 1fr;
  }

  .member-info-header {
    flex-direction: column;
  }

  .member-info-header-right {
    margin-top: 12px;
    width: 100%;
  }

  .member-info-header-right-link {
    width: 100%;
    justify-content: center;
  }

  .gridjs-pagination {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

.gridjs-head .gridjs-search {
  display: none !important;
}

/* Loader pour le message initial */
.initial-message-loader {
  display: inline-block;
}

.initial-message-loader svg {
  animation: spin 1s linear infinite;
}

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

.initial-message.loaded .initial-message-loader {
  display: none;
}

/* Message "pas de résultat" */
.no-results-message {
  margin: 2rem 0;
  padding: 2rem;
  background: var(--wp--preset--color--soft-white);
  border-radius: 8px;
  border: 1px solid rgba(4, 28, 100, 0.1);
}

.no-results-message svg {
  opacity: 0.6;
}

.no-results-message h3 {
  color: var(--wp--preset--color--deep-blue);
  font-weight: 600;
}

.no-results-message p {
  color: #6b7280;
  line-height: 1.5;
}

/* Responsive pour le message */
@media (max-width: 768px) {
  .no-results-message {
    margin: 1rem 0;
    padding: 1.5rem;
  }

  .no-results-message svg {
    width: 36px;
    height: 36px;
  }

  .no-results-message h3 {
    font-size: 1rem;
  }

  .no-results-message p {
    font-size: 0.85rem;
  }
}
