/* ============================================
   CARTE — Modern full-screen map layout
   ============================================ */

/* Full-screen app container */
.carte-app {
    position: relative;
    height: calc(100dvh - 77px);
    display: flex;
    overflow: hidden;
}

/* Hide footer/disclaimer on carte page */
.carte-app ~ .legal-disclaimer,
.carte-app ~ .footer { display: none; }

/* ---- FLOATING PANEL ---- */
.carte-panel {
    position: absolute;
    top: 16px;
    left: 16px;
    bottom: 16px;
    width: 400px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.panel-title svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.panel-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    align-items: center;
    justify-content: center;
    background: var(--bg-2);
    transition: all 0.2s;
}

.panel-toggle svg { width: 18px; height: 18px; }

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ---- FIELDS ---- */
.field { position: relative; }

.field-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.field-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--bg-2);
    border: 2px solid transparent;
    transition: all 0.2s;
}

.field-input-wrap:focus-within {
    background: white;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.08);
}

.field-input-wrap svg {
    width: 18px;
    height: 18px;
    color: var(--text-3);
    flex-shrink: 0;
}

.field-input-wrap input {
    flex: 1;
    min-width: 0;
    border: none;
    background: none;
    outline: none;
    font-family: var(--font);
    font-size: 15px;
    color: var(--text);
}

.field-input-wrap input::placeholder { color: var(--text-3); }

.geo-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: white;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.geo-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.geo-btn:hover svg { color: white; }
.geo-btn svg { width: 16px; height: 16px; transition: color 0.2s; }

/* Autocomplete */
.autocomplete-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 14px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    z-index: 50;
    overflow: hidden;
    display: none;
}

.autocomplete-list.open { display: block; }

.ac-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border);
}

.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: var(--bg-2); }
.ac-main { font-size: 14px; font-weight: 500; color: var(--text); }
.ac-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }

/* Multi-select dropdown */
.multiselect {
    position: relative;
}

.multiselect-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--bg-2);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.multiselect-trigger:hover { border-color: var(--border); }
.multiselect.open .multiselect-trigger {
    background: white;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.08);
}
.multiselect.open .multiselect-trigger svg { transform: rotate(180deg); }

.multiselect-label {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multiselect-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 14px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    z-index: 100;
    overflow: hidden;
}

.multiselect.open .multiselect-dropdown { display: block; }

.multiselect-search-wrap {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.multiselect-search {
    width: 100%;
    border: none;
    background: var(--bg-2);
    border-radius: 8px;
    padding: 8px 12px;
    font-family: var(--font);
    font-size: 13px;
    outline: none;
    color: var(--text);
}

.multiselect-options {
    max-height: 220px;
    overflow-y: auto;
}

.multiselect-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.multiselect-option:last-child { border-bottom: none; }
.multiselect-option:hover { background: var(--bg-2); }

.multiselect-option.selected {
    background: var(--bg-2);
}

.multiselect-option.selected::after {
    content: '✓';
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
}

.ms-text {
    flex: 1;
    color: var(--text);
    font-weight: 500;
}

.ms-count {
    font-size: 11px;
    color: var(--text-3);
    font-family: var(--font-mono);
    background: var(--bg-2);
    padding: 2px 8px;
    border-radius: 100px;
}

/* Active layer pills */
.active-layers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.active-layers:empty { display: none; }

.layer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 100px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    animation: pillIn 0.25s ease-out;
}

@keyframes pillIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.layer-pill .pill-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

.layer-pill button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.layer-pill button:hover { opacity: 1; }

/* Filters row */
.filters-row {
    display: flex;
    gap: 12px;
}

.field-grow { flex: 1; min-width: 0; }
.field-small { width: 100px; flex-shrink: 0; }

.field-select {
    width: 100%;
    padding: 14px 40px 14px 16px;
    border-radius: 12px;
    background: var(--bg-2);
    border: 2px solid transparent;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m19 9-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    transition: all 0.2s;
    cursor: pointer;
}

.field-select:focus {
    background-color: white;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.08);
}

/* Search button */
.search-btn-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    background: var(--accent);
    color: white;
    border: none;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
}

.search-btn-main:hover {
    background: var(--accent-3);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 91, 255, 0.3);
}

.search-btn-main svg { width: 18px; height: 18px; }

/* ---- RESULTS ---- */
.results-zone {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
    flex-shrink: 0;
}

.results-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
}

.results-radius {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--accent);
    padding: 2px 8px;
    background: rgba(99, 91, 255, 0.06);
    border-radius: 100px;
    font-weight: 600;
}

.results-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

/* Result card — compact */
.r-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
    background: var(--bg-2);
}

.r-card:hover {
    background: white;
    border-color: var(--border);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.r-card.active {
    background: white;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99, 91, 255, 0.1);
}

.r-num {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--font-mono);
}

.r-body { flex: 1; min-width: 0; }

.r-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.r-spec {
    font-size: 11px;
    color: var(--accent);
    font-weight: 500;
}

