/*
Theme Name: Défenses Naturelles
Theme URI: https://defenses-naturelles.com
Author: Camille
Description: Thème sur mesure pour Défenses Naturelles — blog santé immunité/vitamines.
Version: 1.0.0
Text Domain: defenses-naturelles
*/

/* ===== Variables ===== */
:root {
	--color-primary: #6E2A3A;
	--color-primary-dark: #4F1E2A;
	--color-accent: #C99A2E;
	--color-accent-dark: #A67F22;
	--color-bg: #FCEEE0;
	--color-surface: #FFFFFF;
	--color-text: #2B2320;
	--color-text-muted: #6B5E56;
	--color-border: #E8D9C8;
	--radius: 10px;
	--max-width: 1140px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--color-text);
	background: var(--color-bg);
	line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-accent-dark); }
h1, h2, h3, h4, h5, h6 { margin: 0 0 0.6em; line-height: 1.25; color: var(--color-primary); }
.entry-content p, .page-content p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.25rem; }

/* ===== Header ===== */
.site-header {
	background: var(--color-surface);
	border-bottom: 1px solid var(--color-border);
	position: sticky;
	top: 0;
	z-index: 50;
}
.site-header__inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0.85rem 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
}
.site-branding { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.site-branding img { width: 34px; height: 34px; flex-shrink: 0; }
.site-branding__title {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--color-primary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.menu-toggle {
	display: none;
	background: none;
	border: none;
	font-size: 1.6rem;
	color: var(--color-primary);
	cursor: pointer;
	line-height: 1;
	padding: 0.25rem 0.4rem;
}
.primary-menu {
	list-style: none;
	display: flex;
	gap: 1.4rem;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}
.primary-menu a {
	color: var(--color-text);
	font-weight: 600;
	font-size: 0.95rem;
	white-space: nowrap;
}
.primary-menu a:hover { color: var(--color-primary); }
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-parent > a,
.primary-menu .current-menu-ancestor > a {
	color: var(--color-primary);
	border-bottom: 2px solid var(--color-accent);
}

@media (max-width: 780px) {
	.menu-toggle { display: block; }
	.primary-menu {
		display: none;
		width: 100%;
		flex-direction: column;
		gap: 0;
		border-top: 1px solid var(--color-border);
		margin-top: 0.75rem;
	}
	.primary-menu.is-open { display: flex; }
	.primary-menu li { border-bottom: 1px solid var(--color-border); }
	.primary-menu a { display: block; padding: 0.75rem 0.25rem; }
}
@media (max-width: 350px) {
	.site-branding__title { font-size: 0.9rem; }
	.site-branding img { width: 28px; height: 28px; }
}

/* ===== Main ===== */
.site-main { flex: 1 0 auto; }

/* ===== Hero ===== */
.hero { padding: 2.5rem 0; background: var(--color-surface); }
.hero__card {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	background: var(--color-bg);
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--color-border);
}
.hero__media { height: 220px; overflow: hidden; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__content { padding: 1.25rem 1.4rem 1.5rem; position: relative; }
.hero__category {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--color-accent-dark);
	margin-bottom: 0.5rem;
}
.hero__title { font-size: 1.5rem; margin: 0 0 0.6rem; }
.hero__excerpt { color: var(--color-text-muted); margin: 0 0 1rem; }
.hero__link { position: absolute; inset: 0; z-index: 1; }
.btn {
	display: inline-block;
	background: var(--color-primary);
	color: #fff;
	padding: 0.6rem 1.2rem;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.9rem;
	position: relative;
	z-index: 2;
}
.btn:hover { background: var(--color-primary-dark); color: #fff; }

@media (min-width: 700px) {
	.hero__card { grid-template-columns: 1fr 1fr; align-items: stretch; }
	.hero__media { height: auto; }
	.hero__content { display: flex; flex-direction: column; justify-content: center; padding: 2rem; }
}

/* ===== Focus blocks ===== */
.focus-section { padding: 1.5rem 0; }
.focus-section__title {
	font-size: 1.25rem;
	border-bottom: 3px solid var(--color-accent);
	display: inline-block;
	padding-bottom: 0.3rem;
	margin-bottom: 1.2rem;
}
.focus-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}
@media (min-width: 640px) {
	.focus-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
	.focus-grid { grid-template-columns: repeat(3, 1fr); }
}
.card {
	position: relative;
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.15s ease;
}
.card:hover { box-shadow: 0 6px 18px rgba(110,42,58,0.12); }
.card__media { height: 150px; background: var(--color-bg); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 0.9rem 1rem 1.1rem; flex: 1; display: flex; flex-direction: column; }
.card__meta { font-size: 0.75rem; color: var(--color-text-muted); margin-bottom: 0.3rem; }
.card__title { font-size: 1.02rem; margin: 0 0 0.4rem; }
.card__excerpt { font-size: 0.88rem; color: var(--color-text-muted); flex: 1; }
.card__link {
	position: absolute;
	inset: 0;
	z-index: 1 !important;
}
.card__empty {
	padding: 1.5rem 1rem;
	text-align: center;
	color: var(--color-text-muted);
	background: var(--color-surface);
	border: 1px dashed var(--color-border);
	border-radius: var(--radius);
	font-size: 0.9rem;
}

/* ===== Stream (derniers articles) ===== */
.stream-section { padding: 1.5rem 0 2.5rem; }

/* ===== Footer ===== */
.site-footer { background: var(--color-primary); color: #f4e9dd; margin-top: 2rem; }
.site-footer a { color: var(--color-accent); }
.site-footer a:hover { color: #fff; }
.footer-columns {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 2.5rem 1.25rem 1.5rem;
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.75rem;
}
@media (min-width: 700px) {
	.footer-columns { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
	.footer-columns { grid-template-columns: repeat(4, 1fr); }
}
.footer-col h3 {
	color: #fff;
	font-size: 0.95rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin-bottom: 0.75rem;
}
.footer-col p { margin: 0 0 0.6rem; font-size: 0.9rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer-bottom {
	border-top: 1px solid rgba(255,255,255,0.15);
}
.footer-bottom__inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 1rem 1.25rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	justify-content: space-between;
	font-size: 0.82rem;
}
.footer-bottom nav ul { list-style: none; display: flex; gap: 1.2rem; margin: 0; padding: 0; flex-wrap: wrap; }

/* ===== Single article ===== */
.entry-header { padding: 2rem 0 1rem; }
.entry-header .content-card__meta {
	font-size: 0.85rem;
	color: var(--color-text-muted);
	display: flex;
	gap: 0.6rem;
	align-items: center;
}
.entry-header .content-card__meta .category-label {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--color-accent-dark);
	text-transform: uppercase;
}
.entry-header h1 { font-size: 1.8rem; margin-top: 0.5rem; }
.entry-thumbnail { margin: 1.25rem 0; border-radius: var(--radius); overflow: hidden; }
.entry-content { max-width: 760px; }
.entry-content h2 { margin-top: 1.8em; font-size: 1.35rem; }
.entry-content h3 { margin-top: 1.4em; font-size: 1.12rem; }

/* Sommaire simple, jamais encadré */
.entry-content nav.sommaire { margin: 1.2em 0; padding: 0; background: none; border: none; }
.entry-content nav.sommaire ul { margin: 0.4em 0 0; }

/* Tableaux stylés */
.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5em 0;
	font-size: 0.92rem;
	display: block;
	overflow-x: auto;
	box-shadow: inset -10px 0 8px -8px rgba(0,0,0,0.25);
}
.entry-content table thead th {
	background: var(--color-primary);
	color: #fff;
	font-weight: 700;
	padding: 0.6em 0.8em;
	text-align: left;
	border-right: 1px solid rgba(255,255,255,0.15);
}
.entry-content table thead th:last-child { border-right: none; }
.entry-content table tbody td {
	padding: 0.55em 0.8em;
	border-bottom: 1px solid var(--color-border);
	border-right: 1px solid var(--color-border);
}
.entry-content table tbody td:last-child { border-right: none; }
.entry-content table tbody tr:nth-child(even) { background: var(--color-bg); }
@media (min-width: 700px) {
	.entry-content table { display: table; box-shadow: none; }
}

/* En résumé encadré, jamais Sources */
.entry-content .en-resume-box {
	background: var(--color-bg);
	border: 1px solid var(--color-accent);
	border-left: 5px solid var(--color-accent);
	border-radius: var(--radius);
	padding: 1.1em 1.3em;
	margin: 1.8em 0;
}
.entry-content .en-resume-box h2,
.entry-content .en-resume-box h3,
.entry-content .en-resume-box h4 { margin-top: 0; }

/* Disclaimer médical */
.medical-disclaimer {
	margin: 2.5em 0 0;
	padding: 1em 1.2em;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	font-size: 0.85rem;
	color: var(--color-text-muted);
}

/* ===== Boutons génériques / archive / page ===== */
.page-content, .archive-header { max-width: 760px; margin: 0 auto; padding: 2rem 1.25rem; }
.archive-header h1 { font-size: 1.6rem; }
.sitemap-block { margin-bottom: 2rem; }
.sitemap-block h2 { font-size: 1.15rem; }
.sitemap-block ul { list-style: none; padding: 0; }
.sitemap-block li { padding: 0.25rem 0; border-bottom: 1px solid var(--color-border); }
