/*
Theme Name: VM Immobilier
Description: Thème du site VM Immobilier (biens synchronisés depuis Whise via le plugin VM Whise).
Version: 0.1.4
Author: Sébastien Meyfroidt
Requires PHP: 8.1
Text Domain: vmimmobilier
*/

:root {
	--vm-primary: #a2185b;
	--vm-primary-dark: #7d1246;
	--vm-text: #2b2b2b;
	--vm-muted: #6b6b6b;
	--vm-border: #e4dde0;
	--vm-surface: #ffffff;
	--vm-soft: #f7f3f5;
	--vm-bg: #ffffff;
	--vm-dark: #231a1f;
	--vm-radius: 6px;
	--vm-font-heading: "DM Serif Display", Georgia, serif;
	--vm-font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--vm-bg); color: var(--vm-text); font: 16px/1.65 var(--vm-font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--vm-primary); }
a:hover { color: var(--vm-primary-dark); }
h1, h2, h3, h4 { font-family: var(--vm-font-heading); font-weight: 400; line-height: 1.2; color: var(--vm-text); }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; padding: 8px 12px; background: #fff; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--vm-border); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.site-logo img { display: block; height: 64px; width: auto; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px 26px; margin: 0; padding: 0; list-style: none; }
.site-nav a { color: var(--vm-text); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a { color: var(--vm-primary); border-color: var(--vm-primary); }
.site-nav__toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--vm-text); }
.site-nav__toggle svg { display: block; }
.site-header__phone { white-space: nowrap; font-weight: 700; text-decoration: none; }

@media (max-width: 960px) {
	.site-header__phone { display: none; }
	.site-nav__toggle { display: block; }
	.site-nav ul { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; padding: 8px 16px 16px; background: #fff; border-bottom: 1px solid var(--vm-border); }
	.site-nav.is-open ul { display: flex; }
	.site-nav a { display: block; padding: 12px 0; border: 0; }
}

/* Héro */
.hero { position: relative; display: grid; align-items: end; min-height: min(78vh, 620px); padding: 120px 0 56px; color: #fff; background: var(--vm-dark) center / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(35,26,31,.15) 0%, rgba(35,26,31,.65) 100%); }
.hero > .container { position: relative; }
.hero h1 { color: #fff; margin: 0 0 24px; text-align: center; text-wrap: balance; }
.hero .vm-search { max-width: 820px; margin-inline: auto; color: var(--vm-text); }
@media (max-width: 600px) {
	/* Sur mobile les champs s'empilent : onglets centrés, bouton pleine largeur. */
	.hero .vm-search__tabs { justify-content: center; }
	.hero .vm-search__fields .vm-btn { flex: 1 1 100%; }
}

/* Sections */
.section { padding: 72px 0; }
.section--soft { background: var(--vm-soft); }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 28px; }
.section__head h2 { margin: 0; }
.page-header { padding: 48px 0 8px; }
.page-header h1 { margin: 0; }
.entry-content { padding-bottom: 72px; }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content .wp-block-columns { gap: 40px; }
.entry-content .wp-block-media-text { margin-block: 56px; gap: 40px; }
.entry-content .wp-block-media-text__media img { border-radius: var(--vm-radius); }
.entry-content .wp-block-media-text li { margin-bottom: .4em; }
.wp-block-button__link { padding: .75em 1.6em; border-radius: var(--vm-radius); background: var(--vm-primary); color: #fff; font-weight: 600; text-decoration: none; }
.wp-block-button__link:hover, .wp-block-button__link:focus-visible { background: var(--vm-primary-dark); color: #fff; }

/* Pied de page */
.site-footer { background: var(--vm-dark); color: #d9cfd4; padding: 56px 0 24px; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: 1.3rem; margin: 0 0 12px; }
.site-footer__grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer__legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: .82rem; color: #a99aa2; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
