﻿﻿﻿:root {
    --marker-scale: 1;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.markdown-content {
    line-height: 1.55;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
    margin: 12px 0 6px;
    font-weight: 600;
}

.markdown-content p {
    margin: 8px 0;
}

.markdown-content ul,
.markdown-content ol {
    margin: 8px 0 8px 20px;
    padding-left: 20px;
}

.markdown-content a {
    color: #60a5fa;
}

body[data-theme="light"] .markdown-content a {
    color: #2563eb;
}

.ui-tooltip {
    position: fixed;
    background: rgba(28, 31, 43, 0.94);
    color: #f1f4ff;
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    font-size: 13px;
    line-height: 1.4;
    z-index: 2005;
    max-width: min(280px, 80vw);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform: translateY(-4px);
}

.ui-tooltip::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: inherit;
    transform: rotate(45deg);
    z-index: -1;
    top: 50%;
    left: 50%;
    margin-left: -6px;
    margin-top: -6px;
}

.ui-tooltip[data-placement="top"]::before {
    bottom: -6px;
    top: auto;
}

.ui-tooltip[data-placement="bottom"]::before {
    top: -6px;
}

.ui-tooltip[data-placement="left"]::before {
    left: auto;
    right: -6px;
}

.ui-tooltip[data-placement="right"]::before {
    left: -6px;
}

.ui-tooltip.is-visible {
    opacity: 1;
    pointer-events: none;
    transform: translateY(0);
}

.ui-tooltip.is-visible.is-persistent {
    pointer-events: auto;
}

.ui-tooltip-text {
    display: block;
}

.ui-tooltip--persistent {
    padding-right: 48px;
}

.ui-tooltip--persistent .ui-tooltip-dismiss {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: none;
    background: rgba(241, 244, 255, 0.16);
    color: #f1f4ff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ui-tooltip--persistent .ui-tooltip-dismiss:hover,
.ui-tooltip--persistent .ui-tooltip-dismiss:focus-visible {
    background: rgba(241, 244, 255, 0.3);
}
.history-overflow {
    text-align: center;
    font-size: 11px;
    color: #a0a8b6;
    padding: 4px 0;
    letter-spacing: 0.6px;
}


/* ?? R�initialisation de base */
body {
    display: flex;
    height: 100vh;
    overflow: hidden;
    font-family: 'Segoe UI', 'Arial', 'Segoe UI Emoji', 'Noto Color Emoji', 'Apple Color Emoji', sans-serif;
    background: #2a2a2a;
    color: white;
}

button,
[role="button"],
input,
select,
textarea {
    touch-action: manipulation;
}

/* ?? Panneau Exploration */
#sidebar {
    width: 280px;
    background: #1e1e1e;
    color: white;
    padding: 15px;
    overflow-y: auto;
    border-right: 2px solid #333;
    height: 100vh;
    flex-shrink: 0;
}

/* ??? Titre */
#sidebar h2 {
    font-size: 20px;
    margin: 0 0 14px;
    text-align: center;
}

/* ?? Barre de recherche */
#search-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    background: #333;
    border-radius: 8px;
    padding: 5px;
}


.results-badge {
    margin-left: auto;
    padding: 2px 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #dcdcdc;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}


.results-badge[data-state='empty'] {
    color: #9aa0a6;
    background: rgba(255, 255, 255, 0.05);
}

.results-badge[data-state='filtered'] {
    color: #ffffff;
    background: rgba(80, 160, 255, 0.22);
}



.search-highlight {
    background: rgba(255, 221, 64, 0.35);
    color: #fff;
    padding: 0 2px;
    border-radius: 4px;
}
#filters-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.validation-warnings {
    margin: 16px 0;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(252, 211, 77, 0.35);
    background: rgba(252, 211, 77, 0.12);
    color: #fcd34d;
    font-size: 14px;
    line-height: 1.4;
}

.validation-warnings[hidden] {
    display: none;
}

.validation-warnings-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
}

.validation-warnings-list {
    margin: 0;
    padding-left: 20px;
}

.validation-warnings-list li {
    margin-bottom: 4px;
}

.validation-warnings-footnote {
    margin: 8px 0 0;
    font-size: 12px;
    opacity: 0.75;
}

body[data-theme="light"] .validation-warnings {
    background: rgba(252, 211, 77, 0.18);
    border-color: rgba(231, 161, 48, 0.45);
    color: #92400e;
}

#filters-container > button {
    flex: 0 0 auto;
}

#filters-advanced-toggle {
    flex: 0 0 auto;
}

#advanced-filters-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 12px;
}

#advanced-filters-panel[hidden] {
    display: none;
}

