/* ==========================
   TITRE
========================== */
h2 {
    text-align: center;
    margin-top: 20px;
    font-size: 24px;
	  color: #007bff;
}

/* ==========================
   FILTRES HORIZONTAUX
========================== */
.filters-horizontal {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 10px 0 20px 0;
}

.filters-horizontal label {
    display: flex;
    flex-direction: column;
    font-size: 18px;
    color: #007bff;
}

.filters-horizontal select {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 16px;
    min-width: 350px;
    transition: 0.3s;
}

.filters-horizontal select:hover,
.filters-horizontal select:focus {
    border-color: #007bff;
    outline: none;
}

/* ==========================
   CARTE
========================== */
#map {
    height: 80vh;
    width: 100%;
    background: #fff !important; /* Carte toujours claire */
}

/* Cacher les marqueurs PNG par défaut */
.leaflet-marker-icon,
.leaflet-marker-shadow {
    display: none !important;
}

/* Conteneur pour les markers SVG personnalisés */
.custom-svg-marker {
    width: 32px !important;
    height: 48px !important;
    background: transparent !important;
    border: none !important;
    display: block !important;
}

.custom-svg-marker .svg-wrapper svg {
    display: block !important;
}

/* ==========================
   LABEL SUR CARTE
========================== */
.marker-label {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    background: white;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* En mode sombre → labels toujours lisibles */
.dark .marker-label {
    background: #1e1e1e;
    border: 1px solid #555;
    color: #f1f1f1;
}

/* ==========================
   TOGGLE MODE SOMBRE (iOS)
========================== */
.theme-switch-wrapper {
    position: fixed;
    top: 5px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9999;
}

#themeLabel {
    font-size: 20px;
    color: white;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 55px;
    height: 28px;
}

.theme-switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    background: #ccc;
    border-radius: 34px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.4s;
}

input:checked + .slider {
    background-color: #007bff;
}

input:checked + .slider:before {
    transform: translateX(27px);
}

/* ==========================
   SCROLLER DES MARKERS
========================== */
#markerListContainer {
    max-height: 200px;
    overflow-y: auto;
    margin: 10px 20px;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 5px 8px;
    background-color: #f9f9f9;
}

#markerList li {
    list-style: none;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

#markerList li:hover {
    background-color: #007bff;
    color: #fff;
}

/* ==========================
   MODE SOMBRE GLOBAL
========================== */
.dark body {
    background-color: #121212;
    color: #e6e6e6;
}

.dark h2 {
    color: #ffffff;
}

.dark .filters-horizontal label {
    color: #4da3ff;
}

.dark .filters-horizontal select {
    background: #1e1e1e;
    color: #ffffff;
    border: 1px solid #444;
}

.dark #markerListContainer {
    background-color: #1e1e1e;
    border: 1px solid #444;
}

.dark #markerList li {
    border-bottom: 1px solid #333;
}

/* Popup sombre */
.dark .leaflet-popup-content-wrapper {
    background: #1e1e1e !important;
    color: #ffffff !important;
}

.dark .leaflet-popup-tip {
    background: #1e1e1e !important;
}
/* ==========================
   LOGO + TITRE
========================== */
.logo-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 26px;
    font-weight: bold;
    color: #000000; /* noir par défaut */
    margin: 20px 0;
}

.logo-img {
    width: 45px;      /* carré */
    height: 45px;
    object-fit: cover;  /* reste carré même si l’image est rectangulaire */
    border-radius: 8px; /* léger arrondi carré */
    border: 2px solid #007bff;
    background-color: white;
}

/* MODE SOMBRE */
.dark .logo-title {
    color: #ffffff; /* texte blanc */
}

.dark .logo-img {
    border-color: #4da3ff;
    background-color: #1e1e1e;
}
#resultCount {
    font-weight: bold;
}
