/*
 * BMATR – Recherche Poseurs
 * Layout inspiré AirBnB : liste gauche / carte droite
 * Dépendances : leaflet.css (chargé séparément)
 */

/* ══════════════════════════════════════════════════
   VARIABLES — dans :root pour être accessibles
   partout (backdrop, drawer map, fiche) même hors
   du scope .bmatr-ps
══════════════════════════════════════════════════ */
/*
 * BMATR – Recherche Poseurs
 * Charte site (mai 2026) — synthese, source de verite : bmatr.php
 *   Fonds          : #FAF8F5 (site + cartes), #FFFFFF
 *   Border carte   : 1px solid #e0e0e0
 *   Btn principal  : bg #C5A46D / txt #fff  >  hover bg #000 / txt #C5A46D
 *   Btn secondaire : bg #F0F0F0 / txt #000  >  hover bg #E4E4E4 / txt #000
 *   Gradient or    : linear-gradient(135deg,
 *                       rgba(212,175,55,.10) 12%,
 *                       rgba(214,194,137,.27) 53%,
 *                       rgba(184,135,11,.26) 99%)
 */

:root {
    --ps-accent: #C5A46D;
    --ps-accent-dark: #000000;
    --ps-red: #EF2D2F;
    --ps-yellow: #F8D32D;
    --ps-green: #00cc33;
    --ps-border: #e0e0e0;
    --ps-radius: 12px;
    --ps-shadow: 0 2px 12px rgba(0, 0, 0, .10);
    --ps-shadow-h: 0 6px 22px rgba(0, 0, 0, .18);
    --ps-bg: #F1F1F1;
    --ps-white: #ffffff;
    --ps-text: #222222;
    --ps-muted: #717171;
    --ps-filter-w: 260px;
    --ps-card-w: 320px;
    --ps-map-min: 360px;
    /* ── Z-index layers ─────────────────────────────────
       Tout est relatif à --z-above-admin (> WP admin bar 99999).
       Modifier --z-above-admin adapte toute la pile.          */
    --z-marker-premium: 10;
    --z-marker-active: 20;
    --z-controls: 50;
    --z-map-controls: 1000;
    /* au-dessus des tiles/popups Leaflet (~600) */
    --z-above-admin: 100000;
    --z-backdrop: 100005;
    --z-overlay: 100010;
    --z-modal: 9999999;
    /* fullscreen = au-dessus de TOUT (Blocksy header ~999999) */
}

.bmatr-ps {
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--ps-text);
    box-sizing: border-box;
}

.bmatr-ps *,
.bmatr-ps *::before,
.bmatr-ps *::after {
    box-sizing: inherit;
}

/* ══════════════════════════════════════════════════
   SEARCHBAR
══════════════════════════════════════════════════ */
.bmatr-ps__searchbar {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--ps-white);
    border: 1.5px solid var(--ps-border);
    border-radius: 48px;
    box-shadow: var(--ps-shadow);
    padding: 6px 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    transition: box-shadow .2s;
}

.bmatr-ps__searchbar:focus-within {
    box-shadow: var(--ps-shadow-h);
}

.bmatr-ps__finder-wrap,
.bmatr-ps__lieu-wrap {
    display: flex;
    align-items: center;
    flex: 1 1 220px;
    min-width: 160px;
    position: relative;
    gap: 8px;
    padding: 4px 12px;
}

.bmatr-ps__finder-icon,
.bmatr-ps__lieu-icon {
    flex-shrink: 0;
    color: var(--ps-muted);
    display: flex;
    align-items: center;
}

.bmatr-ps__finder-input,
.bmatr-ps__lieu-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: .95rem;
    color: var(--ps-text);
    min-width: 80px;
}

.bmatr-ps__finder-input::placeholder,
.bmatr-ps__lieu-input::placeholder {
    color: var(--ps-muted);
}

.bmatr-ps__finder-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ps-muted);
    padding: 2px 4px;
    border-radius: 50%;
    font-size: .85rem;
    line-height: 1;
    transition: background .15s, color .15s;
}

.bmatr-ps__finder-clear:hover {
    background: #f0f0f0;
    color: var(--ps-text);
}

.bmatr-ps__searchbar-sep {
    width: 1px;
    height: 30px;
    background: var(--ps-border);
    flex-shrink: 0;
    margin: 0 4px;
}

.bmatr-ps__btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    color: var(--ps-muted);
    display: flex;
    align-items: center;
    transition: background .15s, color .15s;
}

.bmatr-ps__btn-icon:hover {
    background: #f0f0f0;
    color: var(--ps-text);
}

/* ── Submit button (Rechercher) ─────────────────── */
.bmatr-ps__submit-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--ps-accent);
    color: #fff;
    border: none;
    border-radius: 40px;
    padding: 8px 18px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, opacity .2s;
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: 4px;
}

.bmatr-ps__submit-btn:hover {
    background: var(--ps-accent-dark);
}

.bmatr-ps__submit-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* Loader SVG masqué par défaut — !important pour surcharger le inline style de bmatr_loader_html */
.bmatr-ps__submit-btn .bmatr-ps__submit-loader {
    display: none !important;
}

/* En mode loading : afficher le loader, masquer le label */
.bmatr-ps__submit-btn--loading .bmatr-ps__submit-loader {
    display: inline-flex !important;
}

.bmatr-ps__submit-btn--loading .bmatr-ps__submit-label {
    display: none;
}

/* ── Fulltext banner ────────────────────────────── */
.bmatr-ps__ft-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--ps-accent);
    color: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 10px;
    font-size: .9rem;
    font-weight: 500;
    animation: bmatr-ft-fadein .25s ease;
}

.bmatr-ps__ft-banner[hidden] {
    display: none;
}

.bmatr-ps__ft-banner-clear {
    background: rgba(255, 255, 255, .25);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: .75rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    flex-shrink: 0;
    transition: background .15s;
}

.bmatr-ps__ft-banner-clear:hover {
    background: rgba(255, 255, 255, .45);
}

@keyframes bmatr-ft-fadein {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Autocomplete dropdown */
.bmatr-ps__ac-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--ps-white);
    border: 1px solid var(--ps-border);
    border-radius: var(--ps-radius);
    box-shadow: var(--ps-shadow-h);
    list-style: none;
    margin: 0;
    padding: 6px 0;
    z-index: var(--z-controls);
    max-height: 340px;
    overflow-y: auto;
}

.bmatr-ps__ac-list[hidden] {
    display: none;
}

.bmatr-ps__ac-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: .88rem;
    transition: background .12s;
}

.bmatr-ps__ac-item:hover,
.bmatr-ps__ac-item[aria-selected="true"] {
    background: #f5f5f5;
}

.bmatr-ps__ac-item__logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.bmatr-ps__ac-item__premium::before {
    content: '★ ';
    color: #e8a000;
    font-size: .8em;
}

.bmatr-ps__ac-item__main {
    font-weight: 500;
    line-height: 1.2;
}

.bmatr-ps__ac-item__sub {
    font-size: .78rem;
    color: var(--ps-muted);
}

.bmatr-ps__ac-separator {
    padding: 6px 14px 2px;
    font-size: .72rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .04em;
    pointer-events: none;
    list-style: none;
}

.bmatr-ps__ac-separator:not(:first-child) {
    border-top: 1px solid #eee;
    margin-top: 4px;
    padding-top: 8px;
}

.bmatr-ps__ac-item__icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}

/* ══════════════════════════════════════════════════
   LIEUX SÉLECTIONNÉS (pills)
══════════════════════════════════════════════════ */
.bmatr-ps__lieux-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    min-height: 0;
}

/* Message inline (remplace les alert JS) */
.bmatr-ps__lieu-feedback {
    font-size: .78rem;
    color: #c0392b;
    padding: 2px 0;
    min-height: 1em;
    width: 100%;
}

.bmatr-ps__lieu-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ef2d2f1f;
    border: 1px solid #EF2D2F;
    color: #EF2D2F;
    border-radius: 24px;
    padding: 4px 12px;
    font-size: .83rem;
    font-weight: 500;
    cursor: default;
}

