/**
 * PastLegacies.com - Styles pour le Memory Atlas interactif (Leaflet)
 */

.atlas-wrapper {
    position: relative;
    width: 100%;
    height: calc(100vh - 72px);
    min-height: 600px;
    background: #090c10;
    overflow: hidden;
}

#atlasMap {
    width: 100%;
    height: 100%;
    z-index: 1;
    background: #090c10;
}

/* Panneau de Contrôle Flottant */
.atlas-control-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(22, 27, 34, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    width: 340px;
    max-width: calc(100vw - 40px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}

.atlas-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.atlas-title span {
    color: var(--gold-primary);
}

.atlas-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.atlas-search-box {
    position: relative;
    margin-bottom: 12px;
}
.atlas-search-box input {
    width: 100%;
    background: #0d1117;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 12px 8px 32px;
    color: var(--text-bright);
    font-size: 13px;
    outline: none;
}
.atlas-search-box input:focus {
    border-color: var(--gold-primary);
}
.atlas-search-box i {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-dim);
}

/* Filtres par Domaine dans l'Atlas */
.atlas-domain-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 4px;
}
.atlas-domain-filter::-webkit-scrollbar {
    width: 4px;
}
.atlas-domain-filter::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}
.atlas-pill {
    background: #0d1117;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}
.atlas-pill:hover, .atlas-pill.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold-primary);
    color: var(--gold-light);
}

.atlas-stats {
    font-size: 11px;
    color: var(--text-dim);
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-subtle);
    padding-top: 8px;
}

/* Style des Popups Leaflet Personnalisées */
.leaflet-popup-content-wrapper {
    background: #161b22 !important;
    color: #c9d1d9 !important;
    border: 1px solid var(--border-card) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7) !important;
    padding: 0 !important;
    overflow: hidden !important;
}
.leaflet-popup-content {
    margin: 0 !important;
    line-height: 1.5 !important;
}
.leaflet-popup-tip {
    background: #161b22 !important;
    border: 1px solid var(--border-card) !important;
}

.popup-memorial-card {
    width: 260px;
    overflow: hidden;
}
.popup-img-wrap {
    height: 130px;
    position: relative;
    background: #090c10;
}
.popup-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.popup-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(13, 17, 23, 0.85);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--gold-primary);
}
.popup-body {
    padding: 12px 14px 16px;
}
.popup-name {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 2px;
}
.popup-cemetery {
    font-size: 12px;
    color: var(--gold-light);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.popup-dates {
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 12px;
}
.popup-btn {
    display: block;
    text-align: center;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid var(--gold-primary);
    color: var(--gold-light);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}
.popup-btn:hover {
    background: var(--gold-primary);
    color: #000;
}

/* Custom Marker Pin Leaflet */
.custom-memorial-pin {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #161b22;
    border: 2px solid var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    transition: transform 0.2s;
    cursor: pointer;
}
.custom-memorial-pin:hover {
    transform: scale(1.2);
    border-color: #fff;
}
