/* Base */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#accueil,
#services,
#temoignages {
  scroll-margin-top: 90px;
}

@media (min-width: 1024px) {
  #accueil,
  #services,
  #temoignages {
    scroll-margin-top: 130px;
  }
}

/* Navigation */
.nav-bar {
  height: 80px;
}

@media (min-width: 1024px) {
  .nav-bar {
    height: 120px;
  }
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 1px;
  background: var(--white);
  transition: right .25s ease;
}

.nav-link:hover::after {
  right: 0;
}

.brand-logo {
  transition: transform .3s ease;
}

.brand-logo:hover {
  transform: scale(1.06);
}

.nav-logo {
  filter: brightness(0) invert(1);
}

/* Footer */
.footer-glow {
  background: radial-gradient(circle at 8% 100%, rgba(var(--primary-700-rgb), .25), transparent 40%);
}

/* Home — hero */
.grain {
  background-image: radial-gradient(rgba(var(--primary-900-rgb), .055) .65px, transparent .65px);
  background-size: 8px 8px;
}

.image-frame {
  transform: rotate(1.5deg);
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}

.image-frame:hover {
  transform: rotate(0deg) translateY(-4px);
}

.reveal {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: reveal .8s ease both;
  }

  @keyframes reveal {
    from {
      opacity: 0;
      transform: translateY(18px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Home — service tiles */
.service-tile {
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.service-tile:hover {
  transform: translateY(-7px);
  box-shadow: 0 22px 50px rgba(var(--primary-900-rgb), .11);
  border-color: var(--primary-200);
}

.service-image {
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.service-tile:hover .service-image {
  transform: scale(1.045);
}

/* Shared reveal-on-scroll card (driven by the IntersectionObserver in script.js) */
.service-card {
  transition: transform 700ms cubic-bezier(.2, .9, .2, 1), opacity 700ms ease;
  will-change: transform, opacity;
  opacity: 0;
  transform: translateY(24px);
}

.service-card.in-view {
  opacity: 1;
  transform: translateY(0);
}

.service-card:hover {
  transform: translateY(-6px);
}

/* About page */
.about-card {
  overflow: hidden;
  border-radius: 1rem;
  width: 100%;
  height: 100%;
  max-height: 520px;
  box-shadow: 0 10px 30px rgba(var(--primary-800-rgb), 0.08);
}

.about-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.about-text p {
  color: var(--primary-800);
}

@media (max-width: 768px) {
  .about-card {
    max-height: 360px;
  }
}

/* Services page — price calculator */
.price-card {
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

.price-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 45px rgba(var(--primary-900-rgb), .08);
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "⌄";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-55%);
  color: var(--accent);
  pointer-events: none;
  font-size: 18px;
}

.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 48px;
}

.result-empty {
  background:
    radial-gradient(circle at 85% 15%, rgba(var(--primary-300-rgb), .12), transparent 28%),
    var(--white);
}

.metric {
  background: linear-gradient(145deg, rgba(var(--primary-100-rgb), .18), rgba(var(--primary-200-rgb), .1)), var(--white);
}

.soft-divider {
  background: linear-gradient(90deg, transparent, var(--primary-200), transparent);
}

/* Form page — booking form */
.field {
  transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}

.field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .10);
  background: var(--white);
}

.contact-card {
  background:
    radial-gradient(circle at 85% 10%, rgba(var(--white-rgb), .18), transparent 25%),
    radial-gradient(circle at 10% 90%, rgba(var(--primary-700-rgb), .25), transparent 30%),
    var(--accent);
}

.form-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--primary-200-rgb), .1), transparent 25%),
    var(--white);
}

.service-option {
  transition: all .2s ease;
}

.service-option:hover {
  border-color: var(--primary-300);
  transform: translateY(-1px);
}

.service-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--primary-50);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .08);
}

.service-option input:checked+div .radio-dot {
  opacity: 1;
  transform: scale(1);
}

.radio-dot {
  opacity: 0;
  transform: scale(.5);
  transition: all .2s ease;
}

.step-line {
  background: linear-gradient(90deg, var(--accent), var(--primary-200));
}

.submit-button {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-radius: 1rem;
  background: var(--accent) !important;
  color: var(--white) !important;
  cursor: pointer;
  font-weight: 600;
  opacity: 1 !important;
  visibility: visible !important;
}

.submit-button:hover {
  background: var(--primary-700) !important;
}

.submit-button:disabled {
  cursor: wait;
  opacity: .6 !important;
}

@media (prefers-reduced-motion: no-preference) {
  .fade-up {
    animation: fadeUp .7s ease both;
  }

  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(16px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
