/* ============================================ */
/* GLOBE PINGS — HTML Markers                   */
/* ============================================ */

/* Base ping */
.globe-ping {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.globe-ping:hover {
    transform: scale(1.3);
    z-index: 10;
}

/* Dot central — gradient comme les CTAs */
.ping-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: 2px solid white;
    box-shadow:
        0 2px 8px rgba(124, 58, 237, 0.25),
        0 0 0 1px rgba(124, 58, 237, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    transition: all 0.2s ease;
}

.globe-ping:hover .ping-dot {
    box-shadow:
        0 4px 16px rgba(124, 58, 237, 0.4),
        0 0 0 2px rgba(124, 58, 237, 0.15);
}

/* Ring anime (pulse) */
.ping-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border-radius: 50%;
    border: 2px solid rgba(124, 58, 237, 0.4);
    opacity: 0;
    z-index: 1;
}

/* Icone badge au-dessus du dot */
.ping-icon {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    background: white;
    padding: 2px 5px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    white-space: nowrap;
    pointer-events: none;
    line-height: 1.3;
}

/* ---- TYPES ---- */

/* Location only : petit dot discret */
.globe-ping--location .ping-dot {
    width: 10px;
    height: 10px;
}
.globe-ping--location .ping-ring {
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    animation: pingPulse 3s ease-out infinite;
}

/* Photo ou message : dot moyen */
.globe-ping--photo .ping-dot,
.globe-ping--message .ping-dot {
    width: 14px;
    height: 14px;
}
.globe-ping--photo .ping-ring,
.globe-ping--message .ping-ring {
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    animation: pingPulse 2.5s ease-out infinite;
}

/* Full (photo + message) : dot plus grand + double pulse */
.globe-ping--full .ping-dot {
    width: 16px;
    height: 16px;
}
.globe-ping--full .ping-ring {
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    animation: pingPulse 2s ease-out infinite;
}

/* ---- COULEURS PAR ÂGE (gradients) ---- */

/* Actif : gradient principal (violet → cyan) */
.ping--active .ping-dot {
    background: linear-gradient(135deg, #7c3aed 0%, #00d4ff 100%);
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}
.ping--active .ping-ring {
    border-color: rgba(124, 58, 237, 0.4);
}

/* Nouveau : gradient frais (emeraude → cyan) */
.ping--new .ping-dot {
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}
.ping--new .ping-ring {
    border-color: rgba(16, 185, 129, 0.4);
}

/* Expirant : gradient chaud (ambre → rose) + desature */
.ping--expiring .ping-dot {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
    opacity: 0.75;
}
.ping--expiring .ping-ring {
    border-color: rgba(245, 158, 11, 0.4);
}

/* ---- ANIMATION ---- */

@keyframes pingPulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    70% {
        transform: scale(3.5);
        opacity: 0;
    }
    100% {
        transform: scale(3.5);
        opacity: 0;
    }
}

/* ---- PING MODAL (immersive full-screen) ---- */

.ping-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.ping-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.ping-modal {
    position: relative;
    width: 90vw;
    max-width: 520px;
    max-height: 85vh;
    background: var(--bg-card);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.ping-modal-overlay.active .ping-modal {
    transform: scale(1) translateY(0);
}

/* Header */
.ping-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.ping-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 2rem;
    background: var(--bg-section-alt);
    color: var(--text-secondary);
}

.ping-modal-badge.ping-modal-badge--new {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.ping-modal-badge.ping-modal-badge--expiring {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.ping-modal-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.ping-modal-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
    margin-left: 0.75rem;
}

.ping-modal-close:hover {
    color: var(--text-primary);
    transform: scale(1.15);
}

/* Body */
.ping-modal-body {
    overflow-y: auto;
    flex: 1;
}

/* Photo */
.ping-modal-photo {
    width: 100%;
    background: var(--bg-section-alt);
}

.ping-modal-photo img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 55vh;
    object-fit: contain;
}

/* Message */
.ping-modal-message {
    padding: 1.25rem 1.5rem;
    font-size: 1.05rem;
    color: var(--text-primary);
    line-height: 1.7;
}

/* Location only (no photo, no message) */
.ping-modal-location-only {
    padding: 3rem 1.5rem;
    text-align: center;
}

.ping-modal-location-only .ping-modal-location-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.ping-modal-location-only p {
    font-size: 1rem;
    line-height: 1.6;
}

