/*
 * Amis de Vaux - En-tête responsive
 */

.avh-header {
    --avh-blue: #022D41;
    --avh-blue-dark: #012536;
    --avh-gold: #E5CCA5;
    --avh-light-blue: #c9e8f2;
    --avh-pattern: none;

    position: relative;
    z-index: 9999;
    width: 100%;
    background: var(--avh-blue);
    color: var(--avh-gold);
    font-family: 'Figtree', sans-serif;
}

.avh-header,
.avh-header *,
.avh-header *::before,
.avh-header *::after {
    box-sizing: border-box;
}

.avh-header a {
    color: inherit;
    text-decoration: none;
}

.avh-top {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(230px, 1fr) minmax(0, 2fr);
    align-items: center;
    gap: 32px;
    width: 100%;
    min-height: 106px;
    padding: 22px clamp(28px, 3.4vw, 62px);
}

.avh-top__left,
.avh-top__right {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: clamp(20px, 2.2vw, 42px);
    min-width: 0;
}

.avh-top__left {
    justify-content: flex-start;
}

.avh-top__right {
    justify-content: flex-end;
}

.avh-top__center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.avh-logo-link {
    display: block;
    width: min(100%, 310px);
}

.avh-logo {
    display: block;
    width: 100%;
    max-height: 70px;
    object-fit: contain;
}

.avh-plain-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    white-space: nowrap;
    font-weight: 600;
}

.avh-plain-link--text {
    font-weight: 700;
}

.avh-logo-fallback {
    display: block;
    font-size: 20px;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
}

.avh-icon {
    display: block;
    width: auto;
    object-fit: contain;
}

.avh-icon--castle {
    max-width: 34px;
    max-height: 26px;
}

.avh-icon--user {
    max-width: 18px;
    max-height: 18px;
}

.avh-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex: 0 0 auto;
    min-height: 52px;
    padding: 14px 30px;
    border: 1px solid var(--avh-gold);
    white-space: nowrap;
    font-weight: 700;
    transition: .2s ease;
}

.avh-button--outline {
    background: transparent;
    color: var(--avh-gold);
}

.avh-button--outline:hover,
.avh-button--outline:focus-visible {
    background: var(--avh-gold);
    color: var(--avh-blue);
}

.avh-header .avh-button--solid {
    background: var(--avh-gold);
    color: var(--avh-blue) !important;
}

.avh-button--solid:hover,
.avh-button--solid:focus-visible {
    background: transparent;
    color: var(--avh-gold) !important;
}

.avh-heart {
    font-size: 23px;
    line-height: 1;
}

.avh-separator {
    width: 1px;
    height: 22px;
    background: rgba(229, 204, 165, .9);
}

.avh-language {
    font-weight: 700;
    white-space: nowrap;
}

.avh-nav-shell {
    position: relative;
    border-top: 1px solid rgba(229, 204, 165, .85);
    border-bottom: 1px solid rgba(229, 204, 165, .85);
    background-color: var(--avh-blue);
    background-image: var(--avh-pattern);
    background-repeat: repeat-x;
    background-position: center;
    background-size: auto 100%;
}

.avh-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 82px;
    padding: 0 clamp(24px, 4vw, 72px);
}

.avh-menu,
.avh-menu ul,
.avh-menu li {
    margin: 0 !important;
    padding: 0;
    list-style: none !important;
}

.avh-menu li::before,
.avh-menu li::marker,
.avh-menu ul::before {
    content: none !important;
    display: none !important;
}

.avh-menu {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: clamp(18px, 2.8vw, 52px);
    width: 100%;
}

.avh-menu > li {
    position: relative;
    display: flex;
    align-items: stretch;
}

.avh-menu > li > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 82px;
    padding: 0 4px;
    color: var(--avh-gold);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .01em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color .2s ease;
}

.avh-menu > li > a::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--avh-gold);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .22s ease;
}

.avh-menu > li:hover > a,
.avh-menu > li:focus-within > a,
.avh-menu > li.current-menu-item > a,
.avh-menu > li.current-menu-ancestor > a {
    color: #fff;
}

.avh-menu > li:hover > a::before,
.avh-menu > li:focus-within > a::before,
.avh-menu > li.current-menu-item > a::before,
.avh-menu > li.current-menu-ancestor > a::before {
    transform: scaleX(1);
}

.avh-menu .menu-item-has-children > a::after {
    content: "";
    width: 7px;
    height: 7px;
    margin: -4px 0 0 10px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
}

.avh-menu .menu-item-has-children:hover > a::after,
.avh-menu .menu-item-has-children:focus-within > a::after {
    transform: translateY(3px) rotate(225deg);
}

