/* ═══════════════════════════════════════════════════
   BILAN CARBONE PME — calculateur.css
   Thème : Sobre, professionnel, rassurant
   ═══════════════════════════════════════════════════ */

/* ─── Variables ─── */
:root {
  --color-bg:          #EEF2F7;
  --color-surface:     #FFFFFF;
  --color-border:      #E4E2D9;
  --color-border-dark: #C8C5B8;

  --color-text:        #1A1A18;
  --color-text-mid:    #4A4A44;
  --color-text-light:  #7A7A72;

  --color-accent:       #0065BD;
  --color-accent-hover: #0052a8;
  --color-accent-light: #edf5fc;
  --color-accent-mid:   #d6eaf9;

  --color-error:       #C0392B;
  --color-info-bg:     #EEF4FB;
  --color-info-border: #BFD4ED;

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);

  --max-width: 760px;
  --transition: 180ms ease;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background:
    linear-gradient(
      180deg,
      #F7F6F2 0%,
      #F2F4F7 45%,
      #EBF0F7 100%
    );
  background-attachment: fixed;
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}
input, button, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ─── Shell ─── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}
.app-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}
.progress-header,
.step-page {
  position: relative;
  z-index: 1;
}

/* ─── Header progression — redesign ─── */
.progress-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0 32px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}
.progress-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.btn-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.btn-home:hover { opacity: 0.7; }
.btn-home .ti { font-size: 16px; }
.btn-home-logo {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.progress-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.progress-steps-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}
.step-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-border-dark);
  transition: all 300ms ease;
  flex-shrink: 0;
}
.step-dot.active {
  background: var(--color-accent);
  transform: scale(1.3);
}
.step-dot.done {
  background: var(--color-accent);
  opacity: 0.4;
}
.progress-bar {
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent) 0%, #2681d0 100%);
  border-radius: 2px;
  transition: width 500ms cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.progress-pct {
  display: flex;
  align-items: baseline;
  gap: 1px;
  flex-shrink: 0;
  font-family: var(--font-display);
}
.progress-pct-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  transition: all 300ms ease;
}
.progress-pct-sign {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  opacity: 0.7;
}

/* ─── Conteneur étape ─── */
.step-container {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ─── Intro de l'étape ─── */
.step-intro {
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.step-intro-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--color-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}
.step-intro-icon .ti {
  font-size: 24px;
  color: var(--color-accent);
}
.step-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  width: fit-content;
}
.step-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}
.step-desc {
  font-size: 15px;
  color: var(--color-text-mid);
  max-width: 520px;
  line-height: 1.65;
}

/* ─── Formulaire ─── */
.calc-form {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ─── Sections (fieldsets) ─── */
.form-section {
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: 32px 32px 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transition: box-shadow var(--transition);
  position: relative;
}
.form-section:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.form-section:has(.scope-badge.s1) { border-left-color: #3C3489; }
.form-section:has(.scope-badge.s2) { border-left-color: var(--color-accent); }
.form-section:has(.scope-badge.s3) { border-left-color: #B45309; }
.form-section:not(:has(.scope-badge)) { border-left-color: var(--color-accent); }
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0065BD;
  background: #dbeeff;
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.section-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0065BD;
  flex-shrink: 0;
}
.section-hint {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-mid);
  margin-top: 4px;
  margin-bottom: 20px;
  line-height: 1.55;
}
.form-section:not(:has(.section-hint)) .section-label {
  margin-bottom: 0;
}
.section-label + .sub-question {
  margin-top: 16px;
  padding-top: 0;
  border-top: none;
}
.required-star {
  color: var(--color-accent);
  margin-left: 2px;
  display: none;
}

/* ─── Sous-questions ─── */
.sub-question {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}
.sub-question:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.sub-label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 10px;
}
.sub-label.small { font-size: 14px; margin-top: 14px; }
.hint {
  font-weight: 400;
  color: var(--color-text-light);
  font-size: 13px;
}
.field-hint {
  font-size: 13px;
  color: var(--color-text-light);
  margin-bottom: 10px;
  margin-top: -6px;
}