.bmatr-ps__lieu-pill--radius {
    background: #e8f5e8;
    border-color: #9ad69a;
    color: #2a6a2a;
}

.bmatr-ps__lieu-pill__rm {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 2px;
    color: inherit;
    font-size: 1rem;
    line-height: 1;
    border-radius: 50%;
    opacity: .7;
    transition: opacity .15s;
}

.bmatr-ps__lieu-pill__rm:hover {
    opacity: 1;
    transform: scale(1.1) rotate(10deg);
    filter: none;
}

/* Rayon slider */
.bmatr-ps__radius-control {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: var(--ps-muted);
}

.bmatr-ps__radius-control input[type="range"] {
    width: 100px;
    accent-color: var(--ps-accent);
}

/* Historique lieux */
.bmatr-ps__lieu-history {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    font-size: .82rem;
}

.bmatr-ps__lieu-history-label {
    color: var(--ps-muted);
    font-weight: 500;
}

.bmatr-ps__lieu-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bmatr-ps__lieu-history-item {
    background: #f3f3f3;
    border: 1px solid var(--ps-border);
    border-radius: 16px;
    padding: 3px 10px;
    cursor: pointer;
    transition: background .12s;
    color: var(--ps-text);
    font-size: .81rem;
    filter: grayscale(.8);
    opacity: .6;
}

.bmatr-ps__lieu-history-item:hover {
    filter: grayscale(0);
    opacity: 1;
    background: #e8e8e8;
}



.bmatr-ps__lieu-history-item .rm {
    margin-left: 5px;
    opacity: .5;
}

.bmatr-ps__lieu-history-purge {
    margin-left: auto;
    color: var(--ps-muted, #6b7280);
    font-size: .72rem;
    text-decoration: none;
    opacity: .6;
    transition: opacity .15s;
    white-space: nowrap;
}

.bmatr-ps__lieu-history-purge:hover {
    opacity: 1;
    color: var(--ps-red, #EF2D2F);
    text-decoration: underline;
}

/* ══════════════════════════════════════════════════
   LAYOUT PRINCIPAL
══════════════════════════════════════════════════ */
.bmatr-ps__layout {
    display: flex;
    gap: 0;
    align-items: flex-start;
    min-height: 600px;
}


/* ══════════════════════════════════════════════════
   FILTRES — DESKTOP : colonnes horizontales
══════════════════════════════════════════════════ */
.bmatr-ps__filters {
    width: 100%;
    padding: 14px 0 8px;
    border-bottom: 1px solid var(--ps-border);
    margin-bottom: 14px;
}

.bmatr-ps__filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.bmatr-ps__filters-title {
    font-weight: 700;
    font-size: 1rem;
}

.bmatr-ps__filters-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bmatr-ps__filters-reset {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ps-accent);
    font-size: .82rem;
    text-decoration: underline;
    padding: 0;
    display: none;
    /* masqué en desktop — "Tout effacer" est dans la barre active-tags */
}

.bmatr-ps__filters-reset:hover {
    color: var(--ps-accent-dark);
}

.bmatr-ps__filters-close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--ps-muted);
    padding: 2px 8px;
    border-radius: 50%;
    line-height: 1;
    transition: background .15s;
}

.bmatr-ps__filters-close:hover {
    background: #f0f0f0;
    color: var(--ps-text);
}

/* ── Cols picker (menu ⋮) ────────────────────────── */
.bmatr-ps__cols-picker {
    position: relative;
    display: inline-flex;
}

.bmatr-ps__cols-picker-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    color: var(--ps-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    border: 1px solid #ddd;
}

.bmatr-ps__cols-picker-btn::before {
    content: '+ de filtres';
    font-size: 14px;
    display: inline-block;
}

.bmatr-ps__cols-picker-btn:hover {
    background: #f0f0f0;
    color: var(--ps-text);
}

.bmatr-ps__cols-picker-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--ps-white);
    border: 1px solid var(--ps-border);
    border-radius: 10px;
    box-shadow: var(--ps-shadow-h);
    padding: 10px 14px;
    z-index: var(--z-controls);
    min-width: 220px;
    max-height: 400px;
    overflow-y: auto;
}

.bmatr-ps__cols-picker-menu[hidden] {
    display: none;
}

.bmatr-ps__cols-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 2px;
    cursor: pointer;
    font-size: .84rem;
    border-radius: 4px;
    transition: background .1s;
}

.bmatr-ps__cols-picker-item:hover {
    background: #f5f5f5;
}

.bmatr-ps__cols-picker-item input[type="checkbox"] {
    accent-color: var(--ps-accent);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

/* Grille colonnes — flex-wrap pour 2 lignes si >5 colonnes */
.bmatr-ps__filters-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
}

.bmatr-ps__filters-cols::-webkit-scrollbar {
    display: none;
}

/* Bloc par taxonomie */
.bmatr-ps__filter-block {
    flex: 1 1 160px;
    min-width: 140px;
    padding: 0 16px 0 0;
    border-right: 1px solid var(--ps-border);
    margin-right: 16px;
}

.bmatr-ps__filter-block:last-child {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
}

/* >5 colonnes : passage en 2 lignes, blocs limités à ~18% */
.bmatr-ps__filters-cols.is-wrapped .bmatr-ps__filter-block {
    flex: 0 1 calc(20% - 16px);
    min-width: 120px;
    margin-bottom: 12px;
}

/* Dernière colonne de chaque ligne : pas de bordure droite */
.bmatr-ps__filters-cols.is-wrapped .bmatr-ps__filter-block:nth-child(5n) {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
}

.bmatr-ps__filter-block-title {
    font-size: .84rem;
    font-weight: 700;
    color: var(--ps-text);
    margin: 0 0 8px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--ps-accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Items avec scroll fixe */
.bmatr-ps__filter-items {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 210px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--ps-border) transparent;
}

/* 2 lignes de colonnes → hauteur réduite pour garder l'ensemble compact */
.bmatr-ps__filters-cols.is-wrapped .bmatr-ps__filter-items {
    max-height: 150px;
}

.bmatr-ps__filter-items::-webkit-scrollbar {
    width: 3px;
}

.bmatr-ps__filter-items::-webkit-scrollbar-thumb {
    background: var(--ps-border);
    border-radius: 2px;
}

.bmatr-ps__filter-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 4px;
    font-size: .82rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background .1s;
}

.bmatr-ps__filter-item:hover {
    background: #f5f5f5;
}

.bmatr-ps__filter-item input[type="checkbox"] {
    accent-color: var(--ps-accent);
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    cursor: pointer;
}

.bmatr-ps__filter-item__logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 3px;
    flex-shrink: 0;
}

.bmatr-ps__filter-item__count {
    margin-left: auto;
    font-size: .72rem;
    color: var(--ps-muted);
    flex-shrink: 0;
}

.bmatr-ps__filter-item--child {
    padding-left: 14px;
}

.bmatr-ps__filter-item--premium .bmatr-ps__filter-item-label::before {
    content: '★ ';
    color: #e8a000;
    font-size: .75em;
}

/* ── Active tags ──────────────────────────────── */
.bmatr-ps__active-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 10px;
}

.bmatr-ps__active-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #C5A46D;
    color: #ffffff;
    border: 1px solid #C5A46D;
    border-radius: 20px;
    padding: 3px 10px 3px 11px;
    font-size: .78rem;
    font-weight: 500;

}