.avh-menu .sub-menu {
    position: absolute;
    top: calc(100% - 1px);
    left: 50%;
    z-index: 40;
    display: block;
    min-width: 250px;
    padding: 10px;
    border: 1px solid rgba(229, 204, 165, .28);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(0, 24, 35, .22);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 10px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.avh-menu li:hover > .sub-menu,
.avh-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.avh-menu .sub-menu li {
    position: relative;
}

.avh-menu .sub-menu a {
    display: block;
    padding: 11px 13px;
    border-radius: 7px;
    color: var(--avh-blue);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    text-transform: none;
    transition: background .16s ease, color .16s ease;
}

.avh-menu .sub-menu a:hover,
.avh-menu .sub-menu a:focus-visible {
    background: #f5eee3;
    color: var(--avh-blue);
}

.avh-menu-toggle,
.avh-mobile-links,
.avh-submenu-toggle {
    display: none;
}

.avh-ornament {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -22px;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 82px minmax(0, 1fr);
    align-items: center;
    pointer-events: none;
}

.avh-ornament__line {
    height: 1px;
    background: var(--avh-gold);
}

.avh-ornament__diamond {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
}

.avh-diamond-image {
    display: block;
    width: auto;
    max-width: 58px;
    max-height: 45px;
}

.avh-diamond-css {
    display: block;
    width: 28px;
    height: 28px;
    background: var(--avh-gold);
    transform: rotate(45deg);
}

@media (max-width: 1380px) {
    .avh-top {
        gap: 18px;
        padding-right: 24px;
        padding-left: 24px;
    }

    .avh-top__left,
    .avh-top__right {
        gap: 16px;
    }

    .avh-logo-link {
        width: min(100%, 250px);
    }

    .avh-button {
        padding-right: 20px;
        padding-left: 20px;
        font-size: 14px;
    }

    .avh-menu {
        gap: 30px;
    }

    .avh-menu > li > a {
        font-size: 14px;
    }
}

@media (max-width: 1100px) {
    .avh-castle-link,
    .avh-login {
        font-size: 14px;
    }

    .avh-logo-link {
        width: min(100%, 220px);
    }

    .avh-menu {
        gap: 22px;
    }
}

@media (min-width: 981px) {
    .avh-header.is-stuck .avh-nav-shell {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 999999;
        display: flex;
        align-items: center;
        box-shadow: 0 12px 26px rgba(1, 15, 22, .32);
    }

    .avh-header.is-stuck .avh-nav-shell > .avh-nav {
        flex: 1 1 auto;
        min-width: 0;
    }

    .avh-nav-shell__spacer {
        display: none;
        height: 0;
    }

    .avh-header.is-stuck .avh-nav-shell__spacer {
        display: block;
    }

    .avh-nav-shell__sticky-logo {
        display: none;
        align-items: center;
        flex: 0 0 auto;
        padding-left: clamp(24px, 3.4vw, 62px);
    }

    .avh-header.is-stuck .avh-nav-shell__sticky-logo {
        display: flex;
    }

    .avh-nav-shell__sticky-logo img {
        display: block;
        height: 40px;
        width: auto;
        max-width: 140px;
        object-fit: contain;
    }
}

@media (max-width: 980px) {
    .avh-nav-shell__sticky-logo {
        display: none !important;
    }
}

@media (max-width: 980px) {
    .avh-top {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "logo donation";
        min-height: 82px;
        padding: 12px 5%;
    }

    .avh-top__left {
        display: none;
    }

    .avh-top__center {
        grid-area: logo;
        justify-content: flex-start;
    }

    .avh-top__right {
        grid-area: donation;
        justify-content: flex-end;
    }

    .avh-logo-link {
        width: min(100%, 235px);
    }

    .avh-top__right .avh-plain-link,
    .avh-separator {
        display: none;
    }

    .avh-nav-shell {
        min-height: 66px;
    }

    .avh-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 12px;
        width: 100%;
        min-height: 66px;
        padding: 0 5%;
        border: 0;
        background: transparent;
        color: var(--avh-gold);
        font: inherit;
        font-weight: 700;
        cursor: pointer;
    }

    .avh-menu-toggle__icon {
        display: grid;
        gap: 5px;
        width: 30px;
    }

    .avh-menu-toggle__icon span {
        display: block;
        width: 100%;
        height: 2px;
        background: currentColor;
        transition: .2s ease;
    }

    .avh-menu-toggle[aria-expanded="true"] .avh-menu-toggle__icon span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .avh-menu-toggle[aria-expanded="true"] .avh-menu-toggle__icon span:nth-child(2) {
        opacity: 0;
    }

    .avh-menu-toggle[aria-expanded="true"] .avh-menu-toggle__icon span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .avh-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        z-index: 50;
        display: none;
        min-height: 0;
        max-height: calc(100vh - 148px);
        padding: 0 5% 28px;
        overflow-y: auto;
        background: var(--avh-blue);
        box-shadow: 0 18px 35px rgba(0, 0, 0, .25);
    }

    .avh-header.is-open .avh-nav {
        display: block;
    }

    .avh-menu {
        display: block;
        width: 100%;
    }

    .avh-menu > li {
        position: relative;
        display: block !important;
        border-bottom: 1px solid rgba(229, 204, 165, .18);
    }

    .avh-menu > li > a {
        display: block !important;
        min-height: 0;
        padding: 15px 44px 15px 0;
    }

    .avh-menu .menu-item-has-children > a {
        cursor: pointer;
    }

    .avh-menu .menu-item-has-children > a::after {
        display: none;
    }

    .avh-submenu-toggle {
        position: absolute;
        top: 50%;
        right: 0;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: var(--avh-gold);
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
        -webkit-tap-highlight-color: transparent;
        outline-offset: 2px;
    }

    .avh-submenu-toggle span {
        display: block;
        width: 9px;
        height: 9px;
        border-right: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: rotate(45deg);
        transition: transform .2s ease;
    }

    .avh-menu > li.sub-menu-open .avh-submenu-toggle span {
        transform: rotate(225deg);
    }

    .avh-menu .sub-menu {
        position: static !important;
        display: none !important;
        min-width: 0 !important;
        padding: 0 0 10px 18px !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    .avh-menu > li.sub-menu-open > .sub-menu {
        display: block !important;
    }

    .avh-menu .sub-menu a {
        display: block !important;
        padding: 10px 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: var(--avh-gold) !important;
        -webkit-tap-highlight-color: transparent;
    }

    .avh-mobile-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin-top: 22px;
        padding-top: 6px;
        border-top: 1px solid rgba(229, 204, 165, .22);
    }

    .avh-mobile-link {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        min-height: 52px;
        padding: 14px 15px;
        border: 1px solid rgba(229, 204, 165, .28);
        background: rgba(255, 255, 255, .02);
        color: var(--avh-gold);
        font-weight: 700;
        line-height: 1.2;
        transition: .2s ease;
    }

    .avh-mobile-link:hover,
    .avh-mobile-link:focus-visible {
        background: rgba(229, 204, 165, .08);
    }

    .avh-mobile-link--solid {
        justify-content: space-between;
        border-color: var(--avh-gold);
        background: var(--avh-gold);
        color: var(--avh-blue);
    }

    .avh-mobile-link--solid:hover,
    .avh-mobile-link--solid:focus-visible {
        background: #f0d9b6;
        color: var(--avh-blue);
    }

    .avh-mobile-link__icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 18px;
        color: currentColor;
        flex: 0 0 auto;
    }

    .avh-mobile-link__icon img,
    .avh-mobile-link__icon svg {
        display: block;
        width: auto;
        max-width: 18px;
        max-height: 18px;
        object-fit: contain;
    }

    .avh-mobile-link__icon--arrow,
    .avh-mobile-link__icon--heart {
        font-size: 18px;
        line-height: 1;
    }

    .avh-mobile-link--plain {
        justify-content: center;
    }

    .avh-ornament {
        grid-template-columns: minmax(0, 1fr) 60px minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .avh-top {
        min-height: 72px;
        padding-right: 4%;
        padding-left: 4%;
        gap: 10px;
    }

    .avh-logo-link {
        width: min(100%, 185px);
    }

    .avh-button--solid {
        min-height: 46px;
        padding: 11px 14px;
        font-size: 13px;
        white-space: nowrap;
    }

    .avh-button--solid span:first-child {
        white-space: nowrap;
    }

    .avh-mobile-links {
        grid-template-columns: 1fr;
    }

    .avh-nav-shell,
    .avh-menu-toggle {
        min-height: 60px;
    }

    .avh-menu-toggle__label {
        display: none;
    }

    .avh-nav {
        max-height: calc(100vh - 132px);
    }
}