.r-addr {
    font-size: 11px;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.r-phone {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--accent);
    font-family: var(--font-mono);
    margin-top: 2px;
    padding: 2px 6px;
    background: rgba(99, 91, 255, 0.06);
    border-radius: 4px;
    transition: background 0.2s;
}

.r-phone:hover { background: rgba(99, 91, 255, 0.12); }

.r-dist {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    font-family: var(--font-mono);
    flex-shrink: 0;
    text-align: right;
    line-height: 1;
}

.r-dist small {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-3);
    margin-top: 1px;
}

/* Loading / empty */
.results-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 0;
    color: var(--text-3);
    font-size: 14px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.results-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.results-empty p {
    font-size: 14px;
    color: var(--text-2);
    margin-bottom: 12px;
}

.btn-expand-search {
    padding: 10px 20px;
    border-radius: 10px;
    background: var(--accent);
    color: white;
    border: none;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-expand-search:hover { background: var(--accent-3); }

/* ---- MAP ---- */
.carte-map {
    flex: 1;
    position: relative;
}

/* Map markers */
.map-marker {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--accent, #635bff);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    font-family: monospace;
    border: 2px solid white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.15s;
}

.map-marker:hover {
    transform: scale(1.15);
    z-index: 10;
}

/* Popup */
.popup-card {
    display: flex;
    gap: 12px;
    padding: 4px;
}

.popup-num {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--accent, #635bff);
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: monospace;
}

.popup-body { flex: 1; min-width: 0; }
.popup-name { font-size: 14px; font-weight: 700; color: #0a2540; margin-bottom: 2px; }
.popup-spec { font-size: 12px; color: #635bff; font-weight: 600; margin-bottom: 6px; }
.popup-addr { font-size: 12px; color: #425466; line-height: 1.4; margin-bottom: 4px; }
.popup-phone { display: block; font-size: 12px; color: #635bff; font-family: monospace; margin-bottom: 4px; }
.popup-dist { font-size: 13px; font-weight: 700; color: #0a2540; font-family: monospace; }

.maplibregl-popup-content { border-radius: 14px !important; padding: 14px !important; box-shadow: 0 8px 32px rgba(0,0,0,0.15) !important; }
.maplibregl-popup-close-button { font-size: 18px; padding: 4px 8px; }

/* ---- PINNED ZONE ---- */
.pinned-zone {
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.pinned-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.pinned-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.pinned-title svg { color: #10b981; }

.btn-termine {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    background: #10b981;
    color: white;
    border: none;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-termine:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.pinned-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pinned-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--bg-2);
    cursor: pointer;
    transition: all 0.15s;
}

.pinned-card:hover {
    background: white;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.pinned-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pinned-info {
    flex: 1;
    min-width: 0;
}

.pinned-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pinned-spec {
    font-size: 11px;
    font-weight: 500;
}

.pinned-dist {
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-2);
    flex-shrink: 0;
}

.pinned-remove {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-3);
    transition: all 0.15s;
    flex-shrink: 0;
}

.pinned-remove:hover {
    background: #fef2f2;
    color: #ef4444;
}

/* ---- PIN BUTTON on browse cards ---- */
.pin-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: none;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-3);
    flex-shrink: 0;
    transition: all 0.15s;
}

.pin-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ---- PINNED MARKER on map ---- */
.pinned-marker {
    animation: pinnedPop 0.3s ease-out;
}

@keyframes pinnedPop {
    0% { transform: scale(0.5); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ---- RECAP OVERLAY ---- */
.recap-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.recap-map {
    width: 100%;
    height: 250px;
    border-radius: 12px;
    margin: 16px 0;
    overflow: hidden;
}

.recap-share-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    border-top: 1px solid rgba(0,0,0,0.06);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.btn-share-icon {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 16px;
    border-radius: 10px;
    background: #f6f9fc;
    border: 1px solid rgba(0,0,0,0.06);
    font-size: 13px;
    font-weight: 500;
    color: #425466;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-share-icon:hover { background: #635bff; color: white; border-color: #635bff; }
.btn-share-icon:hover svg { stroke: white; fill: white; }
.btn-share-icon svg { flex-shrink: 0; }

/* Print-ready class added by JS before window.print() */
body.printing-recap .nav,
body.printing-recap .carte-panel,
body.printing-recap .carte-map,
body.printing-recap .footer,
body.printing-recap .legal-disclaimer,
body.printing-recap .cookie-banner,
body.printing-recap .cursor-glow,
body.printing-recap .grain-overlay,
body.printing-recap .mobile-menu { display: none !important; }

body.printing-recap .carte-app { height: auto !important; overflow: visible !important; display: block !important; min-height: 0 !important; }
body.printing-recap main { min-height: 0 !important; padding: 0 !important; margin: 0 !important; }

body.printing-recap .recap-overlay {
    position: static !important;
    display: block !important;
    background: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.printing-recap .recap-panel {
    max-width: 100% !important;
    max-height: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
}

body.printing-recap .recap-content { overflow: visible !important; max-height: none !important; padding: 16px !important; }
body.printing-recap .recap-header { padding: 16px !important; }
body.printing-recap .recap-step { padding-bottom: 12px !important; }
body.printing-recap .recap-map-print-img { max-height: 200px !important; object-fit: contain !important; }
body.printing-recap .recap-close,
body.printing-recap .recap-actions,
body.printing-recap .recap-share-row { display: none !important; }
body.printing-recap .recap-map-print-img { display: block !important; }
body.printing-recap #recapMapContainer { display: none !important; }

@media print {
    body, html { margin: 0 !important; padding: 0 !important; }
    body.printing-recap .nav,
    body.printing-recap .carte-panel,
    body.printing-recap .carte-map { display: none !important; }
    body.printing-recap .recap-summary { gap: 8px !important; }
    body.printing-recap .recap-stat-num { font-size: 20px !important; }
}

.recap-panel {
    background: white;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.recap-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
}

.recap-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin: 0;
}

.recap-header h2 svg { color: var(--accent); }

.recap-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-2);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-2);
    transition: all 0.15s;
}

.recap-close:hover { background: #fef2f2; color: #ef4444; }

.recap-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}

.recap-address {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-2);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 20px;
}

.recap-address svg { color: var(--accent); flex-shrink: 0; }

.recap-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 24px;
}

.recap-step {
    display: flex;
    gap: 14px;
    position: relative;
    padding-bottom: 20px;
}

.recap-step:last-child { padding-bottom: 0; }
.recap-step:last-child .recap-step-line { display: none; }

.recap-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: white;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
}

.recap-step-line {
    position: absolute;
    left: 13px;
    top: 28px;
    bottom: 0;
    width: 2px;
    opacity: 0.3;
}

.recap-step-body { flex: 1; }

.recap-step-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.recap-step-spec {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.recap-step-addr {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.4;
    margin-bottom: 2px;
}

.recap-step-phone {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    margin-bottom: 2px;
}

.recap-step-phone svg { color: var(--accent); }
.recap-step-phone a { color: var(--accent); text-decoration: none; font-family: var(--font-mono); }

.recap-step-dist {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    font-family: var(--font-mono);
}

.recap-summary {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg-2);
    border-radius: 12px;
}

.recap-stat {
    flex: 1;
    text-align: center;
}

.recap-stat-num {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--accent);
    font-family: var(--font-mono);
    line-height: 1;
    margin-bottom: 4px;
}