.filter-section {
    border: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-section > legend {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.filter-choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.85rem;
}

.filter-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filter-chip-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: inherit;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter-chip-label small {
    opacity: 0.7;
    font-size: 0.75rem;
}

.filter-chip input:focus-visible + .filter-chip-label {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.filter-chip input:checked + .filter-chip-label {
    background: rgba(61, 139, 253, 0.25);
    border-color: #3d8bfd;
    color: #fff;
}

.filter-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.filter-radio input {
    accent-color: #3d8bfd;
}

.filter-empty {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.65;
}

/* Theme toggle */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.25);
    padding: 4px;
    border-radius: 999px;
    flex: 0 0 auto;
    margin-left: 6px;
}

.theme-toggle-option {
    min-width: 30px;
    border: none;
    background: transparent;
    color: #dcdcdc;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.1;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.theme-toggle-option span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-option:hover {
    background: rgba(80, 160, 255, 0.18);
}

.theme-toggle-option.active {
    background: rgba(80, 160, 255, 0.32);
    color: #ffffff;
    font-weight: 600;
}

.theme-toggle-option:focus-visible {
    outline: 2px solid rgba(80, 160, 255, 0.8);
    outline-offset: 2px;
}

#reset-filters,
#random-location {
    margin-top: 6px;
}

#random-location {
    background: #333;
    border: none;
    color: #ffffff;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s ease, transform 0.1s ease;
    margin-left: auto;
}

#random-location:hover:not(:disabled) {
    background: #444;
    transform: translateY(-1px);
}

#random-location:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.segmented-control {
    display: flex;
    gap: 8px;
    margin: 12px 0 10px;
    background: #2d2d2d;
    padding: 4px;
    border-radius: 10px;
}

.tab-button {
    flex: 1;
    border: none;
    background: transparent;
    color: #dcdcdc;
    padding: 6px 10px;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.tab-button:hover {
    background: rgba(80, 160, 255, 0.15);
}

.tab-button.active {
    background: rgba(80, 160, 255, 0.35);
    color: #ffffff;
}

.tab-button:focus-visible {
    outline: 2px solid rgba(80, 160, 255, 0.8);
    outline-offset: 2px;
}

#type-filter {
    flex: 1 1 100%;
    min-width: 0;
    background: #333;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px;
    font-size: 14px;
}

#reset-filters {
    background: #333;
    border: none;
    color: #ffffff;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.3s ease-in-out, transform 0.1s ease-in-out;
}

#reset-filters:hover {
    background: #444;
}

#reset-filters:active {
    transform: scale(0.95);
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


#search-bar {
    flex: 1;
    min-width: 0;
    padding: 8px;
    border: none;
    outline: none;
    font-size: 14px;
    background-color: transparent;
    color: white;
}

#clear-search {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    flex-shrink: 0;
}

/* ?? Continent et lieux */
.continent-toggle {
    width: 100%;
    background: #2d2d2d;
    color: white;
    border: none;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: background 0.3s ease-in-out;
}

.continent-toggle:hover {
    background: #444;
}

.continent-content {
    display: none;
    padding-left: 10px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.28s ease, opacity 0.24s ease;
    will-change: max-height, opacity;
}

.continent-content.is-open {
    opacity: 1;
}

.slider-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.slider-label {
    font-size: 13px;
    color: #dcdcdc;
}

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

#marker-size {
    flex: 1;
    accent-color: #50a0ff;
}

.slider-value {
    font-size: 13px;
    color: #dcdcdc;
    min-width: 42px;
    text-align: right;
}

/* ? Surbrillance des lieux s�lectionn�s */
.location {
    background: #252525;
    padding: 8px;
    margin: 3px 0;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
}

.favorites-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.favorites-container[hidden] {
    display: none;
}

.favorites-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(80, 160, 255, 0.14);
    color: #e3ecff;
    font-size: 13px;
    font-weight: 500;
}

.favorites-summary-label {
    opacity: 0.85;
}

.favorites-summary-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #f6c344;
}

.favorites-summary-count::before {
    content: '★';
    font-size: 14px;
    line-height: 1;
}

.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.location.favorite-entry {
    background: #2c2c2c;
}

.location.favorite-entry.active {
    background: #575757;
}

.favorite-entry.is-filtered {
    opacity: 0.45;
}

.favorite-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.favorite-name {
    font-weight: 600;
    color: #f5f7ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.favorite-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 11px;
}

.favorite-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.25px;
    background: rgba(246, 195, 68, 0.16);
    color: #f6c344;
    font-weight: 600;
}

.favorite-chip-continent {
    background: rgba(80, 160, 255, 0.18);
    color: #8bbcff;
}

.favorites-empty {
    font-size: 14px;
    color: #9aa0a6;
    padding: 6px 4px;
}


