:root {
  --main-color: #A3C651;
  --main-color-two: #3b3d32;
  --secondary-color: #6f6f6f;
  --white-color: #fff;
  --black-color: #000000;
  --gray-color: #e7e7e9;

  --main-color-button: #A3C651;
  --main-color-button-hover: #67944C;
  --main-color-button-active: #37633F;

  --font-size-nav: 18px;
  --font-size-title-S: clamp(14px, 4vw, 20px);
  --font-size-title-M: clamp(19px, 6vw, 28px);
  --font-size-title-L: clamp(30px, 8vw, 45px);
  --font-size-content-S: clamp(13px, 3vw, 14px);
  --font-size-content-M: clamp(14px, 3vw, 17px);
  --font-size-content-L: clamp(16px, 3vw, 18px);

  --width-content: clamp(150px, 90vw, 600px);
  --width-content-title: clamp(150px, 90vw, 800px);
}

*,
::after,
::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  &::selection {
    background-color: var(--main-color);
  }
}

svg {
  width: 24px;
  height: 24px;
  color: var(--black-color);
}

nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  gap: 3vw 5vw;
}

body {
  overscroll-behavior: none;
  font-family: sans-serif;
  color: var(--white-color);
  line-height: 150%;
}

/* Components */

/* Notificaiton Component */

.notification-container {
  position: fixed;
  top: 2%;
  left: 2%;
  max-width: 96%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
}

.notification {
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  overflow: hidden;
  animation: slideInOut 5s forwards;
}

/* Animation de glissement de gauche à droite */
@keyframes slideInOut {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }
  10% {
    opacity: 1;
    transform: translateX(0);
  }
  90% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-100%);
  }
}

@keyframes slideOut {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-100%);
  }
}

.notification p.notification-message{
  text-shadow: none;
}

.notification.disappearing {
  animation: slideOut 0.5s forwards;
}

/* Icon */
.notification-icon {
  display: flex;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

/* Barre de chargement comme enfant de .notification */
.notification .progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: #e0e0e0; /* Couleur par défaut */
  width: 100%;
  transform: translateX(100%); /* Cache la barre au départ */
  animation: progressBar 5s linear forwards;
}

