/*
 * Service detail pages (Landing page, Portfolio, Blog), from the mockups "Exemple page …".
 * The three pages share these sections; only their content and hero image change.
 */
.prestation-included,
.prestation-cta {
  --prestation-olive-light: color-mix(in srgb, var(--color-olive) 72%, var(--color-cream));
}

@supports (color: oklch(from red l c h)) {
  .prestation-included,
  .prestation-cta {
    --prestation-olive-light: oklch(from var(--color-olive) calc(l + 0.12) calc(c + 0.02) h);
  }
}

/* Hero: blurred tropical photo, dark veil, thin rounded frame. */
.prestation-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(20px, 2.6vw, 38px) clamp(16px, 4.2vw, 60px) clamp(20px, 2.3vw, 33px);
  background-color: var(--color-olive-ink);
  color: var(--color-cream);
  text-align: center;
}

.prestation-hero__image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px);
  scale: 1.06;
}

.prestation-hero--landing-page .prestation-hero__image {
  object-position: 50% 45%;
}

.prestation-hero--portfolio .prestation-hero__image {
  object-position: 50% 30%;
}

.prestation-hero--blog .prestation-hero__image {
  object-position: 50% 35%;
}

.prestation-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgb(28 31 13 / 55%), rgb(28 31 13 / 62%));
}

.prestation-hero__frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: clamp(420px, 36.5vw, 525px);
  padding: 56px clamp(20px, 4vw, 56px);
  border: 1px solid rgb(248 245 239 / 45%);
  border-radius: clamp(18px, 1.8vw, 26px);
}

.prestation-hero__eyebrow {
  color: var(--color-powder);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.prestation-hero__title {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 500;
  line-height: 1.05;
}

.prestation-hero__tagline {
  margin-top: 10px;
  color: var(--color-powder);
  font-family: var(--font-serif);
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.25;
  text-wrap: balance;
}

.prestation-hero__description {
  max-width: 640px;
  margin-top: 20px;
  color: rgb(248 245 239 / 85%);
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  font-weight: 300;
  line-height: 1.65;
  text-wrap: pretty;
}

.prestation-hero__audiences {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.prestation-hero__audience {
  padding: 8px 20px;
  border: 1px solid rgb(248 245 239 / 38%);
  border-radius: var(--radius-pill);
  background-color: rgb(248 245 239 / 8%);
  font-size: 0.875rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

/* Examples: chocolate background, centered project with its neighbours peeking. */
.prestation-examples {
  --slide-width: min(760px, 78vw);
  --slide-gap: clamp(20px, 4vw, 64px);

  overflow: hidden;
  padding: clamp(64px, 7.6vw, 110px) 0 clamp(64px, 7vw, 100px);
  background-color: var(--color-brown-warm);
  color: var(--color-cream);
  text-align: center;
}

.prestation-examples__intro {
  padding-inline: 20px;
}

.prestation-examples__title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 3.6vw, 3.25rem);
  font-weight: 500;
  line-height: 1.1;
}

.prestation-examples__title em,
.prestation-cta__title em {
  color: var(--color-powder);
  font-style: italic;
}

.prestation-examples__subtitle {
  margin-top: 12px;
  color: rgb(248 245 239 / 60%);
  font-size: 0.9375rem;
  font-weight: 300;
}

/* Waiting state: the carousel composition, without any project in it. */
.prestation-examples__waiting {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--slide-width);
  aspect-ratio: 16 / 10;
  margin: clamp(40px, 4vw, 56px) auto 0;
  padding: 32px;
  border: 1px solid rgb(248 245 239 / 22%);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 40%, rgb(239 210 204 / 10%), transparent 65%),
    rgb(248 245 239 / 4%);
}

.prestation-examples__ghost {
  position: absolute;
  top: 50%;
  width: 60%;
  height: 80%;
  border: 1px solid rgb(248 245 239 / 12%);
  border-radius: 18px;
  background-color: rgb(248 245 239 / 3%);
  translate: 0 -50%;
}

.prestation-examples__ghost--left {
  right: calc(100% + var(--slide-gap));
}

.prestation-examples__ghost--right {
  left: calc(100% + var(--slide-gap));
}

