/* ==========================================================================
   Single Article 1envie1vin — corps de l'article
   Préfixe .ev-* pour éviter les collisions avec le thème parent SEO Mag
   ========================================================================== */

:root {
	--ev-brand:       #36000C;
	--ev-bg:          #F2ECE9;
	--ev-white:       #FFFFFF;
	--ev-gray-light:  #E8E0DC;
	--ev-gray-mid:    #B8A9A3;
	--ev-font-body:   'proxima-nova', sans-serif;
	--ev-font-title:  'miller-display', serif;
}

/* Body blanc sur les articles — le crème est uniquement pour .ev-article */
body {
	background: #ffffff;
}

/* Reset spécifique single — n'affecte que le main.ev-article */
.ev-article {
	background: var(--ev-bg);
	color: var(--ev-brand);
	font-family: var(--ev-font-body);
	font-weight: 300;
	line-height: 1.6;
}

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

/* ==========================================================================
   1. HERO SPLIT (image gauche 58% + texte droite 42%)
   ========================================================================== */

.ev-hero {
	width: 100%;
	height: 420px;
	display: grid;
	grid-template-columns: 58% 42%;
	background: var(--ev-white);
	position: relative;
}

.ev-hero__img {
	position: relative;
	overflow: hidden;
	height: 420px;
}

.ev-hero__img-fill {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	display: block;
	border-radius: 0 !important;
}

.ev-hero__placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(120deg, #c8a882 0%, #9a6b4b 45%, #5c2d1a 100%);
}

/* Demi-cercle blanc qui chevauche le bord droit de l'image */
.ev-hero__img::after {
	content: '';
	position: absolute;
	right: -210px;
	top: 50%;
	transform: translateY(-50%);
	width: 420px;
	height: 420px;
	background: var(--ev-white);
	border-radius: 50%;
	pointer-events: none;
}

.ev-hero__text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 48px 56px 48px 32px;
	background: var(--ev-white);
	position: relative;
	z-index: 1;
}

.ev-hero__category {
	display: inline-block;
	background: var(--ev-brand);
	color: var(--ev-white) !important;
	font-family: var(--ev-font-body) !important;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 5px 14px;
	border-radius: 20px;
	margin-bottom: 20px;
	align-self: flex-start;
	text-decoration: none !important;
	font-style: normal !important;
	line-height: 1.5;
}

.ev-hero__title {
	font-family: var(--ev-font-title) !important;
	font-size: 36px !important;
	font-weight: 400 !important;
	font-style: italic !important;
	line-height: 1.25 !important;
	color: var(--ev-brand) !important;
	margin: 0 0 24px !important;
}

.ev-hero__meta {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	font-family: var(--ev-font-body);
	font-size: 13px;
	color: var(--ev-brand);
	opacity: 0.6;
}

.ev-hero__dot {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: currentColor;
	display: inline-block;
}

.ev-hero__author { font-weight: 500; opacity: 0.85; }

/* ==========================================================================
   2. ARTICLE LAYOUT (2 colonnes : corps + sidebar 340px)
   ========================================================================== */

.ev-layout {
	max-width: 1280px;
	margin: 0 auto;
	padding: 48px 40px 64px;
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 64px;
	align-items: start;
}

/* ==========================================================================
   3. CORPS DE L'ARTICLE (the_content)
   ========================================================================== */

.ev-body { min-width: 0; }

/* Surcharges pour les headings et paragraphes du contenu rédigé */
.ev-body h2 {
	font-family: var(--ev-font-title) !important;
	font-size: 28px !important;
	font-weight: 400 !important;
	font-style: normal !important;
	color: var(--ev-brand) !important;
	margin: 48px 0 16px !important;
	line-height: 1.25 !important;
	/* Barre décorative en absolu (pas en flex) : sinon les titres composés
	   "TOP 1 : <a>NOM</a> DE CHEZ …" s'éclatent en colonnes (texte/lien/texte
	   devenaient des flex items espacés par gap). Le texte coule normalement. */
	display: block;
	position: relative;
	padding-left: 17px;
}

.ev-body h2::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.13em;
	width: 5px;
	height: 1em;
	background: var(--ev-brand);
	border-radius: 2px;
}

.ev-body h2:first-child { margin-top: 0 !important; }

.ev-body h3 {
	font-family: var(--ev-font-title) !important;
	font-size: 21px !important;
	font-weight: 400 !important;
	font-style: italic !important;
	color: var(--ev-brand) !important;
	margin: 32px 0 12px !important;
	line-height: 1.3 !important;
}

.ev-body p {
	font-family: var(--ev-font-body) !important;
	font-size: 18px !important;
	font-weight: 400 !important;
	line-height: 1.8 !important;
	color: var(--ev-brand) !important;
	margin: 0 0 20px !important;
}