/* Animation de la barre de chargement */
@keyframes progressBar {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Success */
.notification.success {
  background-color: #d1fae5;
  border-left: 4px solid #10b981;
  color: #047857;
}

.notification.success .progress-bar {
  background: #10b981;
}

.notification.success:hover {
  background-color: #a7f3d0;
}

/* Info */
.notification.info {
  background-color: #bfdbfe;
  border-left: 4px solid #3b82f6;
  color: #1e3a8a;
}

.notification.info .progress-bar {
  background: #3b82f6;
}

.notification.info:hover {
  background-color: #93c5fd;
}

/* Warning */
.notification.warning {
  background-color: #fef3c7;
  border-left: 4px solid #f59e0b;
  color: #78350f;
}

.notification.warning .progress-bar {
  background: #f59e0b;
}

.notification.warning:hover {
  background-color: #fde68a;
}

/* Error */
.notification.error {
  background-color: #fee2e2;
  border-left: 4px solid #ef4444;
  color: #7f1d1d; /* Red 900 */
}

.notification.error .progress-bar {
  background: #ef4444;
}

.notification.error:hover {
  background-color: #fecaca;
}

.notification-message {
  font-size: 12px;
  font-weight: 600;
  margin: 0;
}

/* Fin notifications */

.download-button {
  color: var(--black-color);
  text-decoration: none;
  border: 2px solid var(--main-color-button);
  padding: clamp(10px, 2vw, 20px) clamp(15px, 2vw, 25px);
  margin-bottom: 3dvh;
  font-size: var(--font-size-content-M);
  cursor: pointer;
  background: transparent;
  position: relative;
  overflow: hidden;

  &::before {
    content: "";
    position: absolute;
    height: 100%;
    width: 0%;
    top: 0;
    left: -40px;
    transform: skewX(45deg);
    background-color: var(--main-color-button);
    z-index: -1;
    transition: width 600ms;
  }

  &:hover {
    &::before {
      width: 160%;
    }
  }
  &:active {
    background-color: var(--main-color-button-hover);
    border: 2px solid var(--main-color-button-hover);
    &::before {
      z-index: -1;
    }
  }
}

/* Fin components */

.logo img {
  width: clamp(70px, 8vw, 100px);
  filter: drop-shadow(0px 3px 1px rgba(0, 0, 0, 1));
}

.menu__box,
.search {
  margin-top: 2dvh;
}

.search {
  margin-left: 12dvh;
}
nav ul,
.menu__box,
.rappel,
.search {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 3vw 5vw;
}

.search {
  display: none;
  align-items: center;
}

.search li:first-child {
  margin-right: 4vw;
  > a {
    display: flex;
  }
  > a img {
    width: 26px;
    height: 26px;
  }
}

/* Button download Header */

a.download-header{
  color: var(--white-color);
  font-size: var(--font-size-nav);
  text-transform: uppercase;
  font-weight: bolder;
  text-shadow: 2px 2px var(--black-color);
  margin-bottom: 0;
  border: none;
}

li:has(.download-header){
  display: flex;
}

a.download-header {
  color: var(--white-color);
  &::before {
    z-index: 0;
  }
  &:active {
    border: none;
  }
}

a.download-header span {
  position: relative;
  z-index: 2;
}

/* End button download header */

.rappel {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

nav li:first-child,
.menu__box li:first-child,
.rappel li:first-child {
  margin-left: 0;
}

.menu__item:not(.logo) {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--white-color);
  text-decoration: none;
  font-size: var(--font-size-nav);
  text-transform: uppercase;
  font-weight: bolder;
  padding-bottom: 2px;
  text-shadow: 2px 2px var(--black-color);

  &::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) scaleX(0);
    transform-origin: 50% 50%;
    width: 100%;
    height: 2px;
    background-color: var(--main-color);
    transition: transform 250ms;
  }

  &:hover {
    &::after {
      transform: translateX(-50%) scaleX(1);
    }
  }
}

.active::after {
  transform: translateX(-50%) scaleX(1) !important;
}

#menu__toggle {
  display: none;
}
#menu__toggle:checked + .menu__btn > span {
  transform: rotate(45deg);
}
#menu__toggle:checked + .menu__btn > span::before {
  top: 0;
  transform: rotate(0deg);
}
#menu__toggle:checked + .menu__btn > span::after {
  top: 0;
  transform: rotate(90deg);
}
#menu__toggle:checked ~ .menu__box {
  right: 0 !important;
}
.menu__btn {
  display: none;
  position: absolute;
  top: 3.5dvh;
  right: 2dvh;
  width: 26px;
  height: 26px;
  cursor: pointer;
}
.menu__btn > span,
.menu__btn > span::before,
.menu__btn > span::after {
  display: block;
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--white-color);
  transition-duration: 0.25s;
}

#menu__toggle:checked + .menu__btn > span,
#menu__toggle:checked + .menu__btn > span::before,
#menu__toggle:checked + .menu__btn > span::after {
  background-color: var(--black-color);
}

.menu__btn > span::before {
  content: "";
  top: -8px;
}
.menu__btn > span::after {
  content: "";
  top: 8px;
}

.group {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 200px;
}

.input {
  width: 100%;
  height: clamp(30px, 5vw, 50px);
  line-height: 28px;
  padding: 0 1rem;
  padding-left: 20px;
  border: 2px solid transparent;
  border-radius: 25px;
  outline: none;
  background-color: #f3f3f4;
  color: #0d0c22;
  transition: 0.3s ease;
  font-size: var(--font-size-content-M);
}

.footer_inputNav{
  height: 40px;
  font-size: var(--font-size-content-M);
}

