/* =========================
   WBC — Formations (COMPLET)
   ========================= */

/* ---------- Variables wrapper ---------- */
.wbc-wrapper{
  --wbc-switch-on:#A600FF;
  --wbc-switch-off:#000000;
  --wbc-hl:#7A22E0; 
  --wbc-product-card:240px;
  --wbc-cat-cols:2;
  --wbc-card-img:40%;
  --wbc-toolbar-width:70%; /* largeur commune recherche + menus */
}
.wbc-wrapper.wbc-boxed{ width:var(--wbc-boxed-width,90%); margin:0 auto; }

@media (max-width:1024px){
  .wbc-wrapper{ --wbc-toolbar-width:86%; }
}
@media (max-width:768px){
  .wbc-wrapper{ --wbc-toolbar-width:96%; }
}

/* ---------- Toolbar (général) ---------- */
.wbc-toolbar{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:12px 16px;
  background:#fff;
  border-bottom:1px solid #eee;
}
.wbc-toolbar-row{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  gap:16px;
  width:100%;
}

/* ---------- Ligne 1 : recherche (centrée) ---------- */
.wbc-toolbar-top .wbc-search{
  width:var(--wbc-toolbar-width);
  max-width:1100px;
  margin:0 auto;
}
.wbc-search label{
  display:block;
  font-size:13px;
  color:#333;
  font-weight:600;
  margin-bottom:6px;
}
.wbc-search input{
  width:100%;
  padding:10px 12px;
  font-size:15px;
  border:1px solid #ccc;
  border-radius:10px;
}
.wbc-search small{
  color:#666;
  font-size:12px;
}

/* ---------- Ligne 2 : grille stable (centrée avec ou sans “Retour”) ---------- */
.wbc-toolbar-bottom{
  display:grid !important;
  grid-template-columns: 1fr auto 1fr !important; /* gauche | centre | droite */
  align-items:center !important;
  column-gap:16px !important;
  width:100% !important;
}
.wbc-toolbar-bottom > .wbc-toolbar-center{
  grid-column:2 !important;           /* toujours colonne centrale */
  justify-self:center !important;
  width:var(--wbc-toolbar-width,70%) !important;
  max-width:1100px !important;
  margin:0 !important;
  display:flex !important;
  gap:16px !important;
  align-items:flex-end !important;
}
.wbc-toolbar-bottom > .wbc-back{
  grid-column:1 !important;
  justify-self:start !important;
}
.wbc-toolbar-bottom > .wbc-desc-toggle{
  grid-column:3 !important;
  justify-self:end !important;
}

@media (max-width:700px){
  .wbc-toolbar-bottom{
    grid-template-columns:1fr !important;
    row-gap:12px !important;
  }
  .wbc-toolbar-bottom > .wbc-toolbar-center{ grid-column:1 !important; }
  .wbc-toolbar-bottom > .wbc-back{ justify-self:start !important; }
  .wbc-toolbar-bottom > .wbc-desc-toggle{ justify-self:end !important; }
}

/* Filtres/Selects */
.wbc-filter{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.wbc-filter label,
.wbc-toggle-title{
  font-size:13px;
  color:#333;
  font-weight:600;
  line-height:1;
}
.wbc-select{
  min-width:260px;
  padding:10px 12px;
  font-size:15px;
  background:#fff;
  color:#111;
  border:1px solid #ccc;
  border-radius:10px;
}

/* Bouton retour */
.wbc-back{
  display:flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  background:transparent;
  border:1px solid #ddd;
  border-radius:10px;
  padding:8px 12px;
}
.wbc-back .wbc-back-ico{
  font-size:18px;
  color:#333;
  transition:color .2s;
}
.wbc-back .wbc-back-txt{
  color:#333;
  font-size:14px;
  transition:color .2s;
}
.wbc-back:hover .wbc-back-ico,
.wbc-back:hover .wbc-back-txt{
  color:#FF151B;
}

/* Switch Description (style ancien) */
.wbc-desc-toggle{ }
.wbc-switch{
  display:flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
}
.wbc-switch-input{
  position:absolute;
  opacity:0;
  width:0;
  height:0;
}
.wbc-switch-slider{
  width:48px;
  height:26px;
  border-radius:999px;
  background:var(--wbc-switch-off);
  position:relative;
  transition:.2s;
  box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);
}
.wbc-switch-slider::after{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:20px;
  height:20px;
  background:#fff;
  border-radius:50%;
  box-shadow:0 1px 2px rgba(0,0,0,.18),0 0 0 1px rgba(0,0,0,.08);
  transition:.2s;
}
.wbc-switch-input:checked + .wbc-switch-slider{
  background:var(--wbc-switch-on);
}
.wbc-switch-input:checked + .wbc-switch-slider::after{
  transform:translateX(22px);
}