/* ─── Cartes secteur ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.sector-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  position: relative;
}
.sector-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.card-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}
.card-content {
  flex: 1;
  min-width: 0;
}
.card-content strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}
.card-content span {
  font-size: 12px;
  color: var(--color-text-light);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--color-border-dark);
  flex-shrink: 0;
  transition: all var(--transition);
}

/* Hover */
.sector-card:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  box-shadow: var(--shadow-sm);
}
/* Selected */
.sector-card:has(input:checked) {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  box-shadow: 0 0 0 3px rgba(0, 101, 189, 0.12);
}
.sector-card:has(input:checked) .card-check {
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: inset 0 0 0 3px white;
}

/* ─── Pills (radio boutons en ligne) ─── */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.pill {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.pill span {
  display: inline-block;
  padding: 8px 18px;
  border: 1.5px solid var(--color-border-dark);
  border-radius: 40px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-mid);
  background: var(--color-surface);
  transition: all var(--transition);
  cursor: pointer;
}
.pill:hover span {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-light);
}
.pill:has(input:checked) span {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-light);
  font-weight: 600;
}

/* ─── Checkboxes ─── */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.checkbox-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 18px;
  border: 1.5px solid var(--color-border-dark);
  border-radius: 40px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-mid);
  background: var(--color-surface);
  transition: all var(--transition);
  user-select: none;
}
.checkbox-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.checkbox-item::before {
  content: '';
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--color-border-dark);
  border-radius: 4px;
  background: var(--color-surface);
  flex-shrink: 0;
  transition: all var(--transition);
  display: inline-block;
}
.checkbox-item:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-light);
}
.checkbox-item:hover::before {
  border-color: var(--color-accent);
}
.checkbox-item:has(input:checked) {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-light);
  font-weight: 600;
}
.checkbox-item:has(input:checked)::before {
  background: var(--color-accent);
  border-color: var(--color-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M2 6l3 3 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

/* ─── Inputs texte / nombre ─── */
.input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.text-input {
  border: 1.5px solid var(--color-border-dark);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-surface);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.text-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0, 101, 189, 0.12);
}
.text-input.short { width: 100px; }
.input-suffix {
  font-size: 14px;
  color: var(--color-text-light);
}

/* ─── Info box (message contextuel) ─── */
.info-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--color-info-bg);
  border: 1px solid var(--color-info-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--color-text-mid);
  line-height: 1.5;
}
.info-icon { flex-shrink: 0; font-size: 16px; }

/* ─── Blocs conditionnels ─── */
.conditional-block {
  margin-top: 16px;
  padding: 16px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  animation: fadeSlideIn 200ms ease;
}

