/* Calculateur de haie — complète styles.css */

.haie-main {
  padding: 6rem 0 3rem;
}

.haie-header {
  margin-bottom: 1.5rem;
}

.haie-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.haie-title {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.haie-header .section-intro {
  margin-bottom: 0;
}

/* Fil d'étapes */
.haie-stepper {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  padding: 0;
  margin: 0 0 1.25rem;
  counter-reset: none;
}

.haie-stepper li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.25rem 0.5rem;
  border-bottom: 3px solid #dde5df;
  color: #6c757d;
  font-size: 0.9rem;
  min-width: 0;
}

.haie-stepper li.is-done {
  border-color: #8fc19f;
  color: #1f6b3b;
}

.haie-stepper li.is-current {
  border-color: #1f6b3b;
  color: #1e2a1f;
  font-weight: 600;
}

.haie-step-num {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  background: #e8efe9;
}

.is-current .haie-step-num {
  background: #1f6b3b;
  color: #fff;
}

.is-done .haie-step-num {
  background: #cfe6d6;
}

@media (max-width: 575.98px) {
  .haie-step-label {
    display: none;
  }
  .is-current .haie-step-label {
    display: inline;
    white-space: nowrap;
  }
}

/* Panneaux */
.haie-panel {
  background: #fff;
  border: 1px solid #e1e7e2;
  border-radius: 1rem;
  padding: 1.5rem;
}

.haie-panel[hidden] {
  display: none;
}

.haie-panel-title {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.haie-help {
  color: #4b5b4e;
  margin-bottom: 1rem;
}

.haie-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  gap: 1rem;
}

.haie-error {
  color: #b02a37;
  margin: 0.75rem 0 0;
  font-weight: 600;
}

/* Recherche d'adresse */
.haie-search {
  position: relative;
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  max-width: 560px;
}

.haie-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1100;
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0.25rem 0;
  background: #fff;
  border: 1px solid #dde5df;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(15, 76, 40, 0.15);
}

.haie-search-results button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 0.45rem 0.85rem;
  font-size: 0.95rem;
}

.haie-search-results button:hover,
.haie-search-results button:focus {
  background: #eef5f0;
}

.haie-search-results small {
  color: #6c757d;
}

/* Cartes */
.haie-map-wrap {
  position: relative;
}

.haie-map {
  height: 460px;
  border-radius: 0.75rem;
  border: 1px solid #dde5df;
  z-index: 0;
}

.haie-map.is-drawing {
  cursor: crosshair;
}

.haie-map.is-drawing .leaflet-interactive {
  cursor: crosshair;
}

