/* Container principal */
.nsl-wrapper {
    display: flex;
    flex-direction: row;
    height: 75vh; /* La carte prendra 75% de la hauteur de l'écran */
    min-height: 600px;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

/* Panneau latéral gauche */
.nsl-sidebar {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important; /* S'adapte à la hauteur de la carte à côté */
    max-height: 100% !important;
    overflow: hidden !important; /* Empêche le débordement global */
    /* ... garde tes autres propriétés (width, background, etc.) ... */
    position: relative !important; /* Assure que le z-index est bien pris en compte */
    z-index: 10 !important; /* Assez haut pour être sur la carte, mais plus bas que le header du thème (souvent 999+) */
}

/* Assurons-nous aussi que le conteneur global ne force pas un z-index trop haut */
.nsl-wrapper {
    /* ... garde tes autres propriétés ... */
    position: relative !important;
    z-index: 1 !important;
}

/* Zone de recherche */
.nsl-search-box {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.nsl-search-box input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.nsl-search-box input:focus {
    border-color: #000; /* Style épuré type Tesla */
}

.nsl-search-box button {
    background: #f4f4f4;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.nsl-search-box button:hover {
    background: #e0e0e0;
}

/* Liste des concessions */
.nsl-stores-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    flex: 1 1 auto !important; /* Prend tout l'espace disponible sous la recherche */
    overflow-y: auto !important; /* Active la barre de défilement verticale */
    overflow-x: hidden !important; /* Empêche le scroll horizontal accidentel */
    position: relative !important;
    padding: 0;
    margin: 0;
}

/* Scrollbar moderne pour la liste */
.nsl-stores-list::-webkit-scrollbar {
    width: 6px;
}
.nsl-stores-list::-webkit-scrollbar-track {
    background: transparent;
}
.nsl-stores-list::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 10px;
}
.nsl-stores-list::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* Zone de la carte */
.nsl-map-container {
    width: 65%;
    flex-grow: 1;
    background: #f0f0f0; /* Couleur d'attente avant le chargement de la carte */
}

/* Responsive (Mobile) */
@media (max-width: 768px) {
    .nsl-wrapper {
        flex-direction: column-reverse;
    }
    .nsl-sidebar, .nsl-map-container {
        width: 100%;
        min-width: 100%;
    }
    .nsl-map-container {
        height: 50vh; /* La carte prend la moitié supérieure sur mobile */
    }
    .nsl-sidebar {
        height: 50vh;
    }
}

/* --- STYLE DES BOUTONS (Bulle & Liste) --- */
.nsl-btn {
    flex: 1; text-align: center; padding: 8px 10px;
    background-color: #f8fafc !important; border: 1px solid #e2e8f0 !important;
    border-radius: 6px; color: #333 !important; font-size: 12px;
    font-weight: 600; text-decoration: none !important;
    box-sizing: border-box; white-space: nowrap; display: block;
    outline: none !important; box-shadow: none !important;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.nsl-btn:hover {
    background-color: #e2e8f0 !important; border-color: #cbd5e1 !important;
}

/* Suppression définitive du contour noir de sélection Google / Navigateur */
.nsl-btn:focus, .nsl-btn:active, .nsl-store-item:focus, .nsl-store-item:active {
    outline: none !important; box-shadow: none !important;
}

/* --- CORRECTION DE L'EN-TÊTE GOOGLE MAPS --- */
.gm-style-iw-ch {
    padding: 0 !important;
    margin: 0 !important;
    height: 0 !important;
}

/* --- LE PANNEAU FLOTTANT SUR-MESURE (Façon Tesla) --- */
#nsl-custom-panel {
    position: absolute;
    top: 20px;
    right: 20px; /* On le place en haut à droite pour ne pas gêner la liste de gauche */
    width: 320px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    display: none; /* Caché par défaut */
    flex-direction: column;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    border: 1px solid #e2e8f0;
}

#nsl-panel-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s ease;
}

#nsl-panel-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

#nsl-panel-content {
    padding: 20px;
}

/* --- FORCER LE DESIGN SUR L'HÔTE DU COMPOSANT GOOGLE --- */
gmp-place-picker {
    color-scheme: light !important;
    background-color: #f8fafc !important;
    color: #334155 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    min-height: 45px !important;
    box-sizing: border-box !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    display: block !important;
}

gmp-place-picker:focus-within {
    border-color: #94a3b8 !important;
    outline: none !important;
}