/* ─── Erreurs ─── */
.field-error {
  font-size: 13px;
  color: var(--color-error);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.field-error::before { content: "⚠ "; }

/* ─── Navigation ─── */
.form-nav {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 40px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 2px 8px rgba(0, 101, 189, 0.25);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 101, 189, 0.3);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-arrow {
  font-size: 18px;
  transition: transform var(--transition);
}
.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

/* ─── Utilitaires ─── */
.hidden { display: none !important; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Transitions entre étapes ─── */
.step-page { animation: none; }
.step-page.step-entering {
  animation: stepFadeIn 320ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Scope badges ─── */
.scope-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}
.scope-badge.s1 { background: #dbeeff; color: #003f8a; }
.scope-badge.s2 { background: #edf5fc; color: #0065BD; border: 1px solid rgba(0,101,189,0.2); }
.scope-badge.s3 { background: rgba(155,90,0,0.10); color: #7A4700; border: 1px solid rgba(155,90,0,0.22); }
.section-label .scope-badge.s1 { background: rgba(0,40,100,0.12); color: #003f8a; border: none; }
.section-label .scope-badge.s2 { background: rgba(0,40,100,0.12); color: #003f8a; border: none; }
.section-label .scope-badge.s3 { background: rgba(155,90,0,0.18); color: #7A4700; border: none; }

/* ─── Niveau selector (3 tiers) ─── */
.niveau-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0 8px;
}
.niveau-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--color-surface);
  transition: all var(--transition);
  position: relative;
}
.niveau-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.niveau-option:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}
.niveau-option:has(input:checked) {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  box-shadow: 0 0 0 2px rgba(0,101,189,0.1);
}
.niveau-radio {
  width: 18px; height: 18px;
  border: 2px solid var(--color-border-dark);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all var(--transition);
}
.niveau-option:has(input:checked) .niveau-radio {
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: inset 0 0 0 3px white;
}
.niveau-label strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 2px;
}
.niveau-label span { font-size: 12px; color: var(--color-text-light); }

/* ─── Niveau input blocks ─── */
.niveau-input-block {
  margin-top: 12px;
  padding: 16px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  animation: fadeSlideIn 200ms ease;
}

/* ─── Live estimate display ─── */
.estimate-display {
  margin-top: 10px;
  font-size: 14px;
  color: var(--color-text-mid);
  padding: 8px 12px;
  background: var(--color-accent-light);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-accent);
}

/* ─── m³ conversion note ─── */
.conversion-note {
  font-size: 13px;
  color: var(--color-text-light);
  margin-top: 8px;
  display: block;
}

/* ─── Fuel input rows ─── */
.fuel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.fuel-row:last-child { border-bottom: none; }
.fuel-label {
  width: 240px;
  flex-shrink: 0;
  font-size: 14px;
  color: var(--color-text-mid);
  font-weight: 500;
}
.fuel-row .input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 180px;
  flex-shrink: 0;
  margin-top: 0;
}
.fuel-row .text-input {
  width: 90px;
  text-align: right;
}
.fuel-row .input-suffix {
  font-size: 13px;
  color: var(--color-text-light);
  white-space: nowrap;
}
.fuel-fe {
  width: 130px;
  font-size: 11px;
  color: var(--color-text-light);
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
}

/* ─── Ligne "Autre gaz" — 4 éléments, layout sur mesure ─── */
.fuel-row--autre {
  flex-wrap: nowrap;
  gap: 10px;
}
.fuel-row--autre .fuel-label {
  width: auto;
  white-space: nowrap;
}
.fuel-row--autre .input-wrapper { width: auto; flex: 0 0 auto; }
.fuel-row--autre #autre-gaz-type { width: 120px; }
.fuel-row--autre #autre-gaz-kg  { width: 80px; }
.fuel-row--autre #autre-gaz-fe  { width: 70px; }

/* ─── Bandeau sous-total — redesign dashboard ─── */
.subtotal-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 200;
  background: linear-gradient(135deg, #001f45 0%, #003f8a 60%, #0065BD 100%);
  color: white;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  box-shadow: 0 -4px 24px rgba(0, 65, 189, 0.25);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.subtotal-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 24px;
}
.subtotal-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.subtotal-label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.subtotal-center {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.subtotal-value {
  font-size: 26px;
  font-weight: 700;
  font-family: var(--font-display);
  color: white;
  transition: transform 200ms ease, opacity 200ms ease;
}
.subtotal-value.updating {
  transform: scale(1.08);
  opacity: 0.7;
}
.subtotal-unit {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
}
.subtotal-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 0;
}
.subtotal-scope-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: right;
}
.subtotal-scope-hint {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* ─── Two-button navigation (étape 2+) ─── */
.form-nav-two {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 72px;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--color-text-mid);
  border: 1.5px solid var(--color-border-dark);
  border-radius: 40px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-light);
}

/* ─── Source chauffage header ─── */
.source-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.source-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

