/* Keep submenu links visible when navigating with Tab. */
.nav-primary .catchresponsive-nav-menu .menu-item:focus-within > .sub-menu {
    left: auto;
    opacity: 1;
}
.nav-primary .catchresponsive-nav-menu a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -3px;
}

/* Nouvelles : bandeau autonome, après le contenu, sans styles de formulaire globaux. */
#nouvelles-ermitage {
    box-sizing: border-box;
    background: #f3e8d3;
    color: var(--esb-navy, #000080);
    padding: 14px 25px 12px;
    clear: both;
}
.esb-newsletter-inner { max-width: 1100px; margin: 0 auto; }
#nouvelles-ermitage .esb-newsletter-form {
    display: grid;
    grid-template-columns: auto minmax(105px, 1fr) minmax(105px, 1fr) minmax(190px, 1.4fr) auto;
    align-items: center;
    gap: 12px;
    margin: 0;
}
#nouvelles-ermitage h2 {
    margin: 0;
    padding: 0;
    color: inherit;
    font-family: inherit;
    font-size: 17px;
    font-weight: 400;
    font-style: normal;
    line-height: 1.4;
}
#nouvelles-ermitage input:not([type="hidden"]),
#nouvelles-ermitage button {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 46px;
    margin: 0;
    padding: 9px 12px;
    border: 1px solid var(--esb-ivory, #fdf5e6);
    border-radius: 4px;
    background: var(--esb-ivory, #fdf5e6);
    color: var(--esb-navy, #000080);
    font: inherit;
    font-size: 16px;
    line-height: 26px;
    box-shadow: none;
}
#nouvelles-ermitage input::placeholder { color: var(--esb-navy, #000080); opacity: 1; }
#nouvelles-ermitage button {
    background: var(--esb-navy, #000080);
    color: var(--esb-ivory, #fdf5e6);
    border-color: var(--esb-navy, #000080);
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
#nouvelles-ermitage button:hover { text-decoration: underline; text-underline-offset: 3px; }
#nouvelles-ermitage :is(input, button):focus-visible {
    outline: 2px solid var(--esb-navy, #000080);
    outline-offset: 3px;
}
#nouvelles-ermitage .esb-newsletter-result { margin: 10px 0 0; font-size: 16px; text-align: center; }
#nouvelles-ermitage .esb-newsletter-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
@media screen and (max-width: 1000px) {
    #nouvelles-ermitage .esb-newsletter-form { grid-template-columns: 1fr 1fr 1.5fr auto; }
    #nouvelles-ermitage h2 { grid-column: 1 / -1; text-align: center; }
}
@media screen and (max-width: 700px) {
    #nouvelles-ermitage { padding-block: 20px; }
    #nouvelles-ermitage .esb-newsletter-form { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    #nouvelles-ermitage h2 { margin-bottom: 2px; }
}
/* Keep the ten links, including Sites, and search on one desktop row. */
@media screen and (min-width: 991px) and (max-width: 1280px) {
    .nav-primary .catchresponsive-nav-menu > li > a {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Dedicated Sites page: ordinary WordPress blocks, isolated from other content. */
.entry-content .esb-sites-page .esb-sites-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 28px;
    margin: 0 0 28px;
    padding: 0 0 28px;
    border-bottom: 1px solid #d0c8b9;
}
.entry-content .esb-sites-page .wp-block-column { min-width: 0; margin: 0; }
.entry-content .esb-sites-page figure { margin: 0; }
.entry-content .esb-sites-page img {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    aspect-ratio: 1265 / 712;
    border: 1px solid var(--esb-navy, #000080);
}
.entry-content .esb-sites-page h2 { margin-top: 0; }
.entry-content .esb-sites-page .esb-sites-visit { margin: 16px 0 0; }
.entry-content .esb-sites-page .esb-sites-visit a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: .25em;
    text-decoration: underline;
    text-underline-offset: 4px;
}
.entry-content .esb-sites-page a:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 4px;
    border-radius: 2px;
}
@media screen and (max-width: 700px) {
    .entry-content .esb-sites-page .esb-sites-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }
}

/* A single footer row, wrapping naturally on smaller screens and when zoomed. */
#colophon #site-generator.esb-site-footer {
    padding: 24px 20px 48px;
    background: #000080;
    color: #fdf5e6;
    font-family: inherit;
    font-size: 15px;
    font-style: normal;
    line-height: 1.6;
    text-align: center;
}
#site-generator.esb-site-footer .wrapper {
    box-sizing: border-box;
    width: 100%;
    max-width: 1200px;
    padding: 0;
    margin: 0 auto;
}
#site-generator.esb-site-footer a {
    display: inline-block;
    padding: 5px 0;
    color: inherit;
    font-weight: 400;
    text-decoration: none;
    text-underline-offset: 4px;
}
#site-generator.esb-site-footer a:hover,
#site-generator.esb-site-footer a:focus-visible {
    text-decoration: underline;
}
#site-generator.esb-site-footer a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    border-radius: 2px;
}
/* The booking page also styles nav elements, so set this explicitly. */
#site-generator.esb-site-footer nav {
    display: block;
}
#site-generator.esb-site-footer .esb-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}
#site-generator.esb-site-footer .esb-footer-links li {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    white-space: nowrap;
}
#site-generator.esb-site-footer .esb-footer-links li + li::before {
    content: "·";
}
/* Crédits 1.7.2 : seuls ces liens ont une cible tactile de 44 px. */
#site-generator.esb-site-footer .esb-footer-credit {
    white-space: normal;
}
#site-generator.esb-site-footer .esb-footer-credit a,
#site-generator.esb-site-footer .esb-footer-credit a:visited {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    min-height: 44px;
    white-space: nowrap;
    text-decoration: none;
}
#site-generator.esb-site-footer .esb-footer-credit a:hover {
    text-decoration: underline;
}
#site-generator.esb-site-footer .esb-footer-credit a:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 4px;
    text-decoration: underline;
}
@media screen and (max-width: 600px) {
    #colophon #site-generator.esb-site-footer {
        padding-bottom: 64px;
    }
    #site-generator.esb-site-footer .esb-footer-copyright,
    #site-generator.esb-site-footer .esb-footer-credit {
        flex-basis: 100%;
        justify-content: center;
        white-space: normal;
    }
    #site-generator.esb-site-footer .esb-footer-links li + li::before {
        content: none;
    }
}

