/* ==========================================================================
   Homepage
   ========================================================================== */

.coffee-home {
  --home-title: clamp(2.25rem, 4vw, 3.75rem);
  --home-lead: clamp(1.25rem, 2vw, 1.5rem);
  --home-body: clamp(1.125rem, 1.5vw, 1.3125rem);
  --home-kicker: 1.125rem;
  --home-brand: clamp(1.5rem, 2.5vw, 2rem);
  overflow-x: clip;
}

.coffee-home-title {
  margin: 0 0 var(--space-6);
  font-family: var(--font-display);
  font-size: var(--home-title);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.coffee-home-title--center {
  text-align: center;
}

.coffee-home-kicker {
  margin: 0 0 var(--space-4);
  font-size: var(--home-kicker);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.coffee-home-lead {
  margin: 0;
  font-size: var(--home-lead);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}

.coffee-home-lead--center {
  max-width: 52rem;
  margin-inline: auto;
  text-align: center;
}

.coffee-home-body {
  margin: 0;
  font-size: var(--home-body);
  line-height: var(--leading-relaxed);
  color: var(--color-text-muted);
}

.coffee-media--placeholder {
  background:
    linear-gradient(135deg, var(--color-bg-muted) 0%, var(--color-accent-soft) 100%);
  border: 1px dashed var(--color-border-strong);
}

.coffee-btn--ghost {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

[data-theme="light"] .coffee-home-hero .coffee-btn--ghost {
  color: var(--color-text-inverse);
  background: rgba(26, 20, 16, 0.35);
  border-color: rgba(255, 255, 255, 0.35);
}

.coffee-home-hero__title {
  margin: 0 0 var(--space-8);
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.coffee-home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* Coffee spotlight */
.coffee-home-coffee {
  padding-block: var(--space-20);
}

.coffee-home-coffee__grid,
.coffee-home-process__grid,
.coffee-home-about__grid {
  display: grid;
  gap: var(--space-10);
  align-items: center;
}

@media (min-width: 900px) {
  .coffee-home-coffee__grid,
  .coffee-home-process__grid,
  .coffee-home-about__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }

  .coffee-home-process__grid .coffee-home-process__content {
    order: 1;
  }

  .coffee-home-process__grid .coffee-home-process__media {
    order: 2;
  }
}

.coffee-home-coffee__media,
.coffee-home-process__media,
.coffee-home-about__media {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Zoom au survol (toutes les images sauf le hero) */
.coffee-media-frame {
  width: 100%;
  height: 100%;
}

.coffee-media-frame--zoom .coffee-media,
.coffee-media-frame--zoom .coffee-slideshow__slide {
  transition: transform var(--duration-slow) var(--ease-out),
    opacity var(--duration-slow) var(--ease-out);
}

.coffee-media-frame--zoom:hover .coffee-media,
.coffee-media-frame--zoom:hover .coffee-slideshow__slide.is-active {
  transform: scale(1.06);
}

/* Diaporama — section processus */
.coffee-slideshow {
  position: relative;
  width: 100%;
  height: 100%;
}

.coffee-slideshow__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.coffee-slideshow__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1);
  will-change: opacity, transform;
}

.coffee-slideshow__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.coffee-home-coffee__image,
.coffee-home-process__image,
.coffee-home-about__image {
  object-position: center;
}

.coffee-home-coffee__image {
  object-position: center 40%;
}

.coffee-home-process__image {
  object-position: center top;
}

.coffee-home-about__image {
  object-position: center 35%;
}

.coffee-home-coffee__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

/* Process */
.coffee-home-process {
  padding-block: var(--space-20);
  background: var(--color-bg-muted);
}

/* About */
.coffee-home-about {
  padding-block: var(--space-20);
}

/* Testimonials */
.coffee-home-testimonials {
  padding-block: var(--space-20);
  background: var(--color-bg-elevated);
}

.coffee-home-testimonials__grid {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-12);
}

@media (min-width: 768px) {
  .coffee-home-testimonials__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.coffee-home-testimonial {
  margin: 0;
  padding: var(--space-8);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.coffee-home-testimonial__quote {
  margin: 0 0 var(--space-6);
  font-size: var(--home-lead);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
}

.coffee-home-testimonial__author {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.coffee-home-testimonial__avatar {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-inverse);
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

.coffee-home-testimonial__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.coffee-home-testimonial__name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
}

.coffee-home-testimonial__location {
  font-size: 1.125rem;
  color: var(--color-text-subtle);
}

/* CTA */
.coffee-home-cta {
  padding-block: var(--space-20);
  background: linear-gradient(
    180deg,
    var(--color-bg) 0%,
    var(--color-bg-muted) 100%
  );
}

.coffee-home-cta__inner {
  display: grid;
  gap: var(--space-6);
  justify-items: center;
  text-align: center;
}

.coffee-home-cta__action {
  margin-top: var(--space-4);
}

@media (prefers-reduced-motion: reduce) {
  .coffee-media-frame--zoom:hover .coffee-media,
  .coffee-media-frame--zoom:hover .coffee-slideshow__slide.is-active {
    transform: none;
  }

  .coffee-slideshow__slide {
    transition: opacity var(--duration-fast) var(--ease-out);
  }
}

@media (max-width: 640px) {
  .coffee-home-hero__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .coffee-home-hero__title {
    max-width: none;
  }
}
