/* ============================
   CCX — Articles (blog)
   Scope: posts + archives
   ============================ */

:root{
  --ccx-article-bg: #0b1220;
  --ccx-article-card: rgba(15,23,42,.85);
  --ccx-article-border: rgba(148,163,184,.25);
  --ccx-article-text: #e5e7eb;
  --ccx-article-muted: rgba(229,231,235,.72);
  --ccx-article-accent: #00ff6a;
  --ccx-article-accent2: #f97316;
}

/* Catégorie "Sélection de Bons Plans" : fond sombre + containers transparents */
body.category-selection-bons-plans{
  background: var(--ccx-article-bg);
}

/* On enlève les fonds Divi blancs sur cette catégorie */
body.category-selection-bons-plans #main-content,
body.category-selection-bons-plans #content-area,
body.category-selection-bons-plans .container,
body.category-selection-bons-plans .et_builder_inner_content{
  background: transparent !important;
}
body.category-selection-bons-plans .container{
  max-width:none !important;
  width:100% !important;
  padding-left:0 !important;
  padding-right:0 !important;
}

/* Grille shortcode */
.ccx-sbp-grid{
  display:grid;
  gap:18px;
  padding: 10px 18px 26px;
  max-width: 1100px;
  margin: 0 auto;
}
.ccx-sbp-cols-1{ grid-template-columns: 1fr; }
.ccx-sbp-cols-2{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ccx-sbp-cols-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ccx-sbp-cols-4{ grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 980px){
  .ccx-sbp-cols-3, .ccx-sbp-cols-4{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px){
  .ccx-sbp-grid{ padding: 10px 12px 22px; }
  .ccx-sbp-cols-2, .ccx-sbp-cols-3, .ccx-sbp-cols-4{ grid-template-columns: 1fr; }
}

.ccx-sbp-card{
  border:1px solid var(--ccx-article-border);
  border-radius:18px;
  overflow:hidden;
  background: linear-gradient(145deg, rgba(17,24,39,.9), rgba(2,6,23,.92));
  box-shadow: 0 18px 50px rgba(0,0,0,.40);
}
.ccx-sbp-link{
  display:block;
  color: inherit;
  text-decoration:none;
}
.ccx-sbp-thumb{
  width:100%;
  aspect-ratio: 16/9;
  background: radial-gradient(circle at 30% 30%, rgba(0,255,106,.20), rgba(0,0,0,0) 60%),
              radial-gradient(circle at 70% 60%, rgba(249,115,22,.18), rgba(0,0,0,0) 55%),
              #0b1220;
  display:flex;
  align-items:center;
  justify-content:center;
}
.ccx-sbp-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.ccx-sbp-thumb--empty{
  opacity:.55;
}
.ccx-sbp-body{
  padding: 14px 16px 16px;
}
.ccx-sbp-title{
  margin:0 0 6px;
  font-size: 16px;
  line-height: 1.25;
  color: var(--ccx-article-text);
}
.ccx-sbp-meta{
  font-size: 12px;
  color: var(--ccx-article-muted);
  margin-bottom: 10px;
}
.ccx-sbp-excerpt{
  font-size: 13px;
  line-height: 1.45;
  color: var(--ccx-article-muted);
  margin-bottom: 12px;
}
.ccx-sbp-cta{
  display:inline-block;
  font-size: 13px;
  color: var(--ccx-article-accent);
}
.ccx-sbp-card:hover .ccx-sbp-cta{
  color: var(--ccx-article-accent2);
}

.ccx-sbp-empty{
  padding: 18px;
  text-align:center;
  color: #111827;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.15);
}



/* =========================================================
   FIX Admin-bar (tablette/mobile) + dropdown sous-catégories
   ========================================================= */

/* 1) On cache la WP admin bar en tablette/mobile (comme tu avais) */
@media (max-width:1128px){
  #wpadminbar{
    display:none !important;
  }

  /* WordPress met un margin-top sur html quand admin-bar est active */
  html{
    margin-top:0 !important;
  }

  /* On force la variable wpbar à 0 quand la barre est cachée */
  :root{
    --ccx-wpbar-h: 0px;
  }
}

/* 2) Dropdown sous-catégories (rail) : position stable sous le header */
@media (max-width:1128px){
  .cmx-m .ccx-menu-dropdown{
    top: calc(var(--ccx-wpbar-h, 0px) + var(--cmx-header-h, 129px)) !important;
  }
}

									  