*,
:after,
:before {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html,
body,
#map {
  width: 100%;
  height: 100%;
}

html {
  height: 100%;
}

body {
  position: relative;
  display: flex;
  justify-content: center;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  min-height: 100%;
  margin: 0;
  padding: 0;
  background-color: #f1f1f1;
  overflow-x: hidden;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

#export {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 99999;
  background: white;
  color: black;
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  text-decoration: none;
}

.leaflet-popup-content-wrapper {
  border-radius: 3px;
}

.leaflet-popup-content {
  width: 100% !important;
}

.info-shop {
  width: 300px;
  display: flex;
  gap: 1.5rem;
}

.info-logo {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 120px;
}

.info-button button {
  background-color: #444;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.info-button button:hover {
  background: #0C4254;
}

.shop {
  display: flex;
  height: 100%;
}

.autocomplete {
  background: #fff;
  height: 100%;
  width: 420px;
  padding: 15px 20px;
  overflow: hidden;
}

.search-shop {
  border: 1px solid #d7d7d7;
  box-shadow: none;
  box-sizing: border-box;
  font-size: 16px;
  padding: 8px 10px;
  margin-bottom: 20px;
  border-top: 1px solid #cccccc;
  width: 100%;
}

.search-shop:focus {
  border: 1px solid #858585;
  outline: none;
}

.shops-list {
  margin: 0;
  padding: 0 10px 0 0;
  list-style: none;
  height: calc(100% - 60px);
  overflow: auto;
}

.shops-list::-webkit-scrollbar {
  width: 10px;
}
.shops-list::-webkit-scrollbar-thumb {
  background-color: #104B5E;
  border-radius: 5px;
}

.shop-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  font-size: 80%;
  border-bottom: 1px solid #ccc;
  cursor: pointer;
}

.shop-item:hover {
  background: #f3f3f3;
}

.shop-item .name,
.info-name {
  font-weight: bold;
}

.shop-category {
  text-transform: uppercase;
  font-weight: bold;
  margin-top: 20px;
  margin-bottom: 5px;
  padding-left: 3px;
  font-size: 90%;
  color: #000000;
}

.shop-color {
  width: 10px;
  height: 40px;
  border-radius: 4px;
}

.active-shop {
  background: #f4f4f4 !important;
  color: #000000;
}

.shop-content {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.shop-logo img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 10px;
}

.shop-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.shop-details .name {
  font-weight: bold;
  font-size: 1em;
  margin-bottom: 2px;
}

.shop-description {
  max-width: 100%;
  overflow-wrap: break-word;
  white-space: normal;
  font-size: 0.9em;
  color: #555;
  margin-top: 4px;
}

.info-description {
  max-width: 290px;
}

.shop-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin: 10px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.shop-header img {
  width: 100%;
  height: 80px;
  object-fit: cover;
}

.shop-text {
  flex: 1;
}

.shop-text .name {
  font-weight: bold;
  margin-bottom: 4px;
}

.category-toggle {
  cursor: pointer;
  margin-left: 10px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}

/* --- POPUP CARD --- */
.popup-card{
  width:260px;
  font-family:sans-serif;
}

/* header image */
.popup-header{
  position:relative;
  height:110px;
  overflow:hidden;
  border-radius:8px 8px 0 0;
}
.popup-header img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.popup-logo{
  flex-shrink: 0; 
  width:56px;
  height:56px;
  border-radius:50%;
  background:#fff;
  padding:4px;
  box-shadow:0 2px 6px rgba(0,0,0,.25);
  margin-top: -30px; 
  z-index: 10;
  position: relative; 
}

.popup-logo img{
  width:100%;
  height:100%;
  border-radius:50%;
  object-fit:cover;
}

/* --- CORRECTIONS --- */
.popup-body{
  padding: 14px;
  background: #fff; 
}

/* Row 2: Logo + Titre */
.popup-top-section {
  display: flex;
  gap: 14px;
  align-items: flex-start; /* Aligne le haut du logo avec le haut du texte */
}

.popup-title-section {
  flex: 1; /* Le titre prend l'espace restant */
}

/* Titre */
.info-title{
  font-weight:700;
  font-size: 17px; /* Réduit */
  line-height: 1.25;
  margin-bottom: 4px;
  margin-top: -10px; /* Chevauchement */
}

/* Row 3: Adresse */
.popup-address,
.popup-address:link,
.popup-address:visited {
  display: block;
  font-size: 13px;
  color: #104B5E; /* <-- Voici votre nouvelle couleur */
  line-height: 1.4;
  text-decoration: none;
  margin-top: 10px;
  margin-bottom: 12px;
}
.popup-address:hover {
  text-decoration: underline;
}

.popup-bottom-section p{
  margin: 0 0 15px 0; /* Espace après description */
  font-size: 14px;
  color: #333;
}

