/* ==========================================================================
   SIMSPRAY • SYSTÈME DE DESIGN & INTERFACE EXÉCUTIVE
   Charte : Rouge SimSpray (#EB0708), Noir Carbone (#0F0F11), Blanc (#FFFFFF)
   Typographies : Montserrat (Titres) & DM Sans (Textes)
   ========================================================================== */

:root {
  --color-brand: #EB0708;
  --color-brand-hover: #D10506;
  --color-brand-subtle: #FFF1F1;
  --color-brand-border: #FDC7C8;

  --color-dark: #0F0F11;
  --color-dark-surface: #18181B;
  --color-white: #FFFFFF;

  --color-bg: #F8F8FA;
  --color-surface: #FFFFFF;

  --color-text-primary: #0F0F11;
  --color-text-secondary: #52525B;
  --color-text-muted: #71717A;
  --color-text-light: #A1A1AA;

  --color-border: #E4E4E7;
  --color-border-dark: #D4D4D8;

  --color-success: #059669;
  --color-success-bg: #ECFDF5;
  --color-success-border: #A7F3D0;

  --color-amber: #D97706;

  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, monospace;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(15, 15, 17, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 15, 17, 0.06);
  --shadow-lg: 0 12px 28px rgba(15, 15, 17, 0.09);

  --transition: 160ms cubic-bezier(0.2, 0, 0, 1);
}

/* Reset soigné */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-text-primary);
  line-height: 1.2;
}

/* ==========================================================================
   BARRE SUPÉRIEURE (NAVBAR)
   ========================================================================== */
.navbar {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-logo {
  height: 32px;
  width: auto;
  display: block;
}

.navbar-tag {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-left: 1px solid var(--color-border);
  padding-left: 1.25rem;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-text-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-xs);
  transition: color var(--transition);
}
.nav-text-btn:hover {
  color: var(--color-brand);
}

.nav-cta-btn {
  background-color: var(--color-dark);
  color: var(--color-white);
  border: none;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background-color var(--transition);
}
.nav-cta-btn:hover {
  background-color: #27272a;
}

/* Barre de progression discrète */
.nav-progress-track {
  width: 100%;
  height: 3px;
  background-color: #f4f4f5;
  position: relative;
}

.nav-progress-bar {
  height: 100%;
  background-color: var(--color-brand);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bannière données d'exemple */
.notification-bar {
  background-color: #fefce8;
  border-bottom: 1px solid #fef08a;
  color: #854d0e;
  font-size: 0.825rem;
  padding: 0.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: inherit;
  line-height: 1;
}

/* ==========================================================================
   SCÈNE CENTRALE : QUESTIONS PAS À PAS
   ========================================================================== */
.stage-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 1.5rem;
}

.question-screen {
  display: none;
  width: 100%;
  max-width: 680px;
  animation: slideFadeIn 0.22s ease-out;
}

.question-screen.active {
  display: block;
}

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

.question-wrapper {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 3rem 3rem 2.5rem;
  box-shadow: var(--shadow-sm);
}

.step-indicator {
  font-family: var(--font-heading);
  font-size: 0.775rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 0.85rem;
}

.question-headline {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  margin-bottom: 0.6rem;
}

.question-lead {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 2rem;
}

/* Champ géant de saisie (Hero Input) */
.input-hero-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.6rem 1.25rem;
  background-color: var(--color-white);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-hero-group:focus-within {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 4px var(--color-brand-subtle);
}

.input-hero {
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  width: 180px;
  outline: none;
}

.input-hero-unit {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

/* Repères fréquents (Chips) */
.chips-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.chips-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-right: 0.25rem;
}

.chip-btn {
  background-color: #F4F4F5;
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 0.825rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition);
}
.chip-btn:hover {
  background-color: var(--color-dark);
  color: var(--color-white);
  border-color: var(--color-dark);
}

