/* ==========================================================
   MAP PAGE — Premium redesign (scoped .map-page-v2)
   ========================================================== */

html.map-page-active {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto !important;
}

body.map-page-active {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: hidden !important;
    padding-bottom: 0 !important;
}

body.map-page-active main.container {
    overflow: visible !important;
}

.map-page-v2 {
    --map-border: #ECEAE5;
    --map-muted: #6B7170;
    --tmc-accent: #FDBB3A;
    --tmc-accent-2: #FDBB3A;
    --tmc-accent-hover: #F2AC22;
    --tmc-accent-active: #E49D16;
    --tmc-accent-soft: rgba(253, 187, 58, 0.14);
    --tmc-ink: #102A2D;
    background: #fff;
    font-family: var(--tmc-font-main, 'Inter', system-ui, sans-serif);
    padding-bottom: 120px;
    -webkit-font-smoothing: antialiased;
}

.map-page-v2 .map-container {
    width: min(100% - 48px, 1220px) !important;
    margin-inline: auto !important;
}

/* ── Hero stack (aligné campings) ─────────────────────────── */
.map-page-v2 .map-hero-stack {
    position: relative;
    width: 100%;
    margin: 24px 0 8px;
}

.map-page-v2 .map-hero {
    position: relative;
    width: 100%;
    margin: 0;
    background: transparent;
}

.map-page-v2 .map-hero-media {
    position: relative;
    width: 100%;
    min-height: 320px;
    border-radius: 32px;
    overflow: hidden;
    background: #0F2D3A;
}

.map-page-v2 .map-hero-media::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(15, 45, 58, 0.06) 0%,
        rgba(15, 45, 58, 0.22) 100%
    );
    pointer-events: none;
}

.map-page-v2 .map-hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.map-page-v2 .map-intro-panel {
    position: relative;
    z-index: 3;
    width: min(980px, calc(100% - 48px));
    margin: -52px auto 20px;
    padding: 18px 20px 18px 22px;
    background: #fff;
    border: 1px solid rgba(15, 45, 58, .08);
    border-left: 3px solid rgba(249, 168, 38, 0.45);
    border-radius: 24px;
    box-shadow: 0 18px 48px rgba(15, 45, 58, .12);
    font-family: var(--tmc-font-main, 'Inter', system-ui, sans-serif);
}

.map-page-v2 .map-intro-panel::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 18px;
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: var(--tmc-accent, #FDBB3A);
}

.map-page-v2 .map-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: fit-content;
    min-height: 32px;
    margin: 8px 0 10px;
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: rgba(255, 248, 235, 0.95);
    color: #102A2D;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    box-shadow: none;
    font-family: var(--tmc-font-main, 'Inter', system-ui, sans-serif);
}

.map-page-v2 .map-count-badge svg,
.map-page-v2 .map-count-badge i {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.map-page-v2 .map-intro-panel h1 {
    margin: 0 0 8px;
    padding-top: 8px;
    max-width: 720px;
    font-size: clamp(1.45rem, 3.5vw, 1.85rem);
    font-weight: 850;
    line-height: 1.1;
    letter-spacing: -.03em;
    color: #0F2D3A;
}

.map-page-v2 .map-intro-panel p,
.map-page-v2 .map-intro-note {
    margin: 0;
    max-width: 720px;
    font-size: clamp(0.92rem, 1.1vw, 0.98rem);
    line-height: 1.45;
    font-weight: 600;
    color: var(--map-muted, #6B7170);
}

.map-page-v2 .map-hero-content {
    display: none !important;
}

/* ── Map canvas card ──────────────────────────────────────── */
.map-page-v2 .map-canvas-card {
    margin-top: 8px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--map-border);
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(15, 45, 58, .08);
}

.map-page-v2 .map-canvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    padding: 6px 8px 0;
}

.map-page-v2 .map-canvas-title {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 850;
    letter-spacing: -.03em;
    color: #0F2D3A;
    font-family: var(--tmc-font-main, "Inter", sans-serif);
}

.map-page-v2 .map-canvas-help {
    margin: 0;
    max-width: 360px;
    text-align: right;
    font-size: 0.9rem;
    line-height: 1.35;
    font-weight: 600;
    color: rgba(15, 45, 58, .62);
    font-family: var(--tmc-font-main, "Inter", sans-serif);
}

.map-page-v2 .map-canvas-kicker {
    display: block;
    margin-bottom: 6px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9A6700;
}

.map-page-v2 .map-canvas-header h2 {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 850;
    letter-spacing: -.03em;
    color: #0F2D3A;
}

