/* Configurateur de serre, Les Serres Tonneau. Charte : Poppins, bleus #005f61 / #92d0d4 / #e5f2f2, verts #e7f3eb / #efffe9, orange #be5804, jaune #e7be38. */

.stcfg {
  --stcfg-dark: #005f61;
  --stcfg-dark-hover: #004a4c;
  --stcfg-light: #92d0d4;
  --stcfg-pale: #e5f2f2;
  --stcfg-green: #e7f3eb;
  --stcfg-green-pale: #efffe9;
  --stcfg-orange: #be5804;
  --stcfg-orange-hover: #9c4603;
  --stcfg-orange-tint: #fdf3e9;
  --stcfg-yellow: #e7be38;
  --stcfg-text: #23302f;
  --stcfg-muted: #5c6b6a;
  --stcfg-border: #d3e4e4;
  --stcfg-field-border: #7a8d8e;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--stcfg-text);
  line-height: 1.5;
  max-width: 1100px;
  margin: 0 auto 2.5rem;
  padding: 0 16px;
  box-sizing: border-box;
}
.stcfg *, .stcfg *::before, .stcfg *::after { box-sizing: border-box; }
.stcfg button { font-family: inherit; }
.stcfg svg { display: block; flex-shrink: 0; }

.stcfg-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.stcfg-intro {
  max-width: 46rem; margin: 0 auto 1.5rem; text-align: center;
  color: var(--stcfg-muted); font-size: 1rem;
}
.stcfg-noscript { padding: 1rem; background: var(--stcfg-pale); border-radius: 12px; }

/* Carte principale */
.stcfg-card {
  background: #fff; border: 1px solid var(--stcfg-border); border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 95, 97, 0.08); overflow: hidden;
}

/* Progression mobile */
.stcfg-progress { padding: 14px 16px; border-bottom: 1px solid var(--stcfg-pale); }
.stcfg-progress-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.stcfg-progress-count { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--stcfg-muted); }
.stcfg-progress-label { font-size: 14px; font-weight: 600; color: var(--stcfg-dark); }
.stcfg-bar { margin-top: 10px; height: 6px; border-radius: 999px; background: var(--stcfg-pale); overflow: hidden; }
.stcfg-bar-fill { height: 100%; border-radius: 999px; background: var(--stcfg-dark); transition: width .3s ease; }

/* Onglets desktop */
.stcfg-tabs { display: none; list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--stcfg-pale); }
.stcfg-tab { flex: 1 1 0; min-width: 0; border-right: 1px solid var(--stcfg-pale); }
.stcfg-tab:last-child { border-right: 0; }
.stcfg-tab-btn {
  width: 100%; padding: 14px 8px; background: none; border: 0; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; gap: 2px; color: var(--stcfg-text);
}
.stcfg-tab-btn:disabled { cursor: default; }
.stcfg-tab.is-current .stcfg-tab-btn { background: var(--stcfg-pale); }
.stcfg-tab.is-future { opacity: .45; }
.stcfg-tab-num { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--stcfg-muted); }
.stcfg-tab-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stcfg-tab.is-current .stcfg-tab-name { color: var(--stcfg-dark); }

.stcfg-body { padding: 24px 16px; }

/* Titres */
.stcfg-head { margin-bottom: 1.5rem; }
.stcfg-title { margin: 0 0 .25rem; padding: 0; text-transform: none; letter-spacing: normal; font-size: 1.35rem; font-weight: 600; line-height: 1.3; color: var(--stcfg-dark); }
.stcfg-title:focus { outline: none; }
.stcfg-title:focus-visible { outline: 3px solid var(--stcfg-dark); outline-offset: 4px; border-radius: 4px; }
.stcfg-subtitle { margin: 0; color: var(--stcfg-muted); font-size: .95rem; }

