/* Namespaced header styles (prefix: header-) */
:root {
    --header-bg: #ffffff;
    --header-ink: #2b3a2b;
    --header-hover: #4aa02c;
    /* vert site */
    --header-shadow: 0 8px 24px rgba(34, 44, 32, 0.08);
    --header-z: 1200;
}

header * {
    list-style: none;
}

.header-logo {
    width: 200px;
}

/* Base header */
.header-site {
    width: 100%;
    background: var(--header-bg);
    color: var(--header-ink);
    box-shadow: none;
    position: fixed;
    top: 0;
    z-index: var(--header-z);
}

/* Header default and reduced state (class Réduit) */
.header-site {
    height: 120px;
    transition: height .32s ease, box-shadow .32s ease, padding .32s ease;
}

.header-site .header-site__inner {
    height: 100%;
    transition: padding .32s ease
}

.header-site .header-logo__img {
    height: 100px;
    transition: height .32s ease
}

.header-site.reduit {
    height: 60px;
    box-shadow: var(--header-shadow);
}

.header-site.reduit .header-site__inner {
    padding: 0.4rem 1rem
}

.header-site.reduit .header-logo__img {
    height: 36px
}

.header-site__inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1rem;
    justify-content: space-between;
    align-items: center;
}

/* enable absolute centering of the nav within the header container */
.header-site__inner {
    position: relative;
}

.header-logo__img {
    height: 48px;
    display: block
}

/* Toggle (burger) */
.header-toggle {
    display: none;
    border: 0;
    background: transparent;
    padding: 0.4rem;
    cursor: pointer;
}

.header-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--bg1);
    margin: 3px 0;
    border-radius: 2px;
    transition: none;
}

/* Nav - desktop horizontal */
.header-nav {
    display: block;
    height: inherit;
}

#site-nav .accueil {
    display: none;
}

/* Center the main nav on desktop */
@media (min-width: 769px) {
    .header-nav {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: calc(var(--header-z) + 5);
    }
}

.header-nav__list {
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
    height: inherit;
}

.header-nav__item {
    position: relative;
    height: inherit;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--bg1);
    font-weight: 500;
    font-size: 1.2em;
    padding: 0.5em;

}

.header-nav__submenu {
    font-size: 0.8em;
}


.header-nav__link {
    display: inline-flex;
    align-items: center;
    color: var(--bg1);
    text-decoration: none;
    height: 100%;
}

.header-nav__link:hover,
.header-nav__link:focus {
    color: var(--header-hover)
}

/* subtoggle integrated into link - small chevron/icon */
.header-subtoggle {
    display: inline-flex;
    align-items: center;
    gap: .4rem
}

.header-subtoggle-icon {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--bg1);
    border-top: 2px solid var(--bg1);
    transform: rotate(135deg);
    margin-left: 0.5em;
    transition: transform .18s ease, color .18s ease
}


/* Submenu */
.header-nav__submenu {
    position: absolute;
    left: 0;
    top: calc(100% - 15px);
    background: #e2edd6e6;
    border-radius: 8px;
    box-shadow: var(--header-shadow);
    padding: 0;
    list-style: none;
    display: none;
    z-index: calc(var(--header-z)+10);
    border: 1px solid #dde8d5;
    width: max-content;
}

.header-nav__submenu li {
    display: block
}

.header-nav__sublink {
    display: block;
    padding: .6rem 1rem;
    color: var(--header-ink);
    text-decoration: none
}

.header-nav__sublink:hover {
    background: rgba(115, 187, 39, 0.06);
    color: var(--bg1);
}

.header-has-submenu.is-open>.header-nav__submenu {
    display: block
}

/* User area */
.header-user {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-left: auto;
}

.header-user-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: .3rem .4rem
}

.header-user .header-nav__submenu {
    left: unset;
    right: 0;
}

.header-user__avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--bg1) 0%, #4aa02c 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700
}

/* The user menu uses the generic submenu markup: .header-nav__submenu */
/* Position it to the right for user actions and inherit submenu styles. */
.header-user .header-nav__submenu {
    left: auto;
    right: 0;
}

/* USER INFOS */
.header-user-menu-infos {
    border-radius: 8px 8px 0 0;
    background: #fff;
    padding: 1.5em 0.5em;
}

.header-user-menu .header-user-menu-info {
    padding: 0.2rem 1rem;
}

.header-user-menu .header-user-menu-mail {
    font-weight: 100;
}

/* keep user menu item class for existing markup in PHP views */
.header-user-menu__item {
    display: block;
    padding: .6rem 1rem;
    color: var(--header-ink);
    text-decoration: none;
}

.header-user-menu__item:hover {
    background: rgba(115, 187, 39, 0.06);
    color: var(--bg1);
}

