/* TM Hostaway — styles de base, volontairement neutres.
   Le thème ajuste l'identité en redéfinissant les variables --tm-*. */
:root {
	--tm-radius: 12px;
	--tm-gap: 24px;
	--tm-text: #1d232b;
	--tm-muted: #5e6a76;
	--tm-line: #e3e7eb;
	--tm-surface: #ffffff;
	--tm-soft: #f5f7f8;
	--tm-accent: #1f4e79;
	--tm-accent-text: #ffffff;
}

.tm-primary { width: 100%; }
.tm-archive, .tm-property { color: var(--tm-text); padding-block: 32px 64px; }

/* Archive */
.tm-archive__title { margin: 0 0 var(--tm-gap); }
.tm-grid {
	list-style: none; margin: 0; padding: 0;
	display: grid; gap: var(--tm-gap);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.tm-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.tm-card__media { position: relative; aspect-ratio: 4 / 3; border-radius: var(--tm-radius); overflow: hidden; background: var(--tm-soft); }
.tm-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.tm-card__link:hover .tm-card__img { transform: scale(1.03); }
.tm-card__rating {
	position: absolute; top: 12px; right: 12px; padding: 4px 10px; border-radius: 999px;
	background: var(--tm-surface); font-size: 14px; font-weight: 600;
}
.tm-card__body { padding-top: 12px; }
.tm-card__location, .tm-card__facts { margin: 0; color: var(--tm-muted); font-size: 14px; }
.tm-card__title { margin: 4px 0; font-size: 18px; line-height: 1.3; }
.tm-card__badge {
	display: inline-block; margin: 8px 0 0; padding: 2px 8px; border-radius: 4px;
	background: var(--tm-soft); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
}

/* Fiche */
.tm-back { margin: 0 0 12px; font-size: 14px; }
.tm-property__title { margin: 0 0 4px; line-height: 1.2; }
.tm-property__meta { margin: 0 0 var(--tm-gap); color: var(--tm-muted); }

.tm-gallery {
	display: grid; gap: 8px; border-radius: var(--tm-radius); overflow: hidden;
	grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px;
}
.tm-gallery__item { margin: 0; background: var(--tm-soft); }
.tm-gallery__item--main { grid-row: span 2; }
.tm-gallery__item img, .tm-photos img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tm-photos { display: grid; gap: 8px; margin-top: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.tm-photos figure { margin: 0; aspect-ratio: 3 / 2; border-radius: 8px; overflow: hidden; }

.tm-more { margin-top: 12px; }
.tm-more summary { cursor: pointer; font-weight: 600; }

.tm-property__layout { display: grid; gap: 48px; margin-top: 32px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.tm-facts { margin: 0 0 16px; font-size: 18px; font-weight: 600; }
.tm-section { padding-block: 24px; border-top: 1px solid var(--tm-line); }
.tm-section h2 { margin: 0 0 16px; font-size: 22px; }
.tm-description p { max-width: 70ch; }

.tm-beds { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.tm-beds li { display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--tm-line); border-radius: var(--tm-radius); }
.tm-beds span { color: var(--tm-muted); }

.tm-amenities { margin: 0; padding: 0; list-style: none; columns: 2 220px; column-gap: var(--tm-gap); }
.tm-amenities li { padding: 6px 0; break-inside: avoid; }

.tm-info { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0; }
.tm-info dt { font-weight: 600; }
.tm-info dd { margin: 0; }
.tm-rules { margin-top: 12px; max-width: 70ch; color: var(--tm-muted); }

.tm-property__aside { position: sticky; top: 24px; display: grid; gap: 16px; }
.tm-book, .tm-group { padding: 24px; border: 1px solid var(--tm-line); border-radius: var(--tm-radius); background: var(--tm-surface); }
.tm-book { box-shadow: 0 6px 24px rgba(20, 30, 40, .08); }
.tm-book__title, .tm-group__title { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.tm-book__text { margin: 0 0 16px; color: var(--tm-muted); }
.tm-group ul { margin: 8px 0 0; padding-left: 18px; }
.tm-button {
	display: block; box-sizing: border-box; width: 100%;
	padding: 14px 20px !important; border: none !important; border-radius: 8px !important;
	text-align: center; font-weight: 700; font-size: 15px; line-height: 1.2;
	background: var(--tm-accent); color: var(--tm-accent-text); text-decoration: none;
}
.tm-button:hover, .tm-button:focus-visible { filter: brightness(1.1); color: var(--tm-accent-text); }

@media (max-width: 900px) {
	.tm-property__layout { grid-template-columns: 1fr; gap: 24px; }
	.tm-property__aside { position: static; }
}
@media (max-width: 700px) {
	.tm-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 120px; }
	.tm-gallery__item--main { grid-column: span 2; grid-row: auto; }
	.tm-gallery__item:nth-child(n+4) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.tm-card__img { transition: none; }
}

/* Sélecteur de dates et d'invités (assets/js/booking.js).
   !important sur les propriétés de boîte : le thème (Astra) impose son propre style de
   bouton global (padding 15px 30px, min-width) qui casse une grille de calendrier — voir
   TODAYSMANAGEMENT_CONTEXT.md. Sans ça, chaque jour hérite du padding du thème et le
   widget déborde de sa colonne de 340px. */
.tm-widget__guests { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 14px; }
.tm-widget__select { padding: 8px 10px; border: 1px solid var(--tm-line); border-radius: 8px; background: var(--tm-surface); }

.tm-cal { min-width: 0; }
.tm-cal__nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 8px; }
.tm-cal__prev, .tm-cal__next {
	all: unset; flex: none; box-sizing: border-box !important;
	width: 32px !important; height: 32px !important; min-width: 0 !important; padding: 0 !important;
	border: 1px solid var(--tm-line) !important; border-radius: 50% !important;
	background: var(--tm-surface); cursor: pointer; font-size: 16px; line-height: 1;
	display: flex; align-items: center; justify-content: center;
}
.tm-cal__prev:hover, .tm-cal__next:hover { background: var(--tm-soft); }
.tm-cal__title { flex: 1; margin: 0; font-size: 15px; font-weight: 700; text-align: center; }
.tm-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; min-width: 0; }
.tm-cal__dow { font-size: 11px; text-align: center; color: var(--tm-muted); padding-bottom: 6px; }
.tm-cal__day {
	all: unset; box-sizing: border-box !important;
	width: 100% !important; min-width: 0 !important; padding: 0 !important; margin: 0 !important;
	aspect-ratio: 1; border-radius: 6px; background: none; cursor: pointer;
	font-size: 13px; color: var(--tm-text); text-align: center;
	display: flex; align-items: center; justify-content: center;
}
.tm-cal__day:not(:disabled):not(.tm-cal__day--start):not(.tm-cal__day--end):hover { background: var(--tm-soft); }
.tm-cal__day--off { color: var(--tm-line); cursor: default; text-decoration: line-through; }
.tm-cal__day--start, .tm-cal__day--end { background: var(--tm-accent); color: var(--tm-accent-text); font-weight: 700; }
.tm-cal__day--range { background: var(--tm-soft); }
.tm-cal__hint { margin: 8px 0 0; font-size: 12px; color: var(--tm-muted); text-align: center; }

.tm-quote { margin: 16px 0; padding-top: 12px; border-top: 1px solid var(--tm-line); font-size: 14px; }
.tm-quote__row { display: flex; justify-content: space-between; padding: 3px 0; color: var(--tm-muted); }
.tm-quote__row--total { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--tm-line); font-weight: 700; color: var(--tm-text); font-size: 16px; }

.tm-widget__submit:disabled { opacity: .5; cursor: not-allowed; }
.tm-widget__message { min-height: 18px; margin: 8px 0 0; font-size: 13px; color: var(--tm-muted); }