.prestation-examples__waiting-text {
  max-width: 24ch;
  color: var(--color-cream);
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.2;
  text-wrap: balance;
}

/* Carousel. Without JS it is a horizontal scroll-snap list. */
.prestation-carousel {
  margin-top: clamp(40px, 4vw, 56px);
}

.prestation-carousel__stage {
  position: relative;
}

.prestation-carousel__viewport {
  overflow-x: auto;
  padding-inline: calc((100% - var(--slide-width)) / 2);
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.prestation-carousel__track {
  position: relative;
  display: flex;
  gap: var(--slide-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.prestation-carousel__slide {
  flex: 0 0 var(--slide-width);
  scroll-snap-align: center;
}

.prestation-project {
  margin: 0;
}

.prestation-project__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 24px 48px rgb(0 0 0 / 35%);
}

.prestation-project__link {
  display: block;
  border-radius: 14px;
}

.prestation-project__link:focus-visible {
  outline: 3px solid var(--color-powder);
  outline-offset: 4px;
}

.prestation-project__caption {
  display: grid;
  gap: 4px;
  margin-top: 24px;
}

.prestation-project__name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
}

.prestation-project__description {
  color: rgb(248 245 239 / 70%);
  font-size: 0.9375rem;
  font-weight: 300;
}

.prestation-carousel.is-carousel .prestation-carousel__viewport {
  overflow: hidden;
  padding-inline: 0;
  touch-action: pan-y;
}

.prestation-carousel.is-carousel .prestation-carousel__track {
  transition: transform 900ms var(--ease-out);
}

.prestation-carousel.is-carousel .prestation-carousel__slide {
  transition:
    opacity 900ms var(--ease-out),
    scale 900ms var(--ease-out);
}

.prestation-carousel.is-carousel .prestation-carousel__slide[aria-hidden="true"] {
  opacity: 0.4;
  scale: 0.86;
}

.prestation-carousel__arrow {
  position: absolute;
  top: calc(var(--slide-width) * 0.3125);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: var(--color-cream);
  color: var(--color-brown);
  box-shadow: 0 6px 16px rgb(0 0 0 / 30%);
  cursor: pointer;
  translate: 0 -50%;
  transition: scale var(--duration-base) var(--ease-out);
}

.prestation-carousel__arrow:hover {
  scale: 1.08;
}

.prestation-carousel__arrow:focus-visible {
  outline: 3px solid var(--color-powder);
  outline-offset: 3px;
}

.prestation-carousel__arrow svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.prestation-carousel__arrow--previous {
  right: calc(50% + var(--slide-width) / 2 - 20px);
}

.prestation-carousel__arrow--next {
  left: calc(50% + var(--slide-width) / 2 - 20px);
}

.prestation-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.prestation-carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background-color: rgb(248 245 239 / 35%);
  cursor: pointer;
  transition:
    width var(--duration-base) var(--ease-out),
    background-color var(--duration-base) var(--ease-out);
}

.prestation-carousel__dot[aria-current="true"] {
  width: 24px;
  background-color: var(--color-powder);
}

.prestation-carousel__dot:focus-visible {
  outline: 2px solid var(--color-powder);
  outline-offset: 3px;
}

/* Included: cream, title on the left, five numbered chocolate bands on the right. */
.prestation-included {
  padding: clamp(64px, 7vw, 100px) 20px clamp(72px, 7.6vw, 110px);
  background: linear-gradient(
    to bottom,
    var(--color-cream),
    color-mix(in srgb, var(--color-cream) 86%, var(--color-olive))
  );
  color: var(--color-brown);
}

.prestation-included__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  gap: 40px clamp(40px, 6vw, 96px);
  max-width: 1200px;
  margin-inline: auto;
}

.prestation-included__eyebrow {
  color: rgb(45 22 6 / 70%);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.prestation-included__title {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 3.4vw, 3rem);
  font-weight: 500;
  line-height: 1.12;
}

.prestation-included__title em {
  display: block;
  color: var(--prestation-olive-light);
  font-style: italic;
}

