/* ========================================
   Comptoir Web - Custom Styles
   ======================================== */

/* --- Navbar floating --- */
.nav-floating {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

@supports not (backdrop-filter: blur(12px)) {
  .nav-floating {
    background: rgba(255, 255, 255, 0.97);
  }
}

/* --- Hover pill (nav desktop) --- */
#nav-hover-pill {
  position: absolute;
  background: rgba(22, 163, 74, 0.08);
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  opacity: 0;
}

#nav-hover-pill.active {
  opacity: 1;
}

/* --- Mobile menu animations --- */
.menu-entering {
  animation: menuSlideIn 0.3s ease-out forwards;
}

.menu-leaving {
  animation: menuSlideOut 0.2s ease-in forwards;
}

@keyframes menuSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes menuSlideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* --- Animations (IntersectionObserver driven) --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-up {
  animation: slideUp 0.6s ease-out forwards;
}

/* --- Gradient text --- */
.gradient-text {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Glass card --- */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

@supports not (backdrop-filter: blur(10px)) {
  .glass {
    background: rgba(255, 255, 255, 0.95);
  }
}

/* --- Noise texture overlay --- */
.noise::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
  z-index: 1;
}

/* --- SVG line drawing animation --- */
.svg-draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
}

.svg-draw.active {
  animation: draw 1.5s ease-out forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* --- FAQ details/summary --- */
details summary {
  cursor: pointer;
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::marker {
  display: none;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in,
  .animate-slide-up {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .svg-draw.active {
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }

  .menu-entering,
  .menu-leaving {
    animation: none !important;
  }
}
