/* ====================================================================== */
/* ======================== 0) RESET (SCOPÉ HEADER) ====================== */
/* ====================================================================== */

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

/* ====================================================================== */
/* ============================ 1) HEADER GLOBAL ========================= */
/* ====================================================================== */

#cedis-header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 999999;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    min-height: 120px;
    transition: all .25s ease;
    overflow: visible;
    will-change: transform;
}

#cedis-header.shrink {
    min-height: 80px;
}

/* ====================================================================== */
/* =============================== TOPBAR =============================== */
/* ====================================================================== */

#cedis-header .cedis-topbar {
    background: #fff;
    padding: 12px 0;
    transition: padding .25s ease;
}

#cedis-header.shrink .cedis-topbar {
    padding: 6px 0;
}

#cedis-header .cedis-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* LOGO */
#cedis-header .cedis-logo img {
    height: 52px;
    transition: height .25s ease;
}

#cedis-header.shrink .cedis-logo img {
    height: 38px;
}

/* TAGLINE */
#cedis-header .cedis-tagline {
    flex: 1;
    margin: 0 30px;
    color: #1B5E20;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    line-height: 1.2;
}

#cedis-header.shrink .cedis-tagline {
    font-size: 11px;
    opacity: .75;
    margin: 0 20px;
}

/* ====================================================================== */
/* ============================== SOCIALS =============================== */
/* ====================================================================== */

#cedis-header .cedis-socials {
    display: flex;
    gap: 12px;
    align-items: center;
}

#cedis-header .cedis-icon-bluesky {
    width: 19px;
    height: 19px;
    opacity: .9;
    filter: brightness(0) saturate(100%) invert(18%) sepia(16%)
            saturate(1569%) hue-rotate(287deg) brightness(93%) contrast(89%);
    transition: .25s;
}

#cedis-header .cedis-icon-bluesky:hover {
    opacity: 1;
    transform: scale(1.12);
}

#cedis-header .cedis-socials .fa {
    font-size: 19px !important;
    width: 19px;
    height: 19px;
    color: #65224b !important;
    opacity: .9;
    transition: .25s;
}

#cedis-header .cedis-socials .fa:hover {
    opacity: 1;
    transform: scale(1.12);
}

/* ====================================================================== */
/* ========================== NAVIGATION DESKTOP ======================== */
/* ====================================================================== */

#cedis-header .cedis-nav {
    background: #55a908;
    border-bottom: 1px solid #15561b;
    padding: 14px 0;
    min-height: 40px;
    transition: padding .25s ease, min-height .25s ease;
}

#cedis-header.shrink .cedis-nav {
    padding: 6px 0 !important;
    min-height: 30px;
}

/* NAV INNER */
.cedis-nav-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* MENU */
#cedis-header .cedis-menu {
    display: flex !important;
    gap: 18px;                 /* réduit */
    flex-wrap: nowrap;
}

/* LIENS MENU */
#cedis-header .cedis-menu > li > a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 0 8px 10px;   /* réduit */
    color: #ffffff !important;
    font-weight: 600;
    font-size: 12px;           /* -15 % */
    text-transform: uppercase;
    text-decoration: none !important;
    letter-spacing: .3px;
    line-height: 22px !important;
    height: 22px !important;
    transition: .25s ease;
}

#cedis-header.shrink .cedis-menu > li > a {
    font-size: 11px !important;
    padding-left: 8px !important;
}

/* LIGNE ANIMÉE */
#cedis-header .cedis-menu > li > a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: #ffffff;
    transition: width .25s ease;
}

#cedis-header .cedis-menu > li:hover > a::after {
    width: 100%;
}

/* ====================================================================== */
/* ============================== DROPDOWN ============================== */
/* ====================================================================== */

#cedis-header .cedis-menu li.dropdown {
    position: relative;
    padding-bottom: 0;
}

#cedis-header .cedis-menu li.dropdown > a::before {
    content: "⌄";
    font-size: 11px;
    color: #ffffff;
}

#cedis-header .cedis-menu li .dropdown-menu {
    display: none;
    position: absolute !important;
    top: 100% !important;
    left: 0;
    background: #fff;
    min-width: 240px;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    padding: 8px 0;
    z-index: 99999;
    /* pont invisible pour combler le gap souris */
    margin-top: 0;
}

/* Zone de survol élargie : pseudo-élément pont entre le lien et le menu */
#cedis-header .cedis-menu li.dropdown::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 10px;
    display: none;
}

#cedis-header .cedis-menu li.dropdown:hover::after {
    display: block;
}

#cedis-header .cedis-menu li.dropdown:hover > .dropdown-menu {
    display: block;
}

#cedis-header .cedis-menu li .dropdown-menu li a {
    color: #1B5E20 !important;
    padding: 10px 16px;
    font-size: 14px;
    display: block;
}

#cedis-header .cedis-menu li .dropdown-menu li a:hover {
    background: #eef6ee;
}

/* ====================================================================== */
/* ============================== SEARCH ================================ */
/* ====================================================================== */

.cedis-search {
    margin-left: auto;
}

.cedis-search form {
    position: relative;
}

.cedis-search input[type="search"] {
    width: 220px;
    padding: 7px 36px 7px 14px;
    border-radius: 30px;
    border: 1px solid #ddd;
    font-size: 13px;
    transition: all .25s ease;
}

.cedis-search input[type="search"]:focus {
    outline: none;
    border-color: #55a908;
    box-shadow: 0 0 0 3px rgba(85,169,8,.15);
    width: 240px;
}

.cedis-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #666;
    font-size: 13px;
    cursor: pointer;
}

