/**
 * Charte sombre LWS 2026 — tokens + contrat de couches marketing.
 * Podcast (hub-page) et éditeur hors périmètre.
 */
:root {
  --lws-bg: #111111;
  --lws-surface: #1c181b;
  --lws-surface-prune: #231a20;
  --lws-border: #3b3137;
  --lws-prune: #351425;
  --lws-vin: #5a2137;
  --lws-copper: #DBAF5C;
  --lws-copper-hover: #E8C070;
  --lws-btn-glow: 0 0 0 1px rgba(219, 175, 92, 0.35), 0 0 16px rgba(219, 175, 92, 0.42), 0 8px 24px rgba(219, 175, 92, 0.28);
  --lws-ivory: #f4efe8;
  --lws-text-soft: #c7bbb3;
  --lws-halo-petrole: #102726;
  --lws-halo-cacao: #3a2116;
  --lws-halo-prune-rgb: 50, 20, 40;
  --lws-halo-sable: #B79E7F;
  --lws-header-height: 4.5rem;
}

/* Fond continu pages marketing (body.site-body) — pas hub-page podcast */
body.site-body {
  background: var(--lws-bg);
  color: var(--lws-ivory);
  overflow-x: clip;
}

main.theme-mineral,
main.page-home.theme-mineral,
main.page-formation-d5.theme-mineral,
main.page-editorial.theme-mineral,
main.page-ressources.theme-mineral,
main.page-legal.theme-mineral {
  position: relative;
  isolation: isolate;
  background: var(--lws-bg);
  overflow-x: clip;
  overflow-y: visible;
}

/**
 * Halo unique (sphère prune → fond #111111).
 * Une seule peinture : tous les modules appellent .lws-halo-prune (ou ::before
 * listés ici). Pas d’opacity, pas de border-radius disque, pas de fond local.
 */
.lws-halo-prune,
.lws-about-story-charte.about-section-block::before,
.lws-about-story-charte.about-section-block::after,
.lws-split-feature-charte::before {
  pointer-events: none;
  border-radius: 0;
  background: url("/assets/site/media/fx/halo-prune-to-bg.png?v=2") center / 100% 100% no-repeat;
  opacity: 1;
  filter: none;
}

.lws-halo-cacao,
.lws-testimonials-marquee-charte__halo-tip {
  pointer-events: none;
  border-radius: 0;
  background: url("/assets/site/media/fx/halo-cacao-to-bg.png?v=2") center / 100% 100% no-repeat;
  opacity: 1;
  filter: none;
}

.lws-halo-sable {
  pointer-events: none;
  border-radius: 0;
  background: radial-gradient(circle at 50% 42%, rgba(183, 158, 127, 0.13) 0%, rgba(183, 158, 127, 0.06) 28%, rgba(183, 158, 127, 0) 68%);
  opacity: 1;
  filter: none;
}

/**
 * Contrat de couches marketing :
 * fond de page → halo (déborde, jamais tronqué) → contenu (texte, image, bouton, carte).
 *
 * Les rectangles de section restent transparents : un halo peut se superposer
 * au fond de la section suivante, mais jamais passer devant son contenu.
 * Header / footer : chrome au-dessus, fond de shell transparent.
 */
body.site-body .mod-header {
  background: transparent;
}

body.site-body .mod-footer {
  position: relative;
  z-index: 3;
  background: transparent;
  border-top: 1px solid rgba(244, 239, 232, 0.22);
}

body.site-body .mod-header__inner,
body.site-body .mod-header__brand,
body.site-body .mod-header__nav,
body.site-body .mod-header__toggle,
body.site-body .mod-header__logo,
body.site-body .mod-header__link,
body.site-body .mod-footer__inner {
  position: relative;
  z-index: 2;
}

body.site-body main.theme-mineral > [data-module] {
  position: relative;
  isolation: auto;
  z-index: auto;
  overflow: visible;
  background-color: transparent;
}

body.site-body .lws-halo-prune,
body.site-body .lws-halo-cacao,
body.site-body .lws-halo-sable,
body.site-body [class*="__halo"],
body.site-body .lws-about-story-charte.about-section-block::before,
body.site-body .lws-about-story-charte.about-section-block::after,
body.site-body .lws-split-feature-charte::before,
body.site-body .lws-testimonials-marquee-charte__halo-tip {
  z-index: 0;
}

body.site-body main.theme-mineral > [data-module] > *:not([class*="halo"]) {
  position: relative;
  z-index: 1;
}

body.site-body .lws-about-story-charte.about-section-block .text-column {
  background: var(--lws-surface) !important;
}

/* Mobile : espacement entre sections accueil */
@media (max-width: 900px) {
  body.site-body.is-home-page main.page-home.theme-mineral > [data-module] + [data-module] {
    margin-top: clamp(1.575rem, 4.2vh, 2.45rem);
  }

  /*
   * Exception de composition : le comparateur et la mosaïque forment un seul
   * bloc visuel. Cette règle ciblée neutralise l'espacement global mobile.
   */
  body.site-body.is-home-page main.page-home.theme-mineral
    > .lws-ba-carousel
    + .lws-portfolio-mosaic {
    margin-top: 0;
  }

  body.site-body.is-home-page .lws-about-story-charte.about-section-block + .lws-before-after,
  body.site-body.is-home-page main.page-home > .lws-before-after {
    margin-top: clamp(1.02rem, 2.73vh, 1.59rem);
  }
}

