/*
Theme Name: Vestaia Atelier
Theme URI: https://www.vestaia.fr/
Author: Vestaia
Description: Thème du blog Vestaia — NAS, famille, automatisation et IA. Direction « Atelier chaud » : fond sable, encre brun-noir, accent vermillon. Page d'accueil, rubriques, articles, recherche et 404 prêts à l'emploi.
Version: 1.3.0
Requires at least: 6.5
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: vestaia
*/

/* ---------- Base ---------- */
:root {
	--vt-pad: clamp(1.25rem, 5vw, 4rem);
	--vt-radius: 6px;
	--vt-radius-sm: 4px;
	--vt-line: #E3D6C4;
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: #F0916A; color: #1A1512; }

.wp-site-blocks { min-height: 100vh; display: flex; flex-direction: column; }
.wp-site-blocks > * { margin-block-start: 0; }
.wp-site-blocks > main,
.wp-site-blocks > .vt-main { flex: 1 0 auto; }

.vt-main > *,
.vt-section > *,
.vt-hero-inner > *,
.vt-band-inner > *,
.vt-grid-3 > *,
.vt-card > *,
.vt-veille > *,
.vt-footer-inner > *,
.vt-page-head .vt-wrap > * { margin-block-start: 0; margin-block-end: 0; }

.vt-wrap {
	box-sizing: border-box;
	width: 100%;
	max-width: 1280px;
	margin-inline: auto;
	padding-inline: var(--vt-pad);
}

:where(a, button, input, summary):focus-visible {
	outline: 2px solid #C2400F;
	outline-offset: 2px;
	border-radius: 2px;
}

/* ---------- En-tête ---------- */
.vt-header {
	background: #FFFCF7;
	border-bottom: 1px solid var(--vt-line);
}
.vt-header-inner {
	padding-block: 20px;
	gap: 1.5rem;
	align-items: center;
}
.vt-brand { gap: 11px; align-items: center; }
.vt-logo { display: flex; line-height: 0; }
.vt-brand .wp-block-site-title { margin: 0; white-space: nowrap; }

.vt-nav .wp-block-navigation__container { gap: 1.625rem; align-items: center; }
.vt-nav .wp-block-navigation-item__content { padding: 0.25rem 0; }
.vt-nav .wp-block-navigation-item__content:hover { color: #1A1512; text-decoration: underline; text-underline-offset: 4px; }
.vt-nav .vt-nav-cta > .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 22px;
	background: #C2400F;
	color: #FFFFFF;
	border-radius: var(--vt-radius-sm);
	font-weight: 700;
}
.vt-nav .vt-nav-cta > .wp-block-navigation-item__content:hover { background: #8A2C0D; color: #FFFFFF; text-decoration: none; }

.vt-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: #FFFCF7;
	padding: 1.5rem var(--vt-pad);
}
.vt-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 1.25rem; }
.vt-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.25rem; }

@media (max-width: 1080px) {
	.vt-nav .wp-block-navigation__container { gap: 1.1rem; }
	.vt-nav .vt-nav-cta > .wp-block-navigation-item__content { padding: 0 16px; }
}
@media (min-width: 600px) and (max-width: 860px) {
	.vt-header-inner { flex-wrap: wrap !important; row-gap: 0.75rem; }
}

