/**
 * Header Styles for Elan Child Theme
 * 
 * Add your header styles here
 */

header {
    .site-header-inner {
        box-sizing: content-box;
        max-width: 1110px !important;
        margin: 0 auto;
        padding: 19px 40px;
        display: flex;
        justify-content: space-between;
        align-items: center;

        @media (max-width: 1024px) {
            &>div {
                padding: 22px auto;
            }

            .wp-block-site-logo img {
                width: 200px !important;
                height: 46px !important;
            }

            .logo-ccdmd {
                display: none !important;
            }
        }

        nav ul {
            @media (min-width: 600px) and (max-width: 640px) {
                column-gap: 18px !important;
            }

            a {
                font-weight: 500 !important;
                font-size: 17px !important;
                line-height: 22px !important;
                letter-spacing: 2% !important;
                padding: 7px 0 !important;
                color: var(--bleu-100-texte) !important;

                &:hover {
                    color: var(--bleu-80-principal) !important;
                    text-decoration: none;
                }

                &[aria-current="page"] {
                    color: var(--bleu-100-texte) !important;
                    text-decoration-line: underline;
                    text-decoration-thickness: 2px !important;
                    text-decoration-color: var(--vert-80);
                    text-underline-offset: 7px;


                }
            }

            /* Hide the "Recherche" text and show search icon */
            .wp-block-navigation-item:last-child {
                a {
                    border-bottom: none !important;
                    padding-bottom: 0 !important;
                }

                .wp-block-navigation-item__label {
                    display: none;
                }
            }

            .wp-block-navigation-item:last-child .wp-block-navigation-item__content::after {
                content: '';
                display: inline-block;
                width: 24px;
                height: 25px;
                background-image: url("data:image/svg+xml,%3Csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 19.5C15.4183 19.5 19 15.9183 19 11.5C19 7.08172 15.4183 3.5 11 3.5C6.58172 3.5 3 7.08172 3 11.5C3 15.9183 6.58172 19.5 11 19.5Z' stroke='%23344E67' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M20.9999 21.5004L16.6499 17.1504' stroke='%23344E67' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
                background-repeat: no-repeat;
                background-position: center;
                background-size: contain;
            }
        }

        /* Custom burger menu icon */
        .wp-block-navigation__responsive-container-open {
            svg {
                display: none;
            }

            &::before {
                content: '';
                display: inline-block;
                width: 24px;
                height: 24px;
                background-image: url('/wp-content/uploads/2025/10/menu-burger.svg');
                background-repeat: no-repeat;
                background-position: center;
                background-size: contain;
            }
        }

        /* Move search icon outside navigation when burger is displayed */
        @media (max-width: 599px) {
            .wp-block-navigation {
                position: relative;

                /* Hide the last navigation item from the normal flow */
                .wp-block-navigation-item:last-child {
                    display: none !important;
                }
            }

            /* Independent search icon block */
            .mobile-search-icon {
                position: absolute;
                right: 52px;
                top: 50%;
                transform: translateY(-50%);
                width: 24px;
                height: 25px;
                background-image: url("data:image/svg+xml,%3Csvg width='24' height='25' viewBox='0 0 24 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 19.5C15.4183 19.5 19 15.9183 19 11.5C19 7.08172 15.4183 3.5 11 3.5C6.58172 3.5 3 7.08172 3 11.5C3 15.9183 6.58172 19.5 11 19.5Z' stroke='%23344E67' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M20.9999 21.5004L16.6499 17.1504' stroke='%23344E67' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
                background-repeat: no-repeat;
                background-position: center;
                background-size: contain;
                cursor: pointer;
                z-index: 10;
            }
        }
    }
}

/* Tablet Breakpoint */
@media (max-width: 1024px) {
    .ccdmd-nav-logo {
        display: none !important;
    }

    .custom-logo {
        width: 200px !important;
        height: auto !important;
    }
}

/* Mobile Breakpoint */
@media (max-width: 600px) {
    header .site-header-inner {
        padding: 19px 30px;
    }

    .ccdmd-side-navigation {
        width: 89px !important;
    }
}