/* ---------- Résultats ---------- */
.wbc-results{
  padding:16px 0 32px;
}
.wbc-loading{
  opacity:.5;
  pointer-events:none;
}

/* Highlight de recherche */
.wbc-hl{
  background:#FFF3B0;
  color:inherit;
  font-weight:700;
  padding:0 2px;
}

/* ---------- Catégories (grille et cartes) ---------- */
.wbc-cat-grid{
  display:grid;
  gap:16px;
  grid-template-columns:repeat(var(--wbc-cat-cols),minmax(0,1fr));
}
.wbc-cat-card{
  display:grid;
  grid-template-columns:minmax(180px,var(--wbc-card-img)) 1fr;
  gap:16px;
  padding:14px;
  border:1px solid #eee;
  border-radius:12px;
  background:#fff;
  cursor:pointer;
  transition:box-shadow .2s, transform .1s;
}
.wbc-cat-card:hover{
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  transform:translateY(-1px);
}
.wbc-cat-thumb img{
  width:100%;
  height:auto;
  aspect-ratio:3/1;
  object-fit:cover;
  border-radius:10px;
  background:#f7f7f7;
}
.wbc-cat-title{
  font-size:20px;
  margin:6px 0 8px;
  color:var(--wbc-hl);
  font-weight:700;
}
.wbc-cat-desc{
  color:#555;
}

/* Quand la description globale est OFF sur le wrapper, on plie la carte cat */
.wbc-wrapper.wbc-desc-off .wbc-cat-card{
  grid-template-columns:1fr;
}
.wbc-wrapper.wbc-desc-off .wbc-cat-desc{
  display:none;
}

/* ---------- Produits (grille et cartes) ---------- */
.wbc-products{
  display:grid;
  /* 4 colonnes desktop, 3/2/1 auto selon largeur via minmax */
  grid-template-columns:repeat(
    auto-fill,
    minmax(var(--wbc-product-card,240px), 1fr)
  );
  gap:20px;
  width:100%;
  max-width:100%;
  margin:0 auto;
  box-sizing:border-box;
}

.wbc-product{
  position:relative;
  width:100%;
  border:1px solid #eee;
  border-radius:12px;
  background:#fff;
  padding:12px;
  text-align:center;
  box-sizing:border-box;
}

.wbc-product-thumb{
  width:100%;
  aspect-ratio:1/1;
  overflow:hidden;
  display:block;
  position:relative;
}

.wbc-product-thumb img{
  width:100%;
  height:100%;
  object-fit:contain;          /* image complète, pas de déformation */
  border-radius:8px;
  border:1px solid #f0f0f0;
  background:#fff;
  display:block;
}

.wbc-product-title{
  font-size:16px;
  margin:10px 0 6px;
}
.wbc-product-desc{
  font-size:14px;
  color:#666;
  margin-bottom:6px;
}
.wbc-product-price{
  color:#444;
  font-weight:600;
}

/* Elementor: centrage de la ligne 2 si le thème tente d’écraser */
.elementor-widget-wbc_geyser_formation .wbc-el-wrapper .wbc-toolbar-bottom{
  display:grid !important;
  grid-template-columns:auto 1fr auto !important;
  align-items:center !important;
  column-gap:16px !important;
  width:100% !important;
}
.elementor-widget-wbc_geyser_formation .wbc-el-wrapper .wbc-toolbar-bottom > .wbc-toolbar-center{
  justify-self:center !important;
  width:var(--wbc-toolbar-width,70%) !important;
  max-width:1100px !important;
  margin:0 !important;
  display:flex !important;
  gap:16px !important;
  align-items:flex-end !important;
}
.elementor-widget-wbc_geyser_formation .wbc-el-wrapper .wbc-toolbar-bottom > .wbc-back{
  justify-self:start !important;
}
.elementor-widget-wbc_geyser_formation .wbc-el-wrapper .wbc-toolbar-bottom > .wbc-desc-toggle{
  justify-self:end !important;
}