/* --- MENU DÉROULANT DE FILTRES (Dropdown) - BLINDÉ --- */
.nsl-search-box {
    position: relative !important; /* Indispensable pour ancrer le menu au bon endroit */
}

.nsl-filter-dropdown {
    position: absolute !important;
    top: 100% !important; /* S'attache pile en dessous de la zone de recherche */
    left: 20px !important;
    right: 20px !important;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15) !important;
    z-index: 99999 !important; /* Passe au-dessus de tout le reste */
    display: none; /* Géré en JS avec .active */
    flex-direction: column !important;
    padding: 0 !important;
    margin-top: 5px !important;
}

.nsl-filter-dropdown.active {
    display: flex !important;
}

.nsl-dropdown-body {
    padding: 15px 20px !important;
    max-height: 40vh !important;
    overflow-y: auto !important;
    background: #ffffff !important;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
}

.nsl-filter-section {
    margin-bottom: 15px !important;
    text-align: left !important;
}

.nsl-filter-section h4 {
    margin: 0 0 10px 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #475569 !important;
}

.nsl-checkbox-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    align-items: flex-start !important;
}

.nsl-checkbox-label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    font-size: 13px !important;
    color: #334155 !important;
    cursor: pointer !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nsl-checkbox-label input {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    cursor: pointer !important;
    appearance: auto !important; /* Force l'affichage natif de la case */
}

.nsl-dropdown-footer {
    padding: 12px 20px !important;
    border-top: 1px solid #e2e8f0 !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 10px !important;
    background-color: #f8fafc !important;
    border-bottom-left-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

.nsl-dropdown-footer button {
    width: auto !important; /* Corrige les boutons écrasés */
    min-width: fit-content !important;
    height: auto !important;
    margin: 0 !important;
}

/* Bouton Réinitialiser (Discret) */
.nsl-btn-secondary {
    padding: 8px 16px !important;
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    color: #475569 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    font-family: 'Poppins', sans-serif !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}
.nsl-btn-secondary:hover {
    background-color: #e2e8f0 !important;
}

/* Bouton Appliquer (Mis en avant) */
.nsl-btn-primary {
    padding: 8px 16px !important;
    background-color: #0f172a !important; /* Bleu nuit / anthracite profond */
    border: 1px solid #0f172a !important;
    border-radius: 6px !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: 'Poppins', sans-serif !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}
.nsl-btn-primary:hover {
    background-color: #1e293b !important; /* Légèrement plus clair au survol */    border-color: #1e293b !important;
}

/* --- Grille de logos pour les filtres --- */
.nsl-logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 10px;
}

.nsl-logo-label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    padding: 5px;
    background-color: #f8fafc;
}

.nsl-logo-label:hover {
    border-color: #cbd5e1;
    background-color: #f1f5f9;
}

.nsl-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.nsl-logo-text {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    text-align: center;
}

/* Cache la case à cocher native */
.nsl-logo-cb {
    display: none;
}

.nsl-logo-label:has(> .nsl-logo-cb:checked) {
    border-color: #0f172a;
    background-color: #ffffff;
    box-shadow: 0 0 0 2px #0f172a;
}

/* --- BADGE DU BOUTON FILTRE --- */
.nsl-filter-badge {
    display: none; /* Caché par défaut */
    background-color: #ef4444; /* Rouge pour attirer l'attention */
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    padding: 0 6px;
    height: 20px;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-left: 4px;
}

/* --- MESSAGE AUCUN RÉSULTAT --- */
.nsl-no-results {
    padding: 30px 20px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    font-style: italic;
}

/* --- FORCE L'ALIGNEMENT DE LA LIGNE DE RECHERCHE (ANTI-ELEMENTOR & ANTI-OVERFLOW) --- */
.nsl-search-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    width: 100% !important;
    align-items: stretch !important; /* Force le bouton et la recherche à avoir EXACTEMENT la même hauteur */
    box-sizing: border-box !important;
    margin: 0 !important; /* Supprime l'espace violet résiduel */
}

#nsl-search-container {
    flex: 1 1 0% !important; /* Laisse la barre de recherche occuper tout l'espace restant librement */
    min-width: 0 !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
}

#nsl-search-container gmp-place-picker {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    margin: 0 !important;
}