/* Callout contextuel */
.context-callout {
  margin-top: 1.5rem;
  background-color: #F4F4F5;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.context-callout strong {
  color: var(--color-text-primary);
  font-size: 0.95rem;
}

/* Accordéon replié */
.optional-accordion {
  margin-top: 1.5rem;
}

.accordion-trigger {
  background: none;
  border: none;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0;
}
.accordion-trigger:hover {
  color: var(--color-brand);
}

.accordion-target {
  margin-top: 0.75rem;
}

.input-subtle {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
}
.input-subtle:focus {
  border-color: var(--color-brand);
}

/* ==========================================================================
   QUESTION 3 : DÉCOMPOSITION DU COÛT
   ========================================================================== */
.detailed-breakdown-card {
  margin-top: 2rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: #FAFAFB;
  overflow: hidden;
}

.breakdown-header {
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.breakdown-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.breakdown-subtitle {
  display: block;
  font-size: 0.775rem;
  color: var(--color-text-muted);
}

.btn-outline-small {
  background-color: var(--color-white);
  border: 1px solid var(--color-border-dark);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}
.btn-outline-small:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.breakdown-body {
  padding: 1.25rem;
  border-top: 1px solid var(--color-border);
  background-color: var(--color-white);
}

.mini-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.mini-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.btn-text-add {
  background: none;
  border: none;
  color: var(--color-brand);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.paints-table-container {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.paint-row-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 24px;
  gap: 0.4rem;
  align-items: center;
}

.row-clean-input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  outline: none;
}
.row-clean-input:focus {
  border-color: var(--color-brand);
}

.btn-row-del {
  background: none;
  border: none;
  color: var(--color-text-light);
  font-size: 14px;
  cursor: pointer;
}
.btn-row-del:hover {
  color: var(--color-brand);
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 1rem;
}

.mini-item label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  margin-bottom: 0.25rem;
}

.mini-input-wrap {
  display: flex;
  align-items: center;
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  padding: 0.35rem 0.6rem;
}
.mini-input-wrap input {
  width: 100%;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
}
.mini-input-wrap span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.mini-help {
  font-size: 0.7rem;
  color: var(--color-text-light);
  display: block;
  margin-top: 0.2rem;
}

.breakdown-footer {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.breakdown-total span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.breakdown-total strong {
  font-size: 1.15rem;
  color: var(--color-brand);
  margin-left: 0.35rem;
}

.btn-primary-small {
  background-color: var(--color-dark);
  color: var(--color-white);
  border: none;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
}
.btn-primary-small:hover {
  background-color: var(--color-brand);
}

/* ==========================================================================
   QUESTION 4 : CURSEUR SIMSPRAY & PARAMÈTRES
   ========================================================================== */
.slider-decision-box {
  background-color: #FAFAFB;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.slider-decision-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.slider-decision-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-text-primary);
}

.slider-decision-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--color-brand-subtle);
  color: var(--color-brand);
  border: 1px solid var(--color-brand-border);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
}
.slider-decision-badge strong {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.slider-range-wrap {
  width: 100%;
}

.range-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background-color: #E4E4E7;
  outline: none;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--color-brand);
  border: 2px solid var(--color-white);
  box-shadow: 0 1px 4px rgba(235, 7, 8, 0.4);
  cursor: pointer;
  transition: transform var(--transition);
}
.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.slider-subtext-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.775rem;
  color: var(--color-text-muted);
  margin-top: 0.6rem;
}

.slider-current-callout {
  color: var(--color-text-primary);
  font-size: 0.825rem;
  font-weight: 600;
}
.slider-current-callout strong {
  color: var(--color-brand);
}

.slider-impact-summary {
  margin-top: 1.15rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}
.slider-impact-summary strong {
  color: var(--color-text-primary);
}

.params-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.param-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.param-card-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.param-card-help {
  display: block;
  font-size: 0.725rem;
  color: var(--color-text-muted);
  line-height: 1.35;
  margin-top: 0.2rem;
  margin-bottom: 0.85rem;
}