/* =========================================================
   HERO CATÉGORIE + Description OFF — SCOPÉ .wbc-results
   (pas d’impact sur la toolbar/menus)
   ========================================================= */

.wbc-results .wbc-cat-hero{
  display:grid;
  grid-template-columns:minmax(280px,48%) 1fr;
  gap:24px;
  border:1px solid #EEE;
  border-radius:12px;
  background:#fff;
  padding:16px;
  margin-bottom:18px;
}
.wbc-results .wbc-cat-hero-media img{
  width:100%;
  height:auto;
  object-fit:contain;
  display:block;
  border-radius:10px;
  background:#fff;
}
.wbc-results .wbc-cat-title{
  color:var(--wbc-hl);
  font-weight:800;
  font-size:26px;
  margin:4px 0 10px;
}
.wbc-results .wbc-cat-desc{
  color:#4A4A52;
}

/* Description OFF : image seule puis titre, centré, desc masquée */
.wbc-wrapper.wbc-desc-off .wbc-results .wbc-cat-hero{
  grid-template-columns:1fr;
  text-align:center;
}
.wbc-wrapper.wbc-desc-off .wbc-results .wbc-cat-desc{
  display:none !important;
}
.wbc-wrapper.wbc-desc-off .wbc-results .wbc-cat-title{
  margin-top:10px;
  margin-bottom:0;
}

