/*
Theme Name: La Tarabelle
Theme URI: https://chambre-hote-lozere.com/
Author: La Tarabelle
Description: Thème sur mesure pour les chambres d'hôtes et le gîte de groupe La Tarabelle, en Lozère.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: tarabelle
*/

/* ---------- Tokens (dark mode overrides the presets) ---------- */
:root {
  --tb-radius: 12px;
  --tb-pill: 999px;
  --tb-shadow: 0 1px 2px rgb(36 39 43 / .06), 0 12px 32px -12px rgb(36 39 43 / .18);
  --tb-header-h: 76px;
  --tb-ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:root {
    color-scheme: dark;
    --wp--preset--color--base: #141615;
    --wp--preset--color--surface: #1C1F1E;
    --wp--preset--color--contrast: #ECEEEA;
    --wp--preset--color--muted: #A3AAA4;
    --wp--preset--color--line: #2E3331;
    --wp--preset--color--accent: #7CC495;
    --wp--preset--color--on-accent: #141615;
    --tb-shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px -12px rgb(0 0 0 / .5);
  }
}

html { scroll-padding-top: calc(var(--tb-header-h) + 1rem); -webkit-text-size-adjust: 100%; }
body { background: var(--wp--preset--color--base); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
.wp-site-blocks { min-height: 100dvh; display: flex; flex-direction: column; }
.wp-site-blocks > main { flex: 1; }
.wp-site-blocks > * { margin-block-start: 0; }
img { height: auto; }
p { max-width: 65ch; }
:where(.has-text-align-center) p, p.has-text-align-center { margin-inline: auto; }
::selection { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent); }
:focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; border-radius: 4px; }
.screen-reader-text:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header-wrap { position: relative; z-index: 20; background: #24272B; }
.site-header {
  min-height: var(--tb-header-h);
  max-width: 1280px; margin-inline: auto;
  padding: .75rem clamp(1rem, 4vw, 2.5rem);
  gap: 2rem;
}
.site-header .wp-block-site-logo img { width: clamp(140px, 14vw, 180px); height: auto; display: block; }
body:has(.hero) .site-header-wrap {
  position: absolute; inset: 0 0 auto 0;
  background: linear-gradient(to bottom, rgb(20 22 21 / .62), rgb(20 22 21 / 0));
}
.site-nav, .site-nav a { color: #F6F7F5; }
.site-nav .wp-block-navigation-item__content { font-weight: 500; font-size: 1rem; padding: .35rem .15rem; text-decoration: none; white-space: nowrap; }
.site-nav .wp-block-navigation__container { gap: clamp(.9rem, 1.6vw, 1.6rem); }
.site-nav .wp-block-navigation-item__content:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.site-nav .current-menu-item > .wp-block-navigation-item__content { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.site-nav .wp-block-navigation__submenu-container {
  background: #24272B !important; color: #F6F7F5 !important;
  border: 1px solid rgb(255 255 255 / .12) !important; border-radius: var(--tb-radius); padding: .5rem 0; min-width: 210px !important;
  box-shadow: 0 18px 40px -16px rgb(0 0 0 / .55);
}
.site-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .55rem 1.1rem; }
.site-nav .wp-block-navigation__responsive-container.is-menu-open { background: #24272B !important; color: #F6F7F5 !important; padding: 1.5rem; }
.site-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.25rem; }
.site-nav .wp-block-navigation__responsive-container-open svg, .site-nav .wp-block-navigation__responsive-container-close svg { width: 30px; height: 30px; }

/* ---------- Buttons ---------- */
.wp-element-button, .wp-block-button__link, .tb-btn {
  display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap;
  border-radius: var(--tb-pill); text-decoration: none;
  transition: transform .2s var(--tb-ease), background-color .2s var(--tb-ease), box-shadow .2s var(--tb-ease);
}
.wp-element-button:hover, .wp-block-button__link:hover, .tb-btn:hover { box-shadow: var(--tb-shadow); }
.wp-element-button:active, .wp-block-button__link:active, .tb-btn:active { transform: translateY(1px) scale(.98); }
.is-style-outline > .wp-block-button__link, .tb-btn--ghost {
  background: transparent !important; color: var(--wp--preset--color--contrast) !important;
  border: 1.5px solid currentColor !important; padding: calc(.85rem - 1.5px) calc(1.6rem - 1.5px);
}
.hero .is-style-outline > .wp-block-button__link { color: #F6F7F5 !important; background: rgb(20 22 21 / .25) !important; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tb-btn { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent); padding: .85rem 1.6rem; font-weight: 500; border: 0; cursor: pointer; font: inherit; font-weight: 500; }

/* ---------- Hero (core/cover with .hero) ---------- */
.wp-block-cover.hero {
  min-height: min(92svh, 860px) !important;
  padding: calc(var(--tb-header-h) + 2rem) clamp(1rem, 4vw, 2.5rem) clamp(2.5rem, 7vh, 4.5rem);
  align-items: flex-end;
}
.wp-block-cover.hero.hero--room { min-height: min(72svh, 680px) !important; }
.wp-block-cover.hero .wp-block-cover__inner-container { max-width: 1280px; margin-inline: auto; width: 100%; color: #F6F7F5; }
.wp-block-cover.hero .wp-block-cover__background { background: linear-gradient(180deg, rgb(20 22 21 / .15) 30%, rgb(20 22 21 / .72) 100%) !important; opacity: 1 !important; }
.hero h1, .hero p { color: #F6F7F5; max-width: 18ch; }
.hero p { max-width: 46ch; font-size: var(--wp--preset--font-size--large); margin-top: 1rem; }
.hero .wp-block-buttons { margin-top: 2rem; }

/* ---------- Sections ---------- */
.section { padding-block: var(--wp--preset--spacing--60); }
.section--surface { background: var(--wp--preset--color--surface); }
.section--tight { padding-block: var(--wp--preset--spacing--50); }
.lede { font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--muted); max-width: 52ch; }
.section h2 + p, .section h2 + .lede { margin-top: 1rem; }
.split { gap: clamp(2rem, 5vw, 5rem) !important; align-items: center !important; }
.split .wp-block-image img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.split--land .wp-block-image img { aspect-ratio: 4 / 3; }
.text-link { font-weight: 500; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; color: var(--wp--preset--color--accent); }
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.text-link svg { width: 18px; height: 18px; transition: transform .2s var(--tb-ease); }
.text-link:hover svg { transform: translateX(3px); }

/* ---------- Rooms grid (shortcode) ---------- */
.rooms { display: grid; gap: 1.25rem; grid-template-columns: repeat(6, 1fr); margin-top: 2.5rem; }
.room-card { position: relative; grid-column: span 2; display: flex; flex-direction: column; gap: .75rem; text-decoration: none; color: inherit; }
.room-card:nth-child(1), .room-card:nth-child(2) { grid-column: span 3; }
.room-card__img { overflow: hidden; border-radius: var(--tb-radius); aspect-ratio: 4 / 3; background: var(--wp--preset--color--line); }
.room-card:nth-child(1) .room-card__img, .room-card:nth-child(2) .room-card__img { aspect-ratio: 16 / 10; }
.room-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--tb-ease); }
.room-card:hover .room-card__img img { transform: scale(1.03); }
.room-card__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.room-card__name { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: var(--wp--preset--font-size--x-large); letter-spacing: -.01em; }
.room-card__price { color: var(--wp--preset--color--muted); white-space: nowrap; }
.room-card__price strong { color: var(--wp--preset--color--contrast); font-weight: 700; }
.room-card__meta { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); margin: 0; }
@media (max-width: 900px) { .rooms { grid-template-columns: 1fr 1fr; } .room-card, .room-card:nth-child(1), .room-card:nth-child(2) { grid-column: span 1; } .room-card:nth-child(1) { grid-column: span 2; } }
@media (max-width: 600px) { .rooms { grid-template-columns: 1fr; } .room-card:nth-child(1) { grid-column: span 1; } }

/* ---------- Gîte band (full-bleed cover, not hero) ---------- */
.wp-block-cover.band { min-height: 560px !important; padding: var(--wp--preset--spacing--60) clamp(1rem, 4vw, 2.5rem); align-items: flex-end; }
.wp-block-cover.band .wp-block-cover__background { background: linear-gradient(90deg, rgb(20 22 21 / .78) 0%, rgb(20 22 21 / .2) 70%) !important; opacity: 1 !important; }
.wp-block-cover.band .wp-block-cover__inner-container { max-width: 1280px; margin-inline: auto; width: 100%; }
.band h2, .band p, .band li { color: #F6F7F5; }
.band p { max-width: 44ch; }
.band .facts { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; }

/* ---------- Region list ---------- */
.region { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 2.5rem; border-top: 1px solid var(--wp--preset--color--line); }
.region > div { padding: 1.5rem 1.25rem 0 0; }
.region h3 { margin: 0 0 .4rem; }
.region p { color: var(--wp--preset--color--muted); margin: 0; font-size: var(--wp--preset--font-size--small); }
@media (max-width: 900px) { .region { grid-template-columns: 1fr 1fr; row-gap: 1rem; } }
@media (max-width: 520px) { .region { grid-template-columns: 1fr; } }

/* ---------- Reviews ---------- */
.reviews { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); margin-top: 2.5rem; align-items: start; }
.review { margin: 0; }
.review blockquote { margin: 0; font-family: var(--wp--preset--font-family--display); font-weight: 500; font-size: var(--wp--preset--font-size--x-large); line-height: 1.35; letter-spacing: -.01em; }
.review:first-child blockquote { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.review figcaption { margin-top: 1rem; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); }
.review .stars { display: inline-flex; gap: 2px; color: var(--wp--preset--color--accent); margin-bottom: .75rem; }
.review .stars svg { width: 18px; height: 18px; }
.reviews-links { display: flex; flex-wrap: wrap; gap: .75rem 2rem; margin-top: 2.5rem; }
@media (max-width: 800px) { .reviews { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */
.mosaic { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(180px, 26vw)); gap: .75rem; margin-top: 2.5rem; }
.mosaic figure { margin: 0; overflow: hidden; border-radius: var(--tb-radius); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mosaic figure:first-child { grid-row: span 2; }
.mosaic figure:nth-child(4) { grid-column: span 2; }
@media (max-width: 700px) { .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: 42vw; } .mosaic figure:first-child { grid-column: span 2; grid-row: auto; } .mosaic figure:nth-child(4) { grid-column: span 2; } }

/* ---------- Room page ---------- */
.room-photos { display: grid; grid-template-columns: 3fr 2fr; gap: .75rem; }
.room-photos figure { margin: 0; }
.room-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--tb-radius); display: block; }
.room-photos figure:last-child img { aspect-ratio: 3 / 4; height: 100%; }
@media (max-width: 700px) { .room-photos { grid-template-columns: 1fr; } .room-photos figure:last-child img { aspect-ratio: 4 / 3; } }
.room-detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.price-box { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: var(--tb-radius); padding: 1.75rem; position: sticky; top: 1.5rem; }
.price-box__amount { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: clamp(2.25rem, 4vw, 3rem); line-height: 1; letter-spacing: -.02em; }
.price-box__unit { color: var(--wp--preset--color--muted); margin: .5rem 0 1.5rem; }
.price-box ul { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .5rem; }
.price-box li { display: flex; gap: .6rem; align-items: center; }
.price-box li svg { width: 20px; height: 20px; color: var(--wp--preset--color--accent); flex: none; }
.price-box .tb-btn { width: 100%; justify-content: center; }
.price-box__note { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); margin: 1rem 0 0; }
@media (max-width: 860px) { .room-detail { grid-template-columns: 1fr; } .price-box { position: static; } }
.other-rooms { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; padding: 0; list-style: none; }
.other-rooms a { display: inline-block; padding: .5rem 1rem; border: 1px solid var(--wp--preset--color--line); border-radius: var(--tb-pill); text-decoration: none; color: var(--wp--preset--color--contrast); }
.other-rooms a:hover { border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--accent); }

