/* RhinoMapToolbox Styles */

/* Color Palette */
:root {
    --rhino-dark: #40403F;
    --rhino-red: #F2441D;
    --rhino-red-light: #F27457;
    --rhino-red-pale: #F29F8D;
    --rhino-light: #F2F2F2;
    --rhino-darker: #2a2a29;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--rhino-darker);
    color: var(--rhino-light);
    overflow: hidden;
}

/* Custom Select Dropdowns */
.custom-select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-select {
    position: relative;
    background: rgba(45, 55, 72, 0.8);
    border: 1px solid rgba(74, 85, 104, 0.5);
    border-radius: 6px;
    color: #e2e8f0;
    padding: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    min-width: 70px;
}

.custom-select:hover {
    background: rgba(45, 55, 72, 0.95);
    border-color: rgba(103, 126, 234, 0.5);
}

.custom-select:focus {
    outline: none;
    border-color: rgba(103, 126, 234, 0.8);
    box-shadow: 0 0 0 3px rgba(103, 126, 234, 0.1);
}

.custom-select-selected {
    padding-right: 2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-arrow {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.2s ease;
    color: #e2e8f0;
    display: flex;
    align-items: center;
}

.custom-select.open .custom-select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: rgba(26, 32, 44, 0.98);
    border: 1px solid rgba(103, 126, 234, 0.5);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.custom-select.open .custom-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    padding: 0.6rem 0.75rem;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background: rgba(103, 126, 234, 0.2);
    color: #ffffff;
}

.custom-select-option.selected {
    background: rgba(103, 126, 234, 0.3);
    color: #ffffff;
    font-weight: 500;
}

.custom-select-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.custom-select-option.disabled:hover {
    background: transparent;
}

/* Custom scrollbar for dropdown */
.custom-select-dropdown::-webkit-scrollbar {
    width: 8px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background: rgba(103, 126, 234, 0.5);
    border-radius: 4px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(103, 126, 234, 0.7);
}

/* Fallback for native selects (if custom-select.js doesn't load) */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(45, 55, 72, 0.8);
    border: 1px solid rgba(74, 85, 104, 0.5);
    border-radius: 6px;
    color: #e2e8f0;
    padding: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="12" height="8" viewBox="0 0 12 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="%23e2e8f0" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

select:hover {
    background: rgba(45, 55, 72, 0.95);
    border-color: rgba(103, 126, 234, 0.5);
}

select:focus {
    outline: none;
    border-color: rgba(103, 126, 234, 0.8);
    box-shadow: 0 0 0 3px rgba(103, 126, 234, 0.1);
}

select option {
    background: rgba(26, 32, 44, 0.95);
    color: #e2e8f0;
    padding: 0.5rem;
}

.header {
    background: var(--rhino-dark);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
    color: var(--rhino-red);
}

.subtitle {
    font-size: 12px;
    color: #bdc3c7;
    margin-left: 5px;
}

.toolbar {
    display: flex;
    gap: 8px;
    background: var(--rhino-dark);
    padding: 8px;
    border-radius: 8px;
}

.tool-btn {
    background: rgba(242, 244, 241, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--rhino-light);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    min-width: 80px;
}

.tool-label {
    font-size: 10px;
    text-align: center;
    line-height: 1.2;
    opacity: 0.9;
}

.tool-btn:hover {
    background: rgba(242, 68, 29, 0.2);
    border-color: var(--rhino-red-light);
}

.tool-btn.active {
    background: var(--rhino-red);
    border-color: var(--rhino-red-light);
}

.layer-controls {
    display: flex;
    gap: 8px;
}

.layer-btn {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
    color: #2ecc71;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.layer-btn:hover {
    background: #2ecc71;
    color: #fff;
}

.layer-btn.active {
    background: #2ecc71;
    color: #fff;
}

.main-content {
    height: calc(100vh - 64px);
    position: relative;
}