@media (max-width: 410px) {
    .avh-logo-link {
        width: min(100%, 145px);
    }

    .avh-button--solid {
        padding: 10px 11px;
        font-size: 11px;
    }

    .avh-heart {
        display: none;
    }

    .avh-mobile-link {
        min-height: 48px;
        padding: 12px 13px;
        font-size: 14px;
    }
}


/* Fix prévisualisation Divi Builder : indentation des listes du header */
.et-l--header ul {
    padding: 0 0 0px 1em;
}

/* Protection contre les styles de listes injectés par le thème ou Divi */
.avh-header .avh-nav .avh-menu,
.avh-header .avh-nav .avh-menu ul,
.avh-header .avh-nav .avh-menu li {
    list-style: none !important;
}

.avh-header .avh-nav .avh-menu li::before,
.avh-header .avh-nav .avh-menu li::after:not(.menu-item-has-children > a::after) {
    content: none !important;
}

@media (max-width: 980px) {
    .avh-menu > li > a::before {
        display: none;
    }

    .avh-menu .sub-menu a {
        color: var(--avh-gold);
        background: transparent;
    }

    .avh-menu .sub-menu a:hover,
    .avh-menu .sub-menu a:focus-visible {
        color: #fff;
        background: rgba(229, 204, 165, .08);
    }
}


/* v1.5.2 — bouton de don mobile */
@media (max-width: 980px) {
    .avh-header .avh-button--solid {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 9px !important;
        color: var(--avh-blue) !important;
    }

    .avh-header .avh-button--solid .avh-heart {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        color: var(--avh-blue) !important;
        font-size: 20px;
        line-height: 1;
    }
}

@media (max-width: 410px) {
    .avh-header .avh-button--solid .avh-heart {
        display: inline-flex !important;
        font-size: 18px;
    }
}
