#devis {
  position: relative;
  padding: var(--sp-lg) 0 var(--sp-xl);
  /* Fond légèrement moins saturé que le --bg du reste du site. */
  background: #F1EFEA;
}

.devis-eyebrow {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  color: var(--primary);
  margin-bottom: var(--sp-md);
}

.devis-wrapper {
  display: block;
}

/* Petit drapeau/bannière dans le coin en haut à gauche de la section —
   rappelle ce que la personne a choisi sur la page Tarifs (Prestation
   unique, ou le palier de forfait), sans prendre de place dans le formulaire. */
.devis-mode-banner {
  position: absolute;
  top: 0;
  left: var(--sp-md);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 8px 14px;
  box-shadow: var(--shadow);
  text-align: left;
  z-index: 2;
}

.devis-mode-title {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary);
}

/* Cas "Forfait" : une vraie carte au format paysage (l'image — d'origine
   portrait — est recadrée pour remplir tout le rectangle), le libellé à
   sa droite. */
.devis-mode-card {
  width: 90px;
  height: 56px;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center 78%;
}

.devis-mode-card--essentiel { background-color: #ece7da; }
.devis-mode-card--complet { background-color: #1f3d2b; }
.devis-mode-card--premium { background-color: #2a0f0f; }

/* Progress bar */
.devis-progress {
  display: flex;
  align-items: center;
  margin-bottom: var(--sp-lg);
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.95rem;
  color: var(--text-muted);
  min-width: 64px;
}

.progress-step[hidden] { display: none; }

.progress-step > :first-child {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--border);
  font-weight: 500;
  font-size: 0.95rem;
  background: var(--white);
  transition: var(--transition);
}

.progress-step span { display: block; }

.progress-step.active > :first-child {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

.progress-step.done > :first-child {
  border-color: var(--primary);
  background: #e0ede5;
  color: var(--primary);
}

.progress-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin-bottom: 18px;
}

/* Steps */
.devis-step h3 { margin-bottom: var(--sp-xs); }
.step-hint { font-size: 1.05rem; color: var(--text-muted); margin-bottom: var(--sp-md); line-height: 1.55; }

/* Quand .step-hint/.field-note enveloppent un intro + une liste (au lieu
   d'un simple <p>), pour des textes plus longs à structurer en tirets. */
.step-hint p, .field-note p { margin: 0 0 8px; }
.step-hint p:last-child, .field-note p:last-child { margin-bottom: 0; }

.hint-list {
  margin: 0;
  padding-left: 1.2em;
}
.hint-list li { margin-bottom: 6px; }
.hint-list li:last-child { margin-bottom: 0; }
.step-hint .hint-list strong { color: var(--primary); }

.step-nav {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-sm);
  margin-top: var(--sp-lg);
}

/* Checklist */
.checklist-pillar { margin-bottom: var(--sp-lg); }

.checklist-pillar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--sp-sm);
  padding-bottom: var(--sp-xs);
  border-bottom: 1px solid var(--border);
}

/* Ruban de couleur par pilier, forme "feuille" (organique, cohérent avec le
   reste de l'identité nature du site) plutôt qu'un simple rectangle —
   repère visuel rapide entre Entretien (vert), Nettoyage (bleu) et Élagage
   (bleu ciel clair). */