.bmatr-ps__active-tag:hover {
    color:var(--ps-accent, #C5A46D);
        background-color: var(--bmatr-ps-accent-dark, #000000);

}

.bmatr-ps__active-tag__remove {
    cursor: pointer;
    font-size: .85rem;
    line-height: 1;
    color: #ffffff;
    background: none;
    border: none;
    padding: 0;
    margin-left: 3px;
    flex-shrink: 0;
}

.bmatr-ps__active-tag__remove:hover {
    color: #c0392b;
}

.bmatr-ps__active-tag--company {
    background: #fff3e0;
    border-color: #ffb74d;
    color: #e65100;
}

.bmatr-ps__active-tags__clear {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ps-muted);
    font-size: .75rem;
    text-decoration: underline;
    padding: 0;
    margin-left: 2px;
}

/* ── Mobile trigger (masqué en desktop) ────────── */
.bmatr-ps__mob-trigger {
    display: none;
}

.bmatr-ps__drawer-backdrop {
    display: none;
}

ZONE PRINCIPALE (résultats + carte) ══════════════════════════════════════════════════ */ .bmatr-ps__main {
    flex: 1;
    padding-left: 16px;
    min-width: 0;
}

.bmatr-ps__results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: .88rem;
    color: var(--ps-muted);
    flex-wrap: wrap;
    gap: 8px;
}

.bmatr-ps__results-count {
    font-weight: 500;
}

/* ── Compteur vues fiches poseur (temps réel) ────────────── */
.bmatr-ps__view-counter {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: .78rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    line-height: 1.4;
    white-space: nowrap;
    vertical-align: middle;
    margin-left: 8px;
    transition: background .3s, color .3s;
}

.bmatr-ps__view-counter--ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.bmatr-ps__view-counter--warn {
    background: #fff3e0;
    color: #e65100;
}

.bmatr-ps__view-counter--critical {
    background: #fce4ec;
    color: #c62828;
    animation: bmatr-vc-pulse 1.2s ease-in-out infinite;
}

@keyframes bmatr-vc-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .6;
    }
}

.bmatr-ps__results-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bmatr-ps__pager-btn {
    background: var(--ps-white);
    border: 1px solid var(--ps-border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.bmatr-ps__pager-btn:disabled {
    opacity: .35;
    cursor: default;
}

.bmatr-ps__pager-btn:not(:disabled):hover {
    background: #f0f0f0;
}

/* Split résultats / carte
   .has-map : map visible (40% droite en desktop)
   sans .has-map : grille pleine largeur */
.bmatr-ps__split {
    display: flex;
    gap: 0;
    align-items: flex-start;
    min-height: 500px;
}

/* ══════════════════════════════════════════════════
   GRILLE CARTES POSEURS
   Sans map : 6 col desktop / 4 tablette / 2 mobile
   Avec map : 4 col desktop / 4 tablette / 2 mobile
══════════════════════════════════════════════════ */
.bmatr-ps__cards {
    flex: 1 1 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    align-content: start;
    padding: 4px 0 16px;
    min-width: 0;
    /* pas de max-height ici, on scroll la page entière */
}

/* Quand la carte est visible → 4 colonnes */
.bmatr-ps__split.has-map .bmatr-ps__cards {
    grid-template-columns: repeat(4, 1fr);
    flex: 0 0 60%;
    max-width: 60%;
    padding-right: 14px;
}

/* ══════════════════════════════════════════════════
   CARTE POSEUR — style AirBnB
══════════════════════════════════════════════════ */
.bmatr-ps__card {
    background: var(--ps-white);
    border: 1px solid var(--ps-border);
    border-radius: var(--ps-radius);
    cursor: pointer;
    transition: box-shadow .18s, transform .12s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bmatr-ps__card:hover,
.bmatr-ps__card.is-hovered {
    box-shadow: 0 4px 16px rgba(26, 86, 219, .25), 0 0 0 2px var(--ps-accent);
    transform: translateY(-2px);
}

/* Image */
/* Image — toujours contain (ce sont des logos, pas des photos) */
.bmatr-ps__card__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #F3F0EC;
    background: radial-gradient(circle, rgba(243, 240, 236, 1) 50%, rgba(250, 248, 245, 1) 85%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bmatr-ps__card__img {
    max-width: 70%;
    max-height: 70%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 7px rgba(0, 0, 0, .2));
}


.bmatr-ps__card__img--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.bmatr-ps__card__img--logo {
    width: 98%;
    height: 98%;
    object-fit: contain;

}

.bmatr-ps__card:hover .bmatr-ps__card__img--logo {
    filter: none;
}

/* Corps */
.bmatr-ps__card__body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    background-color: #faf8f5;
}

.bmatr-ps__card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
}

.bmatr-ps__card__title {
    font-weight: 700;
    font-size: .88rem;
    color: var(--ps-text);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
    margin: 0;
}

.bmatr-ps__card__rating {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--ps-text);
}

.bmatr-ps__card__location {
    font-size: .75rem;
    color: var(--ps-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bmatr-ps__card__brands {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.bmatr-ps__card__brand-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    border-radius: 3px;
    border: 1px solid #eee;
}

.bmatr-ps__card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.bmatr-ps__card__tag {
    background: #f0f4fb;
    color: #2c5282;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: .72rem;
}

/* Boutons action */
.bmatr-ps__card__actions {
    display: flex;
    gap: 6px;
    margin-top: auto;
    padding-top: 4px;
}

.bmatr-ps__card__btn {
    flex: 1;
    border: none;
    cursor: pointer;
    border-radius: 20px;
    padding: 6px 8px;
    font-size: .75rem;
    font-weight: 600;
    transition: opacity .15s, background .15s;
}

.bmatr-ps__card__btn--detail {
    background: var(--ps-accent);
    color: #fff;
}

.bmatr-ps__card__btn--detail:hover {
    color:var(--ps-accent, #C5A46D);
        background-color: var(--bmatr-ps-accent-dark, #000000);
}

.bmatr-ps__card__btn--contact {
    background: #f0f0f0;
    color: var(--ps-text);
}

.bmatr-ps__card__btn--contact:hover {
    background: #e4e4e4;
}


/* Loading spinner */
.bmatr-ps__loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    color: var(--ps-muted);
    font-size: .9rem;
}


/* ══════════════════════════════════════════════════
   CARTE — desktop : 40% droite, sticky
══════════════════════════════════════════════════ */
.bmatr-ps__map-wrap {
    flex: 0 0 40%;
    width: 40%;
    position: sticky;
    top: 80px;
    align-self: flex-start;
    z-index: 1;
    /* sous le header Blocksy (z-index: 50) */
    overflow: visible;
    /* ne pas clipper le bouton FS */
}

.bmatr-ps__map-wrap[hidden] {
    display: none;
}

/* Bouton fullscreen carte résultats */
.bmatr-ps__map-fs-btn {

    position: absolute;
    top: 10px;
    right: 10px;
    z-index: var(--z-map-controls);
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, .92);
    border: 2px solid rgba(0, 0, 0, .15);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
    transition: background .15s;
}

.bmatr-ps__map-fs-btn:hover {
    background: #fff;
}

/* Fullscreen results map — modal-level */
.bmatr-ps__map-wrap.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: var(--z-modal) !important;
    border-radius: 0;
    margin: 0;
    background: #000;
}

.bmatr-ps__map-wrap.is-fullscreen .bmatr-ps__map {
    height: 100% !important;
    min-height: 100% !important;
    border-radius: 0;
    border: none;
}

/* Bouton FS → devient bouton fermer (✕ rond sombre) en fullscreen */
.bmatr-ps__map-wrap.is-fullscreen .bmatr-ps__map-fs-btn {
    z-index: var(--z-modal);
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .6);
    border-color: rgba(255, 255, 255, .3);
}

.bmatr-ps__map-wrap.is-fullscreen .bmatr-ps__map-fs-btn svg {
    stroke: #fff;
}

.bmatr-ps__map-wrap.is-fullscreen .bmatr-ps__map-fs-btn:hover {
    background: rgba(0, 0, 0, .8);
}

/* Masquer le drawer en fullscreen — la carte prend TOUT l'écran */
.bmatr-ps__map-wrap.is-fullscreen .bmatr-ps__map-drawer {
    display: none !important;
}

/* Masquer la barre admin WP en fullscreen */
body:has(.bmatr-ps__map-wrap.is-fullscreen) #wpadminbar {
    display: none !important;
}

