/* ============================================
   MVP TIMER · Dots cliquables individuels
   ============================================ */

.mvp-tabs {
    display: flex; gap: 0;
    border-bottom: 1px solid var(--line);
    margin-bottom: 18px;
}
.mvp-tab {
    padding: 12px 24px;
    text-decoration: none; color: var(--paper-mute);
    font-family: 'Cinzel', serif; font-size: 13px; font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    display: flex; align-items: center; gap: 8px;
}
.mvp-tab:hover { color: var(--paper); background: rgba(0, 0, 0, 0.15); }
.mvp-tab.active {
    color: var(--gold-bright);
    border-bottom-color: var(--gold);
    background: rgba(240, 196, 99, 0.05);
}
.mvp-tab-count {
    background: var(--abyss); color: var(--paper-mute);
    padding: 2px 8px; border-radius: 10px;
    font-size: 10px; font-family: 'Nunito', sans-serif; font-weight: 600;
}
.mvp-tab.active .mvp-tab-count { background: var(--gold); color: var(--night-deep); }

.mvp-search-bar {
    display: flex; gap: 10px; margin-bottom: 16px;
    background: var(--abyss); padding: 10px 14px;
    border-radius: 6px; border: 1px solid var(--line);
}
.mvp-search-input {
    flex: 1; padding: 8px 12px;
    background: var(--night-deep); border: 1px solid var(--line);
    color: var(--paper); border-radius: 4px; font-size: 13px;
}
.mvp-search-input:focus { border-color: var(--gold); outline: none; }
.mvp-sort-select {
    padding: 8px 12px;
    background: var(--night-deep); border: 1px solid var(--line);
    color: var(--paper); border-radius: 4px; font-size: 12px; cursor: pointer;
}

/* ====== Liste MVP ====== */
.mvp-list {
    display: flex; flex-direction: column; gap: 0;
    background: var(--abyss); border: 1px solid var(--line);
    border-radius: 6px; overflow: hidden;
}

.mvp-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 16px;
    padding: 16px 18px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    transition: background 0.15s;
}
.mvp-row:last-child { border-bottom: none; }
.mvp-row:hover { background: rgba(0, 0, 0, 0.18); }

.mvp-row-left {
    display: flex; align-items: center; gap: 16px;
    min-width: 0;
}

.mvp-row-sprite {
    width: 88px; height: 88px;
    object-fit: contain;
    image-rendering: pixelated;
    flex-shrink: 0;
    padding: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid var(--line);
}

.mvp-row-name { min-width: 0; }
.mvp-row-name-link {
    color: var(--paper); text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 16px; font-weight: 600;
    display: block; line-height: 1.2;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 220px;
}
.mvp-row-name-link:hover { color: var(--gold-bright); }

.mvp-row-meta {
    display: flex; align-items: center; gap: 8px;
    margin-top: 6px; font-size: 11px; color: var(--paper-faint);
}

.mvp-badge {
    padding: 1px 6px; border-radius: 3px;
    font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em;
    font-weight: 700; line-height: 1.4;
}
.mvp-badge-mvp {
    background: linear-gradient(135deg, var(--magenta), var(--gold));
    color: white;
}
.mvp-badge-mini {
    background: var(--line); color: var(--paper-mute);
}

/* ====== TILES MAPS ====== */
.mvp-row-maps {
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: flex-end;
    max-width: 100%;
}

.mvp-map-tile {
    width: 100px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--night-deep);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Image map */
.mvp-map-tile-image {
    width: 100%;
    height: 100px;
    background: var(--abyss);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mvp-map-tile-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    opacity: 0.45;
}

.mvp-map-tile-image.no-image::after {
    content: '🗺️';
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; opacity: 0.3;
}

/* Badge count en haut-gauche */
.mvp-map-tile-count {
    position: absolute;
    top: 3px; left: 3px;
    z-index: 10;
    background: rgba(8, 6, 18, 0.9);
    color: var(--gold-bright);
    border: 1px solid var(--gold);
    padding: 1px 6px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Bandeau info (nom de la map) */
.mvp-map-tile-info {
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid var(--line);
}
.mvp-map-tile-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: var(--paper-mute);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* ====== DOTS OVERLAY ====== */
.mvp-dots-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    align-content: center;
    gap: 4px;
    padding: 6px;
}

/* Chaque dot est un button rond */
.mvp-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    transition: all 0.15s;
    padding: 0;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    background-clip: padding-box;
}

.mvp-dot:hover {
    transform: scale(1.15);
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
}

.mvp-dot-label {
    text-align: center;
    line-height: 1;
    pointer-events: none;
}

