
/* Variables CSS */
:root {
  --primary: #ff4713;
  --white: #ffffff;
  --black: #000000;
  --gray-dark: #333333;
}
/* OPEN STREET MAP */

/* Styles pour la carte noir et blanc */
.map-grayscale {
    filter: grayscale(100%) contrast(120%) brightness(110%);
    -webkit-filter: grayscale(100%) contrast(120%) brightness(110%);
}

/* Marqueurs personnalisés */
.custom-marker {
    background: transparent;
    border: none;
}

.marker-inner {
  width: 65px;
  height: 40px;
  background: #000000;
  border: 0;
  border-radius: 20px;
  transform: translate(-34%, -25%);
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.marker-inner::before,
.marker-inner::after {
  content: '';
  position: absolute;
  top: 37%;
  left: 50%;
  width: 25px;
  height: 3px;
  background: var(--white);
  border-radius: 4px;
  transform: translate(-50%, 0) rotate(-12deg);
}
.marker-inner::after {
  top: 52%;
}

.custom-marker:hover .marker-inner {
    background: var(--primary);
}
.map-panel .leaflet-left {
  left: inherit;
  right: 20px;
  top: 50px;
}
.map-panel .leaflet-control-zoom span {
  position: relative;
  left: -1px;
  width: 18px;
  display: inline-block;
}
.map-panel .leaflet-control-zoom.leaflet-bar.leaflet-control {
  border-radius: 100px;
  border-bottom: none !important;
  overflow: hidden;
  border: 0;
  margin-top: 50px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
}
.map-panel .leaflet-bar a {
  background-color: #fff;
  border-bottom: 1px solid #e2e2e2;
}
.map-panel .leaflet-touch .leaflet-bar a {
    width: 55px;
    height: 50px;
    font-size: 28px;
    line-height: normal;
}

.map-panel .leaflet-container a {
  text-decoration: none;
  align-items: center;
  justify-content: center;
  display: flex;
}
.map-panel .leaflet-popup-content {
    margin: 0;
    width: 280px !important;
    overflow: hidden;
}
.map-panel .leaflet-container a {
  text-decoration: none;
}
.map-panel .leaflet-container a h4 {
    font-size: 20px;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    padding: 20px !important;
    display: block;
}
.map-panel a.restaurant-image {
    padding: 0 !important;
}
.map-panel .leaflet-popup-content-wrapper {
    padding: 0px;
    text-align: left;
    border-radius: 0 0 20px 20px;
    overflow: hidden;
    border: 0;
}
.map-panel .leaflet-container a.leaflet-popup-close-button {
  top: 15px;
  right: 20px;
  color: black;
  font-size: 26px;
  background: white;
  border-radius: 100%;
  padding: 0px 0 0 1px !important;
  line-height: normal;
  width: 35px;
  height: 35px;
  margin: auto;
  text-align: center;
  font-weight: 500;
}


.map-panel .marker-cluster-small,
.map-panel .marker-cluster-medium,
.map-panel .marker-cluster-large {
    background-color: transparent !important;
}
.map-panel .marker-cluster-small div,
.map-panel .marker-cluster-medium div,
.map-panel .marker-cluster-large div {
  background-color: black;
  color: white;
  font-size: 18px;
  font-weight: 600;
  width: 65px;
  height: 40px;
  padding-top: 5px;
  background: #000000;
  border: 0;
  border-radius: 20px;
  transform: translate(-34%, -25%);
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}




/* Personnalisation du bouton plein écran */
.map-panel .leaflet-control-fullscreen {
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-top: 10px;
    margin-right: 10px;
}

.map-panel .leaflet-control-fullscreen a {
    background: rgba(255, 255, 255, 0.95);
    width: 40px;
    height: 40px;
    border-radius: 6px;
    color: #333;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}


.map-panel .leaflet-control-fullscreen a.leaflet-control-fullscreen-button {
  height: 55px;
  padding-top: 0;
}
.map-panel .leaflet-control-fullscreen a:hover {
  background-color: #f4f4f4;
}

.map-panel .leaflet-control-fullscreen a:active {
    transform: scale(0.95);
}

/* Style en mode plein écran */
.map-panel .leaflet-fullscreen-on a.leaflet-control-fullscreen-button.leaflet-bar-part:before {
    background: transparent url('../img/arrow-off-full.svg');
}

/* Réajustement du positionnement pour éviter le conflit avec les boutons de zoom */
.map-panel .leaflet-control-fullscreen {
  position: absolute;
  top: -35px;
  border-radius: 100%;
  overflow: hidden;
  border: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}


a.leaflet-control-fullscreen-button.leaflet-bar-part:before {
  content: '';
  display: block;
  width: 30px;
  height: 30px;
  background: transparent url('../img/arrow-light-full.svg');
}


/* -------------------------------- */
/* Marker et Popup de géolocalisation */
/* -------------------------------- */

/* Marker personnalisé pour la position utilisateur */
.user-location-marker {
    background: transparent;
    border: none;
}

.user-location-icon {
    width: 20px;
    height: 20px;
    background: #ff4713;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(255, 71, 19, 0.3),
                0 2px 8px rgba(0, 0, 0, 0.3);
    animation: pulseLocation 2s infinite;
}

@keyframes pulseLocation {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(255, 71, 19, 0.3),
                    0 2px 8px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 71, 19, 0.1),
                    0 2px 8px rgba(0, 0, 0, 0.3);
    }
}