@media (max-width: 640px) {
    .ping-modal {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .ping-modal-message {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* ---- PING FORM (Level 1) ---- */

.ping-form-section {
    padding: 2rem 2rem 3rem;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.ping-form-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
}

.ping-form-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.ping-form-file-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    background: var(--bg-card);
}

.ping-form-file-label:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.ping-form-file-label.has-file {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.ping-form-input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    font-size: 0.9rem;
    background: var(--bg-card);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.ping-form-input:focus {
    border-color: var(--primary-color);
}

.ping-form-submit {
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: 2rem;
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.ping-form-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.ping-form-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ping-form-status {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    min-height: 1.2em;
}

.ping-form-status.success { color: var(--accent-color); }
.ping-form-status.error { color: #ef4444; }
.ping-form-status.waiting { color: var(--text-secondary); }

@media (max-width: 640px) {
    .ping-form-row {
        flex-direction: column;
    }
    .ping-form-input {
        width: 100%;
    }
    .ping-form-file-label,
    .ping-form-submit {
        width: 100%;
        justify-content: center;
    }
}

/* Section Hero */
.hero-with-map {
    position: relative;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-body);
}

/* Contenu du hero */
.hero-content-overlay {
    position: relative;
    text-align: center;
    max-width: 900px;
    padding: 4rem 2rem 2rem;
}

.hero-level-label {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.hero-title-main {
    font-family: 'Orbitron', monospace;
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--primary-color);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    animation: heroTitleAppear 1s ease-out;
}

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

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: heroSubtitleAppear 1s ease-out 0.3s both;
}

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


/* ---- GLOBE LAYER (scroll protection) ---- */

.globe-layer {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(240, 240, 245, 0.6);
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.globe-layer.hidden {
    opacity: 0;
    pointer-events: none;
}

.globe-layer-btn {
    padding: 0.8rem 2rem;
    border: 2px solid var(--primary-color);
    border-radius: 2rem;
    background: var(--bg-card);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.globe-layer-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* ---- LEVELS LIST ---- */

.info-section {
    padding: 0rem 2rem 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.levels-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.level-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    transition: all 0.2s ease;
}

a.level-row-link {
    text-decoration: none;
    color: inherit;
}

.level-row:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-card-hover);
}

.level-number {
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
    min-width: 55px;
}

.level-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.level-tag {
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    background: var(--gradient-primary);
    color: white;
    white-space: nowrap;
}

.section-cta {
    text-align: center;
}

@media (max-width: 640px) {
    .level-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem;
    }

    .level-tag {
        align-self: flex-end;
    }
}

/* ============================================ */
/* GLOBE SECTION                                */
/* ============================================ */

.globe-section {
    position: relative;
    background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-section-alt) 15%, var(--bg-section-alt) 85%, var(--bg-body) 100%);
    padding: 1rem 0 2rem;
}

.globe-wrapper {
    position: relative;
    width: 100%;
}

.globe-canvas {
    width: 100%;
    height: 55vh;
    min-height: 350px;
    max-height: 600px;
}

/* Overlays */
.globe-overlay-top {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
}

.globe-counter-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.globe-counter-badge span {
    color: var(--primary-color);
    font-weight: 700;
}

.globe-overlay-bottom {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.globe-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.4rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(12px);
    cursor: pointer;
}

.globe-btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.globe-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
    color: white;
    text-decoration: none;
}


/* === TABLET (768px+) === */
@media (min-width: 768px) {
    .globe-canvas {
        height: 60vh;
        min-height: 400px;
    }

    .globe-btn {
        padding: 0.8rem 1.6rem;
        font-size: 0.95rem;
    }
}

/* === DESKTOP (1024px+) === */
@media (min-width: 1024px) {
    .globe-canvas {
        height: 65vh;
        max-height: 700px;
    }
}

/* === MOBILE (< 480px) === */
@media (max-width: 480px) {
    .globe-canvas {
        height: 50vh;
        min-height: 300px;
    }

    .globe-overlay-bottom {
        bottom: 1rem;
    }

    .globe-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

/* Responsive - Tablet et Mobile standard */
@media (max-width: 768px) {
    .hero-with-map {
        min-height: auto;
    }

    .hero-title-main {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        line-height: 1.5;
    }

    .hero-content-overlay {
        padding: 5rem 1rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

}

/* Responsive - Très petit mobile */
@media (max-width: 480px) {
    .hero-with-map {
        min-height: auto;
    }

    .hero-title-main {
        font-size: 1.5rem;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 0.8rem;
    }

    .hero-content-overlay {
        padding: 5rem 1rem 1.5rem 1rem;
    }
}
