/* Pages éditoriales des pôles (single-b4y_pole.php). Chargé uniquement sur ces pages. Couleur du pôle : --c. */

.b4y-pole-main { --ink: #111827; --muted: #566070; }

/* ---------- Bannière multi-images ----------
 * Même principe que le carrousel de l'accueil : la photo est montrée telle quelle (aucun voile, dégradé, filtre ni zoom
 * sur l'image). Seuls de petits fonds semi-transparents, limités à la taille de chaque texte, garantissent la lisibilité. */
.b4y-pole-hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: clamp(500px, 42vw, 680px); background: #e9edf2; color: #fff; overflow: hidden; }
/* Fondu sans « lavage » : la photo entrante apparaît par-dessus la sortante, qui reste à pleine opacité jusqu'à la fin du fondu
   (sinon, à mi-chemin, les deux photos translucides laisseraient voir le fond gris et décoloreraient l'image). */
.b4y-pole-hero__rotator .b4y-hero-rotator__slide { object-position: 50% 40%; filter: none; mix-blend-mode: normal; opacity: 0; z-index: 0; transition: opacity .8s cubic-bezier(.25, 1, .5, 1) .8s; }
.b4y-pole-hero__rotator .b4y-hero-rotator__slide.is-active { opacity: 1; z-index: 1; transition-delay: 0s; }
.b4y-pole-hero__inner { position: relative; z-index: 2; width: 100%; padding-block: 64px 96px; }
.b4y-pole-hero__copy { width: fit-content; max-width: min(100%, 600px); }
/* Le bloc de texte couvre toute la largeur au-dessus du diaporama : seuls ses contenus captent la souris,
   sinon les vignettes (placées dans la couche du diaporama) ne sont pas cliquables. */
.b4y-pole-hero__inner { pointer-events: none; }
.b4y-pole-hero__inner > * { pointer-events: auto; }
.b4y-pole-hero__kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 7px 14px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; background: rgba(8, 13, 26, .68); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.b4y-pole-hero__kicker svg { width: 16px; height: 16px; color: #fff; }
.b4y-pole-hero h1 { display: block; width: fit-content; max-width: 100%; margin: 0 0 12px; padding: 8px 16px 10px; border-radius: 10px; background: rgba(8, 13, 26, .6); color: #fff; font-size: clamp(32px, 4.4vw, 60px); font-weight: 900; line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.b4y-pole-hero__lead { display: block; width: fit-content; max-width: min(100%, 32rem); margin: 0; padding: 8px 14px; border-radius: 10px; background: rgba(8, 13, 26, .6); color: #fff; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.6; text-wrap: pretty; }
.b4y-pole-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; margin: 18px 0 0; }
.b4y-pole-hero__back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 8px; background: rgba(8, 13, 26, .6); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
/* Survol discret : aucun effet de couleur ni de luminosité. La règle globale du bouton principal impose un effet de luminosité
   au survol (avec !important) : neutralisé ici, dans la bannière uniquement ; le léger soulèvement est conservé.
   Le lien retour souligne son texte sans modifier son fond. */
.b4y-pole-hero .b4y-btn.b4y-btn-primary,
.b4y-pole-hero .b4y-btn.b4y-btn-primary:hover,
.b4y-pole-hero .b4y-btn.b4y-btn-primary:focus-visible,
.b4y-pole-hero .b4y-btn.b4y-btn-primary:active { filter: none !important; }
/* Aucune ombre portée ni halo coloré sur la photo (l'ombre globale du bouton est rose au survol) : survol = léger soulèvement + fin liseré blanc. */
.b4y-pole-hero .b4y-btn.b4y-btn-primary,
.b4y-pole-hero .b4y-btn.b4y-btn-primary:active { box-shadow: none !important; }
.b4y-pole-hero .b4y-btn.b4y-btn-primary:hover,
.b4y-pole-hero .b4y-btn.b4y-btn-primary:focus-visible { box-shadow: 0 0 0 2px rgba(255, 255, 255, .9) !important; }
.b4y-pole-hero__back:hover, .b4y-pole-hero__back:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

/* Navigation : miniatures (ordinateur) / points (mobile), mêmes boutons pour le script de défilement */
.b4y-pole-hero__nav { position: absolute; right: 24px; bottom: 24px; z-index: 3; display: flex; align-items: center; gap: 10px; }
.b4y-pole-hero__thumb { position: relative; width: 96px; height: 64px; padding: 0; border: 2px solid rgba(255, 255, 255, .85); border-radius: 10px; background: #e9edf2; overflow: hidden; cursor: pointer; transition: transform .2s; }
.b4y-pole-hero__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Statue équestre : la miniature est cadrée par le haut pour garder la tête du cavalier. */
.b4y-pole-hero__thumb img[src*="688bb823-fd08"] { object-position: 50% 0; }
.b4y-pole-hero__thumb:hover { transform: translateY(-2px); }
.b4y-pole-hero__thumb.is-active { border-color: #fff; box-shadow: 0 0 0 3px var(--c); }
.b4y-pole-hero__thumb:focus-visible { outline: 3px solid #f7b500; outline-offset: 2px; }

/* Contenu éditorial */
.b4y-pole-intro { padding-block: 56px 24px; }
.b4y-pole-layout { display: grid; width: min(calc(100% - 40px), 1160px); margin-inline: auto; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.b4y-pole-content { color: #283245; font-size: 18px; line-height: 1.8; }
.b4y-pole-content > :first-child { margin-top: 0; }
.b4y-pole-content h2 { margin: 38px 0 14px; color: var(--ink); font-size: clamp(26px, 3vw, 34px); line-height: 1.2; }
.b4y-pole-content h3 { margin: 28px 0 10px; color: var(--ink); font-size: 22px; }
.b4y-pole-content p { margin: 0 0 18px; }
.b4y-pole-content p:first-of-type { font-size: 20px; color: var(--ink); }
.b4y-pole-glance { position: sticky; top: 110px; padding: 26px; border: 1px solid #e6e9f0; border-top: 5px solid var(--c); border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgba(17, 24, 39, .06); }
.b4y-pole-glance h2 { margin: 0 0 8px; font-size: 22px; }
.b4y-pole-glance__count { margin: 0 0 14px; color: var(--muted); }
.b4y-pole-glance__count strong { color: var(--c-strong); font-size: 28px; }
.b4y-pole-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.b4y-pole-chips a, .b4y-pole-chips li:not(:has(a)) { display: inline-block; padding: 7px 12px; border-radius: 999px; background: #f3f5f9; color: #283245; font-size: 14px; font-weight: 600; text-decoration: none; }
.b4y-pole-chips a { min-height: 32px; transition: background .15s, color .15s; }
.b4y-pole-chips a:hover, .b4y-pole-chips a:focus-visible { background: var(--c); color: var(--c-on, #fff); }

/* À ne pas manquer */
.b4y-pole-highlights { padding-block: 48px; }
.b4y-pole-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin: 26px 0 0; padding: 0; list-style: none; }
.b4y-pole-card { position: relative; padding: 26px 24px 24px; border: 1px solid #e6e9f0; border-radius: 16px; background: #fff; transition: transform .2s, box-shadow .2s; }
.b4y-pole-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(17, 24, 39, .09); }
.b4y-pole-card__n { display: block; margin-bottom: 10px; color: var(--c-strong); font-size: 34px; font-weight: 800; line-height: 1; }
.b4y-pole-card h3 { margin: 0 0 8px; color: var(--ink); font-size: 20px; line-height: 1.25; }
.b4y-pole-card p { margin: 0; color: var(--muted); line-height: 1.65; }

/* Bon à savoir */
.b4y-pole-practical { padding-block: 24px 48px; }
.b4y-pole-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 24px 0 0; }
.b4y-pole-facts > div { padding: 20px 22px; border-left: 4px solid var(--c); border-radius: 0 12px 12px 0; background: #f7f8fb; }
.b4y-pole-facts dt { margin: 0 0 6px; color: var(--ink); font-weight: 800; }
.b4y-pole-facts dd { margin: 0; color: var(--muted); line-height: 1.6; }

/* Explorer par thème */
.b4y-pole-explore { padding-block: 48px; background: #f7f8fb; }
.b4y-pole-explore__lead { margin: 10px 0 0; color: var(--muted); }
.b4y-pole-needs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.b4y-pole-needs-grid a { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 16px; border: 1px solid #e6e9f0; border-radius: 12px; background: #fff; color: var(--ink); font-weight: 700; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.b4y-pole-needs-grid a:hover, .b4y-pole-needs-grid a:focus-visible { border-color: var(--c-strong); box-shadow: 0 6px 18px rgba(17, 24, 39, .08); }
.b4y-pole-needs-grid__icon { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--c); color: var(--c-on, #fff); }
.b4y-pole-needs-grid__icon svg { width: 20px; height: 20px; }
.b4y-pole-needs-grid__name { flex: 1; min-width: 0; }
.b4y-pole-needs-grid__count { padding: 2px 9px; border-radius: 999px; background: #eef1f6; color: var(--muted); font-size: 13px; }
.b4y-pole-all { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--c-strong); font-weight: 800; }
.b4y-pole-all svg { width: 16px; height: 16px; }

/* Autres pôles */
.b4y-pole-others { padding-block: 56px 72px; }
.b4y-pole-others__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin: 24px 0 0; padding: 0; list-style: none; }
.b4y-pole-others__grid a { display: block; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 6px 20px rgba(17, 24, 39, .08); color: var(--ink); text-decoration: none; transition: transform .2s; }
.b4y-pole-others__grid a:hover, .b4y-pole-others__grid a:focus-visible { transform: translateY(-3px); }
.b4y-pole-others__img { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.b4y-pole-others__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.b4y-pole-others__name { display: block; padding: 12px 14px; border-bottom: 4px solid var(--c); font-weight: 800; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .b4y-pole-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .b4y-pole-glance { position: static; }
}
@media (max-width: 720px) {
  .b4y-pole-hero { min-height: 480px; align-items: flex-start; }
  .b4y-pole-hero__inner { padding-block: 36px 84px; }
  .b4y-pole-hero__copy { max-width: min(100%, 340px); }
  .b4y-pole-hero h1 { font-size: clamp(26px, 8vw, 36px); padding: 6px 12px 8px; }
  .b4y-pole-hero__lead { font-size: 15px; padding: 6px 12px; }
  .b4y-pole-hero__nav { right: 16px; left: 16px; bottom: 18px; justify-content: flex-end; gap: 8px; }
  /* miniatures → points (zone de toucher 44 px conservée) */
  .b4y-pole-hero__thumb { width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; background: rgba(8, 13, 26, .45); box-shadow: none; }
  .b4y-pole-hero__thumb img { display: none; }
  .b4y-pole-hero__thumb::after { content: ""; position: absolute; inset: -16px -5px; }
  .b4y-pole-hero__thumb.is-active { background: #fff; box-shadow: none; }
  .b4y-pole-hero__thumb:hover { transform: none; }
  .b4y-pole-content { font-size: 17px; }
  .b4y-pole-layout { width: min(calc(100% - 32px), 1160px); }
  .b4y-pole-others__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .b4y-pole-hero__rotator .b4y-hero-rotator__slide { transition: none; }
  .b4y-pole-card, .b4y-pole-others__grid a, .b4y-pole-hero__thumb { transition: none; }
}

/* Bouton pause/lecture : WordPress transformait les glyphes ❚❚ / ▶ en images emoji (rendu bleu hors charte). Icône dessinée en CSS. */
.b4y-pole-hero__nav .b4y-hero-rotator__toggle { position: relative; }
.b4y-pole-hero__nav .b4y-hero-rotator__toggle > span { font-size: 0; line-height: 0; }
.b4y-pole-hero__nav .b4y-hero-rotator__toggle > span img { display: none; }
.b4y-pole-hero__nav .b4y-hero-rotator__toggle::before { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 14px; transform: translate(-50%, -50%); background: linear-gradient(90deg, #fff 0 4px, transparent 4px 8px, #fff 8px 12px); }
.b4y-pole-hero__nav .b4y-hero-rotator__toggle[aria-pressed="true"]::before { width: 0; height: 0; background: none; transform: translate(-35%, -50%); border-left: 12px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.b4y-pole-hero__nav .b4y-hero-rotator__toggle:hover, .b4y-pole-hero__nav .b4y-hero-rotator__toggle:focus-visible { background: rgba(8, 13, 26, .85); }

/* === CR client du 27 nov. 2026 === */
/* « Les autres pôles du Bénin » : fond du nom = couleur de référence du pôle (palette centralisée b4y_pole_palette(), variable --c). */
.b4y-pole-others { background: #fdf1f7; }
.b4y-pole-others__name { border-bottom: 0; background: var(--c, var(--primary, #B1264F)); color: var(--c-on, #fff); } /* aplat officiel, sans dégradé */
/* Cadrage élargi (méta `_b4y_pole_hero_full`) : chaque photo du diaporama est montrée en entier, texte à côté. */
@media (min-width: 901px) {
  .b4y-pole-hero--full { background: #101828; }
  .b4y-pole-hero--full .b4y-pole-hero__rotator .b4y-hero-rotator__slide { left: auto; right: 0; width: 64%; height: 100%; object-fit: contain; object-position: 100% 50% !important; }
  .b4y-pole-hero--full .b4y-pole-hero__copy { max-width: min(100%, 30vw, 440px); }
  .b4y-pole-hero--full h1 { font-size: clamp(30px, 3.2vw, 48px); }
}
@media (max-width: 900px) {
  .b4y-pole-hero.b4y-pole-hero--full { display: block; min-height: 0; background: #101828; }
  .b4y-pole-hero--full .b4y-pole-hero__rotator { position: relative; inset: auto; width: 100%; aspect-ratio: 4 / 3; }
  .b4y-pole-hero--full .b4y-pole-hero__rotator .b4y-hero-rotator__slide { object-fit: contain; object-position: 50% 50% !important; }
  .b4y-pole-hero--full .b4y-pole-hero__inner { padding-block: 20px 28px; }
  .b4y-pole-hero--full .b4y-pole-hero__copy { max-width: 100%; }
}

/* Texte à droite (méta `_b4y_pole_hero_text` = right) : le sujet de la photo, à gauche, reste dégagé. En dessous de
   1100 px, la photo est montrée en haut et le texte dessous, pour ne pas recouvrir le sujet. */
@media (min-width: 1100px) {
  .b4y-pole-hero.b4y-pole-hero--copy-right .b4y-home-container.b4y-pole-hero__inner { width: 100% !important; max-width: none; margin: 0; padding: 32px clamp(16px, 1.6vw, 40px) 112px; display: flex; justify-content: flex-end; }
  .b4y-pole-hero--copy-right .b4y-pole-hero__copy { max-width: min(24vw, 440px); }
  .b4y-pole-hero.b4y-pole-hero--copy-right h1 { font-size: clamp(32px, 2.6vw, 50px); }
  .b4y-pole-hero--copy-right .b4y-pole-hero__lead { font-size: clamp(14px, 1.05vw, 17px); }
}
@media (max-width: 1099px) {
  .b4y-pole-hero.b4y-pole-hero--copy-right { display: block; min-height: 0; background: #101828; }
  .b4y-pole-hero--copy-right .b4y-pole-hero__rotator { position: relative; inset: auto; width: 100%; aspect-ratio: 3 / 2; max-height: 560px; }
  .b4y-pole-hero--copy-right .b4y-pole-hero__inner { padding-block: 20px 28px; }
  .b4y-pole-hero--copy-right .b4y-pole-hero__copy { max-width: min(100%, 640px); }
}