#map {
    height: 100%;
    width: 100%;
    /* Optimisations GPU retirées - causaient un bug où les éléments SVG (cercles, lignes, polygones)
       sautaient dans la direction opposée au moveend à cause d'un conflit avec les transformations Leaflet */
}


.file-btn {
    background: rgba(155, 89, 182, 0.9);
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.file-btn:hover {
    background: #9b59b6;
    transform: translateY(-1px);
}

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

.clear-btn {
    background: rgba(242, 68, 29, 0.9);
}

.clear-btn:hover {
    background: var(--rhino-red);
}

.export-dropdown {
    position: relative;
    display: inline-block;
}

.export-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 5px;
    background: rgba(44, 62, 80, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 4px;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2000;
}

.export-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: #fff;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
    transition: background 0.2s ease;
}

.export-option:hover {
    background: rgba(242, 68, 29, 0.3);
}

.hidden {
    display: none;
}

.coordinates {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 12px;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.measurement-tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: opacity 0.2s ease-in-out;
    /* Optimisations GPU retirées - causaient conflit avec Leaflet */
}

.measurement-tooltip.fade-in {
    animation: fadeIn 0.2s ease-in-out;
}

.measurement-tooltip.fade-out {
    animation: fadeOut 0.2s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-5px);
    }
}

/* Segment labels */
.segment-label {
    background: rgba(242, 68, 29, 0.9) !important;
    color: #fff !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-family: monospace !important;
    font-weight: bold !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    text-align: center !important;
    line-height: 1.2 !important;
}

/* Curseur pointer pour éléments avec menu contextuel */
.leaflet-interactive {
    cursor: pointer !important;
}

.leaflet-marker-icon {
    cursor: pointer !important;
}

/* Search container - positioned over map */
.search-container {
    position: absolute;
    bottom: 100px;
    right: 20px;
    width: 350px;
    z-index: 1000;
}

.search-box {
    display: flex;
    background: rgba(26, 32, 44, 0.95);
    border: 1px solid rgba(74, 85, 104, 0.5);
    border-radius: 8px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

#search-input {
    flex: 1;
    padding: 10px 12px;
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-size: 14px;
    outline: none;
}

#search-input::placeholder {
    color: #a0aec0;
}

#search-btn {
    padding: 10px 12px;
    background: var(--rhino-red);
    border: none;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#search-btn:hover {
    background: var(--rhino-red-light);
}

