/* =========================================================================
   Phytextra — parcours de qualification (page Contacto)
   Chargé uniquement sur cette page. Reprend les jetons de style.css ;
   la pastille d'anneau sert ici de jalon de progression.
   ========================================================================= */

.qwrap{max-width:900px;margin-inline:auto}
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}

/* ---------- Progression ---------- */
/* Sans JavaScript, la barre d'étapes n'a pas de sens : elle n'apparaît que
   lorsque le script a pris la main (classe .js posée sur .qwrap). */
.progress{display:none;gap:6px;justify-content:space-between;position:relative;
  margin-bottom:34px}
.qwrap.js .progress{display:flex}
.progress::before{content:"";position:absolute;top:21px;left:7%;right:7%;height:2px;
  background:var(--line);z-index:0}
.progress-step{flex:1;display:flex;flex-direction:column;align-items:center;gap:8px;
  position:relative;z-index:1;text-align:center}
.progress-dot{width:42px;height:42px;border-radius:50%;background:var(--line);padding:3px;
  display:grid;place-content:center;transition:background .25s var(--ease)}
.progress-dot>span{width:36px;height:36px;border-radius:50%;background:var(--paper);
  display:grid;place-content:center;font-family:var(--ff-head);font-weight:700;
  font-size:.92rem;color:var(--muted);font-variant-numeric:tabular-nums}
.progress-step.active .progress-dot,.progress-step.done .progress-dot{background:var(--ring)}
.progress-step.active .progress-dot>span{color:var(--navy)}
.progress-step.done .progress-dot>span{color:var(--green-700)}
.progress-step.done .progress-dot>span::after{content:"✓";font-size:1rem}
.progress-step.done .progress-dot>span>span{display:none}
.progress-label{font-family:var(--ff-head);font-size:.78rem;font-weight:500;color:var(--muted);
  line-height:1.25}
.progress-step.active .progress-label{color:var(--navy);font-weight:600}

/* ---------- Panneaux ---------- */
.step-panel{animation:qfade .22s var(--ease)}
.qwrap.js .step-panel{display:none}
.qwrap.js .step-panel.active{display:block}
@keyframes qfade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.step-title{font-size:clamp(1.4rem,2.4vw,1.9rem);margin:0 0 .35em}
.step-desc{color:var(--muted);margin:0 0 28px;max-width:62ch}

/* ---------- Questions ---------- */
.q-block{margin-bottom:28px}
.q-label{display:block;font-family:var(--ff-head);font-weight:600;color:var(--navy);
  margin-bottom:12px;font-size:1.02rem}
.q-req{color:var(--green-700)}

.options{display:grid;gap:10px}
.options.cols-2{grid-template-columns:repeat(2,1fr)}
.options.cols-3{grid-template-columns:repeat(3,1fr)}
.options.cols-4{grid-template-columns:repeat(4,1fr)}
.option{display:flex;flex-direction:column;gap:3px;align-items:flex-start;text-align:left;
  background:#fff;border:1.5px solid var(--line);border-radius:var(--r-sm);
  padding:13px 15px;position:relative;transition:border-color .16s var(--ease),
  box-shadow .16s var(--ease),background .16s var(--ease)}
.option:hover{border-color:var(--green-300);box-shadow:var(--sh-sm)}
.option.selected{border-color:var(--green-700);background:var(--green-100);
  box-shadow:0 0 0 1px var(--green-700) inset}
.option.selected::after{content:"";position:absolute;top:10px;right:11px;width:16px;height:16px;
  border-radius:50%;background:var(--green-700) no-repeat center/10px 10px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")}
.opt-title{font-family:var(--ff-head);font-weight:600;font-size:.95rem;color:var(--navy);
  padding-right:18px}
.opt-sub{font-size:.8rem;color:var(--muted);line-height:1.35}

/* ---------- Champs de l'étape contact ---------- */
.form--plain{border:0;background:none;padding:0}

/* ---------- Navigation ---------- */
.wizard-nav{display:flex;gap:12px;align-items:center;margin-top:30px;
  padding-top:22px;border-top:1px solid var(--line);flex-wrap:wrap}
.wizard-nav .w-next,.wizard-nav .w-send{margin-left:auto}
.step-error{color:var(--copper,#B3472C);font-size:.9rem;margin:14px 0 0;display:none}
.step-error.show{display:block}

/* ---------- Récapitulatif ---------- */
.recap{display:grid;gap:0;margin:0;border:1px solid var(--line);border-radius:var(--r);
  overflow:hidden;background:#fff}
.recap-row{display:grid;grid-template-columns:38% 1fr;gap:16px;padding:11px 18px;
  border-bottom:1px solid var(--line-soft,var(--line));font-size:.93rem}
.recap-row:last-child{border-bottom:0}
.recap-row:nth-child(odd){background:var(--paper-soft)}
.recap dt{font-family:var(--ff-head);font-weight:500;color:var(--navy);margin:0}
.recap dd{margin:0}

/* ---------- Écran de fin ---------- */
.done-screen{display:none;text-align:center;padding:40px 20px;
  flex-direction:column;align-items:center;gap:16px}
.done-screen.show{display:flex}
.done-screen h2{margin:0}
.done-screen p{max-width:54ch;margin:0}
.done-screen a{color:var(--green-700);text-decoration:underline;text-underline-offset:3px}
.qwrap.sent .progress,.qwrap.sent #wizard-form{display:none}

/* ---------- Sans JavaScript : les six étapes s'enchaînent, le POST classique
              prend le relais et le bouton d'envoi est le seul bouton. ---------- */
.qwrap:not(.js) .step-panel{border-bottom:1px solid var(--line);
  padding-bottom:26px;margin-bottom:26px}
.qwrap:not(.js) .w-next,.qwrap:not(.js) .w-prev{display:none}
.qwrap:not(.js) .wizard-nav:empty{display:none}

@media (max-width:900px){
  .options.cols-3,.options.cols-4{grid-template-columns:repeat(2,1fr)}
  .progress-label{display:none}
  .progress{justify-content:center;gap:10px}
  .progress::before{left:12%;right:12%;top:21px}
}
@media (max-width:560px){
  .options.cols-2,.options.cols-3,.options.cols-4{grid-template-columns:1fr}
  .recap-row{grid-template-columns:1fr;gap:2px}
  .wizard-nav{gap:10px}
  .wizard-nav .btn{flex:1;justify-content:center}
  .wizard-nav .w-next,.wizard-nav .w-send{margin-left:0}
}
