/* Les Amis du Livre de Melun - green & cream look. */
/* Self-hosted fonts (SIL OFL): Lora for text, Playfair Display for titles. No third-party requests. */
@font-face{font-family:"Lora";font-style:normal;font-weight:400 700;font-display:swap;src:url("fonts/lora-latin-ext-wght-normal.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Lora";font-style:normal;font-weight:400 700;font-display:swap;src:url("fonts/lora-latin-wght-normal.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Lora";font-style:italic;font-weight:400 700;font-display:swap;src:url("fonts/lora-latin-ext-wght-italic.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Lora";font-style:italic;font-weight:400 700;font-display:swap;src:url("fonts/lora-latin-wght-italic.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Playfair Display";font-style:normal;font-weight:400 900;font-display:swap;src:url("fonts/playfair-display-latin-ext-wght-normal.woff2") format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Playfair Display";font-style:normal;font-weight:400 900;font-display:swap;src:url("fonts/playfair-display-latin-wght-normal.woff2") format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root {
	--am-paper: #faf6ea;
	--am-card: #fffdf6;
	--am-ink: #2a2a22;
	--am-muted: #6b6a5a;
	--am-green: #2c4a23;
	--am-green-2: #3f6b2a;
	--am-forest: #1f312a;
	--am-forest-2: #172520;
	--am-lime: #8cc53f;
	--am-gold: #c9a24d;
	--am-red: #960204;
	--am-line: #e4dcc0;
	--am-body: "Lora", Georgia, "Times New Roman", serif;
	--am-head: "Playfair Display", Georgia, "Times New Roman", serif;
	--am-shadow: 0 1px 2px rgba(42, 42, 34, .08), 0 8px 24px rgba(42, 42, 34, .09);
	--am-shadow-hover: 0 2px 4px rgba(42, 42, 34, .1), 0 14px 32px rgba(42, 42, 34, .17);
}

/* ---------- Base & typography (one system: Lora + Playfair Display) ---------- */
html { scroll-behavior: smooth; }
body {
	background: var(--am-paper) !important;
	color: var(--am-ink);
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}
::selection { background: var(--am-green); color: #fff; }
#pagewrap, #body { background: transparent; }

body, body :is(div, p, ul, ol, li, dl, dt, dd, table, th, td, form, label, input, button, textarea, select,
               blockquote, figcaption, nav, section, article, aside, header, footer, main, address, pre) {
	font-family: var(--am-body) !important;
}
body :is(h1, h2, h3, h4, h5, h6, .widgettitle, .module-title, .post-title, .entry-title, .page-title) {
	font-family: var(--am-head) !important;
	color: var(--am-green);
	font-weight: 600;
	letter-spacing: .005em;
	line-height: 1.25;
	font-variant-numeric: lining-nums;
	font-feature-settings: "lnum" 1;
}
body :is(span, a, b, strong, em, i, u, small, mark, bdi, font, cite, sub, sup, abbr):not([class*="fa-"]):not(.tf_fa) {
	font-family: inherit !important;
}
.themify_builder_content .tb_text_wrap p,
.themify_builder_content .tb_text_wrap li { font-size: 1rem !important; line-height: 1.75 !important; }
.themify_builder_content .tb_text_wrap :is(span, b, strong, em, a) { font-size: inherit !important; }
b, strong { font-weight: 700; }

a { color: var(--am-green-2); text-decoration-color: rgba(140, 197, 63, .7); text-underline-offset: .18em; transition: color .2s ease; }
a:hover { color: var(--am-red); }
:focus-visible { outline: 2px solid var(--am-lime); outline-offset: 3px; border-radius: 2px; }
.wp-block-separator, hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--am-line), transparent); opacity: 1; }

/* ---------- Header ---------- */
#headerwrap {
	background: rgba(255, 253, 246, .97) !important;
	border-bottom: 1px solid var(--am-line);
	box-shadow: 0 6px 20px rgba(42, 42, 34, .05);
}
#site-logo img.site-logo-image {
	display: block;
	height: auto !important;
	width: auto !important;
	max-width: min(100%, 560px);
	max-height: 84px;
	margin: .5rem auto;
}
#main-nav > li > a {
	font-size: .8rem;
	font-style: normal !important;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--am-green) !important;
	position: relative;
	transition: color .2s ease;
}
#main-nav > li > a::after {
	content: ""; position: absolute; left: 50%; right: 50%; bottom: .45em; height: 2px;
	background: var(--am-lime); transition: left .25s ease, right .25s ease;
}
#main-nav > li:hover > a, #main-nav > li.current-menu-item > a { color: var(--am-red) !important; }
#main-nav > li:hover > a::after, #main-nav > li.current-menu-item > a::after { left: .7em; right: .7em; }
#main-nav .sub-menu {
	background: var(--am-card);
	border: 1px solid var(--am-line);
	border-top: 3px solid var(--am-lime);
	border-radius: 0 0 4px 4px;
	box-shadow: var(--am-shadow);
}
#main-nav .sub-menu a { color: var(--am-ink) !important; font-style: normal !important; text-transform: none; letter-spacing: .02em; }
#main-nav .sub-menu a:hover { color: var(--am-red) !important; }
.social-links em, .search-button, .search-button svg { color: var(--am-green) !important; }
.search-button:hover, .social-links a:hover em { color: var(--am-red) !important; }

