main {
    padding-top: 80px;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.map-wrapper {
    position: relative;
    animation: slideRight 2s ease;
}

.title {
    position: absolute;
    top: 0;
    right: 100%;
    transform: rotate(-90deg) translateY(-100%);
    transform-origin: top right;
    border-radius: 15px 15px 0 0;
    background-color: var(--primary-color);
    padding: 15px 30px;
    white-space: nowrap;
}

.title h1 {
    color: var(--text-color);
    font-size: 20px;
    letter-spacing: 50%;
    font-weight: 500;
}

@keyframes slideRight {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

/* ── Conteneur carte ─────────────────────────── */

.map-container {
    background-color: #0d0d1a;
    border: 10px solid var(--primary-color);
    border-right: 0;
    width: calc(100vw - 70px);
    height: calc(100vh - 80px);
    position: relative;
    overflow: hidden;
}

/* ── Image de fond ───────────────────────────── */

.map-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    opacity: 0.5;
    display: block;
}

.map-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(26, 26, 46, 0.05) 30%, rgba(26, 26, 46, 0.55) 100%),
        repeating-linear-gradient(0deg,   transparent, transparent 59px, rgba(61, 61, 92, 0.12) 60px),
        repeating-linear-gradient(90deg,  transparent, transparent 59px, rgba(61, 61, 92, 0.12) 60px);
    pointer-events: none;
    z-index: 1;
}

/* ── Marqueurs ───────────────────────────────── */

.markers {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.marker {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: default;
}

.marker-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease;
    position: relative;
    z-index: 1;
}

.marker:hover .marker-dot {
    transform: scale(1.5);
}

/* Couleurs */
.dot-red    { background-color: var(--secondary-color); }
.dot-gold   { background-color: var(--third-color); }
.dot-purple { background-color: #7B34A2; }
.dot-gray   { background-color: rgba(200, 200, 220, 0.4); border-color: rgba(255, 255, 255, 0.3); }

/* Pulsations (seulement sur les marker-dot) */
.marker-dot.dot-red    { animation: pulse-red    2.2s ease-out infinite; }
.marker-dot.dot-gold   { animation: pulse-gold   2.5s ease-out infinite; }
.marker-dot.dot-purple { animation: pulse-purple 2.8s ease-out infinite; }

@keyframes pulse-red {
    0%   { box-shadow: 0 0 0 0  rgba(218, 27, 27, 0.7); }
    70%  { box-shadow: 0 0 0 12px rgba(218, 27, 27, 0); }
    100% { box-shadow: 0 0 0 0  rgba(218, 27, 27, 0); }
}
@keyframes pulse-gold {
    0%   { box-shadow: 0 0 0 0  rgba(200, 166, 0, 0.7); }
    70%  { box-shadow: 0 0 0 12px rgba(200, 166, 0, 0); }
    100% { box-shadow: 0 0 0 0  rgba(200, 166, 0, 0); }
}
@keyframes pulse-purple {
    0%   { box-shadow: 0 0 0 0  rgba(123, 52, 162, 0.7); }
    70%  { box-shadow: 0 0 0 12px rgba(123, 52, 162, 0); }
    100% { box-shadow: 0 0 0 0  rgba(123, 52, 162, 0); }
}

/* ── Tooltip ─────────────────────────────────── */

.marker-card {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background-color: rgba(14, 14, 30, 0.97);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 12px 14px;
    width: 215px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.marker-card::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--primary-color);
}

.marker:hover .marker-card {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Tooltip à droite (marqueurs bord gauche) */
.marker.tip-right .marker-card {
    bottom: auto;
    top: 50%;
    left: calc(100% + 14px);
    transform: translateY(-50%) translateX(-6px);
}
.marker.tip-right .marker-card::after {
    top: 50%;
    left: auto;
    right: 100%;
    transform: translateY(-50%);
    border-top-color: transparent;
    border-right-color: var(--primary-color);
}
.marker.tip-right:hover .marker-card {
    transform: translateY(-50%) translateX(0);
}

/* Tooltip en bas (marqueurs bord haut) */
.marker.tip-bottom .marker-card {
    top: calc(100% + 14px);
    bottom: auto;
    transform: translateX(-50%) translateY(-6px);
}
.marker.tip-bottom .marker-card::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: var(--primary-color);
}
.marker.tip-bottom:hover .marker-card {
    transform: translateX(-50%) translateY(0);
}

.marker-card h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 5px 0;
}

.marker-card p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.48);
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-actif    { background-color: rgba(218, 27, 27, 0.2);  color: #ff8888; border: 1px solid var(--secondary-color); }
.status-suspecte { background-color: rgba(200, 166, 0, 0.2);  color: #ffe580; border: 1px solid var(--third-color); }
.status-confirme { background-color: rgba(123, 52, 162, 0.2); color: #d4a0ff; border: 1px solid #7B34A2; }
.status-inactif  { background-color: rgba(255, 255, 255, 0.04); color: rgba(255,255,255,0.3); border: 1px solid rgba(255,255,255,0.1); }

/* Marqueur Boss (Giovanni) */
.marker.marker-boss .marker-dot {
    width: 20px;
    height: 20px;
    animation: bossPulse 1.5s ease-in-out infinite;
}

@keyframes bossPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(123, 52, 162, 0.7), 0 0 20px rgba(218, 27, 27, 0.5); }
    50% { box-shadow: 0 0 0 15px rgba(123, 52, 162, 0), 0 0 30px rgba(218, 27, 27, 0.8); }
}

.marker-card.card-boss {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(80, 0, 0, 0.95) 0%, rgba(14, 14, 30, 0.97) 100%);
}

.marker-card.card-boss h4 {
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.marker-card.card-boss h4 i {
    font-size: 1rem;
}

.marker-card p strong {
    color: var(--text-color);
}

/* ── Légende ─────────────────────────────────── */

.map-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: rgba(14, 14, 30, 0.88);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 12px 16px;
    z-index: 3;
}

.legend-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.38);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
}

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

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
}

/* ── Barre de statut ─────────────────────────── */

.map-statusbar {
    position: absolute;
    bottom: 0;
    right: 0;
    display: flex;
    align-items: stretch;
    z-index: 3;
    background-color: rgba(14, 14, 30, 0.88);
    border-top: 1px solid var(--primary-color);
    border-left: 1px solid var(--primary-color);
    border-radius: 8px 0 0 0;
}

.statusbar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.statusbar-item:last-child { border-right: none; }

.statusbar-item i { font-size: 1rem; }
.statusbar-item i.red    { color: var(--secondary-color); }
.statusbar-item i.gold   { color: var(--third-color); }
.statusbar-item i.purple { color: #9B54C2; }
.statusbar-item strong   { color: var(--text-color); }

/* ── Responsive ──────────────────────────────── */

@media (max-width: 700px) {
    .map-legend { bottom: 52px; }
    .statusbar-item { padding: 8px 12px; font-size: 0.72rem; }
}

@media (max-width: 480px) {
    .statusbar-item span  { display: none; }
    .statusbar-item       { padding: 8px 10px; }
    .map-legend           { display: none; }

    .marker-card {
        width: 180px;
        padding: 10px;
    }

    .marker-card h4 {
        font-size: 0.8rem;
    }

    .marker-card p {
        font-size: 0.7rem;
    }
}
