/* ===== CD54 BILLARD - BACKGROUND & STRUCTURE ===== */

/* 1. FORCER le background sur TOUTES les pages (accueil, pages, articles, CPT) */
body,
body.home,
body.page,
body.single,
body.single-post,
body.single-club,
body.single-evenement,
body.single-resultat,
body.single-formation,
body.archive,
body.post-type-archive,
body.tax,
body.category,
body.tag,
body.ast-separate-container,
body.ast-default-layout,
body.ast-page-builder-template {
  background: url('https://darkblue-wallaby-991713.hostingersite.com/wp-content/uploads/2025/12/bg-billard-ivory-1.svg') center top / cover fixed !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  background-position: center top !important;
}

/* ============================================================
   CONTENU DES PAGES/ARTICLES - Background élégant et subtil
   ============================================================ */

/* Container de contenu pour pages et articles (pas homepage) */
body:not(.home) .site-content > .ast-container,
body:not(.home) .ast-separate-container .site-content > .ast-container,
body:not(.home) article.ast-article-single,
body:not(.home) .entry-content {
  background:
    /* Dégradé diagonal élégant */
    linear-gradient(
      165deg,
      rgba(254, 253, 251, 0.95) 0%,
      rgba(255, 249, 245, 0.9) 25%,
      rgba(255, 255, 255, 0.95) 50%,
      rgba(250, 251, 253, 0.9) 75%,
      rgba(248, 249, 252, 0.95) 100%
    ) !important;
  border-radius: var(--cd54-radius-lg, 16px) !important;
  padding: 32px !important;
  margin-top: 0 !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04) !important;
}

/* Bordure décorative subtile en haut du contenu */
body:not(.home) article.ast-article-single::before,
body:not(.home) .entry-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cd54-primary, #DD183B) 20%, var(--cd54-primary, #DD183B) 80%, transparent) !important;
  border-radius: 2px;
}

body:not(.home) article.ast-article-single,
body:not(.home) .entry-content {
  position: relative;
}

/* 2. FORCER transparent sur tous les conteneurs Astra (toutes pages) */
#page,
#content,
.site,
.site-content,
.ast-container,
.ast-separate-container,
.ast-separate-container .site-content,
.ast-separate-container > .ast-container,
.ast-separate-container .site-content > .ast-container,
.ast-article-single,
.ast-article-post,
article,
main,
.entry-content,
.ast-separate-container article,
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post {
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* 3. Spécifique aux pages single (clubs, événements, etc.) */
.single .site-content,
.single article,
.single .entry-content,
.single .ast-article-single,
.post-type-archive .site-content,
.post-type-archive article {
  background: transparent !important;
}

/* 4. Container de page et article transparent */
.ast-container,
.entry-content,
.ast-article-inner {
  background: transparent !important;
}

/* 5. Sections et blocs WordPress */
.cd54-footer-sections,
.cd54-partenaires-section,
.cd54-publications-section,
section,
.wp-block-group,
.wp-block-cover:not(.cd54-hero),
.wp-site-blocks,
.wp-block-post-content {
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* 6. GARDER uniquement les cartes blanches et contenus en box */
.partenaires-card,
.publications-card,
.cd54-card,
.publication-card,
.wp-block-post,
.entry-header,
.entry-content > *:not(.alignfull):not(.alignwide) {
  /* Ces éléments gardent leur background si ils en ont un */
}

/* 7. Forcer pour les cartes spécifiques */
.partenaires-card,
.publications-card {
  background: #ffffff !important;
  background-color: #ffffff !important;
}