.recap-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.recap-actions {
    display: flex;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.recap-btn-secondary {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    background: var(--bg-2);
    color: var(--text);
    border: none;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.recap-btn-secondary:hover { background: var(--border); }

.recap-btn-primary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    background: var(--accent);
    color: white;
    border: none;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.recap-btn-primary:hover {
    background: var(--accent-3);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 91, 255, 0.3);
}

/* ---- BROWSE HEADER ---- */
.browse-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .carte-app {
        flex-direction: column;
        height: auto;
        min-height: calc(100dvh - 65px);
    }

    .carte-panel {
        position: relative;
        top: auto;
        left: auto;
        bottom: auto;
        width: 100%;
        border-radius: 0;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
        max-height: none;
    }

    .carte-panel { overflow: visible; }
    .carte-panel.collapsed .panel-body { display: none; }
    .carte-panel.collapsed .panel-toggle svg { transform: rotate(180deg); }
    .panel-body { overflow: visible; }

    .panel-header { padding: 16px 20px; }
    .panel-title { font-size: 16px; }
    .panel-toggle { display: flex; }

    .panel-body { padding: 16px 20px; gap: 12px; }

    .field-input-wrap { padding: 12px 14px; }
    .field-input-wrap input { font-size: 16px; } /* prevent iOS zoom */
    .field-select { padding: 12px 36px 12px 14px; font-size: 16px; }
    .field-small { width: 100px; }
    .multiselect-trigger { padding: 12px 14px; }
    .multiselect-search { font-size: 16px; }
    .search-btn-main { padding: 14px; font-size: 15px; }

    .carte-map {
        height: 55vh;
        min-height: 300px;
    }

    /* Results below map */
    .results-zone {
        background: white;
        padding: 0 20px 20px;
    }

    .results-scroll { max-height: none; }

    .r-card { padding: 14px; }
    .r-name { font-size: 14px; }
    .r-dist { font-size: 16px; }
    .r-num { width: 28px; height: 28px; font-size: 12px; border-radius: 8px; }

    /* Map markers smaller on mobile */
    .map-marker { width: 26px; height: 26px; font-size: 11px; border-radius: 8px; }

    .maplibregl-popup-content { max-width: 260px !important; }

    /* Recap responsive */
    .recap-panel { max-width: 100%; border-radius: 16px; }
    .recap-header { padding: 20px; }
    .recap-content { padding: 20px; }
    .recap-actions { padding: 16px 20px; }
    .recap-summary { flex-direction: column; gap: 12px; }
}

@media (max-width: 480px) {
    .panel-header { padding: 12px 16px; }
    .panel-body { padding: 12px 16px; gap: 10px; }
    .filters-row { flex-direction: column; gap: 10px; }
    .field-small { width: 100%; }
    .r-card { gap: 10px; padding: 12px; }
    .r-dist { font-size: 14px; }
}
