/* =========================================================================
   Elindo Need — front

   Même charte que les outils et le formulaire de devis. Les variables du
   thème sont reprises quand elles existent, avec des valeurs de repli.
   ========================================================================= */

.el-need,
.el-need-page,
.el-need-page__intro,
.el-universe,
.el-universe-panel {
  --eln-violet:      var(--el-violet, #8B3DF5);
  --eln-violet-dark: var(--el-violet-sombre, #6D23D0);
  --eln-violet-pale: var(--el-violet-pale, #F4EEFE);
  --eln-ink:         var(--el-encre, #111214);
  --eln-grey:        var(--el-gris, #5B6069);
  --eln-line:        var(--el-trait, #E3E5E9);
  --eln-soft:        var(--el-fond-doux, #F7F7F9);
  --eln-error:       #C0392B;
  --eln-u: 8px;
}

/* =========================================================================
   L'assistant
   ========================================================================= */

.el-need {
  color: var(--eln-ink);
}

.el-need__questions {
  list-style: none;
  margin: 0;
  padding: 0;
}

.el-need__q {
  padding: calc(var(--eln-u) * 2.5) 0;
  border-bottom: 1px solid var(--eln-line);
}

.el-need__q:first-child { padding-top: 0; }

.el-need__fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

/* Le thème fait flotter les <legend> (legend { float: left; width: 100% })
   et ne dégage le flottement que sur l'élément qui suit (legend + *). Sur une
   question conditionnelle, cet élément est la condition en clair, masquée par
   le script : les réponses se retrouvaient à droite, dans une colonne de
   largeur nulle. Nos légendes ne flottent pas. */
.el-need legend {
  float: none;
}

.el-need__fieldset > :not(legend) {
  clear: both;
}

.el-need__label {
  display: flex;
  align-items: flex-start;
  gap: calc(var(--eln-u) * 1.5);
  width: 100%;
  margin: 0 0 calc(var(--eln-u) * 1.5);
  padding: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--eln-ink);
}

.el-need__num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--eln-violet-pale);
  color: var(--eln-violet);
  font-size: .8125rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.el-need__text { padding-top: 3px; }

.el-need__hint {
  display: inline-block;
  margin-left: 6px;
  font-size: .75rem;
  font-weight: 400;
  color: var(--eln-grey);
}

.el-need__hint::before { content: "("; }
.el-need__hint::after  { content: ")"; }

.el-need__help {
  margin: calc(var(--eln-u) * -0.5) 0 calc(var(--eln-u) * 1.5) 40px;
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--eln-grey);
}

/* Les réponses : des cartes cliquables, deux par ligne dès qu'il y a la
   place. Le bouton radio ou la case reste visible : on voit tout de suite
   si l'on choisit une réponse ou plusieurs. */
.el-need__choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: var(--eln-u);
  margin-left: 40px;
}

.el-need__choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--eln-line);
  border-radius: 10px;
  background: #fff;
  font-size: .9375rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--eln-ink);
  cursor: pointer;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}

.el-need__choice:hover { border-color: var(--eln-violet); }

.el-need__choice input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--eln-violet);
  cursor: pointer;
}

.el-need__choice:has(input:checked) {
  border-color: var(--eln-violet);
  background: var(--eln-violet-pale);
  box-shadow: inset 0 0 0 1px var(--eln-violet);
}

.el-need__choice:has(input:focus-visible) {
  outline: 3px solid rgba(139, 61, 245, .35);
  outline-offset: 2px;
}

/* Erreurs : seulement sans JavaScript, après envoi. */
.el-need__q--error .el-need__choice { border-color: var(--eln-error); }

.el-need__error {
  margin: var(--eln-u) 0 0 40px;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--eln-error);
}

/* Sans JavaScript : un seul bouton d'envoi sous les quatre étapes. Avec :
   « Précédent » et « Continuer » à chaque étape. */