/* Tout le corps de l'article au même poids (400). Le 1er paragraphe avait un
   poids différent : on l'aligne sur le reste. */
.ev-body p:first-of-type {
	font-size: 18px !important;
	font-weight: 400 !important;
}

.ev-body ul, .ev-body ol {
	margin: 0 0 20px 0;
	padding-left: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ev-body ul li, .ev-body ol li {
	font-family: var(--ev-font-body) !important;
	font-size: 18px !important;
	font-weight: 400 !important;
	line-height: 1.7 !important;
	padding-left: 20px;
	position: relative;
	color: var(--ev-brand);
}

.ev-body ul li::before {
	content: '→';
	position: absolute;
	left: 0;
	color: var(--ev-brand);
	opacity: 0.5;
	font-size: 13px;
	top: 2px;
}

.ev-body ol { counter-reset: ev-counter; }
.ev-body ol li::before {
	counter-increment: ev-counter;
	content: counter(ev-counter) '.';
	position: absolute;
	left: 0;
	color: var(--ev-brand);
	opacity: 0.6;
	font-size: 13px;
	font-weight: 600;
	top: 2px;
}

/* Citations / blockquote */
.ev-body blockquote {
	border-left: 3px solid var(--ev-brand);
	padding: 16px 24px;
	margin: 32px 0;
	background: var(--ev-white) !important;
	border-radius: 0 8px 8px 0;
}

/* Suppression du grand guillemet décoratif ajouté par le thème parent */
.ev-body blockquote::before,
.ev-body blockquote::after {
	content: none !important;
	display: none !important;
}

.ev-body blockquote p {
	font-family: var(--ev-font-title) !important;
	font-size: 19px !important;
	font-style: italic !important;
	font-weight: 400 !important;
	margin: 0 !important;
	line-height: 1.6 !important;
}

/* Tableaux comparatifs */
.ev-body table {
	width: 100%;
	border-collapse: collapse;
	margin: 28px 0 32px;
	font-family: var(--ev-font-body);
	font-size: 15px;
}

.ev-body table thead tr {
	background: var(--ev-brand);
	color: var(--ev-white);
}

.ev-body table thead th {
	padding: 14px 20px;
	font-family: var(--ev-font-body) !important;
	font-weight: 500;
	text-align: left;
	letter-spacing: 0.02em;
	color: var(--ev-white);
	border: none;
}

.ev-body table thead th:first-child { border-radius: 8px 0 0 0; }
.ev-body table thead th:last-child { border-radius: 0 8px 0 0; }

.ev-body table tbody tr { border-bottom: 1px solid var(--ev-gray-light); }
.ev-body table tbody tr:nth-child(even) { background: var(--ev-white); }
.ev-body table tbody tr:nth-child(odd) { background: rgba(242,236,233,0.5); }

.ev-body table tbody td {
	padding: 12px 20px;
	font-weight: 300;
	vertical-align: top;
	color: var(--ev-brand);
	border: none;
}

.ev-body table tbody td:first-child { font-weight: 500; }

/* Images dans le contenu */
.ev-body img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	margin: 16px 0;
}

/* Liens dans le corps */
.ev-body a {
	color: var(--ev-brand);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: rgba(54,0,12,0.4);
	transition: text-decoration-color 0.2s;
}

.ev-body a:hover { text-decoration-color: var(--ev-brand); }

/* Liens à l'intérieur des blocs PPB : pas de soulignement */
.ev-body .ppb-card a,
.ev-body .ppb-cta-categorie__btn,
.ev-body .ppb-best-card,
.ev-body .ppb-subcat-item,
.ev-body .ppb-subcats__voir-tout,
.ev-body .ppb-card { text-decoration: none !important; }

/* Lien "À lire aussi" : titre serif italique bordeaux (override liens d'article) */
.ev-body .ppb-a-lire-aussi__link {
	font-family: var(--ev-font-title) !important;
	font-style: italic !important;
	font-size: 18px !important;
	color: var(--ev-brand) !important;
	text-decoration-color: rgba(54, 0, 12, 0.3);
}

/* ==========================================================================
   4. SIDEBAR (widget area)
   ========================================================================== */

.ev-sidebar {
	position: sticky;
	top: 120px;
}

.ev-sidebar .widget {
	background: var(--ev-white);
	border-radius: 12px;
	padding: 28px;
	margin-bottom: 24px;
}

.ev-sidebar .widget-title,
.ev-sidebar .widget h2,
.ev-sidebar .widget h3 {
	font-family: var(--ev-font-title) !important;
	font-size: 18px !important;
	font-weight: 500 !important;
	font-style: italic !important;
	color: var(--ev-brand) !important;
	margin: 0 0 20px !important;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--ev-gray-light);
	line-height: 1.3 !important;
}