body:has(.bmatr-ps__map-wrap.is-fullscreen) .admin-bar {
    margin-top: 0 !important;
}

.bmatr-ps__map-wrap.is-fullscreen .bmatr-ps__map-zoom-hint {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, .6);
    color: #fff;
    padding: 4px 14px;
    border-radius: 16px;
    z-index: var(--z-map-controls);
}

.bmatr-ps__map {
    width: 100%;
    height: 70vh;
    min-height: 400px;
    border-radius: var(--ps-radius);
    overflow: hidden;
    border: 1px solid var(--ps-border);
    box-shadow: var(--ps-shadow);
}

.bmatr-ps__map-zoom-hint {
    text-align: center;
    font-size: .78rem;
    color: var(--ps-muted);
    margin-top: 6px;
    transition: opacity .3s;
}

.bmatr-ps__map-zoom-hint.hidden {
    opacity: 0;
}

/* Drawer mobile (invisible en desktop) */
.bmatr-ps__map-drawer {
    display: none;
}


/* Marker personnalisé Leaflet */
/* Pin marker — wrapper Leaflet (taille 0, le marker se positionne via transform) */
.bmatr-ps-marker-wrap {
    background: none !important;
    border: none !important;
    overflow: visible !important;
}

/* ── Default state : pin goutte SVG ── */
.bmatr-ps-marker {
    position: relative;
    cursor: pointer;
}

.bmatr-ps-marker__pin {
    display: block;
    width: 25px;
    height: 36px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35));
    transition: transform .15s ease;
    transform-origin: center bottom;
}

.bmatr-ps-marker__pin svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Expanded tooltip : hidden by default */
.bmatr-ps-marker__expanded {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 4px;
    white-space: nowrap;
    text-align: center;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .35));
    z-index: 10;
}

.bmatr-ps-marker__text {
    display: block;
    background: var(--ps-red, #EF2D2F);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.3;
    padding: 4px 10px;
    border-radius: 6px;
}

.bmatr-ps-marker__logo {
    display: block;
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 5px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    margin: 0 auto 3px;
}

/* ── Hover : pin scale up + show tooltip ── */
.bmatr-ps-marker.is-hovered .bmatr-ps-marker__pin,
.bmatr-ps-marker.is-active .bmatr-ps-marker__pin {
    transform: scale(1.3);
    filter: drop-shadow(0 4px 8px rgba(239, 45, 47, .4));
}

.bmatr-ps-marker.is-hovered .bmatr-ps-marker__pin,
.bmatr-ps-marker.is-active .bmatr-ps-marker__pin {
    color: var(--ps-red, #EF2D2F) !important;
}

.bmatr-ps-marker.is-hovered .bmatr-ps-marker__expanded,
.bmatr-ps-marker.is-active .bmatr-ps-marker__expanded {
    display: block;
}

/* Leaflet wrapper : passer devant les autres markers au hover */
.bmatr-ps-marker-wrap:has(.bmatr-ps-marker.is-hovered),
.bmatr-ps-marker-wrap:has(.bmatr-ps-marker.is-active) {
    z-index: 9999 !important;
}

/* Popup Leaflet */
.leaflet-popup-content {
    font-size: .85rem;
    min-width: 160px;
}

.bmatr-ps-popup__title {
    font-weight: 700;
    margin: 0 0 4px;
}

.bmatr-ps-popup__loc {
    color: var(--ps-muted);
    font-size: .8rem;
}

.bmatr-ps-popup__link {
    color: var(--ps-accent);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 500;
}

.bmatr-ps-popup__link:hover {
    text-decoration: underline;
}

/* ══════════════════════════════════════════════════
   FICHE POSEUR (one-page)
══════════════════════════════════════════════════ */
.bmatr-ps__detail {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: var(--z-overlay);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    overflow-y: auto;
}

.bmatr-ps__detail[hidden] {
    display: none;
}

.bmatr-ps__detail-inner {
    background-color:#FAF8F5;
    width: min(680px, 100vw);
    min-height: 100vh;
    padding: 15px 28px 60px;
    position: relative;
    box-shadow: -6px 0 30px rgba(0, 0, 0, .15);
    overflow-y: auto;
    animation: bmatr-ps-slide-in .25s ease;
}

@keyframes bmatr-ps-slide-in {
    from {
        transform: translateX(60px);
        opacity: 0;
    }
}

/* ── Header barre du panel détail (expand + close) ──────────────────────── */
.bmatr-ps__detail-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin: -8px -8px 0;
    background: transparent;
    pointer-events: none;
    /* laisse passer les clics sur le fond */
}

.bmatr-ps__detail-header>* {
    pointer-events: auto;
}

.bmatr-ps__detail-expand {
    background: #f5f5f5;
    border: 1px solid var(--ps-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    text-decoration: none;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}

.bmatr-ps__detail-expand:hover {
    background: #eaeaea;
    color: #000;
}

.bmatr-ps__detail-close {
    margin-left: auto;
    background: #f5f5f5;
    border: 1px solid var(--ps-border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    flex-shrink: 0;
}

.bmatr-ps__detail-close:hover {
    background: #eaeaea;
}

/* ── Tags termes (feuilles uniquement) ─── */
.bmatr-ps__detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0 14px;
}

.bmatr-ps__detail-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: .82rem;
    line-height: 1.3;
    color: #666;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 20px;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s;
    -webkit-tap-highlight-color: transparent;
}

a.bmatr-ps__detail-tag:hover {
    background: #f0f0f0;
    color: #333;
}

span.bmatr-ps__detail-tag {
    cursor: default;
}

.bmatr-ps__detail-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 20px 0 4px;
}

.bmatr-ps__detail-company {
    font-size: 1rem;
    color: var(--ps-muted);
    margin: 0 0 16px;
}

/* ── Bandeau revendication fiche importée ────────────── */
.bmatr-ps__claim-banner {
    margin: 20px 0 0;
    border: 1px solid #e0e0e0;
    border-radius: var(--ps-radius);
    background: #F3F0EC;
    background: radial-gradient(circle, rgba(243, 240, 236, 1) 50%, rgba(250, 248, 245, 1) 85%);
    background-image: radial-gradient(circle, rgb(243, 240, 236) 50%, rgb(250, 248, 245) 85%);
    overflow: hidden;
}

.bmatr-ps__claim-banner-inner {
    padding: 20px 22px;
}

.bmatr-ps__claim-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 1.05rem;
    color: var(--ps-text);
}

.bmatr-ps__claim-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.bmatr-ps__claim-pitch {
    font-size: .85rem;
    line-height: 1.5;
    color: var(--ps-text);
}

.bmatr-ps__claim-pitch p {
    margin: 0 0 10px;
    color: var(--ps-muted);
}

.bmatr-ps__claim-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.bmatr-ps__claim-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, .7);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, .04);
}

.bmatr-ps__claim-feat-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    line-height: 1.5;
}

.bmatr-ps__claim-feature span:last-child {
    font-size: .83rem;
    line-height: 1.5;
    color: #444;
}

.bmatr-ps__claim-feature strong {
    color: var(--ps-text);
}

.bmatr-ps__claim-footer {
    font-size: .8rem;
    color: var(--ps-green, #00cc33);
    font-weight: 600;
    margin: 0 0 14px !important;
}




@media (max-width: 480px) {
    .bmatr-ps__claim-banner-inner {
        padding: 16px;
    }

    .bmatr-ps__claim-feature {
        padding: 6px 10px;
    }
}

.bmatr-ps__detail-contact {
    background: #f9fafb;
    border: 1px solid var(--ps-border);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: .9rem;
    line-height: 1.7;
}

.bmatr-ps__detail-contact a {
    color: var(--ps-accent);
    text-decoration: none;
}

.bmatr-ps__detail-contact a:hover {
    text-decoration: underline;
}

.bmatr-ps__detail-content {
    font-size: .92rem;
    line-height: 1.65;
    margin-bottom: 20px;
}

.bmatr-ps__detail-tax-section {
    margin-bottom: 18px;
}

.bmatr-ps__detail-tax-title {
    font-size: .88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ps-muted);
    margin: 0 0 8px;
}

