/*
Theme Name: El Mejor CBD
Theme URI: https://elmejorcbd.es
Author: Karine Le Moen
Description: Thème sur mesure pour le comparateur affilié elmejorcbd.es (bento + tableau comparateur). Couleurs, polices et sections réglables dans Apparence > Personnaliser. Liens affiliés Sixty8 / Awin automatiques.
Version: 1.3.2
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: elmejorcbd
License: GPLv2 or later
*/

/* ==========================================================================
   1. Variables (valeurs par défaut, surchargées par le Customizer)
   ========================================================================== */
:root {
  --c-primary: #1F6F4A;   /* vert principal : hero, boutons */
  --c-primary-dark: #14492F;
  --c-accent: #D4F27A;    /* citron vert : badges, CTA secondaires */
  --c-ink: #16211B;       /* titres, header sombre, footer */
  --c-text: #2E3B33;      /* corps de texte */
  --c-muted: #4A5A50;     /* textes secondaires (contraste AA sur blanc) */
  --c-bg: #EEF0EC;        /* fond de page */
  --c-surface: #FFFFFF;   /* tuiles */
  --c-surface-alt: #F4F5F2;
  --c-soft: #E3EADF;
  --c-border: #E1E6DF;
  --f-title: 'Bricolage Grotesque', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, sans-serif;
  --radius: 28px;
  --radius-sm: 14px;
  --gap: 16px;
  --wrap: 1200px;
  --logo-h: 52px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); }
