/* VM Whise — styles des listes et fiches de biens.
   Les couleurs reprennent les variables du thème (--vm-*) avec des valeurs par défaut. */

.vm-list, .vm-filters, .vm-search, .vm-single, .vm-contact {
	--_primary: var(--vm-primary, #a2185b);
	--_primary-dark: var(--vm-primary-dark, #7d1246);
	--_text: var(--vm-text, #2b2b2b);
	--_muted: var(--vm-muted, #6b6b6b);
	--_border: var(--vm-border, #e4dde0);
	--_surface: var(--vm-surface, #ffffff);
	--_soft: var(--vm-soft, #f7f3f5);
	--_radius: var(--vm-radius, 6px);
}

.vm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	padding: .75em 1.4em; border: 2px solid var(--_primary, #a2185b); border-radius: var(--_radius, 6px);
	background: var(--_primary, #a2185b); color: #fff; font: inherit; font-weight: 600;
	text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s;
}
.vm-btn:hover, .vm-btn:focus-visible { background: var(--_primary-dark, #7d1246); border-color: var(--_primary-dark, #7d1246); color: #fff; }
.vm-btn--ghost { background: transparent; color: var(--_primary, #a2185b); }
.vm-btn--ghost:hover { color: #fff; }

/* Grille de cartes */
.vm-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.vm-list__count { color: var(--_muted); margin: 0 0 12px; }
.vm-list__empty { padding: 40px 0; text-align: center; color: var(--_muted); }

.vm-card { background: var(--_surface); border: 1px solid var(--_border); border-radius: var(--_radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.vm-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,.08); transform: translateY(-2px); }
.vm-card__link { display: block; color: inherit; text-decoration: none; height: 100%; }
.vm-card__media { position: relative; aspect-ratio: 3 / 2; background: var(--_soft); }
.vm-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vm-card--closed .vm-card__media img { filter: grayscale(.4); opacity: .85; }
.vm-card__body { padding: 16px 18px 18px; }
.vm-card__place { margin: 0 0 4px; font-size: .85em; text-transform: uppercase; letter-spacing: .04em; color: var(--_primary); font-weight: 600; }
.vm-card__title { margin: 0 0 12px; font-size: 1.1em; line-height: 1.3; }
.vm-card__facts { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; margin: 0 0 12px; padding: 0; color: var(--_muted); font-size: .9em; }
.vm-card__facts li { display: inline-flex; align-items: center; gap: 5px; }
.vm-card__price { margin: 0; font-weight: 700; font-size: 1.15em; color: var(--_text); }

.vm-flag { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 3px; font-size: .8em; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #fff; background: var(--_primary); }
.vm-flag--new { background: #378805; }
.vm-flag--project { left: auto; right: 12px; background: #2b2b2b; }
.vm-flag--inline { position: static; display: inline-block; margin-right: 8px; vertical-align: middle; }

/* Icônes simples en CSS (masques SVG) */
.vm-ico { width: 1.1em; height: 1.1em; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.vm-ico--bed { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 7v13h2v-3h14v3h2v-8a3 3 0 0 0-3-3h-7v6H5V7H3zm5 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4z'/%3E%3C/svg%3E"); }
.vm-ico--bath { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4a2 2 0 0 1 2 2h-2v6H3v2a5 5 0 0 0 3 4.6V20h2v-1h8v1h2v-1.4A5 5 0 0 0 21 14v-2H9V6a4 4 0 0 0-8 0v6h2V6a2 2 0 0 1 4-2z'/%3E%3C/svg%3E"); }
.vm-ico--area { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h7v2H6.4l4.3 4.3-1.4 1.4L5 6.4V10H3V3zm18 18h-7v-2h3.6l-4.3-4.3 1.4-1.4 4.3 4.3V14h2v7z'/%3E%3C/svg%3E"); }

/* Labels PEB : logos officiels (img), pastille texte en repli */
.vm-peb { display: inline-block; min-width: 2em; padding: 1px 6px; border-radius: 3px; color: #fff; font-weight: 700; font-size: .85em; text-align: center; background: #888; }
.vm-peb--lg { font-size: 1.3em; padding: 4px 12px; margin-right: 10px; vertical-align: middle; }
img.vm-peb--img { display: block; min-width: 0; height: 22px; width: auto; padding: 0; border-radius: 0; background: none; }
img.vm-peb--img.vm-peb--lg { display: inline-block; height: 40px; margin: 0 12px 0 0; vertical-align: middle; }
.vm-peb--a { background: #00843d; }
.vm-peb--b { background: #4fae32; }
.vm-peb--c { background: #c6d300; color: #222; }
.vm-peb--d { background: #ffe500; color: #222; }
.vm-peb--e { background: #f9b000; }
.vm-peb--f { background: #ea6a0c; }
.vm-peb--g { background: #e30613; }

/* Filtres & recherche */
.vm-filters, .vm-search__fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0 0 24px; }
.vm-filters label, .vm-search__fields label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 160px; font-size: .85em; font-weight: 600; color: var(--_muted); }
.vm-filters select, .vm-search select, .vm-form input, .vm-form select, .vm-form textarea {
	width: 100%; padding: .65em .8em; border: 1px solid var(--_border); border-radius: var(--_radius); background: #fff; font: inherit; color: var(--_text);
}
.vm-form input:focus, .vm-form select:focus, .vm-form textarea:focus, .vm-filters select:focus, .vm-search select:focus { outline: 2px solid var(--_primary); outline-offset: 1px; border-color: transparent; }
.vm-search { background: var(--_surface); padding: 20px; border-radius: var(--_radius); box-shadow: 0 10px 40px rgba(0,0,0,.15); }
.vm-search__tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.vm-search__tabs label { cursor: pointer; padding: .4em 1em; border-radius: 99px; border: 1px solid var(--_border); font-weight: 600; }
.vm-search__tabs input { position: absolute; opacity: 0; pointer-events: none; }
.vm-search__tabs label:has(input:checked) { background: var(--_primary); border-color: var(--_primary); color: #fff; }
.vm-search__tabs label:has(input:focus-visible) { outline: 2px solid var(--_primary); outline-offset: 2px; }
.vm-search__fields { margin: 0; }

/* Pagination */
.vm-pagination { display: flex; justify-content: center; gap: 6px; margin: 32px 0 0; }
.vm-pagination .page-numbers { min-width: 2.4em; padding: .4em .7em; text-align: center; border: 1px solid var(--_border); border-radius: var(--_radius); text-decoration: none; color: var(--_text); }
.vm-pagination .current { background: var(--_primary); border-color: var(--_primary); color: #fff; }

/* Fiche */
.vm-single { padding: 32px 0 64px; color: var(--_text); }
.vm-container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.vm-single__header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.vm-single__place { margin: 0; color: var(--_primary); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: .9em; }
.vm-single__title { margin: 4px 0 0; }
.vm-single__price { font-size: 1.6em; font-weight: 700; white-space: nowrap; }

.vm-gallery { margin-bottom: 32px; }
.vm-gallery__main { position: relative; margin: 0; aspect-ratio: 16 / 9; background: #111; border-radius: var(--_radius); overflow: hidden; }
.vm-gallery__main img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.vm-gallery__nav { position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.85); font-size: 28px; line-height: 1; cursor: pointer; color: #222; }
.vm-gallery__nav--prev { left: 12px; }
.vm-gallery__nav--next { right: 12px; }
.vm-gallery__count { position: absolute; right: 12px; bottom: 12px; padding: 2px 10px; border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; font-size: .85em; }
.vm-gallery__thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 4px; scrollbar-width: thin; }
.vm-gallery__thumbs button { flex: 0 0 96px; aspect-ratio: 3 / 2; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; cursor: pointer; background: none; opacity: .7; }
.vm-gallery__thumbs button[aria-current="true"] { border-color: var(--_primary); opacity: 1; }
.vm-gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Lightbox */
.vm-lightbox-open { overflow: hidden; }
.vm-lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12, 8, 10, .95); color: #fff; }
.vm-lightbox::backdrop { background: rgba(12, 8, 10, .95); }
.vm-lightbox__img { position: absolute; inset: 56px 72px; width: calc(100% - 144px); height: calc(100% - 112px); object-fit: contain; user-select: none; }
.vm-lightbox button { position: absolute; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font: 32px/1 sans-serif; cursor: pointer; transition: background .15s; }
.vm-lightbox button:hover, .vm-lightbox button:focus-visible { background: var(--vm-primary, #a2185b); outline: none; }
.vm-lightbox__close { top: 12px; right: 12px; width: 44px; height: 44px; }
.vm-lightbox__nav { top: 50%; width: 52px; height: 52px; translate: 0 -50%; }
.vm-lightbox__nav--prev { left: 12px; }
.vm-lightbox__nav--next { right: 12px; }
.vm-lightbox__count { position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; text-align: center; font-size: .9em; opacity: .85; }
@media (max-width: 700px) {
	.vm-lightbox__img { inset: 56px 8px; width: calc(100% - 16px); }
	.vm-lightbox__nav { top: auto; bottom: 6px; translate: none; width: 44px; height: 44px; }
	.vm-lightbox__count { bottom: 18px; }
}

.vm-single__layout { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.vm-single__aside { position: sticky; top: 24px; display: grid; gap: 20px; }
.vm-single__content section { margin-bottom: 36px; }
.vm-single__content h2 { font-size: 1.35em; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--_soft); }
.vm-facts dl, .vm-details dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 24px; margin: 0; }
.vm-facts dl > div, .vm-details dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--_border); }
.vm-facts dt, .vm-details dt { color: var(--_muted); }
.vm-facts dd, .vm-details dd { margin: 0; font-weight: 600; text-align: right; }
.vm-units table { width: 100%; border-collapse: collapse; }
.vm-units th, .vm-units td { padding: 10px 8px; border-bottom: 1px solid var(--_border); text-align: left; }
.vm-actions { display: grid; gap: 10px; }
.vm-agent { display: flex; gap: 14px; align-items: center; padding: 16px; background: var(--_soft); border-radius: var(--_radius); }
.vm-agent img { border-radius: 50%; object-fit: cover; }

/* Formulaire */
.vm-contact { background: var(--_soft); padding: 24px; border-radius: var(--_radius); }
.vm-contact__title { margin: 0 0 16px; font-size: 1.3em; }
.vm-form { display: grid; gap: 14px; }
.vm-form label { display: grid; gap: 4px; font-size: .9em; font-weight: 600; }
.vm-form__row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.vm-form .vm-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.vm-form .vm-check input { width: auto; margin-top: .25em; }
.vm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.vm-alert { padding: 12px 16px; border-radius: var(--_radius); margin: 0 0 16px; }
.vm-alert--success { background: #e6f4ea; color: #1e5631; }
.vm-alert--error { background: #fdecea; color: #8a1c1c; }

@media (max-width: 900px) {
	.vm-single__layout { grid-template-columns: 1fr; }
	.vm-single__aside { position: static; }
	.vm-single__price { font-size: 1.3em; }
}
