/* testimonials-marquee-charte — témoignages charte sombre */
.lws-testimonials-marquee-charte,
.lws-testimonials-marquee-charte__modal {
  --tmc-bg: transparent;
  --tmc-ivory: var(--lws-ivory, #f4efe8);
  --tmc-soft: var(--lws-text-soft, #c7bbb3);
  --tmc-copper: var(--lws-copper, #DBAF5C);
  --tmc-copper-soft: rgba(219, 175, 92, 0.55);
  --tmc-champagne: #e8c9a0;
  --tmc-border: rgba(219, 175, 92, 0.22);
  --tmc-surface: #1c181b;
  --tmc-surface-alt: #181416;
  --tmc-card-gap: 22px;
}

.lws-testimonials-marquee-charte {
  position: relative;
  width: 100%;
  padding: clamp(2.5rem, 6vh, 4rem) clamp(1.25rem, 4vw, 3rem);
  background: var(--tmc-bg);
  color: var(--tmc-ivory);
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
  box-sizing: border-box;
  /* Halo hors clip : le masquage horizontal vit sur __row / __marquee internes */
  overflow: visible;
}

.lws-testimonials-marquee-charte *,
.lws-testimonials-marquee-charte *::before,
.lws-testimonials-marquee-charte *::after {
  box-sizing: border-box;
}

.lws-testimonials-marquee-charte__halo-tip {
  position: absolute;
  z-index: -1;
  width: min(42vw, 460px);
  height: min(42vw, 460px);
  right: clamp(1rem, 8vw, 8rem);
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  pointer-events: none;
}

.lws-testimonials-marquee-charte__inner {
  position: relative;
  z-index: 1;
  max-width: 100%;
  margin: 0 auto;
}

.lws-testimonials-marquee-charte__header {
  max-width: 42rem;
  margin: 0 auto clamp(1.75rem, 4vw, 2.5rem);
  text-align: center;
}

.lws-testimonials-marquee-charte__title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 700;
  line-height: 1.18;
  color: var(--tmc-ivory);
  text-wrap: balance;
}

.lws-testimonials-marquee-charte__intro {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--tmc-soft);
}

.lws-testimonials-marquee-charte__intro p {
  margin: 0 0 0.85rem;
}

.lws-testimonials-marquee-charte__intro p:last-child {
  margin-bottom: 0;
}

/* ——— Carte commune ——— */
.lws-testimonials-marquee-charte__card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 400px;
  width: 400px;
  max-width: 400px;
  min-height: 188px;
  padding: 1.15rem 1rem 1.35rem;
  border: 1px solid var(--tmc-border);
  border-radius: 15px;
  background: linear-gradient(180deg, var(--tmc-surface-alt) 0%, var(--tmc-surface) 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.lws-testimonials-marquee-charte__card-content {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.lws-testimonials-marquee-charte__avatar {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(219, 175, 92, 0.2);
}

.lws-testimonials-marquee-charte__meta {
  flex: 1;
  min-width: 0;
}

.lws-testimonials-marquee-charte__stars {
  display: flex;
  gap: 0.2rem;
  margin-bottom: 0.45rem;
}

.lws-testimonials-marquee-charte__star {
  width: 14px;
  height: 14px;
  fill: var(--tmc-champagne);
  opacity: 0.88;
}

.lws-testimonials-marquee-charte__name {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--tmc-ivory);
}

.lws-testimonials-marquee-charte__role {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--tmc-copper);
}

.lws-testimonials-marquee-charte__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--tmc-soft);
}