.location.keyboard-focus {
    outline: 2px solid rgba(80, 160, 255, 0.8);
    background: rgba(80, 160, 255, 0.15);
}
.location:hover {
    background: #444;
}

.location.favorite:not(.active) {
    background: #303030;
}

.location.active {
    background: #575757;
    font-weight: bold;
}

.location-label {
    flex: 1;
    min-width: 0;
}

.location-favorite-toggle {
    background: transparent;
    border: none;
    color: #f6c344;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    min-width: 24px;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.location-favorite-toggle:hover {
    opacity: 0.85;
    transform: scale(1.12);
}

.location-favorite-toggle.active,
.location.favorite .location-favorite-toggle {
    opacity: 1;
}

.location-favorite-toggle:focus-visible {
    outline: 2px solid rgba(246, 195, 68, 0.8);
    outline-offset: 2px;
}

.location-favorite-toggle:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    transform: none;
}

/* ?? Panneau lat�ral d'information */
#info-sidebar {
    position: fixed;
    right: -400px; /* D�plac� hors �cran au d�part */
    top: 0;
    width: 400px;
    height: 100vh;
    background: #222;
    color: white;
    padding: 20px;
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    z-index: 1001;
    border-left: 2px solid #444;
}

#info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

#info-header h3 {
    margin: 0;
    flex: 1;
}

.info-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.favorite-toggle {
    font-size: 22px;
    background: transparent;
    border: none;
    color: #f6c344;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.15s ease;
    cursor: pointer;
}

.favorite-toggle:hover {
    opacity: 0.85;
    transform: scale(1.08);
}

.favorite-toggle.active {
    opacity: 1;
}

.favorite-toggle:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.favorite-toggle:focus-visible {
    outline: 2px solid rgba(246, 195, 68, 0.8);
    outline-offset: 2px;
}

/* ?? Continent ouvert */
#info-sidebar.open {
    transform: translateX(-400px);
    opacity: 1;
    pointer-events: all;
}

/* ? Bouton de fermeture */
#close-info-sidebar {
    background: #ff4d4d;
    color: white;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 6px;
    transition: background 0.3s ease-in-out;
}

#close-info-sidebar:hover {
    background: #ff0000;
}

/* ?? Onglets du panneau d'information */
#info-tabs {
    display: flex;
    justify-content: space-around;
    margin-bottom: 10px;
    border-bottom: 2px solid #444;
    padding-bottom: 5px;
}

/* ??? Stylisation des onglets */
.info-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: #333;
    border: none;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
    border-radius: 5px 5px 0 0;
    font-weight: bold;
}

.info-tab.active {
    background: #575757;
    font-weight: bold;
    border-bottom: 3px solid white;
}

/* ?? Contenu des onglets */
.info-content {
    display: none;
    padding: 10px;
    background: #222;
    border-radius: 0 0 5px 5px;
}

.info-content.active {
    display: block;
}

/* ??? Carte */
.map-wrapper {
    flex: 1;
    height: 100vh;
    position: relative;
    z-index: 0;
    border-radius: 10px;
    overflow: hidden;
}

#map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    touch-action: pan-x pan-y pinch-zoom;
}

.leaflet-image-layer,
.leaflet-tile-pane img {
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    image-rendering: -webkit-optimize-contrast;
}

.map-wrapper:-webkit-full-screen,
.map-wrapper:-moz-full-screen,
.map-wrapper:-ms-fullscreen,
.map-wrapper:fullscreen {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

/* ? Bouton de recentrage */
#reset-view {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px;
    background: #444;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

#reset-view:hover {
    background: #666;
}

/* ??? Historique plac� � droite de la barre d'exploration */
#history-container {
    position: absolute;
    bottom: 20px;
    left: 340px; /* ?? Align� � droite du panneau Exploration */
    background: rgba(40, 40, 40, 0.9);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    width: 200px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

/* ??? Titre de l�historique */
#history-title {
    text-align: center;
    font-size: 12px;
    color: #ddd;
    text-transform: uppercase;
    font-weight: bold;
    width: 100%;
    margin-bottom: 5px;
}

/* ?? Liste des �l�ments historiques */
#history-list {
    max-height: 120px;
    overflow-y: auto;
    width: 100%;
}

.history-overflow {
    text-align: center;
    font-size: 11px;
    color: #a0a8b6;
    padding: 4px 0;
    letter-spacing: 0.6px;
}

/* ?? Boutons d�historique */
.history-item {
    background: #333;
    color: white;
    border: none;
    padding: 6px;
    cursor: pointer;
    text-align: center;
    font-size: 12px;
    border-radius: 5px;
    transition: background 0.3s ease-in-out;
    width: 100%;
}