.el-need__submit { margin-top: calc(var(--eln-u) * 3); }
.el-need--js .el-need__submit { display: none; }
.el-need__nav { display: none; }
.el-need--js .el-need__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--eln-u);
  margin-top: calc(var(--eln-u) * 3);
}
.el-need--js .el-need__nav [data-elindo-need-next] { margin-left: auto; }

.el-need__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--eln-u);
  padding: 12px 22px;
  border: 1px solid var(--eln-violet);
  border-radius: 8px;
  background: var(--eln-violet);
  color: #fff;
  font-size: .9375rem;
  font-weight: 700;
  cursor: pointer;
}

.el-need__btn:hover { background: var(--eln-violet-dark); border-color: var(--eln-violet-dark); }

/* =========================================================================
   Les étapes
   ========================================================================= */

.el-need [hidden] { display: none !important; }

.el-need__progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 calc(var(--eln-u) * 3);
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.el-need__progress-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 4px solid var(--eln-line);
  font-size: .9rem;
  line-height: 1.3;
  color: var(--eln-grey);
}

.el-need__progress-num { display: none; }

.el-need--js .el-need__progress-item.is-done { border-top-color: var(--eln-violet); }
.el-need--js .el-need__progress-item.is-current { border-top-color: var(--eln-violet); color: var(--eln-ink); font-weight: 700; }

/* Sans JavaScript, la barre ne dit rien d'utile : les étapes se suivent. */
.el-need:not(.el-need--js) .el-need__progress { display: none; }

.el-need__step {
  min-width: 0;
  margin: 0 0 calc(var(--eln-u) * 4);
  padding: 0;
  border: 0;
}

.el-need--js .el-need__step { margin-bottom: 0; }

.el-need__step-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  margin: 0 0 calc(var(--eln-u) * 2);
  padding: 0 0 calc(var(--eln-u) * 1.5);
  border-bottom: 1px solid var(--eln-line);
}

.el-need__step-title:focus { outline: none; }

.el-need__step-count {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--eln-violet);
}

.el-need__step-name {
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--eln-ink);
}

.el-need__note {
  margin: calc(var(--eln-u) * 2) 0 0;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--eln-soft);
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--eln-grey);
}

.el-need__alert {
  margin: 0 0 calc(var(--eln-u) * 2);
  padding: 12px 14px;
  border-radius: 8px;
  background: #FDF0EE;
  color: var(--eln-error);
  font-size: .875rem;
  font-weight: 600;
}

.el-need.is-busy .el-need__step { opacity: .7; transition: opacity .15s .1s; }

/* Condition en clair : utile sans JavaScript seulement. */
.el-need__cond {
  margin: calc(var(--eln-u) * -0.5) 0 var(--eln-u) 40px;
  font-size: .75rem;
  font-style: italic;
  color: var(--eln-grey);
}
.el-need--js .el-need__cond { display: none; }

/* =========================================================================
   Les champs à saisir
   ========================================================================= */

.el-need__input {
  display: block;
  width: 100%;
  max-width: 560px;
  margin: 0 0 0 40px;
  padding: 10px 12px;
  border: 1px solid var(--eln-line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: .9375rem;
  color: var(--eln-ink);
  box-sizing: border-box;
}

.el-need__input:focus { border-color: var(--eln-violet); outline: 3px solid rgba(139, 61, 245, .2); outline-offset: 0; }
.el-need__input--area { max-width: 720px; min-height: 96px; resize: vertical; }
.el-need__input--number { max-width: 140px; margin: 0; font-variant-numeric: tabular-nums; }

.el-need__unit-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 40px;
}

.el-need__unit { font-size: .875rem; color: var(--eln-grey); }

.el-need__dims {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-left: 40px;
}

.el-need__dim { display: flex; flex-direction: column; gap: 4px; margin: 0; }

.el-need__sublabel {
  display: block;
  margin-bottom: 4px;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--eln-ink);
}

.el-need__other { margin: 12px 0 0 40px; }
.el-need__other .el-need__input { margin-left: 0; }
.el-need--js .el-need__other:not(.is-open) { display: none; }

