/* Reset et variables CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Couleurs principales */
    --primary-bg: #1a1a1a;
    --secondary-bg: #2d2d2d;
    --tertiary-bg: #3a3a3a;
    /* --accent-green: #00b894; */
    --accent-green: #c96e0c;
    --accent-green-hover: #00a085;
    
    /* Couleurs de texte */
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    
    /* Couleurs de bordure */
    --border-color: #404040;
    --border-light: #555555;
    
    /* Couleurs des marqueurs */
    --marker-red: #e74c3c;
    --marker-orange: #f39c12;
    --marker-blue: #3498db;
    --marker-purple: #9b59b6;
    --marker-green: #27ae60;
    
    /* Couleurs des compteurs */
    --count-purple: #9b59b6;
    --count-green: #27ae60;
    --count-red: #e74c3c;
    --count-orange: #f39c12;
    --count-blue: #3498db;
}

.goog-te-combo {
    /* width: 16rem !important; */
    padding: 0.5rem 1rem !important;
    background-color: var(--tertiary-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 0.375rem !important;
    color: var(--text-primary) !important;
    font-size: 0.875rem !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header */
.main-header {
    background-color: var(--secondary-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    background-color: var(--accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.logo-text {
    color: var(--accent-green);
    font-weight: 600;
    font-size: 1.125rem;
}

.search-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 16rem;
    padding: 0.5rem 1rem;
    background-color: var(--tertiary-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-green);
}

.search-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
}

.search-action-btn {
    background-color: #3498db;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-action-btn:hover {
    background-color: #2980b9;
}

.contact-section {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    height: calc(100vh - 80px);
}

/* Left Sidebar */
.sidebar-left {
    width: 20rem;
    background-color: var(--secondary-bg);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    overflow-y: auto;
}

/* View Tabs */
.view-tabs {
    display: flex;
    background-color: var(--tertiary-bg);
    border-radius: 0.5rem;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    border-radius: 0.375rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background-color: var(--accent-green);
    color: white;
}

.tab-btn:hover:not(.active) {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.tab-count {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

.tab-btn.active .tab-count {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Filters Section */
.filters-section {
    margin-bottom: 1.5rem;
}

.section-title {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.filter-header label {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-count {
    background-color: var(--count-purple);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.filter-group:nth-child(3) .filter-count {
    background-color: var(--count-green);
}

.filter-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: var(--tertiary-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-green);
}

.filter-select option {
    background-color: var(--tertiary-bg);
    color: var(--text-primary);
}

/* Indicators Section */
.indicators-section {
    margin-bottom: 1.5rem;
}

.indicator-main {
    background-color: var(--tertiary-bg);
    border-left: 4px solid var(--accent-green);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.indicator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.indicator-header span:first-child {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.indicator-count {
    background-color: var(--count-red);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.sub-indicators {
    margin-left: 1rem;
}

.sub-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 0.375rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.sub-indicator:hover {
    background-color: var(--tertiary-bg);
    color: var(--text-primary);
}

.sub-count {
    background-color: var(--border-color);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Map Container */
.map-container {
    flex: 1;
    position: relative;
    background-color: var(--primary-bg);
}

.map-area {
    width: 100%;
    height: 100%;
    position: relative;
    margin: 1rem;
    margin-right: 0;
}

.nigeria-map {
    width: calc(100% - 1rem);
    height: calc(100% - 1rem);
    background: linear-gradient(135deg, #f4f1de 0%, #e9c46a 50%, #f4a261 100%);
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
}

.building-query {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.3);
    letter-spacing: 0.1em;
}

/* Map Markers */
.map-marker {
    position: absolute;
    width: 3rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: transform 0.2s;
    z-index: 10;
}

.map-marker:hover {
    transform: scale(1.1);
}

.marker-red { background-color: var(--marker-red); }
.marker-orange { background-color: var(--marker-orange); }
.marker-blue { background-color: var(--marker-blue); }
.marker-purple { background-color: var(--marker-purple); }
.marker-green { background-color: var(--marker-green); }

/* Map Controls */
.map-controls {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-btn {
    width: 2.5rem;
    height: 2.5rem;
    background-color: white;
    border: none;
    border-radius: 0.375rem;
    color: var(--primary-bg);
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background-color: #f0f0f0;
}

.download-btn {
    position: absolute;
    bottom: 1.5rem;
    left: 5rem;
    background-color: var(--accent-green);
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-btn:hover {
    background-color: var(--accent-green-hover);
}

/* Right Sidebar */
.sidebar-right {
    width: 20rem;
    background-color: var(--secondary-bg);
    border-left: 1px solid var(--border-color);
    padding: 1.5rem;
    overflow-y: auto;
}

.metrics-header {
    margin-bottom: 1.5rem;
}

.metrics-header h2 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.metrics-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
}

.metrics-title i {
    color: var(--accent-green);
}

/* Metrics Cards */
.metrics-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.metric-card {
    background-color: var(--tertiary-bg);
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metric-content {
    flex: 1;
}

.metric-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-green);
    margin-bottom: 0.25rem;
}

.metric-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.3;
}

.metric-chart {
    margin-left: 1rem;
}

/* Progress Ring */
.progress-ring {
    position: relative;
    width: 60px;
    height: 60px;
}

.progress-svg {
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 4;
}

.progress-fill {
    fill: none;
    stroke: var(--accent-green);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
    animation: progress-animation 2s ease-out forwards;
}

@keyframes progress-animation {
    to {
        stroke-dashoffset: calc(157 - (157 * var(--progress)) / 100);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sidebar-left,
    .sidebar-right {
        width: 18rem;
    }
    
    .search-input {
        width: 12rem;
    }
}

@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar-left,
    .sidebar-right {
        width: 100%;
        height: auto;
    }
    
    .map-container {
        height: 400px;
        order: 2;
    }
    
    .sidebar-right {
        order: 3;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .search-section {
        justify-content: center;
    }
    
    .contact-section {
        text-align: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.metric-card {
    animation: fadeIn 0.6s ease-out forwards;
}

.metric-card:nth-child(1) { animation-delay: 0.1s; }
.metric-card:nth-child(2) { animation-delay: 0.2s; }
.metric-card:nth-child(3) { animation-delay: 0.3s; }
.metric-card:nth-child(4) { animation-delay: 0.4s; }

/* Hover Effects */
.map-marker::after {
    content: attr(data-value);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.map-marker:hover::after {
    opacity: 1;
}

