salutation, je debute en html/css et je voudrais insérer une barre de navigation. Jai essayer de copier une deja faite mais elle fonctionne pas ( mes connaissances en js sont tres basiques)
merci d'avance^^
voici le code:

<!-- START Navbar -->
<section class="navbar">
<div class="title">
<a class="logo" href="#">Swilam<span>DE</span></a>
<span><i id="nav-menu" class="fas fa-bars"></i></span>
</div>
<nav>
<i id="nav-exit" class="fas fa-times"></i>
<div class="home">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Features</a></li>
<li><a href="#">Pricing</a></li>
</ul>
</div>
<div class="contact">
<ul>
<li><a href="#">Contact</a></li>
<li><a class="premium" href="#">Go Premium</a></li>
</ul>
</div>
</nav>
</section>
<!-- End Navbar -->

/*
===============
NAVBAR
===============
*/
.navbar {
background: var(--white);
padding: 10px;
}
.logo {
font-weight: bold;
font-size: 1.4em;
color: var(--black);
}
.logo span {
color: var(--primary-500);
}
.title {
display: flex;
place-content: space-between;
}
#nav-menu {
margin-top: 5px;
font-size: 1.4em;
font-weight: bold;
cursor: pointer;
display: block;
}
nav {
position: fixed;
z-index: 99;
width: 66%;
right: 0;
top: 0;
background: var(--primary-600);
height: 100vh;
padding: 1em;
}
nav.menu-btn {
display: block;
}
.home {
margin-top: 3em;
margin-bottom: -100px;
}
nav a {
color: var(--white);
display: block;
padding: 0.5em;
font-size: 1.4em;
text-align: right;
}
nav a:hover {
font-weight: bold;
}
#nav-exit {
display: block;
float: right;
margin: 0.5em;
cursor: pointer;
font-size: 1.4em;
}

const mobileBtn = document.getElementById("nav-menu");
nav = document.querySelector("nav");
mobileBtnExit = document.getElementById("nav-exit");

mobileBtn.addEventListener("click", () => {
nav.classList.add("menu-btn");
});

mobileBtnExit.addEventListener("click", () => {
nav.classList.remove("menu-btn");
});