/**
 * Store Locator — Univers Nuisibles
 * Styles front-end
 *
 * @package UnCore
 * @since   1.3.0
 */

.un-locator-wrap {
    width: 100%;
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ================================================================
   BARRE DE RECHERCHE
   ================================================================ */
.un-locator-search {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    align-items: stretch;
}

.un-locator-search-field {
    flex: 1;
    position: relative;
}

.un-locator-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.4;
    pointer-events: none;
    color: #374151;
}

#un-locator-input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    font-size: 15px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

#un-locator-input:focus {
    border-color: #2C5F2D;
    box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.1);
}

#un-locator-input::placeholder {
    color: #9CA3AF;
}

/* ================================================================
   SUGGESTIONS DROPDOWN
   ================================================================ */
.un-locator-suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #D1D5DB;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.un-locator-suggestion {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #F3F4F6;
    color: #111827;
    transition: background 0.15s;
}

.un-locator-suggestion:last-child {
    border-bottom: none;
}

.un-locator-suggestion:hover {
    background: #F0FDF4;
}

.un-suggestion-meta {
    color: #6B7280;
    font-size: 12px;
    margin-left: 4px;
}

/* ================================================================
   BOUTON GÉOLOC
   ================================================================ */
.un-locator-btn-geo {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    transition: all 0.2s;
}

.un-locator-btn-geo:hover {
    background: #F9FAFB;
    border-color: #2C5F2D;
    color: #2C5F2D;
}

.un-locator-btn-geo:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ================================================================
   CARTE
   ================================================================ */
#un-locator-map {
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    overflow: hidden;
}

/* ================================================================
   MARQUEUR AGENCE
   ================================================================ */
.un-marker-pin {
    width: 32px;
    height: 42px;
    display: block;
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
}

.un-marker-pin svg {
    width: 32px;
    height: 42px;
    display: block;
}

/* ================================================================
   MARQUEUR POSITION UTILISATEUR
   ================================================================ */
.un-user-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3B82F6;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #3B82F6;
}

/* ================================================================
   POPUP
   ================================================================ */
.un-popup-container .leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 0;
}

.un-popup-container .leaflet-popup-content {
    margin: 0;
    min-width: 260px;
}

.un-popup {
    padding: 16px 18px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.un-popup-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.3;
}

.un-popup-detail {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 4px;
    line-height: 1.4;
}

.un-popup-tel-wrap {
    margin: 8px 0;
}

.un-popup-tel {
    font-size: 15px;
    font-weight: 600;
    color: #2C5F2D;
    text-decoration: none;
}

.un-popup-tel:hover {
    text-decoration: underline;
}

.un-popup-stars {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
    padding: 5px 11px;
    background: #FEF3C7;
    border: 1px solid #F59E0B;
    border-radius: 999px;
    font-size: 14px;
    line-height: 1;
}

/* Lien page agence dans la popup */
.un-popup-agence-wrap {
    margin: 8px 0 12px;
}

.un-popup-agence-link {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: #2C5F2D;
    text-decoration: none;
    transition: color 0.2s;
}

.un-popup-agence-link:hover {
    color: #5b9f44;
    text-decoration: underline;
}

.un-popup-cta {
    display: inline-block;
    padding: 9px 20px;
    background: #2C5F2D;
    color: #fff !important;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.un-popup-cta:hover {
    background: #1E4620;
    color: #fff !important;
}

/* ================================================================
   BANDEAU AGENCE LA PLUS PROCHE
   ================================================================ */
.un-locator-banner {
    margin-top: 14px;
    padding: 14px 20px;
    border-radius: 8px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    font-size: 14px;
    color: #166534;
    line-height: 1.5;
}

.un-locator-banner a {
    color: #166534;
}

.un-banner-distance {
    font-weight: 400;
    opacity: 0.8;
}

/* Lien page agence dans le bandeau */
.un-banner-agence-link {
    font-weight: 600;
    color: #166534;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.un-banner-agence-link:hover {
    color: #14532d;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 640px) {
    .un-locator-search {
        flex-direction: column;
    }
    .un-locator-btn-geo {
        justify-content: center;
    }
    #un-locator-map {
        height: 320px !important;
    }
}

/* v2.9b - photo franchise dans le popup (retour client) */
.un-popup-head{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.un-popup .un-popup-photo{width:56px;height:56px;border-radius:50%;object-fit:cover;flex:0 0 56px;border:2px solid #fff;box-shadow:0 2px 6px rgba(0,0,0,.15);overflow:hidden}
.un-popup-head-txt{min-width:0}
.un-popup-head .un-popup-name{margin:0;line-height:1.2}
.un-popup-franchise{font-size:12px;color:#6B7280;margin-top:2px}
