/* ST Site Manager — Cartes. Couleurs reprises de la palette du thème (variables WordPress), avec repli neutre. */
:root {
	--stsm-bg: var(--wp--preset--color--base, #ffffff);
	--stsm-surface: var(--wp--preset--color--base-2, #f6f6f4);
	--stsm-text: var(--wp--preset--color--contrast, #111111);
	--stsm-muted: var(--wp--preset--color--contrast-2, #5f5f5a);
	--stsm-border: var(--wp--preset--color--border, #e4e4df);
	--stsm-accent: var(--wp--preset--color--accent, #ffcc03);
	--stsm-on-accent: var(--wp--preset--color--on-accent, #111111);
	--stsm-ok: #1f7a3d;
	--stsm-warn: #9a5b00;
	--stsm-danger: #b42318;
	--stsm-radius: var(--wp--custom--stsm--radius, 14px);
	--stsm-heading-font: var(--wp--custom--stsm--heading-font, inherit);
	--stsm-button-font: var(--wp--custom--stsm--button-font, inherit);
	--stsm-button-radius: var(--wp--custom--stsm--button-radius, 999px);
	--stsm-radius-sm: 10px;
	--stsm-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .04);
	--stsm-gap: clamp(14px, 2vw, 22px);
}

/* ---------- Grille ---------- */
.stsm-cards {
	display: grid;
	grid-template-columns: repeat(var(--stsm-cols, 3), minmax(0, 1fr));
	gap: var(--stsm-gap);
	align-items: stretch;
	margin-block: var(--wp--style--block-gap, 1.5rem);
}
.stsm-cards.stsm-gap--small { --stsm-gap: 12px; }
.stsm-cards.stsm-gap--large { --stsm-gap: clamp(20px, 3vw, 34px); }
.stsm-cards > * { min-width: 0; margin: 0 !important; }

/* Tailles */
.stsm-size--large, .stsm-size--horizontal { grid-column: span 2; }
.stsm-size--vertical { grid-row: span 2; }
.stsm-size--full { grid-column: 1 / -1; }
.stsm-cards--cols-1 > * { grid-column: 1 / -1; grid-row: auto; }

@media (max-width: 1024px) {
	.stsm-cards--cols-3, .stsm-cards--cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.stsm-cards--cols-3 > .stsm-size--large, .stsm-cards--cols-4 > .stsm-size--large,
	.stsm-cards--cols-3 > .stsm-size--horizontal, .stsm-cards--cols-4 > .stsm-size--horizontal { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
	.stsm-cards { grid-template-columns: minmax(0, 1fr) !important; }
	.stsm-cards > * { grid-column: 1 / -1 !important; grid-row: auto !important; }
}

/* ---------- Carte ---------- */
.stsm-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: clamp(18px, 2.2vw, 26px);
	background: var(--stsm-bg);
	color: var(--stsm-text);
	border: 1px solid var(--stsm-border);
	border-radius: var(--stsm-radius);
	box-shadow: var(--stsm-shadow);
	transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
	box-sizing: border-box;
	height: 100%;
}
.stsm-style--outline { background: transparent; box-shadow: none; }
.stsm-style--muted { background: var(--stsm-surface); box-shadow: none; }
.stsm-style--accent { border-color: var(--stsm-accent); border-width: 2px; }
.stsm-card.is-clickable:hover, .stsm-card.is-clickable:focus-within {
	border-color: var(--stsm-text);
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, .05), 0 14px 32px rgba(0, 0, 0, .07);
}
.stsm-card.is-clickable .stsm-card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.stsm-size--small { padding: 16px; gap: 10px; }
.stsm-size--small .stsm-card__desc { font-size: .92em; }

.stsm-size--horizontal { flex-direction: row; align-items: flex-start; }
.stsm-size--horizontal .stsm-card__media--image { flex: 0 0 42%; margin: calc(-1 * clamp(18px, 2.2vw, 26px)); margin-right: 0; align-self: stretch; }
.stsm-size--horizontal .stsm-card__media--image img { height: 100%; border-radius: var(--stsm-radius) 0 0 var(--stsm-radius); }
@media (max-width: 640px) {
	.stsm-size--horizontal { flex-direction: column; }
	.stsm-size--horizontal .stsm-card__media--image { margin: calc(-1 * clamp(18px, 2.2vw, 26px)); margin-bottom: 0; flex-basis: auto; }
	.stsm-size--horizontal .stsm-card__media--image img { border-radius: var(--stsm-radius) var(--stsm-radius) 0 0; }
}

.stsm-card__media--icon {
	width: 52px; height: 52px;
	display: grid; place-items: center;
	border-radius: 12px;
	background: var(--stsm-surface);
	color: var(--stsm-text);
	flex: 0 0 auto;
}
.stsm-style--muted .stsm-card__media--icon { background: var(--stsm-bg); }
.stsm-size--large .stsm-card__media--icon, .stsm-size--full .stsm-card__media--icon { width: 60px; height: 60px; }
.stsm-card__media--image { margin: calc(-1 * clamp(18px, 2.2vw, 26px)); margin-bottom: 0; }
.stsm-card__media--image img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--stsm-radius) var(--stsm-radius) 0 0; }
.stsm-size--vertical .stsm-card__media--image img { aspect-ratio: 4 / 5; }
.stsm-size--small .stsm-card__media--image { margin: -16px; margin-bottom: 0; }

.stsm-card__content { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-width: 0; }
.stsm-card__eyebrow { margin: 0; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--stsm-muted); }
.stsm-card__title { margin: 0; font-family: var(--stsm-heading-font); font-size: clamp(1.15rem, 1.4vw, 1.35rem); line-height: 1.2; font-weight: var(--wp--custom--stsm--heading-weight, 400); }
.stsm-booking__title, .stsm-section-title, .stsm-account__head h2, .stsm-stat__value, .stsm-price-total strong { font-family: var(--stsm-heading-font); font-weight: 400; }
.stsm-size--large .stsm-card__title, .stsm-size--full .stsm-card__title { font-size: clamp(1.25rem, 1.9vw, 1.6rem); }
.stsm-card__desc { color: var(--stsm-muted); line-height: 1.55; }
.stsm-card__desc p { margin: 0 0 .5em; }
.stsm-card__body { display: flex; flex-direction: column; gap: 10px; }
.stsm-card__inner > :first-child { margin-top: 0; }
.stsm-card__inner > :last-child { margin-bottom: 0; }
.stsm-card__actions { margin-top: auto; padding-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; }
.stsm-card__more { padding-top: 6px; color: var(--stsm-muted); }
.stsm-muted { color: var(--stsm-muted); margin: 0; }
.stsm-todo { background: #fff4c2; color: #111; padding: 0 .25em; border-radius: 4px; }

/* ---------- Boutons ---------- */
.stsm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	box-sizing: border-box; min-height: 44px; padding: 10px 18px;
	border-radius: var(--stsm-button-radius);
	border: 1px solid var(--stsm-text);
	background: transparent; color: var(--stsm-text);
	font: inherit; font-family: var(--stsm-button-font); font-weight: 600; font-size: .95rem; line-height: 1.2;
	text-decoration: none; cursor: pointer;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.stsm-btn:hover { background: var(--stsm-text); color: var(--stsm-bg); }
.stsm-btn:focus-visible, .stsm-card a:focus-visible, .stsm-card button:focus-visible { outline: 3px solid var(--stsm-accent); outline-offset: 2px; }
.stsm-btn--primary { background: var(--stsm-accent); border-color: var(--stsm-accent); color: var(--stsm-on-accent); }
.stsm-btn--primary:hover { background: var(--stsm-text); border-color: var(--stsm-text); color: var(--stsm-bg); }
.stsm-btn--ghost { border-color: var(--stsm-border); }
.stsm-btn--danger { color: var(--stsm-danger); }
.stsm-btn--danger:hover { background: var(--stsm-danger); border-color: var(--stsm-danger); color: #fff; }
.stsm-btn[disabled] { opacity: .5; cursor: not-allowed; }
.stsm-btn__icon { flex: 0 0 auto; }
.stsm-card__link { position: static; }

/* ---------- Contenus ---------- */
.stsm-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.stsm-list__item { border-top: 1px solid var(--stsm-border); }
.stsm-list__item:first-child { border-top: 0; }
.stsm-list__item a { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; color: inherit; text-decoration: none; }
.stsm-list__item a:hover .stsm-list__title { text-decoration: underline; }
.stsm-list__title { font-weight: 600; }
.stsm-list__meta { color: var(--stsm-muted); white-space: nowrap; font-size: .92em; }
.stsm-list--plain { list-style: disc; padding-left: 1.2em; }
.stsm-list--plain li { padding: 3px 0; }

.stsm-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stsm-facts > div { background: var(--stsm-surface); border-radius: var(--stsm-radius-sm); padding: 10px 12px; }
.stsm-facts dt { font-size: .78rem; color: var(--stsm-muted); }
.stsm-facts dd { margin: 2px 0 0; font-weight: 600; }

.stsm-slots-preview { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.stsm-slots-preview li { display: flex; flex-direction: column; gap: 6px; }
.stsm-slots-preview__day { font-weight: 600; text-transform: capitalize; }
.stsm-slots-preview__times { display: flex; flex-wrap: wrap; gap: 6px; }
.stsm-chip { position: relative; z-index: 1; display: inline-block; padding: 6px 12px; border: 1px solid var(--stsm-border); border-radius: 999px; color: inherit; text-decoration: none; font-size: .9rem; background: var(--stsm-bg); }
.stsm-chip:hover, .stsm-chip.is-selected { border-color: var(--stsm-text); }
.stsm-chip.is-selected { box-shadow: inset 0 0 0 1px var(--stsm-text); }

.stsm-faq details { border-top: 1px solid var(--stsm-border); padding: 10px 0; }
.stsm-faq details:first-child { border-top: 0; }
.stsm-faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.stsm-faq summary::after { content: "+"; font-weight: 400; }
.stsm-faq details[open] summary::after { content: "−"; }
.stsm-faq details div { color: var(--stsm-muted); padding-top: 6px; }

.stsm-quotes { display: grid; gap: 12px; }
.stsm-quote { margin: 0; padding: 14px 16px; background: var(--stsm-surface); border-radius: var(--stsm-radius-sm); }
.stsm-quote blockquote { margin: 0 0 8px; font-style: italic; }
.stsm-quote figcaption { font-size: .9rem; color: var(--stsm-muted); }

.stsm-pricing { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.stsm-pricing li { padding: 12px 14px; border: 1px solid var(--stsm-border); border-radius: var(--stsm-radius-sm); }
.stsm-pricing__head { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.stsm-pricing p { margin: 4px 0 0; color: var(--stsm-muted); font-size: .92rem; }

.stsm-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.stsm-gallery__item { position: relative; z-index: 1; display: block; border-radius: var(--stsm-radius-sm); overflow: hidden; }
.stsm-gallery__item img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .3s ease; }
.stsm-gallery__item:hover img { transform: scale(1.04); }

.stsm-stat { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.stsm-stat__value { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; line-height: 1; }
.stsm-stat__suffix { color: var(--stsm-muted); }
.stsm-address { font-style: normal; line-height: 1.6; }

.stsm-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--stsm-radius-sm); overflow: hidden; background: #000; }
.stsm-video iframe, .stsm-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.stsm-placeholder { padding: 24px; border: 1px dashed var(--stsm-border); border-radius: var(--stsm-radius); color: var(--stsm-muted); text-align: center; }
.stsm-section-title { margin: 28px 0 12px; font-size: 1.1rem; }

/* ---------- Fenêtre modale ---------- */
.stsm-modal {
	width: min(720px, calc(100vw - 24px));
	max-height: calc(100vh - 40px);
	padding: 0;
	border: 1px solid var(--stsm-border);
	border-radius: var(--stsm-radius);
	background: var(--stsm-bg); color: var(--stsm-text);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.stsm-modal::backdrop { background: rgba(10, 10, 10, .45); backdrop-filter: blur(2px); }
.stsm-modal__body { padding: clamp(20px, 3vw, 32px); overflow: auto; }
.stsm-modal__close { position: sticky; float: right; top: 8px; margin: 8px 8px 0 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--stsm-border); background: var(--stsm-bg); color: var(--stsm-text); font-size: 22px; line-height: 1; cursor: pointer; z-index: 2; }
.stsm-lightbox img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; border-radius: var(--stsm-radius-sm); }

/* ---------- Formulaires ---------- */
.stsm-form { display: flex; flex-direction: column; gap: 14px; }
.stsm-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; }
.stsm-form input:not([type]), .stsm-form input[type=text], .stsm-form input[type=email], .stsm-form input[type=tel], .stsm-form input[type=number], .stsm-form select, .stsm-form textarea {
	width: 100%; box-sizing: border-box;
	padding: 11px 13px; min-height: 44px;
	border: 1px solid var(--stsm-border); border-radius: var(--stsm-radius-sm);
	background: var(--stsm-bg); color: var(--stsm-text);
	font: inherit; font-weight: 400;
}
.stsm-form input:focus, .stsm-form select:focus, .stsm-form textarea:focus { outline: none; border-color: var(--stsm-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--stsm-accent) 55%, transparent); }
.stsm-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stsm-form .stsm-check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; }
.stsm-form .stsm-check input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--stsm-text); }
.stsm-form__msg { margin: 0; min-height: 1.2em; }
.stsm-form__msg.is-error { color: var(--stsm-danger); }
.stsm-form__msg.is-ok { color: var(--stsm-ok); }
.stsm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.stsm-notice { padding: 12px 16px; border-radius: var(--stsm-radius-sm); border: 1px solid var(--stsm-border); border-left-width: 4px; margin: 0 0 18px; background: var(--stsm-bg); }
.stsm-notice--success { border-left-color: var(--stsm-ok); }
.stsm-notice--info { border-left-color: var(--stsm-text); }
.stsm-notice--warning { border-left-color: var(--stsm-warn); }
.stsm-notice--error { border-left-color: var(--stsm-danger); }

.stsm-status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; text-transform: none; letter-spacing: 0; border: 1px solid currentColor; }
.stsm-status.is-ok { color: var(--stsm-ok); }
.stsm-status.is-pending { color: var(--stsm-warn); }
.stsm-status.is-cancelled { color: var(--stsm-muted); }

.stsm-legal-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9rem; }
.stsm-legal-links a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
	.stsm-card, .stsm-gallery__item img { transition: none; }
	.stsm-card.is-clickable:hover { transform: none; }
}