gmp-place-picker::part(input) {
    height: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

#nsl-geo-btn {
    flex: none !important; /* Empêche Flexbox d'interférer avec la largeur */
    height: auto !important; /* S'étire grâce au parent (align-items: stretch) */
    width: auto !important; /* Laisse l'aspect-ratio faire les calculs */
    aspect-ratio: 1 / 1 !important; /* Force le carré parfait */
    min-width: 0 !important; /* CRUCIAL : Annule les largeurs minimales par défaut d'Elementor */
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important; /* Supprime l'espacement du texte par défaut */
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

/* --- DESIGN WIDGET HORIZONTAL (PAGES INDIVIDUELLES) --- */
.nsl-sc-wrapper-horizontal {
    font-family: 'Poppins', sans-serif !important;
    width: 100% !important;
    max-width: 100% !important; /* Libère la largeur pour s'aligner avec la map */
    margin: 20px 0 !important;
    box-sizing: border-box !important;
}

.nsl-sc-card-horizontal {
    display: grid !important;
    grid-template-columns: 1fr 2.5fr !important; /* Donne beaucoup plus d'espace à la partie horaires */
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03) !important;
}

.nsl-sc-col-left {
    background: #f8fafc !important;
    padding: 30px !important;
    border-right: 1px solid #e2e8f0 !important;
}

.nsl-sc-col-right {
    padding: 30px 40px !important; /* Un peu plus d'air sur les côtés */
}

.nsl-sc-heading {
    margin: 0 0 24px 0 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

.nsl-sc-address {
    margin: 0 0 24px 0 !important;
    font-size: 15px !important;
    color: #334155 !important;
    line-height: 1.6 !important;
}

.nsl-sc-phone-container {
    margin: 0 !important;
}

.nsl-sc-phone-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    font-size: 15px !important;
    border: 1px solid #cbd5e1 !important;
    transition: all 0.2s ease !important;
}

.nsl-sc-phone-pill:hover {
    background-color: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}

.nsl-sc-services-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 50px !important; /* Aère grandement l'espace entre Vente et Après-Vente */
}

.nsl-service-block {
    margin: 0 !important;
}

.nsl-service-title {
    margin: 0 0 16px 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    /* Suppression de la bordure basse pour un look plus clean */
}

.nsl-sc-hours {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important; /* Espace constant entre les jours */
}

.nsl-card-hour-row {
    display: flex !important;
    justify-content: flex-start !important; /* Aligne tout vers la gauche */
    padding: 0 !important;
    border-bottom: none !important; /* Suppression des pointillés */
    font-size: 13.5px !important;
    line-height: 1.4 !important;
}

.nsl-card-day {
    font-weight: 500 !important;
    color: #0f172a !important;
    width: 85px !important; /* Largeur fixe pour créer une colonne imaginaire bien droite */
    flex-shrink: 0 !important;
}

.nsl-card-time {
    color: #475569 !important;
    text-align: left !important;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .nsl-sc-card-horizontal {
        grid-template-columns: 1fr !important;
    }
    
    .nsl-sc-col-left {
        border-right: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding: 24px !important;
    }
    
    .nsl-sc-col-right {
        padding: 24px !important;
    }
    
    .nsl-sc-services-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
}

/* --- EN-TÊTES MODERNES ET ALIGNEMENT --- */
.nsl-modern-header {
    display: flex !important;
    flex-direction: row !important; /* Force l'alignement horizontal */
    align-items: center !important;
    gap: 8px !important;
    margin: 0 0 24px 0 !important;
}

.nsl-modern-header h4 {
    font-family: 'Poppins', sans-serif !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    line-height: 1 !important;
}

.nsl-icon-accent {
    color: #475569 !important; /* Gris foncé moderne */
    flex-shrink: 0 !important;
    display: block !important;
}

/* --- INFOS CONTACT (ALIGNEMENT UNIFIÉ) --- */
.nsl-contact-details {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
}

.nsl-sc-divider {
    border: 0 !important;
    height: 1px !important;
    background-color: #e2e8f0 !important;
    margin: 4px 0 !important;
}

.nsl-sc-info-row {
    font-family: 'Poppins', sans-serif !important;
    display: flex !important;
    align-items: flex-start !important; /* L'adresse multiligne reste alignée en haut */
    font-size: 14px !important;
    color: #475569 !important;
    line-height: 1.6 !important;
}

.nsl-sc-info-row strong {
    font-weight: 600 !important;
    color: #0f172a !important;
    width: 100px !important; /* Largeur fixe pour aligner l'adresse et les téléphones */
    flex-shrink: 0 !important;
}