/* États couleur des dots */
.mvp-dot-red {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    border-color: #ff8a8a;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.mvp-dot-red_light {
    background: linear-gradient(135deg, #ff7777, #ff4444);
    border-color: #ffaaaa;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.mvp-dot-orange {
    background: linear-gradient(135deg, #f0c463, #d4a85a);
    border-color: var(--gold-bright);
    color: var(--night-deep);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.mvp-dot-orange_light {
    background: linear-gradient(135deg, rgba(240, 196, 99, 0.6), rgba(212, 168, 90, 0.4));
    border-color: rgba(240, 196, 99, 0.6);
    color: var(--gold-bright);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.mvp-dot-green {
    background: linear-gradient(135deg, #5fd17e, #3fa55c);
    border-color: var(--jade);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 12px rgba(95, 209, 126, 0.5), 0 2px 6px rgba(0, 0, 0, 0.5);
    animation: dotPulse 2s ease-in-out infinite;
}

.mvp-dot-gray {
    background: linear-gradient(135deg, rgba(60, 60, 80, 0.8), rgba(40, 40, 60, 0.8));
    border-color: rgba(120, 120, 140, 0.5);
    color: var(--paper-faint);
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(95, 209, 126, 0.5), 0 2px 6px rgba(0, 0, 0, 0.5); }
    50%      { box-shadow: 0 0 20px rgba(95, 209, 126, 0.8), 0 2px 6px rgba(0, 0, 0, 0.5); }
}

/* Si beaucoup de dots, on les rétrécit */
.mvp-dots-overlay:has(.mvp-dot:nth-child(5)) .mvp-dot {
    width: 26px; height: 26px; font-size: 8px;
}
.mvp-dots-overlay:has(.mvp-dot:nth-child(8)) .mvp-dot {
    width: 22px; height: 22px; font-size: 7px;
}

@media (max-width: 900px) {
    .mvp-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .mvp-row-maps { justify-content: flex-start; }
    .mvp-map-tile { width: 90px; }
    .mvp-map-tile-image { height: 90px; }
    .mvp-row-sprite { width: 72px; height: 72px; }
}

/* ====== MODAL ====== */
.mvp-modal {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.mvp-modal-overlay {
    position: absolute; inset: 0;
    background: rgba(8, 6, 18, 0.75); backdrop-filter: blur(4px); cursor: pointer;
}
.mvp-modal-content {
    position: relative;
    background: linear-gradient(180deg, var(--panel-from), var(--panel-to));
    border: 1px solid var(--gold); border-radius: 8px;
    width: 100%; max-width: 720px; max-height: 92vh;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: mvpModalIn 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
	top: 40px;
}
@keyframes mvpModalIn {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.mvp-modal-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 18px 20px; border-bottom: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.2);
}
.mvp-modal-body { flex: 1; overflow-y: auto; padding: 20px; }

.mvp-map-wrapper {
    position: relative; width: 100%;
    background: var(--abyss); border: 1px solid var(--line); border-radius: 6px;
    overflow: hidden; min-height: 300px;
    display: flex; align-items: center; justify-content: center;
}
.mvp-map-img {
    width: 100%; max-height: 480px;
    object-fit: contain; cursor: crosshair;
    image-rendering: pixelated;
    user-select: none; display: block;
}
.mvp-map-loading, .mvp-map-error {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--paper-mute); font-size: 13px; text-align: center; padding: 20px;
}
.mvp-map-error { color: var(--paper-faint); font-size: 14px; line-height: 1.6; }

.mvp-map-pin {
    position: absolute; width: 20px; height: 20px;
    transform: translate(-50%, -50%); pointer-events: none; z-index: 5;
}
.mvp-map-pin::before, .mvp-map-pin::after {
    content: ''; position: absolute; inset: 0;
    border-radius: 50%;
}
.mvp-map-pin::before {
    background: rgba(255, 107, 107, 0.4);
    animation: pinPulse 1.5s ease-out infinite;
}
.mvp-map-pin::after {
    width: 10px; height: 10px;
    inset: auto; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: var(--crimson);
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.8), inset 0 0 0 2px white;
}
@keyframes pinPulse {
    0%   { transform: scale(1);   opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* ====== ALERTES PROFIL ====== */
.mvp-alert-row {
    display: grid;
    grid-template-columns: 48px 1fr 110px repeat(3, 60px);
    gap: 8px; align-items: center;
    padding: 10px 12px;
    background: var(--abyss); border: 1px solid var(--line); border-radius: 4px;
    margin-bottom: 4px; font-size: 12px;
}
.mvp-alert-row:hover { border-color: var(--gold); }
.mvp-alert-row img {
    width: 44px; height: 44px;
    object-fit: contain; image-rendering: pixelated;
    background: rgba(0, 0, 0, 0.3); border-radius: 4px;
}
.mvp-alert-row select, .mvp-alert-row input {
    font-size: 11px; padding: 4px 6px;
    background: var(--night-deep); border: 1px solid var(--line);
    color: var(--paper); border-radius: 3px; width: 100%;
}
.mvp-alert-row label.cb {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--paper-mute); cursor: pointer;
    padding: 4px; border-radius: 3px;
    background: var(--night-deep); border: 1px solid var(--line);
}
.mvp-alert-row label.cb input[type=checkbox] {
    width: 14px; height: 14px; margin: 0; cursor: pointer;
}
.mvp-alert-row label.cb:has(input:checked) {
    background: rgba(240, 196, 99, 0.1);
    border-color: var(--gold); color: var(--gold-bright);
}
@media (max-width: 700px) {
    .mvp-alert-row {
        grid-template-columns: 44px 1fr;
        grid-template-rows: auto auto;
    }
    .mvp-alert-row > select, .mvp-alert-row > label.cb {
        grid-column: span 2;
    }
}
