    /* supprime la largeur du menu de navigation dans l'espce membre Woo */
    .ct-acount-nav:empty {
      width: 0 !important;
      min-width: 0 !important;
      margin-inline-end: 0 !important;
    }
    .button.button-mini{
      padding: 2px 8px;;font-weight: 100; white-space: nowrap;
    }
    span.infoform {
      font-size: .6em;
      color: #c52c2c;
      
    }

    body:not(.tab-marques) nav.bmatr-brand-index {
      display: none;
      visibility: hidden;
    }

    /* BMATR - Carrousel marques ([carousselMarques]) */

    .bmatr-brands-carousel {
      position: relative;
      width: 100%;
      overflow: hidden;
    }

    .bmatr-brands-track {
      display: inline-flex;
      align-items: center;
      /* centré verticalement */
      will-change: transform;
    }

    .bmatr-brand {
      flex: 0 0 auto;
      width: var(--bmatr-itemw, 100px);
      margin-right: var(--bmatr-gap, 20px);
      text-align: center;
    }

    .bmatr-brand-box {
      width: 100%;
      height: var(--bmatr-itemw, 100px);
      display: flex;
      align-items: center;
      justify-content: center;
     /* border-radius: 14px;*/
      box-shadow: 0 5px 14px rgba(0, 0, 0, 0.18);
      background: rgba(255, 255, 255, 0.95);
    }

    .bmatr-brand-logo {
      width: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      margin: 0 0 10px 0;
    }

    .bmatr-brand-logo img {
      max-width: 82%;
      max-height: 62px;
      width: auto;
      height: auto;
      object-fit: contain;
      display: block;
    }


    .bmatr-brand-logo--empty {
      width: 60%;
      height: 60%;
      opacity: 0.10;
      background: currentColor;
      mask: radial-gradient(circle at 50% 50%, transparent 55%, #000 56%);
    }

    .bmatr-brand-name {
      margin-top: 8px;
      font-size: var(--bmatr-namesz, 12px);
      letter-spacing: 0.08em;
      text-transform: uppercase;
      line-height: 1.15;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .bmatr-brands-carousel.has-label {
      min-height: calc(var(--bmatr-itemw, 100px) + 28px);
    }

    .bmatr-brands-carousel.no-label {
      min-height: var(--bmatr-itemw, 100px);
    }

    .bmatr-brands-carousel.no-label .bmatr-brand-name {
      display: none;
    }

    .bmatr-brands-carousel-wrap {
      width: 100%;
    }

    .bmatr-brands-az {
      margin-top: 12px;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: center;
    }

    .bmatr-brands-az-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 28px;
      padding: 6px 10px;
      border-radius: 999px;
      border: 1px solid rgba(0, 0, 0, 0.15);
      text-decoration: none;
      color: inherit;
      background: rgba(255, 255, 255, 0.55);
      line-height: 1;
      font-size: 12px;
    }

    .bmatr-brands-az-link:hover {
      background: rgba(255, 255, 255, 0.85);
    }

    h1.wp-block-heading {
      padding-inline-start: 10px;
    }

    .bmatr-brands-az-link.is-active {
      background: rgba(0, 0, 0, 0.08);
      border-color: rgba(0, 0, 0, 0.25);
    }

    .alert-success {
      color: #0f5132;
      background-color: #f0fff8;
      border-color: #badbcc;
    }

    .form-switch .form-check-input {
      background-repeat: no-repeat !important;
    }

    /* BMATR - Inscription ([bmatr_inscription]) */

    .bmatr-inscription-wrap {
      max-width: 900px;
      margin: 0;
    }

    .infochamps {
      font-size: .8em;
      padding: 20px 5px;
    }

    .infochamps a {
      font-size: .9em !important;
      line-height: 1em;
      min-height: auto;
      font-weight: 100;
      margin: 0 4px;
    }

    .bmatr-pass-rules {
      list-style: none;
      margin: 8px 0 0;
      padding: 0;
      display: grid;
      gap: 4px;
    }

    .bmatr-pass-rules li {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 13px;
      line-height: 1.2;
    }

    .bmatr-pass-rules li::before {
      content: "•";
      display: inline-flex;
      width: 16px;
      justify-content: center;
      opacity: 0.7;
    }

    .bmatr-pass-rules li.is-ok::before {
      content: "✓";
      color: #198754;
      opacity: 1;
    }

    .bmatr-pass-rules li.is-ko::before {
      content: "✕";
      color: #dc3545;
      opacity: 1;
    }




    /* BMATR - Profil modification : champs verrouillés */
    .bmatr-field-locked {
      background: rgba(0, 0, 0, 0.03) !important;
      opacity: 0.85;
      cursor: not-allowed;
    }

    .bmatr-field-locked:disabled {
      color: rgba(0, 0, 0, 0.55);
    }

    /* BMATR - KBIS viewer (PDF.js) */
    .bmatr-kbis-viewer {
      width: 100%;
      min-height: 60vh;
      overflow: auto;
      background: rgba(0, 0, 0, 0.03);
      padding: 12px;
      border-radius: 12px;
    }

    .bmatr-kbis-viewer canvas.bmatr-kbis-canvas {
      display: block;
      margin: 0 auto 16px;
      max-width: 100%;
      border-radius: 8px;
      background: #ffffff;
      box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    }

    .bmatr-role-card {
      border: 1px solid rgba(0, 0, 0, 0.12);
      border-radius: 12px;
      padding: 14px 14px 12px 14px;
      background: #ffffff;
    }

    .bmatr-role-card .form-check-input {
      margin-top: 4px;
    }

    /* Checkbox ligne (pastille + texte) */
    .bmatr-checkline {
      position: relative;
      border: 1px solid rgba(0, 0, 0, 0.12);
      border-radius: 12px;
      padding: 14px 8px;
      background: #ffffff;
      min-height: 180px;
    }

    .bmatr-checkline .form-check-input {
      position: static;
      opacity: 0;
      pointer-events: none;
    }

    .bmatr-checkline .form-check-titre {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 0;
      cursor: pointer;

    }

    .bmatr-checkline::after {
      content: "";
      width: 20px;
      height: 20px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      border: 2px solid rgba(0, 0, 0, 0.18);
      background: transparent;
      color: #fff;
      font-size: 18px;
      line-height: 1;
      position: absolute;
      left: 8px;
      top: 14px;
      pointer-events: none;
    }

    .bmatr-checkline.bmatr-checkline-checked {
      box-shadow: inset 0 0 10px 4px #E2F5F8;
    }

    /*
      IMPORTANT:
      Les cartes "parents" (data-has-children="1") avaient un ::after dédié au chevron,
      ce qui écrasait le ::after de .bmatr-checkline (rendu de la case à cocher).
      On laisse donc la case à cocher sur ::after et on déplace le chevron sur ::before.
    */
    .bmatr-termselector .bmatr-term[data-has-children="1"].bmatr-checkline-checked {
      box-shadow: inset 0 0 10px 4px #E2F5F8;
    }

    .bmatr-checkline:focus-within::after {
      box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.25);
    }

    .bmatr-checkline.bmatr-checkline-checked::after {
      content: "✓";
      background: #28B7CA;
      border-color: #28B7CA;
    }

    /* Layout carte rôle : radio à gauche, texte à droite */
    .bmatr-role-card.form-check {
      display: grid;
      grid-template-columns: 28px 1fr;
      column-gap: 20px;
      align-items: start;
      padding-left: 20px;
      align-items: center;
    }

    /* Radio: garde un rendu Bootstrap normal, mais sans float ni margin négative */
    .bmatr-role-card .form-check-input {
      position: static;
      margin: 6px 0 0 0;
      float: none;
    }

    /* titre = colonne texte */
    .bmatr-role-card .form-check-titre {
      margin: 0;
      padding: 0;
    }

    /* Wrapper texte : empilement vertical garanti */
    .bmatr-role-card .bmatr-role-text {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }


    .bmatr-dropzone {
      position: relative;
      border: 2px dashed rgba(0, 0, 0, 0.25);
      border-radius: 14px;
      padding: 18px;
      cursor: pointer;
      background: rgba(255, 255, 255, 0.85);
    }

    .bmatr-dropzone.is-dragover {
      border-color: rgba(0, 0, 0, 0.55);
      background: rgba(0, 0, 0, 0.03);
    }

    .bmatr-dropzone-inner {
      display: flex;
      align-items: center;
      gap: 14px;
    }

    .bmatr-dropzone-icon {
      width: 46px;
      height: 46px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 12px;
      background: rgba(0, 0, 0, 0.06);
      font-size: 22px;
    }

    .bmatr-dropzone input[type="file"] {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      opacity: 0;
      cursor: pointer;
      z-index: 5;
    }


    .bmatr-top {
      background-color: #fff3cdf5;
      margin-bottom: 20px;
      background-image: url(/wp-content/uploads/2026/02/rubalise.webp);

    }
    .bmatr-topmenu {
      background-color: #fff3cdf5; margin-bottom: 0px;
      background-image: url(/wp-content/uploads/2026/02/rubalise.webp);

    }
    .bmatr-phraseinvaders {
      width: var(--theme-container-width) !important;
      max-width: var(--theme-block-max-width) !important;
      margin: auto;
    }

    /* =========================================================
   style menu APP shortcode bmatr_menu  (DESKTOP + MOBILE)
   - Desktop: sous-menu en hover, avec gap constant
   - Mobile: accordéon (classe .is-open via JS), animé, avec gap constant
   - 1 seul niveau de sous-menu attendu
   ========================================================= */

    /* wrap */
    .bmatr-inline-menu-wrap {
      width: var(--theme-container-width) !important;
      max-width: var(--theme-block-max-width) !important;
      margin: auto;
    }

    /* niveau 1 */
    .bmatr-inline-menu {
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      gap: 1px;
      flex-wrap: wrap;
      align-items: center;
    }

    .bmatr-inline-menu li {
      position: relative;
    }

    .bmatr-inline-menu a {
      display: inline-block;
      text-decoration: none;
      padding: 8px 10px;
      background-color: #848484;
      color: #ffffff;
      text-transform: uppercase;
      font-size: 16px;
    }

    .bmatr-inline-menu a i.fa-solid {
      position: absolute;
      right: 9px;
      top: 13px;
    }

    .bmatr-inline-menu a:hover {

      background-color: #646464;
      color: #ffffff;

    }

    /* ---------------------------
   Sous-menu DESKTOP (hover)
   IMPORTANT : gap + flex sur .sub-menu (pas dans :hover)
   On masque via visibility/opacity, pas via display:none
--------------------------- */
    .bmatr-inline-menu .sub-menu {
      list-style: none;
      margin: 0;
      padding: 0;
      position: absolute;
      top: 100%;
      left: 0;
      min-width: 250px;
      background: #fff;
      border: 1px solid rgba(0, 0, 0, .12);
      box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
      z-index: 9999;

      display: flex;
      /* <- nécessaire pour gap */
      flex-wrap: wrap;
      align-items: center;
      gap: 1px;
      /* <- gap constant */

      visibility: hidden;
      /* <- caché hors hover */
      opacity: 0;
      pointer-events: none;
    }

    .bmatr-inline-menu li:hover>.sub-menu {
      visibility: visible;
      opacity: 1;
      pointer-events: auto;
    }

    .bmatr-inline-menu .sub-menu li {
      width: 100%;
    }

    .bmatr-inline-menu .sub-menu a {
      display: block;
      padding: 9px 12px;
      background-color: #A4A4A4;
      color: #ffffff;
    }

    .bmatr-inline-menu .sub-menu a:hover {
      color: #ffffff;
      background-color: #949494;
    }

    /* Niveau 3+ (si jamais) */
    .bmatr-inline-menu .sub-menu .sub-menu {
      top: 0;
      left: 100%;
    }

    /* ---------------------------
   Indicateurs parents
--------------------------- */
    .bmatr-inline-menu>li.menu-item-has-children>a {
      position: relative;
      padding-right: 34px;
    }



    /* =========================================================
   MOBILE: accordéon (<=768px)
   - Niveau 1 en colonne full width
   - Sous-menu en flux normal + anim max-height
   - On neutralise le hover desktop
   ========================================================= */
    @media (max-width: 768px) {


      .bmatr-inline-menu>li.menu-item-has-children>a::after {
        content: "▼";
        /* fermé */
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        line-height: 1;
        opacity: .9;
        font-size: 14px;
        pointer-events: none;
      }

      .bmatr-inline-menu>li.menu-item-has-children.is-open>a::after {
        content: "▲";
        /* ouvert */
        opacity: 1;
      }


      .bmatr-inline-menu {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
      }

      .bmatr-inline-menu>li {
        width: 100%;
      }

      .bmatr-inline-menu a {
        display: block;
        width: 100%;
      }

      /* neutralise la mécanique hover desktop */
      .bmatr-inline-menu li:hover>.sub-menu {
        visibility: visible;
        /* sans effet en mobile */
        opacity: 0;
        pointer-events: none;
      }

      /* Sous-menu accordéon : flex + gap */
      .bmatr-inline-menu .sub-menu {
        position: static;
        min-width: 0;
        width: 100%;

        display: flex;
        /* <- garde gap */
        flex-direction: column;
        /* <- empile */
        gap: 1px;

        border-left: 0;
        border-right: 0;
        box-shadow: none;

        max-height: 0;
        /* fermé */
        overflow: hidden;
        opacity: 0;
        transform: translateY(-4px);
        pointer-events: none;

        /* en mobile on ne masque pas via visibility */
        visibility: visible;

        transition: max-height .5s ease, opacity .5s ease, transform .5s ease;
      }

      .bmatr-inline-menu .sub-menu a {
        background-color: #A4A4A4;
        color: #ffffff;
      }

      .bmatr-inline-menu li.is-open>.sub-menu {
        max-height: 1200px;
        /* borne large */
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
      }
    }

    /* Bootstrap 5 : override propre des z-index */
    #bmatrKbisModal {
      --bs-modal-zindex: 200000;
      z-index: 200000 !important;
    }

    .modal-backdrop {
      --bs-backdrop-zindex: 199999;
      z-index: 199999 !important;
    }


    /* BMATR - Term selector (taxonomie hiérarchique) */
    .bmatr-termselector-finder {
      margin: 0 0 12px 0;
    }

    /* Finder: bouton croix clear (généré en JS) */
    .bmatr-termselector-finder,
    .bmatr-termselector-finderwrap {
      position: relative;
    }

    .bmatr-termselector-finder input,
    .bmatr-termselector-finderwrap input {
      padding-right: 48px;
    }

    .bmatr-termselector-finder .bmatr-finder-clear,
    .bmatr-termselector-finderwrap .bmatr-finder-clear {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      width: 28px;
      height: 28px;
      border: 1px solid rgba(0, 0, 0, 0.12);
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.9);
      padding: 0;
      cursor: pointer;
      display: none;
      z-index: 2;
    }

    .bmatr-termselector-finder.bmatr-finder-hasvalue .bmatr-finder-clear,
    .bmatr-termselector-finderwrap.bmatr-finder-hasvalue .bmatr-finder-clear {
      display: inline-block;
    }

    .bmatr-termselector-finder .bmatr-finder-clear::before,
    .bmatr-termselector-finder .bmatr-finder-clear::after,
    .bmatr-termselector-finderwrap .bmatr-finder-clear::before,
    .bmatr-termselector-finderwrap .bmatr-finder-clear::after {
      content: "";
      position: absolute;
      left: 50%;
      top: 50%;
      width: 14px;
      height: 2px;
      background: rgba(0, 0, 0, 0.55);
      transform-origin: center;
    }

    .bmatr-termselector-finder .bmatr-finder-clear::before,
    .bmatr-termselector-finderwrap .bmatr-finder-clear::before {
      transform: translate(-50%, -50%) rotate(45deg);
    }

    .bmatr-termselector-finder .bmatr-finder-clear::after,
    .bmatr-termselector-finderwrap .bmatr-finder-clear::after {
      transform: translate(-50%, -50%) rotate(-45deg);
    }

    /* BMATR termselector : rappel sélection (chips) */
    .bmatr-termselector-selectedbar {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin: 0 0 12px 0;
    }

    .bmatr-termselector-selectedbar:empty {
      display: none;
    }

    .bmatr-selected-chip {
      display: inline-flex;
      align-items: center;
      height: 40px;
      padding: 0 10px 0 14px;
      border-radius: 999px;
      border: 1px solid #7bedff;
      box-shadow: inset 0 0 10px 4px #E2F5F8, 4px 4px 4px -2px #7bedff;
      border-color: #7bedff;
      font-weight: 700;
      line-height: 1;
      color: #28B7CA;
    }

    .bmatr-selected-chip-remove {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      margin-left: 10px;
      border: 0;
      border-radius: 999px;
      border: 1px solid #fff;
      cursor: pointer;
      padding: 0;
      font-size: 18px;
      font-weight: 900;
      line-height: 1;
      color: #28B7CA;
    }



    .bmatr-selected-chip-remove:hover {
      background: #FF000088;
      color: #fff;
    }



    .bmatr-termselector {
      width: 100%;
    }

    .bmatr-term {
      font-size: 13px;
    }

    /* Reprend le layout des cartes de rôle, mais renommé en .bmatr-term */
    .bmatr-term.form-check {
      display: grid;
      grid-template-columns: 15px 1fr;
      column-gap: 17px;
      align-items: center;
      padding-left: 9px;
    }

    .bmatr-termselector .bmatr-term-row {
      display: flex;
      gap: 12px;
      align-items: flex-start;
      margin: 0 0 12px 0;
      padding-bottom: 20px;
      position: relative;
    }

    .bmatr-termselector .bmatr-term-row::after {
      content: '';
      width: 100%;
      border-bottom: 1px dashed var(--theme-form-field-border-initial-color);
      bottom: 4px;
      left: 0;
      right: 0;
      height: 1px;
      position: absolute;
      ;
    }

    .bmatr-termselector .bmatr-term:hover {
      border-color: #7bedff;
    }

    .bmatr-termselector .bmatr-term-col-parent {
      width: 230px;
      flex: 0 0 230px;
    }

    .bmatr-termselector .bmatr-term-col-children {
      flex: 1 1 auto;
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      align-items: flex-start;
      padding-left: 10px;
    }

    .bmatr-termselector .bmatr-term-subtree {
      flex: 1 1 100%;
      width: 100%;
      margin-top: 12px;
    }

    /* largeur fixe 200px pour chaque "carte terme" ( enfants) */
    .bmatr-termselector .bmatr-term {
      width: 200px;
      flex: 0 0 200px;
      min-height: 80px;
    }

    /* largeur fixe 200px pour chaque "carte terme" (parents ) */
    .bmatr-termselector .bmatr-term-col-parent .bmatr-term {
      width: 230px;
      flex: 0 0 230px;
      min-height: 80px;
    }

    /* Chevron (termes ayant des enfants) */
    .bmatr-termselector .bmatr-term[data-has-children="1"] {
      padding-right: 44px;
    }

    .bmatr-termselector .bmatr-term[data-has-children="1"]::before {
      content: "";
      position: absolute;
      right: -8px;
      top: 50%;
      width: 14px;
      height: 14px;
      transform: translateY(-50%) rotate(45deg);
      border-top: 0px solid var(--theme-form-field-border-initial-color);
      border-right: 1px solid var(--theme-form-field-border-initial-color);
      opacity: 1;
      pointer-events: none;
      background-color: #FFFFFF;
    }

    /* Réduit la hauteur par rapport aux checkline “rôles” */
    .bmatr-termselector .bmatr-checkline {
      min-height: 80px;
    }

    .bmatr-termselector .bmatr-checkline.bmatr-checkline-checked {
      box-shadow: inset 0 0 10px 4px #E2F5F8, 4px 4px 4px -2px #7bedff;
      border-color: #7bedff;

    }

    .bmatr-termselector .bmatr-term-col-parent .bmatr-checkline {
      border-color: var(--theme-form-field-border-initial-color);
    }

    /* état parent partiel (multi-sélection) */
    .bmatr-termselector .bmatr-term-partial {
      opacity: 0.5;
    }

    /* checkbox carrée (si forcée) */
    .bmatr-termselector .bmatr-term--checkbox.bmatr-checkline::after {
      border-radius: 6px;
    }


    /*
      Responsive "wide tablet / small desktop":
      - colonne parent en pleine largeur
      - colonne enfants en dessous
      - parent en gras
    */
    @media (max-width: 1370px) {

      .bmatr-termselector .bmatr-term-row {
        flex-direction: column;
      }

      .bmatr-termselector .bmatr-term-col-parent {
        width: 100%;
        flex: 1 1 auto;
      }

      .bmatr-termselector .bmatr-term-col-parent .bmatr-term {
        width: 100%;
        flex: 1 1 auto;
      }

      .bmatr-termselector .bmatr-term-col-parent .bmatr-term-text {
        font-weight: 700;
      }

      .bmatr-termselector .bmatr-term-col-children {
        width: 100%;
        flex: 1 1 100%;
        padding-left: 0;
        margin-top: 8px;
      }
    }



    @media (max-width: 768px) {

      .bmatr-termselector .bmatr-term-col-parent .bmatr-term {
        flex-direction: column;
      }

      .bmatr-termselector .bmatr-term-col-parent .bmatr-term, .bmatr-termselector .bmatr-term-col-parent {
        width: 100%;
        flex: 1 1 auto;
      }

      .bmatr-termselector .bmatr-term {
        width: 100%;
        flex: 1 1 auto;
      }
    }


    .bmatr-termselector .bmatr-term-text {
      display: flex;
      flex-direction: column;
      gap: 10px;
      line-height: 20px;
      text-transform: uppercase;
    }

    /* BMATR - Term selector : scope requis */
    .bmatr-termselector-scope-empty {
      padding: 12px 14px;
      border: 1px dashed rgba(0, 0, 0, 0.18);
      border-radius: 12px;
      background: rgba(0, 0, 0, 0.02);
      opacity: 0.85;
    }

    /* === Editpost overlay (front) === */
    .bmatr-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(255, 255, 255, 0.95);
      z-index: 999999;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .bmatr-overlay .bmatr-overlay-msg {
      max-width: 680px;
      width: 100%;
      background: #fff;
      border: 1px solid #e5e5e5;
      border-radius: 14px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
      padding: 18px;
      font-weight: 600;
      text-align: center;
    }

    .bmatr-overlay .bmatr-confirm h3 {
      font-size: 18px;
      margin: 0 0 12px 0;
    }

    .bmatr-editpost-toolbar .btn {
      margin-right: 6px;
    }

    /* === BMATR editpost disabled Gutenberg buttons === */
    .wp-block-button.bmatr-disabled {
      opacity: .55;
    }

    .wp-block-button.bmatr-disabled>a.wp-block-button__link,
    .wp-block-button.bmatr-disabled a.wp-element-button {
      pointer-events: none;
      cursor: not-allowed;
    }

    .bmatr-editpost-addr {
      font-size: x-small;
    }

    /* === BMATR brand selector (termbrandselector) === */
    .bmatr-brandselector-head {
      display: flex;
      flex-wrap: wrap;
      gap: 10px 16px;
      align-items: center;
      justify-content: space-between;
      margin: 0 0 10px 0;
    }

    .bmatr-brandselector-title {
      font-weight: 600;
    }

    .bmatr-brandselector-toggle {
      display: flex;
      align-items: center;
      gap: 8px;
      font-weight: 600;
      user-select: none;
    }

    .bmatr-brandselector-toggles {
      display: flex;
      flex-wrap: wrap;
      gap: 6px 14px;
      align-items: center;
    }

    .bmatr-termselector--brands .bmatr-brand-logo {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      margin: 6px 0 8px 0;
    }


    .bmatr-termselector--brands .bmatr-term {
      position: relative;
      display: block;
      padding: 10px 10px 10px 35px;
      /* place checkbox */
      border-radius: 6px;
    }

    /* DOM MIN (brands only): `.bc` / `.bci` replace `.form-check .bmatr-checkline .bmatr-term--checkbox` (and optional `.bmatr-hasimage`) */
    .bmatr-termselector--brands .bmatr-term.bc,
    .bmatr-termselector--brands .bmatr-term.bci {
      border: 1px solid rgba(0, 0, 0, 0.12);
      background: #ffffff;
      min-height: 43px;
      /* same as .bmatr-termselector .bmatr-checkline */
    }

    .bmatr-termselector--brands .bmatr-term.bc.bmatr-checkline-checked,
    .bmatr-termselector--brands .bmatr-term.bci.bmatr-checkline-checked {
      box-shadow: inset 0 0 10px 4px #E2F5F8, 4px 4px 4px -2px #7bedff;
      border-color: #7bedff;

    }

    .bmatr-termselector--brands .bmatr-term.bc:hover,
    .bmatr-termselector--brands .bmatr-term.bci:hover {
      border-color: #7bedff;

    }

    /* replicate checkline pseudo checkbox for brands (since `.bmatr-checkline` class is removed) */
    .bmatr-termselector--brands .bmatr-term.bc .form-check-input,
    .bmatr-termselector--brands .bmatr-term.bci .form-check-input {
      opacity: 0;
      pointer-events: none;
    }

    .bmatr-termselector--brands .bmatr-term.bc::after,
    .bmatr-termselector--brands .bmatr-term.bci::after {
      content: "";
      width: 20px;
      height: 20px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 6px;
      /* checkbox carré */
      border: 2px solid rgba(0, 0, 0, 0.18);
      background: transparent;
      color: #fff;
      font-size: 18px;
      line-height: 1;
      position: absolute;
      left: 8px;
      bottom: 12px;
      pointer-events: none;
    }

    .bmatr-termselector--brands .bmatr-term.bc:focus-within::after,
    .bmatr-termselector--brands .bmatr-term.bci:focus-within::after {
      box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.25);
    }

    /* À AJOUTER (sur le parent) */
    .bmatr-checkline-checked::after {
      content: "✓";
      background: #28B7CA;
      border-color: #28B7CA;
    }

    .bmatr-termselector--brands .bmatr-term.bmatr-checkline-checked::after {
      content: "✓";
      background: #28B7CA;
      border-color: #28B7CA;
    }

    .bmatr-checkline::after {
      left: 8px;
      bottom: 30px;
      top: auto;
      color: #fff;
      /* si c'était déjà le cas avant */
      font-weight: 700;
      /* idem */
      font-size: 14px;
      /* idem */
      line-height: 18px;
      /* idem */
      text-align: center;
      /* idem */
    }

    /*
      Rectangles réguliers (marques) :
      - on réserve TOUJOURS la zone logo (100px) pour toutes les cartes (même sans image)
      - ainsi, toutes les cartes ont le même gabarit visuel (zone vide si pas d'image)
    */
    .bmatr-termselector--brands .bmatr-term.bmatr-hasimage,
    .bmatr-termselector--brands .bmatr-term.bci,
    .bmatr-termselector--brands .bmatr-term.bc {
      padding-top: 100px;
    }



    .bmatr-termselector--brands .form-check-input {
      position: absolute;
      left: 14px;
      top: 14px;
      margin: 0;
    }

    .bmatr-termselector--brands .bmatr-brand-logo {
      width: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      margin: 6px 0 10px 0;
    }

    .bmatr-termselector--brands .bmatr-hasimage .bmatr-brand-logo,
    .bmatr-termselector--brands .bmatr-term.bci .bmatr-brand-logo {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 100px;
    }

    .bmatr-termselector--brands .bmatr-brand-logo img {
      max-width: 180px;
      max-height: 100px;
      width: auto;
      height: auto;
      object-fit: contain;
      border-radius: 0px;
      background: rgba(255, 255, 255, .7);
      padding: 10px;
      z-index: 1;
    }

    .bmatr-termselector--brands .form-check-titre {
      display: block;
      z-index: 2;
      position: relative;
    }



    .bmatr-termselector--brands .bmatr-term.bmatr-scope-hidden {
      display: none !important;
    }

    /* Loader marques (pendant le regroupage initial A..Z) */
    .bmatr-brands-loader {
      width: 100%;
      height: 300px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .bmatr-brands-loader.is-hidden {
      display: none;
    }

    /* Lettrines A..Z (termbrandselector) */
    .bmatr-termselector--brands .bmatr-brand-letter {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      min-height: 80px;
      border-radius: 14px;
      font-weight: 800;
      font-size: 34px;
      line-height: 1;
      background: rgba(0, 0, 0, 0.03);
      border: 1px dashed rgba(0, 0, 0, 0.15);
    }

    @media (min-width: 769px) {
      .bmatr-termselector--brands .bmatr-brand-letter-col {
        width: 70px;
        flex: 0 0 70px;
      }
    }

    /* Rectangles réguliers (pas de "pinterest-like") : CSS grid */
    .bmatr-termselector--brands.bmatr-brands-grouped .bmatr-brand-letter-items {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
      gap: 8px;
      align-content: start;
    }

    .bmatr-termselector--brands.bmatr-brands-grouped .bmatr-brand-letter-items>.bmatr-term {
      display: block;
      width: 100%;
      margin: 0;
    }

    .bmatr-brand-letter-row {
      content-visibility: auto;
      contain-intrinsic-size: 1px 260px;
      /* hauteur “moyenne” d’un bloc lettre (à ajuster) */
    }

    .bmatr-brand-letter-items {
      contain: layout paint;
    }

    html.bmatr-resizing *,
    html.bmatr-resizing *::before,
    html.bmatr-resizing *::after {
      transition: none !important;
      animation: none !important;
    }

    /* Responsive grid */
    @media (max-width: 780px) {
      .bmatr-termselector--brands.bmatr-brands-grouped .bmatr-brand-letter-items {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
        gap: 12px;
      }
    }

    @media (max-width: 480px) {
      .bmatr-termselector--brands.bmatr-brands-grouped .bmatr-brand-letter-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    /* Troncature du texte d'origine dans la grille */
    .bmatr-brand-letter-items .bmatr-term-text {
      min-width: 0;
    }

    .bmatr-brand-letter-items .fw-semibold {
      display: block;
      width: 100%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .bmatr-termselector--brands.bmatr-brands-nologos .bmatr-brand-logo {
      display: none !important;
    }

    .bmatr-termselector--brands.bmatr-brands-nologos .bmatr-term.bc,
    .bmatr-termselector--brands.bmatr-brands-nologos .bmatr-term.bci {
      border: none;
      box-shadow: none;
      background: transparent;
      padding: 0 10px 0 36px;
      min-height: 40px;
      height: 40px;
      border-radius: 6px;
    }

    .bmatr-termselector--brands.bmatr-brands-nologos .bmatr-term.bc:hover,
    .bmatr-termselector--brands.bmatr-brands-nologos .bmatr-term.bci:hover {
      background: rgba(125, 237, 255, 0.14);
    }

    .bmatr-termselector--brands.bmatr-brands-nologos .bmatr-term.bc.bmatr-checkline-checked,
    .bmatr-termselector--brands.bmatr-brands-nologos .bmatr-term.bci.bmatr-checkline-checked {
      background: #E2F5F8;
      box-shadow: none;
      border-left: 3px solid #7bedff;
    }

    .bmatr-termselector--brands.bmatr-brands-nologos .bmatr-term.bc::after,
    .bmatr-termselector--brands.bmatr-brands-nologos .bmatr-term.bci::after {
      bottom: auto;
      top: 50%;
      transform: translateY(-50%);
    }

    .bmatr-termselector--brands.bmatr-brands-nologos .form-check-titre {
      display: flex;
      align-items: center;
      height: 40px;
    }

    .bmatr-termselector--brands.bmatr-brands-nologos .fw-semibold {
      line-height: 20px;
    }

    .bmatr-termselector--brands.bmatr-brands-nologos .bmatr-brand-letter {
      min-height: 40px;
      font-size: 24px;
      border-radius: 10px;
    }

    .bmatr-termselector--brands.bmatr-brands-nologos.bmatr-brands-grouped .bmatr-brand-letter-items {
      gap: 4px 12px;
    }


    /* Style du calque flottant (placé dans le body) */
    #bmatr-brand-hover-layer {
      position: absolute;
      z-index: 999999;
      /* Sécurité maximale pour passer au-dessus de tout */
      background-color: #ffffff;
      padding: 4px 8px;
      border-radius: 4px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

      /* Reprise des propriétés typographiques du parent d'origine */
      font-size: 13px;
      font-weight: 600;
      text-transform: uppercase;
      line-height: 20px;

      /* Animations et transformations */
      transform: scale(1.08);
      transform-origin: left center;
      white-space: nowrap;
      display: none;

      /* CRITIQUE : Empêche le calque de capturer la souris et de créer un clignotement */
      pointer-events: none;
    }

    .bmatr-brand-index {
      position: fixed;
      top: 50%;
      right: 8px;
      transform: translateY(-50%);
      z-index: 999999;
      display: flex;
      flex-direction: column;
      gap: 2px;
      padding: 6px 4px;
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.85);
      backdrop-filter: blur(6px);
      border: 1px solid rgba(0, 0, 0, 0.08);
      max-height: 80vh;
      overflow-y: auto;
      user-select: none;
      touch-action: none;
      box-shadow: inset 0 0 10px 4px #E2F5F8, 4px 4px 4px -2px #888;
    }

    .bmatr-brand-index .bmatr-brand-index-item {
      display: block;
      width: 18px;
      height: 18px;
      line-height: 18px;
      text-align: center;
      font-weight: 800;
      font-size: 11px;
      border-radius: 8px;
      text-decoration: none;
    }

    .bmatr-brand-index .bmatr-brand-index-item.bmatr-brand-index-top {
      margin-top: 6px;
      padding-top: 2px;
      border-top: 1px solid rgba(0, 0, 0, 0.08);
      font-size: 12px;
    }

    @media (min-width: 769px) {
      .bmatr-brand-index .bmatr-brand-index-item.bmatr-brand-index-top {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
        margin-left: 6px;
        padding-left: 6px;
        border-left: 1px solid rgba(0, 0, 0, 0.08);
        font-size: 18px;
      }

    }


    .bmatr-brand-index .bmatr-brand-index-item.is-active {
      background: rgba(0, 0, 0, 0.08);
    }

    /* Desktop: index horizontal en bas + lettres plus lisibles */
    @media (min-width: 769px) {
      .bmatr-brand-index {
        top: auto;
        right: auto;
        left: 50%;
        bottom: 12px;
        transform: translateX(-50%);
        flex-direction: row;
        gap: 6px;
        padding: 8px 10px;
        max-height: none;
        max-width: 92vw;
        overflow-x: auto;
        overflow-y: hidden;
        touch-action: pan-x;
      }

      .logged-in  .bmatr-brand-index {
        bottom: 70px;
      }
      .bmatr-brand-index .bmatr-brand-index-item {
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 18px;
        border-radius: 10px;
      }
    }

    @media (max-width: 768px) {
      .bmatr-brand-index {
        right: 4px;
      }

      .bmatr-brand-index .bmatr-brand-index-item {
        width: 22px;
        height: 22px;
        line-height: 22px;
        font-size: 12px;
      }
    }

    /* === BMATR editpost: éditeur WYSIWYG minimal === */
    .bmatr-editpost-editor {
      min-height: 160px;
      overflow: auto;
      white-space: normal;
    }

    .bmatr-editpost-editor:focus {
      outline: none;
    }

    /* --- BMATR modal light (front) --- */
    .bmatr-modal {
      position: fixed;
      inset: 0;
      z-index: 999999;
    }

    .bmatr-modal__backdrop {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, .55);
    }

    .bmatr-modal__panel {
      position: relative;
      z-index: 1;
      max-width: 980px;
      margin: 5vh auto;
      background: #fff;
      border-radius: 10px;
      padding: 14px;
      box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
    }

    .bmatr-modal__header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
      gap: 10px;
    }



    /* Wrapper conseillé pour servir d’ancre */
    .bmatr-usersearch {
      position: relative;
    }

    /* Menu autocomplete jQuery UI */
    .bmatr-usersearch .ui-autocomplete {
      position: absolute !important;
      top: 100% !important;
      left: 0 !important;
      right: 0 !important;
      /* largeur = celle du wrapper */
      width: auto !important;
      margin-top: 6px !important;

      background: #fff !important;
      border: 1px solid rgba(0, 0, 0, .15) !important;
      border-radius: 8px !important;
      box-shadow: 0 10px 30px rgba(0, 0, 0, .15) !important;

      z-index: 999999 !important;
      max-height: 320px !important;
      overflow: auto !important;

      padding: 6px !important;
    }

    /* Items */
    .bmatr-usersearch .ui-autocomplete .ui-menu-item {
      list-style: none !important;
      margin: 0 !important;
      padding: 0 !important;
    }

    .bmatr-usersearch .ui-autocomplete .ui-menu-item-wrapper {
      display: block !important;
      padding: 10px 12px !important;
      border-radius: 6px !important;
      cursor: pointer !important;
      color: #111 !important;
    }

    /* Hover / focus */
    .bmatr-usersearch .ui-autocomplete .ui-menu-item-wrapper.ui-state-active,
    .bmatr-usersearch .ui-autocomplete .ui-menu-item-wrapper:hover {
      background: rgba(0, 0, 0, .06) !important;
      border: none !important;
      margin: 0 !important;
    }
