/* ============================================
   CrecyPlage — Carte Leaflet
   ============================================ */

.crecy-map-wrap {
    position: relative; margin-bottom: var(--gap-md, 1.5rem);
}
.crecy-map {
    width: 100%; height: 480px;
    border-radius: var(--radius-md, 16px);
    overflow: hidden;
    box-shadow: var(--shadow-soft, 0 8px 28px -12px rgba(7, 59, 76, 0.18));
    background: var(--sable-clair, #FBF3DD);
}
@media (max-width: 720px) { .crecy-map { height: 360px; } }

.crecy-map__legend {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.78rem;
}
.legend-item {
    display: inline-flex; align-items: center; gap: 0.4em;
    padding: 0.3em 0.8em;
    background: color-mix(in srgb, var(--c, #073B4C) 12%, var(--ecume, #FEFCF6));
    color: var(--c, #073B4C);
    border-radius: 999px;
    font-weight: 500;
}
.legend-item::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--c, #073B4C);
}

/* ----- Marker custom (divIcon) ----- */
.crecy-marker {
    width: 32px; height: 40px; position: relative;
    cursor: pointer;
    transform-origin: 50% 95%;
    transition: transform .15s ease;
}
.crecy-marker:hover { transform: scale(1.1); }
.crecy-marker svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 4px rgba(7,59,76,0.4)); }
.crecy-marker--phare { width: 42px; height: 52px; }
.crecy-marker--phare::after {
    content: "★"; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
    color: #FFE; font-size: 0.85rem; text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    pointer-events: none;
}

/* ----- Popup Leaflet ----- */
.leaflet-popup-content-wrapper {
    border-radius: 14px !important;
    padding: 0 !important;
    box-shadow: 0 16px 40px -16px rgba(7,59,76,0.35) !important;
    overflow: hidden;
}
.leaflet-popup-content {
    margin: 0 !important; padding: 0 !important;
    width: 240px !important;
    font-family: var(--ff-body, system-ui), sans-serif;
}
.leaflet-popup-tip { background: var(--ecume, #FEFCF6) !important; }
.leaflet-container a { color: var(--eau-profonde, #1E5A7B); }

.crecy-popup__img {
    width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block;
    background: var(--sable-clair, #FBF3DD);
}
.crecy-popup__body { padding: 0.9rem 1rem 1rem; }
.crecy-popup__cat {
    display: inline-block; font-size: 0.7rem; font-weight: 600;
    padding: 0.2em 0.6em; border-radius: 999px;
    background: var(--popup-color, #1E5A7B); color: #fff;
    margin-bottom: 0.4em; letter-spacing: 0.02em;
}
.crecy-popup__title {
    font-family: var(--ff-display, serif); font-size: 1.05rem;
    font-weight: 600; margin: 0 0 0.4em; line-height: 1.2;
    color: var(--nuit, #073B4C);
}
.crecy-popup__meta {
    font-size: 0.8rem; color: color-mix(in srgb, var(--nuit, #073B4C) 65%, transparent);
    margin: 0 0 0.6em; line-height: 1.4;
}
.crecy-popup__cta {
    display: inline-block; font-size: 0.85rem; font-weight: 600;
    color: var(--corail, #E76F51); text-decoration: none;
}
.crecy-popup__cta:hover { color: var(--eau-profonde, #1E5A7B); }

/* ============================================
   Marker COMMERÇANT — pastille dorée à emoji
   ============================================ */
.crecy-marker-commerce {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #F2E2B6 0%, #E8C788 60%, #B8956A 100%);
    border: 2.5px solid #FEFCF6;
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(7, 59, 76, 0.3);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform .15s ease;
}
.crecy-marker-commerce:hover {
    transform: scale(1.12);
}
.crecy-marker-commerce__emoji {
    font-size: 18px;
    line-height: 1;
    /* L'emoji garde sa colorimétrie native */
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
}
.crecy-marker-commerce--partenaire {
    /* Partenaire : marker plus grand, anneau soleil supplémentaire */
}
.crecy-marker-commerce--partenaire .crecy-marker-commerce {
    border-color: var(--soleil, #F4A261);
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(244, 162, 97, 0.3), 0 3px 10px rgba(7, 59, 76, 0.35);
}
.crecy-marker-commerce--partenaire .crecy-marker-commerce__emoji {
    font-size: 22px;
}

/* ----- Popup commerce ----- */
.crecy-popup__cat--commerce {
    background: #E8C788 !important;
    color: #073B4C !important;
    display: inline-flex !important;
    align-items: center;
    gap: 0.35em;
}
.crecy-popup__emoji {
    font-size: 0.95rem;
    line-height: 1;
}
.crecy-popup__accroche {
    font-size: 0.85rem;
    color: var(--nuit, #073B4C);
    font-style: italic;
    margin: 0 0 0.5em;
    line-height: 1.4;
}

/* ----- Tags commerçants dans popup ----- */
.crecy-popup__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3em;
    margin: 0.6em 0 0.7em;
    line-height: 1.5;
}
.crecy-popup__tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.18em 0.55em;
    background: color-mix(in srgb, var(--eau-canal, #5BA3C8) 18%, transparent);
    color: var(--eau-profonde, #1E5A7B);
    border-radius: 999px;
}
