/* Blocs partagés — template-parts/blocks/*.php et fonctions d'inc/helpers.php */

/* En-tête de section : barre rouge + titre en capitales + « Voir tout → » */
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-header__title { position: relative; padding-left: 18px; font-size: 21px; font-weight: 800; letter-spacing: 0; text-transform: uppercase; line-height: 1.15; }
.section-header__title::before { content: ""; position: absolute; left: 0; top: 1px; bottom: 0; width: 6px; border-radius: 1px; background: var(--red); }
.section-header__link { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 13.5px; font-weight: 600; color: var(--red); }
.section-header__link:hover { text-decoration: underline; }
.section-header--plain .section-header__title { padding-left: 0; }
.section-header--plain .section-header__title::before { display: none; }
.section-header--boxed { padding: 10px 14px; background: var(--surface); border-radius: 4px; margin-bottom: 18px; }
.section-header--boxed .section-header__title { font-size: 17px; }
.section-header--sm .section-header__title { font-size: 17px; }

/* Fil d'Ariane */
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: 13px; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin: 0 9px; color: #9a9a9a; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb [aria-current] { color: var(--text); }
.breadcrumb--light, .breadcrumb--light ol, .breadcrumb--light [aria-current] { color: rgb(255 255 255 / .85); }
.breadcrumb--light li + li::before { color: rgb(255 255 255 / .6); }

/* Bandeau de tête de rubrique */
.page-hero { position: relative; isolation: isolate; overflow: hidden; background: #15171b; color: var(--white); }
.page-hero__media { position: absolute; inset: 0; z-index: -1; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(10 12 16 / .92) 0%, rgb(10 12 16 / .7) 40%, rgb(10 12 16 / .15) 100%); }
.page-hero__inner { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-height: 160px; padding-block: 28px; }
.page-hero--lg .page-hero__inner { min-height: 240px; }
.page-hero__title { color: var(--white); font: 700 58px/1.05 var(--serif); letter-spacing: -.01em; }
.page-hero__subtitle { margin: 0; font-size: 20px; color: rgb(255 255 255 / .92); max-width: 720px; }