/* ==========================================================================
   Mobile — ≤ 768px
   ========================================================================== */

@media (max-width: 768px) {

	/* Mobile : image (vraie <img>, indexable) en fond derrière le bloc titre,
	   adoucie par un voile blanc pour garder la lisibilité du texte bordeaux. */
	.ev-hero {
		grid-template-columns: 1fr;
		display: flex;
		align-items: center;
		justify-content: center;
		height: auto;
		min-height: 280px;
		position: relative;
		overflow: hidden;
	}

	.ev-hero__img {
		position: absolute;
		inset: 0;
		height: 100%;
		width: 100%;
		z-index: 0;
	}

	.ev-hero__img-fill {
		height: 100% !important;
		width: 100% !important;
		object-fit: cover;
	}

	/* Voile blanc translucide au-dessus de l'image, sous le texte */
	.ev-hero::before {
		content: '';
		position: absolute;
		inset: 0;
		background: rgba(255, 255, 255, 0.72);
		z-index: 1;
		pointer-events: none;
	}

	.ev-hero__img::after { display: none; }

	.ev-hero__text {
		position: relative;
		z-index: 2;
		background: transparent;
		padding: 26px 24px;
		width: 100%;
		align-items: center;
		text-align: center;
	}

	.ev-hero__title {
		font-size: 24px !important;
		text-align: center;
	}

	.ev-hero__meta {
		justify-content: center;
		font-size: 12px;
		gap: 10px;
	}

	.ev-hero__category {
		align-self: center;
	}

	.ev-layout {
		grid-template-columns: 1fr;
		padding: 32px 20px;
		gap: 32px;
	}

	.ev-sidebar {
		position: static;
	}

	/* Sur mobile, le widget newsletter devient une barre fixe (sticky bar) :
	   sa newsletter passe en position:fixed et sort du flux, laissant son
	   conteneur .widget en boîte blanche VIDE (padding + fond blanc) juste sous
	   « Nos meilleures ventes ». On neutralise ce conteneur — le contenu fixe
	   (la sticky bar) reste affiché car il est hors flux. */
	.ev-sidebar .widget:has(.ppb-newsletter) {
		padding: 0 !important;
		margin: 0 !important;
		background: transparent !important;
		min-height: 0 !important;
		border-radius: 0 !important;
	}

	.ev-body h2 {
		font-size: 22px !important;
		margin: 32px 0 12px !important;
	}

	.ev-body h2::before {
		height: 22px;
	}

	.ev-body h3 {
		font-size: 18px !important;
		margin: 24px 0 10px !important;
	}

	.ev-body p {
		font-size: 18px !important;
	}

	.ev-body p:first-of-type {
		font-size: 18px !important;
	}
}

/* ==========================================================================
   Corrections visuelles Phase 2b
   ========================================================================== */

/* Titre du widget newsletter : proxima-nova bold, pas miller-display italic */
.ev-sidebar .widget:has(.ppb-newsletter) .widget-title,
.ev-sidebar .widget:has(.ppb-newsletter) .widgettitle,
.ev-sidebar .widget:has(.ppb-newsletter) h2 {
	font-family: var(--ev-font-body) !important;
	font-style: normal !important;
	font-weight: 700 !important;
	font-size: 18px !important;
}

/* Texte blanc + pas de margin dans le bandeau CTA catégorie (fond bordeaux) */
.ev-body .ppb-cta-categorie p {
	color: rgba(255,255,255,0.7) !important;
	margin: 0 !important;
}

/* Titre du bloc « Notre sélection » : ne pas hériter du grand margin-top des
   h3 d'article (.ev-body h3 = 24/32px) qui créait trop d'espace blanc au-dessus
   du titre, surtout sur mobile. */
.ev-body .ppb-best-products__title {
	margin-top: 0 !important;
}

/* Légende image — sous l'image, sans chevauchement (avant : margin-top négatif
   qui faisait remonter la légende au-dessus du bord bas de l'image). */
.ev-body figcaption,
.ev-body .wp-caption-text {
	margin-top: 8px !important;
	font-size: 14px;
	font-family: var(--ev-font-body);
	font-style: italic;
	font-weight: 400;
	color: var(--ev-brand);
	opacity: 0.5;
	text-align: center;
}

/* Pas de cadre gris autour de l'image légendée (fond gris + padding hérités
   du thème parent / style WP par défaut). */
.ev-body .wp-caption {
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
	margin-bottom: 16px;
	max-width: 100%;
}

.ev-body .wp-caption img {
	margin-bottom: 0 !important;
}