/* Centre mobile branding independently of the menu and language buttons.
 * Keep the theme's widths and total 10px inset, shared equally on both sides.
 */
@media screen and (max-width: 990px) {
    #masthead > .wrapper {
        position: relative;
    }
    #masthead #mobile-header-left-menu {
        position: absolute;
        top: 0;
        left: 10px;
    }
    #masthead #site-branding {
        display: block;
        float: none;
        margin-inline: auto;
        padding-inline: 5px;
    }
    #masthead .site-description {
        margin-inline: 0;
    }
}

/* Match Catch Responsive's single-column breakpoint. Keep the theme's colours,
 * vertical spacing and media sizing; give mobile reading one 25px inner gutter.
 * No viewport units: 100% also accounts for a visible browser scrollbar.
 */
@media screen and (max-width: 990px) {
    #page.site {
        width: 100%;
    }
    #page #content > .wrapper {
        padding-left: 25px;
        padding-right: 25px;
    }
    #page #main > .hentry,
    #page #main > .page-header,
    #page #main > .no-results,
    #page #main > .not-found,
    #page #main > #comments,
    #page #main > #nav-below,
    #page #main > .post-navigation,
    #page #main > #infinite-handle,
    #page #content .sidebar-primary > .widget {
        padding-left: 0;
        padding-right: 0;
    }
    /* Enlarge inherited reading text without changing heading rules or the
     * explicit type sizes of embedded components such as the booking form.
     */
    #page #main .entry-content,
    #page #main .entry-summary {
        font-size: 18px;
        line-height: 1.6;
    }
    /* AddToAny labels stay accessible without extending beyond their buttons. */
    #page #main .a2a_kit .a2a_label {
        width: 1px;
        height: 1px;
    }
}

/* The standard hCaptcha widget is 302px wide. On very narrow screens, centre it
 * across the reading gutters without shrinking or clipping its controls.
 */
@media screen and (max-width: 350px) {
    #page #main .h-captcha {
        margin-inline: calc((100% - 302px) / 2);
    }
}


/* Catch Responsive's native promotion, edited in the WordPress Customizer.
 * The former promotion-only Additional CSS is moved here by the targeted migration.
 */
#promotion-message {
    background: var(--esb-navy, #000080);
    color: var(--esb-ivory, #fdf5e6);
    border: 0;
    font-style: normal;
}
#promotion-message > .wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    padding: 26px 40px;
}
/* The theme's clearfix pseudo-elements must not become extra grid items. */
#promotion-message > .wrapper::before,
#promotion-message > .wrapper::after {
    content: none;
}
#promotion-message .columns {
    float: none;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0;
}
#promotion-message h2 {
    margin: 0;
    color: inherit;
    font-size: 24px;
    font-weight: 400;
    font-style: italic;
    line-height: 1.3;
    overflow-wrap: break-word;
    text-wrap: balance;
}
#promotion-message p {
    margin: 9px 0 0;
    font-size: 17px;
    line-height: 1.55;
}
#promotion-message .right .promotion-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    max-width: 100%;
    margin: 0;
    padding: 12px 20px;
    border: 1px solid var(--esb-ivory, #fdf5e6);
    border-radius: 4px;
    background: var(--esb-ivory, #fdf5e6);
    color: var(--esb-navy, #000080);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    box-shadow: none;
    transition: none;
}
#promotion-message .right .promotion-button:hover,
#promotion-message .right .promotion-button:focus-visible {
    background: transparent;
    color: var(--esb-ivory, #fdf5e6);
    border-color: currentColor;
}
#promotion-message .right .promotion-button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}
@media screen and (max-width: 990px) {
    #promotion-message > .wrapper {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        padding: 24px 25px;
    }
    #promotion-message .right {
        text-align: left;
    }
    #promotion-message h2 {
        font-size: 22px;
    }
    #promotion-message p {
        font-size: 18px;
        line-height: 1.5;
    }
}
@media screen and (max-width: 480px) {
    #promotion-message .promotion-button {
        width: 100%;
    }
}
