/* même style pastel Bricofuté (cartes carrées) */
:root{
 --bfl-bg:#fffaf4;
 --bfl-border:rgba(0,0,0,.07);
 --bfl-grad1:#ffd99a;
 --bfl-grad2:#ffb347;
 --bfl-text:#2f2f2f;
 --bfl-muted:#6b6b6b;
 --bfl-radius:1rem;
 --bfl-shadow:0 10px 24px rgba(0,0,0,.06);
 --bfl-gap:1rem;
 font-size:16px;
}
.bfl-wrap{
 background:var(--bfl-bg);
 border:1px solid var(--bfl-border);
 border-radius:var(--bfl-radius);
 box-shadow:var(--bfl-shadow);
 padding:1rem 1rem 2rem;
 font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
 color:var(--bfl-text);
}
.bfl-toolbar{
 display:flex;
 flex-wrap:wrap;
 gap:.5rem 1rem;
 align-items:flex-end;
 margin-bottom:1rem;
}
.bfl-input,
.bfl-select{
 background:#fff;
 border:1px solid var(--bfl-border);
 border-radius:.75rem;
 padding:.6rem .8rem;
 font-size:.9rem;
 line-height:1.2;
 color:var(--bfl-text);
 box-shadow:0 4px 10px rgba(0,0,0,.03);
 min-width:150px;
}
.bfl-input-num{
 max-width:90px;
}
#bfl-reset{
 background:linear-gradient(90deg,var(--bfl-grad1),var(--bfl-grad2) 60%);
 border:1px solid rgba(0,0,0,.08);
 border-radius:.75rem;
 font-size:.8rem;
 font-weight:600;
 line-height:1.2;
 color:#000;
 padding:.6rem .8rem;
 box-shadow:0 6px 14px rgba(0,0,0,.08);
 cursor:pointer;
}
#bfl-search{
 background:linear-gradient(90deg,var(--bfl-grad1),var(--bfl-grad2) 60%);
 border:1px solid rgba(0,0,0,.08);
 border-radius:.75rem;
 font-size:.8rem;
 font-weight:600;
 line-height:1.2;
 color:#000;
 padding:.6rem .8rem;
 box-shadow:0 6px 14px rgba(0,0,0,.08);
 cursor:pointer;
}
#bfl-search:hover,#bfl-reset:hover{filter:brightness(1.05);}/* hover boost */
.bfl-summary{
 font-size:.9rem;
 color:var(--bfl-text);
 font-weight:600;
 margin-bottom:1rem;
}
.bfl-grid{
 display:grid;
 grid-template-columns:repeat(4,1fr);
 gap:var(--bfl-gap);
}
@media(max-width:1200px){
 .bfl-grid{grid-template-columns:repeat(3,1fr);}
}
@media(max-width:900px){
 .bfl-grid{grid-template-columns:repeat(2,1fr);}
}
@media(max-width:600px){
 .bfl-grid{grid-template-columns:repeat(1,1fr);}
}
.bfl-card{
 background:#fff;
 border:1px solid var(--bfl-border);
 border-radius:var(--bfl-radius);
 box-shadow:0 8px 20px rgba(0,0,0,.06);
 padding:1rem;
 display:flex;
 flex-direction:column;
 position:relative;
 overflow:hidden;
}
.bfl-card-imgwrap{
 width:100%;
 aspect-ratio:1/1;
 background:#fff;
 border:1px solid var(--bfl-border);
 border-radius:.75rem;
 display:flex;
 align-items:center;
 justify-content:center;
 overflow:hidden;
 margin-bottom:.75rem;
}
.bfl-card-imgwrap img{
 max-width:90%;
 max-height:90%;
 object-fit:contain;
}
.bfl-card-name{
 font-size:.9rem;
 font-weight:600;
 line-height:1.3;
 color:var(--bfl-text);
 min-height:2.4em;
 margin-bottom:.4rem;
 display:-webkit-box;
 -webkit-line-clamp:2;
 -webkit-box-orient:vertical;
 overflow:hidden;
}
.bfl-card-price{
 font-size:1rem;
 font-weight:700;
 color:var(--bfl-text);
 margin-bottom:.4rem;
}
.bfl-card-meta{
 font-size:.75rem;
 line-height:1.3;
 color:var(--bfl-muted);
 margin-bottom:.75rem;
}
.bfl-card-bottom{
 margin-top:auto;
 display:flex;
 flex-wrap:wrap;
 gap:.5rem;
 align-items:center;
 justify-content:space-between;
}
.bfl-link{
 flex:1 1 auto;
 text-align:center;
 font-size:.8rem;
 font-weight:600;
 background:linear-gradient(90deg,var(--bfl-grad1),var(--bfl-grad2) 60%);
 color:#000;
 border-radius:.6rem;
 padding:.6rem .75rem;
 text-decoration:none;
 border:1px solid rgba(0,0,0,.08);
 box-shadow:0 3px 10px rgba(0,0,0,.08);
}
.bfl-link:hover{
 filter:brightness(1.05);
}


