/* ========================================================================== 
   MAISON YAMM — HOME ESSENTIELS 1.0.2
   Rendu serveur / zéro JS / géométrie réservée dès le premier paint.
   ========================================================================== */

body.home .yamm-home-essentiels,
body.home .yamm-home-essentiels * {
  box-sizing: border-box;
}

/* Le module Code Divi n'est qu'un point d'ancrage : aucune géométrie Divi
   ne doit redevenir propriétaire de cette section. */
body.home .et_pb_section:has(.yamm-home-essentiels),
body.home .et_pb_row:has(.yamm-home-essentiels),
body.home .et_pb_column:has(.yamm-home-essentiels),
body.home .et_pb_code:has(.yamm-home-essentiels),
body.home .et_pb_code:has(.yamm-home-essentiels) .et_pb_code_inner {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.home .yamm-home-essentiels {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 7px 0 84px;
  background: #fff;
  color: #111;
  overflow: clip;
}

body.home .yamm-home-essentiels__inner {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
}

body.home .yamm-home-essentiels__title {
  display: block;
  width: calc(100% - 64px);
  max-width: 1280px;
  margin: 0 auto 40px;
  padding: 0;
  color: #111 !important;
  font-family: "Intrepid", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-size: 34px !important;
  font-weight: 400 !important;
  font-style: normal !important;
  font-synthesis: none !important;
  line-height: 1.15 !important;
  letter-spacing: -0.012em !important;
  text-align: center !important;
  text-transform: none !important;
}

body.home .yamm-home-essentiels__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 44px;
  width: calc(100% - 96px);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
}

body.home .yamm-home-essentiels__card {
  min-width: 0;
  margin: 0;
  padding: 0;
}

body.home .yamm-home-essentiels__media {
  display: block;
  width: 100%;
  aspect-ratio: 730 / 913;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #f5f5f5;
  text-decoration: none;
}

body.home .yamm-home-essentiels__img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover;
  object-position: center;
  aspect-ratio: 730 / 913;
}

body.home .yamm-home-essentiels__label {
  display: block;
  margin: 17px 0 0;
  padding: 0 4px;
  color: #111;
  font-family: "Intrepid", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
  font-size: clamp(18px, 1.25vw, 20px) !important;
  font-weight: 400 !important;
  font-style: normal !important;
  font-synthesis: none !important;
  line-height: 1.18 !important;
  letter-spacing: -0.008em !important;
  text-align: center !important;
  text-transform: none !important;
}

@media (max-width: 980px) {
  body.home .yamm-home-essentiels {
    /* Cadence mobile : hero → titre resserré à 7px,
       tout en conservant 30px entre le titre et les cartes. */
    padding: 7px 0 64px;
  }

  body.home .yamm-home-essentiels__title {
    width: calc(100% - 48px);
    max-width: 410px;
    margin-bottom: 30px;
    font-size: 22px !important;
    line-height: 1.18 !important;
    white-space: nowrap;
  }

  body.home .yamm-home-essentiels__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 38px;
    width: calc(100% - 48px);
    max-width: 410px;
  }

  body.home .yamm-home-essentiels__label {
    margin-top: 17px;
    padding: 0 2px;
    font-size: 17px !important;
    line-height: 1.18 !important;
  }
}

@media (max-width: 360px) {
  body.home .yamm-home-essentiels__title {
    width: calc(100% - 32px);
    font-size: 21px !important;
    white-space: normal;
  }

  body.home .yamm-home-essentiels__grid {
    width: calc(100% - 36px);
    column-gap: 14px;
  }

  body.home .yamm-home-essentiels__label {
    font-size: 16px !important;
  }
}
