/* =========================================
   SURCHARGES KADENCE
   Neutralise les styles par défaut de Kadence.
   Toutes les règles utilisent !important pour
   garantir la priorité sur les styles Kadence.
   ========================================= */

/* ── Reset global Kadence ─────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box !important;
}

body {
  font-family: 'Lato', system-ui, sans-serif !important;
  background: #FAF7F2 !important;
  color: #2C3E5A !important;
  line-height: 1.6 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ── Masquer le header/footer natif Kadence ── */
/* Kadence Classic */
#masthead,
.site-header,
.kadence-header-wrap,
.kadence-sticky-header,
.header-wrap,
[id="masthead"] {
  display: none !important;
}

/* Kadence footer */
#colophon,
.site-footer,
.footer-wrap,
[id="colophon"] {
  display: none !important;
}

/* Breadcrumb Kadence (on a le nôtre) */
.kadence-breadcrumbs,
.rank-math-breadcrumb {
  display: none !important;
}

/* ── Conteneur principal Kadence ─────────── */
/* Annuler les paddings/margins sur le wrap principal */
.site,
#page,
.hfeed {
  margin: 0 !important;
  padding: 0 !important;
}

.site-content,
#content,
#primary,
.content-area {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
  float: none !important;
}

.container,
.site-container,
.kadence-container {
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Masquer les éléments meta d'article natifs Kadence */
.entry-header,
.entry-footer,
.post-navigation,
.comments-area,
.page-header {
  display: none !important;
}

/* ── Fond de page ─────────────────────────── */
body.home,
body.blog,
body.archive,
body.single,
body.page,
body.error404,
body.search {
  background: #FAF7F2 !important;
}

/* ── Typographie Kadence → nos styles ──────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Merriweather', Georgia, serif;
}

/* Reset marges Kadence sur les titres dans nos sections */
.clj-hero h1,
.about-hero-section h1,
.articles-hero-section h1,
.guides-hero-section h1,
.legal-hero h1 {
  margin: 0 0 20px 0 !important;
  padding: 0 !important;
}

/* ── Liens Kadence dans le contenu ─────────── */
.entry-content a,
.wp-block-post-content a {
  color: #C8920A;
}
.entry-content a:hover,
.wp-block-post-content a:hover {
  color: #E8B830;
}

/* ── Images Kadence ────────────────────────── */
.wp-block-image img {
  border-radius: 6px;
}
img {
  max-width: 100%;
  height: auto;
}

/* ── WPForms — harmonisation ────────────────── */
.wpforms-container .wpforms-form input[type=text],
.wpforms-container .wpforms-form input[type=email],
.wpforms-container .wpforms-form input[type=tel],
.wpforms-container .wpforms-form textarea,
.wpforms-container .wpforms-form select {
  background: #FFFFFF !important;
  border: 1px solid #DDE4F0 !important;
  border-radius: 6px !important;
  padding: 12px 16px !important;
  font-family: 'Lato', system-ui, sans-serif !important;
  font-size: 14px !important;
  color: #2C3E5A !important;
  box-shadow: none !important;
  width: 100% !important;
}
.wpforms-container .wpforms-form input:focus,
.wpforms-container .wpforms-form textarea:focus {
  border-color: #C8920A !important;
  outline: none !important;
}
.wpforms-container .wpforms-form button[type=submit],
.wpforms-container .wpforms-form .wpforms-submit {
  background: #0D1F3C !important;
  color: #FFFFFF !important;
  font-family: 'Lato', system-ui, sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  padding: 14px 28px !important;
  border-radius: 6px !important;
  border: none !important;
  cursor: pointer !important;
}
.wpforms-container .wpforms-form button[type=submit]:hover {
  background: #1A3A6B !important;
}
.wpforms-container .wpforms-form label {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #0D1F3C !important;
  font-family: 'Lato', system-ui, sans-serif !important;
}

/* ── Gutenberg blocks ───────────────────────── */
.wp-block-button__link {
  background: #C8920A;
  color: #0D1F3C;
  border-radius: 6px;
  font-family: 'Lato', system-ui, sans-serif;
  font-weight: 700;
}
.wp-block-button__link:hover {
  background: #E8B830;
}

/* ── Scroll padding pour ancres sticky header ── */
html {
  scroll-padding-top: calc(68px + 16px) !important;
}

/* ── Icône de catégorie sur les vignettes d'article ─────────────
   Les conteneurs (.art-thumb, .archive-card-thumb, .featured-thumb,
   .hp-article-thumb, .related-thumb) ont une règle générique sur
   "img" en object-fit:cover plein cadre ; on la neutralise ici pour
   garder une icône centrée et compacte (voir functions.php). */
.cdj-article-banner-icon {
  position: static !important;
  inset: auto !important;
  width: 44px !important;
  height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  object-fit: contain !important;
  display: block !important;
  margin: auto !important;
}
.article-cover-placeholder .cdj-article-banner-icon {
  width: 72px !important;
  height: 72px !important;
  max-width: 72px !important;
  max-height: 72px !important;
}

/* ── Filigrane (watermark) — caché par défaut, activé seulement
   dans les contextes "bandeau" via les modificateurs ci-dessous ── */
.cdj-article-banner-watermark {
  display: none;
}

/* ── Bandeau article seul : icône agrandie + hauteur réduite ─────
   Vignette grille (.cdj-article-banner-icon à 44px) non touchée. */
.article-cover-placeholder--banner {
  position: relative;
  overflow: hidden;
  height: 185px !important; /* ~34% de moins que 280px */
}
.article-cover-placeholder--banner .cdj-article-banner-icon {
  width: 100px !important;
  height: 100px !important;
  max-width: 100px !important;
  max-height: 100px !important;
  position: relative !important;
  z-index: 1;
}
.article-cover-placeholder--banner .cdj-article-banner-watermark {
  display: block !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 250px !important;
  height: 250px !important;
  max-width: 250px !important;
  max-height: 250px !important;
  transform: translate(-50%, -50%) !important;
  object-fit: contain !important;
  opacity: 0.07 !important;
  z-index: 0;
}

/* ── Carte "à la une" : icône intermédiaire entre la vignette et
   le bandeau article seul, proportionnée à sa zone (min-height 240px) */
.featured-thumb--banner .cdj-article-banner-icon {
  width: 64px !important;
  height: 64px !important;
  max-width: 64px !important;
  max-height: 64px !important;
  position: relative !important;
  z-index: 1;
}
.featured-thumb--banner .cdj-article-banner-watermark {
  display: block !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 160px !important;
  height: 160px !important;
  max-width: 160px !important;
  max-height: 160px !important;
  transform: translate(-50%, -50%) !important;
  object-fit: contain !important;
  opacity: 0.07 !important;
  z-index: 0;
}

/* ── PHASE 1 : bandeau des pages légales aligné sur les 5 autres
   pages hub (Accueil, Articles, Guides, À propos, Contact) ───── */
.legal-page-banner {
  padding: 60px 48px !important;
}
@media (max-width: 768px) {
  .legal-page-banner {
    padding: 40px 20px 36px !important;
  }
}

/* ── Icône de catégorie dans la sidebar "Articles" (home.php) ─── */
.sidebar-cat-icon {
  width: 16px !important;
  height: 16px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  display: block !important;
}

/* ── Logo du header : même structure empilée que le footer ───────
   (image + "Comprendre" / "la Justice" empilés), à l'échelle de la
   barre fine de 68px. Voir header.php pour le markup et plus bas
   dans ce fichier (étape 3) pour le dimensionnement .clj-header
   .clj-logo--withtext. */

/* ── Easy Table of Contents — annule le position:fixed injecté par le JS du plugin ──
   Le plugin bascule son conteneur en position:fixed au scroll (via .ez-toc-sticky-fixed).
   On force position:sticky !important qui bat le style inline sans !important du plugin,
   tout en conservant le comportement "se fige en haut pendant le défilement". */
.ez-toc-sticky,
.ez-toc-sticky-fixed {
  position: sticky !important;
  top: calc(68px + 20px) !important;
  width: auto !important;
  left: auto !important;
  z-index: 1 !important;
  max-height: calc(100vh - 68px - 40px) !important;
  overflow-y: auto !important;
}

/* ── Étape 3 — Différenciation des encadrés "Ce que vous trouverez / ne trouverez pas"
   Remplace la distinction ✅/❌ supprimée par une bordure gauche colorée */
.is-card.is   { border-left: 3px solid #C9A84C !important; }
.is-card.isnot { border-left: 3px solid #0D1F3C !important; }