/* Fil info */
.ticker { display: flex; align-items: stretch; min-height: 40px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ticker__label { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 0 18px; background: var(--red); color: var(--white); font-weight: 900; font-size: 14px; text-transform: uppercase; border-radius: var(--radius) 0 0 var(--radius); }
.ticker__track { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; display: flex; align-items: center; }
.ticker__track::-webkit-scrollbar { display: none; }
.ticker__list { display: flex; align-items: center; white-space: nowrap; padding-inline: 16px; }
.ticker__item { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; }
.ticker__item + .ticker__item::before { content: ""; width: 6px; height: 6px; margin: 0 22px; border-radius: 50%; background: var(--red); }
.ticker__item time { color: var(--red); font-weight: 700; }
.ticker__item strong { font-weight: 800; }
.ticker__nav { display: flex; flex: none; }
.ticker__nav button { display: grid; place-items: center; width: 40px; background: var(--surface); border-left: 1px solid var(--line); font-size: 18px; }
.ticker__nav button:hover { background: var(--ink); color: var(--white); }

/* Bandeau newsletter */
.nl-banner { margin-block: 20px 0; }
.nl-banner__inner { display: grid; grid-template-columns: auto 1fr minmax(320px, 545px); align-items: center; gap: 19px; padding: 10px 28px; background: var(--red-soft); border: 1px solid transparent; border-radius: var(--radius-lg); }
.nl-banner__icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--red); color: var(--white); font-size: 27px; }
.nl-banner__title { color: var(--red); font-size: 19px; font-weight: 800; margin-bottom: 2px; }
.nl-banner p { margin: 0; font-size: 13.5px; color: #333; }
.nl-banner .nl-form input, .nl-banner .nl-form .btn { min-height: 46px; }
.nl-banner .nl-form .btn { flex: none; min-width: 170px; justify-content: center; padding-inline: 20px; background: var(--red-dark); }
.nl-banner .nl-form .btn:hover { background: var(--red); }
.site-main:has(> .nl-banner:last-child) ~ .site-footer { margin-top: 6px; }
.nl-form { display: flex; gap: 0; }
.nl-form__status { flex-basis: 100%; margin: 0 0 10px; padding: 10px 14px; border-left: 4px solid var(--red); border-radius: var(--radius); background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; }
.nl-form input { border-radius: var(--radius) 0 0 var(--radius); border-right: 0; min-height: 50px; }
.nl-form .btn { min-height: 50px; border-radius: 0 var(--radius) var(--radius) 0; padding-inline: 30px; }
.nl-form--stacked { flex-direction: column; gap: 12px; }
.nl-form--stacked input, .nl-form--stacked .btn { border-radius: var(--radius); border-right: 1px solid #dadada; }
.nl-form--stacked .btn { border: 0; width: 100%; }

/* Encadrés de barre latérale */
.side-box { display: block; }
.side-box--newsletter { padding: 22px; background: var(--red-soft); border-radius: var(--radius-lg); border: 1px solid var(--red-line); }
.side-box--newsletter .section-header { margin-bottom: 8px; }
.side-box--newsletter .section-header__title { font-size: 17px; padding-left: 14px; }
.side-box--newsletter .section-header__title::before { display: block; }
.side-box--newsletter p { font-size: 14px; color: #444; margin-bottom: 16px; }

/* Pastilles de filtre / onglets */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 22px; border: 1px solid #dcdcdc; border-radius: 999px; background: var(--white); font-size: 14px; font-weight: 600; color: var(--ink); }
.chip:hover { border-color: var(--red); color: var(--red); }
.chip[aria-selected="true"], .chip[aria-current="page"], .chip.is-active { background: var(--red); border-color: var(--red); color: var(--white); }
.chips--square .chip { border-radius: var(--radius); }

/* Étiquettes */
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tag { display: inline-flex; padding: 6px 16px; border: 1px solid #e0e0e0; border-radius: 999px; font-size: 13px; background: var(--white); }
.tag:hover { border-color: var(--red); color: var(--red); }

/* Partage */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.share--bar { padding: 14px 20px; background: var(--red-soft); border-radius: var(--radius); }
.share__label { margin-right: 8px; font-weight: 800; font-size: 14px; }
.share__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 16px; border-radius: var(--radius); color: var(--white); font-size: 13.5px; font-weight: 700; }
.share__btn:hover { color: var(--white); filter: brightness(1.1); }
.share__btn .icon { font-size: 15px; }
.share__btn--facebook { background: #1877f2; }
.share__btn--x { background: #000; }
.share__btn--linkedin { background: #0a66c2; }
.share__btn--whatsapp { background: #08853a; }
.share__btn--copy { background: var(--white); color: var(--ink); border: 1px solid #ddd; min-width: 46px; padding: 0 12px; }
.share__btn--copy:hover { color: var(--red); border-color: var(--red); filter: none; }
.share__btn--copy.is-done { color: #188038; border-color: #188038; }
.share--rail { flex-direction: column; gap: 10px; }
.share--rail .share__btn { width: 40px; height: 40px; min-height: 0; padding: 0; }
.share--rail .share__btn--copy { color: var(--red); border-color: var(--red-line); }
.share--icons .share__btn { width: 38px; height: 38px; min-height: 0; padding: 0; border-radius: 50%; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border: 1px solid #e0e0e0; border-radius: var(--radius); font-weight: 700; font-size: 14px; background: var(--white); }
.pagination .page-numbers.current { background: var(--red); border-color: var(--red); color: var(--white); }
.pagination a.page-numbers:hover { border-color: var(--red); color: var(--red); }
.pagination .dots { border: 0; background: none; }
.pagination .is-disabled { color: #a3a3a3; }
.pagination .prev { margin-right: 20px; }
.pagination .next { margin-left: 16px; }
.pagination a.next { background: #f1f1f1; border-color: #f1f1f1; }
.pagination :is(.prev, .next) .icon { font-size: 19px; }

/* État vide */
.empty { padding: 40px 24px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--radius-lg); }

@media (max-width: 1024px) {
	.nl-banner__inner { grid-template-columns: auto 1fr; }
	.nl-banner .nl-form { grid-column: 1 / -1; }
	.page-hero__title { font-size: 44px; }
}
@media (max-width: 600px) {
	.section-header__title { font-size: 18px; }
	.page-hero__title { font-size: 34px; }
	.page-hero__subtitle { font-size: 16px; }
	.page-hero__inner { min-height: 130px; }
	.nl-banner__inner { grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 16px; text-align: left; }
	.nl-banner__icon { width: 44px; height: 44px; font-size: 20px; }
	.nl-form { flex-direction: column; gap: 10px; }
	.nl-form input { border-radius: var(--radius); border-right: 1px solid #dadada; }
	.nl-form .btn { border-radius: var(--radius); }
	.ticker__label { padding: 0 12px; font-size: 12px; }
	.ticker__nav { display: none; }
	.pagination { gap: 5px; }
	.pagination .page-numbers { min-width: 32px; height: 34px; padding: 0 4px; }
	.pagination :is(.prev, .next) { min-width: 36px; height: 36px; margin: 0; }
	.share--bar .share__btn span { display: none; }
	.share--bar .share__btn { width: 40px; padding: 0; }
}