/* Pastilles source prix : Local / Dept / Nat */
.bfl-badge-dept{
 position:absolute;
 top:8px;
 right:8px;
 padding:3px 8px;
 border-radius:999px;
 font-size:.7rem;
 font-weight:600;
 color:#fff;
 box-shadow:0 2px 6px rgba(0,0,0,.15);
 z-index:2;
}
.bfl-badge-dept.local{
 background:#4CAF50;
}
.bfl-badge-dept.dept{
 background:#ff9800;
}
.bfl-badge-dept.nat{
 background:#9E9E9E;
}

/* Légende source prix : Local / Dept / Nat */
.bfl-legend{
 margin-top:1rem;
 font-size:.8rem;
 color:var(--bfl-muted);
 display:flex;
 gap:1.5rem;
 flex-wrap:wrap;
 align-items:center;
}
.bfl-legend-item{
 display:flex;
 align-items:center;
 gap:.35rem;
}
.bfl-legend-swatch{
 width:12px;
 height:12px;
 border-radius:999px;
}
.bfl-legend-swatch.local{
 background:#4CAF50;
}
.bfl-legend-swatch.dept{
 background:#ff9800;
}
.bfl-legend-swatch.nat{
 background:#9E9E9E;
}


.bfl-toggle-nat{
 display:flex;
 align-items:center;
 gap:.3rem;
 font-size:.8rem;
 color:var(--bfl-muted);
}
.bfl-toggle-nat input{
 margin:0;
}


/* Logos enseignes en haut des cartes */
.bfl-card{
 position:relative;
}

.bfl-store-logo{
  height:20px;
  width:70px;
  max-width:70px;
  display:block;
  object-fit:contain;
}
.bfl-store-name{
 font-size:.7rem;
 color:var(--bfl-muted);
}

/* Logos enseignes en haut des cartes (ligne discrète au-dessus de l'image) */
.bfl-badge-store{
  display:inline-flex;
  align-items:center;
  margin-bottom:.25rem;
  background:transparent;
  padding:0;
  box-shadow:none;
}
.bfl-store-logo{
  height:20px;
  width:70px;
  max-width:70px;
  display:block;
  object-fit:contain;
}
.bfl-store-name{
 font-size:.7rem;
 color:var(--bfl-muted);
 margin-left:.25rem;
}


/* Per-logo tuning */
.bfl-store-logo[src*="telecharger-2.webp"]{ /* Castorama */
    height:24px!important;
    width:85px!important;
    max-width:85px!important;
}
.bfl-store-logo[src*="telecharger-1.webp"]{ /* Leroy Merlin */
    height:24px!important;
    width:85px!important;
    max-width:85px!important;
}
.bfl-store-logo[src*="OIP-1.webp"]{ /* Brico Depot */
    height:18px!important;
    width:60px!important;
    max-width:60px!important;
}



/* ================================
   FINAL PER-BRAND LOGO TUNING
   ================================ */

/* Castorama - boost */
.bfl-store-logo[src*="telecharger-2.webp"]{
    height:26px!important;
    width:90px!important;
    max-width:90px!important;
}

