/* ═══════════════════════════════════════════════════════
   AEC CONSEILS — Styles partagés des simulateurs
   À lier APRÈS style.css :
     <link rel="stylesheet" href="style.css">
     <link rel="stylesheet" href="simulateurs.css">
   Les couleurs héritent des variables de style.css (vert AEC).
   ═══════════════════════════════════════════════════════ */

.icon { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ─── Disposition ─── */
.sim { display: grid; grid-template-columns: 390px 1fr; gap: 24px; align-items: start; }
.sim-form { position: sticky; top: 88px; }
.sim-form h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.sim-form h2 .icon { width: 20px; height: 20px; color: var(--blue); }
.sim-form .form-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }
.fieldset-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin: 22px 0 12px; padding-top: 18px; border-top: 1px solid var(--border-light); }
.fieldset-title:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.field .hint { font-weight: 400; color: var(--text-muted); font-size: 12px; }

/* ─── Champs numériques ─── */
.num-wrap { position: relative; display: flex; align-items: center; }
.num-wrap input[type=number] { width: 100%; font-family: var(--font); font-size: 15px; font-weight: 600; color: var(--text); padding: 11px 38px 11px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); -moz-appearance: textfield; }
.num-wrap input[type=number]::-webkit-outer-spin-button, .num-wrap input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num-wrap input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.num-wrap .suffix { position: absolute; right: 14px; font-size: 14px; font-weight: 600; color: var(--text-muted); pointer-events: none; }

/* ─── Boutons segmentés ─── */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: fit-content; font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--text-secondary); background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 9px 10px; cursor: pointer; transition: all 0.18s; white-space: nowrap; }
.seg button:hover { border-color: var(--text-muted); }
.seg button.active { color: var(--blue); background: var(--blue-bg); border-color: var(--blue); }

/* ─── Curseurs ─── */
.slider-row { display: flex; align-items: center; gap: 14px; }
.slider-row input[type=range] { flex: 1; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 4px; background: var(--border); outline: none; }
.slider-row input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--blue); cursor: pointer; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.slider-row input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--blue); cursor: pointer; border: 3px solid #fff; }
.slider-val { min-width: 58px; text-align: right; font-size: 15px; font-weight: 700; color: var(--blue); }

select.tmi-select { width: 100%; font-family: var(--font); font-size: 14px; font-weight: 600; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); cursor: pointer; }
select.tmi-select:focus { outline: none; border-color: var(--blue); }

/* ─── Résultats ─── */
.sim-results { display: flex; flex-direction: column; gap: 20px; }
.summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.summary-card { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.summary-card.primary { background: var(--blue); border-color: var(--blue); }
.summary-card .sc-label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.summary-card.primary .sc-label { color: rgba(255,255,255,0.85); }
.summary-card .sc-value { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.summary-card.primary .sc-value { color: #fff; }
.summary-card .sc-foot { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.summary-card.primary .sc-foot { color: rgba(255,255,255,0.8); }

/* ─── Titres de cartes résultat ─── */
.result-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.result-card .result-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }

/* ─── Barre de répartition (empilée) + légende ─── */
.split-bar { display: flex; height: 16px; border-radius: 8px; overflow: hidden; margin: 4px 0 16px; background: var(--card-bg); }
.split-bar span { display: block; height: 100%; }
.split-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
.split-legend .sl { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-secondary); }
.split-legend .dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.split-legend .sl b { color: var(--text); font-weight: 700; margin-left: auto; }

/* ─── CTA capture lead ─── */
.lead-cta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 22px; background: var(--blue-bg); border: 1px solid var(--blue); border-radius: 16px; }
.lead-cta p { font-size: 14px; color: var(--text-secondary); flex: 1; min-width: 200px; line-height: 1.5; }
.lead-cta p strong { color: var(--text); }

/* ─── Note / avertissement ─── */
.note { display: flex; gap: 12px; padding: 16px 18px; background: var(--blue-bg); border-radius: 12px; font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.note .icon { color: var(--blue); width: 18px; height: 18px; margin-top: 1px; }
.note.amber { background: #fef6ec; }
.note.amber .icon { color: #d97706; }

/* ─── Accordéon : code inline (réutilise .accordion de style.css) ─── */
.accordion-body-inner code { background: var(--card-bg); border: 1px solid var(--border-light); border-radius: 5px; padding: 1px 6px; font-size: 12.5px; }

/* ─── Cartes du hub ─── */
.hub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.hub-card { display: flex; flex-direction: column; gap: 0; background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 28px; transition: all 0.2s; }
.hub-card:hover { border-color: var(--blue); box-shadow: var(--card-shadow-hover); transform: translateY(-2px); }
.hub-card .hub-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--blue-bg); color: var(--blue); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.hub-card h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.hub-card p { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; flex: 1; margin-bottom: 16px; }
.hub-card .hub-go { font-size: 13px; font-weight: 700; color: var(--blue); display: inline-flex; align-items: center; gap: 6px; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .sim { grid-template-columns: 1fr; }
  .sim-form { position: static; }
  .hub-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .split-legend { grid-template-columns: 1fr; }
}