/* ---------- Boutons ---------- */
.wp-element-button,
.wp-block-button__link { transition: background-color 0.15s ease, color 0.15s ease; }
.vt-actions { gap: 12px; }
.vt-actions .wp-block-button__link { min-height: 50px; display: inline-flex; align-items: center; padding: 0 26px; }
.vt-btn-dark .wp-block-button__link { background: #1A1512; color: #FFFCF7; }
.vt-btn-dark .wp-block-button__link:hover { background: #3C322A; color: #FFFCF7; }
.vt-btn-outline .wp-block-button__link {
	background: transparent;
	color: #1A1512;
	border: 1.5px solid #1A1512;
}
.vt-btn-outline .wp-block-button__link:hover { background: #1A1512; color: #FFFCF7; }

/* ---------- Libellés ---------- */
.vt-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: #C2400F;
}
.vt-mono-note {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	color: #7A6B5A;
}

/* ---------- Accueil : hero ---------- */
.vt-hero {
	background: #FFFCF7;
	border-bottom: 1px solid var(--vt-line);
}
.vt-hero-inner {
	display: flex;
	align-items: center;
	gap: 52px;
	padding-block: 64px 56px;
}
.vt-hero-text {
	flex: 1 1 auto;
	max-width: 580px;
	display: flex;
	flex-direction: column;
	gap: 22px;
}
.vt-hero-text > * { margin: 0 !important; }
.vt-hero-title { font-size: clamp(2.5rem, 1.5rem + 4vw, 4rem); line-height: 1.02; letter-spacing: -0.04em; }
.vt-lead { font-size: 1.125rem; line-height: 1.65; color: #4E4238; max-width: 500px; }
.vt-hero-text .vt-actions { padding-top: 6px; }

.vt-hero-art {
	flex: 0 0 480px;
	aspect-ratio: 480 / 400;
	margin: 0;
	background: #FAF3E8;
	border: 1px solid var(--vt-line);
	border-radius: var(--vt-radius);
	overflow: hidden;
}
.vt-hero-art svg { display: block; width: 100%; height: 100%; }

@media (max-width: 1000px) {
	.vt-hero-inner { flex-direction: column; align-items: stretch; gap: 40px; padding-block: 48px 44px; }
	.vt-hero-text { max-width: 640px; }
	.vt-hero-art { flex-basis: auto; width: 100%; max-width: 560px; }
}

/* ---------- Accueil : bandeau ---------- */
.vt-band { background: #1A1512; }
.vt-band-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 36px;
	row-gap: 8px;
	padding-block: 16px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #C4B2A0;
}
.vt-band-inner p { margin: 0; }
.vt-band-label { color: #F0916A; }
@media (max-width: 600px) { .vt-band-inner { column-gap: 20px; } }

/* ---------- Sections ---------- */
.vt-section { padding-block: 52px 44px; }
.vt-derniers { padding-top: 0; padding-bottom: 52px; }
.vt-veille-wrap { padding-top: 0; padding-bottom: 52px; }
.vt-section-head { padding-bottom: 22px; gap: 1rem; }
.vt-section-head h2,
.vt-derniers > h2 { margin: 0; }
.vt-derniers > h2 { margin-bottom: 22px; }

/* ---------- Grilles ---------- */
.vt-grid-3,
.wp-block-post-template.vt-post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.wp-block-post-template.vt-post-grid > li { margin: 0; display: flex; }
.wp-block-post-template.vt-post-grid > li > .vt-card { flex: 1; }
@media (max-width: 960px) {
	.vt-grid-3,
	.wp-block-post-template.vt-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
	.vt-grid-3,
	.wp-block-post-template.vt-post-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Cartes ---------- */
.vt-card {
	position: relative;
	background: #FFFCF7;
	border: 1px solid var(--vt-line);
	border-radius: var(--vt-radius);
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	color: #1A1512;
}
.vt-card:hover { border-color: #C4B2A0; }
.vt-card:focus-within { outline: 2px solid #C2400F; outline-offset: 2px; }
.vt-card-title {
	margin: 0;
	font-size: 1.1875rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.02em;
}
.vt-card-title a { color: inherit; text-decoration: none; }
.vt-card-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.vt-card-title a:focus-visible { outline: none; }
.vt-card:hover .vt-card-title a { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.vt-card-text,
.vt-card-text p { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: #5A4E43; }

.vt-rubrique-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	color: #7A6B5A;
}
.vt-rubrique-top svg { display: block; }

.vt-card-dark {
	background: #1A1512;
	border-color: #1A1512;
	justify-content: flex-end;
	gap: 8px;
	min-height: 150px;
}
.vt-card-dark:hover { border-color: #1A1512; background: #2A221D; }
.vt-card-dark .vt-card-title a { color: #FFFCF7; }
.vt-card-kicker {
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #F0916A;
}

/* Cartes d'article */
.vt-post-card { padding: 0; gap: 0; overflow: hidden; }
.vt-card-media {
	position: relative;
	aspect-ratio: 16 / 9;
	background-color: #EADDCA;
	background-image:
		linear-gradient(#E3D6C4 1px, transparent 1px),
		linear-gradient(90deg, #E3D6C4 1px, transparent 1px);
	background-size: 40px 40px;
	border-bottom: 1px solid var(--vt-line);
	margin: 0 !important;
}
.vt-card-media .wp-block-post-featured-image { margin: 0; height: 100%; }
.vt-card-media .wp-block-post-featured-image a,
.vt-card-media .wp-block-post-featured-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vt-card-body {
	padding: 18px 20px 22px;
	display: flex;
	flex-direction: column;
	gap: 9px;
	margin: 0 !important;
}
.vt-card-body > * { margin: 0 !important; }
.vt-post-card .vt-card-title { font-size: 1.25rem; }

.vt-meta {
	position: relative;
	z-index: 1;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.6875rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #C2400F;
}
.vt-meta a { color: #C2400F; text-decoration: none; }
.vt-meta a:hover { color: #8A2C0D; text-decoration: underline; }

.vt-empty {
	margin: 0;
	padding: 28px;
	background: #FFFCF7;
	border: 1px dashed #D6C6B2;
	border-radius: var(--vt-radius);
	color: #5A4E43;
}

/* ---------- Veille ---------- */
.vt-veille {
	background: #FFFCF7;
	border: 1px solid var(--vt-line);
	border-radius: var(--vt-radius);
	padding: 32px 36px;
	gap: 24px 40px;
	scroll-margin-top: 24px;
}
.vt-veille-text { flex: 1 1 360px; }
.vt-veille-text > * { margin: 0; }
.vt-veille-title { font-size: 1.5625rem; letter-spacing: -0.03em; }
.vt-veille-text p { margin-top: 7px; font-size: 1rem; color: #5A4E43; }
.vt-veille .wp-block-button__link { min-height: 50px; display: inline-flex; align-items: center; padding: 0 24px; }
@media (max-width: 600px) { .vt-veille { padding: 24px; } }

/* ---------- Pied de page ---------- */
.vt-footer { background: #1A1512; margin-top: auto; }
.vt-footer-inner { padding-block: 30px; gap: 16px 32px; align-items: center; }
.vt-footer-tag {
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #C4B2A0;
}
.vt-footer-links { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.875rem; font-weight: 500; }
.vt-footer-links a { color: #F3EBE0; text-decoration: none; }
.vt-footer-links a:hover { color: #FFFFFF; text-decoration: underline; }

/* ---------- En-têtes de pages ---------- */
.vt-page-head {
	background: #FFFCF7;
	border-bottom: 1px solid var(--vt-line);
	padding-block: 56px 44px;
}
.vt-page-head .vt-wrap { display: flex; flex-direction: column; gap: 14px; }
.vt-page-title,
.vt-page-head .wp-block-query-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--archivo);
	font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.25rem);
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.035em;
}
.vt-search-title { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem) !important; }
.vt-page-head .wp-block-term-description p { margin: 0; }

.vt-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.vt-filters a {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0 12px;
	border: 1px solid var(--vt-line);
	border-radius: var(--vt-radius-sm);
	background: #F3EBE0;
	color: #3C322A;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
}
.vt-filters a:hover { border-color: #1A1512; color: #1A1512; text-decoration: none; }

.vt-pagination { margin-top: 32px !important; font-weight: 600; gap: 12px; }
.vt-pagination .page-numbers { padding: 0 6px; }
.vt-pagination .current { color: #C2400F; }

/* Recherche */
.vt-search { max-width: 540px; }
.vt-search .wp-block-search__inside-wrapper { gap: 8px; }
.vt-search .wp-block-search__input {
	min-height: 50px;
	padding: 0 16px;
	border: 1.5px solid #D6C6B2;
	border-radius: var(--vt-radius-sm);
	background: #FFFFFF;
	font-size: 0.9375rem;
	color: #1A1512;
}
.vt-search .wp-block-search__button { margin: 0; min-height: 50px; padding: 0 22px; }

/* ---------- Articles et pages ---------- */
.vt-article-head > * { max-width: 760px; margin-inline: auto !important; width: 100%; }
.vt-article-title {
	margin: 0;
	font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.035em;
}
.vt-article-date {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	color: #7A6B5A;
}
.vt-article-body { padding-block: 44px 72px; }
.vt-article-cover {
	max-width: 1040px;
	margin: 0 auto 44px !important;
	border: 1px solid var(--vt-line);
	border-radius: var(--vt-radius);
	overflow: hidden;
}
.vt-article-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

.vt-prose { font-size: 1.0625rem; line-height: 1.75; }
.vt-prose > * + * { margin-block-start: 1.2em; }
.vt-prose h2 { margin-block-start: 2.2em; font-size: 1.75rem; }
.vt-prose h3 { margin-block-start: 1.8em; font-size: 1.3125rem; }
.vt-prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.vt-prose :not(pre) > code {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.875em;
	background: #EADDCA;
	padding: 0.1em 0.35em;
	border-radius: 3px;
}
.vt-prose pre { overflow-x: auto; }
.vt-prose img { border-radius: var(--vt-radius); height: auto; }
.vt-prose figure { margin-inline: 0; }
.vt-prose .wp-block-table { overflow-x: auto; }
.vt-prose table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
.vt-prose th,
.vt-prose td { border: 1px solid var(--vt-line); padding: 0.6em 0.8em; text-align: left; }
.vt-prose th { background: #FFFCF7; font-weight: 700; }
.vt-prose ul,
.vt-prose ol { padding-left: 1.25em; }
.vt-prose li + li { margin-top: 0.35em; }
.vt-prose hr { border: 0; border-top: 1px solid var(--vt-line); }

.vt-article-nav {
	max-width: 720px;
	margin: 56px auto 0 !important;
	padding-top: 24px;
	border-top: 1px solid var(--vt-line);
	gap: 16px 32px;
}
.vt-article-nav .post-navigation-link-previous,
.vt-article-nav .post-navigation-link-next { max-width: 48%; font-weight: 600; }
.vt-article-nav .wp-block-post-navigation-link__label {
	display: block;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	font-weight: 400;
	color: #7A6B5A;
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Signature et encadré auteur ---------- */
.vt-byline {
	gap: 0.4em;
	align-items: baseline;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	color: #7A6B5A;
}
.vt-byline > * { margin: 0 !important; }
.vt-byline-name { font-weight: 500; color: #1A1512; }
.vt-byline-name a { color: #1A1512; text-decoration: none; }
.vt-byline-name a:hover { color: #8A2C0D; text-decoration: underline; }
.vt-byline .vt-article-date::before { content: "·"; margin-right: 0.4em; }

.vt-author-box {
	max-width: 720px;
	margin: 56px auto 0 !important;
	padding: 24px 28px;
	background: #FFFCF7;
	border: 1px solid var(--vt-line);
	border-left: 3px solid #C2400F;
	border-radius: var(--vt-radius);
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.vt-author-box > * { margin: 0 !important; }
.vt-author-name {
	font-family: var(--wp--preset--font-family--archivo);
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}
.vt-author-name a { color: #1A1512; text-decoration: none; }
.vt-author-bio { font-size: 0.9375rem; line-height: 1.6; color: #5A4E43; }
.vt-author-box + .vt-article-nav { margin-top: 32px !important; }
.vt-author-more { font-size: 0.875rem; font-weight: 600; }
.vt-author-more a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Formulaire de contact ---------- */
.vt-contact { max-width: 620px; }
.vt-form { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.vt-form > p { margin: 0 !important; }
.vt-field { display: flex; flex-direction: column; gap: 6px; }
.vt-field label { font-weight: 600; font-size: 0.9375rem; }
.vt-field input,
.vt-field textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 12px 16px;
	border: 1.5px solid #D6C6B2;
	border-radius: var(--vt-radius-sm);
	background: #FFFFFF;
	color: #1A1512;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.5;
}
.vt-field input { min-height: 50px; }
.vt-field textarea { resize: vertical; min-height: 160px; }
.vt-field input:focus,
.vt-field textarea:focus { outline: 2px solid #C2400F; outline-offset: 1px; border-color: #C2400F; }
.vt-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.vt-form-actions .wp-element-button { min-height: 50px; padding: 0 28px; border: 0; cursor: pointer; }
.vt-form-actions .wp-element-button:disabled { opacity: 0.7; cursor: progress; }
.vt-form-status:empty { display: none; }
.vt-form-status { color: #8A2C0D; font-weight: 600; }
.vt-form-legal { font-size: 0.8125rem; line-height: 1.55; color: #7A6B5A; }
.vt-form-notice {
	margin: 0 0 18px;
	padding: 14px 18px;
	border-radius: var(--vt-radius-sm);
	border: 1px solid var(--vt-line);
	background: #FFFCF7;
	font-weight: 600;
}
.vt-form-notice--ok { border-left: 3px solid #3F7A4A; }
.vt-form-notice--err { border-left: 3px solid #C2400F; color: #8A2C0D; }