.prestation-included__list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prestation-included__item {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 56px;
  padding: 12px 24px;
  border-radius: 12px;
  background-color: var(--color-brown-warm);
  box-shadow: 0 8px 18px rgb(45 22 6 / 14%);
  color: var(--color-cream);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.prestation-included__number {
  flex-shrink: 0;
  color: rgb(248 245 239 / 60%);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

/* Call to action: olive gradient, centered. */
.prestation-cta {
  padding: clamp(72px, 7.6vw, 110px) 20px clamp(80px, 8.3vw, 120px);
  background: linear-gradient(to bottom, var(--prestation-olive-light), var(--color-olive-deep));
  color: var(--color-cream);
  text-align: center;
}

.prestation-cta__title {
  font-family: var(--font-serif);
  font-size: clamp(2.125rem, 3.4vw, 3rem);
  font-weight: 500;
  line-height: 1.15;
  text-wrap: balance;
}

.prestation-cta__price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.prestation-cta__price-from {
  color: rgb(248 245 239 / 75%);
  font-size: 0.875rem;
}

.prestation-cta__price-amount {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.prestation-cta__button {
  --btn-bg: var(--color-cream);
  --btn-color: var(--color-brown);
  --btn-border: var(--color-cream);
  --btn-hover-mix: var(--color-powder);
  --btn-focus: var(--color-cream);

  margin-top: 28px;
  min-height: 48px;
  font-size: 0.9375rem;
  font-weight: 700;
}

@media (max-width: 899.98px) {
  .prestation-included__inner {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
  }
}

@media (max-width: 639.98px) {
  .prestation-examples {
    --slide-width: 82vw;
    --slide-gap: 16px;
  }

  .prestation-hero__frame {
    padding-block: 48px;
  }

  .prestation-included__item {
    padding-inline: 18px;
  }

  .prestation-carousel__arrow {
    width: 36px;
    height: 36px;
  }

  .prestation-carousel__arrow--previous {
    right: calc(50% + var(--slide-width) / 2 - 24px);
  }

  .prestation-carousel__arrow--next {
    left: calc(50% + var(--slide-width) / 2 - 24px);
  }
}

/* Reveal: hidden only once JS is ready and motion is allowed, see reveal_controller.js. */
.prestation-hero [data-reveal-target="item"],
.prestation-examples [data-reveal-target="item"],
.prestation-included [data-reveal-target="item"],
.prestation-cta [data-reveal-target="item"] {
  transition:
    opacity 800ms var(--ease-out) var(--reveal-delay, 0ms),
    translate 800ms var(--ease-out) var(--reveal-delay, 0ms);
}

.prestation-hero__title,
.prestation-included__item:nth-child(1) {
  --reveal-delay: 100ms;
}

.prestation-hero__tagline,
.prestation-included__item:nth-child(2) {
  --reveal-delay: 200ms;
}

.prestation-hero__description,
.prestation-included__item:nth-child(3),
.prestation-cta__price {
  --reveal-delay: 300ms;
}

.prestation-hero__audiences,
.prestation-included__item:nth-child(4) {
  --reveal-delay: 400ms;
}

.prestation-included__item:nth-child(5),
.prestation-cta [data-reveal-target="item"]:last-child {
  --reveal-delay: 500ms;
}

@media (prefers-reduced-motion: no-preference) {
  .prestation-hero.is-reveal-ready [data-reveal-target="item"]:not(.is-revealed),
  .prestation-examples.is-reveal-ready [data-reveal-target="item"]:not(.is-revealed),
  .prestation-included.is-reveal-ready [data-reveal-target="item"]:not(.is-revealed),
  .prestation-cta.is-reveal-ready [data-reveal-target="item"]:not(.is-revealed) {
    opacity: 0;
    translate: 0 24px;
  }

  .prestation-hero__image {
    animation: prestation-hero-settle 2400ms var(--ease-out) both;
  }
}

@keyframes prestation-hero-settle {
  from {
    scale: 1.14;
  }

  to {
    scale: 1.06;
  }
}

@media (prefers-reduced-motion: reduce) {
  .prestation-carousel__slide,
  .prestation-carousel__track {
    transition: none !important;
  }
}