.pillar-ribbon {
  display: inline-block;
  width: 34px;
  height: 20px;
  border-radius: 0 70% 0 70%;
  transform: rotate(-8deg);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

.pillar-ribbon--entretien { background: #3F7D52; }
.pillar-ribbon--nettoyage { background: #2F6FB0; }
.pillar-ribbon--elagage { background: #7EC8E3; }

.checklist-pillar-note {
  font-size: 1.02rem;
  color: var(--text-muted);
  margin: calc(-1 * var(--sp-sm)) 0 var(--sp-sm);
  line-height: 1.6;
}

.checklist-item { margin-bottom: var(--sp-sm); }

.pillar-waste-question {
  margin-top: var(--sp-md);
  padding-top: var(--sp-sm);
  border-top: 1px dashed var(--border);
}
.pillar-waste-question .question-field { max-width: none; }

.checklist-label {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  cursor: pointer;
  font-size: 1.12rem;
}

.checklist-label input { accent-color: var(--primary); width: 20px; height: 20px; flex-shrink: 0; }

.checklist-label input:disabled + .svc-icon,
.checklist-label input:disabled ~ span { opacity: 0.5; }
.checklist-label:has(input:disabled) { cursor: not-allowed; }

.pillar-coming-soon {
  margin-top: var(--sp-md);
  padding: var(--sp-sm);
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.pillar-coming-soon-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-xs);
}
.pillar-coming-soon-text strong { color: var(--text); }

.coming-soon-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
  margin: var(--sp-xs) 0 var(--sp-sm);
}
.coming-soon-actions .btn { padding: 0.5rem 1rem; font-size: 0.85rem; }

.svc-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: 6px;
  padding: 3px;
}

.svc-icon svg { width: 100%; height: 100%; }

.checklist-item:has(input:checked) .svc-icon {
  background: var(--primary);
  color: var(--white);
}

.qty-wrapper { padding-left: 28px; margin-top: 6px; }

/* Conditions du terrain (ex: sous "Tonte pelouse") — pas de prix, juste des
   cases pour décrire la situation au client final. */
.conditions-wrapper {
  padding-left: 28px;
  margin-top: 8px;
  padding-bottom: 4px;
}

.conditions-hint {
  font-size: 0.98rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.condition-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 1.05rem;
  line-height: 1.5;
  padding: 4px 0;
  cursor: pointer;
}

.condition-item input {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Questions détaillées (ex: hauteur de haie, type de fruitier, relief...) */
.questions-wrapper {
  padding-left: 28px;
  margin-top: 8px;
  padding-bottom: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* display: flex ci-dessus écraserait sinon l'attribut [hidden] posé par le
   JS tant que la case du service n'est pas cochée. */
.questions-wrapper[hidden] { display: none; }

.question-field { max-width: 380px; }

.field-label--small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}

.question-field select,
.question-field input[type="text"] {
  width: 100%;
  padding: 9px 12px;
  font-size: 1.05rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  font-family: var(--font-body);
}

.question-field input[type="file"] {
  font-size: 0.98rem;
  max-width: 100%;
}

.field-file-preview {
  display: block;
  margin-top: 8px;
  max-width: 160px;
  max-height: 120px;
  border-radius: 4px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  cursor: pointer;
}

.radio-option input {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
}

/* Services répétables (ex: plusieurs haies) */
.repeat-wrapper {
  padding-left: 28px;
  margin-top: 8px;
}

.repeat-instances {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.repeat-instance {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-sm);
  background: var(--surface);
}

.repeat-instance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.repeat-instance-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--primary);
}

.repeat-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.92rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.repeat-remove:hover { color: #b23b3b; }

.repeat-instance .qty-wrapper { padding-left: 0; margin-top: 0; margin-bottom: 8px; }
.repeat-instance .questions-wrapper { padding-left: 0; margin-top: 0; }

.btn-add-instance {
  background: none;
  border: 1px dashed var(--primary);
  color: var(--primary);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: var(--sp-xs);
}

.btn-add-instance:hover { background: var(--surface); }

.summary-conditions {
  list-style: none;
  padding-left: 12px;
  margin: 2px 0 8px;
}

.summary-conditions li {
  font-size: 0.98rem;
  color: var(--text-muted);
  position: relative;
}

.summary-conditions li::before {
  content: '—';
  margin-right: 6px;
}

.qty-input {
  width: 100%;
  max-width: 260px;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1.05rem;
  background: var(--white);
}

.qty-input:focus { outline: 2px solid var(--primary); border-color: transparent; }

.creation-note {
  font-size: 1rem;
  background: #fff8e8;
  border-left: 3px solid #c9a84c;
  padding: var(--sp-xs) var(--sp-sm);
  margin-top: var(--sp-sm);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
}

/* Frequency */
.freq-options {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  margin: var(--sp-md) 0;
}

.freq-option {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  cursor: pointer;
  padding: var(--sp-sm) var(--sp-md);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
  font-size: 1.1rem;
}

.freq-option:has(input:checked) {
  border-color: var(--primary);
  background: #f0f7f2;
}

.freq-option input { accent-color: var(--primary); width: 20px; height: 20px; }
.freq-option em { color: var(--primary); font-size: 0.9rem; margin-left: auto; }

/* Step 3 fields */
.field-label {
  display: block;
  font-size: 1.02rem;
  font-weight: 500;
  margin-bottom: 8px;
  margin-top: var(--sp-md);
  color: var(--text);
}

select, input[type="text"], input[type="tel"], input[type="email"], input[type="number"], textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1.1rem;
  background: var(--white);
  color: var(--text);
  transition: var(--transition);
}

