@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
:root {
  --primary-color: #583da7;
  --primary-light: #7f2fb1;
  --secondary-color: #cf15c2;
}

*,
*::before,
*::after {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scroll-padding-top: 100px; /* hauteur de ton header */
}

body::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background-color: #cccccc;
  border-radius: 20px;
  border: 3px solid #f1f1f1;
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--primary-color);
}

::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 20px;
  border: 3px solid #f1f1f1;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 1rem 10vw;
}

.animated-button {
  position: relative;
  overflow: hidden;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  background-color: transparent;
  transition: color 0.4s ease;
  text-decoration: none;
  display: inline-block;
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 0.5rem;
}

.animated-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #a02ccf 0%, #6f3cbf 50%, #3b3bb9 100%);
  transition: left 0.4s ease;
  z-index: 0;
}

.animated-button:hover::before {
  left: 0;
}

.animated-button span {
  position: relative;
  z-index: 1;
}

.animated-button:hover {
  color: white;
}

.sm-links {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 1rem;
}

.sm-links a svg {
  fill: white;
  height: 1rem;
}

.external-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-weight: 500;
  color: var(--secondary-color);
  transition: color 0.3s ease;
}

.arrow-icon {
  display: inline-flex;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow-icon svg {
  height: 1rem;
  fill: white !important;
}

.button-bg {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #a02ccf 0%, #6f3cbf 50%, #3b3bb9 100%);
  color: white;
  border: none;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  border: 2px solid var(--primary-color);
  transition: color 0.3s ease;
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 0.5rem;
}

.button-bg::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #a02ccf 0%, #6f3cbf 50%, #3b3bb9 100%);
  transition: transform 0.4s ease;
  transform: translateX(0%);
  z-index: 0;
}

.button-bg:hover::before {
  transform: translateX(100%);
}

.button-bg:hover {
  color: var(--primary-color);
  background: none;
}

.button-bg .button {
  z-index: 1;
}

.button-bg span {
  position: relative;
  z-index: 2;
  font-size: 1rem;
}

#scrollToTopBtn {
  background-color: white;
  display: none;
  position: fixed;
  bottom: 20px;
  right: 10vw;
  width: 50px;
  height: 50px;
  aspect-ratio: 1/1;
  max-width: 50px;
  z-index: 99;
  font-size: 18px;
  border: 2px solid var(--primary-color);
  outline: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  animation: movebtn 3s ease-in-out infinite;
}

#scrollToTopBtn svg {
  fill: var(--primary-color);
}

#scrollToTopBtn:hover {
  background-color: var(--primary-color);
}

#scrollToTopBtn:hover svg {
  fill: white;
}

@keyframes movebtn {
  0% {
    transform: translateY(0px);
  }

  25% {
    transform: translateY(20px);
  }

  50% {
    transform: translateY(0px);
  }

  75% {
    transform: translateY(-20px);
  }

  100% {
    transform: translateY(0px);
  }
}

.page-header {
  margin-bottom: 3rem;
  margin-top: 2rem;
  max-width: 80%;
}

.page-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1rem;
  font-weight: 400;
}

.not-found {
  max-width: 400px;
  margin: auto;
  text-align: center;
  padding: 5rem 0;
}

.not-found h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.not-found p {
  margin-bottom: 1rem;
}

.not-found p a {
  color: var(--primary-color);
}

@media only screen and (max-width: 900px) {
  .container {
    padding: 1rem 7.5vw;
  }

  .animated-button,
  .button-bg {
    padding: 0.7rem 0.9rem;
    font-size: 0.9rem;
  }
}

@media only screen and (max-width: 560px) {
  .container {
    padding: 1rem 5vw;
  }

  .animated-button,
  .button-bg {
    padding: 0.7rem 0.8rem;
    font-size: 0.9rem !important;
  }

  .button-bg span {
    font-size: 0.9rem !important;
  }
}

.toast {
  visibility: hidden;
  min-width: 250px;
  max-width: 90%;
  background-color: #333;
  color: #fff;
  text-align: left;
  border-radius: 8px;
  padding: 16px 20px;
  position: fixed;
  z-index: 9999;
  right: 30px; /* 👉 Position à droite */
  bottom: 30px;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.toast.show {
  visibility: visible;
  opacity: 1;
  transform: translateY(-10px); /* petite animation vers le haut */
}

.loader {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  position: relative;
  animation: rotate 1s linear infinite;
}
.loader::before,
.loader::after {
  content: "";
  box-sizing: border-box;
  position: absolute;
  inset: 0px;
  border-radius: 50%;
  border: 3px solid #fff;
  animation: prixClipFix 2s linear infinite;
}
.loader::after {
  inset: 2px;
  transform: rotate3d(90, 90, 0, 180deg);
  border-color: crimson;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes prixClipFix {
  0% {
    clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0);
  }
  50% {
    clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0);
  }
  75%,
  100% {
    clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%);
  }
}

.fadeIn {
  animation: fadeIn 0.35s forwards;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(-5px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

