/* TM Slider front styles */

body#index .tms-hero-wrapper {
  position: relative;
  width: 100%;
  z-index: 1;
  box-sizing: border-box;
}

body#index .tms-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  min-height: var(--tms-min-h, 600px);
}

body#index .tms-track {
  display: flex;
  width: 100%;
  transform: translateX(0);
  transition: transform var(--tms-speed, 600ms) ease;
  min-height: var(--tms-min-h, 600px);
}

body#index .tms-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  min-height: var(--tms-min-h, 60vh);
}

body#index .tms-slide-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

body#index .tms-img,
body#index .tms-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body#index .tms-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}

body#index .tms-content {
  position: relative;
  z-index: 2;
  padding: 4rem;
  max-width: 720px;
  color: #fff;
}

body#index .tms-title {
  margin: 0 0 10px 0;
  font-size: 36px;
  line-height: 1.1;
}

body#index .tms-subtitle {
  margin-bottom: 12px;
  opacity: 0.95;
}

body#index .tms-html {
  margin-top: 12px;
}

body#index .tms-ctas {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

body#index .tms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  color: #fff;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.15);
}

body#index .tms-btn:hover {
  text-decoration: none;
}

body#index .tms-slide-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  text-indent: -9999px;
}

body#index .tms-align-left .tms-content {
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}

body#index .tms-align-center .tms-content {
  margin: 0 auto;
  text-align: center;
}

body#index .tms-align-right .tms-content {
  margin-left: auto;
  margin-right: 0;
  text-align: right;
}

body#index .tms-dots {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 4;
}

body#index .tms-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
}

body#index .tms-dot.is-active {
  background: rgba(255, 255, 255, 0.95);
}

/* Fade effect */
body#index .tms-effect-fade .tms-track {
  display: block;
  position: relative;
  min-height: var(--tms-min-h, 600px);
}

body#index .tms-effect-fade .tms-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--tms-speed, 600ms) ease;
}

body#index .tms-effect-fade .tms-slide.is-active {
  opacity: 1;
  z-index: 1;
}

@media (min-width: 768px) {
  body#index .tms-slide {
    min-height: var(--tms-min-h, 1000px);
  }
}

@media (max-width: 767px) {
  body#index .tms-slide {
    min-height: 40vh;
  }
  body#index .tms-content {
    padding: 22px;
  }
  body#index .tms-title {
    font-size: 22px;
  }
  body#index .tms-dots {
    display: none;
  }
}

/* Keep header above slider; do NOT touch position (theme JS sticky relies on it) */
body#index #header { position: relative; z-index: 3000; }

/* Debug badge */
.tms-debug-badge {
  position: fixed;
  bottom: 10px;
  left: 10px;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 6px 10px;
  font: 12px/1.2 Arial, sans-serif;
  border-radius: 6px;
  pointer-events: none;
}

/* Header/menu transparents quand le hero est visible (desktop uniquement) */
@media (min-width: 768px) {
  body.tms-hero-inview #header .header-nav,
  body.tms-hero-inview #header .header-top {
    background: transparent !important;
    box-shadow: none !important;
  }

  body.tms-hero-inview #header .header-nav a,
  body.tms-hero-inview #header .header-top a,
  body.tms-hero-inview #header .material-icons {
    color: #fff !important;
  }

  body.tms-hero-inview #header .header-banner {
    background: inherit;
  }

  body:not(.tms-hero-inview) #header .header-nav,
  body:not(.tms-hero-inview) #header .header-top {
    background: #fff;
  }
}