/* ---------- Page-builder blocks: calm, no heavy frames ---------- */
.themify_builder_content :is(.module_row, .module_column, .module_subrow) { background-color: transparent; }
.themify_builder_content .module-divider {
	border-width: 3px !important;
	border-color: var(--am-lime) !important;
	border-radius: 3px;
	opacity: .85;
}

/* hero: readable date over the photo */
.themify_builder_content .tb_xwnr845 { position: relative; }
.themify_builder_content .tb_xwnr845::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60%;
	background: linear-gradient(to top, rgba(12, 22, 14, .72), transparent);
	pointer-events: none;
}
.themify_builder_content .tb_xwnr845 > .row_inner { position: relative; z-index: 1; }
.themify_builder_content .tb_xwnr845 :is(h1, h3) {
	color: #fff !important;
	text-shadow: 0 2px 14px rgba(0, 0, 0, .7);
}
.themify_builder_content .tb_xwnr845 :is(h1, h3) span { color: #ffe680 !important; }

.themify_builder_content h2 { text-align: center; font-size: clamp(1.6rem, 2.6vw, 2.3rem); margin: 1.4em 0 1em; }
.themify_builder_content h2::after {
	content: ""; display: block; width: 64px; height: 3px; margin: .5em auto 0;
	background: var(--am-lime); border-radius: 2px;
}
.themify_builder_content h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); }