/* Produits — Description OFF : focus image + titre sous l’image */
.wbc-wrapper.wbc-desc-off .wbc-results .wbc-product{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
.wbc-wrapper.wbc-desc-off .wbc-results .wbc-product-thumb{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}
.wbc-wrapper.wbc-desc-off .wbc-results .wbc-product-thumb img{
  width:100%;
  height:100%;
  aspect-ratio:1/1;
  object-fit:contain;
  margin:0 auto;
}
.wbc-wrapper.wbc-desc-off .wbc-results .wbc-product-title{
  order:2;
  margin-top:12px;
}
.wbc-wrapper.wbc-desc-off .wbc-results .wbc-product-desc{
  display:none !important;
}

/* ===== PRODUIT : quand Titre+Description+Prix sont OFF → carte = image exacte ===== */
.wbc-wrapper.wbc-only-image .wbc-results .wbc-product{
  padding:0;
  border:1px solid #eee;
  border-radius:12px;
  overflow:hidden;
  text-align:center;
  display:block;
}
.wbc-wrapper.wbc-only-image .wbc-results .wbc-product-thumb{
  width:100%;
  border:0;
  padding:0;
  margin:0;
  display:block;
}
.wbc-wrapper.wbc-only-image .wbc-results .wbc-product-thumb img{
  width:100%;
  height:100%;
  aspect-ratio:1 / 1;
  object-fit:contain;
  display:block;
}
.wbc-wrapper.wbc-only-image .wbc-results .wbc-product-title,
.wbc-wrapper.wbc-only-image .wbc-results .wbc-product-desc,
.wbc-wrapper.wbc-only-image .wbc-results .wbc-product-price{
  display:none !important;
}

/* Image seule : 0 padding/marges, pas de line-height parasite */
.wbc-wrapper.wbc-only-image .wbc-results .wbc-product-thumb{
  line-height:0;
}
.wbc-wrapper.wbc-only-image .wbc-results .wbc-product-thumb img{
  margin:0;
}

/* ======== HARD FIX CENTRAGE TOOLBAR (scopé widget) ======== */
body .elementor .elementor-widget-wbc_geyser_formation,
body .elementor .elementor-widget-wbc_geyser_formation .elementor-widget-container,
body .elementor .elementor-widget-wbc_geyser_formation .wbc-el-wrapper,
body .elementor .elementor-widget-wbc_geyser_formation .wbc-el-wrapper .wbc-toolbar,
body .elementor .elementor-widget-wbc_geyser_formation .wbc-el-wrapper .wbc-toolbar-row{
  width:100% !important;
  max-width:none !important;
}

/* La ligne des menus est une grille 1fr | centre | 1fr */
body .elementor .elementor-widget-wbc_geyser_formation .wbc-el-wrapper .wbc-toolbar-bottom{
  display:grid !important;
  grid-template-columns: 1fr minmax(320px, var(--wbc-toolbar-width, 70%)) 1fr !important;
  align-items:center !important;
  column-gap:16px !important;
  width:100% !important;
  margin:0 !important;
}

/* Fix centrage interne du bloc menus (colonne centrale) */
.wbc-wrapper .wbc-toolbar-bottom{
  display:grid !important;
  grid-template-columns: 1fr minmax(320px, var(--wbc-toolbar-width, 70%)) 1fr !important;
  align-items:center !important;
  width:100% !important;
}
.wbc-wrapper .wbc-toolbar-bottom > .wbc-toolbar-center{
  grid-column:2 !important;
  width: min(1100px, var(--wbc-toolbar-width, 70%)) !important;
  max-width: 1100px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display:flex !important;
  justify-content:center !important;
  align-items:flex-end !important;
  gap:16px !important;
  float:none !important;
  text-align:center !important;
}
.wbc-wrapper .wbc-toolbar-bottom > .wbc-back{
  grid-column:1 !important;
  justify-self:start !important;
  float:none !important;
}
.wbc-wrapper .wbc-toolbar-bottom > .wbc-desc-toggle{
  grid-column:3 !important;
  justify-self:end !important;
  float:none !important;
}

/* Pour faire matcher parfaitement la largeur de la recherche du dessus */
.wbc-wrapper .wbc-toolbar-top .wbc-search{
  width: min(1100px, var(--wbc-toolbar-width, 70%)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Mobile : une seule colonne, tout reste propre */
@media (max-width:700px){
  .wbc-wrapper .wbc-toolbar-bottom{
    grid-template-columns: 1fr !important;
    row-gap: 12px !important;
  }
  .wbc-wrapper .wbc-toolbar-bottom > .wbc-toolbar-center{
    grid-column:1 !important;
    justify-content:center !important;
  }
}

/* Liens image produit */
.wbc-product-link-thumb{
  display:block;
  text-decoration:none;
}
.wbc-product-link-thumb img{
  display:block;
}
/* === Sticky de la toolbar === */
.wbc-wrapper.wbc-sticky-on .wbc-toolbar{
  position:sticky;
  top:var(--wbc-sticky-top, 0px);
  z-index:50;
  backdrop-filter:saturate(1.05) blur(2px);
  border-bottom:1px solid #eaeaea;
}

.elementor .elementor-widget-wbc_geyser_formation
  .wbc-el-wrapper .wbc-wrapper.wbc-sticky-on .wbc-toolbar{
  position:sticky !important;
  top:var(--wbc-sticky-top, 80px) !important;
  z-index:50 !important;
}

/* Header au-dessus */
.site-header{
  position:relative;
  z-index:100;
}

/* Offset sticky responsive */
.wbc-wrapper{ --wbc-sticky-top:196px; }
@media (max-width:1024px){
  .wbc-wrapper{ --wbc-sticky-top:180px; }
}
@media (max-width:768px){
  .wbc-wrapper{ --wbc-sticky-top:164px; }
}

/* =====================================================
   GRILLE PRODUITS — VERSION UNIQUE
   ===================================================== */
.wbc-products{
    display: grid !important;
    grid-template-columns: repeat(var(--wbc-products-cols,4), minmax(0,1fr)) !important;
    gap: 24px !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

/* Neutralisation Elementor */
.wbc-products *,
.wbc-products *::before,
.wbc-products *::after{
    box-sizing: border-box !important;
    min-width: 0 !important;
}

/* Images propres */
.wbc-product-thumb img{
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1/1 !important;
    object-fit: contain !important;
    display: block !important;
}

/* Toolbar centrée */
.wbc-el-wrapper .wbc-toolbar{
    max-width: 1100px !important;
    margin: 0 auto !important;
}