/* Carte publique des lieux de méditation (Lot 2) */

.carte-lieux {
    width: 100%;
    height: 70vh;
    min-height: 420px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f5f5f5;
}

/* Popup d'un lieu */
.carte-popup {
    font-size: 13px;
    line-height: 1.4;
    max-width: 280px;
}

.carte-popup h4 {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 700;
}

.carte-popup .carte-popup-center {
    color: #777;
    font-size: 12px;
    margin: 0 0 8px 0;
}

.carte-popup .carte-popup-section {
    margin: 8px 0 0 0;
    padding-top: 6px;
    border-top: 1px solid #eee;
}

.carte-popup .carte-popup-section-title {
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

.carte-popup ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.carte-popup ul li {
    margin: 0;
}

.carte-popup a {
    word-break: break-all;
}

/* Badge "plus proche de vous" dans la popup */
.carte-popup-nearest {
    background: #e6f7f5;
    border: 1px solid #0d9488;
    border-radius: 4px;
    color: #0d9488;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 7px;
    margin-bottom: 6px;
    display: inline-block;
}

/* Boutons d'action dans la popup (itinéraire + partager) */
.carte-popup-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.carte-popup-route-btn,
.carte-popup-share-btn {
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    flex: none;
    transition: transform 0.12s, box-shadow 0.12s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.carte-popup-route-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
}

.carte-popup-route-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.22);
}

.carte-popup-share-btn {
    background: #d4eef8;
    border: 1px solid #b3dced;
}

.carte-popup-share-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.22);
    background: #b8e2f4;
}

/* Message d'erreur éventuel superposé à la carte */
.carte-lieux-error {
    margin-top: 10px;
}

/* L'attribution Leaflet doit rester lisible */
.leaflet-container .leaflet-control-attribution {
    font-size: 11px;
}

/* Marqueur logo Heartfulness (yogi) */
.carte-yogi-marker {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 50%;
    box-sizing: border-box;
    padding: 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* ---- Barre de départ (au-dessus de la carte) ---- */

.carte-controls-bar {
    margin-bottom: 10px;
}

.carte-depart-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.carte-btn-localiser {
    background: #fff;
    border: 1px solid #0d9488;
    border-radius: 4px;
    color: #0d9488;
    cursor: pointer;
    font-size: 13px;
    padding: 5px 12px;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.carte-btn-localiser:hover {
    background: #0d9488;
    color: #fff;
}

.carte-btn-localiser:disabled {
    opacity: 0.6;
    cursor: default;
}

.carte-controls-ou {
    color: #999;
    font-size: 12px;
    white-space: nowrap;
}

/* Wrapper champ adresse + suggestions + bouton */
.carte-adresse-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 180px;
    max-width: 380px;
}

.carte-adresse-input {
    border: 1px solid #ccc;
    border-radius: 4px;
    flex: 1;
    font-size: 13px;
    padding: 5px 8px;
    outline: none;
}

.carte-adresse-input:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
}

.carte-adresse-submit {
    background: #0d9488;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    padding: 5px 10px;
    white-space: nowrap;
}

.carte-adresse-submit:hover {
    background: #0b7a70;
}

/* Liste de suggestions d'adresse */
.carte-adresse-suggestions {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    left: 0;
    list-style: none;
    margin: 0;
    max-height: 220px;
    overflow-y: auto;
    padding: 0;
    position: absolute;
    right: 44px;
    top: 100%;
    z-index: 900;
}

.carte-adresse-suggestions li {
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 12px;
    padding: 7px 10px;
}

.carte-adresse-suggestions li:last-child {
    border-bottom: none;
}

.carte-adresse-suggestions li:hover {
    background: #f0faf9;
    color: #0d9488;
}

/* Section B : position connue */
.carte-depart-label {
    background: #e6f7f5;
    border: 1px solid #0d9488;
    border-radius: 4px;
    color: #0d7060;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
}

