@import url('variables.css');

/* bloque le scroll */
body:has(nav:popover-open) {
    overflow: hidden;
}

.header {
    position: fixed;
    left: 0;
    backdrop-filter: blur(50px);
    top: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    background-color: var(--bg-clr-card);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--border-clr);

    /* nav format mobile */
    nav:popover-open {
        border: none;
        background-color: var(--bg-clr);
        left: auto;
        margin-top: var(--header-height);
        padding: 20px 5%;
        width: 100%;
        height: calc(100dvh - var(--header-height));
        
        ul {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
            li a { font-size: 20px; }
        }
    }

    nav ul {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        gap: 1em;
        margin-right: 10px;
        li a { 
            color: var(--text-clr); 
            
            &.btn-primary {
                color: var(--bg-clr);   
                
                &:hover {
                    color: var(--bg-clr);
                    background-color: var(--title-clr);
                }
            }
        }    
    }

    /* Logo Container */
    &> a {
        margin-left: 10px;
        height: 70px;
        aspect-ratio: 3/1;
        img { width: 100%; aspect-ratio: 3/1; }
    }

    /* Icon hamburger */
    button {
        margin-right: 10px;
        cursor: pointer;
        background-color: transparent;
        border: none;
        width: 36px;
        aspect-ratio: 1/1;
        place-self: center end;
    }
}

/* Desktop */
@media screen and (min-width: 920px) {
    .header {
        nav {
            display: contents;
            ul { margin-left: auto; }
        }
        button { display: none; }
    }
}