.cedis-search button:hover {
    color: #55a908;
}

/* ====================================================================== */
/* ============================= BURGER ================================ */
/* ====================================================================== */

.cedis-burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    z-index: 100;
}

.cedis-burger span {
    display: block;
    width: 26px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all .3s cubic-bezier(.4,0,.2,1);
    transform-origin: center;
}

/* Burger → Croix */
.cedis-burger.is-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.cedis-burger.is-active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.cedis-burger.is-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ====================================================================== */
/* ============================= RESPONSIVE ============================= */
/* ====================================================================== */

@media (max-width: 1200px) {

    #cedis-header .cedis-menu {
        gap: 14px;
    }

    #cedis-header .cedis-menu > li > a {
        font-size: 11px;
        padding-left: 8px;
    }

    .cedis-search input[type="search"] {
        width: 170px;
    }
}

@media (max-width: 900px) {

    /* Masquer la tagline et les socials */
    #cedis-header .cedis-tagline {
        display: none;
    }

    #cedis-header .cedis-socials {
        display: none;
    }

    /* Afficher le burger */
    .cedis-burger {
        display: flex;
        margin-left: auto;
    }

    /* Header topbar : logo + burger */
    #cedis-header .cedis-topbar-inner {
        justify-content: space-between;
    }

    /* Nav : cachée par défaut, slide depuis le haut */
    #cedis-header .cedis-nav {
        display: block;
        max-height: 0;
        overflow: hidden;
        transition: max-height .4s cubic-bezier(.4,0,.2,1);
        padding: 0;
    }

    #cedis-header .cedis-nav.mobile-open {
        max-height: 100vh;
        overflow-y: auto;
        padding: 10px 0 20px;
    }

    /* Menu : vertical */
    #cedis-header .cedis-menu {
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0 !important;
    }

    #cedis-header .cedis-menu > li {
        border-bottom: 1px solid rgba(255,255,255,.12);
    }

    #cedis-header .cedis-menu > li > a {
        padding: 14px 20px !important;
        font-size: 14px !important;
        height: auto !important;
        line-height: 1.4 !important;
    }

    #cedis-header .cedis-menu > li > a::after {
        display: none;
    }

    /* Dropdown mobile : clic */
    #cedis-header .cedis-menu li.dropdown {
        padding-bottom: 0;
    }

    #cedis-header .cedis-menu li .dropdown-menu {
        position: static !important;
        display: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: rgba(0,0,0,.15);
        padding: 0;
        min-width: 0;
        margin-top: 0;
    }

    #cedis-header .cedis-menu li.mobile-dropdown-open > .dropdown-menu {
        display: block !important;
    }

    #cedis-header .cedis-menu li .dropdown-menu li a {
        color: rgba(255,255,255,.9) !important;
        padding: 12px 20px 12px 36px !important;
        font-size: 13px !important;
        border-bottom: 1px solid rgba(255,255,255,.06);
    }

    #cedis-header .cedis-menu li .dropdown-menu li a:hover {
        background: rgba(255,255,255,.08) !important;
        padding-left: 36px !important;
    }

    /* Chevron dropdown */
    #cedis-header .cedis-menu li.dropdown > a::before {
        content: "▾";
        float: right;
        transition: transform .3s;
    }

    #cedis-header .cedis-menu li.mobile-dropdown-open > a::before {
        transform: rotate(180deg);
    }

    /* Zone de survol — pas nécessaire en mobile */
    #cedis-header .cedis-menu li.dropdown::after {
        display: none !important;
    }

    #cedis-header .cedis-menu li.dropdown:hover > .dropdown-menu {
        display: none;
    }

    #cedis-header .cedis-menu li.mobile-dropdown-open > .dropdown-menu {
        display: block !important;
    }

    /* Search mobile : pleine largeur */
    .cedis-search {
        margin: 12px 20px 0;
    }

    .cedis-search input[type="search"] {
        width: 100% !important;
        background: rgba(255,255,255,.15) !important;
        color: #fff !important;
        border-color: rgba(255,255,255,.2) !important;
    }

    .cedis-search input[type="search"]::placeholder {
        color: rgba(255,255,255,.5) !important;
    }

    .cedis-search button {
        color: rgba(255,255,255,.6) !important;
    }

    /* Nav inner : vertical */
    .cedis-nav-inner {
        flex-direction: column;
        align-items: stretch !important;
    }
}


/* ==========================================================
   FIX SOUS-MENU — ACTIVE / HOVER / CURRENT
========================================================== */

/* Reset complet des fonds Bootstrap */
#cedis-header .cedis-menu li .dropdown-menu li a,
#cedis-header .cedis-menu li .dropdown-menu li a:hover,
#cedis-header .cedis-menu li .dropdown-menu li a:focus,
#cedis-header .cedis-menu li .dropdown-menu li a:active,
#cedis-header .cedis-menu li .dropdown-menu li.current-menu-item > a,
#cedis-header .cedis-menu li .dropdown-menu li.current_page_item > a,
#cedis-header .cedis-menu li .dropdown-menu li.current-menu-ancestor > a {
    background: transparent !important;
    color: #1B5E20 !important;
}

/* Hover personnalisé (vert clair propre) */
#cedis-header .cedis-menu li .dropdown-menu li a:hover {
    background: #eef6ee !important;
}

/* État ACTIF (page courante) — discret, non bleu */
#cedis-header .cedis-menu li .dropdown-menu li.current-menu-item > a,
#cedis-header .cedis-menu li .dropdown-menu li.current_page_item > a {
    background: #e4f2e4 !important;
    font-weight: 600;
}

.row-centered {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}