.el-need__unknown {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0 40px;
  font-size: .875rem;
  font-weight: 400;
  color: var(--eln-grey);
  cursor: pointer;
}

.el-need__unknown input { width: 16px; height: 16px; margin: 0; accent-color: var(--eln-violet); }

.el-need__q--error .el-need__input { border-color: var(--eln-error); }

.el-need__btn--ghost {
  background: #fff;
  color: var(--eln-violet);
}

.el-need__btn--ghost:hover { background: var(--eln-violet-pale); color: var(--eln-violet-dark); }
.el-need__btn:disabled { opacity: .6; cursor: progress; }

/* =========================================================================
   La recommandation
   ========================================================================= */

.el-need__result { margin-top: calc(var(--eln-u) * 3); }

.el-need.is-busy .el-need__result { opacity: .6; transition: opacity .15s .1s; }

.el-need-result {
  padding: calc(var(--eln-u) * 3);
  border-left: 4px solid var(--eln-violet);
  border-radius: 0 12px 12px 0;
  background: var(--eln-violet-pale);
}

.el-need-result:focus { outline: none; }

.el-need-result__kicker {
  margin: 0 0 6px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--eln-violet);
}

.el-need-result__headline {
  margin: 0 0 calc(var(--eln-u) * 1.5);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.015em;
  color: var(--eln-ink);
}

.el-need-result__text {
  margin: 0 0 calc(var(--eln-u) * 2);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--eln-ink);
  max-width: 72ch;
}

.el-need-result__subhead {
  margin: 0 0 4px;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--eln-ink);
}

.el-need-result__lines {
  list-style: none;
  margin: 0 0 calc(var(--eln-u) * 2);
  padding: 0;
}

.el-need-result__lines li {
  position: relative;
  padding: 6px 0 6px 22px;
  border-bottom: 1px solid rgba(17, 18, 20, .08);
  font-size: .9375rem;
  color: var(--eln-ink);
}

.el-need-result__lines li:last-child { border-bottom: 0; }

.el-need-result__lines li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 13px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--eln-violet);
}

.el-need-result__notice {
  margin: 0;
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--eln-grey);
}

/* Les trois solutions */
.el-need__h3 {
  margin: calc(var(--eln-u) * 4) 0 calc(var(--eln-u) * 2);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--eln-ink);
}

.el-need-cards {
  display: grid;
  /* Une, deux ou trois options : elles se partagent la largeur. */
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: calc(var(--eln-u) * 2);
  align-items: start;
}

.el-need-card {
  padding: calc(var(--eln-u) * 2.5);
  border: 1px solid var(--eln-line);
  border-radius: 12px;
  background: #fff;
}

.el-need-card.is-current {
  border-color: var(--eln-violet);
  box-shadow: 0 0 0 1px var(--eln-violet), 0 4px 18px rgba(117, 19, 189, .1);
}

.el-need-card__tag {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--eln-grey);
}

.el-need-card__badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--eln-violet);
  color: #fff;
  letter-spacing: .02em;
  text-transform: none;
}

.el-need-card__title { margin: 0 0 6px; font-size: 1.0625rem; font-weight: 800; color: var(--eln-ink); }
.el-need-card__text { margin: 0; font-size: .875rem; line-height: 1.5; color: var(--eln-grey); }

/* Option 1 : lien vers le produit ou la catégorie ; option recommandée : vers le devis */
.el-need-card__action { margin: calc(var(--eln-u) * 1.5) 0 0; }

.el-need-card__link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--eln-line);
  border-radius: 8px;
  color: var(--eln-ink);
  text-decoration: none;
  transition: border-color .15s, background-color .15s;
}

.el-need-card__link:hover,
.el-need-card__link:focus-visible {
  border-color: var(--eln-violet);
  background: rgba(139, 61, 245, .06);
  color: var(--eln-ink);
  text-decoration: none;
}

.el-need-card__link-label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--eln-violet);
}

.el-need-card__link-label::after { content: " \2192"; }

.el-need-card__link-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.el-need-card__link-name { font-size: .875rem; line-height: 1.35; overflow-wrap: anywhere; }