#header-user-menu .LogoutBtn {
    background: #fff;
    border: none;
    width: 100%;
    color: var(--bg1);
    text-transform: uppercase;
    padding: 1.5em;
    border-radius: 0 0 8px 8px;
    cursor: pointer;
}

#header-user-menu .LogoutBtn:hover {
    color: var(--header-hover);
}


/* FOOTER */
footer {
    color: #fff;
}

footer h2 {
    margin: 0 0 0.8em 0;
}

footer p {
    margin: 0.5em 0 0.2em 0;
}

footer a {
    text-decoration: none;
    color: #fff;
}

footer .Conteneur {
    width: 100%;
    position: relative;
    overflow: hidden;
}

footer .Pied {
    background-color: var(--h1);
    padding: 1em 10%;
    font-size: 0.8em;
}

footer .Gauche {
    margin-left: 0;
}

footer .Droite {
    margin-left: auto;
    margin-right: 0;
}

footer .Droite a {
    margin-left: 1.5em;
}

.video-footer {
    position: relative;
    height: 300px;
    /* Ajustable */
    overflow: hidden;
    color: white;
}

/* Container vidÃ©o */
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: inherit;
    height: inherit;
    overflow: hidden;
    z-index: 1;
    display: block;
}

footer .img-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

/* Iframe plein Ã©cran */
.video-container iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 160%;
    transform: translate(-50%, -50%) scale(1.2);
    pointer-events: none;
    object-fit: cover;
}

footer #bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 160%;
    transform: translate(-50%, -50%) scale(1.2);
    pointer-events: none;
    object-fit: cover;
}

/* Overlay sombre */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2;
}

/* Contenu du footer */
.footer-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 5%;
}

footer #contact .Centre {
    justify-content: space-evenly;
}


/* FIN FOOTER */



/* MAX WIDTH 768 : BASCULE MENU */
@media (max-width: 768px) {
    .header-toggle {
        display: flex;
        flex-direction: column;
        right: 2em;
        z-index: calc(var(--header-z) + 30);
    }

    .header-nav {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 320px;
        max-width: 80%;
        background: var(--header-bg);
        transform: translateX(100%);
        transition: transform .28s cubic-bezier(.2, .9, .2, 1);
        box-shadow: -8px 0 24px rgba(34, 44, 32, 0.12);
        padding: 5em 2em;
        overflow: auto;
        z-index: calc(var(--header-z) + 10);
    }

    #site-nav .header-nav__list {
        flex-direction: column;
        margin-left: auto;
        height: auto;
        align-items: flex-start;
    }

    #site-nav .accueil {
        display: block;
    }

    .header-subtoggle-icon {
        display: none;
    }

    .header-nav__link {
        border-bottom: 1px solid rgba(0, 0, 0, 0.04)
    }

    /* reset link height on mobile stacked layout */
    .header-nav__link {
        height: auto
    }

    .header-nav--open {
        transform: translateX(0)
    }

    /* overlay */
    .header-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        opacity: 0;
        visibility: hidden;
        transition: opacity .2s ease;
        z-index: calc(var(--header-z)-1)
    }

    .header-overlay.is-visible {
        opacity: 1;
        visibility: visible
    }

    /* submenu mobile: expand inline */
    #site-nav .header-nav__submenu {
        position: relative;
        margin-top: 1em;
        width: 100%;
        display: block;
    }

    #site-nav .header-nav__item.header-has-submenu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    /* on mobile, make the whole link behave as subtoggle; anchor contains .header-subtoggle-icon */
    .header-has-submenu .header-subtoggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    #site-nav .header-has-submenu.is-open>.header-nav__submenu {
        display: block
    }

    .video-container {
        display: none;
    }

    footer .video-overlay {
        background: rgba(0, 0, 0, 0.6);
    }

    footer .img-overlay {
        display: block;
    }


    footer h2 {
        margin: 0.8em 0 0 0;
    }

    footer .Col {
        width: 100%;
    }

    footer .Plan {
        display: none;
    }

    footer .Pied {
        display: flex;
        font-size: 1em;
        line-height: 1.5em;
        padding: 1em;
        text-align: center;
    }

    footer .Gauche {
        margin-left: unset;
    }

    footer .Droite {
        margin: 0 auto;
    }

    footer .Droite {
        margin: 1em auto;
    }
}

/* Small screens tweaks */
@media (max-width:480px) {
    .header-site__inner {
        gap: 0.1rem;
    }

    .header-logo__img {
        height: 40px
    }

    .header-user__avatar {
        width: 32px;
        height: 32px
    }

    .header-user-btn .header-user__name {
        display: none;
    }

    .header-user-btn .fa-chevron-down {
        display: none;
    }


    footer .Droite a {
        margin-left: unset;
    }
}

/* small animation niceties */

/* No animated open/close styles for the burger (three static bars) */

/* isolation helper: ensure header styles win when loaded last */
.header-site * {
    box-sizing: border-box
}