/* ---------- The six section panels: equal height, visible link ---------- */
.themify_builder_content .module_subrow.tb_col_count_6 {
	display: grid !important;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 1.1rem;
	align-items: stretch;
}
.themify_builder_content .module_subrow.tb_col_count_6 > .module_column {
	float: none !important; width: auto !important; margin: 0 !important;
	display: flex;
}
.themify_builder_content .module_subrow.tb_col_count_6 .module-image {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
	background: var(--am-card) !important;
	border: 1px solid var(--am-line) !important;
	border-radius: 8px !important;
	overflow: hidden;
	box-shadow: var(--am-shadow);
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.themify_builder_content .module_subrow.tb_col_count_6 .module-image:hover {
	transform: translateY(-4px);
	box-shadow: var(--am-shadow-hover);
	border-color: var(--am-lime) !important;
}
/* the heading above the picture repeats the link below: keep it for screen readers only */
.themify_builder_content .module_subrow.tb_col_count_6 .module-image .module-title {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0;
}
.themify_builder_content .module_subrow.tb_col_count_6 .image-wrap {
	flex: 0 0 auto; width: 100%; max-width: none; aspect-ratio: 4 / 3; overflow: hidden; margin: 0; padding: 0; border: 0;
}
.themify_builder_content .module_subrow.tb_col_count_6 .image-wrap a { display: block; height: 100%; }
.themify_builder_content .module_subrow.tb_col_count_6 .image-wrap img {
	width: 100% !important; height: 100% !important; max-width: none !important;
	object-fit: cover; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; margin: 0 !important;
	transition: transform .5s ease;
}
.themify_builder_content .module_subrow.tb_col_count_6 .module-image:hover .image-wrap img { transform: scale(1.06); }
.themify_builder_content .module_subrow.tb_col_count_6 .image-content {
	margin: auto 0 0; padding: .9rem; background: none; text-align: center;
}
.themify_builder_content .module_subrow.tb_col_count_6 .image-title { margin: 0; font-size: 1rem; }
/* the link was white on white: make it a green button */
.themify_builder_content .module_subrow.tb_col_count_6 .image-title a {
	display: block;
	padding: .75em .6em;
	background: var(--am-green);
	color: #fff !important;
	border-radius: 4px;
	font-family: var(--am-body) !important;
	font-size: .85rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	text-decoration: none;
	box-shadow: 0 2px 0 var(--am-forest-2);
	transition: background .2s ease, color .2s ease;
}
.themify_builder_content .module_subrow.tb_col_count_6 .image-title a::after { content: " \2192"; }
.themify_builder_content .module_subrow.tb_col_count_6 .module-image:hover .image-title a { background: var(--am-lime); color: var(--am-forest-2) !important; box-shadow: 0 2px 0 #6da22a; }

@media (max-width: 1000px) { .themify_builder_content .module_subrow.tb_col_count_6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .themify_builder_content .module_subrow.tb_col_count_6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
	.themify_builder_content .module_subrow.tb_col_count_6 .image-title a { font-size: .75rem; letter-spacing: .06em; } }

/* other images: soft corners, no frames */
.themify_builder_content .module-image:not(.tb_col_count_6 *) img { border-radius: 6px; }

/* ---------- Posts list (dédicaces...) ---------- */
.post-title, .post-title a { color: var(--am-green) !important; }
.post-title a:hover { color: var(--am-red) !important; }
.post-title { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.post-meta, .post-date { color: var(--am-muted); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.post-image img { border-radius: 8px; box-shadow: var(--am-shadow); }

/* ---------- Buttons & forms ---------- */
.themify_builder_content :is(a.ui.builder_button, .module-buttons a.ui),
button, input[type="submit"], .button {
	background: var(--am-green) !important;
	border: 1px solid var(--am-green) !important;
	border-radius: 4px !important;
	color: #fff !important;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	box-shadow: 0 2px 0 var(--am-forest-2);
}
.themify_builder_content :is(a.ui.builder_button, .module-buttons a.ui):hover, button:hover, input[type="submit"]:hover {
	background: var(--am-red) !important; border-color: var(--am-red) !important;
}
input[type="text"], input[type="email"], input[type="search"], input[type="tel"], textarea, select {
	background: var(--am-card); border: 1px solid var(--am-line); border-radius: 4px; color: var(--am-ink);
}
input:focus, textarea:focus, select:focus { border-color: var(--am-lime) !important; box-shadow: 0 0 0 3px rgba(140, 197, 63, .25); outline: none; }

/* =====================================================================
   Footer
   ===================================================================== */
#footerwrap {
	background: var(--am-forest) !important;
	color: #e7e2cc;
	border-top: 4px solid var(--am-lime);
	margin-top: 4rem;
	padding: 3.2rem 0 0;
}
#footerwrap #footer { background: transparent !important; padding: 0; max-width: 1160px; }
#footer {
	display: grid;
	grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr);
	gap: 2.2rem 4rem;
	align-items: start;
}
#footer .back-top { grid-column: 1 / -1; }
#footer .main-col { width: auto; float: none; padding: 0; margin: 0; }
#footer .main-col .footer-left-wrap { float: none; width: auto; }
#footer .footer-right-wrap:empty, #footer .footer-nav-wrap:empty { display: none; }
#footer .section-col { width: auto; float: none; padding: 0; margin: 0; }
#footer .footer-text { grid-column: 1 / -1; }

/* logo: SVG (light version) instead of plain text */
#footer-logo a {
	display: block;
	width: min(100%, 340px);
	aspect-ratio: 600 / 110;
	background: url("logos/logo-amis-du-livre-light.svg") no-repeat left center / contain;
	overflow: hidden;
}
#footer-logo a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#footer .social-widget { display: block; margin-top: 1.2rem; }
#footer .social-links { margin: 0; }
#footer .social-links a {
	display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border-radius: 50%;
	border: 1px solid rgba(201, 162, 77, .6);
	background: transparent;
	transition: background .2s ease, border-color .2s ease;
}
#footer .social-links em, #footer .social-links svg { color: var(--am-gold) !important; fill: currentColor; }
#footer .social-links a:hover { background: var(--am-lime); border-color: var(--am-lime); }
#footer .social-links a:hover em, #footer .social-links a:hover svg { color: var(--am-forest-2) !important; }
#footer .social-widget .wp-block-separator { display: none; }