.history-item:hover {
    background: #575757;
}

/* ?? Bouton Retour bien int�gr� sous l�historique */
#history-back {
    background: #444;
    color: white;
    padding: 6px;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    text-align: center;
    font-size: 12px;
    transition: background 0.3s ease-in-out;
    width: 100%;
}

#history-back:hover {
    background: #666;
}

/* Flux temps réel */
#events-feed {
    position: absolute;
    bottom: 20px;
    left: 560px;
    width: 260px;
    background: rgba(30, 30, 30, 0.92);
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.35);
    z-index: 1001;
    max-height: 320px;
    overflow: hidden;
}

#events-feed .feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

#events-feed-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    color: #ddd;
}

#events-filter {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
}

#events-feed-empty {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

#events-feed-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: 200px;
    scrollbar-width: thin;
}

#events-feed-list li {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 10px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    font-size: 12px;
}

#events-feed-list li .event-title {
    font-weight: 600;
    color: #f5f5f5;
}

#events-feed-list li .event-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.55);
    text-align: right;
}

#events-feed-list li .event-description {
    grid-column: 1 / -1;
    color: rgba(255, 255, 255, 0.8);
}

#events-feed-list li .event-actions {
    grid-column: 1 / -1;
    text-align: right;
}

#events-feed-list li .event-actions button {
    background: rgba(255, 66, 66, 0.12);
    color: #ff6666;
    border: 1px solid rgba(255, 66, 66, 0.4);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
}

#events-feed-list li.annotation-event {
    border-left: 3px solid #ff8a00;
}

#events-feed-list li.quest-event {
    border-left: 3px solid #3cb9ff;
}

#events-feed-list li.sync-event {
    border-left: 3px solid #9c6bff;
}

#events-feed-list li .event-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

/* ??? Barre de contr�le en bas � droite */
#map-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(40, 40, 40, 0.9);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1001; /* ?? Sous le panneau lat�ral */
    transition: transform 0.4s ease-in-out; /* ??? Animation fluide */
}

/* ?? Quand le panneau lat�ral s'ouvre, la barre se d�cale avec */
#info-sidebar.open ~ #map-controls {
    transform: translateX(-440px); /* ?? Se d�place avec le panneau */
}

/* ?? Boutons de contr�le */
#map-controls button {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    transition: background 0.3s ease-in-out, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#map-controls button.map-control-button {
    font-size: 16px;
}

#map-controls button.map-control-button[aria-pressed="true"] {
    background: #ff8a00;
    color: #111;
    border-radius: 5px;
}

#map-controls button.map-control-button[aria-pressed="true"]:hover {
    background: #ff9f33;
}

#map-controls button span[aria-hidden="true"] {
    display: inline-flex;
}

#map-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

#map-controls button.active,
#map-controls button[aria-pressed="true"] {
    background: rgba(255, 255, 255, 0.24);
    border-radius: 5px;
}

#map-controls button:active {
    transform: scale(0.9);
}

@media (max-width: 1024px) {
    body {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    #sidebar {
        width: 100%;
        height: auto;
        max-height: min(50vh, 480px);
        border-right: none;
        border-bottom: 2px solid #333;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
        padding: 16px 14px 18px;
    }

    #sidebar h2 {
        text-align: left;
        margin-bottom: 10px;
    }

    .map-wrapper {
        order: 3;
        width: 100%;
        flex: 1 1 auto;
        height: auto;
        min-height: 52vh;
    }

    #info-sidebar {
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        max-width: none;
        height: auto;
        max-height: 85vh;
        border-left: none;
        border-top: 2px solid #444;
        padding: 18px 16px 22px;
        transform: translateY(100%);
    }

    #info-sidebar.open {
        transform: translateY(0);
    }

    #info-sidebar.open ~ #map-controls {
        transform: none;
    }

#info-content {
        max-height: calc(70vh - 120px);
    }

    .info-tab {
        font-size: 15px;
        padding: 9px;
    }

    #audio-player {
        max-width: 100%;
    }

    #history-container {
        left: 16px;
        right: 16px;
        top: 16px;
        bottom: auto;
        width: auto;
        max-width: none;
    }

    #history-list {
        max-height: 180px;
    }

    #map-controls {
        left: 16px;
        right: 16px;
        bottom: 16px;
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 16px;
        transform: none;
    }

    #map-controls button {
        font-size: 22px;
        padding: 12px;
    }

    #zoom-level {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    #sidebar {
        max-height: min(48vh, 420px);
        padding: 14px 12px 16px;
    }

    .location {
        padding: 10px 12px;
    }

    .location-label {
        font-size: 14px;
    }

    #info-header h3 {
        font-size: 18px;
    }

    #info-tabs {
        gap: 6px;
    }

    #info-content {
        max-height: calc(70vh - 140px);
    }

    #history-container {
        top: 12px;
    }
}