.carte-depart-clear {
    background: transparent;
    border: 1px solid #ccc;
    border-radius: 50%;
    color: #888;
    cursor: pointer;
    font-size: 12px;
    height: 24px;
    line-height: 1;
    padding: 0;
    width: 24px;
}

.carte-depart-clear:hover {
    background: #fee;
    border-color: #d44;
    color: #d44;
}

.carte-nearest-info {
    color: #555;
    font-size: 12px;
}

.carte-nearest-info strong {
    color: #0d9488;
}

/* Bouton cliquable "Plus proche : Nom (dist)" */
.carte-nearest-link {
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    text-decoration: underline dotted #0d9488;
    color: inherit;
}

.carte-nearest-link:hover {
    color: #0d9488;
    text-decoration: underline solid #0d9488;
}

/* Lieu privé : "Plus proche" affiché sans lien (coordonnées anonymisées). */
.carte-nearest-text {
    color: inherit;
}

/* Message d'erreur dans la barre */
.carte-depart-error {
    color: #a00;
    font-size: 12px;
    margin-top: 4px;
    width: 100%;
}

/* ---- Panneau itinéraire (superposé à la carte en bas) ---- */

.carte-it-panel {
    background: #fff;
    border-radius: 6px;
    bottom: 36px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
    left: 10px;
    padding: 10px 14px;
    position: absolute;
    right: 10px;
    z-index: 800;
    max-width: 460px;
}

.carte-it-header {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.carte-it-titre {
    flex: 1;
}

.carte-it-lieu {
    font-size: 13px;
    font-weight: 700;
    color: #222;
}

.carte-it-close {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    margin-left: 8px;
    padding: 0 2px;
}

.carte-it-close:hover {
    color: #444;
}

.carte-it-body {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.carte-it-summary {
    font-size: 14px;
    font-weight: 700;
    color: #0d9488;
    white-space: nowrap;
}

.carte-it-sep {
    color: #ccc;
    margin: 0 4px;
}

.carte-it-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Boutons Voiture / Piéton */
.carte-it-mode {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.carte-it-mode-btn {
    background: #f7f7f7;
    border: none;
    color: #555;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 10px;
    transition: background 0.12s;
}

.carte-it-mode-btn:first-child {
    border-right: 1px solid #ddd;
}

.carte-it-mode-btn.active {
    background: #0d9488;
    color: #fff;
}

.carte-it-mode-btn:not(.active):hover {
    background: #e8f5f4;
}

/* Lien "Lancer la navigation" */
.carte-it-navlink {
    background: #fff;
    border: 1px solid #0d9488;
    border-radius: 4px;
    color: #0d9488;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    text-decoration: none;
    white-space: nowrap;
}

.carte-it-navlink:hover {
    background: #0d9488;
    color: #fff;
    text-decoration: none;
}

/* ---- Responsive mobile (≤ 767px) ---- */

@media (max-width: 767px) {
    .carte-lieux {
        height: 60vh;
        min-height: 300px;
    }

    .carte-depart-section {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .carte-btn-localiser {
        width: 100%;
    }

    .carte-controls-ou {
        text-align: center;
    }

    .carte-adresse-wrap {
        max-width: 100%;
        min-width: 0;
    }

    .carte-adresse-submit {
        padding: 5px 8px;
        font-size: 12px;
    }

    .carte-it-panel {
        left: 6px;
        right: 6px;
        bottom: 30px;
        padding: 8px 10px;
    }

    .carte-it-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .carte-it-actions {
        width: 100%;
    }

    .carte-it-mode {
        flex: 1;
    }

    .carte-it-mode-btn {
        flex: 1;
        text-align: center;
    }

    .carte-it-navlink {
        flex: 1;
        text-align: center;
        display: inline-block;
    }

    .carte-popup {
        max-width: 240px;
    }

    .carte-popup-actions {
        gap: 8px;
    }
}
