/*
 * Hi’Falafel — Photo d'introduction « Notre histoire »
 * Le rectangle olive est un véritable élément HTML, plutôt qu'un
 * pseudo-élément, pour éviter les problèmes de superposition desktop.
 * Cette feuille ne touche ni aux autres sections ni à la navigation.
 */

body.inner-page .story-v24 .story-opening-photo {
  position: relative !important;
  z-index: 1;
  isolation: isolate;
  overflow: visible !important;
  box-sizing: border-box;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Désactive l'ancien rectangle créé en CSS (V7). */
body.inner-page .story-v24 .story-opening-photo::before {
  content: none !important;
  display: none !important;
}

/* Le rectangle est derrière la photo, mais au-dessus du fond de page. */
body.inner-page .story-v24 .story-opening-photo .story-photo-backdrop {
  position: absolute !important;
  display: block !important;
  z-index: 0 !important;
  top: -22px !important;
  right: -40px !important;
  bottom: -165px !important;
  left: 54% !important;
  background: #b9bca9 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none;
}

body.inner-page .story-v24 .story-opening-photo > img {
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 43%;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Ordinateur : photo un peu plus petite, plus centrale et plus basse. */
@media (min-width: 981px) {
  body.inner-page .story-v24 .story-opening-photo {
    width: min(100%, 380px) !important;
    aspect-ratio: 4 / 5.25 !important;
    justify-self: center !important;
    margin: 0 !important;
    transform: translate(-48px, 35px);
  }
}

/* Tablette : conserve un dépassement visible sans déborder de l'écran. */
@media (min-width: 681px) and (max-width: 980px) {
  body.inner-page .story-v24 .story-opening-photo {
    width: min(100%, 340px) !important;
    aspect-ratio: 4 / 5.25 !important;
    transform: translate(-12px, 18px);
    margin: 0 !important;
  }
  body.inner-page .story-v24 .story-opening-photo .story-photo-backdrop {
    top: -20px !important;
    right: -22px !important;
    bottom: -110px !important;
    left: 54% !important;
  }
}

/* Téléphone : garde la disposition qui fonctionnait déjà. */
@media (max-width: 680px) {
  body.inner-page .story-v24 .story-opening-photo {
    transform: none !important;
  }
  body.inner-page .story-v24 .story-opening-photo .story-photo-backdrop {
    top: -17px !important;
    right: -clamp(16px, 4vw, 28px) !important;
    bottom: -84px !important;
    left: 54% !important;
  }
}
