/* maps.css — CSS extrait de maps.php (Phase 4) */
/* Styles pour la page Maps */
.maps-container {
    display: flex;
    height: calc(100vh - 80px);
    position: relative;
}

.maps-sidebar {
    width: 400px;
    background: white;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
}

.maps-main {
    flex: 1;
    position: relative;
}

.maps-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: white;
}

.maps-title {
    font-size: 24px;
    font-weight: 700;
    color: #222222;
    margin: 0 0 8px 0;
}

.maps-subtitle {
    font-size: 14px;
    color: #717171;
    margin: 0;
}

/* Marqueur de position utilisateur */
.user-location-marker {
    background: #3b82f6;
    border: 3px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Modal de permission de géolocalisation */
.location-permission-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.location-permission-modal.active {
    display: flex;
}

.location-permission-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.location-permission-icon {
    font-size: 48px;
    color: #3b82f6;
    margin-bottom: 16px;
}

.location-permission-title {
    font-size: 20px;
    font-weight: 700;
    color: #222222;
    margin-bottom: 12px;
}

.location-permission-text {
    color: #717171;
    margin-bottom: 24px;
    line-height: 1.5;
}

.location-permission-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.location-permission-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.location-permission-btn.primary {
    background: #3b82f6;
    color: white;
}

.location-permission-btn.primary:hover {
    background: #2563eb;
}

.location-permission-btn.secondary {
    background: #f3f4f6;
    color: #374151;
}

.location-permission-btn.secondary:hover {
    background: #e5e7eb;
}

.maps-filters {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.maps-filter-title {
    font-size: 16px;
    font-weight: 600;
    color: #222222;
    margin: 0 0 12px 0;
}

.maps-filter-options {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.maps-filter-options::-webkit-scrollbar {
    height: 4px;
}

.maps-filter-options::-webkit-scrollbar-track {
    background: transparent;
}

.maps-filter-options::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.maps-filter-options::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.maps-filter-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
}

.maps-filter-btn:hover {
    background: #e5e7eb;
}

.maps-filter-btn.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
    position: relative;
}

.maps-filter-btn.active::after {
    content: '✓';
    position: absolute;
    top: -2px;
    right: -2px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.maps-filter-btn[data-type="all"].active::after {
    display: none;
}

.maps-filter-btn i {
    font-size: 14px;
}

.maps-list {
    flex: 1;
    overflow-y: auto;
}

.maps-place-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.maps-place-item:hover {
    background: #f9fafb;
    transform: translateX(4px);
}

.maps-place-item.active {
    background: #f0f9ff;
    border-left: 3px solid #6366f1;
}

.maps-place-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.maps-place-name {
    font-size: 16px;
    font-weight: 600;
    color: #222222;
    margin: 0;
}

.maps-place-badge {
    background: #6366f1;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.maps-place-badge.premium {
    background: #fbbf24;
    color: #333;
}

.maps-place-badge.partner {
    background: linear-gradient(135deg, #ff385c, #7c3aed);
    color: #fff;
}

.maps-place-item.partner {
    border-left: 3px solid #ff385c;
    background: linear-gradient(90deg, rgba(255, 56, 92, 0.06), transparent);
}

.popup-content.partner {
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, #ff385c, #7c3aed) 1;
}

.popup-badge.partner {
    background: linear-gradient(135deg, #ff385c, #7c3aed);
    color: #fff;
}

.custom-marker.partner {
    background: linear-gradient(135deg, #ff385c, #7c3aed) !important;
    border-color: #fff !important;
    box-shadow: 0 4px 14px rgba(255, 56, 92, 0.45) !important;
}

.custom-marker.partner i {
    color: #fff !important;
}

.maps-place-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #717171;
    margin-bottom: 8px;
}

.maps-place-location i {
    color: #6366f1;
}

.maps-place-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #717171;
}

.maps-place-type {
    background: #f3f4f6;
    color: #374151;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.maps-place-stats {
    display: flex;
    gap: 12px;
}

.maps-place-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.maps-place-stat i {
    color: #6366f1;
}

/* Map Container */
.maps-map-container {
    width: 100%;
    height: 100%;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

/* Pins personnalisés */
.custom-marker {
    width: 40px;
    height: 40px;
    background: white;
    border: 3px solid #6366f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    cursor: pointer;
}

.custom-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.custom-marker.premium {
    border-color: #fbbf24;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.custom-marker i {
    color: #6366f1;
    font-size: 16px;
}

.custom-marker.premium i {
    color: white;
}

/* Types de pins */
.custom-marker.club i { color: #dc2626; }
.custom-marker.hotel i { color: #059669; }
.custom-marker.bar i { color: #7c3aed; }
.custom-marker.parking i { color: #ea580c; }
.custom-marker.foret i { color: #16a34a; }
.custom-marker.parc i { color: #0891b2; }
.custom-marker.plage i { color: #0ea5e9; }

.custom-marker.premium.club i { color: white; }
.custom-marker.premium.hotel i { color: white; }
.custom-marker.premium.bar i { color: white; }
.custom-marker.premium.parking i { color: white; }
.custom-marker.premium.foret i { color: white; }
.custom-marker.premium.parc i { color: white; }
.custom-marker.premium.plage i { color: white; }

/* Popup personnalisé */
.custom-popup {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: none;
    max-width: 300px;
    z-index: 600;
}

.popup-content {
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #222222 !important;
    background: white !important;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.popup-title {
    font-size: 16px;
    font-weight: 600;
    color: #222222 !important;
    margin: 0;
    line-height: 1.3;
}

.popup-badge {
    background: #6366f1;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.popup-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #717171 !important;
    margin-bottom: 12px;
}

.popup-location i {
    color: #6366f1;
}

.popup-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.popup-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #717171 !important;
}

.popup-stat i {
    color: #6366f1;
}

.popup-type {
    background: #f3f4f6;
    color: #374151 !important;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.popup-actions {
    display: flex;
    justify-content: center;
}

.popup-btn-voir {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white !important;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
    border: none;
    cursor: pointer;
}

.popup-btn-voir:hover {
    background: linear-gradient(135deg, #5b21b6, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    color: white !important;
    text-decoration: none;
}

.popup-btn-voir:visited {
    color: white !important;
}

.popup-btn-voir:active {
    color: white !important;
}

/* Popup premium avec texte visible */
.popup-content.premium {
    background: linear-gradient(135deg, #fff8dc, #fffacd) !important;
    border-left: 4px solid #FFD700 !important;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3) !important;
    color: #333 !important;
}

.popup-content.premium .popup-title {
    color: #B8860B !important;
    font-weight: 700;
}

.popup-content.premium .popup-location {
    color: #555 !important;
}

.popup-content.premium .popup-stat {
    color: #555 !important;
}

.popup-content.premium .popup-type {
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    color: #333 !important;
    font-weight: 700;
}

.popup-content.premium .popup-badge.premium {
    background: linear-gradient(135deg, #ffd700, #ffb347, #ff8c00) !important;
    color: #1a1a1a !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3) !important;
    animation: mapsPlacePremiumGlow 2s ease-in-out infinite alternate;
    padding: 6px 10px !important;
    border-radius: 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    backdrop-filter: blur(10px) !important;
}

.popup-content.premium .popup-badge.premium i {
    font-size: 12px !important;
    color: #1a1a1a !important;
    animation: mapsPlaceIconSparkle 1.5s ease-in-out infinite;
}

@keyframes mapsPlaceIconSparkle {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes mapsPlacePremiumGlow {
    0% {
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    }
    100% {
        box-shadow: 0 6px 16px rgba(255, 215, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.2);
    }
}

@keyframes mapsPlacePremiumBorderPulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

/* Styles pour les liens dans la liste */
.maps-place-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.maps-place-link:hover {
    color: #6366f1;
    text-decoration: none;
}

.maps-place-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.maps-btn-voir {
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.maps-btn-voir:hover {
    background: linear-gradient(135deg, #5b21b6, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
    color: white;
    text-decoration: none;
}

/* Boutons mobiles */
.maps-mobile-controls {
    display: none;
    position: absolute;
    top: 90px;
    right: 16px;
    z-index: 500;
    gap: 8px;
}

.maps-mobile-btn {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    z-index: 501;
}

.maps-mobile-btn:hover {
    background: #f9fafb;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.maps-mobile-btn i {
    color: #6366f1;
    font-size: 18px;
}

/* Boutons desktop */
.maps-desktop-controls {
    display: block;
    position: absolute;
    top: 80px;
    right: 20px;
    z-index: 500;
}

.maps-desktop-btn {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    z-index: 501;
}

.maps-desktop-btn:hover {
    background: #f9fafb;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.maps-desktop-btn i {
    color: #6366f1;
    font-size: 16px;
}

/* Modal mobile */
.maps-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.maps-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.maps-modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 24px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 10001;
}

.maps-modal.active .maps-modal-content {
    transform: translateY(0);
}

.maps-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.maps-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #222222;
    margin: 0;
}

.maps-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #717171;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.maps-modal-close:hover {
    background: #f3f4f6;
}

.maps-modal-search {
    margin-bottom: 20px;
}

.maps-modal-search #globalSearchContainer.global-search-container,
#mapsModal #globalSearchContainer.global-search-container {
    /* Dans le template search-bar.php, margin-top:-3rem remonte la barre
       (OK sur pages classiques) mais casse le layout du modal maps. */
    margin-top: 0 !important;
    margin-bottom: 16px !important;
    max-width: 100% !important;
}

#mapsModal .global-search-wrapper {
    /* Garder une hauteur stable dans le modal */
    min-height: 44px;
}

.maps-modal-filters {
    margin-bottom: 20px;
}

.maps-modal-list {
    max-height: 300px;
    overflow-y: auto;
}

/* S'assurer que la navigation mobile reste au-dessus */
.mobile-nav {
    z-index: 999 !important;
}

/* Masquer la navigation mobile sur desktop */
@media (min-width: 769px) {
    .mobile-nav {
        display: none !important;
    }
}

/* Masquer le footer desktop sur mobile pour éviter les conflits */
@media (max-width: 768px) {
    .footer-desktop {
        display: none !important;
    }
}

/* Masquer l'attribution OpenStreetMap sur mobile */
@media (max-width: 768px) {
    .leaflet-control-attribution {
        display: none !important;
    }
}

/* Corriger le z-index des contrôles de zoom pour qu'ils ne passent pas par-dessus le header */
.leaflet-control-zoom {
    z-index: 100 !important;
}

/* Sur desktop, les contrôles de zoom doivent être sous la navbar */
@media (min-width: 768px) {
    .leaflet-control-zoom {
        z-index: 50 !important;
        top: 80px !important;
    }
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    z-index: 100 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .maps-container {
        flex-direction: column;
        height: calc(100vh - 60px);
    }
    
    .maps-sidebar {
        display: none;
    }
    
    .maps-main {
        width: 100%;
        height: 100%;
    }
    
    .maps-mobile-controls {
        display: flex;
        top: 20px;
    }
    
    .maps-desktop-controls {
        display: none;
    }
    
    .maps-modal {
        display: block;
    }
    
    /* Afficher la navigation mobile seulement sur mobile */
    .mobile-nav {
        display: block !important;
    }
    
    /* Amélioration des popups sur mobile */
    .custom-popup {
        max-width: 280px;
        z-index: 600;
    }
    
    .popup-content {
        padding: 12px;
    }
    
    .popup-title {
        font-size: 14px;
    }
    
    .popup-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .popup-stat {
        font-size: 12px;
    }
    
    /* Amélioration de la barre de recherche sur mobile */
    .maps-search .global-search-container {
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    .maps-mobile-controls {
        top: 20px;
        right: 12px;
        gap: 6px;
    }
    
    .maps-mobile-btn {
        width: 36px;
        height: 36px;
        padding: 8px;
        font-size: 14px;
    }
}
    
    .maps-modal-content {
        padding: 20px;
    }
    
    .maps-place-item {
        padding: 12px 16px;
    }
    
    .maps-place-name {
        font-size: 14px;
    }
    
    /* Amélioration de la barre de recherche sur très petits écrans */
    .maps-search .global-search-container {
        max-width: 90%;
    }
}

/* Modal de localisation obligatoire */
#locationRequiredModal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.8) !important;
    z-index: 999999 !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(4px) !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
}

#locationRequiredModal.active {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* S'assurer qu'aucun conteneur parent n'interfère */
body > #locationRequiredModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Forcer le modal à être au-dessus de tout */
#locationRequiredModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: none !important;
}

#locationRequiredModal.active {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#locationRequiredModal .location-required-content {
    background: white !important;
    border-radius: 20px !important;
    padding: 2rem !important;
    max-width: 500px !important;
    width: 90% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
    text-align: center !important;
    animation: modalSlideIn 0.3s ease-out !important;
    z-index: 1000000 !important;
    position: relative !important;
    margin: auto !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
}

.location-required-header {
    margin-bottom: 2rem;
}

.location-required-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.location-required-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.location-required-header p {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.location-required-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.location-option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.location-option-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.location-option-btn.primary:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.location-divider {
    display: flex;
    align-items: center;
    margin: 1rem 0;
}

.location-divider::before,
.location-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.location-divider span {
    padding: 0 1rem;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

.location-search-section {
    text-align: left;
    position: relative;
}

.location-search-section label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.location-search-box {
    display: flex;
    align-items: stretch;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.location-search-box:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#locationCityInput {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #1f2937;
    outline: none;
    font-weight: 500;
}

#locationCityInput::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.location-search-btn {
    padding: 0.875rem 1rem;
    border: none;
    background: #3b82f6;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
}

.location-search-btn:hover {
    background: #2563eb;
}

.location-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.location-suggestions.active {
    display: block;
}

.location-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.location-suggestion-item:hover {
    background: #f9fafb;
}

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

.location-suggestion-icon {
    color: #3b82f6;
    font-size: 16px;
}

.location-suggestion-text {
    flex: 1;
}

.location-suggestion-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
}

.location-suggestion-details {
    font-size: 12px;
    color: #6b7280;
}

/* Responsive pour le modal */
@media (max-width: 768px) {
    .location-required-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .location-required-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .location-required-header h2 {
        font-size: 1.25rem;
    }
    
    .location-option-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Masquer le modal sur desktop */
@media (min-width: 769px) {
    .maps-modal {
        display: none !important;
    }
    
    /* S'assurer que les contrôles desktop sont visibles */
    .maps-desktop-controls {
        display: block !important;
    }
    
    /* Masquer les contrôles mobile sur desktop */
    .maps-mobile-controls {
        display: none !important;
    }
    
    /* Réduire la taille de la barre de recherche sur desktop pour maps */
    .maps-search .global-search-container {
        max-width: 320px;
    }
    
    /* Modal spécifique pour maps.php avec z-index ultra élevé */
    .maps-location-modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0, 0, 0, 0.8) !important;
        backdrop-filter: blur(12px) !important;
        display: none !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 999999 !important;
        padding: 1rem !important;
    }
    
    .maps-location-modal.active {
        display: flex !important;
    }
    
    .maps-location-modal-content {
        background: linear-gradient(145deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%) !important;
        border-radius: 28px !important;
        padding: 3rem 2.5rem !important;
        max-width: 460px !important;
        width: 100% !important;
        text-align: center !important;
        box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.3) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        position: relative !important;
        z-index: 1000000 !important;
    }
    
    .maps-location-modal-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 2.5rem !important;
        position: relative !important;
        z-index: 1000001 !important;
    }
    
    .maps-location-modal-header h3 {
        font-size: 1.75rem !important;
        font-weight: 800 !important;
        margin: 0 !important;
        color: #1f2937 !important;
    }
    
    .maps-location-modal-close {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%) !important;
        border: 1px solid rgba(102, 126, 234, 0.2) !important;
        font-size: 1.25rem !important;
        color: #667eea !important;
        cursor: pointer !important;
        padding: 0.875rem !important;
        border-radius: 16px !important;
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        backdrop-filter: blur(10px) !important;
    }
    
    .maps-location-modal-body {
        position: relative !important;
        margin-bottom: 2.5rem !important;
        z-index: 1000001 !important;
    }
    
    .maps-location-modal-body::before {
        content: '📍' !important;
        font-size: 4rem !important;
        display: block !important;
        margin-bottom: 2rem !important;
        animation: locationPulse 3s ease-in-out infinite !important;
    }
    
    .maps-location-modal-body h4 {
        font-size: 1.5rem !important;
        font-weight: 700 !important;
        color: #1f2937 !important;
        margin-bottom: 1.25rem !important;
        line-height: 1.3 !important;
    }
    
    .maps-location-modal-body p {
        color: #6b7280 !important;
        line-height: 1.8 !important;
        margin-bottom: 0 !important;
        font-size: 1rem !important;
        font-weight: 500 !important;
        max-width: 320px !important;
        margin: 0 auto !important;
    }
    
    .maps-location-modal-footer {
        display: flex !important;
        gap: 1.25rem !important;
        justify-content: center !important;
        margin-top: 2.5rem !important;
        z-index: 1000001 !important;
        position: relative !important;
    }
    
    .maps-location-btn-cancel,
    .maps-location-btn-activate {
        padding: 1rem 2.25rem !important;
        border: none !important;
        border-radius: 16px !important;
        font-weight: 600 !important;
        font-size: 1rem !important;
        cursor: pointer !important;
        min-width: 140px !important;
        position: relative !important;
        overflow: hidden !important;
        backdrop-filter: blur(10px) !important;
    }
    
    .maps-location-btn-cancel {
        background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%) !important;
        color: #374151 !important;
        border: 2px solid rgba(107, 114, 128, 0.2) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }
    
    .maps-location-btn-activate {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        color: white !important;
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
        border: 2px solid rgba(102, 126, 234, 0.3) !important;
    }
    

}

.maps-place-item.premium {
    background: linear-gradient(135deg, #fff8dc, #fffacd);
    border-left: 4px solid #FFD700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
    position: relative;
}

.maps-place-item.premium::before {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 16px;
    color: #FFD700;
}

.maps-place-item.premium:hover {
    background: linear-gradient(135deg, #fffacd, #fff8dc);
    transform: translateX(4px) scale(1.02);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.maps-place-item.premium .maps-place-name {
    color: #B8860B;
    font-weight: 700;
}

.maps-place-item.premium .maps-place-badge.premium {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

/* Popup premium */
.popup-content.premium {
    background: linear-gradient(135deg, #fff8dc, #fffacd) !important;
    border-left: 4px solid #FFD700 !important;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3) !important;
}

.popup-content.premium .popup-badge.premium {
    background: linear-gradient(135deg, #ffd700, #ffb347, #ff8c00) !important;
    color: #1a1a1a !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3) !important;
    animation: mapsPlacePremiumGlow 2s ease-in-out infinite alternate;
    padding: 6px 10px !important;
    border-radius: 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    backdrop-filter: blur(10px) !important;
}

.popup-content.premium .popup-badge.premium i {
    font-size: 12px !important;
    color: #1a1a1a !important;
    animation: mapsPlaceIconSparkle 1.5s ease-in-out infinite;
}

@keyframes mapsPlaceIconSparkle {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Marqueurs premium avec styles forcés */
.custom-marker.premium {
    background: #FFD700 !important;
    border: 3px solid #FFA500 !important;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4) !important;
    transform: scale(1.1) !important;
    animation: premiumPulse 2s ease-in-out infinite;
}

.custom-marker.premium i {
    color: #B8860B !important;
    font-size: 18px !important;
}

/* S'assurer que les styles premium sont appliqués */
.custom-marker-container .custom-marker.premium {
    background: #FFD700 !important;
    border: 3px solid #FFA500 !important;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4) !important;
    transform: scale(1.1) !important;
}

.custom-marker-container .custom-marker.premium i {
    color: #B8860B !important;
    font-size: 18px !important;
}

@keyframes premiumPulse {
    0% {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 6px 16px rgba(255, 215, 0, 0.6);
    }
    100% {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    }
}

/* Styles pour la barre de recherche dans maps */
.maps-search {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

/* Responsive pour la barre de recherche */
@media (max-width: 768px) {
    .maps-search {
        padding: 16px;
    }
}

/* Badge Premium harmonisé pour la liste maps - Même design que lieux.php */
.maps-place-badge.premium {
    background: linear-gradient(135deg, #ffd700, #ffb347, #ff8c00);
    color: #1a1a1a;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: mapsPlacePremiumGlow 2s ease-in-out infinite alternate;
    backdrop-filter: blur(10px);
}

.maps-place-badge.premium::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ffd700, #ffb347, #ff8c00, #ffd700);
    border-radius: 22px;
    z-index: -1;
    opacity: 0.7;
    animation: mapsPlacePremiumBorderPulse 3s ease-in-out infinite;
}

/* Animations spécifiques pour maps */
@keyframes mapsPlacePremiumGlow {
    0% {
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    }
    100% {
        box-shadow: 0 6px 16px rgba(255, 215, 0, 0.5), 0 0 20px rgba(255, 215, 0, 0.2);
    }
}

@keyframes mapsPlacePremiumBorderPulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}



/* Responsive pour le badge premium */
@media (max-width: 768px) {
    .maps-place-badge.premium {
        padding: 4px 8px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .maps-place-badge.premium {
        padding: 3px 6px;
        font-size: 9px;
    }
}
