/* Shared menu corrections; presentation-page rules remain scoped below. */
#mainmenu .mainmenu__languages { display: flex; justify-content: center; }
#mainmenu .mainmenu__languages .lang { flex: 0 0 auto; white-space: nowrap; padding: 10px clamp(3px, 0.4vw, 8px); }
#mainmenu .mainmenu__languages .lang:not(:last-child) { border-right: 1px solid #dedede; }
#mainmenu .mainmenu__languages .lang:last-child { border-right: 0; }
#mainmenu .mainmenu__socials { display: flex; flex-wrap: nowrap; }
#mainmenu .mainmenu__socials .socials__link { flex: 0 0 auto; }
@media (min-width: 981px) { #mainmenu .mainmenu__socials { flex-direction: column; align-items: center; } }
@media (max-width: 980px) { #mainmenu .mainmenu__languages .lang { padding: 10px 8px; } }
/* Keep the Chinese language label proportional and on one line in every locale. */
.topbar .lang-switcher__selector.toggled { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.topbar .lang-switcher__selector { min-width: 44px; }
.topbar .lang-switcher__lang[lang="zh-Hans"] { white-space: nowrap; }
.topbar .lang-switcher__lang[lang="zh-Hans"],
body:lang(zh-Hans) .topbar__languages .lang-switcher__switch {
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    font-size: 12px;
    line-height: 18px;
    letter-spacing: normal;
}
/* Partial-language presentation pages; existing site components remain the source. */
body[data-language-landing="true"] .miniheader { overflow: hidden; height: 100vh; height: 100svh; }
body[data-language-landing="true"] .miniheader__wrapper,
body[data-language-landing="true"] .miniheader__image,
body[data-language-landing="true"] .miniheader__image__1440,
body[data-language-landing="true"] .miniheader__image__mobile { height: 100%; }
/* The native home animation slides a photo away to reveal a video. These pages use a still photo. */
body[data-language-landing="true"] .miniheader__image,
body[data-language-landing="true"] .miniheader__image__1440,
body[data-language-landing="true"] .miniheader__image__mobile {
    margin-top: 0 !important;
    transform: none !important;
    transition: none !important;
    min-height: 0;
}
body[data-language-landing="true"] .miniheader__image img,
body[data-language-landing="true"] .miniheader__image__1440 img,
body[data-language-landing="true"] .miniheader__image__mobile img { width: 100%; height: 100%; object-fit: cover; }
body[data-language-landing="true"] .miniheader__titles {
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: none !important;
    opacity: 1 !important;
    transition: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}
body[data-language-landing="true"] .miniheader__title img {
    width: min(340px, 62vw);
    max-width: 62vw;
    height: auto;
}
body[data-language-landing="true"] .title-text__title h2 {
    margin: 0;
    color: inherit;
    font: inherit;
    line-height: inherit;
    letter-spacing: inherit;
}
body[data-language-landing="true"] .title-text__text p {
    margin: 0 0 1.35em;
}
body[data-language-landing="true"] .title-text__text p:last-child { margin-bottom: 0; }
body[data-language-landing="true"] .title-text__content,
body[data-language-landing="true"] .title-text__content2 { height: auto; min-height: 0; }
body[data-language-landing="true"] .title-text__title,
body[data-language-landing="true"] .title-text__content2__right,
body[data-language-landing="true"] .title-text__text { min-width: 0; }
body[data-language-landing="true"] .title-text__title { overflow-wrap: break-word; }
body[data-language-landing="true"]:lang(de) .title-text__title { font-size: clamp(38px, 4vw, 62px); hyphens: auto; }
body[data-language-landing="true"] .title-text__content2__left .background-image { background-position: center 30%; }
body[data-language-landing="true"] #histoire .title-text__content2__left .background-image { background-position: center 20%; }
body[data-language-landing="true"] .title-text__image img { display: block; width: 100%; height: auto; }
body[data-language-landing="true"] #hotel-piscine .title-text__content { display: none; }
/* Space the native side-image sections and alternate the hotel's image column. */
body[data-language-landing="true"] #histoire,
body[data-language-landing="true"] #hotel,
body[data-language-landing="true"] #le-1917 { padding: 48px 0; }
body[data-language-landing="true"] #hotel .title-text__content2 { flex-direction: row-reverse; }
body[data-language-landing="true"] #hotel .background-image { background-position: center; }
/* The contact section repeats these coordinates; keep the institutional footer below. */
body[data-language-landing="true"] .footer__top { display: none; }
body[data-language-landing="true"] #contact .title-text__content {
    padding: 64px 10vh;
    align-items: flex-start;
}
body[data-language-landing="true"] #contact .title-text__title { width: 50%; padding: 0 10vh 0 0; }
body[data-language-landing="true"] #contact .title-text__text { width: 50%; padding: 0 0 0 10vh; }
body[data-language-landing="true"] .lang-switcher__lang:focus-visible,
body[data-language-landing="true"] .lang-switcher__switch:focus-visible,
body[data-language-landing="true"] .mainmenu a:focus-visible,
body[data-language-landing="true"] .footer a:focus-visible { outline: 2px solid #8b7351; outline-offset: 4px; }
body[data-language-landing="true"] .lang-switcher__lang:focus:not(:focus-visible),
body[data-language-landing="true"] .lang-switcher__switch:focus:not(:focus-visible),
body[data-language-landing="true"] .mainmenu a:focus:not(:focus-visible),
body[data-language-landing="true"] .footer a:focus:not(:focus-visible) { outline: none; }
body[data-language-landing="true"] .landing-contact-details { margin-top: 1.5em; font-family: Lato, sans-serif; font-size: 16px; line-height: 1.8; letter-spacing: normal; text-transform: none; text-align: left; }
body[data-language-landing="true"] .landing-contact-details a { color: inherit; }
body[data-language-landing="true"] .landing-brand-name { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
body[data-language-landing="true"]:lang(zh-Hans) { font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }
body[data-language-landing="true"]:lang(zh-Hans) .title,
body[data-language-landing="true"]:lang(zh-Hans) .subtitle,
body[data-language-landing="true"]:lang(zh-Hans) .topbar,
body[data-language-landing="true"]:lang(zh-Hans) .btn {
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    letter-spacing: normal;
    text-transform: none;
}
body[data-language-landing="true"]:lang(zh-Hans) .title-text__title { font-size: clamp(28px, 3.5vw, 58px); line-height: 1.45; }
body[data-language-landing="true"]:lang(zh-Hans) .title-text__text { line-height: 1.95; }
body[data-language-landing="true"]:lang(zh-Hans) .landing-contact-details { font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }
@media (max-width: 991px) {
    body[data-language-landing="true"] .title-text__title { font-size: clamp(34px, 6vw, 62px); line-height: 1.15; }
    body[data-language-landing="true"] .title-text__content2 { display: flex; flex-direction: column; }
    body[data-language-landing="true"] #hotel .title-text__content2 { flex-direction: column; }
    body[data-language-landing="true"] #histoire,
    body[data-language-landing="true"] #hotel,
    body[data-language-landing="true"] #le-1917 { padding: 32px 0; }
    body[data-language-landing="true"] #contact .title-text__content { padding: 32px 20px; }
    body[data-language-landing="true"] #contact .title-text__title { width: 100%; padding: 0; }
    body[data-language-landing="true"] #contact .title-text__text { width: 100%; padding: 32px 0 0; }
    body[data-language-landing="true"] .title-text__content2__left,
    body[data-language-landing="true"] .title-text__content2__right { width: 100%; flex: 0 0 auto; }
    body[data-language-landing="true"] .title-text__content2__right { order: 1; padding-bottom: 32px; }
    body[data-language-landing="true"] .title-text__content2__left {
        order: 2;
        padding: 0;
        height: 55vh;
        min-height: 420px;
        max-height: 650px;
        margin-bottom: 0;
    }
    body[data-language-landing="true"] .title-text__content2__left .medias-slideshow {
        position: relative;
        width: 100%;
        height: 100%;
        min-height: 0;
    }
    body[data-language-landing="true"]:lang(zh-Hans) .title-text__title { font-size: 32px; line-height: 1.45; }
}
@media (max-width: 480px) {
    body[data-language-landing="true"] .title-text__title { font-size: 36px; }
    body[data-language-landing="true"] .title-text__text { font-size: 15px; }
    body[data-language-landing="true"]:lang(zh-Hans) .title-text__title { font-size: 28px; }
    body[data-language-landing="true"] .landing-contact-details { font-size: 15px; overflow-wrap: anywhere; }
}

/* The loader inserts temporary copies into body to warm images, then removes them.
   They must not enter layout; the actual header images remain visible. */
body[data-document="accueil"] > img#preloadItem { display: none; }

/* Keep the home photo's final space reserved throughout the original introduction.
   Individual translate preserves the existing independent video/photo scale animation. */
@supports (translate: 0 1px) {
    body[data-document="accueil"]:not([data-language-landing="true"]) .miniheader .miniheader__image,
    body[data-document="accueil"]:not([data-language-landing="true"]) .miniheader .miniheader__image__1440,
    body[data-document="accueil"]:not([data-language-landing="true"]) .miniheader .miniheader__image__mobile {
        --home-photo-offset: 500px;
        margin-top: calc(-1 * var(--home-photo-offset));
        translate: 0 var(--home-photo-offset);
        transition: translate 3s 0.5s ease-in-out, transform 0.8s ease-in;
    }

    body.loaded[data-document="accueil"]:not([data-language-landing="true"]) .miniheader .miniheader__image,
    body.loaded[data-document="accueil"]:not([data-language-landing="true"]) .miniheader .miniheader__image__1440,
    body.loaded[data-document="accueil"]:not([data-language-landing="true"]) .miniheader .miniheader__image__mobile {
        margin-top: calc(-1 * var(--home-photo-offset));
        translate: 0 0;
    }

    @media only screen and (max-width: 40em) {
        body[data-document="accueil"]:not([data-language-landing="true"]) .miniheader .miniheader__image__mobile {
            --home-photo-offset: 100px;
        }
    }

    @media only screen and (min-width: 85.4375em) {
        body[data-document="accueil"]:not([data-language-landing="true"]) .miniheader .miniheader__image {
            --home-photo-offset: 800px;
        }
    }

    @media only screen and (min-width: 120.0625em) {
        body[data-document="accueil"]:not([data-language-landing="true"]) .miniheader .miniheader__image__1440 {
            --home-photo-offset: 1000px;
        }
    }
}

/* A failed detail request must release the page and allow a deliberate retry. */
.ajax-panel-error {
    position: fixed;
    z-index: 360;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 520px;
    padding: 24px;
    background: #fff;
    color: #151515;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .2);
}
.ajax-panel-error p { margin: 0 0 16px; }
.ajax-panel-error__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ajax-panel-error__actions button {
    padding: 10px 16px;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.ajax-panel-error__actions button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