select:focus, input:focus, textarea:focus {
  outline: 2px solid var(--primary);
  border-color: transparent;
}

textarea { resize: vertical; min-height: 100px; }

.field-note {
  font-size: 0.98rem;
  line-height: 1.5;
  color: #6a5b1f;
  background: #fff8e8;
  border-left: 3px solid #c9a84c;
  padding: var(--sp-xs) var(--sp-sm);
  margin-top: var(--sp-xs);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.referral-hint {
  font-size: 1rem;
  color: var(--primary);
  margin-top: var(--sp-xs);
}

.referral-toggle { display: flex; gap: var(--sp-sm); margin: var(--sp-sm) 0; }
.referral-toggle .freq-option { flex: 1; justify-content: center; }

/* Step 4 */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-sm); }

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-sm);
  cursor: pointer;
  font-size: 1.05rem;
  margin-top: var(--sp-md);
  line-height: 1.55;
}

.consent-label input { margin-top: 3px; accent-color: var(--primary); width: 18px; height: 18px; flex-shrink: 0; }

/* Price panel */
.price-panel {
  position: sticky;
  top: 80px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.price-panel h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--primary);
  color: var(--white);
  padding: 0.9rem var(--sp-md);
  margin: 0;
  border-bottom: none;
}

.price-panel-body {
  padding: var(--sp-md);
}

.price-empty { font-size: 1.02rem; color: var(--text-muted); }

.price-line {
  display: flex;
  justify-content: space-between;
  font-size: 1.02rem;
  padding: 4px 0;
  gap: var(--sp-sm);
}

.price-line span:first-child { color: var(--text-muted); }
.price-line--pending { opacity: 0.5; font-style: italic; }
.price-custom { color: var(--text-muted); font-style: italic; }

.price-divider { height: 1px; background: var(--border); margin: var(--sp-sm) 0; }

.price-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
}

.price-total-row strong {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: #c9a84c;
}

.price-discount-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.92rem;
  color: var(--primary);
  margin-top: 4px;
}

.price-creation-notice {
  margin-top: var(--sp-sm);
  font-size: 0.9rem;
  background: #fff8e8;
  border-left: 3px solid #c9a84c;
  padding: var(--sp-xs) var(--sp-sm);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.price-disclaimer {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: var(--sp-sm);
  font-style: italic;
}

/* Confirmation screen */
#devis-confirmation {
  text-align: center;
  padding: var(--sp-lg);
}

.confirmation-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--sp-md);
}

.confirmation-whatsapp { margin-top: var(--sp-md); font-size: 1rem; }
.confirmation-whatsapp a { color: var(--primary); font-weight: 500; }

.confirmation-actions {
  display: flex;
  justify-content: center;
  gap: var(--sp-sm);
  margin-top: var(--sp-lg);
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .confirmation-actions { flex-direction: column; }
}

@media (max-width: 900px) {
  .devis-wrapper { grid-template-columns: 1fr; }
  .price-panel { position: static; order: -1; }
  .field-row { grid-template-columns: 1fr; }
}

/* Liste de priorité — mode Revalorisation uniquement */
.revalorisation-priority-list {
  list-style: none;
  margin: var(--sp-sm) 0 var(--sp-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.revalorisation-priority-item {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 1rem;
}

.revalorisation-priority-rank {
  font-weight: 700;
  color: var(--primary);
  min-width: 22px;
}

.revalorisation-priority-label { flex: 1; }

.revalorisation-priority-checkbox {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  cursor: pointer;
  font-size: 1rem;
}

.revalorisation-priority-checkbox input { accent-color: var(--primary); width: 18px; height: 18px; flex-shrink: 0; }

.revalorisation-priority-move {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  width: 30px;
  height: 30px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--primary);
}

.revalorisation-priority-move:hover { background: var(--surface); }
.revalorisation-priority-move:disabled { opacity: 0.3; cursor: default; }

/* Avertissements toiture/façade/allées — mêmes couleurs que .field-note/
   .creation-note déjà utilisés ailleurs dans ce fichier. */
.service-warning {
  font-size: 0.9rem;
  line-height: 1.5;
  background: #fff8e8;
  border-left: 3px solid #c9a84c;
  padding: var(--sp-xs) var(--sp-sm);
  margin: 6px 0 8px 28px;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: #6a5b1f;
}