@media (max-width: 560px) {
    #sidebar {
        max-height: min(46vh, 360px);
    }

    #info-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .info-actions {
        width: 100%;
        justify-content: space-between;
    }

    .favorite-toggle {
        font-size: 26px;
    }

    #close-info-sidebar {
        width: auto;
        padding: 10px 14px;
    }

    #map-controls {
        gap: 10px;
        padding: 12px;
    }

    #history-container {
        width: calc(100% - 32px);
        top: 12px;
    }
}

/* ?? Indicateur du zoom */
#zoom-level {
    color: white;
    font-size: 14px;
    padding: 0 5px;
}

.marker-container {
    position: relative;
    width: 40px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(var(--marker-scale));
    transform-origin: center bottom;
    transition: transform 0.2s ease;
}

/* ?? Marqueur "pin" */
.pin-shape {
    position: absolute;
    width: 40px;
    height: 50px;
    z-index: 1;
    transition: transform 0.2s ease-in-out, filter 0.2s ease-in-out;
}

/* ?? Ic�ne du lieu */
.marker-icon {
    position: absolute;
    top: 11px; /* ?? Ajuste l'ic�ne pour ne pas toucher le haut */
    left: 50%;
    width: 22px;
    height: 22px;
    transform: translateX(-50%);
    z-index: 9999;
    object-fit: contain;
}

.global-toggle {
    width: 100%;
    background: #444;
    color: white;
    border: none;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 10px;
    border-radius: 5px;
}

.global-toggle:hover {
    background: #666;
}

#image-gallery {
    padding: 12px;
    background: #222;
    border-radius: 10px;
    max-height: 320px;
    overflow-y: auto;
}

.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
}

.media-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.media-card:hover,
.media-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.35);
}

.media-card.image {
    cursor: zoom-in;
}

.media-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: #111;
}

.media-card.video .media-thumb {
    filter: brightness(0.85);
}

.media-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    pointer-events: none;
}

.media-card.video:hover .media-play-icon,
.media-card.video:focus-visible .media-play-icon {
    background: rgba(80, 160, 255, 0.85);
}

.media-caption {
    padding: 12px 14px 4px;
    font-size: 14px;
    font-weight: 600;
    color: #f8f9ff;
    line-height: 1.35;
    min-height: 3.2em;
}

.media-caption-source {
    padding: 0 14px 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.65);
}

.gallery-image {
    width: 100px; /* Ajuste la taille des miniatures */
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #333;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.gallery-image:hover {
    transform: scale(1.1);
}

.gallery-video {
    display: inline-block;
    margin: 5px;
    text-align: center;
}

.gallery-thumbnail {
    width: 100%;
    max-width: 280px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease-in-out;
}

.gallery-thumbnail:hover {
    transform: scale(1.05);
}

.gallery-video-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 10px 0;
}

.gallery-video-title {
    font-size: 14px;
    color: white;
    margin-top: 5px;
    max-width: 280px;
}

#audio-container {
    display: none;
    text-align: center;
    margin: 10px 0;
    padding: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

#audio-title {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 5px;
}

#audio-player {
    width: 100%;
    max-width: 220px; /* ?? R�duit la taille du lecteur */
    height: 30px;
    border-radius: 5px;
}

/* ?? Style g�n�ral des sections d'informations */
.extra-section {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#history-container { order: 1; }
#quests-container { order: 2; }
#pnjs-container { order: 3; }
#lore-container { order: 4; }

/* ??? Titre des sections */
.extra-section h4 {
    margin: 0;
    font-size: 16px;
    color: #ffffff;
    padding-bottom: 5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    font-family: 'Segoe UI', 'Segoe UI Emoji', 'Noto Color Emoji', 'Apple Color Emoji', sans-serif;
}

/* ?? Contenu des listes */
.extra-section ul {
    padding-left: 20px;
    font-size: 14px;
}

.extra-section ul li {
    margin-bottom: 5px;
    font-size: 14px;
}

/* ?? Espacement entre le texte et les autres �l�ments */
#description-text {
    margin-bottom: 10px;
}

/* ?? Ajoute une ic�ne pour chaque section */
.extra-section h4::before {
    margin-right: 6px;
}

.extra-section[data-section="history"] h4::before {
    content: '??';
}

.extra-section[data-section="quests"] h4::before {
    content: '???';
}

.extra-section[data-section="pnj"] h4::before {
    content: '??';
}

.extra-section[data-section="lore"] h4::before {
    content: '??';
}