/* Bouton (centré) - MODIFIÉ */
.popup-btn,
.popup-btn:link,
.popup-btn:visited {
  display: block;
  margin: 0 auto;
  width: fit-content;
  text-align: center;
  padding: 8px 16px;
  background: #104B5E;
  color: #fff !important; /* Force le texte en blanc */
  border-radius: 4px;
  text-decoration: none !important; /* Force la suppression du soulignement */
  font-size: 13px;
  transition: background-color 0.2s ease;
}

.popup-btn:hover {
  background: #0C4254;
  color: #fff !important; /* Garde le texte blanc au survol */
  text-decoration: none !important;
}


.leaflet-popup-content-wrapper {
  border-radius: 12px !important;
  overflow: hidden;
  padding: 0 !important; 
}

.leaflet-popup-content {
  margin: 0 !important;
  width: 100% !important;
}


#fullpage-info {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: white;
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
  display: none;
}
.fullpage-visible {
  display: block !important;
}
.fullpage-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

.toggle-button {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1001;
  background-color: #104B5E;
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.autocomplete-panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 420px;
  max-width: 100%;
  background: white;
  transform: translateX(0);
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
  overflow: hidden;
}

.autocomplete-panel.closed {
  transform: translateX(100%);
}

/* --- PANNEAU DE COUCHES --- */

#layer-toggle-button {
  position: absolute;
  top: 20px;
  left: 20px; 
  z-index: 999;
  background: white;
  color: #333;
  border: none;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  font-weight: bold;
}

#layer-toggle-panel {
  position: absolute;
  top: 0;
  left: 0; 
  width: 300px; 
  max-width: 80%;
  height: 100%;
  background: white;
  z-index: 1002; 
  transform: translateX(-100%); 
  transition: transform 0.3s ease-in-out;
  padding: 20px;
  box-shadow: 2px 0 8px rgba(0,0,0,0.2); 
  overflow-y: auto;
  box-sizing: border-box;
}

#layer-toggle-panel.open {
  transform: translateX(0); /* Montré */
}

#layer-toggle-panel-close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: #888;
}

#layer-toggle-panel h3 {
  margin-top: 10px;
  margin-bottom: 20px;
}

/* Styles pour les interrupteurs (réutilisés) */
.toggle-item {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
.toggle-item input[type="checkbox"] {
  margin-right: 10px;
  width: 1.3em;
  height: 1.3em;
  accent-color: #104B5E; 
  cursor: pointer;
}
.toggle-item label {
  cursor: pointer;
  font-size: 16px;
  flex: 1;
}

/* --- FIN DES NOUVEAUX STYLES --- */


/* Responsive ajustement */
@media (max-width: 768px) {
  .autocomplete-panel {
    width: 100%;
  }
}

/* --- CORRECTION: Position du Zoom --- */
.leaflet-control-zoom {
  z-index: 1001;
  bottom: 20px !important;
  right: auto !important; /* Changé de 'right: 20px' */
  top: auto !important;
  left: 20px !important; /* Changé de 'left: auto' */
}

/* --- NOUVEAU: Bouton de Géolocalisation --- */
#geolocate-button {
  position: absolute;
  z-index: 1001; /* Au-dessus de la carte */
  bottom: 80px; /* Juste au-dessus des contrôles de zoom */
  left: 20px;
  background: white;
  color: #333;
  border: none;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 18px; /* Taille de l'icône */
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  line-height: 1;
}

#geolocate-button:hover {
  background: #f4f4f4;
}

/* --- NOUVEAU: Style pour les Clusters --- */
.marker-cluster-small {
  background-color: rgba(16,75, 94, 0.6) !important; /* Votre violet */
}
.marker-cluster-small div {
  background-color: rgba(16,75, 94, 0.8) !important;
  color: #fff;
}

.marker-cluster-medium {
  background-color: rgba(16,75, 94, 0.6) !important;
}
.marker-cluster-medium div {
  background-color: rgba(16,75, 94, 0.8) !important;
  color: #fff;
}

.marker-cluster-large {
  background-color: rgba(16,75, 94, 0.6) !important;
}
.marker-cluster-large div {
  background-color: rgba(16,75, 94, 0.8) !important;
  color: #fff;
}

/* Texte à l'intérieur du cluster */
.marker-cluster div {
  font-weight: bold;
}

/* --- NOUVEAU: Bouton fermer du popup --- */

.popup-close-btn {
  position: absolute;
  top: 10px;       /* Ajustez au besoin */
  right: 10px;      /* Ajustez au besoin */
  
  /* Le "cercle blanc" demandé */
  width: 26px;
  height: 26px;
  background: white;
  border-radius: 50%; /* Pour le cercle */
  
  /* Centrer le "X" */
  display: flex;
  justify-content: center;
  align-items: center;
  
  /* Style du "X" */
  color: #333;
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
  font-family: Arial, sans-serif; /* Pour un 'X' propre */
  
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3); /* Ombre pour ressortir */
  z-index: 20; /* S'assurer qu'il est au-dessus de l'image */
  transition: all 0.2s ease;
}

.popup-close-btn:hover {
  background: #f1f1f1;
  color: #000;
  transform: scale(1.05);
}