/* =========================================================================
   ASTUCES.MAISON — DESIGN SYSTEM (base)
   Brutalist editorial · cream/noir/rust · Literata + Bricolage + JetBrains Mono
   ========================================================================= */

:root {
	--bg:           #fcf8f8;
	--surface:      #fcf8f8;
	--surface-low:  #f6f3f2;
	--surface-mid:  #f1eded;
	--surface-high: #ebe7e7;
	--surface-grid: #e1dfdb;
	--ink:          #000000;
	--ink-body:     #1c1b1c;
	--ink-soft:     #45474a;
	--secondary:    #5e5e5b;
	--outline:      #76777b;
	--outline-soft: #c6c6ca;
	--accent:       #d6603e;
	--accent-deep:  #842506;
	--accent-soft:  #ffdbd1;
	--inverse-text: #ffffff;

	--display:  'Literata', 'Times New Roman', serif;
	--body:     'Literata', 'Times New Roman', serif;
	--label:    'Bricolage Grotesque', system-ui, sans-serif;
	--mono:     'JetBrains Mono', ui-monospace, monospace;

	--max:      1440px;
	--pad-x:    clamp(20px, 4vw, 64px);
	--gutter:   24px;
	--hair:     1px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
	background: var(--bg);
	color: var(--ink);
	font-family: var(--body);
	font-size: 19px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-optical-sizing: auto;
	min-height: 100vh;
	background-image:
		linear-gradient(to right, var(--surface-grid) 1px, transparent 1px),
		linear-gradient(to bottom, var(--surface-grid) 1px, transparent 1px);
	background-size: 24px 24px;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }

::selection { background: var(--accent); color: #fff; }

.wrap {
	max-width: var(--max);
	margin: 0 auto;
	padding-left: var(--pad-x);
	padding-right: var(--pad-x);
}

.screen-reader-text {
	position: absolute !important;
	clip: rect(1px,1px,1px,1px);
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.material-symbols-outlined {
	font-family: 'Material Symbols Outlined';
	font-weight: normal;
	font-style: normal;
	font-size: 20px;
	line-height: 1;
	letter-spacing: normal;
	display: inline-block;
	white-space: nowrap;
	direction: ltr;
	-webkit-font-feature-settings: 'liga';
	font-feature-settings: 'liga';
	-webkit-font-smoothing: antialiased;
	vertical-align: middle;
}

/* =========================================================================
   BRAND / WORDMARK (header + footer)
   ========================================================================= */
.brand {
	display: inline-flex;
	align-items: baseline;
	font-family: var(--display);
	font-size: 30px;
	line-height: 1;
	letter-spacing: -.028em;
	color: var(--ink);
	font-optical-sizing: auto;
}
.brand-1 { font-weight: 400; font-style: italic; }
.brand-2 { font-weight: 800; }
.brand-dot {
	font-weight: 800;
	color: var(--accent);
	font-size: 1.2em;
	line-height: 0;
	padding: 0 1px;
	transition: color .15s, transform .2s ease;
	display: inline-block;
}
.brand:hover .brand-dot { color: var(--ink); transform: rotate(45deg) scale(1.05); }

/* =========================================================================
   HEADER
   ========================================================================= */
.header {
	background: var(--bg);
	border-bottom: 1px solid var(--outline);
	position: sticky;
	top: 0;
	z-index: 50;
}
.header-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	padding-top: 16px;
	padding-bottom: 16px;
}

.nav {
	display: flex;
	align-items: center;
	gap: 32px;
}
.nav a {
	font-family: var(--label);
	font-size: 16px;
	font-weight: 500;
	letter-spacing: -.012em;
	text-transform: uppercase;
	color: var(--secondary);
	position: relative;
	padding: 4px 0;
	transition: color .12s;
}
.nav a:hover { color: var(--accent); }
.nav a .nav-num {
	position: absolute;
	top: -14px;
	left: -8px;
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: .05em;
	color: var(--outline);
	opacity: 0;
	transition: opacity .15s;
}
.nav a:hover .nav-num { opacity: 1; }

.header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}
.btn-square {
	width: 40px;
	height: 40px;
	border: 1px solid var(--ink);
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	color: var(--ink);
	transition: background-color .12s, color .12s, border-color .12s;
}
.btn-square:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.menu-btn { display: none; }

