/*
 * Bibine — média & bistrot catalan
 * Noir · blanc · rouge · jaune sénère
 */

:root {
	--bibine-black: #0a0a0a;
	--bibine-white: #faf7f2;
	--bibine-paper: #f0ebe3;
	--bibine-red: #c8102e;
	--bibine-red-dark: #8f0b22;
	--bibine-yellow: #fcd116;
	--bibine-yellow-soft: #fff3b0;
	--bibine-border: #1a1a1a;
	--bibine-muted: #5c5650;
	--font-display: "Bowlby One SC", "Impact", sans-serif;
	--font-script: "Caveat", cursive;
	--font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
	--space-xs: 0.5rem;
	--space-sm: 1rem;
	--space-md: 1.5rem;
	--space-lg: 2.5rem;
	--space-xl: 4rem;
	--content-max: 42rem;
	--site-max: 72rem;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1.125rem;
	line-height: 1.65;
	color: var(--bibine-black);
	background: var(--bibine-white);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--bibine-red);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

a:hover {
	color: var(--bibine-red-dark);
}

/* ——— Typo titres ——— */
h1,
h2,
h3,
h4,
.hero__title,
.page-title,
.entry-title,
.card-post__title,
.section__title {
	font-family: var(--font-display);
	font-weight: 400;
	letter-spacing: 0.02em;
	line-height: 0.95;
	text-transform: uppercase;
}

h1,
.page-title,
.entry-title {
	font-size: clamp(2.5rem, 6vw, 4.5rem);
}

h2,
.section__title {
	font-size: clamp(2rem, 4.5vw, 3.25rem);
}

/* ——— Header (maquette : barre blanche + déchirure + hero) ——— */
.site-header {
	position: relative;
	z-index: 50;
}

.site-header__bar {
	position: sticky;
	top: 0;
	z-index: 51;
	background: #ffffff;
	color: var(--bibine-black);
	box-shadow: 0 1px 0 rgba(10, 10, 10, 0.06);
}

.site-header__bar-inner {
	max-width: var(--site-max);
	margin: 0 auto;
	padding: var(--space-sm) var(--space-md);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	text-decoration: none;
	color: inherit;
	min-width: 0;
}

.site-branding--custom .custom-logo-link {
	display: inline-block;
	line-height: 0;
	padding: 0.2rem 0.35rem;
	border-radius: 4px;
	outline: 1px solid rgba(10, 10, 10, 0.08);
	outline-offset: 2px;
}

.site-branding--custom .custom-logo-link img {
	max-height: 4.25rem;
	width: auto;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

.site-branding__mark {
	flex-shrink: 0;
	line-height: 0;
}

.site-branding__mark img {
	width: clamp(3rem, 8vw, 4.25rem);
	height: auto;
}

.site-branding__text {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
}

.site-branding__title-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.08em;
	line-height: 1;
}

.site-branding__name {
	font-family: var(--font-display);
	font-size: clamp(1.65rem, 4.2vw, 2.35rem);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--bibine-black);
}

.site-branding__tld {
	font-family: var(--font-script);
	font-size: clamp(1.5rem, 3.8vw, 2.1rem);
	font-weight: 600;
	color: var(--bibine-red);
	line-height: 1;
}

.site-branding__tagline {
	font-size: clamp(0.62rem, 1.35vw, 0.72rem);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bibine-black);
	line-height: 1.35;
	max-width: 22rem;
}

.site-branding__tagline-accent {
	color: var(--bibine-red);
	font-weight: 700;
}

.site-header__tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-sm) var(--space-md);
}

.site-header__tear {
	line-height: 0;
	margin-top: -1px;
}

.site-header__tear-svg {
	display: block;
	width: 100%;
	height: 14px;
}

.site-header__hero {
	min-height: clamp(200px, 32vw, 380px);
	background-color: #1a1410;
	background-image: linear-gradient(165deg, #252018 0%, #0a0a0a 55%, #1a0a0c 100%);
	background-size: cover;
	background-position: center center;
	border-bottom: 4px solid var(--bibine-red);
}

.site-header__hero--has-bg {
	background-image: linear-gradient(
			180deg,
			rgba(10, 10, 10, 0.15) 0%,
			rgba(10, 10, 10, 0.55) 100%
		),
		var(--bibine-hero-bg, none);
	background-size: cover;
	background-position: center center;
}

/* Menu barre blanche */
.menu-toggle {
	display: none;
	background: transparent;
	border: 2px solid var(--bibine-black);
	color: var(--bibine-black);
	padding: 0.45rem 0.55rem;
	cursor: pointer;
	border-radius: 2px;
}

.menu-toggle__bar {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--bibine-black);
	margin: 5px 0;
}

