/*
 * nm-hero/style.css \u2014 Nolan Music
 * Section hero (split desktop / plein ecran pages interieures)
 */

.nm-hero {
  position: relative;
  background: var(--nm-surface-page);
  padding: 0 clamp(20px, 5vw, 64px);
  height: calc(100svh - var(--nm-header-h, 65px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  box-sizing: border-box;
}

/* Fallback navigateurs sans svh */
@supports not (height: 100svh) {
  .nm-hero { height: calc(100vh - var(--nm-header-h, 65px)); }
}

/* WordPress ajoute une barre admin de 32px (logged-in) */
.admin-bar .nm-hero {
  height: calc(100svh - var(--nm-header-h, 65px) - 32px);
}
@supports not (height: 100svh) {
  .admin-bar .nm-hero { height: calc(100vh - var(--nm-header-h, 65px) - 32px); }
}

.nm-hero__inner {
  flex: 1;
  min-height: 0; /* crucial : empeche le flex-item de gonfler au dela de la section */
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-wrap: nowrap; /* une seule ligne pour tenir dans la hauteur */
  align-items: stretch;
  gap: clamp(24px, 4vw, 72px);
  padding: clamp(32px, 5vw, 64px) 0 0;
  overflow: hidden;
}

/* Colonne texte */
.nm-hero__text {
  flex: 1 1 380px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  min-height: 0;
  padding-bottom: 0;
}

.nm-hero__display {
  font-weight: 600;
  font-size: clamp(42px, 6.2vw, 100px);
  line-height: 1.02;
  color: var(--nm-encre);
  margin: 0;
  text-wrap: balance;
}

.nm-hero__eyebrow {
  font-weight: 400;
  font-family: var(--nm-font-display);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nm-bronze);
  margin: clamp(14px, 2vw, 22px) 0 0;
}

.nm-hero__body {
  font-weight: 300;
  font-size: clamp(14px, 1.2vw, 16.5px);
  line-height: 1.75;
  color: var(--nm-text-secondary);
  margin: clamp(10px, 1.4vw, 16px) 0 0;
  max-width: 440px;
}

.nm-hero__eq {
  margin-top: clamp(10px, 1.4vw, 22px);
  max-width: 280px;
}

/* Colonne image : prend toute la hauteur disponible */
.nm-hero__image-wrap {
  flex: 0 1 clamp(300px, 44vw, 620px);
  align-self: stretch;
  /* Marges negatives pour deborder sur les paddings section */
  margin-top: calc(-1 * clamp(32px, 5vw, 64px));
  margin-bottom: calc(-1 * clamp(32px, 5vw, 64px));
  margin-left: calc(-1 * clamp(12px, 2.5vw, 52px));
  min-height: 0;
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--nm-bordeaux), var(--nm-encre));
}

.nm-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.24) saturate(1.05) contrast(1.02) brightness(0.86);
}

.nm-hero__image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(20,19,15,0.05), rgba(20,19,15,0.45));
}

/* Bouton scroll vertical */
.nm-hero__scroll {
  flex: 0 0 auto;
  align-self: stretch;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0 clamp(6px, 1.2vw, 18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  text-decoration: none;
  min-height: 0;
}

.nm-hero__scroll-icon {
  transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nm-hero__scroll:hover .nm-hero__scroll-icon {
  transform: translateY(6px);
}

.nm-hero__scroll-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--nm-font-display);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--nm-text-secondary);
}

.nm-hero__scroll-line {
  width: 1px;
  height: clamp(40px, 7vw, 104px);
  background: var(--nm-border-on-light);
}

.nm-hero__scroll-icon { color: var(--nm-bronze); }

/* Neutralisation editeur */
.editor-styles-wrapper .nm-hero {
  height: auto;
  min-height: 400px;
  overflow: visible;
}
.editor-styles-wrapper .nm-hero__inner {
  flex-wrap: wrap;
  overflow: visible;
}
.editor-styles-wrapper .nm-hero__image-wrap {
  margin: 0;
  min-height: 300px;
}
.editor-styles-wrapper .nm-hero__scroll { display: none; }


@media (max-width: 768px) {
  .nm-hero {
    height: auto;
    min-height: calc(100svh - var(--nm-header-h, 65px));
    padding: 0;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .nm-hero__inner {
    flex-direction: column;
    flex-wrap: nowrap;
    padding: 0;
    gap: 0;
    position: relative;
    min-height: calc(100svh - var(--nm-header-h, 65px));
  }

  .nm-hero__image-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 100%;
    margin: 0;
    flex: none;
    border-radius: 0;
    z-index: 0;
  }

  .nm-hero__image-overlay {
    background: linear-gradient(160deg, rgba(20,19,15,0.55), rgba(20,19,15,0.65));
  }

  .nm-hero__text {
    position: relative;
    z-index: 1;
    flex: 1;
    align-items: center;
    text-align: center;
    padding: clamp(48px, 12vw, 80px) clamp(20px, 6vw, 40px) clamp(40px, 10vw, 64px);
    justify-content: flex-end;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }

  .nm-hero__display {
    color: #FFFFFF;
    font-size: clamp(36px, 10vw, 56px);
  }

  .nm-hero__eyebrow {
    color: var(--nm-bronze-clair);
  }

  .nm-hero__body {
    color: rgba(255,255,255,0.85);
    max-width: 100%;
  }

  .nm-hero__eq {
    margin-left: auto;
    margin-right: auto;
  }

  .nm-hero__scroll { display: none; }
}


.nm-hero__border-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--nm-bronze-clair);
  z-index: 1;
}

@media (min-width: 769px) and (max-width: 1380px) {
  .nm-hero__display {
    font-size: clamp(44px, 4.2vw, 62px);
  }
}