/* Texte blanc imposé : les règles de liens du thème sont plus fortes que .el-need__btn. */
.el-need-cards a.el-need-card__cta { width: 100%; justify-content: center; text-decoration: none; }
.el-need-cards a.el-need-card__cta,
.el-need-cards a.el-need-card__cta:visited,
.el-need-cards a.el-need-card__cta:hover,
.el-need-cards a.el-need-card__cta:focus,
.el-need-cards a.el-need-card__cta:active { color: #fff !important; text-decoration: none; }
.el-need-quote:focus { outline: none; }

/* Les mentions, sous les solutions */
.el-need-cards + .el-need-result__notice { margin-top: calc(var(--eln-u) * 2.5); }
.el-need-result__notice + .el-need-result__notice { margin-top: 4px; }

/* Les produits du pack catalogue */
.el-need-products {
  list-style: none;
  margin: calc(var(--eln-u) * 2) 0 0;
  padding: calc(var(--eln-u) * 1.5) 0 0;
  border-top: 1px solid var(--eln-line);
}

.el-need-product + .el-need-product { margin-top: 8px; }

.el-need-product__link {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-areas: "img name" "img price";
  column-gap: 10px;
  align-items: center;
  color: var(--eln-ink);
  text-decoration: none;
}

.el-need-product__img {
  grid-area: img;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background: var(--eln-soft);
  object-fit: contain;
}

.el-need-product__name { grid-area: name; font-size: .8125rem; font-weight: 600; line-height: 1.3; }
.el-need-product__price { grid-area: price; font-size: .8125rem; font-weight: 700; color: var(--eln-violet); font-variant-numeric: tabular-nums; }
.el-need-product__link:hover .el-need-product__name { color: var(--eln-violet); }

.el-need-result__actions { margin: calc(var(--eln-u) * 3) 0 0; }

/* Le formulaire de devis d'elindoleads, sous la recommandation */
.el-need__result .el-quote { margin-top: calc(var(--eln-u) * 3); }

/* La page projet */
.el-need-page__intro {
  max-width: 100%;
  margin: 0 0 calc(var(--eln-u) * 4);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--eln-grey);
}

.el-need-page__top { margin-bottom: calc(var(--eln-u) * 4); }

@media (max-width: 767.98px) {
  .el-need-cards { grid-template-columns: 1fr; }
  .el-need__progress-label { display: none; }
  .el-need__progress-num { display: block; font-weight: 700; }
}

.el-need-loading { min-height: 160px; }

.el-need-page__back { margin-bottom: calc(var(--eln-u) * 3); }

@media (max-width: 575.98px) {
  .el-need__help,
  .el-need__choices,
  .el-need__cond,
  .el-need__input,
  .el-need__unit-wrap,
  .el-need__dims,
  .el-need__other,
  .el-need__unknown,
  .el-need__error { margin-left: 0; }

  .el-need-result { padding: calc(var(--eln-u) * 2); }
  .el-need-result__headline { font-size: 1.375rem; }
}

/* =========================================================================
   Page « Mon besoin » : les univers

   Les tuiles sont des Boîtes d'image Elementor avec la classe el-universe ;
   les sections de projets portent la classe el-universe-panel et l'ID de
   leur univers. Sans JavaScript, aucune section n'est masquée.
   ========================================================================= */

.el-universe { cursor: pointer; }

.el-universe > .elementor-widget-container {
  height: 100%;
  border-radius: 14px;
  transition: box-shadow .15s, transform .15s;
}

.el-universe:hover > .elementor-widget-container {
  box-shadow: 0 0 0 1px var(--eln-violet), 0 4px 18px rgba(117, 19, 189, .08);
}

.el-universe.is-active > .elementor-widget-container {
  box-shadow: 0 0 0 2px var(--eln-violet), 0 4px 18px rgba(117, 19, 189, .12);
}

.el-universe [role="tab"]:focus-visible {
  outline: 3px solid rgba(139, 61, 245, .45);
  outline-offset: 3px;
}

