/*
Theme Name: Boxenet
Theme URI: https://www.boxenet.fr/
Description: L'actualité de la boxe anglaise, lisible et rapide sur tous les écrans. Article à la une en un clic, mode sombre, visionneuse photo et guide du journaliste intégrés.
Author: Équipe BoxeNet
Version: 1.4.4
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: boxenet
Tags: news, blog, accessibility-ready, full-site-editing, wide-blocks, custom-colors
*/

/* ---------------------------------------------------------------------------
   Jetons : couleurs (clair par défaut, sombre selon l'appareil ou choisi avec le bouton)
   et mouvement (un seul langage, niveau « spectaculaire » ; neutralisé si l'appareil le demande).
   --------------------------------------------------------------------------- */
:root {
	--bn-bg: #f3f4f5;
	--bn-surface: #ffffff;
	--bn-ink: #12151a;
	--bn-muted: #59616b;
	--bn-line: #d8dce1;
	--bn-soft: #e9ecef;
	--bn-red: #c40000;
	--bn-teal: #007a99;
	--bn-green: #0b7a4b;
	--bn-night: #0e1116;
	--bn-on-night: #f2f3f5;
	--bn-dist: 32px;
	--bn-dur: 0.75s;
	--bn-stag: 80ms;
	--bn-zoom: 1.09;
	--bn-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bn-bg: #0e1116;
		--bn-surface: #171b21;
		--bn-ink: #eef0f2;
		--bn-muted: #9aa3ad;
		--bn-line: #2a3039;
		--bn-soft: #1f242b;
		--bn-red: #ff4a3d;
		--bn-green: #4fd18f;
		--bn-night: #05070a;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bn-bg: #0e1116;
	--bn-surface: #171b21;
	--bn-ink: #eef0f2;
	--bn-muted: #9aa3ad;
	--bn-line: #2a3039;
	--bn-soft: #1f242b;
	--bn-red: #ff4a3d;
	--bn-green: #4fd18f;
	--bn-night: #05070a;
	color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) {
	:root { --bn-dist: 0px; --bn-dur: 0.2s; --bn-stag: 0ms; --bn-zoom: 1; }
}

body { -webkit-text-size-adjust: 100%; }
:focus-visible { outline: 3px solid var(--bn-red); outline-offset: 2px; }
img { height: auto; }
a { text-underline-offset: 0.2em; }

/* ---------------------------------------------------------------------------
   En-tête : bandeau sombre, liseré rouge, se condense au défilement
   --------------------------------------------------------------------------- */