.nsl-sc-info-val {
    flex: 1 !important;
    color: #334155 !important;
}

/* --- BOUTONS D'ACTION (FLEX & WRAP) --- */
.nsl-sc-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important; /* Permet aux boutons de passer à la ligne s'il y en a 3 */
    gap: 10px !important;
}

.nsl-btn {
    font-family: 'Poppins', sans-serif !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 14px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    flex: 1 1 auto !important; /* Permet aux boutons de s'adapter à la largeur dispo */
    white-space: nowrap !important; /* Empêche le texte du bouton de se couper en deux */
    box-sizing: border-box !important;
    cursor: pointer !important;
}

.nsl-btn-primary {
    background-color: #0f172a !important; /* Bouton foncé pour l'action principale */
    color: #ffffff !important;
    border: 1px solid #0f172a !important;
}

.nsl-btn-primary:hover {
    background-color: #1e293b !important;
    border-color: #1e293b !important;
}

.nsl-btn-outline {
    background-color: #ffffff !important; /* Bouton clair pour l'action secondaire */
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

.nsl-btn-outline:hover {
    background-color: #f8fafc !important;
    border-color: #94a3b8 !important;
}

/* --- GRILLE DES HORAIRES ET BADGES --- */
.nsl-sc-services-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 40px !important;
}

.nsl-service-header {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
}

.nsl-service-badge {
    font-family: 'Poppins', sans-serif !important;
    display: inline-block !important;
    background-color: #f1f5f9 !important; /* Fond gris perle */
    color: #0f172a !important; /* Texte foncé pour contraster */
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 4px 12px !important;
    border-radius: 4px !important; /* Bords légèrement arrondis */
    border: 1px solid #e2e8f0 !important;
}

/* Badges Temps Réel (Ouvert/Fermé) */
.nsl-status-badge {
    font-family: 'Poppins', sans-serif !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 4px 8px !important;
    border-radius: 12px !important;
    letter-spacing: 0.5px !important;
}

.nsl-status-open {
    background-color: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #a7f3d0 !important;
}

.nsl-status-closed {
    background-color: #fff1f2 !important;
    color: #e11d48 !important;
    border: 1px solid #fecdd3 !important;
}

.nsl-sc-hours {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important; /* Réduit car le padding des lignes apporte déjà de l'air */
}

.nsl-card-hour-row {
    font-family: 'Poppins', sans-serif !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    font-size: 13.5px !important;
    line-height: 1.4 !important;
    padding: 7px 10px 5px 10px !important; /* MAGIE OPTIQUE : 7px en haut, 5px en bas */
    margin: 0 -10px !important; 
    border-radius: 6px !important;
    transition: background-color 0.2s ease !important;
}

/* --- Surlignage du Jour Actuel (Épuré et discret) --- */
.nsl-current-day {
    background-color: #f1f5f9 !important; /* Fond gris perle très subtil */
    box-shadow: none !important; /* Disparition de la bordure rigide */
}

.nsl-current-day .nsl-card-day {
    font-weight: 700 !important;
    color: #0f172a !important;
}

.nsl-current-day .nsl-card-time {
    font-weight: 600 !important;
    color: #0f172a !important;
}

.nsl-card-day {
    font-weight: 500 !important;
    color: #475569 !important;
    width: 85px !important; /* Conserve la colonne imaginaire parfaitement droite */
    flex-shrink: 0 !important;
}

.nsl-card-time {
    color: #475569 !important;
    text-align: left !important;
}

.nsl-closed {
    color: #94a3b8 !important;
    font-style: italic !important;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .nsl-sc-card-horizontal {
        grid-template-columns: 1fr !important;
    }
    .nsl-sc-col-left {
        border-right: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }
    .nsl-sc-actions {
        flex-direction: column !important; /* Empile les boutons sur mobile */
    }
}

/* --- DESIGN WIDGET RÉSEAU DE MARQUE --- */
.nsl-network-wrapper {
    font-family: 'Poppins', sans-serif !important;
    width: 100% !important;
    margin: 30px 0 !important;
    box-sizing: border-box !important;
}

.nsl-network-map {
    width: 100% !important;
    height: 350px !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 30px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05) !important;
}

/* --- DESIGN WIDGET RÉSEAU (CLONE EXACT POP-UP) --- */
.nsl-network-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 20px !important;
}

.nsl-popup-clone {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    font-family: 'Poppins', sans-serif !important;
    box-sizing: border-box !important;
}