/* ---------- Pricing page ---------- */
.price-groups { display: grid; gap: 3rem; margin-top: 2.5rem; }
.price-group h2 { font-size: var(--wp--preset--font-size--x-large); margin-bottom: 1rem; }
.price-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.price-row { display: grid; grid-template-columns: 88px 1fr; gap: 1rem; align-items: center; padding: .75rem; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: var(--tb-radius); text-decoration: none; color: inherit; }
.price-row img { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; display: block; }
.price-row__name { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: 1.125rem; display: block; }
.price-row__price { font-weight: 700; }
.price-row__price span { font-weight: 400; color: var(--wp--preset--color--muted); }
.price-row__meta { display: block; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
a.price-row:hover { border-color: var(--wp--preset--color--accent); }
.notice { display: inline-flex; gap: .6rem; align-items: center; padding: .6rem 1rem; border-radius: var(--tb-pill); background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); font-weight: 500; }
.notice svg { width: 20px; height: 20px; color: var(--wp--preset--color--accent); }

/* ---------- Contact form ---------- */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; margin-top: 2.5rem; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.tb-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.tb-field { display: grid; gap: .5rem; }
.tb-field--full { grid-column: 1 / -1; }
@media (max-width: 600px) { .tb-form { grid-template-columns: 1fr; } }
.tb-field label { font-weight: 500; }
.tb-field input, .tb-field textarea {
  font: inherit; color: var(--wp--preset--color--contrast); background: var(--wp--preset--color--surface);
  border: 1.5px solid #8A918C; border-radius: 8px; padding: .8rem .95rem; width: 100%; box-sizing: border-box;
}
.tb-field textarea { min-height: 170px; resize: vertical; }
.tb-field input::placeholder, .tb-field textarea::placeholder { color: var(--wp--preset--color--muted); opacity: 1; }
.tb-field input:focus, .tb-field textarea:focus { outline: none; border-color: var(--wp--preset--color--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--accent) 25%, transparent); }
.tb-field .help { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); margin: 0; }
.tb-field .error { font-size: var(--wp--preset--font-size--small); color: #B42318; margin: 0; font-weight: 500; }
@media (prefers-color-scheme: dark) { .tb-field .error { color: #FDA29B; } .tb-field input, .tb-field textarea { border-color: #6B726D; } }
.tb-field.has-error input, .tb-field.has-error textarea { border-color: #B42318; }
.tb-hp { position: absolute !important; left: -9999px !important; }
.tb-form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.tb-form__foot p { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); margin: 0; max-width: 46ch; }
.tb-alert { grid-column: 1 / -1; padding: 1rem 1.25rem; border-radius: var(--tb-radius); font-weight: 500; border: 1px solid; }
.tb-alert--ok { background: color-mix(in srgb, var(--wp--preset--color--accent) 10%, var(--wp--preset--color--surface)); border-color: var(--wp--preset--color--accent); }
.tb-alert--err { background: color-mix(in srgb, #B42318 8%, var(--wp--preset--color--surface)); border-color: #B42318; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; }
.contact-list li { display: grid; grid-template-columns: 24px 1fr; gap: .9rem; align-items: start; }
.contact-list svg { width: 24px; height: 24px; color: var(--wp--preset--color--accent); margin-top: 2px; }
.contact-list strong { display: block; font-weight: 500; }
.contact-list a { color: var(--wp--preset--color--contrast); }

/* ---------- Article ---------- */
.article .wp-block-post-title { max-width: 22ch; }
.article__meta { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); gap: .25rem 1rem; }
.article .wp-block-post-content h2 { font-size: var(--wp--preset--font-size--x-large); margin-top: 2.5rem; }
.article .wp-block-post-content h3 { font-size: var(--wp--preset--font-size--large); margin-top: 1.75rem; }
.article__back { margin-top: 3rem; }
.post-list .wp-block-post-template { gap: 3rem 2rem; }
.post-list .wp-block-post-title a { text-decoration: none; color: inherit; }
.post-list .wp-block-post-title a:hover { text-decoration: underline; }
.post-list .wp-block-post-excerpt { color: var(--wp--preset--color--muted); }

/* ---------- Legal pages ---------- */
.legal { padding-block: var(--wp--preset--spacing--60); }
.legal h2 { font-size: var(--wp--preset--font-size--x-large); margin-top: 2.5rem; }
.legal mark { background: #FFF3C4; color: #24272B; padding: 0 .25em; border-radius: 4px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--wp--preset--color--surface); border-top: 1px solid var(--wp--preset--color--line); margin-top: 0; }
.footer { max-width: 1280px; margin-inline: auto; padding: var(--wp--preset--spacing--60) clamp(1rem, 4vw, 2.5rem) 2rem; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer__brand { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: 1.75rem; letter-spacing: -.02em; margin: 0 0 .5rem; }
.footer p { margin: 0; color: var(--wp--preset--color--muted); }
.footer h2 { font-family: var(--wp--preset--font-family--body); font-size: 1rem; font-weight: 700; letter-spacing: 0; margin: 0 0 .9rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer button.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--wp--preset--color--contrast); cursor: pointer; text-align: left; }
.footer button.linklike:hover { text-decoration: underline; }
.footer__social { display: flex; gap: .75rem; margin-top: 1.25rem; }
.footer__social a { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--wp--preset--color--line); border-radius: var(--tb-pill); }
.footer__social svg { width: 22px; height: 22px; }
.footer__bottom { grid-column: 1 / -1; border-top: 1px solid var(--wp--preset--color--line); padding-top: 1.5rem; font-size: var(--wp--preset--font-size--small); }
@media (max-width: 900px) { .footer { grid-template-columns: 1fr 1fr; } .footer > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer { grid-template-columns: 1fr; } }

/* ---------- WhatsApp button ---------- */
.wa-fab { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 30; width: 56px; height: 56px; border-radius: var(--tb-pill); display: grid; place-items: center; background: var(--wp--preset--color--accent); color: var(--wp--preset--color--on-accent); box-shadow: var(--tb-shadow); transition: transform .2s var(--tb-ease); }
.wa-fab:hover { transform: translateY(-2px); }
.wa-fab svg { width: 28px; height: 28px; }

/* ---------- Consent banner ---------- */
.tb-consent { position: fixed; z-index: 40; left: 1rem; right: 1rem; bottom: 1rem; max-width: 560px; background: var(--wp--preset--color--surface); color: var(--wp--preset--color--contrast); border: 1px solid var(--wp--preset--color--line); border-radius: var(--tb-radius); box-shadow: 0 24px 60px -20px rgb(0 0 0 / .45); padding: 1.25rem 1.25rem 1rem; }
.tb-consent[hidden] { display: none; }
.tb-consent h2 { font-size: 1.125rem; margin: 0 0 .5rem; }
.tb-consent p { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); margin: 0 0 1rem; }
.tb-consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.tb-consent__actions .tb-btn { justify-content: center; padding: .7rem 1rem; }
body:has(.tb-consent:not([hidden])) .wa-fab { bottom: 12rem; }
@media (min-width: 640px) { body:has(.tb-consent:not([hidden])) .wa-fab { bottom: 1.25rem; } }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  .room-card:hover .room-card__img img { transform: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 781px) {
  .split { flex-direction: column; }
  .split.is-reversed-mobile { flex-direction: column-reverse; }
  .hero h1 { max-width: none; }
  .section { padding-block: var(--wp--preset--spacing--50); }
}

/* ---------- Layout helpers ---------- */
.region > *, .mosaic > *, .room-photos > *, .rooms > *, .room-detail > *, .trio > * { margin-block: 0 !important; }
.trio { gap: clamp(1rem, 3vw, 2.5rem) !important; align-items: flex-start !important; }
.trio .wp-block-image img { width: 100%; object-fit: cover; aspect-ratio: 3 / 4; }
.trio .is-offset { margin-top: clamp(0rem, 8vw, 7rem) !important; }
.band ul { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; color: #F6F7F5; font-weight: 500; }
.band h2 { max-width: 16ch; }
.room-detail__text > * + * { margin-top: 1.25rem; }
.room-detail__text .room-photos { margin-top: 2.5rem !important; }
.legal p, .legal li { color: var(--wp--preset--color--contrast); }
@media (max-width: 781px) { .trio .is-offset { margin-top: 0 !important; } .trio > .wp-block-column:nth-child(3) { display: none; } }
body.admin-bar:has(.hero) .site-header-wrap { top: var(--wp-admin--admin-bar--height, 32px); }

/* ===== v1.1 : alignment, gradients, motion (MOTION_INTENSITY 5) ===== */
.section.is-layout-constrained > p, .legal.is-layout-constrained > p { margin-left: max(0px, calc((100% - 1280px) / 2)) !important; margin-right: auto !important; }
.legal.is-layout-constrained > p { margin-left: max(0px, calc((100% - 720px) / 2)) !important; }
.text-link:not(:has(svg))::after { content: "→"; transition: transform .2s var(--tb-ease); }
.text-link:not(:has(svg)):hover::after { transform: translateX(3px); }

/* Gradients drawn from the photos: basalt grey into Aubrac pasture green. */
.section--surface { background: linear-gradient(180deg, var(--wp--preset--color--surface) 0%, color-mix(in srgb, var(--wp--preset--color--accent) 7%, var(--wp--preset--color--surface)) 100%); }
.site-footer { background: linear-gradient(180deg, color-mix(in srgb, var(--wp--preset--color--accent) 6%, var(--wp--preset--color--surface)) 0%, var(--wp--preset--color--surface) 55%); }
.wp-block-cover.hero .wp-block-cover__background { background: linear-gradient(180deg, rgb(20 22 21 / .35) 0%, rgb(20 22 21 / 0) 28%, rgb(20 22 21 / .1) 55%, rgb(18 38 26 / .78) 100%) !important; }

/* Scroll tour: pinned stage, frames cross-fade as you scroll. */
.tour { position: relative; background: #141615; }
.tour__sticky { position: relative; }
.tour__frame { margin: 0; position: relative; }
.tour__frame img { width: 100%; height: 70svh; object-fit: cover; display: block; }
.tour__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 6rem clamp(1rem, 4vw, 2.5rem) clamp(2rem, 6vh, 3.5rem); background: linear-gradient(180deg, rgb(20 22 21 / 0), rgb(20 22 21 / .82)); color: #F6F7F5; }
.tour__cap > * { max-width: 1280px; margin-inline: auto; }
.tour__title { color: #F6F7F5; font-size: var(--wp--preset--font-size--xx-large); margin-bottom: .5rem; }
.tour__cap p { color: #F6F7F5; font-size: var(--wp--preset--font-size--large); margin-top: 0; margin-bottom: 0; }
.tour__cap .tb-btn { margin-top: 1.5rem; }
.tour__cap .tb-btn { margin-left: max(0px, calc((100% - 1280px) / 2)); }

@media (prefers-reduced-motion: no-preference) {
  .hero .wp-block-cover__image-background { animation: tb-settle 2.4s cubic-bezier(.16,1,.3,1) both; }
  .hero h1 { animation: tb-rise .9s .1s var(--tb-ease) both; }
  .hero p { animation: tb-rise .9s .25s var(--tb-ease) both; }
  .hero .wp-block-buttons { animation: tb-rise .9s .4s var(--tb-ease) both; }

  @supports (animation-timeline: view()) {
    .tour { height: 420svh; view-timeline-name: --tour; }
    .tour__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
    .tour__frame { position: absolute; inset: 0; }
    .tour__frame img { height: 100%; animation: linear both; animation-timeline: --tour; animation-range: contain 0% contain 100%; }
    .tour__cap { animation: linear both; animation-timeline: --tour; animation-range: contain 0% contain 100%; }
    .tour__frame--0 img { animation-name: tour0; } .tour__frame--0 .tour__cap { animation-name: cap0; }
    .tour__frame--1 img { animation-name: tour1; } .tour__frame--1 .tour__cap { animation-name: cap1; }
    .tour__frame--2 img { animation-name: tour2; } .tour__frame--2 .tour__cap { animation-name: cap2; }
    .tour__frame--3 img { animation-name: tour3; } .tour__frame--3 .tour__cap { animation-name: cap3; }
    .tour__frame--1, .tour__frame--2, .tour__frame--3 { pointer-events: none; }

    .section h2, .room-card, .review, .mosaic figure, .region > div, .price-box, .room-photos figure {
      animation: tb-reveal linear both; animation-timeline: view(); animation-range: entry 5% entry 55%;
    }
  }
}
@keyframes tb-settle { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes tb-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes tb-reveal { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes tour0 { 0% { opacity: 1; transform: scale(1.14); } 22% { opacity: 1; transform: scale(1.02); } 28%, 100% { opacity: 0; transform: scale(1); } }
@keyframes tour1 { 0%, 22% { opacity: 0; transform: scale(1.12); } 28% { opacity: 1; } 47% { opacity: 1; transform: scale(1.02); } 53%, 100% { opacity: 0; transform: scale(1); } }
@keyframes tour2 { 0%, 47% { opacity: 0; transform: scale(1.12); } 53% { opacity: 1; } 72% { opacity: 1; transform: scale(1.02); } 78%, 100% { opacity: 0; transform: scale(1); } }
@keyframes tour3 { 0%, 72% { opacity: 0; transform: scale(1.12); } 78% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }
@keyframes cap0 { 0%, 18% { opacity: 1; transform: none; } 25%, 100% { opacity: 0; transform: translateY(-16px); } }
@keyframes cap1 { 0%, 25% { opacity: 0; transform: translateY(16px); } 31%, 43% { opacity: 1; transform: none; } 50%, 100% { opacity: 0; transform: translateY(-16px); } }
@keyframes cap2 { 0%, 50% { opacity: 0; transform: translateY(16px); } 56%, 68% { opacity: 1; transform: none; } 75%, 100% { opacity: 0; transform: translateY(-16px); } }
@keyframes cap3 { 0%, 75% { opacity: 0; transform: translateY(16px); } 81%, 100% { opacity: 1; transform: none; } }
@media (max-width: 781px) { @supports (animation-timeline: view()) { .tour { height: 340svh; } } .tour__frame img { height: 56svh; } }
.tb-btn, .wp-element-button { box-sizing: border-box; max-width: 100%; }
@media (max-width: 600px) { .tb-consent { padding: 1rem; } .tb-consent p { margin-bottom: .75rem; } }
.gite-strip__img img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.gite-strip__cols { margin-top: 2rem !important; align-items: flex-start !important; gap: clamp(1.5rem, 5vw, 5rem) !important; }
.gite-strip__cols ul { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .5rem; font-weight: 500; }
@media (max-width: 781px) { .gite-strip__img img { aspect-ratio: 4 / 3; } }