/* widgets: neat columns, empty ones hidden */
#footer .footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 2rem; }
#footer .footer-widgets > [class*="col"] { float: none; width: auto; margin: 0; padding: 0; }
#footer .footer-widgets > [class*="col"]:not(:has(*)) { display: none; }
#footer .footer-widgets .widget:not(:has(> :not(.widgettitle))) { display: none; }
#footer .widgettitle {
	color: var(--am-gold) !important;
	font-family: var(--am-head) !important;
	font-size: 1rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	padding-bottom: .6rem;
	margin: 0 0 1rem;
	border-bottom: 1px solid rgba(201, 162, 77, .35);
}
#footer .widget ul { list-style: none; margin: 0; padding: 0; }
#footer .widget li { margin: 0 0 .6rem; padding: 0; border: 0; }
#footer a { color: #f0ebd6 !important; text-decoration: none; }
#footer a:hover { color: var(--am-lime) !important; }
#footer .menu a::before { content: "\203A"; color: var(--am-lime); margin-right: .5em; }

/* popular posts: thumbnail + title + date */
#footer .feature-posts-list li {
	display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: .1rem .9rem; align-items: center;
	margin: 0 0 1rem;
}
#footer .feature-posts-list li:not(:has(img)) { display: block; }
#footer .feature-posts-list li > br { display: none; }
#footer .feature-posts-list li > a:first-child { grid-row: span 2; }
#footer .feature-posts-list li > a:empty { display: none; }
#footer .feature-posts-list img {
	width: 68px !important; height: 68px !important; object-fit: cover; border-radius: 6px; display: block;
}
#footer .feature-posts-title { font-size: .95rem; line-height: 1.35; }
#footer .feature-posts-list small { color: #bdb894; letter-spacing: .08em; text-transform: uppercase; font-size: .7rem; }

/* bottom bar */
#footer .footer-text {
	margin-top: .5rem;
	padding: 1.3rem 0 1.6rem;
	border-top: 1px solid rgba(255, 255, 255, .12);
	font-size: .82rem;
	color: #bdb894;
	text-align: center;
}
#footer .footer-text .footer-text-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.6rem; }
#footer .footer-text a { color: #d9d3b5 !important; }

@media (max-width: 800px) {
	#footer { grid-template-columns: 1fr; }
	#footer-logo a { width: min(100%, 300px); }
}

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

/* ---------- fixes after first review ---------- */
#footer .feature-posts-list li { float: none !important; width: 100% !important; max-width: none !important; box-sizing: border-box; }
#footer .feature-posts-list .feature-posts-title { display: block !important; width: auto !important; }
#footer .feature-posts-list small { display: block; width: auto !important; }
#footer .feature-posts-list li > a:first-child { display: block; height: auto; }
#footer .feature-posts-list li > a:first-child img { margin: 0; }

/* panel buttons: always one line, so every card lines up */
.themify_builder_content .module_subrow.tb_col_count_6 .image-title a {
	white-space: nowrap;
	font-size: .74rem;
	letter-spacing: .08em;
	padding: .8em .4em;
}
.themify_builder_content .module_subrow.tb_col_count_6 .image-wrap { line-height: 0; }
.themify_builder_content .module_subrow.tb_col_count_6 .image-wrap a,
.themify_builder_content .module_subrow.tb_col_count_6 .image-wrap img { vertical-align: top; }
@media (max-width: 1000px) { .themify_builder_content .module_subrow.tb_col_count_6 .image-title a { font-size: .8rem; } }

/* ---------- mobile fixes ---------- */
#footerwrap #footer { width: min(1160px, 92%) !important; max-width: none; margin-left: auto; margin-right: auto; box-sizing: border-box; }
.header-bar, #site-logo { background: transparent !important; }
@media (max-width: 560px) {
	.themify_builder_content .module_subrow.tb_col_count_6 .image-title a { white-space: normal; font-size: .72rem; letter-spacing: .05em; line-height: 1.25; padding: .7em .3em; }
	.themify_builder_content .module_subrow.tb_col_count_6 .image-title a::after { content: none; }
	.themify_builder_content .module_subrow.tb_col_count_6 .image-content { padding: .6rem; }
}
