/* ============================================================
   LANDORA — PAGE LOCALISATION
   Carte immobilière / identité noire + or
   ============================================================ */

.landora-location-page {
    min-height: 100vh;
    margin: 0;
    background: #080808;
    color: #fff;
    overflow-x: hidden;
}

/* Isolation from the old global Landora.css rules (main p, main span, etc.) */
.landora-location-page .location-main,
.landora-location-page .location-main * {
    box-sizing: border-box;
}

.location-main {
    width: min(1380px, calc(100% - 48px));
    margin: 0 auto;
    padding: 156px 0 58px;
    position: relative;
    z-index: 1;
}

.location-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin: 0 0 24px;
}

.location-topbar > div:first-child {
    min-width: 0;
    max-width: 920px;
}

.location-topbar .eyebrow {
    margin: 0 0 8px !important;
    position: static !important;
    color: #c79b3b !important;
    letter-spacing: .22em;
    font-size: 13px !important;
    line-height: 1.2 !important;
    font-weight: 800;
}

.location-topbar h1 {
    margin: 0 !important;
    position: static !important;
    max-width: 900px;
    color: #f4f0e7 !important;
    font-family: Georgia, 'Times New Roman', serif !important;
    font-size: clamp(32px, 4vw, 54px) !important;
    line-height: 1.08 !important;
    font-weight: 700;
}

.location-topbar p:not(.eyebrow) {
    margin: 12px 0 0 !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    max-width: 780px;
    color: #aaa !important;
    font-family: inherit !important;
    font-size: 15px !important;
    line-height: 1.6 !important;
}

.location-result {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid #3a3020;
    border-radius: 999px;
    background: #11100d;
    color: #d6ad52;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}

.map-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(190px, .72fr) minmax(190px, .72fr);
    gap: 14px;
    margin: 0 0 14px;
    padding: 16px;
    border: 1px solid #252525;
    border-radius: 16px;
    background: #101010;
    box-shadow: 0 12px 35px rgba(0,0,0,.22);
}

.map-toolbar > div { min-width: 0; }

.map-toolbar label {
    display: block;
    margin: 0 0 7px !important;
    position: static !important;
    color: #a9a9a9 !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    font-weight: 600;
}

.map-search-row {
    display: flex;
    gap: 9px;
    align-items: stretch;
}

.map-toolbar input,
.map-toolbar select {
    width: 100% !important;
    min-width: 0;
    height: 44px !important;
    box-sizing: border-box;
    padding: 0 12px !important;
    border: 1px solid #303030 !important;
    border-radius: 10px !important;
    outline: none;
    background: #171717 !important;
    color: #f5f5f5 !important;
    font-family: inherit !important;
    font-size: 13px !important;
}

.map-toolbar input:focus,
.map-toolbar select:focus {
    border-color: #b08d3b !important;
    box-shadow: 0 0 0 2px rgba(176,141,59,.12);
}

.map-search-row button {
    flex: 0 0 auto;
    height: 44px !important;
    padding: 0 16px !important;
    border: 1px solid #b08d3b !important;
    border-radius: 10px !important;
    background: #b08d3b !important;
    color: #111 !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    cursor: pointer;
    white-space: nowrap;
}

.map-shell {
    position: relative;
    height: min(68vh, 720px);
    min-height: 500px;
    overflow: hidden;
    border: 1px solid #292929;
    border-radius: 18px;
    background: #111;
    box-shadow: 0 16px 45px rgba(0,0,0,.35);
}

#landora-map {
    width: 100%;
    height: 100%;
}

.map-message {
    width: 100%;
    margin: 10px 0 0;
    box-sizing: border-box;
    padding: 11px 15px;
    border-radius: 12px;
    background: #0d0d0d;
    border: 1px solid #8d6a27;
    box-shadow: 0 8px 22px rgba(0,0,0,.22);
    font-size: 13px;
    line-height: 1.45;
}

