:root {
  --primary-color: #ffc854;
  --border-color: darkgrey;
}

#questionnaireSection {
    background-color: var(--color-white);
    flex-direction: column;
    background: url(https://cdn.pixabay.com/photo/2021/04/02/06/56/black-n-white-pattern-6143988_1280.png);
    background: linear-gradient(rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.97)), url(https://cdn.pixabay.com/photo/2021/04/02/06/56/black-n-white-pattern-6143988_1280.png);
    background-size: 15%;
    background-position: center;
    height: auto;
    min-height: 50vh;
    margin: 3vh auto;
}

/* === Conteneur principal === */
.max-w-900{
  max-width: 900px;
}

/* === Barre de progression verticale === */
.positionBar {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 20px;
  position: relative;
}

.vertical-progress {
  width: 6px;
  height: 100%;
  background-color: #e9ecef;
  position: absolute;
  top: 0;
  left: 17.5px;
  border-radius: 3px;
  z-index: 1;
}

.vertical-progress .progress-bar {
  width: 100%;
  height: 0%;
  background-color: var(--primary-color);
  position: absolute;
  top: 0;
  transition: height 0.5s ease-in-out;
}

/* === Étapes === */
.step-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  z-index: 2;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #fff;
  border: 2px solid var(--primary-color);
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
}

.step-circle.active {
  background-color: var(--primary-color);
  color: white;
}

.step-label {
  font-weight: 100;
}

.step-container .step-item:last-child .step-label {
  font-weight: bold;
}

/* === Formulaire === */
#multi-step-form .form-control {
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--border-color);
  box-shadow: none;
  transition: border-color 0.5s ease-in-out, border-bottom 0.5s ease-in-out;
}

#multi-step-form .form-control:focus {
  border-bottom: 2px solid var(--primary-color);
}

#multi-step-form .step .list-group h5 {
  padding-left: 1vw;
  padding-top: 1vh;
}
#multi-step-form .step .list-group p {
  margin-top: 0;
  margin-bottom: 0;
  display: contents;
  font-weight: 400;
}
#multi-step-form .step .list-group span {
  font-weight: 100;
}

#multi-step-form .step h3 {
  position: relative;
  display: inline-block; /* important pour que ::after suive la largeur du texte */
}

#multi-step-form .step h3::after {
  content: "";
  height: 3px;
  width: 30px;
  background-color: var(--primary-color);
  position: absolute;
  bottom: 5px;
  left: 100%; /* juste après le texte */
  margin-left: 10px; /* petit espace entre le texte et le trait */
  animation: linkAfter 0.5s 1s ease both;
}

#multi-step-form .step input, #multi-step-form .step .list-group span {
  color: #946500;
}

#multi-step-form .step .btn-primary {
  color: #1b1b1b;
  background-color: white;
  border-color: var(--primary-color);
}
#multi-step-form .step .btn-primary:hover{
  color: var(--primary-color)!important;
}
#multi-step-form .step .btn-primary:hover, #multi-step-form .step .btn-success:hover {
  box-shadow: 0 4px 10px rgba(254, 189, 48, 0.149);
  border-color: var(--primary-color);
}
#multi-step-form .step .btn-success {
  color: #1b1b1b;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* === Responsive === */
@media (max-width: 768px) {
  .row {
    flex-direction: column;
    align-items: center;
  }

  .positionBar {
    flex-direction: row;
    margin-bottom: 20px;
  }

  .vertical-progress {
    width: 80%;
    height: 6px;
    left: 35px;
    top: 25%;
  }

  .vertical-progress .progress-bar {
    width: 0%;
    height: 100%;
    top: auto;
    left: 0;
    transition: width 0.5s ease-in-out;
  }

  .step-container {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
  }

  .step-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .step-label {
    margin-top: 4px;
    font-size: 0.85rem;
  }
}

.step-circle.completed {
  background-color: #83EF53 !important;
  color: white !important;
  /* border-color: green;*/
}

.step-circle.active {
  background-color: var(--primary-color) !important;
  color: white !important;
}


/* === Animations personnalisées === */

/* Zoom sur les cercles au survol */
.step-circle:hover {
  transform: scale(1.1);
  background-color: var(--primary-color);
  color: white;
}

/* Animation de rebond sur les champs au focus */
@keyframes bounceFocus {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.03); }
  100% { transform: scale(1); }
}

#multi-step-form .form-control:focus {
  animation: bounceFocus 0.3s ease-in-out;
}

/* Animation douce des boutons */
.btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Apparition en fondu des titres */
.step h3 {
  animation: fadeInTitle 0.6s ease-in-out;
}
.step .mb-3 {
  animation: fadeInTitle 0.8s ease-in-out;
}
.step button {
  animation: fadeInTitle 1s ease-in-out;
}

@keyframes fadeInTitle {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Résumé : effet de surbrillance */
#multi-step-form .step-4 li {
  transition: background-color 0.3s ease;
}

#multi-step-form .step-4 li:hover {
  background-color: #f8f9fa;
}

@keyframes fadeOutUp {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-30px);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.step.fade-out-up {
  animation: fadeOutUp 0.5s forwards;
}

.step.fade-in-up {
  animation: fadeInUp 0.5s forwards;
}

@keyframes fadeOutDown {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(30px);
  }
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.step.fade-out-down {
  animation: fadeOutDown 0.5s forwards;
}

.step.fade-in-down {
  animation: fadeInDown 0.5s forwards;
}

@-moz-keyframes linkAfter {
  0% {
    width: 0;
  }
  100% {
    width: 30px;
  }
}
@-webkit-keyframes linkAfter {
  0% {
    width: 0;
  }
  100% {
    width: 30px;
  }
}
@-o-keyframes linkAfter {
  0% {
    width: 0;
  }
  100% {
    width: 30px;
  }
}
@keyframes linkAfter {
  0% {
    width: 0;
  }
  100% {
    width: 30px;
  }
}