/* Popup personnalisé pour la position utilisateur */

.search-location-popup, .user-location-popup {
  display: none;
}
.search-location-popup .leaflet-popup-content-wrapper,
.user-location-popup .leaflet-popup-content-wrapper {
    background: var(--primary);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.search-location-popup .leaflet-popup-content,
.user-location-popup .leaflet-popup-content {
    margin: 12px 16px;
    font-family: 'gt_pressura_boldbold';
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-location-popup .leaflet-popup-tip,
.user-location-popup .leaflet-popup-tip {
    background: var(--primary);
}


.search-location-popup .leaflet-popup-close-button,
.user-location-popup .leaflet-popup-close-button {
    color: white;
    font-size: 20px;
    opacity: 0.8;
}

.search-location-popup .leaflet-popup-close-button:hover,
.user-location-popup .leaflet-popup-close-button:hover {
    opacity: 1;
}
.map-panel .leaflet-container .search-location-popup  .leaflet-popup-close-button,
.map-panel .leaflet-container .user-location-popup .leaflet-popup-close-button {
  top: 9px;
  font-size: 15px;
  width: 25px;
  height: 25px;
}


/* Marqueur de recherche de localisation */
.search-location-marker {
    background: transparent;
    border: none;
}

.search-location-icon {
    width: 20px;
    height: 20px;
    background: #ff4713;
    border: 3px solid white;
    margin-left: 10px;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(255, 71, 19, 0.3),
                0 2px 8px rgba(0, 0, 0, 0.3);
    animation: pulseLocation 2s infinite;
}

.search-location-popup .leaflet-popup-content strong {
  margin-right: 5px;
}

.search-location-popup .leaflet-popup-content br {
  display: none;
}


/* Spinner de chargement pour les boutons */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    border-style: solid;
    border-color: currentColor transparent currentColor transparent;
    border-radius: 50%;
    display: inline-block;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Désactiver le bouton pendant le chargement */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}



/* Masquer le formulaire de recherche quand un filtre est actif */
.search-container-map.search-hidden,
#searchForm.search-hidden {
}

/* Animation douce pour le masquage/affichage */
.search-container-map,
#searchForm {
    transition: opacity 0.3s ease, height 0.3s ease;
}

/* Badge de résultats de recherche */
.search-results-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 0;
    animation: slideInResults 0.4s ease forwards;
}

@keyframes slideInResults {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