.lws-testimonials-marquee-charte__text--clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lws-testimonials-marquee-charte__see-more {
  position: absolute;
  top: 0;
  right: 0;
  border: 1px solid transparent;
  border-radius: 0 15px 0 12px;
  padding: 0.45rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--tmc-copper-soft);
  background: rgba(24, 20, 22, 0.72);
  cursor: pointer;
  overflow: hidden;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.lws-testimonials-marquee-charte__see-more-label {
  display: inline-block;
  transform: scale(1);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.lws-testimonials-marquee-charte__see-more:hover,
.lws-testimonials-marquee-charte__see-more:focus-visible,
.lws-testimonials-marquee-charte__see-more:active {
  color: var(--tmc-ivory);
  background: transparent;
  border-color: rgba(244, 239, 232, 0.92);
  outline: none;
}

.lws-testimonials-marquee-charte__see-more:hover .lws-testimonials-marquee-charte__see-more-label,
.lws-testimonials-marquee-charte__see-more:focus-visible .lws-testimonials-marquee-charte__see-more-label,
.lws-testimonials-marquee-charte__see-more:active .lws-testimonials-marquee-charte__see-more-label {
  transform: scale(1.06);
}

/* ——— Grille no-JS ——— */
.lws-testimonials-marquee-charte__static {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
  max-width: 1180px;
  margin: 0 auto;
}

.lws-testimonials-marquee-charte__static .lws-testimonials-marquee-charte__card {
  flex: none;
  width: 100%;
  max-width: none;
  min-height: 0;
}

.lws-testimonials-marquee-charte__static .lws-testimonials-marquee-charte__text--clamp {
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
}

.lws-testimonials-marquee-charte.is-enhanced:not(.is-reduced-motion) .lws-testimonials-marquee-charte__static {
  display: none;
}

.lws-testimonials-marquee-charte.is-reduced-motion .lws-testimonials-marquee-charte__marquee,
.lws-testimonials-marquee-charte.is-reduced-motion .lws-testimonials-marquee-charte__mobile {
  display: none !important;
}

/* ——— Marquee desktop ——— */
.lws-testimonials-marquee-charte__marquee,
.lws-testimonials-marquee-charte__mobile {
  display: none;
}

.lws-testimonials-marquee-charte__marquee[hidden],
.lws-testimonials-marquee-charte__mobile[hidden] {
  display: none !important;
}

.lws-testimonials-marquee-charte__marquee {
  flex-direction: column;
  gap: 0.65rem;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.lws-testimonials-marquee-charte.is-enhanced.is-desktop .lws-testimonials-marquee-charte__marquee {
  display: flex;
}

.lws-testimonials-marquee-charte.is-enhanced.is-desktop .lws-testimonials-marquee-charte__mobile {
  display: none;
}

.lws-testimonials-marquee-charte__row {
  overflow: hidden;
  padding: 0.25rem 0;
}

.lws-testimonials-marquee-charte__track {
  display: flex;
  gap: var(--tmc-card-gap);
  width: max-content;
  will-change: transform;
}

.lws-testimonials-marquee-charte__row[data-dir="left"] .lws-testimonials-marquee-charte__track {
  animation: lws-tmc-marquee-left var(--tmc-duration, 60s) linear infinite;
}

.lws-testimonials-marquee-charte__row[data-dir="right"] .lws-testimonials-marquee-charte__track {
  animation: lws-tmc-marquee-right var(--tmc-duration, 60s) linear infinite;
}

.lws-testimonials-marquee-charte__row.is-paused .lws-testimonials-marquee-charte__track {
  animation-play-state: paused;
}

@keyframes lws-tmc-marquee-left {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(calc(-1 * var(--tmc-scroll-distance, 50%)), 0, 0); }
}

@keyframes lws-tmc-marquee-right {
  0% { transform: translate3d(calc(-1 * var(--tmc-scroll-distance, 50%)), 0, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* Clones : aria-hidden déjà posé en JS ; boutons « Voir en entier » restent cliquables */
.lws-testimonials-marquee-charte__card.is-clone {
  user-select: none;
}

/* ——— Mobile carousel ——— */
.lws-testimonials-marquee-charte__mobile {
  position: relative;
  max-width: 36rem;
  margin: 0 auto;
}

.lws-testimonials-marquee-charte.is-enhanced.is-mobile .lws-testimonials-marquee-charte__mobile {
  display: block;
}

.lws-testimonials-marquee-charte.is-enhanced.is-mobile .lws-testimonials-marquee-charte__marquee {
  display: none;
}

.lws-testimonials-marquee-charte__mobile-viewport {
  position: relative;
}

.lws-testimonials-marquee-charte__mobile-slide {
  display: none;
}

.lws-testimonials-marquee-charte__mobile-slide.is-active {
  display: block;
}

.lws-testimonials-marquee-charte__mobile-slide .lws-testimonials-marquee-charte__card {
  flex: none;
  width: 100%;
  max-width: none;
  min-height: 0;
  padding-top: 2.75rem;
}

.lws-testimonials-marquee-charte__mobile-slide .lws-testimonials-marquee-charte__avatar {
  position: absolute;
  top: -2.5rem;
  left: 50%;
  transform: translateX(-50%);
}

.lws-testimonials-marquee-charte__mobile-slide .lws-testimonials-marquee-charte__card-content {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.lws-testimonials-marquee-charte__mobile-slide .lws-testimonials-marquee-charte__stars {
  justify-content: center;
}

.lws-testimonials-marquee-charte__mobile-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.lws-testimonials-marquee-charte__mobile-status {
  margin: 0;
  min-width: 3.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  color: var(--tmc-soft);
}

.lws-testimonials-marquee-charte__mobile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--tmc-border);
  border-radius: 50%;
  background: rgba(24, 20, 22, 0.85);
  color: var(--tmc-ivory);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.lws-testimonials-marquee-charte__mobile-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.lws-testimonials-marquee-charte__mobile-btn:hover,
.lws-testimonials-marquee-charte__mobile-btn:focus-visible {
  border-color: var(--tmc-copper);
  background: rgba(219, 175, 92, 0.12);
}

/* ——— Modal (porté sur body pour sortir du stacking context de la section) ——— */
.lws-testimonials-marquee-charte__modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100svh;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: var(--tmc-ivory);
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
  box-sizing: border-box;
}

.lws-testimonials-marquee-charte__modal *,
.lws-testimonials-marquee-charte__modal *::before,
.lws-testimonials-marquee-charte__modal *::after {
  box-sizing: border-box;
}

.lws-testimonials-marquee-charte__modal[hidden] {
  display: none;
}

.lws-testimonials-marquee-charte__modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lws-testimonials-marquee-charte__modal-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(80vh, 720px);
  overflow: auto;
  border: 1px solid var(--tmc-border);
  border-radius: 15px;
  background: linear-gradient(180deg, var(--tmc-surface-alt) 0%, var(--tmc-surface) 100%);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.lws-testimonials-marquee-charte__modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--tmc-ivory);
  cursor: pointer;
}

.lws-testimonials-marquee-charte__modal-close:hover,
.lws-testimonials-marquee-charte__modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

.lws-testimonials-marquee-charte__modal-close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.lws-testimonials-marquee-charte__modal-body .lws-testimonials-marquee-charte__card {
  flex: none;
  width: 100%;
  max-width: none;
  min-height: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.lws-testimonials-marquee-charte__modal-body .lws-testimonials-marquee-charte__text--clamp {
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
}

.lws-testimonials-marquee-charte__modal-nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--tmc-border);
}