.footer_group{
  width: clamp(400px, 70%, 70%);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.inputNav {
  height: 30px;
  font-size: var(--font-size-content-M);
}

.input::placeholder {
  color: var(--secondary-color);
}

.input:focus,
.inputNav:hover {
  outline: none;
  border-color: var(--main-color);
  background-color: var(--white-color);
}

.footer_group button, .formNav button{
  display: flex;
  align-items: center;
  position: absolute;
  right: clamp(13px, 2vw, 25px);
  border: none;
  border-radius: 10px;
}

.icon {
  fill: var(--secondary-color);
  width: 30px;
  height: 30px;
  padding: .35em;
  border-radius: 10px;
  transition: all 250ms;

  &:hover {
    cursor: pointer;
    background-color: var(--main-color-button);
    fill: var(--white-color);
  }
  &:active{
    background-color: var(--main-color-button-hover);
  }
}

.formNav .icon{
  width: 25px;
  height: 25px;
  padding: .3em;
}

.montagne {
  stroke: var(--white-color);
  filter: drop-shadow(0px 2px 1px rgba(0, 0, 0, 1));
  transition: stroke 250ms ease-out;
  &:hover {
    stroke: var(--main-color-button-hover);
  }
  &:active {
    stroke: var(--main-color-button-active);
  }
}

h1 {
  color: var(--black-color);
  margin-bottom: 3dvh;
  font-size: var(--font-size-title-L);
  line-height: normal;
}

h5 {
  color: var(--main-color);
  margin-bottom: 1dvh;
  font-size: var(--font-size-content-S);
  &::selection {
    background-color: var(--main-color-button-hover);
  }
}

h2 {
  position: relative;
  line-height: normal;
  &:after {
    content: "";
    border-bottom: 2px solid var(--main-color);
    position: absolute;
    bottom: -1dvh;
    left: 0%;
    width: clamp(100px, 10vw, 175px);
  }
}

h2,
h3 {
  color: var(--black-color);
  margin-bottom: 2.5dvh;
  font-size: var(--font-size-title-M);
  word-spacing: 1px;
}

h3 {
  font-size: var(--font-size-content-M);
  text-indent: 20px;
}

h4 {
  font-size: var(--font-size-content-S);
}

@media (max-width: 1600px) {
  .search {
    margin-left: 8dvh;
  }
}

@media (max-width: 1350px) {
  nav {
    justify-content: flex-start;
  }

  .logo {
    position: absolute;
    top: 1dvh;
    right: 255px;
    width: 26px;
    height: 26px;
    filter: invert(100%);
    > img {
      width: 30px;
    }
  }

  .menu__btn {
    display: flex;
    z-index: 101;
  }

  .menu__box {
    display: block;
    position: fixed;
    top: 0;
    right: -150%;
    width: 300px;
    height: 100%;
    margin: 0;
    padding: 80px 0;
    list-style: none;
    background-color: var(--white-color);
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
    transition-duration: 0.25s;
    z-index: 100;
  }

  .menu__item:not(.searchBarNav), .download-header span {
    padding: 12px 24px;
    color: var(--black-color) !important;
    transition-duration: 0.25s;
    text-shadow: 0 0 var(--black-color);
  }

  .download-header{
    padding: 12px 24px;
    width: 100%;
    background-color: var(--main-color);
    &::before {
      background-color: var(--main-color-button-hover);
    }
    &:active {
      background-color: var(--main-color-button-active);
    }
  }

  .download-header span{
    padding: 0;
  }

  .search {
    margin-left: 2dvh;
  }

  .menu__item:hover:not(.logo) {
    background-color: #cfd8dc;
  }

  .menu__box li {
    margin: 0;
  }

  .menu__item::after {
    background-color: var(--main-color);
  }

  .group {
    width: clamp(200px, 40vw, 450px);
  }

  .search {
    display: flex;
  }
}

@media (max-width: 430px) {
  .search li:first-child {
    display: none;
  }
}