/* Accueil : la mosaïque ne doit pas garder 100vh, sinon un vide variable
   apparaît sous le bouton or (zone A trop petite ou trop grande selon le viewport). */
body.site-body.is-home-page main.page-home.theme-mineral
  > .lws-portfolio-mosaic:has(+ .lws-about-story-charte) {
  min-height: 0;
}

/* Liens de contenu : or charte, soulignement au survol/focus seulement */
body.site-body main a:not([class]) {
  color: var(--lws-copper);
  text-decoration: none;
  text-underline-offset: 0.14em;
}

body.site-body main a:not([class]):visited {
  color: var(--lws-copper);
}

body.site-body main a:not([class]):hover,
body.site-body main a:not([class]):focus-visible {
  color: var(--lws-copper-hover);
  text-decoration: underline;
}

/* Boutons : surbrillance bronze + zoom léger, jamais de contour/surlignage */
body.site-body :is(
  .lws-home-hero-charte__btn,
  .lws-content-hero-charte__btn,
  .lws-cta-band-charte__btn,
  .lws-about-story-charte .btn-luxe,
  .lws-ressources-cards__cta,
  .lws-ressources-cards__hub-cta,
  .lws-split-feature-charte__btn,
  .lws-authority-proof-charte__btn,
  .lws-sticky-feature-scroll__cta,
  .lws-ba-carousel__btn,
  .lws-glossary-slides__btn,
  .lws-pc-map__btn,
  .phd-more-btn,
  .mod-footer__btn,
  .btn
) {
  transform-origin: center;
  text-decoration: none;
  outline: none;
  box-shadow: none;
  transition-property: transform, background-color, color, border-color, opacity, box-shadow;
  transition-duration: 0.22s;
  transition-timing-function: ease;
}

body.site-body :is(
  .lws-home-hero-charte__btn,
  .lws-content-hero-charte__btn,
  .lws-cta-band-charte__btn,
  .lws-about-story-charte .btn-luxe,
  .lws-ressources-cards__cta,
  .lws-ressources-cards__hub-cta,
  .lws-split-feature-charte__btn,
  .lws-authority-proof-charte__btn,
  .lws-sticky-feature-scroll__cta,
  .lws-ba-carousel__btn,
  .lws-glossary-slides__btn,
  .lws-pc-map__btn,
  .phd-more-btn,
  .mod-footer__btn,
  .btn
):hover,
body.site-body :is(
  .lws-home-hero-charte__btn,
  .lws-content-hero-charte__btn,
  .lws-cta-band-charte__btn,
  .lws-about-story-charte .btn-luxe,
  .lws-ressources-cards__cta,
  .lws-ressources-cards__hub-cta,
  .lws-split-feature-charte__btn,
  .lws-authority-proof-charte__btn,
  .lws-sticky-feature-scroll__cta,
  .lws-ba-carousel__btn,
  .lws-glossary-slides__btn,
  .lws-pc-map__btn,
  .phd-more-btn,
  .mod-footer__btn,
  .btn
):focus-visible {
  text-decoration: none;
  outline: none;
  transform: scale(calc(1 + 3px / 140px));
  box-shadow: var(--lws-btn-glow);
}

@media (prefers-reduced-motion: reduce) {
  body.site-body :is(
    .lws-home-hero-charte__btn,
    .lws-content-hero-charte__btn,
    .lws-cta-band-charte__btn,
    .lws-about-story-charte .btn-luxe,
    .lws-ressources-cards__cta,
    .lws-ressources-cards__hub-cta,
    .lws-split-feature-charte__btn,
    .lws-authority-proof-charte__btn,
    .lws-sticky-feature-scroll__cta,
    .lws-ba-carousel__btn,
    .lws-glossary-slides__btn,
    .lws-pc-map__btn,
    .mod-footer__btn,
    .btn
  ):hover,
  body.site-body :is(
    .lws-home-hero-charte__btn,
    .lws-content-hero-charte__btn,
    .lws-cta-band-charte__btn,
    .lws-about-story-charte .btn-luxe,
    .lws-ressources-cards__cta,
    .lws-ressources-cards__hub-cta,
    .lws-split-feature-charte__btn,
    .lws-authority-proof-charte__btn,
    .lws-sticky-feature-scroll__cta,
    .lws-ba-carousel__btn,
    .lws-glossary-slides__btn,
    .lws-pc-map__btn,
    .mod-footer__btn,
    .btn
  ):focus-visible {
    transform: none;
  }
}
.lws-lucide {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.18em;
  flex-shrink: 0;
  overflow: visible;
}

main.page-legal.theme-mineral {
  position: relative;
  isolation: isolate;
  background: var(--lws-bg);
  overflow-x: clip;
  overflow-y: visible;
}

/* Pages légales : alignement à gauche, ivoire, liens cuivre (écrase site.css) */
main.page-legal.site-main > .page-section:first-of-type .page-section__inner,
main.page-legal .page-section__inner,
main.page-legal .section__heading,
main.page-legal .section__body,
main.page-legal .section__body p,
main.page-legal .section__body ul,
main.page-legal .section__body li,
main.page-legal h1,
main.page-legal h2 {
  text-align: left;
  color: var(--lws-ivory);
}

main.page-legal .section__body,
main.page-legal .section__body .text-base {
  color: var(--lws-ivory);
}

main.page-legal .section__body a,
main.page-legal .section__body a:visited {
  color: var(--lws-copper);
}

main.page-legal .section__body a:hover,
main.page-legal .section__body a:focus-visible {
  color: var(--lws-copper-hover);
}