/* Mobile drawer */
.nav-drawer {
	display: none;
}
.nav-drawer-toggle { position: absolute; left: -9999px; }

@media (max-width: 1080px) {
	.nav { display: none; }
	.menu-btn { display: flex; }

	.nav-drawer {
		display: flex;
		position: fixed;
		inset: 0;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		gap: 24px;
		background: var(--bg);
		padding: 80px 32px 40px;
		opacity: 0;
		visibility: hidden;
		transition: opacity .25s ease, visibility .25s ease;
		z-index: 100;
	}
	.nav-drawer a {
		font-family: var(--label);
		font-size: 22px;
		font-weight: 600;
		letter-spacing: -.015em;
		color: var(--ink);
	}
	.nav-drawer a:hover { color: var(--accent); }
	.nav-drawer-toggle:checked ~ .nav-drawer { opacity: 1; visibility: visible; }
}
body:has(.nav-drawer-toggle:checked) { overflow: hidden; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
	background: var(--bg);
	border-top: 1px solid var(--outline);
	margin-top: 80px;
}
.footer-inner {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: var(--gutter);
	padding-top: 80px;
	padding-bottom: 40px;
	background-image:
		linear-gradient(to right, var(--surface-grid) 1px, transparent 1px),
		linear-gradient(to bottom, var(--surface-grid) 1px, transparent 1px);
	background-size: 8px 8px;
}
.footer-brand-col {
	grid-column: span 4;
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.footer-brand {
	font-family: var(--display);
	font-size: clamp(32px, 4vw, 40px);
	line-height: 1;
	letter-spacing: -.028em;
}
.footer-tagline {
	font-family: var(--display);
	font-style: italic;
	font-size: 19px;
	line-height: 1.35;
	color: var(--ink);
	max-width: 280px;
	font-weight: 400;
}
.footer-meta {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: .04em;
	color: var(--secondary);
	max-width: 320px;
	line-height: 1.6;
	margin-top: 8px;
}
.footer-links {
	grid-column: span 8;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}
.footer-col {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-left: 16px;
	border-left: 1px solid var(--outline);
}
.footer-col h4 {
	font-family: var(--display);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -.012em;
	color: var(--ink);
	margin-bottom: 8px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--outline);
	display: block;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a {
	font-family: var(--display);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: -.01em;
	color: var(--ink-soft);
	transition: color .12s, padding-left .15s ease;
}
.footer-col a:hover { color: var(--accent); padding-left: 4px; }

@media (max-width: 1080px) {
	.footer-brand-col { grid-column: span 12; }
	.footer-links { grid-column: span 12; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
	.footer-links { grid-template-columns: 1fr; }
}

/* =========================================================================
   SECTION HEAD (commun à plusieurs sections)
   ========================================================================= */
.section-block {
	padding-top: clamp(60px, 10vh, 120px);
	padding-bottom: clamp(60px, 10vh, 120px);
	border-bottom: 1px solid var(--outline);
}
.section-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 56px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--outline);
	gap: 24px;
	flex-wrap: wrap;
}
.section-h2 {
	font-family: var(--display);
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.1;
	letter-spacing: -.02em;
	font-weight: 600;
	font-optical-sizing: auto;
}

/* =========================================================================
   PAGINATION (archive / search / index)
   ========================================================================= */
