/* Correction du layout principal */
.content-wrapper {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    min-height: 600px;
    align-items: start;
    margin-right: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 20px;
}

/* Sidebar avec hauteur adaptée */
.implantations-sidebar {
    background: white;
    padding: 0 1.5rem;
    height: fit-content;
    max-height: 90vh;
    /* Hauteur maximum pour éviter débordement */
    overflow: visible;
}

/* Liste des implantations */
.implantations-count {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

/* Zone scrollable plus haute pour voir la première carte entière */
.implantations-list {
    max-height: 500px;
    /* Réduire la hauteur pour laisser de l'espace */
    overflow-y: auto;
    /* Garder le scroll vertical */
    overflow-x: hidden;
    /* Empêcher le scroll horizontal */
    margin-bottom: 1.5rem;
    padding: 10px;

    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: #900C22 #F6F6F6;
}

/* Enlever les flèches */
.implantations-list::-webkit-scrollbar-button {
  display: none;
}

.implantations-list::-webkit-scrollbar-thumb {
  color: #900C22;
}

.implantation-item {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.implantation-item:hover {
    background-color: #f8f9fa;
}

.implantation-item.selected {
    background-color: #fde3e9;
    border-left: 3px solid #c41e3a;
}

.implantation-item:last-child {
    border-bottom: none;
}

.implantation-item:last-child .implantation-hours {
    background-color: #50000D;
    color: white;
    /* le texte sera blanc sur ce fond foncé */
}

/* Améliorations des badges */
.implantation-badge {
    color: black;
    padding: 0.4rem 0.8rem;
    border: 1px solid #D1D1D1;
    border-radius: 4px;
    font-size: 0.75rem;
    display: inline-block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.implantation-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.5rem 0;
    color: #333;
}

.implantation-address,
.implantation-phone {
    font-size: 0.85rem;
    color: #666;
    margin: 0.25rem 0;
}

/* Section des détails */
.selected-location-details {
    border-top: 2px solid #e9ecef;
    padding-top: 1rem;
}

.selected-location-details h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #333;
}

/* Map Container */
.map-container {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 600px;
    position: relative;
}

.map-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #666;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .implantations-sidebar {
        max-height: none;
    }

    .implantations-list {
        max-height: 200px;
    }
}

/* Cartes avec hauteur optimisée */
.implantation-card {
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
    border-radius: 24px;
    background: #F6F6F6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    /* Empêcher le débordement horizontal */
    box-sizing: border-box;
    /* Inclure padding dans la largeur */
}

.implantation-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-color: #c41e3a;
}

.implantation-card.selected {
    background: #E20026;
    /* Garder le fond blanc */
    border: 2px solid #c41e3a;
    /* Bordure rouge visible */
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.2);
    color: white;
}

.implantation-card.selected * {
    color: white;
}


/* Titre */
.implantation-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.3;
}

