:root {
    --base-clr: #4b4d9c;
    --secondarybase-clr: #2c2c39;
    --background-clr: #3f3c7e;
    --buttons-clr: #9194e4;
    --text-clr: #f3f2fa;
    --highlights-clr: #f2d675;
}

* {
    margin: 0;
    padding: 0;
}

html {
    font-family: Tahoma, Verdana, Serif; /*Change later*/
    line-height: 1.5rem;
    overflow-y: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

.hidden{
    display: none !important;
}

/*grid layout*/
.screen {
    margin: 4em 8em;
    background-color: var(--base-clr);
    display: grid;
    height: 85vh;
    color: var(--text-clr);
    grid-template-columns: auto 1fr;
    border: 5px solid #3e35c6;
    position: relative;

    > main > a {
        text-decoration: none;
    }
}

/*sidebar styling*/
#sidebar {
    box-sizing: border-box;
    height: 100%;
    width: 250px;
    padding: 5px 1em;
    background-color: var(--secondarybase-clr);
    border-right: 1px solid var(--text-clr);
    z-index: 1000;
    position: sticky;
    top: 0;
    align-self: start;
    transition: 200ms ease-in-out;
    overflow: hidden;
    text-wrap: nowrap;
}

#sidebar.close {
    padding: 5px;
    width: 60px;
}

#sidebar ul {
    list-style: none;
}

#sidebar > ul > li:first-child {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

#sidebar .logo {
    background-color: var(--text-clr);
    height: 5em;
    width: 100%;
    transition: all 300ms ease-in-out;
    border-radius: 10px;
}

#sidebar.close .logo {
    height: 2em;
    width: 2em;
    margin: 1em auto;
    padding: 0.5em;
}


#sidebar ul li.active a{
    color: var(--text-clr);
    font-weight: bold;

    svg {
        fill: var(--text-clr);
    }
}

#sidebar ul li ul.sub-menu li.activeSub a{
    color: var(--highlights-clr);
    font-weight: bold;

    svg {
        fill: var(--text-clr);
    }
}

#sidebar a,
#sidebar .dropdown-btn,
#sidebar .projectsLinks div,
#sidebar .creationsLinks div{
    border-radius: 5em;
    padding: .85em;
    text-decoration: none;
    color: var(--text-clr);
    display: flex;
    align-items: center;
    gap: 1em;

    margin-top: 2.5em;
}

#sidebar .sub-menu {
    display: grid;
    grid-template-rows: 0fr;
    transition: 300ms ease-in-out;

    > div {
        overflow: hidden;
    }
}

#sidebar .sub-menu.show {
    grid-template-rows: 1fr;
}

#sidebar .sub-menu a {
    padding-left: 2em;
}

#toggle-btn {
    margin-left: auto;
    padding: 1em;
    border: none;
    background: none;
    cursor: pointer;

    svg {
        transition: rotate 150ms ease;
    }
}

.dropdown-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
}

#sidebar svg {
    flex-shrink: 0;
    fill: var(--text-clr);
}

/*animation btn*/
.dropdown-btn svg {
    transition: 200ms ease-in-out;
}

.rotate svg:last-child {
    rotate: 180deg;
}

/*end animation btn*/

#sidebar span,
#sidebar.dropdown-btn span,
#sidebar .projectsLinks div,
#sidebar .creationsLinks div{
    flex-grow: 1;
}

.active{
    background-color: var(--highlights-clr);
    border-radius: 30px;
}

/*sub navbar projects*/

.projectsLinks span:hover,
.creationsLinks span:hover{
    cursor: pointer;
}

.projectsLinks .activeSub,
.creationsLinks .activeSub {
    color: var(--highlights-clr);
    font-weight: bold;
}


/* ecran principal */

.main {
    padding: 1em;

    h2 {
        margin: 2em;
        font-size: 50px;
        text-align: center;
    }

    button {
        display: flex;
        align-items: center;
        background-color: var(--buttons-clr);
        padding: 1em;
        border-radius: 30px;
        margin: 5em 0 5em 2em;

        font-weight: bolder;
        transition: 300ms ;
        svg{
            margin-left: .5em;
        }
    }
}

.sections {
    padding: 0 2em;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 3em;
    height: 45%;

    div {
        background-color: var(--buttons-clr);
        width: 100%;
    }

}

#downloadCV:hover{
    scale: 105%;
    cursor: pointer;
    transition: all 200ms;
}

/*about me page */

main#quiSuisJe{
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: center;
}

#personna{
    width: 100%;
}

/*ecran project portfolio*/

.main#portfolio {
    margin: -16px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.banner{
    display: flex;
    justify-content: center;
    flex-direction: column;
    background-color: var(--buttons-clr);
    height: 35%;

    h2{
        margin: .5em;
    }

    h3{
        text-align: center;
        padding-left: 13em;
        padding-right: 13em;
    }
}

.principal.project1 {
    display: grid;
    grid-template-columns: 60% 40%;
    flex-grow: 1;
    overflow: hidden;
    align-items: center;
    justify-content: center;

    p {
        padding: 4em;
        font-size: 12px;
    }
}

/* carousel */

.carousel{
    margin: 2em;
}

#lightgallery{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 1em;
    width: 100%;
    height: 100%;
}

#lightgallery a {
    flex-shrink: 0;
}

#lightgallery img:hover {
    transform: scale(1.05);
}

[id*="thumb"] {
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}