#info-content {
    max-height: 60vh; /* ?? Limite la hauteur pour �viter qu�il d�borde */
    overflow-y: auto; /* ?? Ajoute un d�filement vertical */
    padding-right: 10px; /* ??? �vite que le texte soit cach� par la barre de d�filement */
}


.leaflet-tooltip.marker-tooltip {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-weight: 600;
    text-transform: none;
}

#clustering-container {
    margin-top: 8px;
    display: flex;
    justify-content: flex-start;
}

.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #ddd;
}

.toggle-label input {
    width: 18px;
    height: 18px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 0;
}

.pagination-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.pagination-controls button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pagination-controls button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.pagination-info {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: #ccc;
}


#clustering-container {
    gap: 10px;
    align-items: center;
}

.toggle-hint {
    margin-left: auto;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1.4;
    color: #dcdcdc;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

.toggle-hint[data-state='on'] {
    color: #ffffff;
    background: rgba(80, 160, 255, 0.22);
}

.toggle-hint[data-state='off'] {
    background: rgba(255, 255, 255, 0.06);
}
.toggle-hint[data-state='empty'] {
    color: #9aa0a6;
    background: rgba(255, 255, 255, 0.05);
}


.marker-cluster.custom-cluster {
    background: transparent;
    border: none;
    box-shadow: none;
}

.marker-cluster.custom-cluster .cluster-shell {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.marker-cluster.custom-cluster .cluster-shell::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    filter: blur(12px);
    z-index: 0;
}

.marker-cluster.custom-cluster .cluster-count {
    position: relative;
    z-index: 1;
    font-weight: 600;
    font-size: 16px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.marker-cluster.custom-cluster .cluster-type {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1e1e1e;
    border: 2px solid rgba(255, 255, 255, 0.85);
    object-fit: contain;
    z-index: 2;
}

.marker-cluster.custom-cluster.cluster-small .cluster-shell {
    background: linear-gradient(135deg, #4b6fff, #2a48ff);
}

.marker-cluster.custom-cluster.cluster-medium .cluster-shell {
    background: linear-gradient(135deg, #ff9a3d, #ff6a3d);
}

.marker-cluster.custom-cluster.cluster-large .cluster-shell {
    background: linear-gradient(135deg, #ff5f7a, #ff2e53);
}

/* ? �tats focus et accessibilit� */
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
.audio-fallback:focus-visible {
    outline: 2px solid rgba(80, 160, 255, 0.9);
    outline-offset: 3px;
}

#search-bar:focus-visible {
    box-shadow: 0 0 0 2px rgba(80, 160, 255, 0.45);
}

.location:focus-visible {
    background: rgba(80, 160, 255, 0.18);
}

.audio-fallback {
    margin-top: 10px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(80, 160, 255, 0.15);
    border: 1px solid rgba(80, 160, 255, 0.35);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.12s ease;
}

.audio-fallback:hover {
    background: rgba(80, 160, 255, 0.25);
}

.audio-fallback:active {
    transform: scale(0.97);
}

.audio-fallback[hidden] {
    display: none;
}

.audio-status {
    font-size: 13px;
    color: #d0d5db;
    margin-top: 6px;
}

.audio-status[hidden] {
    display: none;
}






/* ?? Mode clair */
body[data-theme="light"] {
    background: #f5f7fb;
    color: #1f2933;
}

body[data-theme="light"] #sidebar {
    background: #ffffff;
    color: #1f2933;
    border-right: 1px solid #d5deeb;
}

body[data-theme="light"] #sidebar h2 {
    color: #1a2a4a;
}

body[data-theme="light"] #search-container {
    background: #e6ecf8;
}

body[data-theme="light"] #search-bar {
    color: #1f2933;
}

body[data-theme="light"] #search-bar::placeholder {
    color: #6c7895;
}

body[data-theme="light"] #clear-search {
    color: #4a5b73;
}

body[data-theme="light"] #type-filter {
    background: #dde4f5;
    color: #1f2933;
}

body[data-theme="light"] #reset-filters,
body[data-theme="light"] #random-location {
    background: #d9e2f3;
    color: #1f2933;
}

body[data-theme="light"] #reset-filters:hover,
body[data-theme="light"] #random-location:hover:not(:disabled) {
    background: #c7d4ec;
}

body[data-theme="light"] .theme-toggle,
body[data-theme="light"] .segmented-control {
    background: #e1e8f6;
}

body[data-theme="light"] .theme-toggle-option,
body[data-theme="light"] .tab-button {
    color: #52607a;
}

body[data-theme="light"] .theme-toggle-option:hover,
body[data-theme="light"] .tab-button:hover {
    background: rgba(72, 124, 215, 0.18);
}

