/* ===== STYLES MODERNES POUR L'APPLICATION SIG ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    overflow: hidden;
}

/* ===== NAVIGATION BAR ===== */
.navbar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-brand {
    color: white;
    font-size: 18px;
    font-weight: 600;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar-brand i {
    font-size: 24px;
}

.nav-menu {
    display: flex;
    gap: 0;
    align-items: center;
    flex: 1;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 20px 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
    border-bottom: 3px solid transparent;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-bottom-color: #00d4ff;
}

.nav-link i {
    font-size: 16px;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 5px 0;
    display: none;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block;
}

.dropdown-item {
    color: #333;
    padding: 10px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    background-color: #f0f0f0;
    border-left-color: #2a5298;
    padding-left: 25px;
}

.nav-right {
    display: flex;
    gap: 15px;
    padding-right: 20px;
    margin-left: auto;
}

.nav-icon-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    padding: 20px 10px;
}

.nav-icon-btn:hover {
    transform: scale(1.1);
    color: #00d4ff;
}

/* ===== MAIN LAYOUT ===== */
.container {
    display: flex;
    height: calc(100vh - 60px);
    margin-top: 60px;
    position: relative;
}

/* ===== LEFT PANEL (LAYERS & CONTROLS) ===== */
.left-panel {
    width: 300px;
    background: white;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.left-panel.panel-collapsed {
    transform: translateX(-100%);
    width: 0;
}

.panel-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.panel-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.panel-close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

.panel-close-btn:hover {
    transform: rotate(90deg);
}

.panel-section {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.panel-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: #1e3c72;
    padding: 10px 0 8px 0;
    text-transform: uppercase;
    border-bottom: 2px solid #e0e0e0;
}

.layer-item {
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
    font-size: 13px;
}

.layer-item:hover {
    background-color: #f5f5f5;
}

.layer-item input[type="checkbox"] {
    cursor: pointer;
}

/* ===== RIGHT PANEL (BASEMAPS & LEGEND) ===== */
.right-panel {
    width: 280px;
    background: white;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.right-panel.panel-collapsed {
    transform: translateX(100%);
    width: 0;
}

/* ===== MAP CONTAINER ===== */
.map-container {
    flex: 1;
    position: relative;
    background: #e0e0e0;
}

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

/* ===== BOTTOM INFO BAR ===== */
.info-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.7));
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 99;
    font-size: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    height: 40px;
}

.coordinates-display {
    display: flex;
    gap: 20px;
    align-items: center;
}

.coord-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.coord-label {
    font-weight: 600;
    color: #00d4ff;
}

.scale-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.scale-label {
    font-weight: 600;
    color: #00d4ff;
}

/* ===== MINI MAP ===== */
.minimap-container {
    position: absolute;
    bottom: 40px;
    right: 15px;
    width: 150px;
    height: 150px;
    background: white;
    border: 2px solid #ccc;
    border-radius: 4px;
    z-index: 98;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#minimap {
    width: 100%;
    height: 100%;
    border-radius: 2px;
}

/* ===== SIDE TOGGLE BUTTONS ===== */
.toggle-btn {
    position: absolute;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 18px;
    z-index: 99;
}

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

.toggle-left-btn {
    left: 5px;
    top: 70px;
}

.toggle-right-btn {
    right: 5px;
    top: 70px;
}

/* ===== MODAL DIALOGS ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.3);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* ===== SEARCH BAR ===== */
.search-bar {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 4px;
    padding: 8px 12px;
    gap: 8px;
    flex: 0 0 300px;
}

.search-bar input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 14px;
}

.search-bar button {
    background: none;
    border: none;
    color: #2a5298;
    cursor: pointer;
    font-size: 16px;
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {

    .left-panel,
    .right-panel {
        position: fixed;
        height: calc(100vh - 100px);
        z-index: 200;
    }

    .left-panel {
        left: 0;
        top: 60px;
    }

    .right-panel {
        right: 0;
        top: 60px;
    }

    .nav-item:not(:first-child) {
        display: none;
    }

    .search-bar {
        flex: 0 0 150px;
    }

    .minimap-container {
        width: 120px;
        height: 120px;
        bottom: 50px;
        right: 10px;
    }
}