.search-results {
    margin-top: 5px;
    background: rgba(26, 32, 44, 0.95);
    border: 1px solid rgba(74, 85, 104, 0.5);
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.search-result-item {
    padding: 10px 12px;
    color: #e2e8f0;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid rgba(74, 85, 104, 0.3);
    transition: background-color 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(242, 68, 29, 0.2);
}

.search-result-item .result-name {
    font-weight: 500;
}

.search-result-item .result-address {
    color: #a0aec0;
    font-size: 12px;
    margin-top: 2px;
}

/* Point name labels */
.point-label-marker {
    background: transparent !important;
    border: none !important;
}

.point-label {
    background: rgba(242, 68, 29, 0.9) !important;
    color: #fff !important;
    padding: 3px 6px !important;
    border-radius: 3px !important;
    font-size: 11px !important;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 500 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    position: relative !important;
    pointer-events: auto !important;
}

.point-label:hover {
    background: rgba(242, 116, 87, 0.95) !important;
    transform: none !important; /* Force à ne jamais bouger au hover */
}

/* Marqueur isochrone */
.isochrone-marker {
    background: var(--rhino-dark) !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.isochrone-marker i {
    color: #fff !important;
    font-size: 12px !important;
}

.unit-select {
    background: rgba(44, 62, 80, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    padding: 2px 4px;
    font-size: 11px;
    margin-left: 4px;
    min-width: 45px;
}

/* Modal isochrones */
.isochrone-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    background: rgba(26, 32, 44, 0.95);
    border: 1px solid rgba(74, 85, 104, 0.5);
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    backdrop-filter: blur(10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.isochrone-modal-content {
    padding: 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(74, 85, 104, 0.3);
}

.modal-header h3 {
    margin: 0;
    color: #e2e8f0;
    font-size: 18px;
    font-weight: 600;
}

.modal-header h3 i {
    margin-right: 8px;
    color: #3182ce;
}

.modal-close {
    background: transparent;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: #e53e3e;
    background: rgba(229, 62, 62, 0.1);
}

#isochrone-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #e2e8f0;
    font-weight: 500;
    font-size: 14px;
}

.form-group select,
.form-group input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    background: rgba(45, 55, 72, 0.8);
    border: 1px solid rgba(74, 85, 104, 0.5);
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group select:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: #3182ce;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #e2e8f0;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(74, 85, 104, 0.3);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1999;
    backdrop-filter: blur(4px);
}

/* Responsive design */
@media (max-width: 768px) {
    .search-container {
        bottom: 80px;
        left: 10px;
        right: 10px;
        width: auto;
    }

    .search-box {
        font-size: 14px;
    }

    #search-input {
        padding: 8px 10px;
    }

    #search-btn {
        padding: 8px 10px;
    }

    .header {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .toolbar {
        flex-wrap: wrap;
        justify-content: center;
    }

    .coordinates {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        margin: 10px;
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 10px;
    }

    .footer-text,
    .footer-center,
    .footer-links {
        flex: none;
        width: 100%;
        justify-content: center;
    }

    .main-content {
        height: auto;
        min-height: calc(100vh - 120px);
    }
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    border-radius: 8px;
}

.leaflet-popup-content {
    color: #fff;
    font-size: 13px;
}

.leaflet-popup-tip {
    background: rgba(0, 0, 0, 0.9);
}

/* Animation for tools */
.tool-btn {
    position: relative;
    overflow: hidden;
}

.tool-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--rhino-dark);
    transition: left 0.5s;
}

.tool-btn:hover::after {
    left: 100%;
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Status indicators */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-active {
    background: #2ecc71;
    box-shadow: 0 0 5px #2ecc71;
}

.status-inactive {
    background: #95a5a6;
}

.status-warning {
    background: #f39c12;
    box-shadow: 0 0 5px #f39c12;
}

/* Panneau de contraintes */
.constraints-panel {
    position: fixed;
    top: 80px;
    left: 20px;
    width: 280px;
    background: var(--rhino-dark);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1500;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
}

.constraints-panel:not(.hidden) {
    transform: translateX(0);
}

.constraints-panel.collapsed {
    transform: translateX(calc(-100% + 50px));
}

.panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(242, 68, 29, 0.1);
}

.panel-header h3 {
    color: var(--rhino-red);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.panel-toggle {
    background: none;
    border: none;
    color: #bdc3c7;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.panel-toggle:hover {
    background: rgba(242, 68, 29, 0.2);
    color: var(--rhino-red);
}

.panel-body {
    padding: 16px;
}

.constraint-group {
    margin-bottom: 16px;
}

.constraint-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ecf0f1;
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 8px;
    position: relative;
}

.constraint-checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #7f8c8d;
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.constraint-checkbox:checked {
    background: var(--rhino-red);
    border-color: var(--rhino-red);
}

.constraint-checkbox:checked::after {
    content: '✓';
    color: white;
    font-size: 10px;
    position: absolute;
    left: 2px;
    top: 1px;
}

.constraint-input {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 24px;
}