.archive-pagination {
	margin-top: 56px;
	padding-top: 24px;
	border-top: 1px solid var(--outline);
	display: flex;
	justify-content: center;
}
.archive-pagination .nav-links {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.archive-pagination .page-numbers {
	font-family: var(--mono);
	font-size: 13px;
	letter-spacing: .05em;
	padding: 10px 14px;
	border: 1px solid var(--outline);
	color: var(--ink);
	transition: background .12s, color .12s, border-color .12s;
}
.archive-pagination .page-numbers:hover,
.archive-pagination .page-numbers.current {
	background: var(--ink);
	color: #fff;
	border-color: var(--ink);
}

/* =========================================================================
   SEARCH FORM
   ========================================================================= */
.search-form {
	display: flex;
	align-items: stretch;
	border: 1px solid var(--ink);
	margin-top: 24px;
	max-width: 540px;
}
.search-form-input {
	flex: 1;
	border: 0;
	padding: 12px 16px;
	font-family: var(--display);
	font-size: 16px;
	background: transparent;
	color: var(--ink);
	outline: none;
}
.search-form-input::placeholder { color: var(--secondary); font-style: italic; }
.search-form-submit {
	border: 0;
	border-left: 1px solid var(--ink);
	padding: 0 18px;
	font-family: var(--mono);
	font-size: 13px;
	letter-spacing: .1em;
	text-transform: uppercase;
	background: var(--ink);
	color: #fff;
	cursor: pointer;
	transition: background .12s;
}
.search-form-submit:hover { background: var(--accent); }

/* =========================================================================
   CARD (archive / search / related)
   ========================================================================= */
.card {
	display: flex;
	flex-direction: column;
	gap: 14px;
	border: 1px solid var(--outline);
	background: var(--surface-low);
	padding: 16px;
	transition: background .12s, border-color .12s;
	color: var(--ink);
}
.card:hover { background: var(--surface-mid); border-color: var(--ink); }
.card:hover .card-title { color: var(--accent); }
.card-photo {
	aspect-ratio: 3 / 2;
	overflow: hidden;
	background: var(--surface-high);
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.card:hover .card-photo img { transform: scale(1.03); }
.card-cat {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--secondary);
}
.card-title {
	font-family: var(--display);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -.015em;
	transition: color .12s;
}
.card-meta {
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: .05em;
	color: var(--secondary);
}

/* =========================================================================
   FORM (page-contact)
   ========================================================================= */
.am-form {
	display: flex;
	flex-direction: column;
	gap: 28px;
	margin-top: 40px;
	max-width: 720px;
}
.am-form-row {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.am-form-label {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--label);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -.01em;
	text-transform: uppercase;
	color: var(--ink);
}
.am-form-label-mark {
	font-family: var(--mono);
	font-size: 11px;
	font-weight: 400;
	color: var(--accent);
	letter-spacing: .08em;
	padding: 3px 6px;
	border: 1px solid var(--accent);
}
.am-form-optional {
	font-family: var(--display);
	font-style: italic;
	font-weight: 400;
	font-size: 13px;
	color: var(--secondary);
	text-transform: none;
	letter-spacing: 0;
}
.am-form-input {
	width: 100%;
	border: 1px solid var(--outline);
	background: var(--bg);
	padding: 14px 16px;
	font-family: var(--display);
	font-size: 16px;
	line-height: 1.45;
	color: var(--ink);
	outline: none;
	transition: border-color .12s, background .12s;
}
.am-form-input:hover { border-color: var(--ink); }
.am-form-input:focus { border-color: var(--accent); background: var(--surface-low); }
.am-form-textarea { resize: vertical; min-height: 160px; }
.am-form-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
	padding-top: 16px;
	border-top: 1px solid var(--surface-grid);
}
.am-form-note {
	font-family: var(--display);
	font-style: italic;
	font-size: 14px;
	color: var(--secondary);
	max-width: 36em;
}
.am-form-submit {
	padding: 14px 24px;
	border: 1px solid var(--ink);
	background: var(--ink);
	color: #fff;
	font-family: var(--mono);
	font-size: 13px;
	letter-spacing: .12em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .12s, border-color .12s;
	display: inline-flex;
	align-items: center;
	gap: 12px;
}
.am-form-submit:hover { background: var(--accent); border-color: var(--accent); }
.am-form-submit span { transition: transform .15s ease; }
.am-form-submit:hover span { transform: translateX(4px); }
