/* ============================================
   BLAFA — home.css
   Hero Medvi-style + Services + Finale
   ============================================ */

/* ═══════════════════════════════════════════
   HERO — Gradient vert profond
   ═══════════════════════════════════════════ */

.hero {
  position: relative;
  background: linear-gradient(166deg, #1B4332 0%, #0F2A1E 100%);
  color: var(--paper);
  padding: calc(var(--nav-h) + var(--space-8)) var(--margin-x) var(--space-9);
  min-height: 80vh;
  min-height: 80dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

/* Texture noise subtile */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.15 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.4;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}

/* Glow vert subtil */
.hero::after {
  content: "";
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 998px;
  height: 472px;
  background: radial-gradient(ellipse at center, rgba(125, 222, 146, 0.15), transparent 60%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.85);
}

.hero__eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage-light);
  position: relative;
}

.hero__eyebrow-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--sage-light);
  opacity: 0.6;
  animation: pulse-ring 2s var(--ease-out) infinite;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--paper);
  margin: 0;
}

.hero__title-line {
  display: block;
  overflow: visible;
}

.hero__title-accent {
  color: var(--sage-light);
  font-style: italic;
  position: relative;
  display: inline-block;
  overflow: visible;
  padding-inline: 0.04em;
  margin-inline: -0.02em;
}

.hero__title-accent .word {
  overflow: visible;
  padding-bottom: 0.18em;
}

.hero__title-accent svg {
  position: absolute;
  left: -4%;
  bottom: -0.16em;
  width: 108%;
  height: 0.35em;
  overflow: visible;
  pointer-events: none;
}

.hero__title-accent svg path {
  fill: none;
  stroke: var(--sage-light);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  transition: stroke-dashoffset 2s cubic-bezier(0.7, 0, 0.84, 0) 0.6s;
}

.hero__title.is-visible .hero__title-accent svg path {
  stroke-dashoffset: 0;
}

.hero__lead {
  max-width: 55ch;
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

.hero__lead strong {
  color: var(--paper);
  font-weight: 600;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-2);
}

/* Watermark BLAFA géant en bas du hero */
.hero__watermark {
  position: absolute;
  bottom: -8%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: clamp(10rem, 28vw, 22rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  z-index: 1;
  white-space: nowrap;
  user-select: none;
}

/* ═══════════════════════════════════════════
   SERVICES — Cards avec image dans bloc coloré
   Les cards chevauchent proprement le hero
   ═══════════════════════════════════════════ */

.services {
  position: relative;
  background: var(--paper);
  padding: 0 0 var(--space-7);
  margin-top: -60px;
  z-index: var(--z-raised);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
}

.services__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-7) var(--margin-x) 0;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-7);
}

/* Card Medvi : bloc coloré en haut (image contenue) + label en bas */
.service-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cream);
  text-decoration: none;
  color: var(--ink);
  border: 1px solid transparent;
  transition:
    transform var(--dur-base) var(--ease-out-expo),
    box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
  will-change: transform;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--stone-line);
}

/* PARTIE HAUTE — bloc coloré avec image contenue */
.service-card__top {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.service-card:nth-child(1) .service-card__top {
  background: var(--mist); /* vert pâle */
}

.service-card:nth-child(2) .service-card__top {
  background: #F0E4D0; /* beige chaud */
}

.service-card:nth-child(3) .service-card__top {
  background: #E4ECF2; /* bleu pâle */
}

.service-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.8s var(--ease-out-expo);
}

.service-card:hover .service-card__img {
  transform: scale(1.06);
}

/* PARTIE BASSE — label + flèche */
.service-card__bottom {
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  background: var(--paper);
}

.service-card__label {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.service-card__arrow {
  color: var(--stone);
  flex-shrink: 0;
  transition:
    transform var(--dur-base) var(--ease-out-expo),
    color var(--dur-base) var(--ease-out);
}

.service-card:hover .service-card__arrow {
  transform: translateX(4px);
  color: var(--forest);
}

/* Trust bar */
.trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid var(--stone-line);
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink);
}

.trust-badge__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--paper);
  flex-shrink: 0;
}

.trust-badge__icon svg {
  width: 14px;
  height: 14px;
}

/* ═══════════════════════════════════════════
   FINALE — CTA sur fond noir
   ═══════════════════════════════════════════ */

.finale {
  background: var(--ink);
  color: var(--paper);
  padding: var(--section-y-lg) var(--margin-x);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.finale::before {
  content: "";
  position: absolute;
  width: 60%;
  height: 80%;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(46, 147, 111, 0.18) 0%, transparent 60%);
  filter: blur(60px);
  pointer-events: none;
  z-index: -1;
}

.finale__inner {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
}

.finale__overline {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--sage-light);
}

.finale__pre {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--sage-light);
}

.finale__title {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: var(--ls-tight);
  color: var(--paper);
  margin: 0;
}

.finale__title em {
  color: var(--sage-light);
  font-style: italic;
}

.finale__sub {
  max-width: 56ch;
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: rgba(255, 255, 255, 0.72);
  margin: 0 auto;
}

.finale__actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

.finale__contacts {
  display: flex;
  justify-content: center;
  gap: var(--space-7);
  flex-wrap: wrap;
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
}

.finale__contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  color: rgba(255, 255, 255, 0.75);
  transition: color var(--dur-fast) var(--ease-out);
}

.finale__contacts > a {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  color: rgba(255, 255, 255, 0.75);
  transition: color var(--dur-fast) var(--ease-out);
}

.finale__contact:hover,
.finale__contacts > a:hover {
  color: var(--paper);
}

.finale__contact-label {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--stone);
}

.finale__contact-value {
  font-size: var(--fs-md);
  font-weight: 500;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 900px) {
  .hero {
    min-height: 70vh;
    min-height: 70dvh;
    padding-top: calc(var(--nav-h) + var(--space-5));
    padding-bottom: var(--space-7);
  }

  .services {
    margin-top: -30px;
  }

  .services__inner {
    padding-top: var(--space-5);
  }

  .services__grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  /* Sur mobile : cards horizontales */
  .service-card {
    flex-direction: row;
    align-items: stretch;
    border-radius: var(--radius-lg);
  }

  .service-card__top {
    width: 100px;
    aspect-ratio: 1;
    flex-shrink: 0;
  }

  .service-card__bottom {
    flex: 1;
    padding: var(--space-4);
  }

  .trust-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .hero__watermark {
    font-size: 35vw;
    bottom: -3%;
  }

  .finale__contacts {
    gap: var(--space-5);
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: clamp(2.75rem, 13vw, 4rem);
    line-height: 1.08;
    letter-spacing: -0.025em;
  }

  .trust-bar {
    grid-template-columns: 1fr;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .finale__actions {
    flex-direction: column;
    width: 100%;
  }

  .finale__actions .btn {
    width: 100%;
  }
}
