/* Bannière principale avec diaporama */
.banner {
  position: relative;
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  opacity: 0;
  animation: bannerFadeIn 1.5s ease-out 0.3s forwards;
}

@keyframes bannerFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slideshow {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.banner-video,
.banner-image {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  object-fit: cover;
  object-position: center;
  will-change: transform;
  transform: translateZ(0);
  background: #000;
}

/* Optimisation mobile pour les vidéos */
@media (max-width: 768px) {
  .banner-video {
    height: 70vh;
    min-height: 70vh;
  }
}



.slide-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
  border-radius: 3px;
  opacity: 0;
  pointer-events: none;
}

.banner:hover .slide-arrow {
  opacity: 1;
  pointer-events: all;
}

.banner.touched .slide-arrow {
  opacity: 1;
  pointer-events: all;
}

.slide-arrow:hover {
  background: rgba(0, 0, 0, 0.5);
  transform: translateY(-50%) scale(1.05);
}

.slide-arrow.prev {
  left: 2rem;
}

.slide-arrow.next {
  right: 2rem;
}

.banner-mini-stats {
  position: absolute;
  bottom: 10rem;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  max-width: 800px;
  background: rgba(255, 255, 255, 0.95);
  padding: 1rem;
  border-radius: 12px;
  z-index: 10;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  opacity: 0;
  animation: slideUpStats 1s ease-out 0.5s forwards;
}

@keyframes slideUpStats {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.banner-mini-stats-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.banner-mini-stat-item {
  text-align: left;
  padding: 0.2rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
}

.banner-mini-stat-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(35%) sepia(95%) saturate(1000%) hue-rotate(170deg) brightness(95%) contrast(101%);
  flex-shrink: 0;
}

.banner-mini-stat-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.banner-mini-stat-number {
  font-size: 1.3rem;
  font-weight: 800;
  color: #026ea7;
  line-height: 1;
}

.banner-mini-stat-label {
  font-size: 0.65rem;
  color: #026ea7;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.slide-indicators {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 10;
}

.indicator {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid white;
}

.indicator:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.indicator.active {
  background: #026ea7;
  transform: scale(1.3);
}

.banner-content {
  text-align: left;
  color: white;
  max-width: 900px;
  animation: slideUp 1s ease-out;
  position: absolute;
  top: 50%;
  left: 5%;
  transform: translateY(-50%);
  z-index: 5;
  width: 90%;
  padding: 2rem;
}

.banner-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.3;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.banner-content h1 .tagline {
  font-weight: 400;
  font-size: 1.8rem;
  display: block;
  margin-top: 0.5rem;
}

.banner-content p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  line-height: 1.6;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.banner-content .btn-devis-banner {
  background: #026ea7;
  color: white;
  padding: 1rem 2.5rem;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: inline-block;
}

.banner-content .btn-devis-banner:hover {
  background: #025580;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bannière statistique desktop */
.banner-single-stat-desktop {
  position: absolute;
  bottom: 10rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  z-index: 10;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  animation: slideUp 0.8s ease-out 0.5s backwards;
}

.banner-single-stat-desktop .banner-single-stat-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.banner-single-stat-desktop .banner-single-stat-icon {
  width: 35px;
  height: 35px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(35%) sepia(95%) saturate(1000%) hue-rotate(170deg) brightness(95%) contrast(101%);
  flex-shrink: 0;
}

.banner-single-stat-desktop .banner-single-stat-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.banner-single-stat-desktop .banner-single-stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: #026ea7;
  line-height: 1;
}

.banner-single-stat-desktop .banner-single-stat-label {
  font-size: 0.8rem;
  color: #026ea7;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Masquer les slides mobiles sur desktop */
@media (min-width: 769px) {
  .slide.mobile-only {
    display: none !important;
  }

  .slide.desktop-only {
    display: flex !important;
  }
}

/* Diaporama mobile - masquer les slides desktop */
@media (max-width: 768px) {
  .slide.desktop-only {
    display: none !important;
  }

  .slide.mobile-only {
    display: flex !important;
  }

  .banner,
  .slideshow,
  .slide {
    height: 70vh;
    min-height: 70vh;
  }

  .banner-video,
  .banner-image {
    height: 70vh;
    min-height: 70vh;
  }

  .banner-mini-stats {
    display: none;
  }

  .banner-single-stat {
    position: absolute;
    bottom: 5rem;
    width: auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 0.8rem;
    border-radius: 10px;
    z-index: 10;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
  }

  .slide.mobile-only:nth-child(4) .banner-single-stat,
  .slide.mobile-only:nth-child(5) .banner-single-stat,
  .slide.mobile-only:nth-child(6) .banner-single-stat {
    left: 50%;
    transform: translateX(-50%);
  }

  .banner-single-stat-content {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .banner-single-stat-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(35%) sepia(95%) saturate(1000%) hue-rotate(170deg) brightness(95%) contrast(101%);
    flex-shrink: 0;
  }

  .banner-single-stat-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
  }

  .banner-single-stat-number {
    font-size: 0.9rem;
    font-weight: 800;
    color: #026ea7;
    line-height: 1;
  }

  .banner-single-stat-label {
    font-size: 0.55rem;
    color: #026ea7;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }

  .slide-arrow {
    display: none;
  }

  .mobile-nav {
    display: none; /* Masqué par défaut */
    position: fixed;
    top: 0;
    right: 0;
    width: 70%;
    height: 100vh;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
  }

  .mobile-nav.open {
    transform: translateX(0);
  }

  .mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .mobile-nav li {
    margin-bottom: 1.5rem;
  }

  .mobile-nav a {
    text-decoration: none;
    color: #333;
    font-size: 1.2rem;
    font-weight: 500;
  }

  .mobile-nav .close-icon {
    font-size: 1.8rem;
    cursor: pointer;
    text-align: right;
    margin-bottom: 2rem;
  }

  /* Pour la page contact, l'en-tête doit être plus simple */
  .contact-page .header {
    padding: 1rem;
  }

  .contact-page .header .logo img {
    height: 35px;
  }

  /* Empêche le défilement horizontal */
  body {
    overflow-x: hidden;
  }

  /* Réorganiser le bouton découvrir dans la section services pour mobile */
  .services-section .service-item .btn-discover {
    order: -1;
    margin-bottom: 1rem;
  }

  /* Page réalisations adjustments for mobile */
  .realisations-page .section-title-wrapper {
    margin-top: -50px; /* Remonte le titre */
    margin-bottom: 1rem; /* Réduit l'espace entre titre et sous-titre */
  }
}