.constraint-input input {
    flex: 1;
    background: rgba(52, 73, 94, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ecf0f1;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.constraint-input input:focus {
    outline: none;
    border-color: var(--rhino-red);
    background: rgba(52, 73, 94, 0.8);
}

.constraint-input .unit {
    color: #bdc3c7;
    font-size: 11px;
    min-width: 15px;
}

.panel-stats {
    background: rgba(242, 68, 29, 0.1);
    border: 1px solid rgba(242, 68, 29, 0.3);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-label {
    color: #bdc3c7;
    font-size: 12px;
}

.stat-value {
    color: var(--rhino-red);
    font-size: 13px;
    font-weight: bold;
    font-family: monospace;
}

.panel-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-small {
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
}

.btn-danger {
    background: var(--rhino-red);
    color: #fff;
}

.btn-danger:hover {
    background: var(--rhino-red-light);
}

.constraint-info {
    background: rgba(242, 68, 29, 0.1);
    border: 1px solid rgba(242, 68, 29, 0.2);
    border-radius: 4px;
    padding: 8px;
    font-size: 11px;
    color: var(--rhino-red);
}

.info-row {
    margin-bottom: 2px;
    text-align: center;
}

.info-row:last-child {
    margin-bottom: 0;
}

.btn-secondary {
    background: rgba(149, 165, 166, 0.2);
    color: #bdc3c7;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(149, 165, 166, 0.3);
    color: #ecf0f1;
}

/* Modal simple pour nommer les points */
.simple-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 3000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.simple-modal-overlay:not(.hidden) {
    opacity: 1;
}

.simple-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 3001;
    opacity: 0;
    transition: all 0.2s ease;
}

.simple-modal:not(.hidden) {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.simple-modal-content {
    background: var(--rhino-dark);
    border-radius: 8px;
    padding: 20px;
    min-width: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.simple-modal-content h3 {
    margin: 0 0 15px 0;
    color: var(--rhino-red);
    font-size: 16px;
    text-align: center;
}

.simple-modal-content input {
    width: 100%;
    background: rgba(52, 73, 94, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ecf0f1;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.simple-modal-content input:focus {
    outline: none;
    border-color: var(--rhino-red);
    background: rgba(52, 73, 94, 0.8);
}

.simple-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-primary {
    background: var(--rhino-red);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--rhino-red-light);
}

/* Footer Styles */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--rhino-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    z-index: 1000;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

.footer-text {
    font-size: 12px;
    color: #bdc3c7;
    flex: 1;
}

.footer-center {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.footer-links {
    display: flex;
    gap: 15px;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--rhino-red);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--rhino-red-light);
}

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

/* Context Menu Styles */
.context-menu {
    position: fixed;
    background: rgba(26, 32, 44, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    padding: 4px 0;
    min-width: 150px;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 13px;
    color: #e2e8f0;
}

.context-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.context-menu-item.danger {
    color: #f56565;
}

.context-menu-item.danger:hover {
    background: rgba(245, 101, 101, 0.1);
}

.context-menu-item i {
    font-size: 16px;
    width: 16px;
}

.context-menu-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

.context-menu-item.checkbox-item {
    padding: 6px 12px;
}

.context-menu-item.checkbox-item:hover {
    background: transparent;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    width: 100%;
    user-select: none;
}

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

.checkbox-label span {
    flex: 1;
}

.checkbox-label:hover {
    color: var(--rhino-red);
}

/* Context Menu Submenu */
.context-menu-item.has-submenu {
    position: relative;
}

.context-submenu {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 2px;
    background: rgba(26, 32, 44, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    padding: 4px 0;
    min-width: 180px;
    z-index: 10001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: none;
    pointer-events: auto;
}

.has-submenu:hover .context-submenu,
.context-submenu:hover {
    display: block;
}

.context-submenu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 13px;
    color: #e2e8f0;
}

.context-submenu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.context-submenu-item.current-layer {
    opacity: 0.5;
    cursor: default;
}

.context-submenu-item.current-layer:hover {
    background: transparent;
}

.context-submenu-item i {
    font-size: 16px;
    width: 16px;
    color: var(--rhino-red);
}

/* Color Submenu */
.color-submenu {
    position: fixed;
    background: rgba(26, 32, 44, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    padding: 0;
    min-width: 220px;
    z-index: 10001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.color-submenu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    font-weight: 500;
    color: #e2e8f0;
}

.close-submenu-btn {
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.close-submenu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.color-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
}

.color-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    font-size: 13px;
    color: #e2e8f0;
}

.color-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.color-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

/* Modern Point Labels */
.modern-point-label {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.modern-point-label .point-name {
    background: rgba(26, 32, 44, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    border-left: 3px solid var(--rhino-red);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

/* Polygon Label */
.polygon-label {
    background: rgba(26, 32, 44, 0.9) !important;
    color: #fff !important;
    border: 1px solid rgba(155, 89, 182, 0.5) !important;
    border-left: 3px solid #9b59b6 !important;
    padding: 6px 10px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    text-align: center !important;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4) !important;
    white-space: nowrap !important;
    pointer-events: none !important;
}

.polygon-label::before {
    border: none !important;
    transform: none !important;
    position: relative;
}

/* Isochrone Label */
.isochrone-label {
    background: rgba(26, 32, 44, 0.9) !important;
    color: #fff !important;
    border: 1px solid rgba(242, 68, 29, 0.5) !important;
    border-left: 3px solid var(--rhino-red) !important;
    padding: 6px 10px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    text-align: center !important;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4) !important;
    white-space: nowrap !important;
    pointer-events: none !important;
}

.isochrone-label::before {
    border: none !important;
    transform: none !important;
    position: relative;
}

/* Colored labels with layer colors */
.label-colored {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;  /* Remove default Leaflet shadow */
    padding: 0 !important;  /* Remove default padding */
}

.label-colored > div {
    padding: 4px 8px !important;
    padding-left: 10px !important;
    border-radius: 3px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-align: center !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-left-width: 3px !important;
    border-left-style: solid !important;
    /* border-left-color is set via inline style (don't override it!) */
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;  /* Subtle shadow on inner div only */
    white-space: nowrap !important;
    pointer-events: none !important;
    letter-spacing: 0.3px !important;
}

/* Remove arrow for colored labels */
.label-colored::before {
    display: none !important;
}

/* Adjust main content to account for footer */
.main-content {
    padding-bottom: 40px;
}

/* Smooth transitions */
/* Removed universal selector - caused Leaflet SVG elements to "bounce" during map pan */
/* Apply transitions only to specific UI elements, NOT to Leaflet elements */

button, .tool-btn, .layer-btn, .file-btn {
    transition: all 0.2s ease;
}
/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Token package card styles */
.token-package-card {
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.token-package-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(242, 68, 29, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.token-package-card.popular {
    border-color: rgba(242, 68, 29, 0.6);
    background: rgba(242, 68, 29, 0.1);
}

.token-package-card.popular::before {
    content: "⭐ Popular";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--rhino-red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.token-package-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: white;
}

.token-package-card .token-amount {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--rhino-red);
    margin: 0.5rem 0;
}

.token-package-card .price {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.9);
    margin: 0.5rem 0;
}

.token-package-card .bonus {
    color: #2ecc71;
    font-weight: bold;
    font-size: 0.9rem;
}

.token-package-card .per-token {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* ===============================================
   Pages statiques (mentions légales, CGV, etc.)
   =============================================== */

.page-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.page-modal-content {
    background: var(--rhino-dark);
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.page-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.page-modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
}

.page-modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.page-modal-close:hover {
    color: var(--rhino-red);
    background: rgba(242, 68, 29, 0.1);
}

/* Switch de langue dans la modal */
.page-lang-switch {
    display: flex;
    gap: 0.5rem;
    margin-right: 1rem;
}

.lang-switch-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 36px;
}

.lang-switch-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.lang-switch-btn.active {
    background: rgba(242, 68, 29, 0.3);
    border-color: var(--rhino-red);
    color: #fff;
}

.page-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* Styles pour le contenu Markdown */
.page-modal-body h1,
.page-modal-body h2,
.page-modal-body h3,
.page-modal-body h4,
.page-modal-body h5,
.page-modal-body h6 {
    color: #fff;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    font-weight: 600;
}

.page-modal-body h1 {
    font-size: 2em;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5em;
}

.page-modal-body h2 {
    font-size: 1.5em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.4em;
}

.page-modal-body h3 {
    font-size: 1.25em;
}

.page-modal-body p {
    margin-bottom: 1em;
}

.page-modal-body a {
    color: var(--rhino-red);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.page-modal-body a:hover {
    border-bottom-color: var(--rhino-red);
}

.page-modal-body ul,
.page-modal-body ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

.page-modal-body li {
    margin-bottom: 0.5em;
}

.page-modal-body code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--rhino-red);
}

.page-modal-body pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1em;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1em;
    border-left: 3px solid var(--rhino-red);
}

.page-modal-body pre code {
    background: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.9);
}

.page-modal-body blockquote {
    border-left: 4px solid var(--rhino-red);
    padding-left: 1em;
    margin-left: 0;
    margin-bottom: 1em;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.page-modal-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.page-modal-body table th,
.page-modal-body table td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75em;
    text-align: left;
}

.page-modal-body table th {
    background: rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.page-modal-body table tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.1);
}

.page-modal-body hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2em 0;
}

/* Footer page links */
.footer-page-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-page-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-page-link:hover {
    color: var(--rhino-red);
}

/* Responsive */
@media (max-width: 768px) {
    .page-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .page-modal-header,
    .page-modal-body {
        padding: 1rem;
    }

    .page-modal-header h2 {
        font-size: 1.25rem;
    }
}

/* ===============================================
   Layout commun - Header et Footer
   =============================================== */

/* Header */
.app-header {
    background: var(--rhino-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1100;
}

.header-content {
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-logo {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-text {
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-actions {
    margin-left: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-link.active {
    background: rgba(242, 68, 29, 0.2);
    color: var(--rhino-red);
}

.nav-link i {
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* Header token badge (dans le header) */
.header-token-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.5rem;
    background: rgba(242, 68, 29, 0.15);
    border: 1px solid rgba(242, 68, 29, 0.4);
    border-radius: 5px;
    color: #F2441D;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.header-token-badge:hover {
    background: rgba(242, 68, 29, 0.25);
    border-color: rgba(242, 68, 29, 0.6);
}

.header-token-badge i {
    font-size: 0.85rem;
}

/* Menu utilisateur */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(242, 68, 29, 0.2);
    border: 1px solid rgba(242, 68, 29, 0.3);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-menu-btn:hover {
    background: rgba(242, 68, 29, 0.3);
    border-color: rgba(242, 68, 29, 0.5);
    transform: scale(1.05);
}

.user-menu-btn i {
    font-size: 1.5rem;
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: rgba(242, 68, 29, 0.1);
    font-weight: 600;
    color: var(--rhino-red);
}

.user-menu-header i {
    font-size: 1.5rem;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 220px;
    background: var(--rhino-dark);
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 1001;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    background: rgba(242, 68, 29, 0.2);
    color: #fff;
    border-left-color: var(--rhino-red);
    padding-left: calc(1.25rem + 3px);
}

.dropdown-item i {
    font-size: 1.1rem;
    width: 1.25rem;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.25rem 0;
}

/* Solde de tokens */
.tokens-balance {
    display: flex;
    align-items: center;
}

.tokens-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(241, 196, 15, 0.15);
    border: 1px solid rgba(241, 196, 15, 0.3);
    border-radius: 6px;
    color: #f1c40f;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.tokens-link:hover {
    background: rgba(241, 196, 15, 0.25);
    border-color: rgba(241, 196, 15, 0.5);
    transform: translateY(-1px);
}

.tokens-link i {
    font-size: 1.2rem;
}

.tokens-amount {
    font-size: 1.1rem;
    font-weight: 600;
}

.tokens-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Dropdown arrows */
.dropdown-arrow {
    font-size: 0.75rem !important;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

/* Dropdown pages dans le header */
.header-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-trigger {
    cursor: pointer;
    user-select: none;
    background: transparent !important;
    border: none;
    outline: none;
}

.dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.dropdown-trigger:focus {
    outline: none;
    box-shadow: none;
}

.dropdown-trigger:hover .dropdown-arrow {
    opacity: 1;
}

.dropdown-trigger.active {
    background: rgba(242, 68, 29, 0.2) !important;
    color: var(--rhino-red);
}

.header-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 220px;
    background: var(--rhino-dark);
    border: none;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 1001;
}

.header-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.header-dropdown-item:hover {
    background: rgba(242, 68, 29, 0.2);
    color: #fff;
    border-left-color: var(--rhino-red);
    padding-left: calc(1.25rem + 3px);
}

/* Boutons header */
.btn-primary,
.btn-secondary {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--rhino-red);
    color: #fff;
}

.btn-primary:hover {
    background: var(--rhino-red-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(242, 68, 29, 0.4);
}

.btn-secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Footer */
.app-footer {
    background: var(--rhino-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    margin-top: auto;
    position: relative;
    z-index: 400;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

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

.footer-credit {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin: 0;
}

.footer-credit a {
    color: var(--rhino-red);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-credit a:hover {
    color: #5dade2;
}

.footer-pages {
    flex-wrap: wrap;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s ease;
    cursor: pointer;
}

.footer-link:hover {
    color: var(--rhino-red);
}

.footer-link i {
    font-size: 1.1rem;
}

/* Layout responsive */
@media (max-width: 1024px) {
    .header-content {
        padding: 0.75rem 1rem;
        gap: 1rem;
    }

    .header-nav {
        gap: 0.25rem;
    }

    .nav-link span {
        display: none;
    }

    .nav-link {
        padding: 0.5rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .header-nav {
        order: 3;
        width: 100%;
        justify-content: space-around;
        padding-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .header-actions {
        gap: 0.5rem;
    }

    .user-menu-btn span {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer-section {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Ajustement du layout global pour les pages avec header/footer */
body.with-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.with-layout main {
    flex: 1;
}

/* Sidebar buttons */
.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    width: 100%;
    text-align: left;
}

.sidebar-btn:hover {
    background: rgba(242, 68, 29, 0.2);
    border-color: rgba(242, 68, 29, 0.4);
    color: #fff;
}

.sidebar-btn i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-btn.danger {
    color: rgba(242, 68, 29, 0.9);
}

.sidebar-btn.danger:hover {
    background: rgba(242, 68, 29, 0.2);
    border-color: rgba(242, 68, 29, 0.4);
    color: var(--rhino-red);
}

/* Overpass element labels - clickable */
.overpass-element-label {
    transition: all 0.2s ease;
    z-index: 1000 !important;
}

.overpass-element-label:hover {
    opacity: 0.8 !important;
    transform: scale(1.05);
    z-index: 1001 !important;
}

.overpass-element-label .leaflet-tooltip-content {
    margin: 0;
    padding: 2px 6px;
}

/* Privacy banner in footer */
.privacy-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    background: rgba(76, 175, 80, 0.1);
    border-top: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 6px 6px 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    flex-wrap: wrap;
}

.privacy-banner i {
    color: #4caf50;
    font-size: 1.1rem;
}

.privacy-banner .privacy-title {
    color: #4caf50;
    font-weight: 600;
}

.privacy-banner .privacy-separator {
    color: rgba(255, 255, 255, 0.4);
}

.privacy-banner .privacy-text {
    color: rgba(255, 255, 255, 0.7);
}

.privacy-banner-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.privacy-banner-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.privacy-banner-close i {
    font-size: 1.2rem;
}

/* Fade animations for privacy banner */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 768px) {
    .privacy-banner {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        gap: 0.4rem;
    }

    .privacy-banner i {
        font-size: 1rem;
    }

    .privacy-banner-close i {
        font-size: 1rem;
    }
}