.map-page-v2 .map-canvas-note {
    margin: 0;
    max-width: 320px;
    font-size: .82rem;
    font-weight: 650;
    line-height: 1.45;
    color: var(--map-muted);
    text-align: right;
}

.map-page-v2 .map-canvas-wrap {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.map-page-v2 .map-canvas,
.map-page-v2 #map {
    width: 100%;
    height: 680px;
    border-radius: 16px;
    overflow: hidden;
    background: #e9eef2;
}

/* ── Géolocalisation — CTA au-dessus de la carte ─────────── */
.tmc-map-location-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
    padding: 16px;
    border: 1px solid var(--map-border, #ECEAE5);
    border-radius: 14px;
    background: #FFFFFF;
    box-shadow: 0 10px 30px rgba(16, 42, 45, 0.08);
}

.tmc-map-location-cta__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #102A2D;
    font-family: var(--tmc-font-main, "Inter", sans-serif);
}

.tmc-map-location-cta__text strong {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.tmc-map-location-cta__text span {
    font-size: 14px;
    line-height: 1.4;
    color: var(--map-muted, #6B7170);
    font-weight: 500;
}

.tmc-map-geolocate-btn {
    position: static !important;
    z-index: auto !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(16, 42, 45, 0.10);
    background: var(--tmc-accent, #FDBB3A);
    color: var(--tmc-ink, #102A2D);
    font-family: var(--tmc-font-main, "Inter", sans-serif);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
    white-space: nowrap;
    cursor: pointer;
    box-shadow:
        0 1px 2px rgba(16, 42, 45, 0.08),
        0 6px 16px rgba(16, 42, 45, 0.10);
    transition:
        background-color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.tmc-map-geolocate-btn:hover {
    background: var(--tmc-accent-hover, #F2AC22);
    transform: translateY(-1px);
    box-shadow:
        0 2px 4px rgba(16, 42, 45, 0.10),
        0 8px 18px rgba(16, 42, 45, 0.12);
}

.tmc-map-geolocate-btn:active {
    transform: translateY(0);
    box-shadow:
        0 1px 2px rgba(16, 42, 45, 0.08),
        0 4px 12px rgba(16, 42, 45, 0.10);
}

.tmc-map-geolocate-btn:disabled,
.tmc-map-geolocate-btn.is-loading {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.tmc-map-geolocate-btn svg,
.tmc-map-geolocate-btn i {
    color: currentColor;
}

.tmc-map-geolocate-btn__icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    color: currentColor;
    opacity: 0.9;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .tmc-map-location-cta {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 12px;
        padding: 14px;
        border-radius: 12px;
    }

    .tmc-map-geolocate-btn {
        width: 100%;
        min-height: 44px;
        padding: 0 14px;
        font-size: 14px;
        border-radius: 10px;
    }

    .map-page-v2 .map-canvas-card {
        border-radius: 16px;
    }

    .map-page-v2 .map-canvas-wrap,
    .map-page-v2 .map-canvas,
    .map-page-v2 #map {
        border-radius: 14px;
    }
}

body.map-page-active .gm-style .gm-style-iw-c:has(.tmc-user-location-popup) {
    padding: 6px 10px !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 20px rgba(16, 42, 45, 0.14) !important;
}

body.map-page-active .gm-style .gm-style-iw-c:has(.tmc-user-location-popup) .gm-style-iw-chr {
    display: none !important;
}

body.map-page-active .gm-style .gm-style-iw-c:has(.tmc-user-location-popup) .gm-style-iw-d {
    overflow: visible !important;
    padding: 0 !important;
}

body.map-page-active .tmc-user-location-popup {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 !important;
    margin: 0 !important;
}

body.map-page-active .tmc-user-location-popup__text {
    font-size: 14px;
    font-weight: 800;
    color: #102A2D;
    line-height: 1.1;
    white-space: nowrap;
}

body.map-page-active .tmc-user-location-popup__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #102A2D;
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    opacity: 0.7;
    cursor: pointer;
    flex: 0 0 auto;
}

body.map-page-active .tmc-user-location-popup__close:hover {
    opacity: 1;
}

/* ── Inter scope ──────────────────────────────────────────── */
.map-page-v2 {
    --tmc-font-main: "Inter", system-ui, sans-serif;
}

body.map-page-active,
body.map-page-active .tmc-header,
body.map-page-active .tmc-header *,
body.map-page-active .footer,
body.map-page-active .footer *,
body.map-page-active .mobile-bottom-nav,
body.map-page-active .mobile-bottom-nav *,
.map-page-v2,
.map-page-v2 h1,
.map-page-v2 h2,
.map-page-v2 h3,
.map-page-v2 p,
.map-page-v2 a,
.map-page-v2 button,
.map-page-v2 input,
.map-page-v2 textarea,
.map-page-v2 select,
.map-page-v2 label,
.map-page-v2 span,
.map-page-v2 div,
.map-page-v2 em,
.map-page-v2 strong {
    font-family: "Inter", system-ui, sans-serif !important;
}

body.map-page-active .gm-style .gm-style-iw-d,
body.map-page-active .gm-style .gm-style-iw-d * {
    font-family: "Inter", system-ui, sans-serif !important;
}

body.map-page-active .fa,
body.map-page-active .fas,
body.map-page-active .far,
body.map-page-active .fab,
body.map-page-active [class^="fa-"],
body.map-page-active [class*=" fa-"],
.map-page-v2 .fa,
.map-page-v2 .fas,
.map-page-v2 .far,
.map-page-v2 .fab,
.map-page-v2 [class^="fa-"],
.map-page-v2 [class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
}

/* ── Responsive (aligné campings) ─────────────────────────── */
@media (min-width: 1024px) {
    .map-page-v2 .map-hero-stack {
        max-width: 1220px;
        margin: 40px auto 8px !important;
    }

    .map-page-v2 .map-intro-panel {
        width: min(920px, calc(100% - 64px)) !important;
        max-width: 920px !important;
    }

    .map-page-v2 .map-hero-media {
        min-height: 360px;
    }
}

@media (min-width: 1200px) {
    .map-page-v2 .map-hero-media {
        min-height: 380px;
    }

    .map-page-v2 .map-intro-panel {
        width: min(980px, calc(100% - 64px)) !important;
        max-width: 980px !important;
    }
}

@media (max-width: 1024px) {
    .map-page-v2 .map-container {
        width: min(100% - 32px, 100%) !important;
    }

    .map-page-v2 .map-hero-media {
        border-radius: 28px;
    }

    .map-page-v2 .map-canvas {
        height: 580px;
    }
}

@media (max-width: 768px) {
    .map-page-v2 {
        padding-bottom: 100px;
    }

    .map-page-v2 .map-container {
        width: calc(100% - 24px) !important;
        max-width: none !important;
    }

    .map-page-v2 .map-hero-stack {
        width: 100%;
        margin: 14px 0 8px;
    }

    .map-page-v2 .map-hero-media {
        min-height: 300px;
        height: auto;
        max-height: none;
        border-radius: 22px;
    }

    .map-page-v2 .map-intro-panel {
        width: calc(100% - 32px) !important;
        max-width: none !important;
        padding: 18px;
        border-radius: 20px;
    }

    .map-page-v2 .map-intro-panel h1 {
        font-size: clamp(1.45rem, 5.5vw, 1.85rem);
    }

    .map-page-v2 .map-intro-panel p {
        font-size: 0.95rem;
        line-height: 1.45;
    }

    .map-page-v2 .map-count-badge {
        min-height: 30px;
        padding: 6px 10px;
        border-radius: 9px;
        font-size: 13px;
    }

    .map-page-v2 .map-canvas-card {
        margin-top: 8px !important;
        padding: 12px;
        border-radius: 16px;
    }

    .map-page-v2 .map-canvas-header {
        display: block;
        padding: 4px 4px 0;
        margin-bottom: 12px;
    }

    .map-page-v2 .map-canvas-help {
        margin-top: 6px;
        text-align: left;
        max-width: 100%;
        font-size: 0.82rem;
    }

    .map-page-v2 .map-canvas {
        height: min(62dvh, 520px);
        min-height: 420px;
        border-radius: 14px;
    }
}

@media (max-width: 600px) {
    .map-page-v2 .map-canvas,
    .map-page-v2 #map {
        min-height: 520px !important;
        height: 60vh !important;
    }
}

@media (max-width: 480px) {
    .map-page-v2 .map-hero-media {
        min-height: 300px;
    }
}

@media (max-width: 390px) {
    .map-page-v2 .map-canvas {
        min-height: 380px;
    }
}

/* Google Maps InfoWindow — scoped to map page */
body.map-page-active .map-info-window {
    font-family: var(--tmc-font-main, 'Inter', system-ui, sans-serif) !important;
    background: #fff;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 18px 48px rgba(15, 45, 58, .18);
    max-width: 330px;
    box-sizing: border-box;
}

body.map-page-active .map-info-card {
    display: grid;
    gap: 12px;
}

body.map-page-active .map-info-head {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
}

body.map-page-active .map-info-image {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    object-fit: cover;
    object-position: center;
    display: block;
    flex-shrink: 0;
    background: #f3f6f8;
}

body.map-page-active .map-info-text {
    min-width: 0;
}

body.map-page-active .map-info-title {
    font-size: 1rem;
    line-height: 1.15;
    font-weight: 800;
    color: #0F2D3A;
    letter-spacing: -.01em;
}

body.map-page-active .map-info-location {
    font-size: .82rem;
    color: rgba(15, 45, 58, .68);
    margin-top: 4px;
    line-height: 1.25;
}

body.map-page-active .map-info-meta {
    display: grid;
    gap: 8px;
}

body.map-page-active .map-info-price {
    font-size: .84rem;
    color: rgba(15, 45, 58, .78);
    line-height: 1.2;
}

body.map-page-active .map-info-price strong {
    color: #0F2D3A;
    font-weight: 800;
}

body.map-page-active .map-info-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

body.map-page-active .map-info-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(15, 45, 58, .05);
    color: rgba(15, 45, 58, .78);
    font-size: .68rem;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
}

body.map-page-active .map-info-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

body.map-page-active .map-info-btn {
    height: 42px;
    min-height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 650;
    font-size: .875rem;
    line-height: 1.1;
    text-decoration: none;
    box-sizing: border-box;
    padding: 0 10px;
    text-align: center;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

body.map-page-active .map-info-btn-primary {
    background: linear-gradient(135deg, #0F2D3A, #17485A);
    color: #fff;
    border: 1px solid transparent;
}

body.map-page-active .map-info-btn-secondary {
    background: #fff;
    color: #0F2D3A;
    border: 1px solid rgba(15, 45, 58, .16);
}

body.map-page-active .map-info-btn:hover {
    background: var(--tmc-accent-hover, #F2AC22);
    color: var(--tmc-ink, #102A2D);
    border-color: transparent;
    transform: translateY(-1px);
}

body.map-page-active .gm-style-iw {
    max-width: 330px !important;
    overflow: visible !important;
}

body.map-page-active .gm-style-iw-c {
    background: #fff !important;
    border-radius: 20px !important;
    padding: 0 !important;
    overflow: visible !important;
    max-height: none !important;
    box-shadow: 0 18px 48px rgba(15, 45, 58, .18) !important;
}

body.map-page-active .gm-style-iw-d {
    overflow: hidden !important;
    max-height: none !important;
    padding: 0 !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body.map-page-active .gm-style-iw-d::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

body.map-page-active .gm-style-iw-tc::after {
    background: #fff !important;
    box-shadow: -2px 2px 2px rgba(15, 45, 58, .06) !important;
}

body.map-page-active .gm-style-iw-chr {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    height: auto !important;
}

body.map-page-active .gm-style-iw-chr button {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, .88) !important;
    border: 1px solid rgba(15, 45, 58, .08) !important;
    opacity: .5 !important;
    padding: 0 !important;
    transition: opacity .15s ease, background .15s ease;
}

body.map-page-active .gm-style-iw-chr button span {
    width: 12px !important;
    height: 12px !important;
    margin: 5px !important;
}

body.map-page-active .gm-style-iw-chr button:hover {
    opacity: .82 !important;
    background: #fff !important;
}

@media (max-width: 699px) {
    body.map-page-active .gm-style-iw,
    body.map-page-active .gm-style-iw-c {
        max-width: calc(100vw - 32px) !important;
    }

    body.map-page-active .map-info-window {
        max-width: calc(100vw - 32px);
        padding: 14px;
    }

    body.map-page-active .map-info-head {
        grid-template-columns: 56px 1fr;
        gap: 10px;
    }

    body.map-page-active .map-info-image {
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
        border-radius: 12px;
    }

    body.map-page-active .map-info-title {
        font-size: .94rem;
    }

    body.map-page-active .map-info-btn {
        font-size: .8125rem;
        height: 42px;
        min-height: 42px;
        padding: 0 8px;
    }
}

/* Hero intro card — position (sans translateY) */
@media (min-width: 769px) {
    body.map-page-active .map-page-v2 .map-hero-stack > .map-intro-panel {
        transform: none !important;
        margin-top: -64px !important;
        margin-bottom: 48px !important;
    }

    body.map-page-active .map-page-v2 .map-canvas-card {
        margin-top: 0 !important;
    }
}

@media (max-width: 768px) {
    body.map-page-active .map-page-v2 .map-hero-stack > .map-intro-panel {
        transform: none !important;
        margin-top: -52px !important;
        margin-bottom: 36px !important;
    }

    body.map-page-active .map-page-v2 .map-canvas-card {
        margin-top: 0 !important;
    }
}

@media (max-width: 430px) {
    body.map-page-active .map-page-v2 .map-hero-stack > .map-intro-panel {
        transform: none !important;
        margin-top: -48px !important;
        margin-bottom: 34px !important;
    }
}
