/* VERSION 1.1 */

/* font */
header {
    font-weight: 400;
    font-style: normal;
    transition: top 0.3s ease-in-out;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    margin-bottom: 60px;
    
}

/* anim header */
.header-up {
    top: -80px; /* Cache le header */
}

.header-down {
    top: 0; /* Affiche le header */
}

/* connected user icon */
.header-icon {
    font-size: 16px;
    color: #31211c;
    text-decoration: none;
    margin-left: 5px;
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.header-icon i {
    margin-right: 5px;
}

/* buttons header */
.inscription {
    padding: 9px 15px;
    background-color: transparent!important;
    border: #31211c solid 2px!important;
    font-size: 16px;
    color: #31211c!important;
    text-decoration: none;
    border-radius: 5px;
}

.plans {
    padding: 9px 15px;
    background-color: #31211c;
    border: #31211c solid 2px;
    font-size: 16px;
    color: #fef8ec;
    text-decoration: none;
    margin-left: 5px;
    border-radius: 5px;
}

.cart-container{
    margin: auto;
}

/* CART COUNTER */
.cart-count {
    background-color: #31211C;
    color: white;
    border-radius: 50px;
    font-size: 14px;
    line-height: 20px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
    margin: 5px;
}
/* Container and Flexbox */
.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #fef8ec;
    color: #31211c;
    height: 80px;
}

.header-left {
    justify-content: center;
    width: 20%;
}

.header-left a {
    text-decoration: none;
    color: #31211c;
    display: flex;
    justify-content: flex-start;
    font-size: 24px;
}

.header-left a img {
    max-height: 75px;
    height: auto;
    width: auto;
    max-width: 100%;
}

.header-center {
    flex-grow: 1;
    text-align: right;
}

.header-center nav {
    display: inline-block;
}

.header-center ul {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.header-center li {
    display: inline-block;
    margin: 0 10px;
    position: relative;
    vertical-align: middle;
}

.header-center li a {
    min-height: 55px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.header-center li:hover {
    text-decoration: none;
}

.header-center li.has-sub-items::after {
    font-size: 12px;
    color: #31211c;
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
}

.header-center a {
    text-decoration: none;
    color: #31211c;
    padding: 10px 20px;
    display: block;
}

.header-right {
    display: flex;
    justify-content: flex-end;
}

/* custom logo */
.custom-logo {
    align-items: center;
}

/* Dropdown Menu Styles */
.header-center ul ul {
    display: none;
    position: absolute;
    left: 0;
    background-color: #fef8ec;
    padding: 0;
    z-index: 99;
    transform-origin: top center;
    white-space: nowrap;  /* Prevent text wrapping */
    border-top: #31211c solid 2px;
}

.header-center ul ul li {
    display: block;
    margin: 0;
    min-width: max-content; /* Ensure the container expands based on content */
    text-align: left;
}

.header-center ul ul a {
    padding: 10px 20px;
    color: #31211c;
    text-decoration: none;
    display: block; /* Ensure the anchor tag takes up full width */
}

.header-center ul li:hover > ul {
    display: block;
    animation: scaleZ 300ms ease-in-out forwards;
}

.header-center ul ul.is-hovered {
    display: block !important;
}

@keyframes scaleZ {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    80% {
        transform: scale(1.07);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Styles */
@media (max-width: 1161px) {
    .header-left {
        display: none;
    }

    .header-center {
        display: none;
    }

    #burger-menu {
        display: flex;
        cursor: pointer;
        flex-direction: column;
        justify-content: space-between;
        height: 36px;
        width: 40px;
        font-weight: 700;
    }

    .container {
        justify-content: space-between;
    }

    .header-right {
        order: 2;
    }

    #burger-menu {
        order: 1;
    }

    .menu-overlay {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: #fef8ec;
        transition: left 0.3s ease-in-out;
        z-index: 1000;
    }

    .menu-content {
        padding: 1rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        height: 100%;
        position: relative;
    }

    .close-menu {
        align-self: flex-end;
        font-size: 2rem;
        cursor: pointer;
    }
    .mobile-nav {
        flex-grow: 1;
        width: 100%;
    }

    .mobile-menu {
        list-style: none;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .mobile-menu li {
        padding: 1rem;
        width: 100%;
        display: block;
        border-bottom: 1px solid #ccc;
        position: relative;
    }

    .mobile-menu li a {
        text-decoration: none;
        color: #31211c;
        width: 100%;
    }

    .mobile-menu li .submenu-toggle {
        display: none;
        cursor: pointer;
        font-size: 1rem;
        margin-left: 1rem;
        transition: transform 0.3s ease-in-out;
    }

    .rotated {
        transform: rotate(90deg);
    }

    .menu-overlay .mobile-menu li.has-children > .submenu-toggle {
        display: inline-flex;
    }

    .menu-links {
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .menu-links a {
        text-decoration: none;
        color: #31211c;
        padding: 1rem;
        border-top: 1px solid #ccc;
    }

    .overlay-logo {
        position: initial;
        margin-bottom: 20px;
        margin-top: 20px;
        margin-left: 20px;
        width: 30%;
    }

    .overlay-logo img {
        max-height: 50px;
        height: auto;
        width: auto;
        max-width: 100%;
    }

    .sub-menu {
        display: none;
        list-style: none;
        padding: 0;
        margin: 0;
        padding-left: 1rem;
    }

    .sub-menu.open {
        display: block;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: row;
        align-items: center;
    }

    .header-center {
        text-align: left;
        margin: 10px 0;
    }

    .header-right {
        display: flex;
        flex-direction: row;
        justify-content: flex-end;
    }

    .header-right .btn {
        margin: 5px 0;
    }
}

@media (min-width: 1025px) {
    #menu-primarymenu-1 {
        display: none;
    }

    .menu-overlay {
        display: none;
    }
}
/* Hide menu-primarymenu-1 on larger screens */
@media (min-width: 1161px) {
    #burger-menu {
        display: none;
    }

    .menu-overlay{
        display: none;
    }
}