/* 
Name: Block Le gérant
Slug: block-legerant
Description: Affiche le gérant de la boutique
Author: Groupe Wibi
Author URI: https://opticchic.fr
*/

/* Block Le gérant - Styles de base */
#block-legerant,
.block-legerant {
  position: relative;
  overflow: hidden;
  background-color: #f33680;
  border-top-width: 5px;
  border-top-style: solid;
  border-top-color: #8fb62c;
  background-image: url('imgs/block-gerant-virginie.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Styles spécifiques pour fullPage.js */
#fullpage #block-legerant,
#fullpage .block-legerant,
#fullpage section.block-legerant,
#fullpage .fp-section.block-legerant {
  /* fullPage.js gère la hauteur via .fp-section, on utilise height: 100% */
  height: 100%;
  min-height: 100%;
}

/* Styles pour mode normal (sans fullPage) */
body:not(.fp-enabled) #block-legerant,
body:not(.fp-enabled) .block-legerant {
  min-height: clamp(360px, 45vw, 760px);
}

/* Calque dégradé au-dessus du fond */
#block-legerant::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;

  /* Dégradé (fallback). Si vous ajoutez une image dégradé, vous pourrez remplacer par:
     background-image: url('imgs/votre-degrade.png'); */
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.25) 45%,
    rgba(0, 0, 0, 0.00) 75%
  );
}

/* Calque contenu (texte + image) */
.block-legerant__inner {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 2rem));
  margin-inline: auto;
  padding: clamp(1.25rem, 3vw, 2.5rem) 0;
  /* Pour fullPage.js, prendre toute la hauteur disponible */
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.block-legerant__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: stretch;
  /* Pour fullPage.js, la hauteur est gérée par la section parente */
  height: 100%;
}

/* Mode normal (sans fullPage) : hauteur minimale */
body:not(.fp-enabled) .block-legerant__content {
  min-height: clamp(360px, 45vw, 760px);
}

.block-legerant__left {
  color: #fff;
  max-width: 60ch;
}

.block-legerant__title {
  margin: 0 0 0.75rem;
  font-weight: 700;
  line-height: 1.1;
  font-size: clamp(1.5rem, 2.4vw, 2.5rem);
}

.block-legerant__text {
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.55;
}

.block-legerant__right {
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
  width: 100%;
  height: 100%;
}

.block-legerant__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top;
}

/* Mobile: empilement texte puis image */
@media (max-width: 768px) {
  .block-legerant__content {
    grid-template-columns: 1fr;
  }

  .block-legerant__right {
    justify-content: center;
    min-height: 300px;
  }

  #block-legerant::before {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.55) 0%,
      rgba(0, 0, 0, 0.25) 55%,
      rgba(0, 0, 0, 0.10) 100%
    );
  }
}