.main-navigation .menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm) var(--space-lg);
	align-items: center;
	justify-content: flex-end;
}

.main-navigation a {
	color: var(--bibine-black);
	text-decoration: none;
	font-family: var(--font-display);
	font-size: clamp(0.95rem, 1.8vw, 1.15rem);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
	color: var(--bibine-red);
}

.header-search {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--bibine-black);
	line-height: 0;
	padding: 0.25rem;
}

.header-search:hover {
	color: var(--bibine-red);
}

.header-search__icon {
	display: block;
}

/* ——— Main grids ——— */
.site-main--with-sidebar {
	max-width: var(--site-max);
	margin: 0 auto;
	padding: var(--space-lg) var(--space-md);
	display: grid;
	grid-template-columns: 1fr 280px;
	gap: var(--space-lg);
	align-items: start;
}

.site-main--front {
	max-width: 100%;
	padding: 0;
}

.content-area {
	min-width: 0;
}

.content-area--single .entry-content,
.content-area--page .entry-content {
	max-width: var(--content-max);
}

/* ——— Hero ——— */
.hero--editorial {
	background: linear-gradient(160deg, var(--bibine-black) 0%, #1a1410 45%, var(--bibine-red-dark) 100%);
	color: var(--bibine-white);
	padding: var(--space-xl) var(--space-md);
	border-bottom: 8px solid var(--bibine-yellow);
}

.hero__inner {
	max-width: var(--site-max);
	margin: 0 auto;
}

.hero__kicker {
	font-family: var(--font-display);
	font-size: 1.35rem;
	letter-spacing: 0.2em;
	color: var(--bibine-yellow);
	margin: 0 0 var(--space-xs);
}

.hero__title {
	margin: 0 0 var(--space-md);
	max-width: 20ch;
	color: var(--bibine-white);
}

.hero__lead {
	font-size: 1.2rem;
	max-width: 36ch;
	margin: 0 0 var(--space-lg);
	color: var(--bibine-paper);
	line-height: 1.5;
}

.hero__featured {
	margin-top: var(--space-md);
}

.hero__featured-link {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: 0;
	align-items: stretch;
	background: var(--bibine-black);
	border: 2px solid var(--bibine-yellow);
	text-decoration: none;
	color: var(--bibine-white);
	overflow: hidden;
}

.hero__featured-img {
	width: 100%;
	height: 100%;
	min-height: 200px;
	object-fit: cover;
	grid-column: 1;
	grid-row: 1 / span 2;
}

.hero__featured-text {
	grid-column: 2;
	grid-row: 1 / span 2;
	padding: var(--space-md);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: var(--space-xs);
}

.hero__featured-link--no-media .hero__featured-text {
	grid-column: 1 / -1;
	grid-row: 1;
}

.hero__featured-label {
	font-family: var(--font-display);
	font-size: 1.1rem;
	color: var(--bibine-yellow);
	letter-spacing: 0.12em;
}

.hero__featured-title {
	font-family: var(--font-display);
	font-size: clamp(1.75rem, 3.5vw, 2.75rem);
	line-height: 1;
	display: block;
}

/* ——— Sections ——— */
.section {
	padding: var(--space-xl) var(--space-md);
	background: var(--bibine-white);
}

.section:nth-of-type(even) {
	background: var(--bibine-paper);
}

.section__inner {
	max-width: var(--site-max);
	margin: 0 auto;
}

.section__head {
	margin-bottom: var(--space-lg);
}

.section__title {
	margin: 0 0 var(--space-sm);
	color: var(--bibine-black);
}

.section__title--stripe {
	border-left: 6px solid var(--bibine-red);
	padding-left: var(--space-sm);
}

.section__intro {
	margin: 0 0 var(--space-sm);
	color: var(--bibine-muted);
	font-size: 1.05rem;
	max-width: 40ch;
}

.section__more {
	font-family: var(--font-display);
	font-size: 1.2rem;
	letter-spacing: 0.08em;
	text-decoration: none;
	color: var(--bibine-red);
}

.section__more:hover {
	color: var(--bibine-black);
}

.section__empty {
	color: var(--bibine-muted);
	margin: 0;
}

/* ——— Grille cartes ——— */
.post-grid {
	display: grid;
	gap: var(--space-lg);
	grid-template-columns: 1fr;
}

.post-grid--3 {
	grid-template-columns: repeat(3, 1fr);
}

/* ——— Carte article ——— */
.card-post {
	background: var(--bibine-white);
	border: 1px solid rgba(10, 10, 10, 0.12);
	box-shadow: 4px 4px 0 var(--bibine-yellow);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-post:hover {
	transform: translate(-2px, -2px);
	box-shadow: 6px 6px 0 var(--bibine-red);
}

.card-post__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.card-post__media {
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--bibine-black);
}

.card-post__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card-post__body {
	padding: var(--space-md);
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: var(--space-xs);
}

.card-post__cat {
	font-family: var(--font-display);
	font-size: 1rem;
	letter-spacing: 0.1em;
	color: var(--bibine-red);
}

.card-post__title {
	margin: 0;
	font-size: clamp(1.5rem, 2.5vw, 2rem);
	color: var(--bibine-black);
	line-height: 0.98;
}

.card-post__meta {
	margin: 0;
	font-size: 0.9rem;
	color: var(--bibine-muted);
}

.card-post__excerpt {
	margin: 0;
	font-size: 0.98rem;
	color: var(--bibine-muted);
	line-height: 1.5;
}

.card-post__excerpt p {
	margin: 0;
}

/* ——— Page / archive headers ——— */
.page-header {
	margin-bottom: var(--space-lg);
	border-bottom: 3px solid var(--bibine-black);
	padding-bottom: var(--space-sm);
}

.page-title {
	margin: 0;
}

.archive-description {
	margin-top: var(--space-sm);
	color: var(--bibine-muted);
	font-size: 1.05rem;
}

.archive-description p {
	margin: 0.5rem 0 0;
}

/* ——— Single ——— */
.single-post .entry-header {
	margin-bottom: var(--space-md);
}

.entry-cats {
	margin: 0 0 var(--space-xs);
	font-family: var(--font-display);
	font-size: 1.1rem;
	letter-spacing: 0.08em;
}

.entry-cats a {
	text-decoration: none;
	color: var(--bibine-red);
}

.entry-meta {
	color: var(--bibine-muted);
	font-size: 0.95rem;
	margin: 0;
}

.entry-meta--updated {
	margin-top: 0.35rem;
	font-size: 0.9rem;
}

.entry-featured {
	margin: 0 0 var(--space-lg);
	border: 3px solid var(--bibine-black);
}

.entry-featured__img {
	width: 100%;
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content p,
.entry-content li {
	max-width: var(--content-max);
}

.entry-content a {
	font-weight: 600;
}

.entry-content blockquote {
	margin: var(--space-md) 0;
	padding: var(--space-md) var(--space-lg);
	border-left: 5px solid var(--bibine-red);
	background: var(--bibine-yellow-soft);
	font-style: italic;
	color: var(--bibine-black);
}

.entry-content .wp-block-quote cite,
.entry-content blockquote cite {
	font-style: normal;
	font-size: 0.9rem;
	color: var(--bibine-muted);
}

.entry-content .alignwide {
	max-width: min(100%, 960px);
	margin-left: auto;
	margin-right: auto;
}

.entry-content .alignfull {
	max-width: 100vw;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.entry-tags {
	font-size: 0.95rem;
	color: var(--bibine-muted);
}

/* Pagination */
.navigation.pagination,
.posts-navigation,
.post-navigation {
	margin-top: var(--space-lg);
	padding-top: var(--space-md);
	border-top: 2px solid var(--bibine-black);
}

.post-navigation {
	display: grid;
	gap: var(--space-md);
	grid-template-columns: 1fr 1fr;
}

.post-navigation a {
	text-decoration: none;
	color: var(--bibine-black);
	border: 2px solid var(--bibine-black);
	padding: var(--space-sm);
	display: block;
	background: var(--bibine-white);
}

.post-navigation a:hover {
	background: var(--bibine-yellow);
}

.post-navigation .nav-subtitle {
	font-family: var(--font-display);
	font-size: 1rem;
	letter-spacing: 0.08em;
	color: var(--bibine-red);
	display: block;
}

.post-navigation .nav-title {
	font-weight: 600;
}

/* ——— Sidebar ——— */
.sidebar {
	background: var(--bibine-paper);
	border: 2px solid var(--bibine-black);
	padding: var(--space-md);
	position: sticky;
	top: 7rem;
}

.widget-title {
	font-family: var(--font-display);
	font-size: 1.5rem;
	margin: 0 0 var(--space-sm);
	letter-spacing: 0.06em;
}

.bibine-cat-list,
.widget_categories ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bibine-cat-list li,
.widget_categories li {
	margin: 0;
	padding: 0.35rem 0;
	border-bottom: 1px dashed rgba(10, 10, 10, 0.2);
}

.bibine-cat-list a,
.widget_categories a {
	color: var(--bibine-black);
	text-decoration: none;
	font-weight: 600;
}

.bibine-cat-list a:hover {
	color: var(--bibine-red);
}

/* ——— Footer ——— */
.site-footer {
	background: var(--bibine-black);
	color: var(--bibine-paper);
	padding: var(--space-lg) var(--space-md);
	margin-top: var(--space-xl);
	border-top: 6px solid var(--bibine-red);
}

.site-footer__inner {
	max-width: var(--site-max);
	margin: 0 auto;
	text-align: center;
}

.site-footer .menu {
	list-style: none;
	margin: 0 0 var(--space-md);
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-sm) var(--space-md);
}

.site-footer a {
	color: var(--bibine-yellow);
	text-decoration: none;
	font-family: var(--font-display);
	font-size: 1.1rem;
	letter-spacing: 0.06em;
}

.site-footer a:hover {
	color: var(--bibine-white);
}

.site-footer__credit {
	margin: 0;
	font-size: 0.9rem;
}

.site-footer__credit a {
	color: var(--bibine-white);
}

/* ——— Comments ——— */
.comments-area {
	margin-top: var(--space-xl);
	padding-top: var(--space-lg);
	border-top: 2px solid var(--bibine-black);
}

.comment-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.comment-list .children {
	list-style: none;
	margin-left: var(--space-md);
}

.comment-body {
	margin-bottom: var(--space-md);
	padding: var(--space-sm);
	background: var(--bibine-paper);
	border-left: 3px solid var(--bibine-red);
}

/* ——— Accessibilité ——— */
.skip-link.screen-reader-text {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.skip-link.screen-reader-text:focus {
	position: fixed;
	left: var(--space-sm);
	top: var(--space-sm);
	width: auto;
	height: auto;
	padding: var(--space-sm) var(--space-md);
	background: var(--bibine-yellow);
	color: var(--bibine-black);
	z-index: 100;
	font-weight: 700;
}

/* ——— Responsive ——— */
@media (max-width: 960px) {
	.site-main--with-sidebar {
		grid-template-columns: 1fr;
	}

	.sidebar {
		position: static;
	}

	.post-grid--3 {
		grid-template-columns: 1fr 1fr;
	}

	.hero__featured-link {
		grid-template-columns: 1fr;
	}

	.hero__featured-link .hero__featured-img {
		grid-column: 1;
		grid-row: 1;
		min-height: 220px;
	}

	.hero__featured-text {
		grid-column: 1;
		grid-row: 2;
		padding: var(--space-md);
	}
}

@media (max-width: 640px) {
	.site-header__bar-inner {
		flex-direction: column;
		align-items: stretch;
	}

	.site-header__tools {
		width: 100%;
		flex-wrap: wrap;
		justify-content: flex-end;
		align-items: center;
	}

	.menu-toggle {
		display: block;
		order: 1;
	}

	.header-search {
		order: 2;
	}

	.main-navigation {
		order: 3;
		flex-basis: 100%;
		width: 100%;
		display: none;
		padding-top: var(--space-sm);
	}

	.main-navigation.is-open {
		display: block;
	}

	.main-navigation .menu {
		flex-direction: column;
		align-items: flex-start;
	}

	.post-grid--3 {
		grid-template-columns: 1fr;
	}

	.post-navigation {
		grid-template-columns: 1fr;
	}
}