a:hover { color: var(--c-primary-dark); }
h1, h2, h3, h4 { font-family: var(--f-title); color: var(--c-ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(26px, 3vw, 40px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(21px, 2.1vw, 27px); font-weight: 700; }
h3 { font-size: clamp(17px, 1.5vw, 20px); font-weight: 700; }
h4 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto; background: #fff; padding: 12px 16px; border-radius: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.icon { width: 1em; height: 1em; flex: none; }

/* ==========================================================================
   3. Boutons et badges
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 12px 20px; border-radius: 12px; border: 0;
  font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: var(--c-primary-dark); color: #fff; }
.btn--accent { background: var(--c-accent); color: var(--c-ink); }
.btn--accent:hover { color: var(--c-ink); filter: brightness(.96); }
.btn--dark { background: var(--c-ink); color: #fff; }
.btn--dark:hover { color: #fff; background: #000; }
.btn--ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.55); }
.btn--ghost:hover { color: #fff; border-color: #fff; }
.badge { display: inline-block; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; }
.badge--accent { background: var(--c-accent); color: var(--c-ink); }
.badge--soft { background: #E3F1E8; color: var(--c-primary-dark); }
.eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-primary); margin-bottom: 6px; }

/* ==========================================================================
   4. Header
   ========================================================================== */
.topbar { background: var(--c-ink); color: #E8F5D0; font-size: 13px; text-align: center; padding: 8px 16px; }
.site-header .wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; }
.site-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-ink); font-family: var(--f-title); font-weight: 800; font-size: 22px; }
.site-brand:hover { color: var(--c-ink); }
.site-brand .custom-logo, .custom-logo-link img { height: var(--logo-h); width: auto; }
.site-brand svg { width: 30px; height: 30px; color: var(--c-primary); }
.nav-toggle { display: none; background: var(--c-surface); border: 0; border-radius: 12px; min-width: 44px; min-height: 44px; cursor: pointer; color: var(--c-ink); }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.primary-nav a { display: block; padding: 10px 14px; border-radius: 999px; background: var(--c-surface); color: var(--c-ink); text-decoration: none; font-weight: 500; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { background: var(--c-ink); color: #fff; }
.primary-nav .menu-item-cta > a { background: var(--c-ink); color: #fff; font-weight: 600; }
.primary-nav .sub-menu { display: none; }
@media (max-width: 1024px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .primary-nav { flex-basis: 100%; display: none; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; }
}

/* ==========================================================================
   5. Grille bento
   ========================================================================== */
.site-main { padding: 8px 0 64px; }
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.tile { background: var(--c-surface); border-radius: var(--radius); padding: 28px; min-width: 0; }
.tile > :last-child { margin-bottom: 0; }
.tile--span-2 { grid-column: span 2; }
.tile--span-4 { grid-column: span 4; }
.tile--tall { grid-row: span 2; }
.tile--primary { background: var(--c-primary); color: #fff; }
.tile--primary h1, .tile--primary h2 { color: #fff; }
.tile--accent { background: var(--c-accent); color: var(--c-ink); }
.tile--dark { background: var(--c-ink); color: #C8D3CC; }
.tile--dark h2, .tile--dark h3 { color: #fff; }
.tile--dark a { color: var(--c-accent); }
.tile--soft { background: var(--c-soft); }
@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--span-4 { grid-column: span 2; }
  .tile--tall { grid-row: auto; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .tile--span-2, .tile--span-4, .tile--tall { grid-column: auto; grid-row: auto; }
  .tile { padding: 20px; }
  .hero { padding: 26px 22px; min-height: 0; }
  :root { --logo-h: 40px; }
}

/* Hero */
.hero { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-height: 400px; padding: 40px; }
.hero h1 { margin: 0; font-size: clamp(30px, 4vw, 50px); line-height: 1.04; }
.hero__lead { font-size: 18px; line-height: 1.55; color: #DDEFE4; max-width: 46ch; margin: 0; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .badge { align-self: flex-start; }

/* Produit vedette */
.featured { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; padding: 24px; }
.featured__img { width: 140px; height: 140px; object-fit: cover; border-radius: 20px; background: var(--c-surface-alt); }
.featured__body { flex: 1 1 200px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.featured__body h2 { font-size: 24px; margin: 0; }
.featured__meta { color: var(--c-muted); font-size: 15px; margin: 0; }

/* Tuiles chiffres */
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat__label { font-size: 14px; font-weight: 600; }
.stat__value { font-family: var(--f-title); font-size: 44px; font-weight: 800; line-height: 1; }
.stat__value--code { font-size: 30px; color: var(--c-accent); letter-spacing: .04em; }
.stat__note { font-size: 14px; }

/* Puces de liens */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips a { display: inline-block; background: #fff; color: var(--c-ink); text-decoration: none; padding: 10px 14px; border-radius: 999px; font-weight: 600; }
.chips a:hover { background: var(--c-ink); color: #fff; }

/* FAQ */
.faq details { background: #fff; border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; color: var(--c-ink); }
.faq details p { margin: 10px 0 0; color: var(--c-muted); }

/* ==========================================================================
   6. Comparateur
   ========================================================================== */
.comparador { display: flex; flex-direction: column; gap: 18px; }
.comparador__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.comparador__head h2 { margin: 0; }
.comparador__meta { margin: 6px 0 0; color: var(--c-muted); font-size: 14px; }
.comparador__filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { font: inherit; font-weight: 600; border: 0; border-radius: 999px; padding: 10px 16px; min-height: 44px; cursor: pointer; background: var(--c-surface-alt); color: var(--c-ink); }
.chip-btn[aria-pressed="true"] { background: var(--c-ink); color: #fff; }
.sort-btn { font: inherit; font-weight: 600; background: var(--c-surface-alt); color: var(--c-ink); border: 0; border-radius: 12px; padding: 10px 14px; min-height: 44px; cursor: pointer; }
.table-scroll { overflow-x: auto; border: 1px solid var(--c-border); border-radius: 18px; background: #fff; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp-table th { background: var(--c-surface-alt); text-align: left; padding: 12px; color: var(--c-ink); }
.cmp-table td { padding: 12px; border-top: 1px solid #E9ECE7; color: var(--c-muted); vertical-align: middle; }
.cmp-table .cmp-product { display: flex; gap: 12px; align-items: center; min-width: 200px; }
.cmp-table .cmp-product img { width: 48px; height: 48px; object-fit: cover; border-radius: 12px; background: var(--c-surface-alt); flex: none; }
.cmp-table .cmp-product strong { color: var(--c-ink); font-weight: 600; }
.cmp-table .cmp-price { text-align: right; font-weight: 700; font-size: 15px; color: var(--c-ink); white-space: nowrap; }
.cmp-table .cmp-price .price-before { display: block; margin: 2px 0 0; }
.cmp-table .cmp-nota .nota { flex-direction: column; align-items: flex-start; gap: 2px; }
.cmp-table .cmp-cta { text-align: right; }
.cmp-table .cmp-cta .btn { white-space: nowrap; padding: 10px 14px; font-size: 14px; }
.cmp-table tr[hidden] { display: none; }
.cmp-empty { padding: 24px; text-align: center; color: var(--c-muted); }

/* Un seul format dans le tableau : la colonne « Formato » est inutile */
.cmp-table--one-format tr > :nth-child(2) { display: none !important; }

/* Le comparateur passe en cartes dès que SON cadre est trop étroit pour le tableau
   (requête de conteneur : vaut pour l'accueil, les articles et les catégories, à toute taille d'écran).
   Le tableau le plus large (accueil, tous formats) a besoin d'environ 935 px. */
.comparador { container-type: inline-size; }
@container (max-width: 960px) {
  .table-scroll { overflow: visible; border: 0; background: transparent; }
  .cmp-table { display: block; }
  .cmp-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
  .cmp-table tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
  .cmp-table tr { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--c-border); border-radius: 18px; padding: 14px; }
  .cmp-table tr[hidden] { display: none; }
  .cmp-table tr td { display: block; border: 0; padding: 0; }
  .cmp-table .cmp-product { min-width: 0; }
  .cmp-table .cmp-price { text-align: left; font-size: 18px; }
  .cmp-table .cmp-price .price-before { display: inline; margin-left: 4px; }
  .cmp-table .cmp-nota .nota { flex-direction: row; align-items: center; gap: 6px; }
  .cmp-table .cmp-cta { text-align: left; margin-top: auto; padding-top: 6px; }
  .cmp-table .cmp-cta .btn { width: 100%; }
}
@container (max-width: 560px) { .cmp-table tbody { grid-template-columns: minmax(0, 1fr); } }

/* Encadré « Nuestra selección » compact, juste sous le H1 */
.top-picks { background: var(--c-soft); border-radius: 22px; padding: 16px; margin: 0 0 24px; overflow: hidden; max-width: 100%; }
.top-picks__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.top-picks__title { font-family: var(--f-title); font-weight: 800; font-size: 18px; color: var(--c-ink); margin: 0; }
.top-picks__note { font-size: 12px; color: var(--c-muted); margin: 0; }
.top-picks__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pick { background: #fff; border-radius: 16px; padding: 12px; display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: repeat(6, auto) minmax(0, 1fr) auto; gap: 2px 12px; }
.pick img { grid-column: 1; grid-row: 1 / span 4; width: 64px; height: 64px; object-fit: cover; border-radius: 12px; background: var(--c-surface-alt); }
.pick__label, .pick__name, .pick__meta, .pick__price, .pick .nota { grid-column: 2; }
.pick__label { justify-self: start; background: var(--c-accent); color: var(--c-ink); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.pick:first-child .pick__label { background: var(--c-ink); color: #fff; }
.pick__name { font-weight: 700; color: var(--c-ink); line-height: 1.25; font-size: 15px; }
.pick__meta { font-size: 13px; color: var(--c-muted); line-height: 1.35; }
.pick__price { font-size: 16px; font-weight: 800; color: var(--c-ink); }
.pick .btn { grid-column: 1 / -1; grid-row: 8; align-self: end; width: 100%; margin-top: 8px; padding: 10px 14px; }
@media (max-width: 1024px) { .pick__meta { display: none; } }
@media (max-width: 600px) {
  .top-picks { padding: 12px; }
  .top-picks__grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 4px; min-width: 0; max-width: 100%; }
  .pick { flex: 0 0 86%; scroll-snap-align: start; }
  .pick__label { font-size: 11px; }
  .top-picks__title { font-size: 17px; }
}

/* Note éditoriale « Nota El Mejor CBD » (étoiles + note sur 5) */
.nota { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--c-ink); white-space: nowrap; }
.stars { --p: 0%; display: inline-block; width: 80px; height: 15px; flex: none;
  background: linear-gradient(90deg, #B7791F var(--p), #CED4CB var(--p));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 15'%3E%3Cg%3E%3Cpath id='s' d='M7.5 0l2.2 4.6 5 .7-3.6 3.5.9 5-4.5-2.4-4.5 2.4.9-5L.3 5.3l5-.7z'/%3E%3Cuse href='%23s' x='16'/%3E%3Cuse href='%23s' x='32'/%3E%3Cuse href='%23s' x='48'/%3E%3Cuse href='%23s' x='64'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 15'%3E%3Cg%3E%3Cpath id='s' d='M7.5 0l2.2 4.6 5 .7-3.6 3.5.9 5-4.5-2.4-4.5 2.4.9-5L.3 5.3l5-.7z'/%3E%3Cuse href='%23s' x='16'/%3E%3Cuse href='%23s' x='32'/%3E%3Cuse href='%23s' x='48'/%3E%3Cuse href='%23s' x='64'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.cmp-table .nota { font-size: 14px; }
.cmp-sorts { display: flex; flex-wrap: wrap; gap: 8px; }
.sort-btn[aria-pressed="true"] { background: var(--c-ink); color: #fff; }

/* Barre d'achat fixe (mobile) */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; background: var(--c-ink); color: #fff; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: none; align-items: center; gap: 12px; box-shadow: 0 -6px 20px rgba(0,0,0,.18); }
.sticky-cta.is-visible { display: flex; }
.sticky-cta__text { flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; }
.sticky-cta__text strong { display: block; color: var(--c-accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-cta .btn { flex: none; padding: 10px 16px; }
@media (min-width: 1025px) { .sticky-cta.is-visible { display: none; } }

/* Cartes produit (grille) */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.product-card { background: var(--c-surface-alt); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.product-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; background: #fff; }
.product-card h3 { font-size: 16px; line-height: 1.3; margin: 0; }
.product-card__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; }
.product-card__foot strong { color: var(--c-ink); font-size: 17px; }
@media (max-width: 860px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .product-grid { grid-template-columns: minmax(0, 1fr); } }

/* Encadré produit (dans les articles) */
.product-box { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--c-border); border-radius: 18px; padding: 18px; margin: 28px 0; }
.product-box img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; background: var(--c-surface-alt); }
.product-box__body { flex: 1 1 220px; }
.product-box__body strong { display: block; color: var(--c-ink); font-size: 18px; }
.product-box__body span { color: var(--c-muted); }

/* ==========================================================================
   7. Contenu (articles, pages, guides)
   ========================================================================== */
.content-tile { padding: clamp(20px, 4vw, 44px); }
.entry-header { margin-bottom: 16px; }
.entry-header h1 { margin-bottom: .35em; }
.entry-meta { color: var(--c-muted); font-size: 14px; }
/* Texte limité à 760 px pour la lisibilité ; modules de conversion en pleine largeur */
.entry-content > * { max-width: 760px; }
.entry-content > .comparador, .entry-content > .top-picks, .entry-content > .product-grid, .entry-content > .wp-block-table { max-width: none; }
.entry-content .cmp-table { display: table; margin: 0; }
.entry-content .cmp-table th, .entry-content .cmp-table td { border: 0; border-top: 1px solid #E9ECE7; }
.entry-content .cmp-table thead th { border-top: 0; }
.entry-content .comparador { margin: 24px 0 32px; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--c-border); padding: 10px 12px; text-align: left; }
.entry-content blockquote { margin: 1.5em 0; padding: 16px 20px; background: var(--c-soft); border-radius: var(--radius-sm); }
.entry-content img { border-radius: var(--radius-sm); }
.summary-box { background: var(--c-surface-alt); border-radius: var(--radius-sm); padding: 20px 22px; margin-bottom: 28px; }
.entry-content details { background: var(--c-surface-alt); border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 10px; }
.entry-content details summary { font-weight: 600; color: var(--c-ink); cursor: pointer; }
.entry-content details[open] summary { margin-bottom: 8px; }
.entry-content .wp-block-table { overflow-x: auto; margin: 1.5em 0; }
.entry-content .wp-block-table table { display: table; margin: 0; min-width: 480px; }
.price-before { color: var(--c-muted); font-weight: 400; font-size: .85em; margin-left: 4px; white-space: nowrap; }
.product-box__price { display: block; font-weight: 700; color: var(--c-ink); margin-top: 2px; }
.breadcrumbs { font-size: 14px; color: var(--c-muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--c-muted); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.post-card { background: #fff; border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.post-card__title { font-size: 20px; margin: 0; }
.post-card__title a { color: var(--c-ink); text-decoration: none; }
.post-card__title a:hover { color: var(--c-primary); }
.post-card__body p { margin: 0; color: var(--c-muted); font-size: 15px; }
.pagination { margin-top: 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; background: #fff; border-radius: 12px; text-decoration: none; color: var(--c-ink); font-weight: 600; }
.pagination .current { background: var(--c-ink); color: #fff; }

/* Contact Form 7 */
.wpcf7-form label { display: block; font-weight: 600; color: var(--c-ink); margin-bottom: 14px; }
.wpcf7-form input[type="text"], .wpcf7-form input[type="email"], .wpcf7-form input[type="tel"], .wpcf7-form textarea {
  width: 100%; margin-top: 6px; font: inherit; padding: 13px 16px; border-radius: 12px; border: 1px solid #C9D2C8; background: #fff; color: var(--c-text);
}
.wpcf7-form input:focus, .wpcf7-form textarea:focus { outline: 3px solid var(--c-accent); border-color: var(--c-primary); }
.wpcf7-form .wpcf7-submit { background: var(--c-primary); color: #fff; border: 0; border-radius: 12px; padding: 14px 22px; font: inherit; font-weight: 700; cursor: pointer; min-height: 44px; }
.wpcf7-form .wpcf7-submit:hover { background: var(--c-primary-dark); }

/* Recherche */
.search-form { display: flex; gap: 8px; flex-wrap: wrap; }
.search-form input[type="search"] { flex: 1 1 220px; font: inherit; padding: 12px 16px; border-radius: 12px; border: 1px solid #C9D2C8; }

/* ==========================================================================
   8. Footer, avis d'affiliation, vérification d'âge
   ========================================================================== */
.site-footer { background: var(--c-ink); color: #C8D3CC; padding: 40px 0; font-size: 14px; line-height: 1.6; }
.site-footer .wrap { display: flex; flex-direction: column; gap: 12px; }
.site-footer strong.footer-brand { color: #fff; font-family: var(--f-title); font-size: 20px; }
.site-footer a { color: #fff; }
.site-footer .disclosure strong { color: var(--c-accent); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.aff-notice { font-size: 13px; color: var(--c-muted); background: var(--c-surface-alt); border-radius: 12px; padding: 10px 14px; }

.age-gate { position: fixed; inset: 0; z-index: 9999; background: rgba(22, 33, 27, .92); display: flex; align-items: center; justify-content: center; padding: 16px; }
.age-gate[hidden] { display: none; }
.age-gate__box { background: #fff; border-radius: var(--radius); padding: 32px; max-width: 420px; text-align: center; display: flex; flex-direction: column; gap: 14px; }
.age-gate__box h2 { margin: 0; }
.age-gate__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

@media (max-width: 1024px) { body.has-sticky-cta .site-footer { padding-bottom: 96px; } }
@media (max-width: 1024px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: minmax(0, 1fr); } }

/* Boutons de l'éditeur (bloc Bouton) aux couleurs du thème */
.wp-block-button__link { background: var(--c-primary); color: #fff; border-radius: 12px; padding: 14px 22px; font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.wp-block-button__link:hover { background: var(--c-primary-dark); color: #fff; }
.footer-logo { display: inline-block; }
.footer-logo img { height: 44px; width: auto; }