/* ─── Avion rows (étape 3) ─── */
.avion-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}
.avion-row:last-child { border-bottom: none; }
.avion-segment-label {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 10px;
  width: 100%;
}
.avion-segment-label strong {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.avion-segment-label > span:not(.fuel-fe) {
  font-size: 12px;
  color: var(--color-text-light);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avion-segment-label .fuel-fe {
  font-size: 11px;
  color: var(--color-text-light);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  text-align: right;
}
.avion-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.avion-x {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-mid);
}

/* ─── Domicile-travail mode rows (étape 3) ─── */
.dt-mode-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.dt-mode-row:last-of-type { border-bottom: none; }
.dt-mode-label {
  flex: 1;
  font-size: 14px;
  color: var(--color-text-mid);
  font-weight: 500;
  min-width: 0;
}
.dt-mode-row .input-wrapper {
  width: 100px;
  flex-shrink: 0;
  margin-top: 0;
  justify-content: flex-end;
}
.dt-mode-row .text-input {
  width: 80px;
  text-align: right;
}

/* ─── % total display (domicile-travail) ─── */
.pct-total-display {
  margin-top: 12px;
  font-size: 14px;
  color: var(--color-text-mid);
  padding: 10px 14px;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}
.pct-total-display strong { font-weight: 700; color: var(--color-text); }

/* ─── Responsive ─── */
@media (max-width: 600px) {
  .step-container { padding: 32px 16px 64px; }
  .form-section { padding: 20px 16px; }
  .card-grid { grid-template-columns: 1fr; }
  .btn-primary { width: 100%; justify-content: center; }
  .form-nav-two { flex-direction: column-reverse; gap: 12px; }
  .btn-secondary { width: 100%; justify-content: center; }
  .fuel-row { flex-wrap: wrap; }
  .conversion-note { font-size: 12px; }
  .avion-inputs { gap: 6px; }
  .dt-mode-row { flex-wrap: wrap; }
  .dt-mode-label { width: 100%; }
}


/* ═══════════════════════════════════════════════════
   ÉTAPE 6 — RÉSULTATS
   ═══════════════════════════════════════════════════ */

/* ─── KPI cards ─── */
.results-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}
.kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  box-shadow: var(--shadow-sm);
}
.kpi-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 8px;
}
.kpi-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--color-text);
  line-height: 1.1;
  margin-bottom: 6px;
}
.kpi-unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-light);
  font-family: var(--font-body);
}
.kpi-sub {
  font-size: 12px;
  color: var(--color-text-light);
}
.kpi-value--text {
  font-size: 16px;
  font-family: var(--font-body);
  font-weight: 600;
}

/* ─── Onglets ─── */
.results-tabs {
  display: flex;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 24px;
}
.results-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-light);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  font-family: inherit;
}
.results-tab:hover { color: var(--color-text); }
.results-tab.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  font-weight: 600;
}

/* ─── Graphique barres ─── */
.results-chart {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.chart-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.chart-row:last-of-type { margin-bottom: 0; }
.chart-label-name {
  width: 70px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-mid);
  flex-shrink: 0;
}
.chart-track {
  flex: 1;
  height: 12px;
  background: var(--color-border);
  border-radius: 6px;
  overflow: hidden;
}
.chart-bar {
  height: 100%;
  border-radius: 6px;
  min-width: 2px;
  transition: width 600ms ease;
}
.chart-label-val {
  width: 90px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  text-align: right;
  flex-shrink: 0;
}
.chart-legend {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-light);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── Accordion scopes ─── */
.results-scopes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.scope-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.scope-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  transition: background var(--transition);
  user-select: none;
}
.scope-header:hover { background: var(--color-bg); }
.scope-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.scope-header-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}
.scope-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.scope-header-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  font-family: var(--font-display);
}
.scope-chevron {
  font-size: 16px;
  color: var(--color-text-light);
  transition: transform var(--transition);
}
.scope-chevron.open { transform: rotate(90deg); }