/* WordPress enveloppe l'en-tête dans un conteneur de sa hauteur : c'est ce conteneur qui doit être collant, sinon l'en-tête défile avec la page. */
.wp-block-template-part:has(> .bn-header) { position: sticky; top: 0; z-index: 50; }
.admin-bar .wp-block-template-part:has(> .bn-header) { top: 32px; }
@media (max-width: 782px) { .admin-bar .wp-block-template-part:has(> .bn-header) { top: 46px; } }
html { scroll-padding-top: 5rem; }
.bn-header {
	background: var(--bn-night);
	color: var(--bn-on-night);
	border-bottom: 3px solid var(--bn-red);
	transition: box-shadow 0.3s;
}
.bn-header.is-condensed { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.bn-header a { color: inherit; }
.bn-header .bn-bar { min-height: 76px; gap: 1rem; transition: min-height 0.35s var(--bn-ease); }
.bn-header.is-condensed .bn-bar { min-height: 56px; }
.bn-header .wp-block-navigation a:hover { color: #fff; }
.bn-header .wp-block-navigation .current-menu-item > a,
.bn-header .wp-block-navigation a[aria-current="page"] { box-shadow: 0 3px 0 var(--bn-red); }
.bn-header .wp-block-site-logo img { height: 46px; width: auto; transition: height 0.35s var(--bn-ease); }
.bn-header.is-condensed .wp-block-site-logo img { height: 34px; }
.bn-header .wp-block-search__button { background: none; color: inherit; padding: 10px; border: 0; line-height: 0; min-width: 44px; min-height: 44px; }
/* Six entrées ne tiennent sur une ligne qu'à partir de 920 px : le menu hamburger de WordPress (écrit en dur à 600 px) est gardé jusqu'à 960 px (marge de 40 px). */
@media (min-width: 600px) and (max-width: 959px) {
	.bn-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
	.bn-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
}
/* Liens du menu ouvert : surface tactile de 44 px sans changer la mise en page ni le trait rouge. */
.bn-header .is-menu-open .wp-block-navigation-item__content { position: relative; }
.bn-header .is-menu-open .wp-block-navigation-item__content::after { content: ""; position: absolute; inset: -12px -8px; }
.bn-header .wp-block-navigation__responsive-container-open, .bn-header .wp-block-navigation__responsive-container-close { padding: 10px; min-width: 44px; min-height: 44px; box-sizing: border-box; }
.bn-header .wp-block-search__button:hover { color: #fff; background: none; }
.bn-header .wp-block-search__inside-wrapper { border: 0; }
.bn-header .wp-block-search__inside-wrapper { align-items: center; gap: 10px; }
body .bn-header .wp-block-search__input { box-sizing: border-box; min-height: 44px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 22px; background: #1a1f27; color: #fff; }
@media (max-width: 600px) { body .bn-header .wp-block-search__input { width: 140px; min-width: 0; padding: 0 12px; } .bn-header .wp-block-search__inside-wrapper { gap: 4px; } }
body .bn-header .wp-block-search__input::placeholder { color: #9aa3ad; }
body .bn-header .wp-block-search__input:focus { outline: 2px solid var(--bn-red); outline-offset: 0; border-color: transparent; }
.bn-theme-toggle { background: none; border: 0; color: inherit; padding: 12px; line-height: 0; cursor: pointer; min-width: 44px; min-height: 44px; }
.bn-theme-toggle:hover { background: rgba(255, 255, 255, 0.1); }

/* ---------------------------------------------------------------------------
   Pied de page
   --------------------------------------------------------------------------- */
.bn-footer { background: var(--bn-night); color: var(--bn-on-night); margin-top: var(--wp--preset--spacing--60); border-top: 3px solid var(--bn-red); }
.bn-footer a { color: inherit; }
.bn-footer a:hover { text-decoration: underline; }
.bn-footer h2, .bn-footer h3 { font-size: 1.375rem; margin: 0; }
/* Colonnes empilées (WordPress les empile sous 782 px) : tout est centré, au lieu de gauche, centre, droite. */
@media (max-width: 781px) { .bn-footer .wp-block-column, .bn-footer .has-text-align-right { text-align: center; } }
.bn-footer .bn-copywrap { background: #000; }
.bn-footer .bn-copy { color: #9aa3ad; font-size: 0.8125rem; text-align: center; padding: 1rem 20px; margin: 0; }

/* ---------------------------------------------------------------------------
   Apparitions au défilement (--bn-k : intensité). Les classes bn-fx-* sont posées par motion.js, uniquement sur
   ce qui est sous la ligne de flottaison : sans JavaScript ou en mouvement réduit, rien n'est masqué.
   --------------------------------------------------------------------------- */
:root { --bn-k: 1.5; }
.bn-fx-card { opacity: 0; transform: translateY(calc(14px * var(--bn-k))); transition: transform calc(0.6s * var(--bn-k)) var(--bn-ease), opacity calc(0.35s * var(--bn-k)); transition-delay: calc(var(--i, 0) * var(--bn-stag)); }
.bn-fx-card.is-in { opacity: 1; transform: none; }
.bn-fx-card.is-done { transition-delay: 0s; transition-duration: 0.3s; }
.bn-fx-photo { opacity: 0; transition: opacity calc(0.5s * var(--bn-k)); }
.bn-fx-photo img { transform: scale(calc(1 + 0.04 * var(--bn-k))); transition: transform calc(0.9s * var(--bn-k)) var(--bn-ease); }
.bn-fx-photo.is-in { opacity: 1; }
.bn-fx-photo.is-in img { transform: none; }
.bn-fx-photo.is-done img { transition-duration: 0.6s; }
.bn-fig.bn-fx-photo a { overflow: hidden; border-radius: 10px; }
.bn-sech.bn-fx-title::after, .wp-block-post-content > h2.bn-fx-title::after { transform: scaleX(0); transform-origin: left; transition: transform calc(0.7s * var(--bn-k)) 0.15s var(--bn-ease); }
.bn-sech.bn-fx-title.is-in::after, .wp-block-post-content > h2.bn-fx-title.is-in::after { transform: none; }
.wp-block-post-content > h2.bn-inter { position: relative; padding-bottom: 8px; }
.wp-block-post-content > h2.bn-inter::after { content: ""; position: absolute; left: 0; bottom: 0; width: 48px; height: 3px; background: var(--bn-red); }
@media (prefers-reduced-motion: reduce) {
	.bn-fx-card, .bn-fx-photo, .bn-fx-photo img, .bn-sech.bn-fx-title::after, .wp-block-post-content > h2.bn-fx-title::after { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------------------
   Photos
   --------------------------------------------------------------------------- */
.bn-ph { display: block; position: relative; overflow: hidden; background: var(--bn-night); }
.bn-ph .bn-img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--bn-ease); }
.bn-ph[data-bn-par] .bn-img { transform: translateY(var(--bn-py, 0px)) scale(1.12); will-change: transform; }
.bn-hov:hover .bn-ph .bn-img { transform: scale(var(--bn-zoom)); }
.bn-hov:hover .bn-ph[data-bn-par] .bn-img { transform: translateY(var(--bn-py, 0px)) scale(calc(1.12 * var(--bn-zoom))); }
.bn-img--vide { background: radial-gradient(120% 90% at 30% 20%, hsl(var(--h) 55% 46%), hsl(var(--h) 45% 13%) 72%); }
.bn-ph--16-10 { aspect-ratio: 16 / 10; }

/* Étiquettes et textes communs */
.bn-tag { display: inline-block; background: var(--bn-red); color: #fff; font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 0.8125rem; letter-spacing: 0.14em; line-height: 1; text-transform: uppercase; padding: 0.4rem 0.6rem; }
.bn-tag--s { font-size: 0.6875rem; padding: 0.3rem 0.45rem; }
.bn-meta { display: block; color: var(--bn-muted); font-size: 0.875rem; }
.bn-more { display: inline-block; margin-top: 0.5rem; font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 0.9375rem; letter-spacing: 0.1em; text-transform: uppercase; transition: transform 0.25s var(--bn-ease), color 0.2s; }
.bn-hov:hover .bn-more { transform: translateX(8px); color: var(--bn-red); }
.bn-vide { color: var(--bn-muted); }

/* ---------------------------------------------------------------------------
   La Une : une grande Une et quatre secondaires
   --------------------------------------------------------------------------- */
.bn-une { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; margin-bottom: 0; }
.bn-une > * { min-width: 0; }
.bn-une a { color: #fff; text-decoration: none; }
.bn-une__big, .bn-sec { position: relative; display: block; isolation: isolate; background: var(--bn-night); }
.bn-une__big { min-height: 520px; display: flex; align-items: flex-end; }
.bn-une__big .bn-ph, .bn-sec .bn-ph { position: absolute; inset: 0; z-index: -2; }
.bn-une__big::after, .bn-sec::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(5, 7, 10, 0.95), rgba(5, 7, 10, 0.08) 72%); }
.bn-une__t { position: relative; width: 100%; padding: clamp(18px, 3vw, 36px); display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; }
.bn-une__h { font-size: clamp(2.5rem, 5.2vw, 4.9rem); line-height: 0.9; margin: 0; padding-top: 0.08em; text-wrap: balance; transition: transform 0.4s var(--bn-ease); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 8; line-clamp: 8; overflow: hidden; }
.bn-une__big:hover .bn-une__h { transform: translateX(6px); }
.bn-une__ex { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; margin: 0; max-width: 56ch; color: #d6dbe1; font-family: var(--wp--preset--font-family--text); font-size: 1.125rem; line-height: 1.5; text-transform: none; }
.bn-une .bn-meta { color: #aab1ba; }
.bn-une__secs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.bn-sec { min-height: 250px; }
.bn-sec__t { position: absolute; inset: auto 0 0; padding: 14px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.bn-sec__h { font-size: clamp(1.375rem, 2.2vw, 1.75rem); line-height: 0.96; margin: 0; transition: color 0.2s; }
.bn-sec:hover .bn-sec__h { color: #ffd9d6; }

/* ---------------------------------------------------------------------------
   Fil d'information, cartes et pagination
   --------------------------------------------------------------------------- */
.bn-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: start; margin-top: var(--wp--preset--spacing--60); }
.bn-cols:has(.bn-col) { grid-template-columns: minmax(0, 1fr) 360px; }
.bn-sech { display: flex; align-items: center; gap: 14px; margin: 0 0 1.25rem; }
.bn-sech > h2 { margin: 0; font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1; }
.bn-sech::after { content: ""; order: 2; flex: 1; height: 3px; background: linear-gradient(90deg, var(--bn-red) 0 64px, var(--bn-line) 64px); }
.bn-sech > p { order: 3; margin: 0; font-family: var(--wp--preset--font-family--display); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.bn-sech > p a { color: var(--bn-red); }
.bn-sech > p a:hover { text-decoration: underline; }

.bn-fil { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 26px; }
.bn-cols:not(:has(.bn-col)) .bn-fil--home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bn-card { display: flex; flex-direction: column; gap: 0.3rem; color: inherit; text-decoration: none; }
.bn-card__h { font-size: clamp(1.625rem, 2.8vw, 2.125rem); line-height: 0.96; margin: 0.6rem 0 0; text-wrap: balance; transition: color 0.2s; }
.bn-card:hover .bn-card__h { color: var(--bn-red); }
.bn-card__ex { margin: 0.3rem 0 0; font-family: var(--wp--preset--font-family--text); font-size: 1rem; line-height: 1.55; color: var(--bn-muted); }

.bn-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-block: 2.5rem 3.5rem; }
.bn-pager .page-numbers { min-width: 44px; height: 44px; display: inline-grid; place-items: center; padding-inline: 12px; border: 1px solid var(--bn-line); font-weight: 700; text-decoration: none; transition: background 0.2s, color 0.2s; }
.bn-pager a.page-numbers:hover { background: var(--bn-ink); color: var(--bn-bg); }
.bn-pager .page-numbers.current { background: var(--bn-ink); color: var(--bn-bg); border-color: var(--bn-ink); }

.bn-col { position: sticky; top: 100px; }

/* Article : chapeau (premier paragraphe stylé « Chapeau ») */
.is-style-chapeau, .wp-block-post-content > p.is-style-chapeau { font-style: italic; font-weight: 600; font-size: 1.375rem; line-height: 1.55; }

/* ---------------------------------------------------------------------------
   Page d'article
   --------------------------------------------------------------------------- */
.bn-bandeau { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: clamp(360px, 52vw, 560px); background: var(--bn-night); color: #fff; margin-block-start: 0; }
.bn-bandeau__ph { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.bn-bandeau__ph .bn-img { width: 100%; height: 100%; object-fit: cover; transform: translateY(var(--bn-py, 0px)) scale(1.12); will-change: transform; }
.bn-bandeau::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(5, 7, 10, 0.94), rgba(5, 7, 10, 0.12) 75%); }
.bn-bandeau__t { width: 100%; max-width: 1240px; margin-inline: auto; padding: clamp(40px, 6vw, 72px) max(20px, env(safe-area-inset-left, 0px)) clamp(22px, 3vw, 36px); display: flex; flex-direction: column; align-items: flex-start; gap: 0.7rem; }
.bn-bandeau__h { font-size: clamp(2.4rem, 6vw, 5.2rem); line-height: 0.92; margin: 0; max-width: 20ch; text-wrap: balance; }
.bn-bandeau__meta { margin: 0; color: #d6dbe1; font-size: 0.9375rem; }
.bn-bandeau__meta a { color: #fff; font-weight: 700; text-decoration: none; }
.bn-bandeau__meta a:hover { text-decoration: underline; }

.bn-partage { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: var(--wp--style--global--content-size, 720px); margin: 0 auto 1.75rem; }
.bn-partage__lbl { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bn-muted); margin-right: 4px; }
.bn-partage__b { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 0.875rem; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1; padding: 0.6rem 0.8rem; border: 1px solid var(--bn-line); background: var(--bn-surface); color: var(--bn-ink); text-decoration: none; cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.12s;  box-sizing: border-box; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; white-space: nowrap; }
.bn-partage__b:hover, .bn-partage__b:focus-visible { background: var(--bn-red); color: #fff; border-color: var(--bn-red); }
.bn-partage .bn-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; margin-right: 8px; }
.bn-partage__ok { color: var(--bn-green); font-weight: 700; font-size: 0.9rem; opacity: 0; transition: opacity 0.2s; }
.bn-partage__ok.is-on { opacity: 1; }
@media (max-width: 480px) { .bn-partage { gap: 6px; } .bn-partage__b { padding-inline: 0.65rem; } .bn-partage .bn-ico { margin-right: 6px; } }
.bn-partage__b:active { transform: scale(0.97); }

/* Texte de l'article : le contenu des anciens articles (éditeur classique) est mis en forme comme les nouveaux */
.wp-block-post-content { overflow-wrap: break-word; }
.wp-block-post-content img { max-width: 100%; height: auto; }
.wp-block-post-content figure, .wp-block-post-content .wp-caption { max-width: 100%; margin-inline: auto; }
.wp-block-post-content .wp-caption { width: auto !important; }
.wp-block-post-content .wp-caption-text, .wp-block-post-content figcaption { font-family: var(--wp--preset--font-family--ui); font-size: 0.875rem; color: var(--bn-muted); margin-top: 0.4rem; text-align: left; }
.wp-block-post-content .alignleft { float: left; margin: 0.25rem 1.5rem 1rem 0; max-width: 50%; }
.wp-block-post-content .alignright { float: right; margin: 0.25rem 0 1rem 1.5rem; max-width: 50%; }
.wp-block-post-content .aligncenter { display: block; margin-inline: auto; }
.wp-block-post-content > h2, .wp-block-post-content > h3 { color: var(--bn-red); margin-block: 2rem 0.75rem; }
.wp-block-post-content > h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.wp-block-post-content > h3 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); }
.wp-block-post-content > ul, .wp-block-post-content > ol { padding-left: 1.4em; }
.wp-block-post-content > ul > li, .wp-block-post-content > ol > li { margin-block: 0.35em; }
.wp-block-post-content > p a, .wp-block-post-content > ul a, .wp-block-post-content > ol a { color: var(--bn-red); text-decoration: underline; text-decoration-thickness: 1px; }
.wp-block-post-content > p a:hover, .wp-block-post-content > ul a:hover, .wp-block-post-content > ol a:hover { text-decoration-thickness: 2px; }
.wp-block-post-content blockquote { margin-inline: 0; }
/* Les anciens articles colorent du texte en rouge pur (#ff0000), trop pâle sur fond clair : on le remplace par le rouge du thème. */
.wp-block-post-content :is([style*="color:#ff0000"], [style*="color: #ff0000"], [style*="color: rgb(255, 0, 0)"], [style*="color:#0000ff"], [style*="color: #0000ff"], [style*="color: rgb(0, 0, 255)"], [style*="color:#3366ff"], [style*="color: #3366ff"]), .wp-block-post-content :is([style*="color:#0000ff"], [style*="color: #0000ff"], [style*="color:#3366ff"], [style*="color: #3366ff"]) a { color: var(--bn-red) !important; }
.wp-block-post-content iframe, .wp-block-post-content video, .wp-block-embed iframe { max-width: 100%; }
@media (max-width: 600px) {
	.wp-block-post-content .alignleft, .wp-block-post-content .alignright { float: none; display: block; margin: 1rem auto; max-width: 100%; }
}

/* Auteur, précédent/suivant, articles liés, commentaires */
.bn-auteur { display: flex; gap: 18px; max-width: var(--wp--style--global--content-size, 720px); margin: 2.5rem auto; padding-block: 1.5rem; border-block: 1px solid var(--bn-line); }
.bn-auteur__av { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.bn-auteur__n { margin: 0; font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 1.5rem; text-transform: uppercase; }
.bn-auteur__bio { margin: 0.25rem 0 0.5rem; color: var(--bn-muted); }
.bn-auteur__l { font-weight: 700; color: var(--bn-red); text-decoration: none; }
.bn-auteur__l:hover { text-decoration: underline; }
.bn-prevnext { max-width: var(--wp--style--global--content-size, 720px); margin: 2rem auto; gap: 16px; }
body .bn-prevnext { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; align-items: stretch; }
.bn-prevnext > * { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; position: relative; padding: 1rem 1.1rem; border: 1px solid var(--bn-line); background: var(--bn-surface); transition: border-color 0.2s, transform 0.25s var(--bn-ease); }
.bn-prevnext > *:hover { border-color: var(--bn-red); transform: translateY(-3px); }
.bn-prevnext .post-navigation-link__label { color: var(--bn-muted); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; }
.bn-prevnext a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; text-decoration: none; font-weight: 600; line-height: 1.35; }
.bn-prevnext a::after { content: ""; position: absolute; inset: 0; }
.bn-prevnext > :empty { display: none; }
.bn-prevnext .post-navigation-link-next { grid-column: 2; text-align: right; }
@media (max-width: 600px) { body .bn-prevnext { grid-template-columns: minmax(0, 1fr); } .bn-prevnext .post-navigation-link-next { grid-column: 1; } }
.bn-lies { margin-top: var(--wp--preset--spacing--60); }
.bn-fil--lies { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Commentaires : section à part, sur une bande pleine largeur, pour ne pas sembler liée à « À lire aussi ». */
.bn-commentaires { margin-top: calc(var(--wp--preset--spacing--60) * 1.5); padding-block: var(--wp--preset--spacing--50); background: var(--bn-surface); box-shadow: 0 0 0 100vmax var(--bn-surface), 0 -1px 0 100vmax var(--bn-line); clip-path: inset(-1px -100vmax 0 -100vmax); }
.bn-comment { padding-block: 1rem; border-top: 1px solid var(--bn-line); }
.bn-comment .wp-block-comment-author-name { font-family: var(--wp--preset--font-family--display); font-weight: 800; text-transform: uppercase; font-size: 1.125rem; }
.bn-comment .wp-block-comment-date { color: var(--bn-muted); font-size: 0.8125rem; }
.wp-block-comments-title { font-size: clamp(1.6rem, 3vw, 2.25rem); }
.wp-block-post-comments-form input[type="text"], .wp-block-post-comments-form input[type="email"], .wp-block-post-comments-form input[type="url"], .wp-block-post-comments-form textarea { width: 100%; padding: 0.7rem 0.8rem; border: 1px solid var(--bn-line); background: var(--bn-surface); color: var(--bn-ink); font: inherit; }
.wp-block-post-comments-form input[type="submit"] { background: var(--bn-red); color: #fff; border: 0; padding: 0.8rem 1.4rem; font-family: var(--wp--preset--font-family--display); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }

/* Barre de progression de lecture (ajoutée par le script sur les articles) */
.bn-top { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 55; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 2px solid var(--bn-red); border-radius: 50%; background: var(--bn-night); color: #fff; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); opacity: 0; transform: translateY(12px); transition: opacity 0.25s, transform 0.3s var(--bn-ease), background 0.2s; }
.bn-top[hidden] { display: none; }
.bn-top.is-on { opacity: 1; transform: none; }
.bn-top:hover { background: var(--bn-red); }
.bn-top:hover svg { transform: translateY(-2px); }
.bn-top svg { transition: transform 0.2s var(--bn-ease); }
.bn-top:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px var(--bn-red); }
@media (prefers-reduced-motion: reduce) { .bn-top, .bn-top svg { transition: none; } }
@media print { .bn-top { display: none; } }
.bn-progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 60; background: var(--bn-red); transform: scaleX(0); transform-origin: left; pointer-events: none; }

@media (max-width: 860px) {
	.bn-fil--lies { grid-template-columns: 1fr; }
	.bn-auteur { flex-direction: column; }
}

/* ---------------------------------------------------------------------------
   Galeries de photos (blocs Galerie) et visionneuse plein écran
   --------------------------------------------------------------------------- */
.wp-block-gallery a[data-bn-view] { cursor: zoom-in; display: block; overflow: hidden; }
.wp-block-gallery a[data-bn-view] img { transition: transform 0.5s var(--bn-ease); }
.wp-block-gallery a[data-bn-view]:hover img { transform: scale(var(--bn-zoom)); }
.wp-block-gallery figcaption { font-family: var(--wp--preset--font-family--ui); }
.bn-vw-open { overflow: hidden; }
.bn-vw { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; background: #05070a; color: #f2f3f5; opacity: 0; transition: opacity 0.4s var(--bn-ease); padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.bn-vw.is-on { opacity: 1; }
.bn-vw__top { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; }
.bn-vw__count { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 1.375rem; letter-spacing: 0.08em; }
.bn-vw__btn { background: transparent; color: #fff; border: 1px solid #4a525a; width: 46px; height: 46px; display: grid; place-items: center; font-size: 1.5rem; line-height: 1; cursor: pointer; transition: background 0.2s, border-color 0.2s, transform 0.12s; }
.bn-vw__btn:hover:not(:disabled) { background: var(--bn-red); border-color: var(--bn-red); }
.bn-vw__btn:active { transform: scale(0.94); }
.bn-vw__btn:disabled { opacity: 0.3; cursor: default; }
.bn-vw__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 70px; overflow: hidden; touch-action: pan-y; }
.bn-vw__prev, .bn-vw__next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.bn-vw__prev { left: 14px; }
.bn-vw__next { right: 14px; }
.bn-vw__fig { margin: 0; max-width: 100%; max-height: 100%; display: grid; place-items: center; cursor: zoom-in; }
.bn-vw__img { max-width: 100%; max-height: min(100%, 68vh); object-fit: contain; transition: opacity 0.3s, transform 0.55s var(--bn-ease); }
.bn-vw.is-zoomed .bn-vw__fig { cursor: zoom-out; }
.bn-vw.is-zoomed .bn-vw__img { transform: scale(1.9); }
.bn-vw__cap { margin: 0; padding: 10px 18px; text-align: center; font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 1.375rem; text-transform: uppercase; letter-spacing: 0.04em; min-height: 3rem; }
.bn-vw__thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 8px 18px 14px; }
.bn-vw__thumb { flex: none; width: 76px; height: 54px; padding: 0; border: 2px solid transparent; background: none; cursor: pointer; opacity: 0.55; transition: opacity 0.2s, border-color 0.2s, transform 0.2s; }
.bn-vw__thumb:hover { opacity: 1; transform: translateY(-3px); }
.bn-vw__thumb[aria-current="true"] { opacity: 1; border-color: var(--bn-red); }
.bn-vw__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) {
	.bn-vw__stage { padding: 0 8px; }
	.bn-vw__prev, .bn-vw__next { top: auto; bottom: 8px; transform: none; }
	.bn-vw__img { max-height: min(100%, 52vh); }
}
@media (prefers-reduced-motion: reduce) { .bn-vw, .bn-vw__img { transition: none; } }

/* Page d'attente (classements) */
.bn-attente { text-align: center; padding-block: var(--wp--preset--spacing--50); border-block: 6px double var(--bn-line); }
.bn-attente h1 { margin-bottom: 0.5rem; }

/* Boutons de WordPress : un balayage sombre au survol, appui net */
.wp-element-button, .wp-block-button__link { position: relative; overflow: hidden; z-index: 0; transition: transform 0.12s; }
.wp-element-button::after, .wp-block-button__link::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bn-night); transform: scaleX(0); transform-origin: left; transition: transform var(--bn-dur) var(--bn-ease); }
.wp-element-button:hover::after, .wp-block-button__link:hover::after { transform: scaleX(1); }
.wp-element-button:active, .wp-block-button__link:active { transform: scale(0.97); }

/* Titres de page */
.wp-block-query-title, .wp-block-term-description { margin-block-end: 1.5rem; }

@media (max-width: 1000px) {
	.bn-une { grid-template-columns: 1fr; }
	.bn-une__big { min-height: 420px; }
	.bn-cols:has(.bn-col) { grid-template-columns: 1fr; }
	.bn-col { position: static; }
}
@media (max-width: 860px) {
	.bn-header .bn-bar { min-height: 64px; }
	.bn-une__secs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin-inline: calc(-1 * max(20px, env(safe-area-inset-left, 0px))); padding-inline: max(20px, env(safe-area-inset-left, 0px)); padding-bottom: 6px; }
	.bn-sec { flex: 0 0 78%; scroll-snap-align: start; min-height: 230px; }
	.bn-fil, .bn-cols:not(:has(.bn-col)) .bn-fil--home { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; }
	.bn-ph .bn-img, .bn-une__h { transition: none !important; }
}

.bn-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Pages courtes : le pied de page reste en bas de l'écran. */
.wp-site-blocks { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.wp-site-blocks > main { flex: 1 0 auto; }

/* Recherche : message sans résultat et champ aux couleurs du thème (clair et sombre). */
.bn-vide__t { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 1.75rem; line-height: 1.1; text-transform: uppercase; color: var(--bn-ink); margin: 0 0 0.5rem; }
.bn-vide { color: var(--bn-muted); font-size: 1.125rem; }
.bn-vide a { color: var(--bn-red); text-decoration: underline; text-underline-offset: 0.15em; }
.wp-block-search__input { background: var(--bn-surface); color: var(--bn-ink); border: 1px solid var(--bn-line); }
.wp-block-search__input::placeholder { color: var(--bn-muted); }

/* Anciens articles, mode sombre : les couleurs écrites dans le texte (bleu pur, noir) deviennent lisibles. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .wp-block-post-content :is([style*="color:#333399"], [style*="color: #333399"]),
	:root:not([data-theme="light"]) .wp-block-post-content :is([style*="color:#333399"], [style*="color: #333399"]) a { color: #aeb0ff !important; }
	:root:not([data-theme="light"]) .wp-block-post-content :is([style*="color:#000000"], [style*="color: #000000"], [style*="color:#000;"], [style*="color: #000;"], [style*="color: rgb(0, 0, 0)"], [style*="color:#333333"], [style*="color: #333333"]) { color: var(--bn-ink) !important; }
	:root:not([data-theme="light"]) .wp-block-post-content :is([style*="color:#855720"], [style*="color: #855720"], [style*="color:#572a00"], [style*="color: #572a00"]) { color: #e0a96d !important; }
}
:root[data-theme="dark"] .wp-block-post-content :is([style*="color:#333399"], [style*="color: #333399"]),
:root[data-theme="dark"] .wp-block-post-content :is([style*="color:#333399"], [style*="color: #333399"]) a { color: #aeb0ff !important; }
:root[data-theme="dark"] .wp-block-post-content :is([style*="color:#000000"], [style*="color: #000000"], [style*="color:#000;"], [style*="color: #000;"], [style*="color: rgb(0, 0, 0)"], [style*="color:#333333"], [style*="color: #333333"]) { color: var(--bn-ink) !important; }
:root[data-theme="dark"] .wp-block-post-content :is([style*="color:#855720"], [style*="color: #855720"], [style*="color:#572a00"], [style*="color: #572a00"]) { color: #e0a96d !important; }

/* Corps d'article : présentation automatique du texte et des photos (voir inc/content.php). */
.wp-block-post-content { text-wrap: pretty; }
.wp-block-post-content > p.bn-chapeau { font-style: italic; font-size: 1.28rem; line-height: 1.55; margin-bottom: 1.4em; }
.wp-block-post-content > h2.bn-inter { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1; margin-block: 1.8rem 0.7rem; }
.wp-block-post-content .bn-fig { margin: 1.8em auto; max-width: min(100%, var(--wp--style--global--content-size, 720px)); }
.bn-fig a { display: block; line-height: 0; cursor: zoom-in; }
.bn-fig img { display: block; width: 100%; height: auto; margin-inline: auto; border-radius: 10px; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2); }
.bn-fig--small img { width: auto; max-width: 100%; }
.bn-fig--port img { width: auto; max-width: 100%; max-height: min(78vh, 760px); }
.bn-fig figcaption { font-family: var(--wp--preset--font-family--ui); font-size: 0.875rem; line-height: 1.4; color: var(--bn-muted); margin-top: 0.65rem; padding-left: 0.8rem; border-left: 3px solid var(--bn-red); text-align: left; }
.wp-block-post-content .bn-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: min(100%, 980px); margin-block: 1.8em; margin-inline: auto; }
.wp-block-post-content .bn-duo .bn-fig { margin: 0; max-width: none; }
.bn-duo .bn-fig img { aspect-ratio: 1 / 1; object-fit: cover; }
.wp-block-post-content .bn-table { overflow-x: auto; margin-block: 1.4em; }
.wp-block-post-content table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.wp-block-post-content th, .wp-block-post-content td { padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--bn-line); text-align: left; }
.wp-block-post-content thead th { border-bottom: 2px solid var(--bn-red); font-family: var(--wp--preset--font-family--ui); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; }
.wp-block-post-content tbody tr:nth-child(even) { background: var(--bn-soft); }
.wp-block-post-content iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 8px; }
.wp-block-post-content blockquote { margin-block: 1.8em; padding: 0.2em 0 0.2em 1.2em; border-left: 5px solid var(--bn-red); font-style: italic; font-size: 1.2rem; line-height: 1.5; }
.wp-block-post-content li::marker { color: var(--bn-red); }
@media (max-width: 640px) {
	.bn-duo { grid-template-columns: 1fr; }
}

/* Fil d'Ariane */
.bn-crumb { margin: 0 0 1rem; font-size: 0.875rem; color: var(--bn-muted); }
.bn-crumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; list-style: none; margin: 0; padding: 0; }
.bn-crumb li { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; }
.bn-crumb li + li::before { content: "›"; color: var(--bn-muted); }
.bn-crumb a { color: inherit; text-decoration: none; padding: 0.25rem 0; }
.bn-crumb a:hover, .bn-crumb a:focus-visible { color: var(--bn-red); text-decoration: underline; }
.bn-crumb [aria-current="page"] { color: var(--bn-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(46ch, 70vw); display: inline-block; }
@media print { .bn-crumb { display: none; } }