/* Leroy Merlin - slightly larger */
.bfl-store-logo[src*="telecharger-1.webp"]{
    height:28px!important;
    width:90px!important;
    max-width:90px!important;
}

/* Brico Dépôt - softened */
.bfl-store-logo[src*="OIP-1.webp"]{
    height:18px!important;
    width:60px!important;
    max-width:60px!important;
}

/* Bricoman (balanced) */
.bfl-store-logo[src*="OIP-2.webp"]{
    height:20px!important;
    width:70px!important;
    max-width:70px!important;
}

/* Bricomarché */
.bfl-store-logo[src*="OIP-3.webp"]{
    height:20px!important;
    width:70px!important;
    max-width:70px!important;
}

/* Gedimat */
.bfl-store-logo[src*="Gedimat"]{
    height:20px!important;
    width:70px!important;
    max-width:70px!important;
}

/* Point P */
.bfl-store-logo[src*="OIP-4.webp"]{
    height:20px!important;
    width:70px!important;
    max-width:70px!important;
}



/* +2px adjustments */
.bfl-store-logo[src*="telecharger-2.webp"]{ /* Castorama */
    height:28px!important;
}
.bfl-store-logo[src*="telecharger-1.webp"]{ /* Leroy Merlin */
    height:30px!important;
}
.bfl-store-logo[src*="OIP-1.webp"]{ /* Brico Depot */
    height:20px!important;
}
.bfl-store-logo[src*="OIP-3.webp"]{ /* Bricomarche */
    height:22px!important;
}
.bfl-store-logo[src*="Gedimat"]{ /* Gedimat */
    height:22px!important;
}
.bfl-store-logo[src*="OIP-4.webp"]{ /* Point P */
    height:22px!important;
}
/* bricoman unchanged */



/* +4px extra adjustments */
.bfl-store-logo[src*="telecharger-2.webp"]{ /* Castorama */
    height:32px!important;
}
.bfl-store-logo[src*="telecharger-1.webp"]{ /* Leroy Merlin */
    height:34px!important;
}
.bfl-store-logo[src*="OIP-1.webp"]{ /* Brico Depot */
    height:24px!important;
}



/* +4px extra for Brico Depot (final) */
.bfl-store-logo[src*="OIP-1.webp"]{ /* Brico Depot */
    height:28px!important;
}

/* Pagination (style arrondi comme les pages Articles) */
.bfl-pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  margin:1.2rem 0 0;
  flex-wrap:wrap;
}
.bfl-page-btn{
  appearance:none;
  border:1px solid var(--bfl-border);
  background:#fff;
  color:var(--bfl-text);
  border-radius:.85rem;
  height:40px;
  padding:0 .9rem;
  min-width:42px;
  font-size:.9rem;
  font-weight:700;
  box-shadow:0 4px 10px rgba(0,0,0,.04);
  cursor:pointer;
}
.bfl-page-btn:hover{filter:brightness(1.03);}
.bfl-page-btn.is-active{
  background:linear-gradient(90deg,var(--bfl-grad1),var(--bfl-grad2) 60%);
  border:1px solid rgba(0,0,0,.08);
  color:#000;
  box-shadow:0 6px 14px rgba(0,0,0,.12);
}
.bfl-page-btn.is-disabled,
.bfl-page-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  box-shadow:none;
}
.bfl-page-dots{
  color:var(--bfl-muted);
  font-weight:700;
  padding:0 .2rem;
}



/* Quantité + ajout au projet (Noyau Projets) */
.bfl-qty{
 display:flex;
 gap:.4rem;
 align-items:center;
 flex:1 1 auto;
 justify-content:flex-start;
}
.bfl-qty-input{
 width:4.2rem;
 padding:.55rem .55rem;
 border:1px solid var(--bfl-border);
 border-radius:.6rem;
 font-size:.85rem;
 background:#fff;
 color:#000;
}
.bfl-btn-project{
 padding:.6rem .7rem;
 border-radius:.6rem;
 border:1px solid rgba(0,0,0,.12);
 background:#000;
 color:#fff;
 font-weight:700;
 font-size:.8rem;
 box-shadow:0 6px 14px rgba(0,0,0,.18);
 cursor:pointer;
}
.bfl-btn-project:hover{ filter:brightness(1.05); }

