/* Header et Navigation - Style de la page d'accueil */


/* Styles ultra-modernes pour la page carte interactive */
.carte-main {
    padding-top: 45px; /* Compensation pour le header fixe */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Section Hero améliorée */
.carte-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 50%, #667eea 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.carte-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="map-pattern" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="2" fill="white" opacity="0.1"/><path d="M10 10 L40 40 M40 10 L10 40" stroke="white" stroke-width="0.5" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23map-pattern)"/></svg>');
    opacity: 0.3;
}

.carte-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: slideInDown 1s ease-out;
    position: relative;
    z-index: 2;
}

.carte-hero p {
    font-size: 1.3rem;
    opacity: 0.95;
    animation: slideInUp 1s ease-out 0.3s both;
    position: relative;
    z-index: 2;
}

/* Container principal amélioré */
.carte-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 2rem 2.5rem;
    max-width: 1800px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* Sidebar ultra-moderne */
.map-sidebar {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 
        0 15px 30px rgba(0,0,0,0.1),
        0 0 0 1px rgba(255,255,255,0.8) inset;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.map-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), #667eea);
    border-radius: 25px 25px 0 0;
}

/* Barre de recherche moderne */
.search-box {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.search-box input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 0.95rem;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.1);
}

.search-box .search-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(78, 115, 223, 0.3);
}

.search-box .search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 115, 223, 0.4);
}

/* Sections de filtres améliorées */
.map-filters, .map-legend, .map-stats {
    margin-bottom: 1.5rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(233, 236, 239, 0.5);
    position: relative;
}

.map-filters::after, .map-legend::after, .map-stats::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(78, 115, 223, 0.3), transparent);
}

.map-filters h3, .map-legend h3, .map-stats h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.map-filters h3 i, .map-legend h3 i, .map-stats h3 i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.filter-category {
    margin-bottom: 1.2rem;
}

.filter-category h4 {
    margin-bottom: 0.6rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Checkboxes modernes */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    cursor: pointer;
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: rgba(248, 249, 250, 0.8);
    border: 1px solid transparent;
}

.checkbox-container:hover {
    background: rgba(78, 115, 223, 0.05);
    border-color: rgba(78, 115, 223, 0.2);
    transform: translateX(3px);
}

.checkbox-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-container i {
    color: var(--primary-color);
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
}

.checkbox-container .count {
    margin-left: auto;
    background: var(--primary-color);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Grille de checkboxes */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.6rem;
}

/* Grille de secteurs d'activité */
.sector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.6rem;
}

.sector-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(248, 249, 250, 0.8);
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
}

.sector-checkbox:hover {
    background: rgba(78, 115, 223, 0.05);
    border-color: rgba(78, 115, 223, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(78, 115, 223, 0.1);
}

.sector-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.sector-checkbox i {
    color: var(--primary-color);
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.sector-checkbox span {
    flex: 1;
    color: var(--text-primary);
}

/* Légende améliorée */
.legend-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.6rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(248, 249, 250, 0.8);
}

.legend-item:hover {
    background: rgba(78, 115, 223, 0.05);
    transform: translateY(-1px);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border: 2px solid white;
}

.legend-text {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.85rem;
}

/* Statistiques modernes */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.stat-item {
    background: linear-gradient(135deg, rgba(78, 115, 223, 0.1), rgba(102, 126, 234, 0.1));
    padding: 0.8rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(78, 115, 223, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(78, 115, 223, 0.2);
}

.stat-number {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Wrapper de la carte */
.map-wrapper {
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.1),
        0 0 0 1px rgba(255,255,255,0.8) inset;
    background: white;
    flex: 1;
    min-height: 600px;
}

#map {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border-radius: 25px;
}

/* Contrôles de la carte */
.map-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    z-index: 1000;
}

.control-btn {
    width: 45px;
    height: 50px;
    background: linear-gradient(135deg, white, #f8f9fa);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 115, 223, 0.3);
}

/* Popup de la carte amélioré */
.leaflet-popup-content-wrapper {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.8);
}

.leaflet-popup-content {
    margin: 1rem;
    font-family: 'Poppins', sans-serif;
    color: var(--text-primary);
}

.leaflet-popup-tip-container {
    display: none;
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive design */
@media (max-width: 1200px) {
    .carte-container {
        padding: 0 1.5rem 2rem;
    }
    
    .map-sidebar {
        padding: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .carte-container {
        gap: 1.5rem;
    }
    
    .map-sidebar {
        padding: 1.5rem;
    }
    
    .map-wrapper {
        min-height: 500px;
    }
}

@media (max-width: 768px) {
    .carte-hero h1 {
        font-size: 2.5rem;
    }
    
    .carte-hero p {
        font-size: 1.1rem;
    }
    
    .carte-container {
        padding: 0 1rem 2rem;
    }
    
    .map-sidebar {
        padding: 1.5rem;
        border-radius: 20px;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .sector-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .legend-items {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .map-wrapper {
        min-height: 400px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .carte-hero {
        padding: 3rem 1rem;
    }
    
    .carte-hero h1 {
        font-size: 2rem;
    }
    
    .map-sidebar {
        padding: 1rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box .search-btn {
        width: 100%;
    }
    
    .sector-grid {
        grid-template-columns: 1fr;
    }
    
    .legend-items {
        grid-template-columns: 1fr;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
}