.param-card-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xs);
  padding: 0.45rem 0.75rem;
  background-color: var(--color-white);
}
.param-card-input-wrap:focus-within {
  border-color: var(--color-brand);
}

.param-card-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  font-weight: 700;
  outline: none;
}

.param-card-unit {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.param-card-disclaimer {
  font-size: 0.725rem;
  color: var(--color-text-secondary);
  line-height: 1.35;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--color-border);
}

.param-card-disclaimer strong {
  color: var(--color-text-primary);
}

.reminder-sub-note {
  display: block;
  font-size: 0.725rem;
  color: #A1A1AA;
  font-weight: 400;
  margin-top: 0.2rem;
}

/* ==========================================================================
   BOUTONS DE NAVIGATION
   ========================================================================== */
.screen-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.btn-action-primary {
  background-color: var(--color-brand);
  color: var(--color-white);
  border: none;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(235, 7, 8, 0.25);
  transition: all var(--transition);
}
.btn-action-primary:hover {
  background-color: var(--color-brand-hover);
  transform: translateY(-1px);
}

.btn-action-ghost {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  transition: color var(--transition);
}
.btn-action-ghost:hover {
  color: var(--color-text-primary);
}

.btn-arrow {
  font-size: 1.1rem;
}

/* ==========================================================================
   ÉCRAN FINAL : RÉSULTATS & PREUVE DE NÉGOCIATION
   ========================================================================== */
.results-screen {
  width: 100%;
  max-width: 960px;
  animation: slideFadeIn 0.3s ease-out;
}

.results-container {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.results-category {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--color-brand);
  display: block;
  margin-bottom: 0.35rem;
}