.bmatr-ps__detail-tax-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bmatr-ps__detail-tax-item {
    background: #f0f4fb;
    color: #2c5282;
    border-radius: 12px;
    padding: 4px 10px;
    font-size: .82rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bmatr-ps__detail-brand-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 3px;
}

.bmatr-ps__detail-map-wrap {
    position: relative;
    margin-bottom: 16px;
}

.bmatr-ps__detail-map {
    width: 100%;
    height: 50vh;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--ps-border);
}

.bmatr-ps__map-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: var(--z-map-controls);
    background: #fff;
    border: 2px solid rgba(0, 0, 0, .2);
    border-radius: 4px;
    width: 34px;
    height: 34px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .15);
    transition: background .15s;
}

.bmatr-ps__map-fullscreen-btn:hover {
    background: #f4f4f4;
}

/* Fullscreen state */
.bmatr-ps__detail-map-wrap.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    margin: 0;
    border-radius: 0;
}

.bmatr-ps__detail-map-wrap.is-fullscreen .bmatr-ps__detail-map {
    height: 100vh;
    width: 100vw;
    border-radius: 0;
    border: none;
}

.bmatr-ps__detail-map-wrap.is-fullscreen .bmatr-ps__map-fullscreen-btn {
    top: 16px;
    right: 16px;
    z-index: var(--z-modal);
}

/* Logo mise en avant (panel détail) — pas de hero plein écran */
.bmatr-ps__detail-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 18px 0 20px;
    padding: 16px;
    background: #F3F0EC;
    background: radial-gradient(circle, rgba(243, 240, 236, 1) 50%, rgba(250, 248, 245, 1) 85%);
    background-image: radial-gradient(circle, rgb(243, 240, 236) 50%, rgb(250, 248, 245) 85%);
    background-position-x: initial;

    border: 1px solid var(--ps-border);
    border-radius: 12px;
}

.bmatr-ps__detail-hero img {
    max-width: 180px;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, .12));
}

/* Rating fiche */
.bmatr-ps__detail-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .92rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.bmatr-ps__detail-rating-count {
    color: var(--ps-muted);
    font-size: .8rem;
    font-weight: 400;
}

/* Portfolio iframe */
.bmatr-ps__detail-portfolio {
    margin-bottom: 20px;
}

.bmatr-ps__detail-portfolio-frame {
    width: 100%;
    height: 380px;
    border: 1px solid var(--ps-border);
    border-radius: 10px;
    display: block;
    margin: 10px 0 8px;
}

.bmatr-ps__detail-portfolio-link {
    font-size: .82rem;
    color: var(--ps-accent);
    text-decoration: none;
}

.bmatr-ps__detail-portfolio-link:hover {
    text-decoration: underline;
}

/* Formulaire contact — aligné charte site (fond gradient or, bouton C5A46D)
   Identique sur fiche poseur (rechercheposeurs.js renderDetail) et fiches
   light (templates non-poseur, includes/single-membre-light.php). */
.bmatr-ps__detail-cf {
    background: #F3F0EC;
    background: radial-gradient(circle, rgba(243, 240, 236, 1) 50%, rgba(250, 248, 245, 1) 85%);
    background-image: radial-gradient(circle, rgb(243, 240, 236) 50%, rgb(250, 248, 245) 85%);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-top: 28px;
}

.bmatr-ps__detail-cf .bmatr-ps__detail-tax-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 14px;
    border-bottom: none;
    padding-bottom: 0;
}

.bmatr-ps__cf-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.bmatr-ps__cf-input {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: .9rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    min-width: 0;
    background: #FAF8F5;
}

.bmatr-ps__cf-input:focus {
    border-color: #C5A46D;
    box-shadow: 0 0 0 3px rgba(197, 164, 109, .15);
}

.bmatr-ps__cf-textarea {
    width: 100%;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: .9rem;
    outline: none;
    resize: vertical;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
    background: #FAF8F5;
    box-sizing: border-box;
    margin-bottom: 12px;
    min-height: 110px;
}

.bmatr-ps__cf-textarea:focus {
    border-color: #C5A46D;
    box-shadow: 0 0 0 3px rgba(197, 164, 109, .15);
}

.bmatr-ps__cf-btn {
    background: #C5A46D;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, color .18s;
}

.bmatr-ps__cf-btn:hover {
    background: #000;
    color: #C5A46D;
}