.haie-map-toolbar {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.haie-map-toolbar .btn-light {
  border: 1px solid #ccd6cf;
}

.haie-map-result {
  height: 340px;
}

.haie-vertex {
  background: #fff;
  border: 2px solid #1f6b3b;
  border-radius: 50%;
}

.haie-length {
  margin-top: 0.75rem;
  font-size: 1.05rem;
}

.haie-length-hint {
  color: #6c757d;
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

/* Choix (radio / checkbox en tuiles) */
.haie-choices {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .haie-choices-2 { grid-template-columns: repeat(2, 1fr); }
  .haie-choices-3 { grid-template-columns: repeat(3, 1fr); }
  .haie-choices-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
  .haie-choices-5 { grid-template-columns: repeat(5, 1fr); }
}

.haie-choice {
  position: relative;
  cursor: pointer;
  display: block;
}

.haie-choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.haie-choice-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  height: 100%;
  padding: 1rem 1.1rem;
  border: 2px solid #e1e7e2;
  border-radius: 0.75rem;
  background: #fbfcfb;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.haie-choice:hover .haie-choice-body {
  border-color: #a8cdb4;
}

.haie-choice input:checked + .haie-choice-body {
  border-color: #1f6b3b;
  background: #eef6f0;
  box-shadow: inset 0 0 0 1px #1f6b3b;
}

.haie-choice input:focus-visible + .haie-choice-body {
  outline: 3px solid #8fc19f;
  outline-offset: 2px;
}

.haie-choice-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.haie-choice-title {
  font-weight: 600;
  color: #1e2a1f;
}

.haie-choice-text {
  font-size: 0.9rem;
  color: #4b5b4e;
}

/* Résultat */
.haie-result {
  background: transparent;
  border: 0;
  padding: 0;
}

.haie-result-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.haie-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.haie-card {
  background: #fff;
  border: 1px solid #e1e7e2;
  border-radius: 1rem;
  padding: 1.25rem;
  height: 100%;
}

.haie-card-title {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.haie-status {
  color: #6c757d;
  font-size: 0.9rem;
}

.haie-status:empty {
  display: none;
}

.haie-status.is-error {
  color: #8a5a00;
  background: #fff6e0;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.haie-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 0;
}

.haie-facts div {
  background: #f3f6f4;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.haie-facts dt {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6c757d;
  font-weight: 400;
}

.haie-facts dd {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1e2a1f;
}

/* Triangle de texture */
.haie-triangle svg {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.haie-triangle .zone {
  stroke: #ffffff;
  stroke-width: 1.2;
}

.haie-triangle .zone.is-active {
  stroke: #0a2916;
  stroke-width: 2.2;
}

.haie-triangle .zone-label {
  font-size: 8.5px;
  fill: #1e2a1f;
  text-anchor: middle;
  pointer-events: none;
}

.haie-triangle .axis-label {
  font-size: 9px;
  fill: #4b5b4e;
}

.haie-triangle .axis-tick {
  font-size: 7px;
  fill: #6c757d;
}

.haie-soil-class {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.15rem;
  margin: 0.75rem 0 0.25rem;
  color: #1f6b3b;
}

.haie-soil-bars {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.25rem 0.5rem;
  align-items: center;
  font-size: 0.85rem;
  margin: 0.5rem 0;
}

.haie-soil-bar {
  height: 0.55rem;
  border-radius: 1rem;
  background: #eef2ef;
  overflow: hidden;
}

.haie-soil-bar span {
  display: block;
  height: 100%;
  border-radius: 1rem;
}

.haie-soil-manual {
  margin-top: 0.75rem;
  border-top: 1px solid #eef2ef;
  padding-top: 0.6rem;
}

.haie-soil-manual summary {
  cursor: pointer;
  color: #1f6b3b;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Profil altimétrique */
.haie-profile svg {
  width: 100%;
  height: auto;
  display: block;
}

.haie-profile .grid line {
  stroke: #e7ece8;
}

.haie-profile .tick {
  font-size: 11px;
  fill: #6c757d;
}

.haie-profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

/* Schéma */
.haie-scheme svg {
  width: 100%;
  height: auto;
  display: block;
}

.haie-scheme .meter {
  font-size: 10px;
  fill: #6c757d;
  text-anchor: middle;
}

.haie-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.haie-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.haie-dot {
  display: inline-block;
  border-radius: 50%;
}

/* Tableaux */
.haie-table {
  font-size: 0.93rem;
}

.haie-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6c757d;
  font-weight: 600;
}

.haie-table .latin {
  font-style: italic;
  color: #6c757d;
  font-size: 0.85rem;
}

.haie-table tfoot th {
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  color: #1e2a1f;
}

.haie-tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  margin: 0.1rem 0.15rem 0.1rem 0;
  border-radius: 1rem;
  background: #eef5f0;
  color: #1f6b3b;
  white-space: nowrap;
}

.haie-tag.is-match {
  background: #1f6b3b;
  color: #fff;
}

.haie-strate {
  font-size: 0.8rem;
  white-space: nowrap;
}

.haie-budget input {
  width: 4.2rem;
  display: inline-block;
  text-align: right;
  padding: 0.1rem 0.3rem;
  font-size: 0.85rem;
}

.haie-verify {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.05rem 0.45rem;
  border-radius: 1rem;
  background: #fff3cd;
  color: #8a5a00;
  white-space: nowrap;
}

.haie-budget td {
  white-space: nowrap;
}

/* Calendrier */
.haie-calendar {
  font-size: 0.85rem;
}

.haie-cal-months {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 2px;
  margin-bottom: 0.4rem;
}

.haie-cal-months span {
  text-align: center;
  color: #6c757d;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.haie-cal-months span.is-year {
  color: #1e2a1f;
  font-weight: 600;
}

.haie-cal-row {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 2px;
  margin-bottom: 0.25rem;
}

.haie-cal-bar {
  border-radius: 0.4rem;
  height: 1.2rem;
}

.haie-cal-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.haie-cal-list li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.35rem 0;
  border-bottom: 1px solid #eef2ef;
}

.haie-cal-list li:last-child {
  border-bottom: 0;
}

.haie-cal-swatch {
  flex: none;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 0.2rem;
  transform: translateY(1px);
}

.haie-cal-when {
  font-weight: 600;
  min-width: 9.5rem;
}

.haie-disclaimer {
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: #6c757d;
}

/* Impression */
@media print {
  .navbar,
  footer,
  .haie-stepper,
  .haie-header .section-intro,
  .haie-result-actions,
  .haie-soil-manual,
  .haie-budget input[type="number"]::-webkit-inner-spin-button {
    display: none !important;
  }

  .haie-main {
    padding-top: 0;
  }

  body {
    background: #fff;
  }

  .haie-card {
    break-inside: avoid;
    border-color: #ccc;
  }

  .haie-budget input {
    border: 0;
    background: none;
  }

  .haie-map-result {
    height: 300px;
  }
}