body[data-theme="light"] .theme-toggle-option.active,
body[data-theme="light"] .tab-button.active {
    background: rgba(72, 124, 215, 0.28);
    color: #1f2933;
    font-weight: 600;
}

body[data-theme="light"] .results-badge {
    color: #3d4a63;
    background: rgba(72, 124, 215, 0.12);
}

body[data-theme="light"] .results-badge[data-state='empty'] {
    color: #6c7895;
    background: rgba(72, 124, 215, 0.06);
}

body[data-theme="light"] .results-badge[data-state='filtered'] {
    color: #1f2d4d;
    background: rgba(72, 124, 215, 0.22);
}

body[data-theme="light"] .slider-label,
body[data-theme="light"] .slider-value,
body[data-theme="light"] .toggle-label,
body[data-theme="light"] .toggle-hint,
body[data-theme="light"] .pagination-info,
body[data-theme="light"] .audio-status {
    color: #52607a;
}

body[data-theme="light"] .toggle-hint {
    background: rgba(72, 124, 215, 0.12);
}

body[data-theme="light"] .toggle-hint[data-state='on'] {
    color: #1f2d4d;
    background: rgba(72, 124, 215, 0.22);
}

body[data-theme="light"] .toggle-hint[data-state='off'] {
    background: rgba(72, 124, 215, 0.08);
}

body[data-theme="light"] .toggle-hint[data-state='empty'] {
    color: #6c7895;
}

body[data-theme="light"] .global-toggle,
body[data-theme="light"] .continent-toggle,
body[data-theme="light"] .history-item,
body[data-theme="light"] #history-back,
body[data-theme="light"] .pagination-controls button {
    background: #dce2f1;
    color: #1f2933;
    border: 1px solid rgba(47, 74, 117, 0.12);
}

body[data-theme="light"] .pagination-controls button:hover:not(:disabled),
body[data-theme="light"] .global-toggle:hover,
body[data-theme="light"] .continent-toggle:hover,
body[data-theme="light"] .history-item:hover,
body[data-theme="light"] #history-back:hover {
    background: #c9d4e8;
}

body[data-theme="light"] .history-overflow {
    color: #5a6a8a;
}


body[data-theme="light"] .location {
    background: #f0f4ff;
    color: #1f2933;
    box-shadow: inset 0 0 0 1px rgba(47, 74, 117, 0.08);
}

body[data-theme="light"] .location:hover {
    background: #e0e9ff;
}

body[data-theme="light"] .location.active,
body[data-theme="light"] .location.favorite-entry.active {
    background: #cbd8f6;
}

body[data-theme="light"] .location.favorite:not(.active),
body[data-theme="light"] .location.favorite-entry {
    background: #e6edff;
}

body[data-theme="light"] .favorites-summary {
    background: rgba(72, 124, 215, 0.16);
    color: #2c3a5c;
}

body[data-theme="light"] .favorites-summary-count {
    color: #d28a00;
}

body[data-theme="light"] .favorite-chip {
    background: rgba(246, 195, 68, 0.22);
    color: #7a5200;
}

body[data-theme="light"] .ui-tooltip {
    background: rgba(245, 249, 255, 0.96);
    color: #1f2a44;
    box-shadow: 0 12px 28px rgba(15, 32, 62, 0.18);
}

body[data-theme="light"] .ui-tooltip--persistent .ui-tooltip-dismiss {
    background: rgba(17, 25, 40, 0.12);
    color: #1f2a44;
}

body[data-theme="light"] .ui-tooltip--persistent .ui-tooltip-dismiss:hover,
body[data-theme="light"] .ui-tooltip--persistent .ui-tooltip-dismiss:focus-visible {
    background: rgba(17, 25, 40, 0.24);
}

body[data-theme="light"] #map-controls button.active,
body[data-theme="light"] #map-controls button[aria-pressed="true"] {
    background: rgba(31, 41, 51, 0.16);
}

body[data-theme="light"] .favorite-chip-continent {
    background: rgba(72, 124, 215, 0.22);
    color: #1f2d4d;
}

body[data-theme="light"] .favorite-name {
    color: #1f2d4d;
}

body[data-theme="light"] #info-sidebar {
    background: #ffffff;
    color: #1f2933;
    border-left: 1px solid #d5deeb;
}

body[data-theme="light"] #info-tabs {
    border-bottom: 1px solid #d5deeb;
}

body[data-theme="light"] .info-tab {
    background: #e4ebf7;
    color: #1f2933;
}

body[data-theme="light"] .info-tab.active {
    background: #cbd8f6;
    border-bottom-color: #2f5bb7;
}

body[data-theme="light"] .info-content {
    background: #f7f9fe;
}