.el-universe-panel.is-hidden { display: none !important; }

/* Le méga-menu et l'en-tête fixe ne recouvrent pas le haut de la section
   atteinte par son ancre (/mon-besoin#eclairage), que l'ID soit sur la
   section ou sur un widget « Ancre de menu ». */
.el-universe-panel,
.el-universe-panel .elementor-menu-anchor { scroll-margin-top: 140px; }

/* =========================================================================
   Page « Mon besoin » : les projets en cartes

   Une Liste d'icônes Elementor avec la classe CSS el-projects (onglet
   Avancé) s'affiche comme la maquette : des cartes, trois par ligne,
   deux sur tablette, une sur mobile. Sans la classe, la liste garde le
   style du thème.
   ========================================================================= */

.el-projects .elementor-icon-list-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.el-projects .elementor-icon-list-item {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 52px;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #dddce7;
  border-radius: 10px;
  background: #fff;
  font-size: .875rem;
  line-height: 1.35;
  color: var(--eln-ink);
  transition: background-color .15s, border-color .15s;
}

/* Elementor ajoute un séparateur entre les lignes : inutile en cartes. */
.el-projects .elementor-icon-list-item::before { display: none; }

.el-projects .elementor-icon-list-item > a,
.el-projects .elementor-icon-list-item.is-soon {
  padding: 14px 16px !important;
}

/* Règle à part : un navigateur sans :has() ignorerait tout le groupe. */
.el-projects .elementor-icon-list-item:not(:has(> a)) {
  padding: 14px 16px !important;
}

.el-projects .elementor-icon-list-item > a {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  align-self: stretch;
  color: inherit;
  text-decoration: none;
}

.el-projects .elementor-icon-list-item:has(> a):hover,
.el-projects .elementor-icon-list-item:has(> a:focus-visible) {
  border-color: var(--eln-violet);
  background: var(--eln-violet-pale);
}

.el-projects .elementor-icon-list-icon {
  flex: 0 0 auto;
  margin-right: 8px;
  color: var(--eln-violet);
}

.el-projects .elementor-icon-list-item.is-soon::after { margin-left: auto; }

.el-projects .elementor-icon-list-item:not(:has(a[href]:not([href=""]):not([href="#"])))::after { margin-left: auto; }

@media (max-width: 991.98px) {
  .el-projects .elementor-icon-list-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
  .el-projects .elementor-icon-list-items { grid-template-columns: 1fr; }
}

/* =========================================================================
   Page « Mon besoin » : les projets à venir

   Une ligne sans lien de la Liste d'icônes est un projet dont la page
   n'existe pas encore : grisée, avec la mention « Bientôt ». Elle redevient
   active d'elle-même le jour où on lui donne un lien.

   Deux règles distinctes : un navigateur sans :has() ignorerait toute la
   règle si les deux sélecteurs y étaient réunis. La classe is-soon est
   posée par le script.
   ========================================================================= */

.el-universe-panel .elementor-icon-list-item.is-soon {
  opacity: .55;
  cursor: default;
}

.el-universe-panel .elementor-icon-list-item:not(:has(a[href]:not([href=""]):not([href="#"]))) {
  opacity: .55;
  cursor: default;
}

.el-universe-panel .elementor-icon-list-item.is-soon::after {
  content: "Bientôt";
  flex: 0 0 auto;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--eln-soft);
  border: 1px solid var(--eln-line);
  color: var(--eln-grey);
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .02em;
  white-space: nowrap;
}

.el-universe-panel .elementor-icon-list-item:not(:has(a[href]:not([href=""]):not([href="#"])))::after {
  content: "Bientôt";
  flex: 0 0 auto;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--eln-soft);
  border: 1px solid var(--eln-line);
  color: var(--eln-grey);
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .02em;
  white-space: nowrap;
}

/* =========================================================================
   Mouvement réduit
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
  .el-need__choice,
  .el-need__step,
  .el-universe > .elementor-widget-container { transition: none; }
}
