
/* BASE CAROUSEL */
#header-carousel,
#header-carousel .carousel-inner,
#header-carousel .carousel-item {
  height: 75vh;
  min-height: 380px;
  max-height: 800px;
  position: relative;
  overflow: hidden;
}

/* Images */
#header-carousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* CAPTION */
.carousel-caption {
  position: absolute;
  bottom: 10%;
  top: auto;
  padding: 1.5rem 1.2rem;
  background: rgba(21, 36, 64, 0.35);
  border-radius: 12px;
  max-width: 96%;
  margin: 0 auto;
  left: 2%;
  right: 2%;
  transform: translateY(0);
}

/* Conteneur */
.slide-content {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

/* TEXTES */
.carousel-caption h1,
.carousel-caption .typewriter-multi,
.carousel-caption h3,
.carousel-caption h5,
.carousel-caption p {
  line-height: 1.35;
  margin-bottom: 1.2rem;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.carousel-caption h1,
.carousel-caption .typewriter-multi {
  font-size: clamp(22px, 7vw, 46px);
  font-weight: 800;
  letter-spacing: 0.5px;
  max-width: 100%;
  overflow-wrap: break-word;
}

.carousel-caption h3 {
  font-size: clamp(24px, 5.2vw, 42px);
  font-weight: 700;
  color: #e9707c;
}

.carousel-caption h5,
.carousel-caption p {
  font-size: clamp(17px, 4.2vw, 26px);
  font-weight: 400;
  opacity: 0.98;
}

/* TYPEWRITER DESKTOP */
@media (min-width: 992px) {
  .typewriter-multi {
    display: inline-block;
    border-right: 4px solid #e9707c;
    white-space: nowrap;
    overflow: hidden;
    animation: typing-swap 12s steps(45) infinite, blink-caret 1s step-end infinite;
  }

  .typewriter-multi::after {
    content: "RÉORGANISATION & TRANSFORMATION";
    animation: content-swap 12s infinite;
  }

  @keyframes typing-swap {
    0%, 15%, 100% { width: 0; }
    25%, 50%      { width: 100%; }
    60%, 65%      { width: 0; }
    75%, 90%      { width: 100%; }
  }

  @keyframes content-swap {
    0%, 50%  { content: "RÉORGANISATION & TRANSFORMATION"; }
    51%, 100% { content: "PROFITEZ DE NOTRE EXPERTISE 2"; }
  }

  @keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #e9707c; }
  }
}




/* MOBILE & TABLET */

@media (max-width: 991px) {
  #header-carousel,
  #header-carousel .carousel-inner,
  #header-carousel .carousel-item {
    height: 26vh !important; 
    min-height: 150px !important;
  }

  #header-carousel .carousel-item img {
    object-fit: cover; 
    object-position: center;
  }

  .carousel-caption {
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(21, 36, 64, 0.6) !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0;
  }

  .typewriter-multi {
    font-size: 24px !important;
    white-space: normal !important;
    border: none !important;
  }

  .typewriter-multi::after {
    content: "RÉORGANISATION & TRANSFORMATION";
    display: block;
    animation: none;
  }

  .carousel-caption h3, 
  .carousel-caption p, 
  .carousel-caption h5 {
    font-size: 16px !important;
    margin-bottom: 10px !important;
    padding: 0 10px;
  }

  .btn-gdb-premium {
    padding: 10px 20px !important;
    font-size: 14px !important;
  }
}


/* MOBILE PETIT ÉCRAN */
@media (max-width: 576px) {
  #header-carousel,
  #header-carousel .carousel-inner,
  #header-carousel .carousel-item {
    height: 75vh;
    min-height: 400px;
    max-height: 600px;
  }

  .carousel-caption {
    bottom: 14%;
    padding: 1rem 0.9rem;
  }

  .carousel-caption h1,
  .carousel-caption .typewriter-multi {
    font-size: clamp(24px, 9vw, 36px);
  }

  .carousel-caption h3,
  .carousel-caption p,
  .carousel-caption h5 {
    font-size: clamp(15px, 4.8vw, 21px);
  }
}

/* BOUTON */
.btn-gdb-premium {
        display: inline-block;
        background: var(--primary-red);
        color: white;
        padding: 10px 50px;
        border-radius: 50px;
        font-size: 17px;
        font-weight: 700;
        text-decoration: none;
        transition: all 0.4s ease;
        position: relative;
        z-index: 1;
        overflow: hidden;
}


.btn-gdb-premium:hover {
  background: white;
  color: #e9707c;
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(233, 112, 124, 0.4);
}

/* ANIMATIONS */
.carousel-item.active .slide-in-right {
  animation: slideInRight 1.1s ease-out forwards;
}

.carousel-item.active .fade-in-up {
  animation: fadeInUp 1.3s ease-out forwards;
  animation-delay: 0.6s;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(70px); }
  to   { opacity: 1; transform: translateX(0); }
}

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