/* En-tête */
.nsl-clone-header {
    display: flex !important;
    align-items: flex-start !important;
    gap: 15px !important;
    margin-bottom: 16px !important;
}

.nsl-clone-logo {
    width: 45px !important;
    height: 45px !important;
    border-radius: 8px !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    flex-shrink: 0 !important;
    background-color: #ffffff !important;
}

.nsl-clone-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    padding-top: 2px !important;
}

.nsl-clone-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

.nsl-clone-address {
    font-size: 13.5px !important;
    color: #475569 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

/* Image Centrale */
.nsl-clone-image {
    width: 100% !important;
    height: 160px !important;
    border-radius: 8px !important;
    background-color: #f1f5f9 !important;
    background-size: cover !important;
    background-position: center !important;
    margin-bottom: 16px !important;
}

/* Boutons */
.nsl-clone-actions {
    display: flex !important;
    gap: 10px !important;
    margin-top: auto !important;
}

.nsl-clone-btn {
    flex: 1 !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 10px !important;
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.nsl-clone-btn:hover {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* Surbrillance de la fiche réseau au clic sur le Pin (Design "Élévation" moderne) */
.nsl-popup-clone {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important; /* Animation extrêmement fluide */
}

.nsl-popup-clone.nsl-card-active {
    border-color: #e2e8f0 !important; /* On garde la bordure gris clair d'origine, on ne la noircit pas */
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.02) !important; /* Double ombre large et vaporeuse */
    transform: translateY(-4px) !important; /* La carte lévite un peu plus haut */
    background-color: #ffffff !important;
    z-index: 10 !important; /* S'assure que l'ombre passe bien par-dessus les autres cartes */
}

/* ==========================================================================
   STYLE DE LA POP-UP CARTE (RETOUR AU DESIGN ORIGINAL)
   ========================================================================== */

#nsl-detail-panel {
    padding: 0 !important; /* Force l'annulation des paddings par défaut pour coller aux bords */
}

.nsl-popup-container {
    padding: 16px;
    position: relative;
}

/* Bouton de fermeture */
.nsl-popup-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background-color: #f7fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #4a5568 !important;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    z-index: 10;
    transition: all 0.2s ease;
}

.nsl-popup-close-btn:hover {
    background-color: #edf2f7 !important;
    color: #1a202c !important;
}

/* En-tête */
.nsl-popup-header {
    display: flex;
    align-items: center; /* Centre le logo et le texte verticalement */
    justify-content: flex-start !important; /* Force le flux à gauche */
    margin-bottom: 16px;
    padding-right: 32px;
}

/* Logo */
.nsl-popup-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 50%;
    margin-right: 12px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/* Textes Infos (Titre et Adresse) */
.nsl-popup-info {
    flex: 1 1 auto !important; /* Prend tout l'espace restant */
    display: flex !important;
    flex-direction: column !important; 
    justify-content: center !important;
    align-items: flex-start !important; /* Pousse les enfants (titre/adresse) à gauche */
    text-align: left !important; 
    width: 100% !important;
}

.nsl-popup-info .nsl-popup-title,
.nsl-popup-info .nsl-popup-address {
    width: 100% !important;
    text-align: left !important;
    display: block !important;
}

.nsl-popup-title {
    font-family: 'Poppins', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    margin: 0 0 4px 0 !important; 
    line-height: 1.3 !important;
}

