/* Responsive header mentions légales mobile */
@media (max-width: 576px) {
  header {
    padding: 10px 0 0 0 !important;
  }
  .navbar {
    padding: 0 5px !important;
    min-height: 48px;
  }
  .navbar-brand {
    font-size: 0.95rem !important;
    margin-right: 8px !important;
  }
  .navbar-brand img {
    width: 28px !important;
    height: 28px !important;
    margin-right: 6px !important;
  }
  .navbar-toggler {
    padding: 4px 8px !important;
    font-size: 1.1rem !important;
    position: absolute;
    right: 8px;
    top: 8px;
    z-index: 100;
  }
  .navbar-toggler-icon {
    width: 24px !important;
    height: 24px !important;
  }
  .navbar-collapse {
    padding-top: 8px !important;
  }
  /* Centre les liens du menu hamburger */
  .navbar-nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .navbar-nav .nav-item {
    width: 100%;
    text-align: center;
  }
  .navbar-nav .nav-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 8px 0 !important;
  }
  /* Centre les liens du menu mentions légales dans le footer */
  footer .row .col-md-4 {
    text-align: center;
  }
  footer .row .col-md-4 a {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    text-align: center;
  }
  header h1 {
    font-size: 1.3rem !important;
    margin-top: 10px !important;
    margin-bottom: 8px !important;
    padding: 0 8px !important;
  }
  header nav {
    padding-bottom: 30px !important;
  }
}
/* Bouton scroll to top */
#scrollToTopBtn {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 9999;
  background: #5043c9;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
  opacity: 0.85;
}
#scrollToTopBtn:hover {
  opacity: 1;
  background: #7e73cc;
}
.header {
  height: 110vh;
  position: relative;
  overflow: hidden;
}

header h1 {
  /*font-size: 3vw;*/
  color: #ffffff;
  text-align: center;
  margin-top: 20px;
}

header p {
  font-size: 2rem;
  color: #ffffff;
  text-align: center;
  margin-top: 20px;
}

header li {
  color: #ffffff;
  text-decoration: none;
  margin: 10px;
  font-size: clamp(20px, 1.2vw, 90px);
}

/* Ajustement de la vague pour tablette */
.bottom-0-m {
  bottom: -20px;
}

.navbar-toggler {
  border: none;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255, 255, 255, 1)' stroke-width='2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
  transition: transform 0.4s ease;
}

.navbar-toggler-icon:hover {
  transform: scale(1.1);
}

.navbar-toggler:focus .navbar-toggler-icon {
  transform: scale(0.8);
}

.navbar-toggler.collapsed .navbar-toggler-icon {
  transform: scale(1.2);
}

.header nav {
  /*background-color: rgba(0, 0, 0, 0.1);*/
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.4) 60%,
    rgba(0, 0, 0, 0)
  );
  padding-bottom: 80px;
}

header hr {
  width: clamp(50px, 50%, 450px);
}

#mentions-legales {
  margin-top: 50px;
}

#mentions-legales h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

#mentions-legales p {
  margin-bottom: 10px;
  margin-left: 50px;
}

#cgps {
  margin-top: 50px;
}

#cgps h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

#cgps h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  margin-left: 50px;
}

#cgps p {
  margin-bottom: 10px;
  margin-left: 80px;
}

#cgu {
  margin-top: 50px;
}

#cgu p {
  margin-left: 50px;
  margin-bottom: 100px;
}

header img {
  width: clamp(30px, 20vw, 100px);
}

.bottom-m {
  margin-bottom: -5px;
}

h2 {
  color: #5043c9;
}

@media (prefers-color-scheme: dark) {
  body {
    background: #181828 !important;
    color: #f3f3f3 !important;
  }

  header {
    background: linear-gradient(135deg, #161622, #161622, #161622) !important;
    color: #f3f3f3 !important;
  }

  .navbar,
  .bg-primary-m {
    background-color: #161622 !important;
    color: #f3f3f3 !important;
    /* box-shadow: 0 8px 48px 0 rgba(80, 67, 201, 0.15), 0 4px 24px 0 rgba(0,0,0,0.18); */
  }

  .navbar-toggler-icon {
    /* Icône burger en blanc */
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(243,243,243,1)' stroke-width='2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
  }

  .header nav {
    background: linear-gradient(
      to bottom,
      rgba(24, 24, 40, 0.7) 60%,
      rgba(24, 24, 40, 0)
    ) !important;
  }

  /* Waves SVG dark mode */
  header svg path,
  .bottom-wave path {
    fill: #181828 !important;
    /* Optionally, you can add a slight opacity for a softer effect: */
    /* fill-opacity: 0.95 !important; */
  }

  h2,
  #mentions-legales h2,
  #cgps h2 {
    color: #b3b8f7 !important;
  }

  #cgps h3 {
    color: #e0e3fa !important;
  }

  #mentions-legales p,
  #cgps p,
  #cgu p {
    color: #f3f3f3 !important;
  }

  footer.bg-dark,
  footer {
    background-color: #161622 !important;
    color: #f3f3f3 !important;
  }

  footer a {
    color: #f3f3f3 !important;
  }

  footer hr.bg-white {
    background-color: #444 !important;
  }
}
