/* TC Map — styles */

.tc-map-instance {
    position: relative;
    min-height: 500px;
}

/* ── Filters ──────────────────────────────────────────────────────────── */
.tcm-filters {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    max-width: calc(100% - 60px);
}

.tcm-fb {
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 13px;
    font-family: Georgia, 'Times New Roman', serif;
    cursor: pointer;
    color: #666;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    line-height: 1.4;
    white-space: nowrap;
}

.tcm-fb:hover {
    border-color: var(--c, #8B3A1A);
    color: var(--c, #8B3A1A);
}

.tcm-fb.active {
    background: var(--c, #1a1612);
    border-color: var(--c, #1a1612);
    color: #fff;
}

.tcm-all { --c: #1a1612; }

/* ── Filtres hébergement (selects) ───────────────────────────────────── */
.tcm-filters--hebergement {
    gap: 8px;
}

.tcm-select {
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 13px;
    font-family: Georgia, 'Times New Roman', serif;
    color: #333;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.tcm-select:focus {
    outline: none;
    border-color: #B08968;
}

/* ── Legend ───────────────────────────────────────────────────────────── */
.tcm-legend {
    position: absolute;
    bottom: 36px;
    left: 12px;
    z-index: 10;
    background: rgba(255,255,255,0.92);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-family: Georgia, 'Times New Roman', serif;
}

.tcm-leg-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #333;
}

.tcm-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1.5px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
}

/* ── Popup ────────────────────────────────────────────────────────────── */
.tcm-popup-wrap .mapboxgl-popup-content {
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.22);
    min-width: 240px;
    max-width: 300px;
}

.tcm-popup-wrap .mapboxgl-popup-tip {
    border-top-color: transparent;
}

.tcm-popup-wrap .mapboxgl-popup-close-button {
    font-size: 20px;
    color: #fff;
    top: 6px;
    right: 8px;
    background: rgba(0,0,0,0.35);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 22px;
    text-align: center;
    padding: 0;
    z-index: 2;
}

.tcm-popup-wrap .mapboxgl-popup-close-button:hover {
    background: rgba(0,0,0,0.6);
    color: #fff;
}

/* Le popup entier est cliquable (un seul lien par popup) — on neutralise
   les styles de lien par défaut hérités du tag <a>. position:relative sert
   d'ancrage au bouton "+" carnet de voyage (.tcm-mv-btn-wrap ci-dessous). */
.tcm-popup--link {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.tcm-popup {
    position: relative;
}

/* Bouton "+" carnet de voyage — coin haut-gauche de l'image, symétrique au
   bouton de fermeture natif Mapbox (haut-droite) pour ne jamais se chevaucher. */
.tcm-mv-btn-wrap {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
}

.tcm-pi {
    display: block;
    width: 100%;
    height: 148px;
    object-fit: cover;
}

.tcm-pb {
    padding: 13px 15px 15px;
}

.tcm-pm {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 7px;
    flex-wrap: wrap;
}

.tcm-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
    font-family: Georgia, serif;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.tcm-badge--lieu        { background: #8B3A1A; }
.tcm-badge--agriturismo { background: #4A7C59; }
.tcm-badge--activite    { background: #C9973A; }
.tcm-badge--hebergement { background: #B08968; }
.tcm-badge--restaurant  { background: #C1440E; }
.tcm-badge--vin         { background: #7B1E3A; }
.tcm-badge--bateau      { background: #0B3C5D; }

.tcm-st {
    font-size: 11px;
    color: #888;
    font-family: Georgia, serif;
    flex: 1 1 auto;
}

.tcm-score {
    font-size: 12px;
    color: #C9973A;
    font-family: Georgia, serif;
    margin-left: auto;
    white-space: nowrap;
}

.tcm-pn {
    margin: 0 0 7px;
    font-size: 15px;
    font-family: Georgia, 'Times New Roman', serif;
    color: #1a1612;
    font-weight: normal;
    line-height: 1.3;
}

.tcm-pd {
    margin: 0 0 11px;
    font-size: 12.5px;
    color: #555;
    line-height: 1.55;
    font-family: Georgia, serif;
}

.tcm-prix {
    display: block;
    font-size: 14px;
    color: #1a1612;
    font-weight: bold;
    font-family: Georgia, serif;
    margin-bottom: 10px;
}

.tcm-pl {
    display: inline-block;
    font-size: 13px;
    color: #8B3A1A;
    font-family: Georgia, serif;
    text-decoration: none;
    border-bottom: 1px solid rgba(139,58,26,0.35);
    transition: border-color 0.15s;
}

.tcm-popup--link:hover .tcm-pl {
    border-color: #8B3A1A;
}

.tcm-pl--cta {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #B08968;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    width: fit-content;
}

.tcm-popup--link:hover .tcm-pl--cta {
    background: #96714f;
    border: none;
}

.tcm-partner-logo {
    height: 16px;
    width: auto;
    max-width: 60px;
    object-fit: contain;
    background: #fff;
    border-radius: 3px;
    padding: 1px 3px;
}

/* ── Mobile ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .tcm-filters {
        top: 8px;
        left: 8px;
        right: 48px;
    }

    .tcm-fb {
        padding: 4px 11px;
        font-size: 12px;
    }

    .tcm-select {
        padding: 4px 10px;
        font-size: 12px;
    }

    .tcm-legend {
        bottom: 44px;
        left: 8px;
        padding: 8px 12px;
    }

    .tcm-popup-wrap .mapboxgl-popup-content {
        min-width: 220px;
    }
}