.bfl-date-badge{font-size:12px;margin-top:4px;padding:3px 8px;border-radius:999px;display:inline-block;font-weight:600}.bfl-date-badge.green{background:#dcfce7;color:#166534}.bfl-date-badge.orange{background:#fef3c7;color:#92400e}.bfl-date-badge.red{background:#fee2e2;color:#991b1b}

/* Comptes gratuits — mise en avant des offres masquées */
.bfl-summary-count{
 margin-bottom:.65rem;
}
.bfl-account-gate{
 margin-top:12px;
 padding:18px 20px;
 border:1px solid rgba(237,108,20,.42);
 border-radius:16px;
 background:linear-gradient(135deg,#fff9ef 0%,#fff1d8 100%);
 box-shadow:0 8px 22px rgba(0,0,0,.06);
}
.bfl-account-gate-kicker{
 font-size:.78rem;
 font-weight:800;
 text-transform:uppercase;
 letter-spacing:.02em;
 color:#7a4307;
 margin-bottom:5px;
}
.bfl-account-gate-title{
 font-size:1.18rem;
 line-height:1.25;
 font-weight:900;
 color:#162b49;
}
.bfl-account-gate-text{
 margin-top:7px;
 font-size:1rem;
 line-height:1.4;
 font-weight:800;
 color:#6a3900;
}
.bfl-account-gate-note{
 margin-top:7px;
 font-size:.82rem;
 font-weight:600;
 color:#5d6470;
}
.bfl-account-gate-cta{
 display:inline-flex;
 align-items:center;
 justify-content:center;
 margin-top:13px;
 min-height:44px;
 padding:.72rem 1.05rem;
 border-radius:12px;
 background:linear-gradient(90deg,var(--bfl-grad1),var(--bfl-grad2) 60%);
 color:#000;
 font-size:.92rem;
 font-weight:900;
 text-decoration:none;
 box-shadow:0 7px 16px rgba(0,0,0,.10);
}
.bfl-account-gate-cta:hover{filter:brightness(1.04);}

.bfl-card-locked{
 min-height:300px;
 align-items:center;
 justify-content:center;
 text-align:center;
 border:2px dashed rgba(237,108,20,.38);
 background:linear-gradient(145deg,#fffdf9 0%,#fff4e1 100%);
 box-shadow:none;
}
.bfl-card-locked-icon{
 width:54px;
 height:54px;
 border-radius:50%;
 display:flex;
 align-items:center;
 justify-content:center;
 background:#fff;
 border:1px solid rgba(237,108,20,.25);
 font-size:1.45rem;
 margin-bottom:13px;
 box-shadow:0 5px 13px rgba(0,0,0,.05);
}
.bfl-card-locked-title{
 font-size:1.06rem;
 font-weight:900;
 color:#162b49;
}
.bfl-card-locked-text{
 max-width:220px;
 margin-top:7px;
 font-size:.88rem;
 line-height:1.4;
 font-weight:600;
 color:#636a73;
}
.bfl-card-locked-link{
 margin-top:14px;
 display:inline-flex;
 align-items:center;
 justify-content:center;
 padding:.58rem .82rem;
 border-radius:10px;
 background:#fff;
 border:1px solid rgba(237,108,20,.36);
 color:#8a4a00;
 font-size:.82rem;
 font-weight:800;
 text-decoration:none;
}
.bfl-card-locked-more{min-height:240px;}

@media(max-width:600px){
 .bfl-account-gate{padding:16px;}
 .bfl-account-gate-title{font-size:1.08rem;}
 .bfl-account-gate-cta{display:flex;width:100%;box-sizing:border-box;text-align:center;}
 .bfl-card-locked{min-height:210px;}
}