.results-main-title {
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.results-sub {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-top: 0.25rem;
}

.results-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-ghost-icon {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-ghost-icon:hover {
  border-color: var(--color-dark);
  color: var(--color-text-primary);
}

.btn-print-cta {
  background-color: var(--color-dark);
  color: var(--color-white);
  border: none;
  font-family: var(--font-heading);
  font-size: 0.825rem;
  font-weight: 700;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: background-color var(--transition);
}
.btn-print-cta:hover {
  background-color: #27272a;
}

/* CARTE HERO RENTABILITÉ */
.hero-impact-card {
  background-color: var(--color-dark);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.5rem;
  box-shadow: var(--shadow-lg);
}

.hero-impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-metric-label {
  display: block;
  font-size: 0.825rem;
  color: #A1A1AA;
  margin-bottom: 0.5rem;
}

.hero-metric-value {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-metric-sub {
  display: block;
  font-size: 0.775rem;
  color: #A1A1AA;
  margin-top: 0.5rem;
}

.hero-investment-reminder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.reminder-left span {
  color: #A1A1AA;
}
.reminder-left strong {
  color: var(--color-white);
  margin-left: 0.4rem;
  font-size: 1rem;
}

.reminder-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #D4D4D8;
  font-size: 0.8rem;
}

.dot-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-status.green {
  background-color: #10B981;
  box-shadow: 0 0 8px #10B981;
}

/* BLOCS DÉCISIONNELS */
.decision-block {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
}

.block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.block-title {
  font-size: 1.1rem;
  font-weight: 800;
}

.block-tag {
  font-size: 0.725rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background-color: #F4F4F5;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

/* Cartes Avant / Après */
.before-after-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.spend-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.spend-before {
  background-color: #FAFAFB;
}

.spend-after {
  background-color: #FFFDFD;
  border-color: var(--color-brand-border);
}

.spend-card-category {
  font-family: var(--font-heading);
  font-size: 0.725rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}
.spend-card-category.red-tag {
  color: var(--color-brand);
}

.spend-card-amount {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.15;
}

.spend-card-unit {
  display: block;
  font-size: 0.775rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.spend-card-formula {
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

/* Barre de comparaison budgétaire */
.budget-bar-section {
  margin-top: 1.5rem;
  background-color: #FAFAFB;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.budget-bar-legend {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.indicator-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.3rem;
}
.indicator-dot.gray { background-color: #A1A1AA; }
.indicator-dot.amber { background-color: #F59E0B; }
.indicator-dot.green { background-color: #10B981; }

.budget-bars-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.budget-bar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bar-name {
  width: 80px;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.bar-shell {
  flex: 1;
  height: 24px;
  background-color: #E4E4E7;
  border-radius: var(--radius-xs);
  overflow: hidden;
  display: flex;
}

.bar-fill-full {
  width: 100%;
  height: 100%;
  background-color: #71717A;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.75rem;
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.bar-shell.segmented .bar-part {
  height: 100%;
  transition: width 0.3s ease;
}
.part-real { background-color: #A1A1AA; }
.part-fees { background-color: #F59E0B; }
.part-eco { background-color: #10B981; }

/* Tableau d'amortissement 5 ans */
.table-frame {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.report-table th {
  background-color: #FAFAFB;
  font-family: var(--font-heading);
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.report-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #F4F4F5;
  font-family: var(--font-mono);
}

.row-breakeven-reached {
  background-color: #ECFDF5;
  font-weight: 700;
}

.milestones-row {
  display: flex;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.milestone-box {
  flex: 1;
  background-color: #FAFAFB;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.milestone-box.highlight {
  background-color: #ECFDF5;
  border-color: var(--color-success-border);
}

.milestone-label {
  font-size: 0.825rem;
  color: var(--color-text-secondary);
}

.methodology-note {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 3px solid #71717A;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  font-size: 0.775rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Utilitaires */
.font-mono { font-family: var(--font-mono); }
.text-right { text-align: right; }
.text-green { color: #10B981; }
.text-red { color: var(--color-brand); }
.text-danger { color: #DC2626; }
.hidden { display: none !important; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .question-wrapper {
    padding: 2rem 1.5rem;
  }
  .question-headline {
    font-size: 1.35rem;
  }
  .input-hero {
    font-size: 1.75rem;
    width: 140px;
  }
  .hero-impact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .before-after-cards {
    grid-template-columns: 1fr;
  }
  .params-dual-grid {
    grid-template-columns: 1fr;
  }
  .mini-grid {
    grid-template-columns: 1fr;
  }
  .milestones-row {
    flex-direction: column;
  }
}

/* ==========================================================================
   STYLES D'IMPRESSION (FICHE DÉCIDEUR PDF)
   ========================================================================== */
@media print {
  body {
    background-color: #FFFFFF !important;
    color: #000000 !important;
    font-size: 10pt;
  }

  .navbar,
  .notification-bar,
  .question-screen,
  .results-header-right,
  .nav-progress-track {
    display: none !important;
  }

  .results-screen {
    display: block !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .mimbus-chat-widget {
    display: none !important;
  }

  .hero-impact-card {
    background-color: #0F0F11 !important;
    color: #FFFFFF !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    page-break-inside: avoid;
    margin-bottom: 1.5rem;
  }

  .decision-block {
    box-shadow: none !important;
    border: 1px solid #D4D4D8 !important;
    page-break-inside: avoid;
    margin-bottom: 1.25rem;
  }
}

/* ==========================================================================
   WIDGET CHAT LEAD CAPTURE MIMBUS (N8N WEBHOOK)
   ========================================================================== */
.mimbus-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.chat-floating-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px 0 18px;
  border-radius: 26px;
  background: var(--color-dark);
  color: var(--color-white);
  border: none;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  cursor: pointer;
  position: relative;
  font-family: var(--font-heading, inherit);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.chat-floating-btn svg {
  flex-shrink: 0;
  opacity: 0.95;
}

.chat-floating-btn .chat-btn-label {
  line-height: 1;
}

.chat-floating-btn:hover {
  background: var(--color-brand);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(235, 7, 8, 0.32);
}

.chat-floating-btn:active {
  transform: translateY(0);
}

.chat-floating-btn:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .chat-floating-btn .chat-btn-label { display: none; }
  .chat-floating-btn { padding: 0; width: 52px; justify-content: center; border-radius: 50%; }
}

.chat-unread-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--color-brand);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-white);
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.chat-window {
  width: 364px;
  max-width: calc(100vw - 32px);
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: 1rem;
  animation: slideUpChat 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

@keyframes slideUpChat {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
  background-color: var(--color-dark);
  color: var(--color-white);
  padding: 0.95rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Le bouton flottant s'efface quand la fenêtre de chat est ouverte */
.mimbus-chat-widget.chat-is-open .chat-floating-btn {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.92);
  pointer-events: none;
}

.chat-floating-btn {
  transition: opacity 0.2s ease, visibility 0.2s ease, transform var(--transition),
    box-shadow var(--transition), background-color var(--transition);
}

.mimbus-chat-widget.chat-is-open .chat-window {
  margin-bottom: 0;
}

.chat-advisor-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-avatar-wrap {
  position: relative;
}

.chat-avatar-text {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--color-brand);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #10B981;
  border: 1.5px solid var(--color-dark);
}

.chat-advisor-name {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.2;
}

.chat-advisor-sub {
  display: block;
  font-size: 0.7rem;
  color: #A1A1AA;
}

.chat-close-btn {
  background: none;
  border: none;
  color: #A1A1AA;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem;
}
.chat-close-btn:hover {
  color: var(--color-white);
}

.chat-messages {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 240px;
  overflow-y: auto;
  background-color: #FAFAFB;
}

.chat-bubble {
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  font-size: 0.825rem;
  line-height: 1.45;
}

.chat-advisor-msg {
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  border-bottom-left-radius: 4px;
}

.chat-user-msg {
  background-color: var(--color-dark);
  color: var(--color-white);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.chat-time {
  display: block;
  font-size: 0.675rem;
  color: var(--color-text-light);
  margin-top: 0.35rem;
}

.chat-form {
  padding: 0.85rem 1rem 1rem;
  background-color: var(--color-white);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-form-group {
  width: 100%;
}

.chat-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.825rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-xs);
  outline: none;
  transition: border-color var(--transition);
}

.chat-input:focus {
  border-color: var(--color-brand);
}

.chat-submit-btn {
  background-color: var(--color-brand);
  color: var(--color-white);
  border: none;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background-color var(--transition);
  margin-top: 0.25rem;
}

.chat-submit-btn:hover {
  background-color: var(--color-brand-hover);
}

.chat-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.mt-1 { margin-top: 0.35rem; }

/* Message d'erreur / repli email dans le chat */
.chat-error-msg {
  border-left: 3px solid var(--color-brand);
  background-color: #FFF7F7;
}

.chat-error-msg a {
  color: var(--color-brand);
  font-weight: 600;
}

.chat-mailto-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.6rem;
  padding: 0.55rem 0.9rem;
  background-color: var(--color-dark);
  color: var(--color-white) !important;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: background-color var(--transition);
}

.chat-mailto-btn:hover {
  background-color: var(--color-brand);
}

/* ===== SELECTEUR DE LANGUE ===== */
.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  overflow: hidden;
  margin-right: 0.35rem;
}

.lang-opt {
  background: none;
  border: none;
  padding: 0.3rem 0.6rem;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text-light);
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}

.lang-opt:hover { color: var(--color-text-primary); }

.lang-opt.is-active {
  background-color: var(--color-dark);
  color: var(--color-white);
}

@media print { .lang-switch { display: none !important; } }

@media (max-width: 640px) {
  .lang-opt { padding: 0.28rem 0.45rem; font-size: 0.65rem; }
}
