/* content-hero-charte — hero éditorial charte sombre */
.lws-content-hero-charte {
  --chc-bg: var(--lws-bg, #111111);
  --chc-ivory: var(--lws-ivory, #f4efe8);
  --chc-soft: var(--lws-text-soft, #c7bbb3);
  --chc-prune: var(--lws-prune, #351425);
  --chc-copper: var(--lws-copper, #DBAF5C);
  --chc-copper-hover: var(--lws-copper-hover, #E8C070);
  --chc-border: var(--lws-border, #3b3137);
  --chc-surface: var(--lws-surface, #1c181b);
  position: relative;
  width: 100%;
  padding: clamp(3.5rem, 8vh, 5.5rem) clamp(1.25rem, 4vw, 3rem) clamp(2.5rem, 6vh, 4rem);
  background: transparent;
  color: var(--chc-ivory);
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
  overflow: visible;
  box-sizing: border-box;
}

.lws-content-hero-charte *,
.lws-content-hero-charte *::before,
.lws-content-hero-charte *::after {
  box-sizing: border-box;
}

.lws-content-hero-charte__halo {
  position: absolute;
  z-index: -1;
  width: min(88vw, 920px);
  height: min(88vw, 920px);
  left: -22%;
  top: -30%;
  pointer-events: none;
}

.lws-content-hero-charte__inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
}

.lws-content-hero-charte__breadcrumb {
  margin-bottom: 1.5rem;
}

.lws-content-hero-charte__breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lws-content-hero-charte__breadcrumb-item:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--chc-border);
}

.lws-content-hero-charte__breadcrumb-link {
  color: var(--chc-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.lws-content-hero-charte__breadcrumb-link:hover,
.lws-content-hero-charte__breadcrumb-link:focus-visible {
  color: var(--chc-copper-hover);
}

.lws-content-hero-charte__breadcrumb-current {
  color: var(--chc-copper);
}

.lws-content-hero-charte__eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--chc-copper);
}

.lws-content-hero-charte__title {
  margin: 0 0 1.25rem;
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.85rem, 4vw, 2.85rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--chc-ivory);
  text-wrap: balance;
}

.lws-content-hero-charte__intro {
  max-width: 42rem;
  font-size: clamp(1rem, 1.25vw, 1.1rem);
  line-height: 1.68;
  color: var(--chc-soft);
}

.lws-content-hero-charte__intro a,
.lws-content-hero-charte__complement a {
  color: var(--chc-copper, var(--lws-copper, #DBAF5C));
  text-decoration: none;
  text-underline-offset: 0.14em;
}

.lws-content-hero-charte__intro a:hover,
.lws-content-hero-charte__intro a:focus-visible,
.lws-content-hero-charte__complement a:hover,
.lws-content-hero-charte__complement a:focus-visible {
  color: var(--chc-copper-hover, var(--lws-copper-hover, #E8C070));
  text-decoration: underline;
}

.lws-content-hero-charte__intro p {
  margin: 0 0 1rem;
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
}

.lws-content-hero-charte__intro p:last-child {
  margin-bottom: 0;
}

.lws-content-hero-charte__complement {
  max-width: 42rem;
  margin-top: 1rem;
  font-size: clamp(1rem, 1.25vw, 1.1rem);
  line-height: 1.68;
  color: var(--chc-soft);
}

.lws-content-hero-charte__complement p {
  margin: 0 0 1rem;
}

.lws-content-hero-charte__complement p:last-child {
  margin-bottom: 0;
}

/* Citation — même logique / typo / cuivre que home-hero-charte */
.lws-content-hero-charte__proof {
  margin: 1.5rem 0 0;
  max-width: 34rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.lws-content-hero-charte__proof-bar {
  flex: 0 0 2px;
  width: 2px;
  align-self: stretch;
  min-height: 2.5rem;
  margin-top: 0.15rem;
  background: var(--chc-copper);
  border-radius: 1px;
}

.lws-content-hero-charte__proof-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.lws-content-hero-charte__proof-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--chc-ivory);
}

.lws-content-hero-charte__proof-detail {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  color: var(--chc-soft);
  opacity: 0.88;
}

.lws-content-hero-charte--split-media.lws-content-hero-charte--first-viewport {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3.5rem, 6vw, 5.5rem);
  overflow: visible;
}

.lws-content-hero-charte--split-media .lws-content-hero-charte__inner {
  max-width: 1520px;
  width: 100%;
  margin: 0 auto;
}

/* Halo carré : la texture radiale ne doit jamais être étirée en ovale. */
.lws-content-hero-charte--split-media .lws-content-hero-charte__halo {
  left: -18%;
  bottom: -42%;
  top: auto;
  width: min(92vw, 1080px);
  height: min(92vw, 1080px);
}

.lws-content-hero-charte--split-media.lws-content-hero-charte--media-right .lws-content-hero-charte__halo {
  left: auto;
  right: -18%;
}

/* Même logique flex/grid que home-hero-charte : média + texte côte à côte */
.lws-content-hero-charte__split {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  column-gap: clamp(1.5rem, 3vw, 2.75rem);
  row-gap: 1.25rem;
  align-items: center;
  transform: translateY(-30px);
}

/* Présentation + Formation D5 : photo + texte/CTA descendent ensemble de 20 px (flex plein écran inchangé). */
.lws-content-hero-charte--first-viewport.lws-content-hero-charte--equal-height .lws-content-hero-charte__split {
  transform: translateY(-10px);
}

.lws-content-hero-charte--media-right .lws-content-hero-charte__split {
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  direction: rtl;
}

.lws-content-hero-charte--media-right .lws-content-hero-charte__split > * {
  direction: ltr;
}

.lws-content-hero-charte__media {
  position: relative;
  z-index: 1;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  min-height: 0;
  border-radius: 16px;
  overflow: hidden;
}

.lws-content-hero-charte__media-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  width: 100%;
}

.lws-content-hero-charte__media-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(72vh, 780px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  border: 1px solid rgba(59, 49, 55, 0.55);
  background: #1c181b;
}

/*
  Split equal-height (Présentation, Formation D5, et tout hero qui pose ces flags) :
  un seul module. Colonne média 1:1 = hauteur de rangée minimale.
  Image déborde de 120 px vers le HAUT seulement ; le bas photo = bas CTA.
  Texte en haut, boutons en bas (space-between) : le vide va au milieu, pas collé.
*/
.lws-content-hero-charte--split-media.lws-content-hero-charte--equal-height {
  --chc-grow-up: 120px;
}

@media (min-width: 901px) {
  .lws-content-hero-charte--equal-height .lws-content-hero-charte__inner {
    max-width: 1320px;
  }

  .lws-content-hero-charte--equal-height .lws-content-hero-charte__split {
    align-items: stretch;
    overflow: visible;
  }

  .lws-content-hero-charte--equal-height .lws-content-hero-charte__media-col {
    position: relative;
    display: flex;
    width: 100%;
    aspect-ratio: 1 / 1;
    align-self: stretch;
    overflow: visible;
  }

  .lws-content-hero-charte--equal-height .lws-content-hero-charte__media {
    position: absolute;
    top: calc(var(--chc-grow-up) * -1);
    right: 0;
    bottom: 0;
    left: 0;
    height: auto;
    min-height: 0;
    overflow: hidden;
  }

  .lws-content-hero-charte--equal-height .lws-content-hero-charte__media-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center;
  }

  .lws-content-hero-charte--equal-height .lws-content-hero-charte__split-copy {
    justify-content: space-between;
    gap: 0;
    overflow: visible;
  }

  .lws-content-hero-charte--equal-height .lws-content-hero-charte__copy-start {
    flex: 0 0 auto;
    margin-top: calc(var(--chc-grow-up) * -1);
  }

  .lws-content-hero-charte--equal-height .lws-content-hero-charte__copy-end,
  .lws-content-hero-charte--equal-height .lws-content-hero-charte__cta {
    margin-top: 0;
  }

  .lws-content-hero-charte--equal-height.lws-content-hero-charte--split-media .lws-content-hero-charte__proof {
    margin-top: 1.25rem;
    margin-bottom: 0;
  }
}

/* Formation D5 : pas de barre verticale sur la signature coach */
[data-instance="formation-d5-hero"] .lws-content-hero-charte__proof-bar {
  display: none;
}

[data-instance="formation-d5-hero"] .lws-content-hero-charte__proof {
  gap: 0;
}

.lws-content-hero-charte__expand {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  left: auto;
  z-index: 2;
  border: 1px solid rgba(59, 49, 55, 0.85);
  border-radius: 999px;
  padding: 0.55rem 1.15rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: #a89c95;
  background: rgba(17, 17, 17, 0.82);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.lws-content-hero-charte__expand:hover,
.lws-content-hero-charte__expand:focus-visible {
  color: var(--chc-ivory);
  border-color: rgba(219, 175, 92, 0.45);
  background: rgba(28, 24, 27, 0.92);
  outline: none;
}

.lws-content-hero-charte__lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: clamp(1rem, 3vw, 2rem);
  border: 0;
  background: rgba(8, 8, 8, 0.94);
  color: var(--chc-ivory);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lws-content-hero-charte__lightbox::backdrop {
  background: rgba(0, 0, 0, 0.88);
}

.lws-content-hero-charte__lightbox-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

.lws-content-hero-charte__lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(59, 49, 55, 0.9);
  border-radius: 4px;
  background: rgba(28, 24, 27, 0.9);
  color: #c7bbb3;
  cursor: pointer;
}

.lws-content-hero-charte__lightbox-close svg {
  width: 1.15rem;
  height: 1.15rem;
}

.lws-content-hero-charte__lightbox-close:hover,
.lws-content-hero-charte__lightbox-close:focus-visible {
  color: #f4efe8;
  border-color: rgba(219, 175, 92, 0.5);
  outline: none;
}

.lws-content-hero-charte__lightbox:not([open]) {
  display: none;
}

.lws-content-hero-charte__split-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  min-width: 0;
  max-width: none;
  width: 100%;
  justify-self: stretch;
  gap: 0;
}

.lws-content-hero-charte--split-media .lws-content-hero-charte__copy {
  width: 100%;
  text-align: left;
}

.lws-content-hero-charte--split-media .lws-content-hero-charte__title {
  font-size: clamp(1.85rem, 3.6vw, 2.85rem);
}

.lws-content-hero-charte--split-media .lws-content-hero-charte__intro,
.lws-content-hero-charte--split-media .lws-content-hero-charte__complement {
  max-width: none;
}

.lws-content-hero-charte--split-media .lws-content-hero-charte__proof {
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.lws-content-hero-charte--split-media .lws-content-hero-charte__cta {
  margin-top: 1.5rem;
}

.lws-content-hero-charte__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 1.75rem;
}

.lws-content-hero-charte__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.8rem 1.35rem;
  border-radius: 2px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.lws-content-hero-charte__btn--primary {
  background: var(--chc-copper);
  color: #1a120e;
  border: 1px solid var(--chc-copper);
}

.lws-content-hero-charte__btn--primary:hover,
.lws-content-hero-charte__btn--primary:focus-visible {
  background: var(--chc-copper-hover);
  border-color: var(--chc-copper-hover);
}

.lws-content-hero-charte__btn--secondary {
  background: transparent;
  color: var(--chc-ivory);
  border: 1px solid var(--chc-border);
}

.lws-content-hero-charte__btn--secondary:hover,
.lws-content-hero-charte__btn--secondary:focus-visible {
  border-color: var(--chc-copper);
  color: var(--chc-copper-hover);
}

@media (max-width: 900px) {
  .lws-content-hero-charte--split-media.lws-content-hero-charte--first-viewport {
    min-height: 0;
    display: block;
    justify-content: flex-start;
    padding-top: clamp(2rem, 6vh, 2.75rem);
    padding-bottom: clamp(2.5rem, 5vh, 3.5rem);
  }

  .lws-content-hero-charte--split-media .lws-content-hero-charte__inner {
    max-width: 820px;
  }

  .lws-content-hero-charte__split {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 1.25rem;
    direction: ltr;
    transform: none;
  }

  .lws-content-hero-charte--media-right .lws-content-hero-charte__split {
    grid-template-columns: 1fr;
  }

  /* Mobile : même logique que home — image entre texte et citation/CTA */
  .lws-content-hero-charte__split-copy {
    display: contents;
    max-width: none;
    justify-self: stretch;
  }

  .lws-content-hero-charte__copy-start {
    grid-column: 1;
    grid-row: 1;
  }

  .lws-content-hero-charte__media-col {
    grid-column: 1;
    grid-row: 2;
    max-width: min(100%, 520px);
    margin-inline: auto;
    width: 100%;
  }

  .lws-content-hero-charte__copy-end {
    grid-column: 1;
    grid-row: 3;
  }

  .lws-content-hero-charte__media {
    max-width: none;
    margin-inline: 0;
  }

  .lws-content-hero-charte__media-img {
    max-height: none;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
  }

  .lws-content-hero-charte--split-media .lws-content-hero-charte__proof {
    margin-top: 0;
    margin-bottom: 1.25rem;
  }

  .lws-content-hero-charte__split-copy .lws-content-hero-charte__cta,
  .lws-content-hero-charte__copy-end .lws-content-hero-charte__cta {
    margin-top: 0;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .lws-content-hero-charte--split-media .lws-content-hero-charte__halo {
    left: 50%;
    right: auto;
    bottom: 18%;
    transform: translateX(-50%);
    opacity: 0.88;
  }
}

@media (max-width: 640px) {
  .lws-content-hero-charte__cta {
    flex-direction: column;
    align-items: stretch;
  }

  .lws-content-hero-charte__btn {
    width: 100%;
    max-width: 22rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lws-content-hero-charte__btn,
  .lws-content-hero-charte__breadcrumb-link {
    transition: none;
  }
}