/* ── Champs remplis par API SIRET (lecture seule pour l'inscrit) ─────────── */
.bmatr-api-filled[readonly] {
    background-color: #f5f5f5;
    border-color: #ddd;
    color: #555;
    cursor: default;
}
.bmatr-api-filled[readonly]:focus {
    box-shadow: none;
    border-color: #ddd;
}
.bmatr-api-filled[readonly]::placeholder {
    color: #aaa;
    font-style: italic;
}
/* Bouton Vérifier après succès */
#bmatr_siret_lookup.btn-success {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}
#bmatr_siret_hint {
    min-height: 1.4em;
}

/* ── Mini loader SIRET hint ──────────────────────────────────── */
.bmatr-siret-loader {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-style: italic;
}

/* ══════════════════════════════════════════════════
   CERTIFICATIONS SELECTOR (editpost)
   Switches inline avec logo, style cohérent avec
   bmatr-sw-toggle de shortcode-siteweb-ai
══════════════════════════════════════════════════ */
.bmatr-cert-selector { margin-bottom: 1.25rem; }

.bmatr-cert-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.bmatr-cert-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .18s, background .18s, box-shadow .18s;
    background: #fff;
    user-select: none;
    min-width: 0;
}
.bmatr-cert-item:hover { border-color: #94a3b8; background: #f8fafc; }
.bmatr-cert-item.is-checked {
    border-color: #00CC33;
    background: #f0fdf4;
    box-shadow: 0 0 0 2px rgba(0,204,51,.12);
}

/* Checkbox cachée */
.bmatr-cert-cb {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Switch track + thumb */
.bmatr-cert-switch {
    position: relative;
    width: 36px;
    height: 20px;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background .2s;
    flex-shrink: 0;
}
.bmatr-cert-item.is-checked .bmatr-cert-switch { background: #00CC33; }
.bmatr-cert-thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 14px; height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.bmatr-cert-item.is-checked .bmatr-cert-thumb { transform: translateX(16px); }

/* Logo */
.bmatr-cert-logo {
    width: 28px; height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
}

/* Libellé */
.bmatr-cert-name {
    font-size: .84rem;
    font-weight: 600;
    color: #1e3a5f;
    line-height: 1.3;
    min-width: 0;
}
.bmatr-cert-item.is-checked .bmatr-cert-name { color: #166534; }

@media (max-width: 600px) {
    .bmatr-cert-grid { gap: 7px; }
    .bmatr-cert-item { padding: 7px 10px 7px 8px; font-size: .8rem; }
}

/* ═══════════════════════════════════════════════════════════
   ADMIN "EN TANT QUE" — indicateur visuel vert translucide
   Visible uniquement quand body.bmatr-admin-as-user est présent
   (admin connecté via Web357 Login As User).
   La classe .admloggedin est ajoutée aux éléments admin-only
   (boutons, liens, champs, zones) dans les shortcodes.
═══════════════════════════════════════════════════════════ */

body.bmatr-admin-as-user .admloggedin {
    background: #00CC338f !important;
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px);
    color: #000 !important;
    border-color: #00CC3360 !important;
}

/* Inputs/textareas : fond vert léger + texte lisible */
body.bmatr-admin-as-user input.admloggedin,
body.bmatr-admin-as-user textarea.admloggedin,
body.bmatr-admin-as-user select.admloggedin {
    background: #00CC3322 !important;
    border-color: #00CC3380 !important;
    color: #1a3a1a !important;
}

/* Liens : couleur verte cohérente */
body.bmatr-admin-as-user a.admloggedin {
    color: #006622 !important;
    text-decoration: underline;
}

/* Labels de rôle (cartes radio) : bordure verte */
body.bmatr-admin-as-user label.admloggedin {
    border-color: #00CC3380 !important;
    background: #00CC3318 !important;
}

/* Boutons : vert plein */
body.bmatr-admin-as-user button.admloggedin,
body.bmatr-admin-as-user .btn.admloggedin {
    background: #00CC3390 !important;
    border-color: #00CC33 !important;
    color: #000 !important;
}
body.bmatr-admin-as-user button.admloggedin:hover,
body.bmatr-admin-as-user .btn.admloggedin:hover {
    background: #00CC33c0 !important;
}

/* Conteneurs wrappant plusieurs éléments admin */
body.bmatr-admin-as-user div.admloggedin {
    background: #00CC3312 !important;
    border: 1px dashed #00CC3360;
    border-radius: 8px;
    padding: 8px;
}


a.admloggedin, .admloggedin a {text-decoration: none;}
/* ═══════════════════════════════════════════════════════════
   FAB Save — bouton flottant d'enregistrement
═══════════════════════════════════════════════════════════ */
#bmatr-fab-save:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 24px rgba(255,51,51,.55);
}
#bmatr-fab-save:active {
    transform: scale(.95) !important;
}



.leaflet-top .leaflet-control {
    margin-top: 60px;
}


/* ============================================================
 * Helpers d'affichage conditionnel selon les body classes
 * bmatr-is-premium, bmatr-is-free, bmatr-renewal-soon, bmatr-renewal-not-soon
 * Poser une de ces classes (Block > Avance > CSS classes) sur n'importe
 * quel bloc Gutenberg/Stackable pour le masquer/afficher selon l'etat.
 *
 * Pattern : show-if-* est masque PAR DEFAUT, puis reaffichage si la body
 * class attendue est posee. Cela evite le faux positif quand aucune body
 * class bmatr-is-* n'est posee (visiteur deconnecte, cache, etc.) : dans
 * ce cas le bloc reste masque au lieu de s'afficher comme si la condition
 * etait vraie.
 *
 * display:revert restaure la valeur native (block/flex/inline selon l'el.)
 * Support Chrome 84+, Firefox 67+, Safari 9.1+, Edge 84+.
 * ============================================================ */

/* hide-if-* : masque seulement si la condition correspondante est vraie */
body.bmatr-is-premium     .bmatr-hide-if-premium      { display: none !important; }
body.bmatr-is-free        .bmatr-hide-if-free         { display: none !important; }
body.bmatr-renewal-soon   .bmatr-hide-if-renewal-soon { display: none !important; }

/* show-if-* : masque par defaut, n'apparait QUE si la condition est vraie */
.bmatr-show-if-premium,
.bmatr-show-if-free,
.bmatr-show-if-renewal-soon {
    display: none !important;
}
body.bmatr-is-premium     .bmatr-show-if-premium      { display: revert !important; }
body.bmatr-is-free        .bmatr-show-if-free         { display: revert !important; }
body.bmatr-renewal-soon   .bmatr-show-if-renewal-soon { display: revert !important; }

/* ============================================================
 * Espace membre : carte "Plan actuel"
 * Neutralise le max-width:350px du conteneur Stackable pour que la carte
 * remplisse toute la largeur de sa cellule de colonne parente.
 * On vise la classe utilitaire qu'on pose sur le wrapper Stackable
 * (bmatr-card-fill), pas une classe Stackable hashee qui peut changer.
 * ============================================================ */
.bmatr-card-fill {
    max-width: 100% !important;
}
.bmatr-card-fill > .stk-row,
.bmatr-card-fill .stk-block-column__content {
    width: 100% !important;
}

/* ============================================================
 * Label sous la jauge (utilise dans la carte Plan actuel et single poseur)
 * ============================================================ */
.jaugetxt {
    display: block;
    text-align: center;
    font-size: .85rem;
    color: #6b7280;
    line-height: 1.15;
    margin-top: 2px;
}