.bmatr-ps__cf-btn:disabled {
    opacity: .55;
    cursor: default;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */

/* Tablette 901–1200px : 4 cartes sans map, 4 avec map */
@media (max-width: 1200px) {
    .bmatr-ps__cards {
        grid-template-columns: repeat(4, 1fr);
    }

    .bmatr-ps__split.has-map .bmatr-ps__cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ≤900px : carte pleine largeur, drawer résultats par-dessus */
@media (max-width: 900px) {
    .bmatr-ps__layout {
        flex-direction: column;
    }

    .bmatr-ps__main {
        padding-left: 0;
    }

    .bmatr-ps__split {
        flex-direction: column;
        min-height: 0;
    }

    /* Sans map : 4 colonnes */
    .bmatr-ps__cards {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Avec map : carte pleine largeur, cartes dans le drawer */
    .bmatr-ps__split.has-map .bmatr-ps__cards {
        display: none;
    }

    .bmatr-ps__split.has-map .bmatr-ps__map-wrap {
        flex: none;
        width: 100%;
        max-width: 100vw;
        position: relative;
        top: 0;
    }

    .bmatr-ps__split.has-map .bmatr-ps__map {
        /* Hauteur dynamique : ajustée par JS selon la position du drawer */
        /* Fallback = 50vh si JS n'a pas encore recalculé */
        height: var(--ps-map-h, 50vh);
        min-height: 100px;
        border-radius: 0;
    }

    /* Drawer swipeable résultats */
    .bmatr-ps__map-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0;
        right: 0;
        top: 50vh;
        bottom: 0;
        background: var(--ps-white);
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, .18);
        z-index: var(--z-overlay);
        overflow: hidden;
        max-width: 100vw;
        min-height: 40px;
    }

    .bmatr-ps__map-drawer__handle {
        flex-shrink: 0;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: grab;
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
    }

    .bmatr-ps__map-drawer__handle:active {
        cursor: grabbing;
    }

    .bmatr-ps__map-drawer__handle::before {
        content: '';
        width: 40px;
        height: 4px;
        background: #ccc;
        border-radius: 2px;
    }

    .bmatr-ps__map-drawer__inner {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        /* empêche le scroll de passer au html */
    }

    .bmatr-ps__map-drawer__cards {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 8px 12px 24px;
        max-width: 100%;
    }

    .bmatr-ps__map-drawer .bmatr-ps__card {
        user-select: none;
        -webkit-user-select: none;
        max-width: 100%;
        overflow: hidden;
    }
}

/* Mobile ≤700px : 2 colonnes sans map + filtres drawer gauche */
@media (max-width: 700px) {

    /* Grille */
    .bmatr-ps__cards {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Pleine largeur + espace sous la carte pour pouvoir la remonter librement */
    .bmatr-ps.bmatr-ps--results-only {
        width: 100%;
        padding-bottom: 50vh;
    }

    /* Drawer map : ajustement position snap */
    .bmatr-ps__split.has-map .bmatr-ps__map-drawer {
        top: 50vh;
    }

    .bmatr-ps__map-drawer__cards {
        grid-template-columns: repeat(2, 1fr);
    }

    /* ── Bouton déclencheur filtres ───────────────── */
    .bmatr-ps__mob-trigger {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: var(--ps-white);
        border: 1.5px solid var(--ps-border);
        border-radius: 24px;
        padding: 8px 18px;
        font-size: .9rem;
        font-weight: 600;
        color: var(--ps-text);
        cursor: pointer;
        box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
        transition: border-color .15s, box-shadow .15s;
        position: relative;
    }

    .bmatr-ps__mob-trigger:hover {
        border-color: var(--ps-accent);
    }

    .bmatr-ps__mob-trigger-icon {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

    /* Badge compteur */
    .bmatr-ps__mob-badge {
        position: absolute;
        top: -5px;
        right: -5px;
        background: var(--ps-accent);
        color: #fff;
        font-size: .68rem;
        font-weight: 700;
        min-width: 18px;
        height: 18px;
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
        pointer-events: none;
    }

    /* ── Backdrop (enfant direct du body via JS) ──── */
    .bmatr-ps__drawer-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .45);
        z-index: var(--z-backdrop);
        opacity: 0;
        pointer-events: none;
        transition: opacity .3s;
    }

    .bmatr-ps__drawer-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    /* ── Drawer filtres — glisse depuis la GAUCHE ─── */
    .bmatr-ps__filters {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(88vw, 360px);
        background: var(--ps-white);
        z-index: var(--z-overlay);
        border-bottom: none;
        border-right: 1px solid var(--ps-border);
        padding: 0;
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
        transform: translateX(-105%);
        transition: transform .32s cubic-bezier(.4, 0, .2, 1);
        box-shadow: 4px 0 24px rgba(0, 0, 0, .12);
        overflow: hidden;
    }

    .bmatr-ps__filters.is-open {
        transform: translateX(0);
    }

    /* Header sticky avec croix visible */
    .bmatr-ps__filters-header {
        flex-shrink: 0;
        padding: 16px 16px 14px;
        border-bottom: 1px solid var(--ps-border);
        margin-bottom: 0;
        position: sticky;
        top: 0;
        background: var(--ps-white);
        z-index: 1;
    }

    .bmatr-ps__filters-close {
        display: block;
    }

    /* Reset visible dans le drawer mobile */
    .bmatr-ps__filters-reset {
        display: inline-block;
    }

    /* Cols picker caché en mobile — toutes les taxos sont visibles dans le drawer */
    .bmatr-ps__cols-picker {
        display: none;
    }

    /* Colonnes → liste verticale scrollable */
    .bmatr-ps__filters-cols {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0;
        padding: 12px 16px 24px;
    }

    /* Annuler is-wrapped en mobile */
    .bmatr-ps__filters-cols.is-wrapped .bmatr-ps__filter-block {
        flex: none;
        min-width: 0;
        width: 100%;
        margin-bottom: 12px;
    }

    .bmatr-ps__filter-block {
        flex: none;
        min-width: 0;
        width: 100%;
        padding: 0;
        border-right: none;
        margin-right: 0;
        border-bottom: 1px solid var(--ps-border);
        padding-bottom: 12px;
        margin-bottom: 12px;
    }

    .bmatr-ps__filter-block:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

    .bmatr-ps__filter-block-title {
        border-bottom: none;
        padding-bottom: 4px;
        font-size: .9rem;
    }

    .bmatr-ps__filter-items {
        max-height: none;
        overflow-y: visible;
    }

    .bmatr-ps__filters-cols.is-wrapped .bmatr-ps__filter-items {
        max-height: none;
    }
}

.bmatr-ps__filter-item {
    font-size: .88rem;
    padding: 5px 4px;
}

/* Fiche poseur */
.bmatr-ps__detail-inner {
    padding: 16px 14px 40px;
}

.bmatr-ps__detail-title {
    font-size: 1.2rem;
}

.bmatr-ps__detail-hero {
    margin: 12px 0 16px;
    padding: 12px;
}

.bmatr-ps__cf-row {
    flex-direction: column;
}
}

