* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, sans-serif;
  color: #333;
  background: #fff;
  line-height: 1.6;
}

header {
  /* position: sticky; */
  /* top: 0; */
  z-index: 999;
  background-color: #fff;
}

.scroll-header {
  position: fixed;
  top: 0;
  width: 100%;
  transform: translateY(-100%); /* Masqué par défaut */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-header.visible {
  transform: translateY(0);
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 1rem;
  overflow: visible;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.intro {
  position: absolute;
  width: 100vw;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.logo .bold {
  color: #111;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
}

.nav-links a,
.nav-links button {
  text-decoration: none;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border: none;
  border-radius: 1rem;
  color: black;
  cursor: pointer;
  background: none;
  transition: background-color 200ms ease-out;

  &:hover {
    background-color: #eee;
  }
}

/* Menu toggle hidden on desktop */
.menu-toggle {
  display: none;
  cursor: pointer;
}

.btn {
  background: black;
  color: white;
  border-radius: 5px;
}

.btn-secondary {
  border: 1px solid #999;
  border-radius: 5px;
}

.hero {
  background: #f5f5f5;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
}

.hero p {
  font-size: 1.2rem;
  margin-top: 1rem;
}

#particles-js {
  height: 90vh;
}

#about,
.use-case {
  display: flex;
  gap: 2rem;
  align-items: center;
  padding: 2rem 1rem;

  video {
    border-radius: 0.5em;
  }
}

.image-placeholder,
video {
  height: 200px;
  width: calc(200px * 16 / 9);
  border-radius: 0.5em;
}

.image-placeholder {
  background: #ddd;
}

#about div,
.use-case div {
  flex: 1;
}

.contact h2 {
  text-align: center;
  margin-bottom: 1rem;
}

form {
  max-width: 400px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

form input,
form textarea {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

form button {
  background: #111;
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 5px;
}

.more-info {
  margin-top: 1rem;
  padding: 0.4rem 1rem;
  background: transparent;
  color: #111;
  border: solid 1px #111;
  border-radius: 5px;
  cursor: pointer;
}

.tag {
  display: inline-block;
  font-size: 0.5rem;
  background: #eee;
  color: #555;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  margin-left: 0.5rem;
}

footer {
  background: #f9f9f9;
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

.footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.footer .contact {
  display: flex;
  flex-flow: column nowrap;
  font-size: 1rem;
  font-weight: 300;

  span {
    display: flex;
    align-items: center;
  }

  a {
    margin: 0.5rem;
  }
}

footer ul {
  list-style: none;
  padding: 0;
}

footer li {
  margin-bottom: 0.5rem;
}

footer a {
  text-decoration: none;
  color: #555;
}

footer {
  .vertical-contact {
    display: flex;
    flex-flow: column;
    flex-grow: 1;
  }

  .horizontal-container {
    display: flex;
    flex-flow: row;
    flex-grow: 2;
    gap: 2rem;
    justify-content: space-between;
  }
}

.socials {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: flex-start;
  align-items: center;
}

.socials img {
  width: 32px;
  height: 32px;
  filter: grayscale(100%);
  transition:
    filter 200ms ease-in-out,
    transform 200ms ease-in-out;
}

.socials img:hover {
  filter: grayscale(0%);
  transform: scale(1.05);
}

#carousel .categories {
  text-align: center;
  margin-bottom: 1rem;
}

#carousel .categories button {
  margin: 0.25rem;
  padding: 0.5rem 1rem;
  border: 1px solid #aaa;
  color: black;
  border-radius: 20px;
  background: none;
  cursor: pointer;
  transition: background-color 200ms ease-out;

  &:hover {
    background-color: #eee;
  }
}

#carousel .categories .active {
  background: #000;
  color: white;

  &:hover {
    background-color: #555;
  }
}

.carousel-content .carousel-item {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}

.carousel-content .active {
  display: block;
}

.carousel-item {
  margin: 1em;
  transition: opacity 600ms ease;
}

.carousel-item .active {
  opacity: 1;
}

.carousel-item .item-content {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 1rem;

  & > * {
    max-width: 50vw;
  }

  h3 {
    display: flex;
    flex-flow: row;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    /* Adjust depending on your header height */
    top: 60px;
    left: 0;
    right: 0;
    background-color: white;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    display: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    margin: 0.5rem 0;

    a {
      display: block;
      width: 100%;
      text-align: left;
    }
  }

  #about,
  .use-case {
    flex-direction: column;
    padding: 1rem;

    .image-placeholder {
      flex: none;
    }
  }

  .carousel-item .item-content {
    flex-direction: column;
    & > * {
      max-width: 100%;
    }
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
