:root {
    --rcm-blue:       #075F93;
    --rcm-blue-lt:    #E8F2F9;
    --rcm-blue-dk:    #054e7a;
    --rcm-gold:       #D5BE78;
    --rcm-gold-dk:    #b8a35f;
    --rcm-dark:       #222222;
    --rcm-anthracite: #3D3D3D;
    --rcm-gray:       #717171;
    --rcm-border:     #DDDDDD;
    --rcm-surface:    #F7F7F7;
    --rcm-white:      #FFFFFF;
    --rcm-r:          8px;
    --rcm-r-lg:       16px;
}

#rcm-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--rcm-surface);
    border-radius: var(--rcm-r-lg);
    overflow: hidden;
    border: .5px solid var(--rcm-border);
}

/* Topbar */
#rcm-topbar {
    background: var(--rcm-white);
    border-bottom: .5px solid var(--rcm-border);
    display: flex; flex-direction: row;
    align-items: center; justify-content: flex-start;
    gap: 8px; padding: 10px 14px; flex-wrap: wrap;
    position: relative; z-index: 10;
}

/* Filtres */
#rcm-filtres { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }

.rcm-filtre-btn {
    display: inline-flex; align-items: center; gap: 5px;
    height: 34px; padding: 0 13px;
    border-radius: 40px; border: 1.5px solid var(--rcm-border);
    background: var(--rcm-white);
    font-size: 13px; font-weight: 500; color: var(--rcm-dark);
    cursor: pointer; transition: all .15s;
    text-decoration: none; line-height: 1; white-space: nowrap;
}
.rcm-filtre-btn.actif {
    /* couleur definie par classe specifique de categorie */
}
.rcm-filtre-btn.actif svg { stroke: var(--rcm-white); }
.rcm-filtre-btn:hover:not(.inactif) { border-color: var(--rcm-dark); }
.rcm-filtre-btn.inactif { background: var(--rcm-surface); color: #bbb; border-color: #eee; opacity: .45; pointer-events: none; }
.rcm-count { font-size: 11px; opacity: .75; }

/* Onglets mobile */
#rcm-mobile-tabs { display: none; border-bottom: .5px solid var(--rcm-border); background: var(--rcm-white); }
.rcm-tab { flex: 1; height: 38px; border: none; background: var(--rcm-white); color: var(--rcm-blue); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s; }
.rcm-tab.actif { background: var(--rcm-blue); color: var(--rcm-white); }

/* Zone principale */
#rcm-main { position: relative; display: block; }
#rcm-carte-wrap { width: 100%; display: block; position: relative; }
#rcm-carte { width: 100%; min-height: 520px; display: block; transition: opacity .25s; }
#rcm-carte.rcm-loading { opacity: .55; }

/* Recherche flottante */
#rcm-recherche-flottante {
    position: absolute; top: 12px; right: 324px; left: auto; z-index: 450; pointer-events: auto;
}
#rcm-recherche {
    display: flex; align-items: center;
    background: var(--rcm-white);
    border: 1.5px solid var(--rcm-dark); border-radius: 40px;
    padding: 0 13px; height: 40px; width: 220px; gap: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
#rcm-recherche .rcm-search-icon { color: var(--rcm-gray); flex-shrink: 0; }
#rcm-search-input { flex: 1; border: none; background: none; font-size: 13px; font-weight: 500; color: var(--rcm-dark); outline: none; min-width: 0; }
#rcm-search-input::placeholder { color: var(--rcm-gray); font-weight: 400; }
#rcm-search-input.rcm-no-result { color: #C0392B; }
#rcm-search-btn { display: none; }
#rcm-search-clear { background: none; border: none; cursor: pointer; color: var(--rcm-gray); font-size: 15px; padding: 0; line-height: 1; flex-shrink: 0; }

/* Volet flottant droit */
#rcm-volet {
    position: absolute; top: 12px; right: 12px; bottom: 12px;
    width: 300px; z-index: 500;
    background: var(--rcm-white); border-radius: var(--rcm-r-lg);
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    display: flex; flex-direction: column; overflow: hidden;
    pointer-events: auto;
}