/* Tablette + mobile : searchbar pleine largeur, sans arrondi */
@media (max-width: 900px) {
    .bmatr-ps__searchbar {
        border-radius: 0;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .bmatr-ps__submit-label {
        display: none;
    }

    .bmatr-ps__submit-btn {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .bmatr-ps__searchbar {
        border-radius: 0;
    }
}

/* ── Login-as button (detail panel) ──────────────────── */
.bmatr-ps__detail-loginas {
    background: #00CC3390;
    color: #000 !important;
    border: 1px solid #00CC33;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .15s;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.bmatr-ps__detail-loginas:hover {
    background: #00CC33c0;
    text-decoration: none !important;
}

/* ── Mobile overflow protection ────────────── */
@media (max-width: 900px) {

    .bmatr-ps__map-wrap,
    .bmatr-ps__split {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .bmatr-ps__map-drawer *,
    .bmatr-ps__map-drawer {
        box-sizing: border-box;
    }

    .bmatr-ps__card__title,
    .bmatr-ps__card__company {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* Bouton expand (lien vers single) inutile en mobile */
    .bmatr-ps__detail-expand {
        display: none;
    }
}

/* ── Premium markers : 1.4x scale + badge ⭐ ── */
.bmatr-ps-marker.is-premium .bmatr-ps-marker__pin {
    transform: scale(1.15);
}

.bmatr-ps-marker.is-premium .bmatr-ps-marker__text {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.bmatr-ps-marker__badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: .6rem;
    line-height: 1;
    z-index: 2;
}

.bmatr-ps-marker.is-premium.is-hovered .bmatr-ps-marker__text,
.bmatr-ps-marker.is-premium.is-active .bmatr-ps-marker__text {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* ── Login-as icon on single template ── */
.bmatr-single-loginas {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    border-radius: 50%;
    text-decoration: none;
    background: #00CC3390;
    border: 1px solid #00CC33;
    cursor: pointer;
    transition: background .2s;
}

.bmatr-single-loginas:hover {
    background: #00CC33c0;
}

/* ══════════════════════════════════════════════════
   TIER SWITCH — filtre taille entreprise
══════════════════════════════════════════════════ */
.bmatr-ps__tier-switch {
    display: flex;
    gap: 4px;
    padding: 10px 12px;
    border-top: 1px solid var(--ps-border, #e0e0e0);
    flex-wrap: wrap;
}

.bmatr-ps__tier-btn {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid var(--ps-border, #e0e0e0);
    border-radius: 6px;
    background: #fff;
    color: var(--ps-text, #222);
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all .15s;
    line-height: 1.3;
    position: relative;
}

.bmatr-ps__tier-btn:hover {
    color:var(--ps-accent, #C5A46D);
        background-color: var(--bmatr-ps-accent-dark, #000000);

}

.bmatr-ps__tier-btn--active {
    background: var(--ps-accent, #C5A46D);
    border-color: var(--ps-accent, #C5A46D);
    color: #fff;
}

.bmatr-ps__tier-sub {
    display: block;
    font-size: .65rem;
    font-weight: 400;
    opacity: .7;
}

.bmatr-ps__tier-count {
    position: absolute;
    right: 3px;
    top: calc(50% - 8px);
    padding: 0 5px;
    border-radius: 8px;
    font-size: .62rem;
    font-weight: 600;
    line-height: 1.5;
    min-width: 16px;
    text-align: center;
    background: rgba(0, 0, 0, .08);
    vertical-align: middle;
}

.bmatr-ps__tier-count:empty {
    display: none;
}

.bmatr-ps__tier-btn--active .bmatr-ps__tier-count {
    background: rgba(255, 255, 255, .25);
}

/* ── Tier badge on card ── */
.bmatr-ps__card__tier {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: .62rem;
    font-weight: 600;
    letter-spacing: .02em;
    vertical-align: middle;
    white-space: nowrap;
}

.bmatr-ps__card__tier--1 {
    background: #E0F7F3;
    color: #047857;
}

.bmatr-ps__card__tier--2 {
    background: #DBEAFE;
    color: #1D4ED8;
}

.bmatr-ps__card__tier--3 {
    background: #F3E8FF;
    color: #7C3AED;
}

/* ── Tier badge on single template ── */
.bmatr-single-tier {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.bmatr-single-tier--1 {
    background: #E0F7F3;
    color: #047857;
}

.bmatr-single-tier--2 {
    background: #DBEAFE;
    color: #1D4ED8;
}

.bmatr-single-tier--3 {
    background: #F3E8FF;
    color: #7C3AED;
}

/* Chip "Depuis YYYY" annee de creation entreprise (panel detail + single) */
.bmatr-ps__detail-since {
    display: inline-block;
    padding: 3px 10px;
    margin-left: 6px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #374151;
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .02em;
}

@media (max-width: 900px) {
    .bmatr-ps__tier-switch {
        padding: 8px;
    }

    .bmatr-ps__tier-btn {
        font-size: .72rem;
        padding: 5px 4px;
    }

    .bmatr-ps__tier-sub {
        font-size: .6rem;
    }
}

/* ══════════════════════════════════════════════════
   PAGINATION — drawer (mobile) + bottom (all)
══════════════════════════════════════════════════ */

/* Drawer bar: visible only on mobile, compact */
.bmatr-ps__results-bar--drawer {
    display: none;
    padding: 6px 14px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--ps-border, #e0e0e0);
    font-size: .8rem;
    background: #fff;
}

@media (max-width: 900px) {
    .bmatr-ps__results-bar--drawer {
        display: flex;
    }
}

.bmatr-ps__results-bar--drawer .bmatr-ps__pager-btn {
    width: 28px;
    height: 28px;
    font-size: .95rem;
}

.bmatr-ps__results-bar--drawer .bmatr-ps__results-count {
    font-size: .75rem;
}

/* Bottom bar: always visible, bordered top */
.bmatr-ps__results-bar--bottom {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--ps-border, #e0e0e0);
    margin-bottom: 0;
}

/* Mobile: top bar hidden when map is showing (drawer bar takes over) */
@media (max-width: 900px) {
    .bmatr-ps.bmatr-ps--results-only>.bmatr-ps__results-bar:first-child {
        /* Keep visible — it's above the split before map shows */
    }
}

/* ══════════════════════════════════════════════════
   BADGES — Qualité + Premium
══════════════════════════════════════════════════ */

/* Badge qualité (percentvisible) — petit numéro dans un cercle */
.bmatr-ps__badge-quality {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    background: #f0f0f0;
    color: #555;
    font-size: .68rem;
    font-weight: 700;
    padding: 0 5px;
    cursor: help;
    line-height: 1;
}

.bmatr-ps__badge-quality--lg {
    min-width: 30px;
    height: 30px;
    border-radius: 15px;
    font-size: .78rem;
    padding: 0 7px;
}

/* Badge premium — doré avec étoile */
.bmatr-ps__badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 7px;
    border-radius: 10px;
    background: linear-gradient(135deg, #FFF5D6, #FFE7A0);
    color: #92600a;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .02em;
    cursor: help;
    white-space: nowrap;
    border: 1px solid #f0d060;
}

.bmatr-ps__badge-premium--lg {
    padding: 3px 10px;
    font-size: .75rem;
    border-radius: 12px;
}

/* Position du badge premium sur l'image de la carte */
.bmatr-ps__card__img-wrap {
    position: relative;
}

.bmatr-ps__card__img-wrap>.bmatr-ps__badge-premium {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 2;
}

/* Meta badges row (qualité à droite du titre) */
.bmatr-ps__card__meta-badges {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Detail badges row */
.bmatr-ps__detail-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 12px;
}

/* ── Admin : logo redetect buttons ────────────────────────────── */
.bmatr-ps__detail-hero {
    position: relative;
}

.bmatr-logo-admin-btns {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    z-index: 5;
}

.bmatr-logo-admin-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    line-height: 30px;
    text-align: center;
    opacity: .7;
    transition: opacity .15s, background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.bmatr-logo-admin-btn:hover {
    opacity: 1;
    background: #f0f0f0;
}

.bmatr-logo-admin-btn.is-loading {
    pointer-events: none;
    opacity: .5;
}

.bmatr-logo-admin-btn.is-loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid #999;
    border-top-color: transparent;
    border-radius: 50%;
    animation: bmatr-spin .6s linear infinite;
    position: absolute;
}

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

/* ═══════════════════════════════════════════════════════════════
   SHOWROOM-FIRST / INDEX-ON-DEMAND
   - Bandeau libellé vitrine (SSR)
   - Bandeau discret "Index en cours" pendant le préchargement chunks
   - Animation cascade des cartes vitrine (stagger)
   ═══════════════════════════════════════════════════════════════ */

.bmatr-ps__showroom-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin: 0 0 12px 0;
    background: linear-gradient(90deg, #ffffff 0%, #f8f8f6 100%);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: .92rem;
    color: #2a3a4f;
}

.bmatr-ps__showroom-banner__count {
    font-weight: 700;
    color: #2d7a84;
    background: #f8f8f6;
    border: 1px solid #e0e0e0;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .82rem;
}

.bmatr-ps__showroom-banner__title {
    font-weight: 600;
}

.bmatr-ps__showroom-banner__hint {
    color: #6b7280;
}

.bmatr-ps__showroom-banner__sep {
    color: #b0bcc8;
    font-size: .75rem;
}

.bmatr-ps__index-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px 0;
    padding: 6px 12px;
    background: #F3F0EC;
    background: radial-gradient(circle, rgba(243, 240, 236, 1) 50%, rgba(250, 248, 245, 1) 85%);
    border: 1px solid #C5A46D;
    border-radius: 8px;
    font-size: .82rem;
    color: #000000;
    transition: opacity .25s ease;
   
}

.bmatr-ps__index-progress[hidden] {
    display: none;
}

.bmatr-ps__index-progress__bar {
    flex: 1 1 100px;
    height: 4px;
    background: #ffffff;
    border-radius: 2px;
    overflow: hidden;
    max-width: 240px;
    border: 1px solid #c5a46d4d;  
}

.bmatr-ps__index-progress__bar-inner {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #C5A46D, #9e8252);
    transition: width .4s ease;
}

.bmatr-ps__index-progress__txt {
    white-space: nowrap; animation: blink .3s linear infinite;
}

/* Cascade d'arrivée des cartes vitrine — animation GPU au 1er paint. */
.bmatr-ps[data-bmatr-ps-mode="showroom"] .bmatr-ps__cards .bmatr-ps__card {
    animation: bmatr-ps-card-in .35s ease both;
}

.bmatr-ps[data-bmatr-ps-mode="showroom"] .bmatr-ps__cards .bmatr-ps__card:nth-child(1) {
    animation-delay: 0ms;
}

.bmatr-ps[data-bmatr-ps-mode="showroom"] .bmatr-ps__cards .bmatr-ps__card:nth-child(2) {
    animation-delay: 30ms;
}

.bmatr-ps[data-bmatr-ps-mode="showroom"] .bmatr-ps__cards .bmatr-ps__card:nth-child(3) {
    animation-delay: 60ms;
}

.bmatr-ps[data-bmatr-ps-mode="showroom"] .bmatr-ps__cards .bmatr-ps__card:nth-child(4) {
    animation-delay: 90ms;
}

.bmatr-ps[data-bmatr-ps-mode="showroom"] .bmatr-ps__cards .bmatr-ps__card:nth-child(5) {
    animation-delay: 120ms;
}

.bmatr-ps[data-bmatr-ps-mode="showroom"] .bmatr-ps__cards .bmatr-ps__card:nth-child(6) {
    animation-delay: 150ms;
}

.bmatr-ps[data-bmatr-ps-mode="showroom"] .bmatr-ps__cards .bmatr-ps__card:nth-child(7) {
    animation-delay: 180ms;
}

.bmatr-ps[data-bmatr-ps-mode="showroom"] .bmatr-ps__cards .bmatr-ps__card:nth-child(8) {
    animation-delay: 210ms;
}

.bmatr-ps[data-bmatr-ps-mode="showroom"] .bmatr-ps__cards .bmatr-ps__card:nth-child(9) {
    animation-delay: 240ms;
}

.bmatr-ps[data-bmatr-ps-mode="showroom"] .bmatr-ps__cards .bmatr-ps__card:nth-child(10) {
    animation-delay: 270ms;
}

.bmatr-ps[data-bmatr-ps-mode="showroom"] .bmatr-ps__cards .bmatr-ps__card:nth-child(n+11) {
    animation-delay: 300ms;
}

@keyframes bmatr-ps-card-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bmatr-ps[data-bmatr-ps-mode="showroom"] .bmatr-ps__cards .bmatr-ps__card {
        animation: none;
    }
}

/* ─────────────────────────────────────────────────────────────
   Pied de fiche — SIREN / SIRET (affiché sur single + panel)
   ───────────────────────────────────────────────────────────── */
.bmatr-ps__detail-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 24px 0 8px;
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    background: #fafbfc;
    border-radius: 0 0 8px 8px;
    font-size: .85rem;
    color: #4b5563;
}

.bmatr-ps__detail-legal__item {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.bmatr-ps__detail-legal__label {
    font-weight: 700;
    color: #6b7280;
    letter-spacing: .03em;
}

.bmatr-ps__detail-legal__value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .9em;
    color: #1f2937;
    user-select: all;
}

/* ── Fil d'Ariane (au-dessus du hero, panel detail + single fiche) ──────
   Une ligne geo + N lignes activites, separateurs "/" entre les segments.
   Liens : couleur accent, soulignement au hover. Texte : segments parents
   d'activite intermediaires, non cliquables.                              */
.bmatr-ps__breadcrumb {
    margin: 30px 0 14px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: .82rem;
    line-height: 1.5;
}

/* Override single fiche : pas de fond, on garde uniquement la lisibilite
   (typographie + dashed entre rows). Le wrapper .bmatr-single-wrap est
   pose par templates/single-bmatr_poseur.php, .bmatr-membre-wrap par le
   rendu light (fabricant/distri/syndic). */
.bmatr-single-wrap .bmatr-ps__breadcrumb,
.bmatr-membre-wrap .bmatr-ps__breadcrumb {
    background: transparent;
    padding-left: 0;
    padding-right: 0;
}

/* Disclaimer IA : court bandeau qui prévient que les données pré-remplies
   peuvent etre erronees (logo identifie par mistake, donnees mal extraites).
   Affiche uniquement quand la fiche est non revendiquee (claimable=true).
   Petite typo, ton excuse, mention de retrait possible. */
.bmatr-ps__ai-disclaimer {
    margin: -4px 0 18px;
    padding: 10px 14px;
    font-size: .72rem;
    line-height: 1.45;
    color: #6b7280;
    background: rgba(197, 164, 109, .06);
    border-left: 2px solid #C5A46D;
    border-radius: 4px;
}
.bmatr-ps__ai-disclaimer strong {
    color: #4b5563;
}

.bmatr-ps__breadcrumb-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 4px;
    row-gap: 2px;
}

.bmatr-ps__breadcrumb-row+.bmatr-ps__breadcrumb-row {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px dashed #e0e6eb;
}

.bmatr-ps__breadcrumb-seg {
    color: #444;
}

.bmatr-ps__breadcrumb-seg--link {
    color: var(--bmatr-ps-accent, #C5A46D);
    text-decoration: none;
}

.bmatr-ps__breadcrumb-seg--link:hover,
.bmatr-ps__breadcrumb-seg--link:focus {
    text-decoration: underline;
    color: var(--bmatr-ps-accent-dark, #000000);
}

.bmatr-ps__breadcrumb-sep {
    color: #999;
    padding: 0 2px;
    user-select: none;
}

/* ============================================================
 * Titlebar du detail (panel droit + single-poseur)
 * Titre + tier + annee a gauche, jauge SVG a droite.
 * Contrainte : le cote le plus long de la jauge <= 150px.
 * Le SVG d'origine a un viewBox 677.3 x 361.9 (ratio ~1.87),
 * donc en plafonnant width a 150 la hauteur tombe a ~80px.
 * margin-left:auto sur la jauge garantit son alignement
 * tout a droite meme si flex-grow change.
 * Le badge chiffre est masque quand la jauge est presente.
 * ============================================================ */
.bmatr-ps__detail-titlebar {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 6px 0 8px;
}
.bmatr-ps__detail-titlebar-left {
    flex: 1 1 auto;
    min-width: 0;
}
.bmatr-ps__detail-titlebar-left .bmatr-ps__detail-title {
    margin-top: 0;
}
.bmatr-ps__detail-jauge {
    flex: 0 0 auto;
    max-width: 150px;
    max-height: 150px;
    margin-left: auto;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}
.bmatr-ps__detail-jauge svg.jaugeprofil {
    display: block;
    width: auto;
    height: auto;
    max-width: 150px;
    max-height: 150px;
}
.bmatr-ps__detail-jauge .jaugetxt {
    display: block;
    text-align: center;
    font-size: .65rem;
    color: #6b7280;
    line-height: 1.1;
    margin-top: 2px;
    max-width: 150px;
    white-space: normal;
}

/* Quand la jauge est presente, le badge chiffre devient redondant */
.bmatr-ps__detail--has-jauge .bmatr-ps__badge-quality,
.bmatr-ps__detail--has-jauge .bmatr-ps__badge-quality--lg {
    display: none !important;
}

/* Responsive : sous 480px on empile titre et jauge */
@media (max-width: 480px) {
    .bmatr-ps__detail-titlebar {
        flex-direction: column-reverse;
        align-items: center;
    }
    .bmatr-ps__detail-jauge {
        margin: 0 auto 6px;
    }
}


/* ============================================================
 * Titlebar du detail (panel droit + single-poseur)
 * Titre + tier + annee a gauche, jauge SVG a droite.
 * Contrainte : le cote le plus long de la jauge <= 150px.
 * Le SVG d'origine a un viewBox 677.3 x 361.9 (ratio ~1.87),
 * donc en plafonnant width a 150 la hauteur tombe a ~80px.
 * Le badge chiffre est masque quand la jauge est presente.
 * ============================================================ */
.bmatr-ps__detail-titlebar {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 6px 0 8px;
}
.bmatr-ps__detail-titlebar-left {
    flex: 1 1 auto;
    min-width: 0;
}
.bmatr-ps__detail-titlebar-left .bmatr-ps__detail-title {
    margin-top: 0;
}
.bmatr-ps__detail-jauge {
    flex: 0 0 auto;
    max-width: 150px;
    max-height: 150px;
    margin-left: auto;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}
.bmatr-ps__detail-jauge svg.jaugeprofil {
    display: block;
    width: auto;
    height: auto;
    max-width: 150px;
    max-height: 150px;
}
.bmatr-ps__detail-jauge .jaugetxt {
    display: block;
    text-align: center;
    font-size: .65rem;
    color: #6b7280;
    line-height: 1.1;
    margin-top: 2px;
    max-width: 150px;
    white-space: normal;
}

/* Quand la jauge est presente, le badge chiffre devient redondant */
.bmatr-ps__detail--has-jauge .bmatr-ps__badge-quality,
.bmatr-ps__detail--has-jauge .bmatr-ps__badge-quality--lg {
    display: none !important;
}

/* Responsive : sous 480px on empile titre et jauge */
@media (max-width: 480px) {
    .bmatr-ps__detail-titlebar {
        flex-direction: column-reverse;
        align-items: center;
    }
    .bmatr-ps__detail-jauge {
        margin: 0 auto 6px;
    }
}

/* ============================================================
 * Mode vitrine / showroom : masquage du badge score visibilite.
 * En mode vitrine le score n'apporte rien (pas de filtrage actif,
 * juste une selection de fiches recemment modifiees). Quand
 * l'utilisateur lance une recherche, le JS bascule l'attribut
 * data-bmatr-ps-mode sur "active" et le badge reapparait.
 * ============================================================ */
.bmatr-ps[data-bmatr-ps-mode="showroom"] .bmatr-ps__badge-quality,
.bmatr-ps[data-bmatr-ps-mode="showroom"] .bmatr-ps__badge-quality--lg {
    display: none !important;
}