.lws-testimonials-marquee-charte__modal-nav-btn {
  border: 1px solid var(--tmc-border);
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--tmc-ivory);
  background: rgba(24, 20, 22, 0.85);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.lws-testimonials-marquee-charte__modal-nav-btn:hover,
.lws-testimonials-marquee-charte__modal-nav-btn:focus-visible {
  border-color: var(--tmc-copper);
  background: rgba(219, 175, 92, 0.12);
}

@media (max-width: 899px) {
  .lws-testimonials-marquee-charte__halo-tip {
    width: min(86vw, 420px);
    height: min(86vw, 420px);
    left: 50%;
    right: auto;
    top: 55%;
    transform: translate(-50%, -50%);
  }

  .lws-testimonials-marquee-charte__header {
    margin-top: 1.25rem;
    margin-bottom: 2.25rem;
    padding-block: 1.5rem; /* +24px haut/bas : titre moins collé sur mobile */
  }

  .lws-testimonials-marquee-charte__card {
    flex-basis: 320px;
    width: 320px;
    max-width: 320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lws-testimonials-marquee-charte__track {
    animation: none !important;
    transform: none !important;
  }

  .lws-testimonials-marquee-charte__see-more,
  .lws-testimonials-marquee-charte__mobile-btn,
  .lws-testimonials-marquee-charte__modal-nav-btn {
    transition: none;
  }

  .lws-testimonials-marquee-charte__see-more-label,
  .lws-testimonials-marquee-charte__see-more:hover .lws-testimonials-marquee-charte__see-more-label,
  .lws-testimonials-marquee-charte__see-more:focus-visible .lws-testimonials-marquee-charte__see-more-label,
  .lws-testimonials-marquee-charte__see-more:active .lws-testimonials-marquee-charte__see-more-label {
    transform: none;
  }
}
