:root {
  --color-brand: #2d6a4f;
  --color-brand-light: #40916c;
  --color-brand-pale: #d8f3dc;
  --color-brand-dark: #1b4332;
  --color-text: #1a1a2e;
}

html {
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeLegibility;
}

.hero-bg {
  background-color: var(--color-brand-dark);
}

.hero-pattern {
  background-image:
    radial-gradient(
      circle at 30% 20%,
      rgba(255, 255, 255, 0.15),
      transparent 35%
    ),
    linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0%, transparent 45%);
  background-size: 120% 120%;
  animation: heroDrift 18s ease-in-out infinite alternate;
}

@keyframes heroDrift {
  from {
    background-position: 0% 0%;
  }
  to {
    background-position: 100% 80%;
  }
}

.hero-visual {
  animation: heroFloat 5s ease-in-out infinite;
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.navbar-scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.service-card {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(45, 106, 79, 0.15);
  border-left: 4px solid var(--color-brand);
  border-color: rgba(45, 106, 79, 0.2);
}

.badge {
  display: inline-flex;
  align-items: center;
  background: var(--color-brand-pale);
  color: var(--color-brand);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.portfolio-card {
  transition:
    transform 0.25s ease,
    opacity 0.22s ease,
    box-shadow 0.25s ease;
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(45, 106, 79, 0.14);
}

.portfolio-card.is-filtered-out {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.portfolio-card.is-filtered-in {
  opacity: 0;
  transform: translateY(10px);
}

.portfolio-filter {
  background: #fff;
  border: 1px solid rgba(45, 106, 79, 0.2);
  color: var(--color-brand);
  border-radius: 0.7rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.portfolio-filter:hover,
.portfolio-filter.active {
  background: var(--color-brand);
  color: #fff;
  border-color: var(--color-brand);
}

.testimonial-slide {
  display: none;
}

.testimonial-slide.active {
  display: flex;
}

.testimonial-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: #cdd8d1;
  border: 0;
}

.testimonial-dot.active {
  background: var(--color-brand);
}

.option-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid rgba(45, 106, 79, 0.2);
  border-radius: 0.9rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.option-card:has(input:checked) {
  border-color: var(--color-brand);
  background-color: rgba(216, 243, 220, 0.5);
}

.option-card input {
  accent-color: var(--color-brand);
}

.devis-step {
  animation: stepFade 0.25s ease;
}

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

#devis-result {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
}

@media (max-width: 640px) {
  .hero-bg {
    min-height: 100svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-pattern,
  .hero-visual {
    animation: none;
  }

  .fade-in,
  .service-card,
  .portfolio-card {
    transition: none;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  #devis-result,
  #devis-result * {
    visibility: visible;
  }

  #devis-result {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 2rem;
    border: none;
    box-shadow: none;
  }

  .print-hidden {
    display: none !important;
  }
}