#rcm-volet-header { padding: 11px 13px 8px; border-bottom: .5px solid #f0f0ec; flex-shrink: 0; }
#rcm-volet-count { font-size: 13px; font-weight: 600; color: var(--rcm-dark); margin-bottom: 4px; }
.rcm-volet-sort-row { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--rcm-gray); }
#rcm-sort-select { font-size: 12px; font-weight: 500; color: var(--rcm-dark); border: none; background: none; cursor: pointer; outline: none; padding: 0; }

/* Recherche dans le volet */
#rcm-volet-search { padding: 7px 11px; border-bottom: .5px solid #f0f0ec; flex-shrink: 0; }
#rcm-volet-search-input {
    width: 100%; height: 30px; padding: 0 10px;
    border: 1px solid var(--rcm-border); border-radius: 20px;
    font-size: 12px; color: var(--rcm-dark); background: var(--rcm-surface);
    outline: none; transition: border-color .15s; box-sizing: border-box;
}
#rcm-volet-search-input:focus { border-color: var(--rcm-blue); background: var(--rcm-white); }
#rcm-volet-search-input::placeholder { color: #bbb; }

#rcm-volet-liste { flex: 1; overflow-y: auto; overflow-x: hidden; }
#rcm-volet-liste::-webkit-scrollbar { width: 3px; }
#rcm-volet-liste::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