/* Options de réponse */
.stcfg-options { display: grid; grid-template-columns: 1fr; gap: 14px; }
.stcfg-option {
  position: relative; display: flex; align-items: flex-start; gap: 14px; width: 100%;
  padding: 16px; text-align: left; cursor: pointer; background: #fff;
  border: 2px solid var(--stcfg-field-border); border-radius: 16px; color: inherit;
  transition: border-color .15s ease, background-color .15s ease;
}
.stcfg-option:hover { border-color: var(--stcfg-dark); }
.stcfg-option.is-active { border-color: var(--stcfg-dark); background: var(--stcfg-pale); }
.stcfg-option-icon {
  display: flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  border-radius: 12px; background: var(--stcfg-green); color: var(--stcfg-dark); flex-shrink: 0;
  transition: background-color .15s ease, color .15s ease;
}
.stcfg-option:hover .stcfg-option-icon, .stcfg-option.is-active .stcfg-option-icon { background: var(--stcfg-dark); color: #fff; }
.stcfg-option-text { display: flex; flex-direction: column; gap: 2px; padding-right: 28px; }
.stcfg-option-title { font-weight: 600; font-size: 1rem; }
.stcfg-option-desc { font-size: .875rem; color: var(--stcfg-muted); }
.stcfg-option-radio {
  position: absolute; top: 14px; right: 14px; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--stcfg-field-border); background: #fff;
}
.stcfg-option.is-active .stcfg-option-radio { border-color: var(--stcfg-dark); box-shadow: inset 0 0 0 4px #fff; background: var(--stcfg-dark); }

/* Boutons */
.stcfg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px; font-size: .95rem; font-weight: 600; line-height: 1.2; text-decoration: none;
  border: 2px solid transparent; border-radius: 12px; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.stcfg-btn-primary { background: var(--stcfg-dark); color: #fff; }
.stcfg-btn-primary:hover { background: var(--stcfg-dark-hover); color: #fff; text-decoration: none; }
.stcfg-btn-accent { background: var(--stcfg-orange); color: #fff; }
.stcfg-btn-accent:hover { background: var(--stcfg-orange-hover); color: #fff; text-decoration: none; }
.stcfg-btn-soft { background: var(--stcfg-pale); color: var(--stcfg-dark); }
.stcfg-btn-soft:hover { background: var(--stcfg-light); color: var(--stcfg-dark); text-decoration: none; }
.stcfg-btn-outline { background: #fff; color: var(--stcfg-dark); border-color: var(--stcfg-border); }
.stcfg-btn-outline:hover { background: var(--stcfg-pale); color: var(--stcfg-dark); text-decoration: none; }
.stcfg-btn-icon { display: inline-flex; }
.stcfg-btn.is-disabled { opacity: .55; }
.stcfg-btn.is-disabled:hover { background: var(--stcfg-dark); }
.stcfg-nav-next { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.stcfg-hint { margin: 0; min-height: 1.2em; font-size: .85rem; font-weight: 500; color: var(--stcfg-orange-hover); text-align: right; }
.stcfg-contact { margin-top: 14px; }
.stcfg-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 4px; background: none; border: 0;
  color: var(--stcfg-muted); font-size: .95rem; font-weight: 500; cursor: pointer;
}
.stcfg-link:hover { color: var(--stcfg-dark); }
.stcfg button:focus-visible, .stcfg a:focus-visible { outline: 3px solid var(--stcfg-dark); outline-offset: 3px; box-shadow: 0 0 0 2px #fff; }

.stcfg-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2rem; }
.stcfg-nav-results { flex-direction: column-reverse; align-items: stretch; border-top: 1px solid var(--stcfg-pale); padding-top: 1.5rem; }
.stcfg-restart { margin-top: 1.5rem; text-align: center; }

/* Résultats */
.stcfg-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.stcfg-card-product {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--stcfg-border); border-radius: 16px;
}
.stcfg-badge {
  position: absolute; top: 14px; left: 14px; z-index: 1; padding: 4px 12px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff;
}
.stcfg-badge-best { background: var(--stcfg-orange); }
.stcfg-badge-alt { background: var(--stcfg-dark); }
.stcfg-media { aspect-ratio: 4 / 3; background: var(--stcfg-green); display: flex; align-items: center; justify-content: center; }
.stcfg-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stcfg-media-fallback { font-size: 1.25rem; font-weight: 600; color: var(--stcfg-dark); }
.stcfg-product-body { display: flex; flex-direction: column; flex: 1; padding: 18px; gap: 10px; }
.stcfg-product-top { display: flex; flex-direction: column; gap: 6px; }
.stcfg-product-name { margin: 0; font-size: 1.05rem; font-weight: 600; line-height: 1.3; color: var(--stcfg-text); }
.stcfg-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.stcfg-price-from { font-size: .75rem; color: var(--stcfg-muted); }
.stcfg-price-old { font-size: .85rem; color: var(--stcfg-muted); }
.stcfg-price-now { font-size: 1.25rem; font-weight: 700; color: var(--stcfg-dark); }
.stcfg-product-desc { margin: 0; font-size: .875rem; color: var(--stcfg-muted); }
.stcfg-gaps { margin: 0; padding: 8px 12px; font-size: .8rem; background: var(--stcfg-orange-tint, #fdf3e9); border-left: 3px solid var(--stcfg-orange); border-radius: 8px; color: var(--stcfg-text); }
.stcfg-card-product .stcfg-btn { margin-top: auto; width: 100%; }

.stcfg-nomatch { margin-bottom: 1.5rem; padding: 18px 20px; border: 1px solid var(--stcfg-orange); background: var(--stcfg-orange-tint, #fdf3e9); border-radius: 16px; }
.stcfg-nomatch-title { margin: 0; font-size: 1.05rem; font-weight: 600; }
.stcfg-nomatch-text { margin: 4px 0 0; font-size: .875rem; color: var(--stcfg-muted); }
.stcfg-priority-q { margin: 14px 0 8px; font-size: .875rem; font-weight: 600; }
.stcfg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.stcfg-chip {
  padding: 6px 16px; font-size: .875rem; cursor: pointer; border-radius: 999px;
  background: #fff; color: var(--stcfg-text); border: 1px solid var(--stcfg-border);
}
.stcfg-chip::first-letter { text-transform: uppercase; }
.stcfg-chip:hover { border-color: var(--stcfg-dark); }
.stcfg-chip.is-active { background: var(--stcfg-dark); border-color: var(--stcfg-dark); color: #fff; }
.stcfg-priority-note { margin: 8px 0 0; font-size: .75rem; color: var(--stcfg-muted); }
.stcfg-empty { padding: 28px 20px; text-align: center; border: 1px solid var(--stcfg-border); border-radius: 16px; }
.stcfg-empty p { margin: 0 0 16px; color: var(--stcfg-muted); }

/* Réassurance */
.stcfg-reassure { display: grid; grid-template-columns: 1fr; gap: 12px; list-style: none; margin: 1.5rem 0 0; padding: 0; }
.stcfg-reassure-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: var(--stcfg-green-pale); border: 1px solid var(--stcfg-green); border-radius: 16px;
}
.stcfg-reassure-icon {
  display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%; background: var(--stcfg-dark); color: #fff;
}
.stcfg-reassure-text { display: flex; flex-direction: column; font-size: .8rem; color: var(--stcfg-muted); }
.stcfg-reassure-text strong { font-size: .9rem; color: var(--stcfg-text); }

/* Mobile : cartes de réponse plus compactes pour voir les choix sans trop défiler */
@media (max-width: 639px) {
  .stcfg { padding: 0 12px; }
  .stcfg-body { padding: 16px; }
  .stcfg-options { gap: 10px; }
  .stcfg-option { gap: 10px; padding: 10px 12px; border-radius: 12px; }
  .stcfg-option-icon { width: 36px; height: 36px; border-radius: 10px; }
  .stcfg-option-icon svg { width: 20px; height: 20px; }
  .stcfg-option-title { font-size: .95rem; line-height: 1.3; }
  .stcfg-option-desc { font-size: .8rem; line-height: 1.35; }
  .stcfg-option-radio { top: 10px; right: 10px; }
  .stcfg-nav { margin-top: 1.25rem; }
  .stcfg-head { margin-bottom: .75rem; }
}

/* Tablette et plus */
@media (min-width: 640px) {
  .stcfg-progress { display: none; }
  .stcfg-tabs { display: flex; }
  .stcfg-body { padding: 32px; }
  .stcfg-title { font-size: 1.6rem; }
  .stcfg-options { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .stcfg-grid { grid-template-columns: repeat(2, 1fr); }
  .stcfg-nav-results { flex-direction: row; align-items: center; }
  .stcfg-reassure { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
  .stcfg-body { padding: 44px 48px; }
  .stcfg-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .stcfg *, .stcfg *::before, .stcfg *::after { transition: none !important; }
}

/* Budget : curseur à deux poignées */
.stcfg-budget { padding: 4px 4px 0; }
.stcfg-budget-value {
  margin: 0 0 18px; text-align: center; font-size: 1.35rem; font-weight: 600; color: var(--stcfg-dark);
}
.stcfg-range { position: relative; height: 28px; margin: 0 12px; }
.stcfg-range-track {
  position: absolute; left: 0; right: 0; top: 11px; height: 6px; border-radius: 3px; background: var(--stcfg-border);
}
.stcfg-range-fill { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--stcfg-dark); }
.stcfg-range-input {
  position: absolute; left: -12px; top: 0; width: calc(100% + 24px); height: 28px; margin: 0; padding: 0;
  background: transparent; pointer-events: none; -webkit-appearance: none; appearance: none; z-index: 2;
}
.stcfg-range-input::-webkit-slider-runnable-track { background: transparent; height: 28px; border: 0; }
.stcfg-range-input::-moz-range-track { background: transparent; height: 28px; border: 0; }
.stcfg-range-input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto; cursor: grab;
  width: 24px; height: 24px; margin-top: 2px; border-radius: 50%; background: #fff;
  border: 3px solid var(--stcfg-dark); box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.stcfg-range-input::-moz-range-thumb {
  pointer-events: auto; cursor: grab; box-sizing: border-box;
  width: 24px; height: 24px; border-radius: 50%; background: #fff;
  border: 3px solid var(--stcfg-dark); box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.stcfg-range-input:focus-visible { outline: none; }
.stcfg-range-input:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--stcfg-orange); outline-offset: 2px; }
.stcfg-range-input:focus-visible::-moz-range-thumb { outline: 3px solid var(--stcfg-orange); outline-offset: 2px; }
.stcfg-range-ticks { position: relative; height: 22px; margin: 6px 12px 0; }
.stcfg-range-tick {
  position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap;
  font-size: .75rem; color: var(--stcfg-muted);
}
.stcfg-range-tick.is-first { transform: translateX(-12px); }
.stcfg-range-tick.is-last { transform: translateX(calc(-100% + 12px)); }
.stcfg-tiers { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
.stcfg-tier {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 12px;
  border: 2px solid var(--stcfg-border); background: #fff; color: var(--stcfg-muted);
  transition: border-color .15s ease, background-color .15s ease;
}
.stcfg-tier.is-covered { border-color: var(--stcfg-dark); background: var(--stcfg-pale); color: var(--stcfg-text); }
.stcfg-tier-title { font-weight: 600; font-size: .95rem; }
.stcfg-tier-desc { font-size: .85rem; }
@media (min-width: 640px) { .stcfg-tiers { grid-template-columns: 1fr 1fr; } }

/* v1.8.0 : choix grisés, prix "à partir de", phrase explicative */
.stcfg-option-cell { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stcfg-option-cell > .stcfg-option { flex: 1 1 auto; }
.stcfg-option.is-unavailable, .stcfg-option.is-unavailable:hover { opacity: .5; cursor: not-allowed; border-color: var(--stcfg-border, #d9d9d9); background: transparent; }
.stcfg-option.is-unavailable:hover .stcfg-option-icon { background: none; color: inherit; }
.stcfg-option-from { margin-top: 4px; font-size: .8125rem; font-weight: 600; color: var(--stcfg-dark); }
.stcfg-option-why { margin: 0; font-size: .8125rem; line-height: 1.4; color: var(--stcfg-muted); }
.stcfg-why-link { background: none; border: 0; padding: 0; font: inherit; color: var(--stcfg-dark); text-decoration: underline; cursor: pointer; }
.stcfg-why-link:focus-visible { outline: 2px solid var(--stcfg-dark); outline-offset: 2px; }
.stcfg-tier-from { display: block; margin-top: 2px; font-size: .75rem; font-weight: 600; color: var(--stcfg-dark); }