/* Badge couleurs spécifiques dans le contexte résultats */
.scope-block .scope-badge.s1 { background: #EEEDFE; color: #3C3489; border: none; }
.scope-block .scope-badge.s2 { background: #E1F5EE; color: #085041; border: none; }
.scope-block .scope-badge.s3 { background: #FAEEDA; color: #633806; border: none; }

/* ─── Détail dépliable ─── */
.scope-detail {
  border-top: 1px solid var(--color-border);
  padding: 8px 0;
}
.cat-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 10px 20px;
  gap: 12px;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}
.cat-row:last-child { border-bottom: none; }
.cat-row:hover { background: var(--color-bg); }
.cat-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.cat-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-light);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 52px;
  padding-top: 1px;
}
.cat-name {
  font-size: 13px;
  color: var(--color-text-mid);
  line-height: 1.4;
}
.cat-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  flex-shrink: 0;
}
.cat-val--zero {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-light);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── Ligne total GHG ─── */
.scope-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--color-text);
  color: white;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 15px;
}
.scope-total-row span:last-child {
  font-size: 18px;
  font-family: var(--font-display);
}

/* ─── Tableau BEGES ─── */
.beges-table {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.beges-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}
.beges-row:hover { background: var(--color-bg); }
.beges-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-border);
  color: var(--color-text-mid);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.beges-name {
  flex: 1;
  font-size: 14px;
  color: var(--color-text-mid);
  line-height: 1.4;
}
.beges-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  flex-shrink: 0;
}
.beges-val--zero {
  font-weight: 400;
  color: var(--color-text-light);
}
.beges-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--color-bg);
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid var(--color-border);
}
.beges-total-row span:last-child {
  font-size: 16px;
  font-family: var(--font-display);
}

/* ─── Note de bas de section ─── */
.results-note {
  font-size: 12px;
  color: var(--color-text-light);
  line-height: 1.5;
  margin-bottom: 24px;
  font-style: italic;
}
.beges-table .results-note {
  padding: 12px 20px;
  margin: 0;
  font-style: italic;
}

/* ─── Émissions évitées ─── */
.avoided-block {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #EAF7EF;
  border: 1px solid #A3D9B7;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 16px;
  margin-bottom: 20px;
}
.avoided-block > .ti {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #2D6A4F;
}
.avoided-title {
  font-size: 15px;
  font-weight: 600;
  color: #1A4D2E;
  margin-bottom: 4px;
}
.avoided-desc {
  font-size: 13px;
  color: #2D4A39;
  margin-bottom: 8px;
  line-height: 1.5;
}
.avoided-val {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-display);
  color: #1A4D2E;
}

/* ─── Pro teaser ─── */
.pro-teaser {
  background: linear-gradient(135deg, #F4F3FE 0%, #EBE9FE 100%);
  border: 1px solid #C4C0F5;
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}
.pro-teaser-content {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.pro-teaser-content > .ti {
  font-size: 22px;
  color: #534AB7;
  flex-shrink: 0;
  margin-top: 2px;
}
.pro-teaser-title {
  font-size: 15px;
  font-weight: 600;
  color: #2D2880;
  margin-bottom: 4px;
}
.pro-teaser-desc {
  font-size: 13px;
  color: #4A478A;
  line-height: 1.5;
}

/* ─── Boutons résultats ─── */
.results-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 40px;
}

/* ─── Responsive résultats ─── */
@media (max-width: 600px) {
  .results-kpis { grid-template-columns: 1fr; }
  .kpi-value { font-size: 22px; }
  .scope-header { gap: 8px; }
  .scope-header-right { margin-left: auto; }
  .chart-label-name { width: 54px; }
  .chart-label-val { width: 70px; }
  .results-actions { flex-direction: column; }
  .results-actions .btn-primary,
  .results-actions .btn-secondary { width: 100%; justify-content: center; }
}
