/* ==========================================================
   Hero Slider — NET CONCEPT
   Charte toutelasignaletique.com : titres en var(--tls-font)
   (Roboto Condensed), accent orange #FF9719, rayons 5px.
   Les couleurs / ratios sont injectés en variables CSS depuis le BO.
========================================================== */
.hs-slider {
  --hs-font: var(--tls-font, "Roboto Condensed", Roboto, sans-serif);
  --hs-radius: 0;
  --hs-btn-radius: 5px;
  --hs-gutter: clamp(20px, 5vw, 80px);
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--hs-radius);
  background: #f2f2f2;
  isolation: isolate;
}

.hs-track {
  position: relative;
  width: 100%;
  aspect-ratio: var(--hs-ratio, 1772 / 650);
}

/* ---------- slides ---------- */
.hs-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease, visibility 0s linear .6s;
  z-index: 0;
}
.hs-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity .6s ease, visibility 0s;
  z-index: 1;
}

.hs-slide__link {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 2;
  color: inherit;
  text-decoration: none;
}
.hs-slide__link:focus-visible {
  outline: 3px solid var(--hs-accent, #FF9719);
  outline-offset: -3px;
}

.hs-slide__media,
.hs-slide__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
}
.hs-slide__media img {
  object-fit: cover;
  object-position: center;
  max-width: none;
}

/* voile de lisibilité, uniquement sur les slides avec texte */
.hs-slide--text .hs-slide__media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(0, 0, 0, var(--hs-overlay, .45)) 0%,
    rgba(0, 0, 0, calc(var(--hs-overlay, .45) * .6)) 40%,
    rgba(0, 0, 0, 0) 75%);
}
.hs-slider--align-right .hs-slide--text .hs-slide__media::after {
  background: linear-gradient(270deg,
    rgba(0, 0, 0, var(--hs-overlay, .45)) 0%,
    rgba(0, 0, 0, calc(var(--hs-overlay, .45) * .6)) 40%,
    rgba(0, 0, 0, 0) 75%);
}
.hs-slider--align-center .hs-slide--text .hs-slide__media::after {
  background: rgba(0, 0, 0, var(--hs-overlay, .45));
}

/* ---------- contenu texte ---------- */
.hs-slide__content {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  box-sizing: border-box;
  width: min(760px, 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(10px, 1.6vw, 22px);
  padding: 0 var(--hs-gutter);
  color: var(--hs-text-color, #fff);
  pointer-events: none;
}
.hs-slide__content a { pointer-events: auto; }
.hs-slider--align-center .hs-slide__content {
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
  text-align: center;
}
.hs-slider--align-right .hs-slide__content {
  left: auto;
  right: 0;
  align-items: flex-end;
  text-align: right;
}

.hs-slide__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 0;
  font-family: var(--hs-font);
  font-weight: 600;
  font-size: clamp(12px, 1vw, 15px);
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.2;
}
.hs-slide__eyebrow-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.hs-slide__eyebrow-item + .hs-slide__eyebrow-item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hs-accent, #FF9719);
}

.hs-slide__title {
  margin: 0;
  font-family: var(--hs-font);
  font-weight: 800;
  font-size: clamp(26px, 4.2vw, 64px);
  line-height: 1.02;
  letter-spacing: -.005em;
  text-transform: uppercase;
  color: inherit;
  text-wrap: balance;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .25);
}

.hs-slide__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  padding: 13px 20px 12px;
  border: 0;
  border-radius: var(--hs-btn-radius);
  background: var(--hs-accent, #FF9719);
  color: var(--hs-btn-color, #fff);
  font-family: var(--hs-font);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-decoration: none;
  transition: filter .2s ease, transform .2s ease;
}
a.hs-slide__btn:hover,
a.hs-slide__btn:focus-visible {
  color: var(--hs-btn-color, #fff);
  text-decoration: none;
  filter: brightness(.92);
  transform: translateY(-1px);
}
a.hs-slide__btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.hs-slide__btn svg { flex: 0 0 auto; }

/* ---------- flèches ---------- */
.hs-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
  cursor: pointer;
  opacity: 0;
  transition: opacity .25s ease, background .2s ease, color .2s ease;
}
.hs-arrow--prev { left: 16px; }
.hs-arrow--next { right: 16px; }
.hs-slider:hover .hs-arrow,
.hs-arrow:focus-visible { opacity: 1; }
.hs-arrow:hover { background: var(--hs-accent, #FF9719); color: var(--hs-btn-color, #fff); }
.hs-arrow:focus-visible { outline: 2px solid var(--hs-accent, #FF9719); outline-offset: 2px; }

/* ---------- pastilles ---------- */
.hs-dots {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: clamp(10px, 2vw, 22px);
  display: flex;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}
.hs-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 10px;
  background: rgba(0, 0, 0, .28);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .18);
  cursor: pointer;
  pointer-events: auto;
  transition: width .3s ease, background .3s ease, border-color .3s ease;
}
.hs-dot.is-active {
  width: 28px;
  background: var(--hs-accent, #FF9719);
  border-color: var(--hs-accent, #FF9719);
}
.hs-dot:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

/* ---------- mobile ---------- */
@media (max-width: 767.98px) {
  .hs-track { aspect-ratio: var(--hs-ratio-m, var(--hs-ratio, 1772 / 650)); }
  .hs-slider--has-text .hs-track { min-height: 300px; }
  /* visuel à texte incrusté sans image mobile : affiché en entier plutôt que recadré */
  .hs-slide:not(.hs-slide--text):not(.hs-slide--has-mobile) .hs-slide__media img { object-fit: contain; }
  .hs-slide__eyebrow { font-size: 11px; letter-spacing: .04em; gap: 4px 10px; }
  .hs-slide__eyebrow-item { gap: 10px; }
  .hs-slide__content { width: 100%; justify-content: flex-end; padding-bottom: 44px; }
  .hs-slide--text .hs-slide__media::after {
    background: linear-gradient(0deg,
      rgba(0, 0, 0, var(--hs-overlay, .45)) 0%,
      rgba(0, 0, 0, calc(var(--hs-overlay, .45) * .5)) 60%,
      rgba(0, 0, 0, .05) 100%) !important;
  }
  .hs-slide__btn { font-size: 14px; padding: 12px 16px 11px; }
  .hs-arrow { display: none; }
  .hs-dot { width: 8px; height: 8px; border-width: 1.5px; }
  .hs-dot.is-active { width: 22px; }
}

@media (hover: none) {
  .hs-arrow { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hs-slide,
  .hs-slide.is-active,
  .hs-dot,
  .hs-slide__btn { transition: none; }
}