.nsl-popup-address {
    font-family: 'Poppins', sans-serif !important;
    font-size: 13px !important;
    color: #475569 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

.nsl-popup-image {
    width: 100%;
    height: auto; /* Important : on laisse la hauteur s'adapter au ratio */
    aspect-ratio: 16 / 9; /* Force le format 16/9 exact */
    object-fit: cover; /* Coupe l'image proprement si elle n'est pas nativement en 16/9 */
    border-radius: 12px !important; /* Bords arrondis (tu peux monter à 16px si tu veux plus rond) */
    margin-bottom: 16px;
    background-color: #f1f5f9;
}

/* Boutons d'action */
.nsl-popup-actions {
    display: flex;
    gap: 12px;
}

.nsl-popup-btn {
    font-family: 'Poppins', sans-serif !important;
    flex: 1;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.2s ease-in-out;
}

.nsl-popup-btn:hover {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

/* ==========================================================================
   NOUVEAU HEADER GLOBAL DE LA POP-UP (VILLE + COMPTEUR HUB)
   ========================================================================== */
.nsl-popup-main-header {
    padding: 16px 32px 0 16px; /* Espace à droite pour ne pas toucher la croix */
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
}

.nsl-popup-city-badge {
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    background-color: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
}

.nsl-popup-hub-count {
    font-family: 'Poppins', sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   AJUSTEMENT DU TITRE DE LA CONCESSION (Sans l'adresse)
   ========================================================================== */
.nsl-popup-header {
    display: flex;
    align-items: center; /* Centre le logo et le titre verticalement */
    margin-bottom: 16px;
}

.nsl-popup-info {
    flex-grow: 1;
    display: flex;
    align-items: center; /* S'assure que le titre est bien centré à côté du logo */
}

.nsl-popup-title {
    font-family: 'Poppins', sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    margin: 0 !important; /* On supprime la marge du bas car il n'y a plus l'adresse */
    line-height: 1.3 !important;
}

.nsl-popup-container {
    padding: 16px;
    position: relative;
}

/* ==========================================================================
   NOUVEAU DESIGN HUB : EN-TÊTE ET GRILLE (DESIGN MINIMALISTE ET ÉPURÉ)
   ========================================================================== */

/* --- EN-TÊTE --- */
.nsl-hub-minimal-header {
    padding: 24px 44px 20px 24px; /* 44px à droite pour éviter la croix de fermeture */
    border-bottom: 1px solid #f1f5f9; /* Trait de séparation très discret */
    background-color: #ffffff;
}

.nsl-hub-header-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.nsl-hub-icon {
    color: #64748b; /* Gris neutre pour les icônes */
    flex-shrink: 0;
    margin-top: 2px; /* Aligne visuellement l'icône avec la première ligne du texte */
}

.nsl-hub-address {
    font-family: 'Poppins', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #0f172a !important; /* Texte foncé pour lisibilité */
    line-height: 1.4 !important;
}

.nsl-hub-count {
    font-family: 'Poppins', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #64748b !important; /* Gris moyen pour la donnée secondaire */
}

/* --- GRILLE DES LOGOS --- */
.nsl-hub-minimal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px; /* Espace respirant entre les logos */
    padding: 24px;
    background-color: #ffffff;
}

/* Base du logo : Totalement invisible, on ne voit que l'image */
.nsl-hub-logo-item {
    background-color: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 8px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    cursor: pointer;
    box-shadow: none !important;
    transform: none !important;
    transition: all 0.2s ease !important;
}

/* Survol : Apparition subtile d'un fond gris et d'une très fine bordure */
.nsl-hub-logo-item:hover {
    background-color: #f8fafc !important; 
    border-color: #e2e8f0 !important; 
}

.nsl-hub-logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply; /* Astuce CSS pro : rend transparents les fonds blancs imparfaits des logos JPEG/PNG */
}

/* ==========================================================================
   BOUTON DE RETOUR AU HUB (Pilule moderne)
   ========================================================================== */
.nsl-back-to-hub-btn {
    background-color: #f8fafc !important; /* Fond gris très clair */
    border: 1px solid #e2e8f0 !important; /* Bordure très douce */
    border-radius: 12px !important; /* Format pilule moderne */
    color: #475569 !important; /* Gris ardoise élégant */
    font-family: 'Poppins', sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    padding: 6px 14px !important;
    margin-bottom: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Effet au survol */
.nsl-back-to-hub-btn:hover {
    background-color: #f1f5f9 !important; /* Fond légèrement plus foncé */
    color: #0f172a !important; /* Texte plus contrasté */
    border-color: #cbd5e1 !important;
    text-decoration: none !important; /* Empêche le soulignement */
}

/* ==========================================================================
   BADGE ROUGE "NOTIFICATION" POUR LES MARQUEURS HUB SUR LA CARTE
   ========================================================================== */
.nsl-hub-label-badge {
    background-color: #e11d48 !important; /* Beau rouge vif type notification */
    color: #ffffff !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    
    /* Dimensions pour faire un rond parfait */
    width: 22px !important;
    height: 22px !important;
    line-height: 18px !important; /* Hauteur - bordures pour centrer le texte */
    text-align: center !important;
    border-radius: 50% !important;
    
    /* Bordure blanche pour bien détacher la pastille du pin bleu */
    border: 2px solid #ffffff !important; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
    
    /* DÉCALAGE MAGIQUE : pousse le badge en haut à droite du marqueur */
    transform: translate(14px, -18px) !important; 
}