/* Adresse simple */
.implantation-address p {
    margin: 0.3rem 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Contact téléphone */
.implantation-contact {
    display: flex;
    margin: 1rem 0;
    color: black;
    font-weight: 600;
    font-size: 0.9rem;
}

.implantation-contact .phone-icon {
    width: auto;
    color: #E20026;
}

.implantation-contact span {
    padding-top: 2px;
    padding-left: 5px;
}

/* Téléphone blanc quand la card est sélectionnée */
.implantation-card.selected img {
    color: white;
}

/* Horaires - style simple */
.implantation-hours {
    margin: 1.2rem 0;
    border-radius: 24px;
    padding: 15px 20px 20px 20px;
    background-color: white;
}

.implantation-card.selected .implantation-hours {
    background-color: #50000D;
}

.implantation-hours h4 {
    font-size: 1rem;
    margin: 0 0 0.8rem 0;
    color: #333;
    font-weight: 600;
}

.phone-value {
    text-decoration: underline;
}

.hour-item {
    display: flex;
    justify-content: space-between;
    padding: 0.2rem 0;
    font-size: 0.85rem;
}

.hour-item span:first-child {
    font-weight: 500;
}

.hour-item .hour-item-day {
    color: #6D6D6D;
}

.hour-item .hour-item-hour {
    color: #0E0E0E;
    font-weight: 700;
}

.implantation-card.selected .hour-item .hour-item-day,
.implantation-card.selected .hour-item .hour-item-hour {
    color: white;
}



/* Tags */
.implantation-tags {
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.implantation-tags .tag {
    background: #f8f9fa;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    display: inline-block;
}

.implantation-tags .tag-description {
    font-size: 0.8rem;
    color: #777;
    margin: 0.6rem 0 0 0;
    line-height: 1.4;
}

/* Carte Leaflet */
#implantations-map {
    height: 600px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    flex: 1;
    /* Prend l'espace restant après les filtres */
    min-height: 500px;
}

/* Styling des clusters de markers */
.marker-cluster {
    background-color: #c41e3a !important;
    border: 3px solid #ffffff !important;
    border-radius: 50% !important;
    box-shadow: 0 3px 10px rgba(196, 30, 58, 0.4) !important;
}

.marker-cluster div {
    width: 34px !important;
    height: 34px !important;
    margin-left: 3px !important;
    margin-top: 3px !important;
    background-color: #c41e3a !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.marker-cluster span {
    color: #ffffff !important;
    font-weight: bold !important;
    font-size: 14px !important;
    line-height: 1 !important;
    text-align: center !important;
}

/* Forcer les dimensions pour toutes les tailles */
.marker-cluster-small {
    width: 40px !important;
    height: 40px !important;
}

.marker-cluster-medium {
    width: 50px !important;
    height: 50px !important;
}

.marker-cluster-medium div {
    width: 44px !important;
    height: 44px !important;
}

.marker-cluster-medium span {
    font-size: 16px !important;
}

.marker-cluster-large {
    width: 60px !important;
    height: 60px !important;
}

.marker-cluster-large div {
    width: 54px !important;
    height: 54px !important;
}

.marker-cluster-large span {
    font-size: 18px !important;
}

/* Hero personnalisé pour implantations */
/* .hero-implantations {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    padding: 4rem 0;
    text-align: center;
}

.hero-implantations .hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-implantations .hero-title {
    font-size: 3.5rem;
    color: #c41e3a;
    margin-bottom: 2rem;
    font-weight: 800;
}

.hero-implantations .hero-description {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #555;
    max-width: 900px;
    margin: 0 auto;
} */

/* Filter section - Style popup avec checkboxes (sans hover) */
.filter-section {
    margin-bottom: 1rem;
    position: relative;
}

/* Dropdown trigger */
.filter-dropdown {
    position: relative;
    width: 100%;
}

.filter-current {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.filter-current:hover .filter-text {
    color: #c41e3a;
}

.filter-text {
    font-size: 1rem;
    color: #666;
    font-weight: 400;
    transition: color 0.2s ease;
}

.filter-current img {
    width: auto;
    padding-left: 10px;
}

.filter-section .filter-current .img {
    width: auto;
    padding-left: 1rem;
}

.filter-current:hover .filter-arrow {
    color: #c41e3a;
}

.filter-current.active .filter-arrow {
    transform: rotate(180deg);
    color: #c41e3a;
}

.filter-current.active .filter-text {
    color: #c41e3a;
}

/* Popup avec checkboxes */
.filter-popup {
    position: absolute;
    top: 100%;
    left: -1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    /* z-index: 1000; */
    margin-top: 0.5rem;
    padding: 1.5rem;
    min-width: 280px;
    display: none;
}

.filter-popup.show {
    display: block;
}

/* Items avec checkboxes - SANS HOVER */
.filter-checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    cursor: pointer;
    /* Supprimé transition et hover */
}

.filter-checkbox-item:last-child {
    margin-bottom: 0;
}

/* Supprimé tous les effets hover */

/* Input checkbox caché */
.filter-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* Checkbox personnalisé */
.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 3px;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.filter-checkbox:checked+.checkbox-custom {
    background-color: #c41e3a;
    border-color: #c41e3a;
}

/* Checkmark */
.filter-checkbox:checked+.checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Label du checkbox */
.checkbox-label {
    font-size: 0.9rem;
    color: #333;
    font-weight: 400;
    line-height: 1.4;
}

.filter-checkbox:checked+.checkbox-custom+.checkbox-label {
    color: #c41e3a;
    font-weight: 500;
}

/* Compteur d'implantations */
.implantations-count {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    padding: 0;
    font-weight: 400;
}

/* Bouton toggle plein écran - positionné par rapport à map-container */
.fullscreen-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: transparent;
    /* Fond transparent au lieu de rouge */
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: none;
    /* Supprime l'ombre */
}