.map-error { color: #ff9b9b; }
.route-info { color: #e3c777; }
.map-shell [hidden],
.map-message[hidden] { display: none !important; }
.map-help {
    margin: 10px 2px 0 !important;
    position: static !important;
    color: #858585 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

.landora-map-marker {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: #c52b2b;
    box-shadow: 0 4px 14px rgba(0,0,0,.42);
    transform: rotate(-45deg);
    cursor: pointer;
}

.landora-map-marker span {
    transform: rotate(45deg);
    color: #fff !important;
    font-size: 17px;
    line-height: 1;
}

/* Point de regroupement affiché à l'échelle "ville" (zoom intermédiaire),
   à la place des piquets détaillés — ajout additif, ne modifie rien au
   marqueur ni à la popup ci-dessus. */
.landora-cluster-dot {
    border-radius: 50%;
    background: #c52b2b;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.45);
    pointer-events: none;
}

.mapboxgl-popup-content {
    padding: 12px !important;
    border-radius: 12px !important;
}

.map-property-card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 11px;
    color: #111;
}

.map-property-card img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
}

.map-property-card h3 { margin: 3px 0; font-size: 15px; line-height: 1.25; }
.map-property-card strong { color: #80611d; }
.map-property-card p { margin: 4px 0 8px !important; position: static !important; color: #444 !important; font-size: 12px !important; line-height: 1.3 !important; }
.map-property-type { color: #777 !important; font-size: 11px !important; }
.map-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.map-actions button { border: 0; border-radius: 7px; padding: 7px 9px; cursor: pointer; font-size: 11px; font-weight: 700; }
.map-view-btn { background: #171717; color: #fff; }
.map-route-btn { background: #b08d3b; color: #111; }

/* Sélecteur de localisation dans Sell.html */
.location-section {
    width: 100%;
    box-sizing: border-box;
    margin: 28px 0;
    padding: 22px;
    border: 1px solid #2b2b2b;
    border-radius: 18px;
    background: #0d0d0d;
}

.location-heading h3 { margin: 0 0 6px; color: #d6ad52; font-size: 24px; }
.location-heading p { margin: 0; color: #aaa; line-height: 1.5; }
.location-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.location-actions button { border: 1px solid #b08d3b; border-radius: 10px; background: #151515; color: #fff; padding: 10px 14px; cursor: pointer; font-weight: 700; }
.location-actions button:hover { background: #b08d3b; color: #111; }
.property-map { width: 100%; height: 410px; overflow: hidden; border: 1px solid #333; border-radius: 15px; background: #121212; }
.location-status { margin: 10px 0 17px; color: #aaa; font-size: 14px; line-height: 1.5; }
.location-status[data-type="success"] { color: #d6ad52; }
.location-status[data-type="error"] { color: #ff7777; }
.location-status[data-type="warning"] { color: #e0c36d; }
.location-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.location-fields > div { min-width: 0; }
.location-fields label { display: block; margin: 0 0 6px; color: #d0d0d0; font-size: 13px; }
.location-fields input { width: 100%; box-sizing: border-box; margin: 0; }

.route-mode-panel {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #292929;
    border-radius: 14px;
    background: #111;
}

.route-mode-panel[hidden] {
    display: none !important;
}

.route-mode-title {
    margin-bottom: 10px;
    color: #f5f5f5;
    font-size: 14px;
    font-weight: 800;
}

.route-mode-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.route-mode-btn {
    min-height: 68px;
    padding: 8px;
    border: 1px solid #303030;
    border-radius: 10px;
    background: #171717;
    color: #f5f5f5;
    cursor: pointer;
}

.route-mode-btn span {
    display: block;
    margin-bottom: 4px;
    font-size: 20px;
}

.route-mode-btn strong {
    display: block;
    font-size: 11px;
}

.route-mode-btn.active {
    border-color: #b08d3b;
    background: rgba(176, 141, 59, .12);
    color: #e3c777;
}

.route-start-btn {
    width: 100%;
    margin-top: 10px;
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    background: #b08d3b;
    color: #111;
    font-weight: 900;
    cursor: pointer;
}

@media (max-width: 600px) {
    .route-mode-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1100px) {
    .location-main { width: min(100% - 32px, 1050px); }
    .map-toolbar { grid-template-columns: minmax(0, 1fr) minmax(180px, .55fr) minmax(180px, .55fr); }
}

@media (max-width: 900px) {
    .location-main { width: min(100% - 28px, 760px); padding-top: 145px; }
    .location-topbar { align-items: flex-start; flex-direction: column; gap: 12px; }
    .map-toolbar { grid-template-columns: 1fr; }
    .location-result { white-space: normal; }
}

@media (max-width: 600px) {
    .location-main { width: calc(100% - 20px); padding-top: 125px; padding-bottom: 35px; }
    .location-topbar h1 { font-size: 31px !important; }
    .map-search-row { flex-direction: column; }
    .map-search-row button { width: 100%; }
    .map-shell { min-height: 440px; height: 62vh; border-radius: 14px; }
    .location-section { padding: 15px; }
    .property-map { height: 320px; }
    .location-fields { grid-template-columns: 1fr; }
    .map-property-card { grid-template-columns: 70px minmax(0,1fr); }
    .map-property-card img { width: 70px; height: 70px; }
}

/* Instructions détaillées de l'itinéraire */
.route-instructions {
    max-height: 360px;
    overflow-y: auto;
    color: #f5f5f5;
}

.route-instructions[hidden] {
    display: none !important;
}

.route-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 4px;
    border-bottom: 1px solid #292929;
}

.route-step:last-child {
    border-bottom: 0;
}

.route-step-number {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #b08d3b;
    color: #111;
    font-weight: 800;
}

.route-step strong {
    display: block;
    font-size: 13px;
    line-height: 1.4;
}

.route-step small {
    display: block;
    margin-top: 3px;
    color: #aaa;
    font-size: 11px;
}

.route-step-empty {
    padding: 12px 0;
    color: #aaa;
}