/* Items volet */
.rcm-volet-item {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 13px; cursor: pointer;
    border-bottom: .5px solid #f5f5f3;
    transition: background .1s; min-height: 48px;
}
.rcm-volet-item:hover { background: #f7f7f7; }
.rcm-volet-item.actif { background: #f0f4ff; }
.rcm-volet-item.rcm-no-coords { opacity: .35; cursor: default; }

.rcm-volet-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; }
.rcm-volet-info { flex: 1; min-width: 0; }
.rcm-volet-name { font-size: 13px; font-weight: 600; color: var(--rcm-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
.rcm-volet-sub  { font-size: 11px; color: var(--rcm-gray); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Boutons actions volet - toujours visibles */
.rcm-volet-actions { display: flex; gap: 3px; flex-shrink: 0; align-items: center; }

.rcm-volet-locate,
.rcm-volet-profil,
.rcm-volet-fc {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 5px;
    background: var(--rcm-surface); border: 1px solid var(--rcm-border);
    cursor: pointer; color: var(--rcm-anthracite);
    transition: all .15s; text-decoration: none;
}
.rcm-volet-locate svg,
.rcm-volet-profil svg,
.rcm-volet-fc svg {
    stroke: var(--rcm-anthracite);
    transition: stroke .15s;
}
.rcm-volet-locate:hover { background: var(--rcm-blue-lt); color: var(--rcm-blue); border-color: var(--rcm-blue); }
.rcm-volet-profil:hover { background: #FBF6E3; color: #7A6520; border-color: #D5BE78; }
.rcm-volet-fc:hover     { background: var(--rcm-blue-lt); color: var(--rcm-blue); border-color: var(--rcm-blue); }
.rcm-volet-locate:hover svg { stroke: var(--rcm-blue); }
.rcm-volet-profil:hover svg { stroke: #7A6520; }
.rcm-volet-fc:hover svg     { stroke: var(--rcm-blue); }

/* Separateurs */
.rcm-volet-sep { padding: 5px 13px 3px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--rcm-gray); background: #fafaf8; border-bottom: .5px solid #efefec; position: sticky; top: 0; z-index: 1; }
.rcm-volet-empty { padding: 28px 13px; text-align: center; color: var(--rcm-gray); font-size: 13px; }

#rcm-volet-footer { padding: 9px 11px; border-top: .5px solid #f0f0ec; background: #fafaf8; flex-shrink: 0; }
.rcm-volet-btn {
    display: flex; align-items: center; justify-content: center; gap: 5px;
    width: 100%; height: 36px;
    background: var(--rcm-dark); color: var(--rcm-white);
    border: none; border-radius: var(--rcm-r);
    font-size: 13px; font-weight: 600; cursor: pointer;
    text-decoration: none; transition: background .15s;
}
.rcm-volet-btn:hover { background: #333; }

/* Marqueurs pill */
.rcm-marker-pill {
    display: inline-block; white-space: nowrap;
    background: var(--rcm-white); border: 1.5px solid var(--rcm-dark);
    border-radius: 20px; padding: 4px 9px;
    font-size: 11px; font-weight: 700; color: var(--rcm-dark);
    cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.14);
    line-height: 1.3; transition: all .15s; user-select: none;
}
.rcm-marker-pill:hover, .rcm-marker-pill.selected { transform: scale(1.08); box-shadow: 0 3px 10px rgba(0,0,0,.2); }
.rcm-marker-comp            { border-color: var(--rcm-blue); color: var(--rcm-blue); }
.rcm-marker-comp:hover,
.rcm-marker-comp.selected   { background: var(--rcm-blue); color: var(--rcm-white); }
.rcm-marker-relais           { border-color: var(--rcm-gold-dk); color: #7A6520; }
.rcm-marker-relais:hover,
.rcm-marker-relais.selected  { background: var(--rcm-gold); color: var(--rcm-dark); }
.rcm-marker-partenaire            { border-color: #2E86AB; color: #2E86AB; }
.rcm-marker-partenaire:hover,
.rcm-marker-partenaire.selected   { background: #2E86AB; color: var(--rcm-white); }

/* Clusters */
.rcm-cluster {
    display: inline-block; white-space: nowrap;
    background: var(--rcm-white); border: 1.5px solid var(--rcm-dark);
    border-radius: 20px; padding: 4px 10px;
    font-size: 11px; font-weight: 700; color: var(--rcm-dark);
    cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.14);
    transition: all .15s; line-height: 1.3;
}
.rcm-cluster:hover { background: var(--rcm-dark); color: var(--rcm-white); }

/* Popup Leaflet */
.rcm-leaflet-popup .leaflet-popup-content-wrapper { border-radius: var(--rcm-r-lg); box-shadow: 0 8px 32px rgba(0,0,0,.16); padding: 0; overflow: hidden; }
.rcm-leaflet-popup .leaflet-popup-content { margin: 0; }
.rcm-popup { padding: 15px; min-width: 185px; font-family: inherit; }
.rcm-pop-cat { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
.rcm-pop-name { font-size: 15px; font-weight: 700; color: var(--rcm-dark); margin-bottom: 3px; }
.rcm-pop-loc  { font-size: 13px; color: var(--rcm-gray); margin-bottom: 11px; }
.rcm-pop-cta {
    display: block; width: 100%; height: 34px; line-height: 34px;
    background: var(--rcm-blue); color: var(--rcm-white);
    border: none; border-radius: var(--rcm-r);
    font-size: 13px; font-weight: 600; cursor: pointer;
    text-align: center; text-decoration: none; transition: background .15s;
}
.rcm-pop-cta:hover { background: var(--rcm-blue-dk); }
.rcm-pop-cta-ghost {
    display: block; width: 100%; height: 32px; line-height: 29px;
    background: none; color: var(--rcm-dark);
    border: 1.5px solid var(--rcm-border); border-radius: var(--rcm-r);
    font-size: 12px; font-weight: 500; cursor: pointer;
    text-align: center; text-decoration: none; transition: all .15s; margin-top: 5px;
}
.rcm-pop-cta-ghost:hover { border-color: var(--rcm-dark); }

/* Bouton plein ecran */
.rcm-fullscreen-btn {
    display: flex !important; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    background: var(--rcm-white) !important;
    border: 2px solid rgba(0,0,0,.25) !important;
    border-radius: var(--rcm-r);
    cursor: pointer; color: var(--rcm-anthracite) !important;
    margin-top: 5px;
    box-shadow: 0 1px 5px rgba(0,0,0,.15);
    transition: all .15s;
}
.rcm-fullscreen-btn:hover { background: var(--rcm-surface) !important; border-color: rgba(0,0,0,.4) !important; }
.rcm-fullscreen-btn svg { stroke: #3D3D3D !important; fill: none !important; }
.rcm-fullscreen-btn:hover svg { stroke: #111 !important; }

/* Plein ecran */
#rcm-wrap:fullscreen { border-radius: 0; }
#rcm-wrap:fullscreen #rcm-carte { min-height: 100vh !important; }
#rcm-wrap:-webkit-full-screen { border-radius: 0; }

/* Legende */
.rcm-legende { background: rgba(255,255,255,.96); border: .5px solid var(--rcm-border); border-radius: var(--rcm-r); padding: 8px 11px; font-size: 12px; }
.rcm-legende strong { display: block; margin-bottom: 5px; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--rcm-gray); }
.rcm-legende-item { display: flex; align-items: center; gap: 6px; margin: 3px 0; color: var(--rcm-dark); }
.rcm-legende-privacy { margin-top: 6px; padding-top: 6px; border-top: .5px solid #eee; color: #aaa; font-size: 11px; }

/* Profil public */
.rcm-profil-public { max-width: 380px; border: .5px solid var(--rcm-border); border-radius: var(--rcm-r-lg); overflow: hidden; }
.rcm-profil-badge  { padding: 18px 22px; color: var(--rcm-white); font-size: 18px; font-weight: 700; }
.rcm-profil-info   { padding: 14px 22px; }
.rcm-profil-ligne  { display: flex; align-items: center; gap: 9px; margin: 7px 0; color: #444; font-size: 14px; }
.rcm-profil-footer { padding: 10px 22px 18px; }
.rcm-profil-btn    { display: flex; align-items: center; justify-content: center; min-height: 42px; background: var(--rcm-blue); color: var(--rcm-white); text-decoration: none; border-radius: var(--rcm-r); font-size: 14px; font-weight: 600; transition: background .15s; }
.rcm-profil-btn:hover { background: var(--rcm-blue-dk); }

/* Responsive */
@media (max-width: 767px) {
    #rcm-mobile-tabs { display: flex; }
    #rcm-volet { position: relative !important; top: auto !important; right: auto !important; bottom: auto !important; width: 100% !important; border-radius: 0; box-shadow: none; border-top: .5px solid var(--rcm-border); max-height: 380px; }
    #rcm-carte { min-height: 320px; }
    #rcm-carte-wrap.rcm-hidden-mobile { display: none; }
    #rcm-volet.rcm-full-mobile { max-height: 500px; }
    #rcm-recherche-flottante { position: static; }
    #rcm-recherche { width: 100%; box-shadow: none; border-radius: var(--rcm-r); }
    #rcm-topbar { flex-direction: column; align-items: stretch; gap: 8px; }
}

/* Filtres colores par categorie : fond plein, texte blanc */
.rcm-filtre-compagnon.actif  { background: #075F93; border-color: #054e7a; color: #fff; }
.rcm-filtre-compagnon.actif svg { stroke: #fff; }
.rcm-filtre-compagnon:hover:not(.inactif):not(.actif) { border-color: #075F93; color: #075F93; }

.rcm-filtre-relais.actif     { background: #D5BE78; border-color: #b8a35f; color: #3D2E00; }
.rcm-filtre-relais.actif svg { stroke: #3D2E00; }
.rcm-filtre-relais:hover:not(.inactif):not(.actif) { border-color: #D5BE78; color: #7A6520; }

.rcm-filtre-partenaire.actif  { background: #2E86AB; border-color: #206a8a; color: #fff; }
.rcm-filtre-partenaire.actif svg { stroke: #fff; }
.rcm-filtre-partenaire:hover:not(.inactif):not(.actif) { border-color: #2E86AB; color: #2E86AB; }