body[data-theme="light"] #image-gallery,
body[data-theme="light"] .extra-section {
    background: #f2f5fd;
    border: 1px solid rgba(47, 74, 117, 0.12);
}

body[data-theme="light"] .media-card {
    background: rgba(31, 41, 51, 0.05);
    border-color: rgba(47, 74, 117, 0.18);
}

body[data-theme="light"] .media-caption {
    color: #1f2933;
}

body[data-theme="light"] .media-caption-source {
    color: rgba(31, 41, 51, 0.6);
}

body[data-theme="light"] .media-play-icon {
    background: rgba(31, 41, 51, 0.5);
}

body[data-theme="light"] .media-card.video:hover .media-play-icon,
body[data-theme="light"] .media-card.video:focus-visible .media-play-icon {
    background: rgba(72, 124, 215, 0.75);
}

body[data-theme="light"] .gallery-image {
    border-color: #cdd6ec;
}

body[data-theme="light"] .gallery-thumbnail {
    box-shadow: 0 2px 8px rgba(28, 52, 88, 0.12);
}

body[data-theme="light"] .gallery-video-title {
    color: #1f2933;
}

body[data-theme="light"] #audio-container {
    background: rgba(72, 124, 215, 0.08);
}

body[data-theme="light"] #audio-title {
    color: #52607a;
}

body[data-theme="light"] .audio-fallback {
    background: rgba(72, 124, 215, 0.12);
    border: 1px solid rgba(72, 124, 215, 0.3);
    color: #1f2933;
}

body[data-theme="light"] .audio-fallback:hover {
    background: rgba(72, 124, 215, 0.2);
}

body[data-theme="light"] .extra-section h4 {
    color: #1f2933;
    border-bottom-color: rgba(47, 74, 117, 0.2);
}

body[data-theme="light"] #history-container {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 24px rgba(15, 32, 62, 0.12);
}

body[data-theme="light"] #history-title {
    color: #52607a;
}

body[data-theme="light"] #events-feed {
    background: rgba(250, 250, 250, 0.94);
    color: #1f2933;
    box-shadow: 0 12px 22px rgba(15, 32, 62, 0.18);
}

body[data-theme="light"] #events-feed-title {
    color: #1f2933;
}

body[data-theme="light"] #events-filter {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1f2933;
}

body[data-theme="light"] #events-feed-empty {
    color: rgba(31, 41, 51, 0.6);
}

body[data-theme="light"] #events-feed-list li {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] #events-feed-list li .event-title {
    color: #1f2933;
}

body[data-theme="light"] #events-feed-list li .event-time {
    color: rgba(31, 41, 51, 0.55);
}

body[data-theme="light"] #events-feed-list li .event-description {
    color: rgba(31, 41, 51, 0.68);
}

body[data-theme="light"] #events-feed-list li .event-actions button {
    background: rgba(214, 58, 58, 0.12);
    color: #d63a3a;
    border-color: rgba(214, 58, 58, 0.32);
}

body[data-theme="light"] #map-controls {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 24px rgba(15, 32, 62, 0.12);
}

body[data-theme="light"] #map-controls button {
    color: #1f2933;
}

body[data-theme="light"] #map-controls button:hover {
    background: rgba(31, 41, 51, 0.1);
}

body[data-theme="light"] #map-controls button.map-control-button[aria-pressed="true"] {
    background: rgba(255, 138, 0, 0.85);
    color: #1f2933;
}

body[data-theme="light"] #zoom-level {
    color: #1f2933;
}

body[data-theme="light"] .pagination-controls button {
    color: #1f2933;
}

body[data-theme="light"] #info-content,
body[data-theme="light"] #history-list {
    scrollbar-color: rgba(72, 124, 215, 0.4) rgba(31, 41, 51, 0.08);
}

body[data-theme="light"] .leaflet-tooltip.marker-tooltip {
    background: rgba(17, 24, 39, 0.85);
    color: #f9fafb;
}

body[data-theme="light"] .toggle-hint,
body[data-theme="light"] .results-badge {
    border: none;
}

.media-lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    padding: 32px;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.media-lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.media-lightbox-image {
    max-width: min(90vw, 1200px);
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
    object-fit: contain;
    background: #111;
}

.media-lightbox-caption {
    margin-top: 16px;
    text-align: center;
    color: #f5f7ff;
    font-size: 15px;
    max-width: min(80vw, 960px);
}

.media-lightbox-close {
    position: absolute;
    top: 32px;
    right: 32px;
    font-size: 32px;
    color: #f5f7ff;
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 8px;
}

.media-lightbox-close:hover,
.media-lightbox-close:focus-visible {
    opacity: 0.85;
}
