/* Bello menu - reset Joomla 6 mod_menu defaults and reproduce the cl-effect-4 underline. */

/* nexus.css forces #container_header to 194px and #header to 90px which are too small
   to contain the menu under the logo. Extend the header so the menu fits inside
   the same white block as the logo. */
#container_header {
    height: auto !important;
    min-height: 260px;
    margin: 0 !important;
    padding: 0 !important;
}
#container_header > .wrapper960 {
    background: #ffffff;
    min-height: 260px;
}
#header {
    height: auto !important;
    min-height: 260px;
    display: flow-root;
    position: relative;
}

/* Force-hide the mobile-only containers on desktop (they sometimes leak through
   responsive.css media queries and create extra yellow strips). */
@media (min-width: 768px) {
    #container_logo_menu_mobile,
    #container_social_mobile {
        display: none !important;
    }
}

/* Pin the menu just below the 194px-tall logo (header.png) so it doesn't overlap
   the "Paillage bois naturel coloré" subtitle. */
#hornav {
    position: absolute !important;
    left: 0;
    right: 0;
    top: 200px;
    width: 100%;
    z-index: 5;
    margin: 0 !important;
}

#hornav ul li a,
#hornav ul li a.nav-link {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

/* Remove gap between header and slideshow. */
#container_slideshow_bg { margin: 0 !important; padding: 0 !important; }
#container_slideshow.container { margin: 0 !important; padding: 0 !important; }

/* Kill the default white background/box that mod_menu applies on hover. */
#hornav .mod-menu,
#hornav ul.mod-menu,
#hornav ul.nav {
    background: transparent !important;
    border: 0 !important;
}

#hornav ul li,
#hornav ul li a,
#hornav ul li a.nav-link {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

#hornav ul li a,
#hornav ul li a.nav-link {
    display: inline-block;
    padding: 10px 18px !important;
    color: #422919 !important;
    text-decoration: none;
    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    font-weight: 400;
    position: relative;
    overflow: hidden;
}

/* Animated underline (cl-effect-4 - line grows from left to right). */
#hornav ul li a::after,
#hornav ul li a.nav-link::after {
    content: '';
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 4px;
    height: 2px;
    background-color: #ffffff;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

#hornav ul li:hover a,
#hornav ul li.active a,
#hornav ul li.current a,
#hornav ul li a:focus,
#hornav ul li:hover a.nav-link,
#hornav ul li.active a.nav-link,
#hornav ul li.current a.nav-link {
    color: #ffffff !important;
    background: transparent !important;
}

#hornav ul li:hover a::after,
#hornav ul li.active a::after,
#hornav ul li.current a::after,
#hornav ul li a:focus::after,
#hornav ul li:hover a.nav-link::after,
#hornav ul li.active a.nav-link::after,
#hornav ul li.current a.nav-link::after {
    transform: scaleX(1);
    opacity: 1;
}

/* Search box - tame Joomla's default markup so it fits the white header. */
#search {
    margin-top: 6px;
}
#search .finder { display: flex; align-items: center; }
#search input.input-medium,
#search input.search-query {
    padding: 6px 10px;
    border: 1px solid #d6d6d6 !important;
    border-radius: 3px;
    background: #ffffff !important;
    color: #787878 !important;
    width: 160px;
    font-size: 13px;
}
#search button { display: none; }
#search label.element-invisible {
    position: absolute !important;
    width: 1px; height: 1px; overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
    white-space: nowrap;
}

/* RSS social icon - rendered by a Custom HTML module using the original Bello classes. */
#social ul { list-style: none; margin: 0; padding: 0; }
#social ul li { display: inline-block; margin: 0 4px; }
#social ul li a {
    display: block;
    width: 40px;
    height: 40px;
    text-indent: -9999px;
    border-radius: 50%;
}

/* ---- Bello lightbox ---- */
.item-page img,
.com-content-article img,
[itemprop="articleBody"] img {
    cursor: zoom-in;
    transition: transform 0.2s ease;
}
.item-page img:hover,
.com-content-article img:hover,
[itemprop="articleBody"] img:hover {
    transform: scale(1.02);
}
.bello-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 40px;
}
.bello-lightbox.is-open { display: flex; }
.bello-lightbox-img {
    max-width: 95%;
    max-height: 90vh;
    border: 4px solid #fff;
    box-shadow: 0 0 30px rgba(0,0,0,0.6);
    object-fit: contain;
    background: #fff;
}
.bello-lightbox-close {
    position: absolute;
    top: 18px;
    right: 24px;
    background: none;
    border: 0;
    color: #fff;
    font-size: 44px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.bello-lightbox-close:hover { color: #c5ce19; }

/* ---- Contact page (dl-horizontal layout) ---- */
.contact dl.dl-horizontal {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 4px 12px;
    align-items: center;
    margin: 0 0 8px;
}
.contact dl.dl-horizontal dt {
    grid-column: 1;
    margin: 0;
    text-align: center;
}
.contact dl.dl-horizontal dt img {
    max-width: 28px;
    height: auto;
    cursor: default;
}
.contact dl.dl-horizontal dd {
    grid-column: 2;
    margin: 0;
}
.contact dl.contact-position {
    display: block;
    margin-bottom: 14px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.contact dl.contact-position dt { font-weight: bold; display: inline; }
.contact dl.contact-position dd { display: inline; margin-left: 8px; }

/* Disable the lightbox cursor on contact icons (they're decorative, not photos). */
.contact dl img { cursor: default !important; }

/* ---- Mobile / responsive overrides ---- */
@media (max-width: 767px) {
    /* Let containers scale instead of forcing 996px */
    .wrapper960 { width: 100% !important; max-width: 100%; box-sizing: border-box; padding: 0 10px; }
    #container_header { min-height: 0 !important; }
    #container_header > .wrapper960 { min-height: 0; }
    #header { min-height: 0 !important; padding-bottom: 50px; }

    /* Logo header.png is 996px wide - let it scale */
    #logo, h1.logo a { width: 100% !important; height: auto !important; }
    h1.logo a {
        background-size: contain !important;
        background-position: center top;
        padding-top: 19.5% !important; /* preserve 996x194 ratio */
    }

    /* Menu - drop the absolute positioning that pins it 200px from top */
    #hornav {
        position: static !important;
        top: auto !important;
        margin-top: 10px;
        text-align: center;
    }
    #hornav ul {
        float: none !important;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0;
    }
    #hornav ul li { float: none !important; }
    #hornav ul li a, #hornav ul li a.nav-link {
        padding: 6px 10px !important;
        font-size: 14px;
    }

    /* Slider - shrink while keeping aspect */
    .bello-slider { width: 100% !important; height: auto !important; aspect-ratio: 996 / 170; }

    /* Content images - never overflow */
    .item-page img, [itemprop="articleBody"] img { max-width: 100%; height: auto; }
}

@media (max-width: 440px) {
    #hornav ul li a, #hornav ul li a.nav-link {
        padding: 4px 8px !important;
        font-size: 13px;
    }
}
