/* ============================================================
   Formulaire de devis HORIZONTAL (test) - page "devis-aidant"
   Styles autonomes. La plupart des classes internes (.input-radio,
   .form-group, .btn, etc.) sont déjà stylées par le thème ; on ne
   gère ici que la mise en page horizontale et les transitions.
   ============================================================ */
.aidant-step.slide-in-right {
  animation: aidantSlideInRight 0.15s ease;
  z-index: -1;
}
.aidant-step.slide-in-left {
  animation: aidantSlideInLeft 0.15s ease;
  z-index: -1;
}
@keyframes aidantSlideInRight {
  from {
    opacity: 0;
    transform: translateX(140px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes aidantSlideInLeft {
  from {
    opacity: 0;
    transform: translateX(-140px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.aidant-form p.input-search-subtitle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.aidant-form {
  display: block;
  height: 100%;
  padding: 24px 0 40px;
}

/* --- Barre de progression --- */
.aidant-progress {
  margin-bottom: 5px;
  display: none;
  opacity: 0;
  transition: opacity 1s ease;
}

.aidant-progress-bar {
  position: relative;
  height: 6px;
  background: #e9e9ef;
  border-radius: 999px;
  overflow: hidden;
}

.aidant-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--e-global-color-primary, #6a4bff);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.aidant-progress-label {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #7a7a8c;
  text-align: right;
}

/* --- Viewport (fenêtre des étapes) --- */
.aidant-viewport {
  position: relative;
  width: 100%;
  /* Pas de clipping : la liste des suggestions de ville déborde de l'étape
       active et doit rester visible. */
  overflow: visible;
  transition: height 0.35s ease;
}
/* Liste déroulante des villes au-dessus des autres éléments */
.aidant-form .city-result,
.aidant-form .city-result-container {
  position: relative;
  z-index: 20;
  max-height: 175px;
  overflow-y: auto;
}

/* Le grisage hérité (.disable ajouté par agenceSearch) ne doit pas
   s'appliquer dans le formulaire horizontal. */
.aidant-form .input-search-container.disable {
  opacity: 1;
  pointer-events: auto;
}
.form-devis {
  background: #ffffff;
  box-shadow: 0px 5px 10px 0px #00000026;
  width: 100%;
  gap: 20px;
  opacity: 1;
  border-radius: 2px;
  padding: 40px;
  margin-top: 40px;
  overflow: hidden;
  position: relative;
}
.devis-container .left-content .input-search-container .input-search {
  margin-left: initial !important;
}
/* --- Étapes : une seule visible à la fois --- */
.aidant-step {
  display: none;
}

.aidant-step.is-active {
  display: block;
}

.aidant-step.is-active .input-search-header {
  margin-bottom: 24px;
}

.aidant-step .form-header-input-search {
  margin-top: 0;
}

/* --- Bouton étape précédente --- */
.aidant-prev {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-weight: 600;
  color: #7a7a8c;
  text-decoration: none;
  cursor: pointer;
}

.aidant-prev:hover {
  color: var(--e-global-color-primary, #6a4bff);
}

.aidant-form .hide {
  display: none !important;
}

/* --- Compteur d'heures --- */
.aidant-counter {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.aidant-counter input[type="text"] {
  width: 160px;
  text-align: center;
  pointer-events: none;
}

.aidant-counter .minus,
.aidant-counter .plus {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #d5d5e0;
  background: #fff;
  cursor: pointer;
}

/* --- Loader --- */
.aidant-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  z-index: 5;
}

.aidant-loader-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #e9e9ef;
  border-top-color: var(--e-global-color-primary, #6a4bff);
  border-radius: 50%;
  animation: aidantSpin 0.8s linear infinite;
}

@keyframes aidantSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================================
   Cartes de choix (design production)
   Chaque choix (.input-radio) est une carte : icône SVG dans un
   cercle jaune qui s'étend au survol pour remplir la carte.
   Repris de global.css (.devis-container .form-group .input-radio).
   ============================================================ */

/* Grille des choix : le formulaire horizontal réutilise .form-group */
.aidant-form .form-group.aidant-question {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* Le libellé et les éléments pleine largeur passent au-dessus des cartes */
.aidant-form .form-group.aidant-question > .form-label,
.aidant-form .form-group.aidant-question > .legend,
.aidant-form .form-group.aidant-question > p,
.aidant-form .form-group.aidant-question > .btn-container {
  flex-basis: 100%;
  width: 100%;
}

.aidant-form .form-group.aidant-question > .form-label {
  margin-bottom: 0;
  text-align: center;
}

/* --- Carte de base (hors compteur d'heures) --- */
.aidant-form .input-radio:not(.aidant-counter) {
  width: calc(25% - 9px);
  background: #fff;
  padding: 16px 30px;
  border: 1px solid #bfbfbf;
  position: relative;
  text-align: center;
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
}

@media screen and (max-width: 767px) {
  .aidant-form .input-radio:not(.aidant-counter) {
    width: calc(50% - 6px);
  }
}

/* Remplissage jaune de la carte au survol (cercle -> plein) */
.aidant-form .input-radio:not(.aidant-counter)::after,
.aidant-form .input-radio:not(.card-rh-ddd)::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-radius: 100%;
  transition: all 0.3s ease-out;
}

.aidant-form .input-radio:not(.aidant-counter):hover::after {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

/* --- Conteneur d'icône : cercle jaune qui s'étend --- */
.aidant-form .input-radio .img-container {
  border-radius: 100%;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  overflow: hidden;
}

/* SVG positionné par rapport à la carte (comme en production) */
.aidant-form .input-radio .img-container svg {
  position: absolute;
  top: 30px;
  fill: #000;
  height: 45px;
  width: auto;
  z-index: 9;
}

.aidant-form .input-radio .img-container::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 72px;
  border-radius: 100%;
  transition: all 0.3s ease-out;
}
.aidant-form .input-radio:not(.card-rh-ddd) .img-container::before {
  background: #ffe85b;
}
.aidant-form .input-radio.card-rh-ddd .img-container::before {
  background-color: #8cdcc8 !important;
}
.aidant-form .input-radio .img-container .img-radio {
  fill: #000;
  position: absolute;
  top: 39px;
  height: 27px;
  width: auto;
  z-index: 9;
}

.aidant-form .input-radio:hover .img-container::before {
  width: 120%;
  height: 120%;
  top: -5%;
  border-radius: 0;
}

/* --- Textes --- */
.aidant-form .input-radio .radio-text {
  font-size: 14px;
  line-height: 16px;
  font-weight: 500;
  color: #000;
  width: 100%;
  z-index: 9;
}

.aidant-form .input-radio .radio-info {
  font-size: 12px;
  line-height: 18px;
  font-weight: 400;
  color: #808080;
  font-style: italic;
  width: 100%;
  margin-top: 4px;
  z-index: 9;
}

/* --- Infobulle (coin supérieur droit) --- */
.aidant-form .input-radio .radio-infobulle {
  display: none;
  position: absolute;
  width: 21px;
  height: 20px;
  top: 7px;
  right: 7px;
  z-index: 9;
}

/* --- Inputs radio/checkbox masqués (la carte sert de contrôle) --- */
.aidant-form .input-radio input[type="radio"],
.aidant-form .input-radio input[type="checkbox"] {
  position: absolute;
  left: -9999px;
}

.aidant-form .input-radio.active-radio {
  transform: scale(1.08);
}
.aidant-form .input-radio.active-radio:not(label[for="nb_heures"])::before {
  content: "";
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  position: absolute;
  transition: all 0.2s ease;
  z-index: 9;
  background-color: #ffe85b;
}
.aidant-form .input-radio.active-radio &:not(label[for="nb_heures"])::hover {
  cursor: pointer;
}

.spacer {
  margin-top: 15px;
  margin-bottom: 15px;
}

.rounded-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  margin-right: 10px;
  border-radius: 100%;
  background: var(--e-global-color-secondary, #ffe85b);
  color: black;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}
