/* Reset & Font */
body,
h1,
h2,
p,
a {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: linear-gradient(135deg, #ff9a9e, #fad0c4, #fbc2eb, #a6c1ee);
  background-size: 400% 400%;
  animation: gradientBG 25s ease infinite;
  padding-bottom: 50px;
  scroll-behavior: smooth;
  perspective: 1000px;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Carré Glass */
.glass-container {
  position: relative;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 25px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 50px 35px;
  text-align: center;
  max-width: 650px;
  width: 90%;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
  animation: float 6s ease-in-out infinite, fadeIn 1.5s ease forwards;
  opacity: 0;
  overflow: hidden;
  margin-top: 50px;
  transition: transform 0.2s ease;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Reflet dynamique */
.glass-container::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at var(--shineX, 30%) var(--shineY, 30%),
    rgba(255, 255, 255, 0.2),
    transparent 70%
  );
  transform: rotate(25deg);
  pointer-events: none;
  transition: transform 0.1s ease;
}

/* Logo */
.logo {
  max-width: 80%;
  height: auto;
  margin-bottom: 30px;
  transition: transform 0.5s ease;
}

.logo:hover {
  transform: scale(1.05) rotate(-1deg);
}

/* Texte principal */
.glass-container h1 {
  color: #356c66;
  font-size: 1.4rem;
  margin-bottom: 15px;
  line-height: 1.6rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 1s forwards;
  animation-delay: 0.5s;
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bouton animé premium */
.btn {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 50px;
  background: linear-gradient(270deg, #ffffff66, #ffffff33, #ffffff66);
  background-size: 600% 600%;
  color: #356c66;
  border: 2px solid #000;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
  animation: btnGradient 8s ease infinite;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 20px #356c66;
}

@keyframes btnGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Features */
.features {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  max-width: 900px;
  width: 90%;
  margin-top: 50px;
  gap: 20px;
}

.feature {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 20px;
  padding: 20px;
  flex: 1 1 200px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.feature img {
  width: 50px;
  height: 50px;
  margin-bottom: 10px;
}

.feature h2 {
  font-size: 1.1rem;
  color: #356c66;
  margin-bottom: 10px;
}

.feature p {
  font-size: 0.95rem;
  color: #356c66;
}

/* Testimonials */
.testimonials {
  max-width: 900px;
  width: 90%;
  margin-top: 50px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.testimonial {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  padding: 20px;
  flex: 1 1 250px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.testimonial p {
  font-size: 0.95rem;
  color: #356c66;
  margin-bottom: 10px;
}

.testimonial h3 {
  color: #356c66;
  font-weight: 600;
  font-size: 1rem;
}

/* Footer */
footer {
  margin-top: 50px;
  text-align: center;
  color: #356c66;
  font-size: 0.9rem;
}

footer a {
  color: #356c66;
  margin: 0 5px;
  text-decoration: none;
  transition: color 0.3s;
}

footer a:hover {
  color: #000;
}

/* Animation au scroll */
.show {
  opacity: 1;
  transform: translateY(0);
}

/* Pop-up Cookies */
.cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.2);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Pop-up Cookies centrée */
.cookie-popup {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  padding: 30px 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 500px;
  width: 90%;
}

.cookie-popup p {
  margin: 0;
  font-size: 1rem;
  color: #356c66;
  text-align: center;
}

.cookie-popup .btn {
  padding: 12px 30px;
  font-size: 1rem;
  border-radius: 50px;
  border: 2px solid #000;
  cursor: pointer;
  background: linear-gradient(270deg, #ffffff66, #ffffff33, #ffffff66);
  color: #356c66;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cookie-popup .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .glass-container h1 {
    font-size: 1.2rem;
    line-height: 1.5rem;
  }
  .btn {
    padding: 14px 30px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .glass-container {
    padding: 30px 20px;
  }
  .glass-container h1 {
    font-size: 1rem;
    line-height: 1.4rem;
  }
  .btn {
    padding: 12px 25px;
    font-size: 0.95rem;
  }
  .features,
  .testimonials {
    flex-direction: column;
    align-items: center;
  }
}

#backToTop {
  display: none; /* caché par défaut */
  position: fixed; /* reste visible par rapport à l'écran */
  bottom: 80px; /* distance flottante du bas */
  right: 40px;
  z-index: 100;
  padding: 15px 20px;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(270deg, #ffffff66, #ffffff33, #ffffff66);
  background-size: 600% 600%;
  color: #356c66;
  border: 2px solid #000;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 20px #356c66;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
  animation: btnGradient 8s ease infinite;
  opacity: 0; /* invisible au départ */
}

#backToTop.show {
  display: block;
  opacity: 1; /* devient visible */
}

#backToTop:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 25px #356c66;
}