.fullscreen-toggle:hover {
    background: transparent;
    /* Garde transparent au hover */
    transform: scale(1.05);
    box-shadow: none;
}

.fullscreen-toggle svg,
.fullscreen-toggle img {
    width: 44px;
    height: 44px;
    transition: all 0.2s ease;
}

.fullscreen-toggle:hover svg,
.fullscreen-toggle:hover img {
    transform: scale(1.05);
}

/* Mode plein écran - la carte prend toute la section implantations-content */
.implantations-content.fullscreen .content-wrapper {
    grid-template-columns: 1fr;
    /* Une seule colonne - que la carte */
    height: 80vh;
    /* Hauteur de la section, pas de toute la page */
}

.implantations-content.fullscreen .implantations-sidebar {
    display: none;
    /* Masquer la sidebar */
}

.implantations-content.fullscreen .map-container {
    width: 100%;
    height: 80vh;
    /* Même hauteur que le content-wrapper */
    border-radius: 8px;
    /* Garder les bordures arrondies */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    /* Ombre plus prononcée */
}

.implantations-content.fullscreen #implantations-map {
    height: 80vh;
    border-radius: 8px;
}

/* Animation des icônes */
.implantations-content.fullscreen .expand-icon {
    display: none;
}

.implantations-content.fullscreen .close-icon {
    display: block !important;
}

/* Positionnement du bouton en mode étendu */
.implantations-content.fullscreen .fullscreen-toggle {
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    z-index: 999;
}

/* Mobile responsive pour le bouton */
@media (max-width: 768px) {
    .fullscreen-toggle {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }

    .implantations-content.fullscreen .content-wrapper {
        height: 70vh;
    }

    .implantations-content.fullscreen .map-container,
    .implantations-content.fullscreen #implantations-map {
        height: 70vh;
    }

    .implantations-content.fullscreen .fullscreen-toggle {
        top: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

/* Section filtres globale - au-dessus de tout */
.global-filters-section {
    background: white;
    padding: 1.5rem;
    margin-left: 5rem;
}

/* Zone des filtres sélectionnés */
.selected-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    min-height: 20px;
    /* Espace réservé même si vide */
}

/* Tags des filtres sélectionnés */
.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #D1D1D1;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 15px;
    color: #0E0E0E;
    font-weight: 700;
}

.filter-tag .remove-filter {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.filter-tag .remove-filter:hover {
    background: #ddd;
    color: #333;
}

/* Bouton "Supprimer tous les filtres" */
.clear-all-filters {
    background: none;
    border: none;
    color: #0E0E0E;
    font-size: 15px;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    transition: all 0.2s ease;
    font-weight: 700;
}

.clear-all-filters:hover {
    background: #ffeaea;
}

/* Responsive pour les filtres */
@media (max-width: 768px) {
    .global-filters-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .selected-filters {
        margin-top: 0.75rem;
    }

    .filter-tag {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
}