/* ─────────────────────────────────────────────────────────────────────────
   style.css — Calculatrice ACV Grand Public
   ───────────────────────────────────────────────────────────────────────── */

:root {
  /* ── Palette de base ── */
  --navy: #1A2F4B;
  --navy-light: #2C5282;
  --white: #FFFFFF;
  --gray-50: #F7FAFC;
  --gray-100: #EDF2F7;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E0;
  --gray-400: #A0AEC0;
  --gray-600: #718096;
  --gray-800: #2D3748;
  --text: #1A202C;
  --text-muted: #4A5568;

  /* ── Catégories d'impact ── */
  --climat: #C53030;
  --climat-light: #FFF5F5;
  --climat-mid: #FC8181;
  --eco: #276749;
  --eco-light: #F0FFF4;
  --eco-mid: #68D391;
  --sante: #744210;
  --sante-light: #FFFFF0;
  --sante-mid: #F6E05E;
  --ressources: #44337A;
  --ressources-light: #FAF5FF;
  --ressources-mid: #B794F4;

  /* ── Système de design unifié ── */
  --color-primary: var(--navy);
  --color-accent:  var(--eco);
  --color-bg:      var(--gray-50);
  --color-surface: var(--white);
  --color-text:    var(--text);
  --color-text-muted: var(--text-muted);
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* ── Boîtes d'information (bleu) ── */
  --color-info-bg:     #EBF8FF;
  --color-info-border: #4299E1;
  --color-info-text:   #2B6CB0;

  /* ── Héros unifié ── */
  --hero-gradient: linear-gradient(135deg, #0F1E2B 0%, #1A3A1A 50%, #2D5016 100%);

  /* ── Formes & ombres ── */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--text);
  line-height: 1.6;
}

/* ── Nav ── */
nav {
  background: var(--navy);
  color: white;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 2rem;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}

.nav-brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-links { display: flex; gap: 0.5rem; flex: 1; }

.nav-auth { margin-left: auto; flex-shrink: 0; }
.nav-auth-btn {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-auth-btn:hover { background: rgba(255,255,255,0.22); }
.nav-auth-btn.connected { background: var(--eco); border-color: var(--eco); }

.nav-link {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.15);
  color: white;
}

.nav-badge {
  background: var(--color-info-border);
  color: white;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 20px;
  margin-left: 0.3rem;
}

/* ── Nav Outils dropdown ── */
.nav-tools-dropdown { position: relative; }
.nav-tools-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--navy);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  min-width: 230px;
  padding: 0.4rem 0;
  z-index: 500;
}
.nav-tools-dropdown.open .nav-tools-menu { display: block; }
.nav-tools-item {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 0;
  padding: 0.55rem 1.1rem;
  white-space: nowrap;
}
.nav-tools-btn::after { content: ''; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #2C5282 60%, #2B6CB0 100%);
  color: white;
  padding: 3rem 2rem;
  text-align: center;
}
.hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.75rem; }
.hero p  { font-size: 1rem; opacity: 0.85; max-width: 640px; margin: 0 auto 1.5rem; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 1.8rem; font-weight: 800; }
.hero-stat .lbl { font-size: 0.75rem; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Layout ── */
.main { max-width: 1400px; margin: 0 auto; padding: 2rem; }
.section { display: none; }
.section.active { display: block; }

/* ── Cards grid ── */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  align-items: center;
}
.filter-bar label { font-size: 0.85rem; color: var(--text-muted); margin-right: 0.3rem; }
.filter-btn {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0.3rem 0.8rem;
  transition: var(--transition);
  color: var(--text-muted);
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--navy-light);
  background: var(--navy-light);
  color: white;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
  border: 2px solid transparent;
  position: relative;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.card.selected {
  border-color: var(--navy-light);
}
.card-emoji {
  font-size: 2.5rem;
  text-align: center;
  padding: 1.2rem 1rem 0.5rem;
}
.card-body { padding: 0.5rem 1rem 1rem; }
.card-name { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.2rem; }
.card-uf   { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.6rem; }

.card-gwp {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}
.gwp-val { font-weight: 700; color: var(--climat); font-size: 1rem; }
.gwp-unit { color: var(--text-muted); font-size: 0.72rem; }

.card-pef {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--navy-light);
  margin-top: 0.3rem;
  font-weight: 600;
}

.card-cat-tag {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: var(--gray-100);
  color: var(--text-muted);
}

.card-select-btn {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--gray-100);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.card.selected .card-select-btn {
  background: var(--navy-light);
  color: white;
}

.completude-warning {
  font-size: 0.65rem;
  color: var(--sante);
  margin-top: 0.3rem;
}

/* ── Detail panel ── */
.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 60px 0 0 0;
}
.detail-overlay.open { display: flex; }

.detail-panel {
  background: white;
  width: min(780px, 95vw);
  height: calc(100vh - 60px);
  overflow-y: auto;
  box-shadow: -8px 0 32px rgba(0,0,0,0.15);
}

.detail-header {
  background: var(--navy);
  color: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}
.detail-title { font-size: 1.3rem; font-weight: 700; }
.detail-uf { font-size: 0.82rem; opacity: 0.75; margin-top: 0.2rem; }
.detail-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  flex-shrink: 0;
}
.detail-close:hover { background: rgba(255,255,255,0.3); }

.detail-body { padding: 1.5rem; }

.detail-section { margin-bottom: 1.5rem; }
.detail-section h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.detail-section h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.pef-score-big {
  background: var(--color-info-bg);
  border: 1px solid var(--color-info-border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}
.pef-score-big .score { font-size: 2.5rem; font-weight: 800; color: var(--navy); }
.pef-score-big .unit { font-size: 0.9rem; color: var(--color-info-text); font-weight: 600; }
.pef-score-big .desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }

/* Indicators table */
.indicator-group { margin-bottom: 1rem; }
.indicator-group-title {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.4rem;
}

.indicator-row {
  display: grid;
  grid-template-columns: 1fr 130px 80px;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  align-items: center;
  font-size: 0.82rem;
}
.indicator-row:nth-child(even) { background: var(--gray-50); }
.ind-name { color: var(--text-muted); }
.ind-val  { font-weight: 700; text-align: right; font-size: 0.85rem; }
.ind-val.nd { color: var(--gray-400); font-style: italic; font-weight: 400; }
.ind-unit { font-size: 0.68rem; color: var(--gray-400); }
.ind-bar-wrap { grid-column: 1 / -1; height: 3px; background: var(--gray-200); border-radius: 2px; margin: 0.1rem 0; display: none; }

/* Chart container */
.chart-wrap {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  position: relative;
  height: 300px;
}

/* Composition table */
.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.comp-table th {
  background: var(--navy);
  color: white;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
}
.comp-table td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--gray-100);
}
.comp-table tr:nth-child(even) td { background: var(--gray-50); }
.comp-gwp { font-weight: 600; color: var(--climat); }

/* Hypothesis box */
.hypothesis-box {
  background: var(--gray-50);
  border-left: 3px solid var(--navy-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.sources-box {
  background: var(--color-info-bg);
  border-left: 3px solid var(--color-info-border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
  color: var(--color-info-text);
  line-height: 1.7;
  white-space: pre-line;
}

/* ── Comparison section ── */
.compare-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.compare-toolbar h2 { font-size: 1.2rem; font-weight: 700; }

.compare-selected-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.compare-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--navy);
  color: white;
  border-radius: 20px;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
}
.compare-chip button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0;
  line-height: 1;
}
.compare-chip button:hover { color: white; }

.btn {
  background: var(--navy-light);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  transition: var(--transition);
}
.btn:hover { background: var(--navy); }
.btn-outline {
  background: none;
  border: 1.5px solid var(--navy-light);
  color: var(--navy-light);
}
.btn-outline:hover { background: var(--navy-light); color: white; }

.compare-table-wrap { overflow-x: auto; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 600px;
}
.compare-table th {
  background: var(--navy);
  color: white;
  padding: 0.6rem 1rem;
  font-weight: 600;
  text-align: center;
}
.compare-table th:first-child { text-align: left; min-width: 200px; }
.compare-table td {
  padding: 0.45rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  text-align: center;
}
.compare-table td:first-child { text-align: left; font-weight: 600; color: var(--text-muted); font-size: 0.78rem; }
.compare-table tr.group-header td {
  background: var(--gray-100);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.compare-table tr.highlight-row td { background: var(--color-info-bg); font-weight: 700; }
.compare-table tr.compare-score-total-row td {
  background: var(--color-info-bg);
  font-weight: 800;
  font-size: 0.9rem;
  border-top: 2px solid var(--navy-light);
  border-bottom: 2px solid var(--navy-light);
  color: var(--navy);
}
.compare-table tr.compare-score-total-row td:first-child { color: var(--navy); }
.best { color: var(--eco); font-weight: 700; }
.worst { color: var(--climat); font-weight: 700; }

.compare-table-toggle-btn {
  font-size: 0.88rem;
  padding: 0.5rem 1.2rem;
}

.compare-chart-wrap { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.compare-chart-box {
  flex: 1;
  min-width: 300px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}
.compare-chart-box h4 { font-size: 0.85rem; margin-bottom: 0.75rem; color: var(--text-muted); }
.compare-pef-chart-wrap { position: relative; height: 240px; }

/* ── Indicateur dépliants ── */
.indicator-explain { font-size: 0.75rem; margin-top: 0.25rem; }
.indicator-explain summary {
  cursor: pointer;
  color: var(--navy-light);
  list-style: none;
  user-select: none;
}
.indicator-explain summary::-webkit-details-marker { display: none; }
.indicator-explain p {
  margin-top: 0.3rem;
  padding: 0.4rem 0.6rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  line-height: 1.5;
  font-style: italic;
}

/* ── Methodologie ── */
.methodo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.methodo-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.methodo-card-header {
  padding: 1rem 1.2rem 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.methodo-card-body {
  padding: 0.5rem 1.2rem 1.2rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.methodo-card-body ul { padding-left: 1.2rem; }
.methodo-card-body li { margin-bottom: 0.3rem; }

.formula-box {
  background: var(--navy);
  color: white;
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem;
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
  line-height: 1.8;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.empty-state .big { font-size: 3rem; margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.9rem; }

/* ── Tooltip ── */
[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-800);
  color: white;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  font-size: 0.72rem;
  white-space: nowrap;
  z-index: 500;
  pointer-events: none;
}

/* ── Barres de progression token (cartes catalogue) ── */
.card-bars {
  margin-top: 0.5rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tbr {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: default;
}
.tbr-emoji {
  font-size: 0.78rem;
  width: 22px;
  flex-shrink: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 1px;
}
.tbr-track {
  flex: 1;
  height: 6px;
  background: var(--gray-100);
  border-radius: 4px;
  overflow: hidden;
}
.tbr-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.35s ease;
}
.tbr-val {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.15s;
  white-space: nowrap;
  min-width: 52px;
  text-align: right;
}
.tbr:hover .tbr-val { opacity: 1; }
.tbr-separator {
  height: 1px;
  background: var(--gray-200);
  margin: 3px 0 2px;
}
.tbr-score .tbr-track { height: 8px; }
.tbr-score .tbr-emoji { font-size: 0.88rem; }
.tbr-score .tbr-val   { font-size: 0.72rem; }

/* Score environnemental — chip texte sous les 4 barres */
.card-score-chip {
  margin-top: 4px;
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--navy);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 1px 6px;
  letter-spacing: 0.01em;
  opacity: 0.85;
}

/* Barres catégories dans le panneau de détail (version élargie) */
.detail-cat-bars .card-bars {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
  gap: 7px;
}
.detail-cat-bars .tbr { gap: 8px; }
.detail-cat-bars .tbr-emoji { font-size: 0.92rem; width: 26px; }
.detail-cat-bars .tbr-track { height: 9px; border-radius: 5px; }
.detail-cat-bars .tbr-fill  { border-radius: 5px; }
.detail-cat-bars .tbr-val   { opacity: 1; font-size: 0.75rem; min-width: 36px; }
.detail-cat-bars .card-score-chip { font-size: 0.72rem; padding: 2px 9px; opacity: 1; }

/* Token-card synthèse (Score environnemental) dans le détail */
.token-card-score {
  background: var(--navy);
  border-color: var(--navy-light);
}
.token-card-score .tc-val,
.token-card-score .tc-lbl { color: var(--gray-200); }

/* ── Jetons (tokens) ── */

/* Pill compact (sur les cartes et dans l'empreinte) */
.card-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 0.5rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--gray-200);
}
.token-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 2px 7px;
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: default;
  white-space: nowrap;
  transition: background 0.15s;
}
.token-pill:hover { background: var(--gray-100); color: var(--text); }
.tp-emoji { font-size: 0.85rem; line-height: 1; }
.tp-val   { font-weight: 600; color: var(--text); }

/* Grille de token-cards (panneau de détail) */
.token-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.token-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0.75rem 1.1rem;
  min-width: 84px;
  cursor: default;
  transition: box-shadow 0.15s;
}
.token-card:hover { box-shadow: var(--shadow); }
.tc-emoji { font-size: 1.6rem; line-height: 1; margin-bottom: 0.3rem; }
.tc-val   { font-size: 0.95rem; font-weight: 700; color: var(--text); line-height: 1.2; text-align: center; }
.tc-lbl   { font-size: 0.68rem; color: var(--text-muted); margin-top: 0.25rem; text-align: center; }

/* Badge ECI + note */
.badge-eci {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--color-info-bg);
  color: var(--color-info-text);
  border: 1px solid var(--color-info-border);
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
  cursor: help;
  margin-left: 0.4rem;
}
.eci-note {
  font-size: 0.73rem;
  color: var(--gray-400);
  margin-top: 0.4rem;
  line-height: 1.5;
}

/* Rangée annuelle de jetons (section empreinte) */
.annual-tokens-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.annual-tokens-row .token-pill {
  font-size: 0.80rem;
  padding: 4px 10px;
}
.annual-tokens-row .tp-val { font-size: 0.88rem; }

/* ── Radar chart in comparison ── */
.compare-radar-wrap {
  position: relative;
  height: 280px;
  max-width: 380px;
  margin: 0 auto;
}

/* ── Empreinte annuelle ── */
.empreinte-header {
  margin-bottom: 1.5rem;
}
.empreinte-header h2 {
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.empreinte-intro {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 680px;
}

/* Profile selector */
.profile-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.profile-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 1.2rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  transition: transform 0.15s, box-shadow 0.15s;
  min-width: 160px;
}
.profile-btn small {
  font-weight: 400;
  font-size: 0.72rem;
  opacity: 0.85;
  margin-top: 0.2rem;
}
.profile-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.profile-btn.active { box-shadow: var(--shadow-lg); transform: translateY(-1px); }

/* Gauge section */
.empreinte-gauge-section {
  background: var(--gray-50);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.gauge-wrap {
  height: 90px;
  margin-bottom: 1.2rem;
}
.gauge-legend {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.gauge-stat {
  text-align: center;
}
.gauge-stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}
.gauge-stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.gauge-divider {
  width: 1px;
  height: 40px;
  background: var(--gray-200);
}

/* Breakdown radar */
.empreinte-breakdown-section {
  margin-bottom: 2rem;
}
.empreinte-breakdown-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
}
.breakdown-chart-wrap {
  position: relative;
  height: 320px;
  max-width: 500px;
  margin: 0 auto;
}

/* Per-item list */
.empreinte-items-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
}
.empreinte-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.empreinte-item {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: calc(var(--radius) - 2px);
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.empreinte-item:hover { box-shadow: var(--shadow); }
.ei-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}
.ei-emoji { font-size: 1.1rem; }
.ei-name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
.ei-qty {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.ei-pef {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
}
.ei-pct {
  font-size: 0.78rem;
  color: var(--gray-600);
  min-width: 36px;
  text-align: right;
}
.ei-bar-track {
  height: 5px;
  background: var(--gray-100);
  border-radius: 3px;
  overflow: hidden;
}
.ei-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ── MODE ENTREPRISE ─────────────────────────────────────────────── */
.entreprise-wrapper { max-width: 960px; margin: 0 auto; padding: 1rem 0.5rem; }

.entreprise-hero {
  background: var(--hero-gradient);
  color: #fff; border-radius: var(--radius); padding: 2rem;
  margin-bottom: 1.5rem; text-align: center;
}
.entreprise-hero h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.entreprise-hero p { color: var(--gray-400); font-size: 0.9rem; margin-bottom: 1rem; }
.entreprise-badges { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }
.badge { padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }
.badge.scope1 { background: rgba(197,48,48,0.3);  color: var(--climat-mid); }
.badge.scope2 { background: rgba(128,90,213,0.3); color: var(--ressources-mid); }
.badge.scope3 { background: rgba(44,122,123,0.3); color: var(--eco-mid); }

.entreprise-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }

.scope-card {
  background: var(--color-surface); border-radius: var(--radius); padding: 1.2rem;
  border-top: 4px solid var(--gray-300); box-shadow: var(--shadow);
}
.scope-card.scope1 { border-top-color: var(--climat); }
.scope-card.scope2 { border-top-color: #6B46C1; }
.scope-card.scope3 { border-top-color: var(--eco); }
.scope-card h3 { font-size: 0.88rem; margin-bottom: 1rem; color: var(--gray-800); }

.scope-badge { padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.72rem; font-weight: 700; color: #fff; }
.scope-badge.scope1 { background: var(--climat); }
.scope-badge.scope2 { background: #6B46C1; }
.scope-badge.scope3 { background: var(--eco); }

.fe-input-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.fe-label { flex: 1; min-width: 0; }
.fe-name { display: block; font-size: 0.82rem; font-weight: 600; color: var(--gray-800); }
.fe-unit { font-size: 0.72rem; color: var(--gray-600); }
.fe-input {
  width: 90px; padding: 0.35rem 0.5rem; border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm); font-size: 0.85rem; text-align: right;
  transition: border-color var(--transition);
}
.fe-input:focus { border-color: var(--eco); outline: none; box-shadow: 0 0 0 2px rgba(39,103,73,0.15); }

#btn-calc-entreprise {
  width: 100%; padding: 1rem; background: var(--eco); color: #fff;
  border: none; border-radius: var(--radius); font-size: 1.05rem; font-weight: 700;
  cursor: pointer; transition: background var(--transition); margin-bottom: 1.5rem;
}
#btn-calc-entreprise:hover { background: var(--navy); }

.entreprise-results-inner { background: var(--color-surface); border-radius: var(--radius); padding: 1.5rem; }
.entreprise-results-inner h3 { font-size: 1.1rem; margin-bottom: 1rem; color: var(--navy); }

.result-score-grid { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; margin-bottom: 1.5rem; }
.result-score-total { text-align: center; padding: 1.2rem; background: var(--eco-light); border-radius: var(--radius); border: 2px solid var(--eco); }
.score-val { font-size: 2.5rem; font-weight: 800; color: var(--eco); }
.score-val span { font-size: 1rem; color: var(--text-muted); }
.score-label { font-weight: 600; color: var(--gray-800); }
.score-sub { font-size: 0.78rem; color: var(--gray-600); }

.scope-bar-row { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.5rem; }
.scope-bar-label { font-size: 0.78rem; font-weight: 600; width: 65px; }
.scope-bar-label.scope1 { color: var(--climat); }
.scope-bar-label.scope2 { color: #6B46C1; }
.scope-bar-label.scope3 { color: var(--eco); }
.scope-bar-track { flex: 1; height: 16px; background: var(--gray-100); border-radius: var(--radius-sm); overflow: hidden; }
.scope-bar-fill { height: 100%; border-radius: 8px; transition: width 0.6s ease; }
.scope-bar-fill.scope1 { background: var(--climat); }
.scope-bar-fill.scope2 { background: #6B46C1; }
.scope-bar-fill.scope3 { background: var(--eco); }
.scope-bar-val { font-size: 0.8rem; color: var(--text-muted); min-width: 110px; }

.damage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.damage-card { background: var(--gray-50); padding: 0.8rem 1rem; border-radius: var(--radius-sm); }
.damage-label { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.damage-score { font-size: 1.2rem; font-weight: 700; }

.indicators-table { overflow-x: auto; }
.indicators-table table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.indicators-table th { background: var(--navy); color: #fff; padding: 0.4rem 0.6rem; text-align: right; }
.indicators-table th:first-child { text-align: left; }
.indicators-table td { padding: 0.35rem 0.6rem; border-bottom: 1px solid var(--gray-100); text-align: right; }
.indicators-table td:first-child { text-align: left; }
.indicators-table tr:hover td { background: var(--eco-light); }
.scope1-text { color: var(--climat); }
.scope2-text { color: #6B46C1; }
.scope3-text { color: var(--eco); }

.result-gwp-highlight {
  display: flex; align-items: center; gap: 0.8rem;
  background: var(--climat-light); padding: 0.8rem 1.2rem; border-radius: var(--radius-sm);
  border-left: 4px solid var(--climat); margin-top: 1rem;
}

.entreprise-disclaimer {
  font-size: 0.78rem; color: var(--gray-600);
  background: var(--gray-50); border-radius: var(--radius-sm); padding: 1rem;
  margin-top: 1.5rem; line-height: 1.7;
}

/* ── FOOTER PRO ──────────────────────────────────────────────────── */
#footer-pro a { color: var(--eco-mid); }
#footer-pro a:hover { text-decoration: underline; }

/* ── SOUS-NAVIGATION ─────────────────────────────────────────────── */
.subnav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  gap: 0.25rem;
  padding: 0.4rem 2rem;
  position: sticky;
  top: 60px;
  z-index: 90;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.subnav-link,
.subnav-org-link {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  transition: var(--transition);
}
.subnav-link:hover,
.subnav-org-link:hover { background: var(--gray-100); color: var(--text); }
.subnav-link.active,
.subnav-org-link.active {
  background: var(--eco-light);
  color: var(--eco);
  font-weight: 600;
}

/* ── SECTION CONTACT ─────────────────────────────────────────────── */
.contact-wrapper { max-width: 800px; margin: 0 auto; padding: 1rem 0.5rem 3rem; }

.contact-hero {
  background: var(--hero-gradient);
  color: #fff; border-radius: var(--radius); padding: 2.5rem 2rem;
  margin-bottom: 2rem; text-align: center;
}
.contact-avatar { font-size: 3rem; margin-bottom: 0.5rem; }
.contact-hero h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 0.4rem; }
.contact-subtitle { color: var(--gray-400); font-size: 0.95rem; margin-bottom: 0.3rem; }
.contact-cert { color: var(--eco-mid); font-size: 0.85rem; margin-bottom: 1.2rem; }
.contact-email-link {
  display: inline-block;
  background: rgba(104,211,145,0.15);
  color: var(--eco-mid);
  border: 1px solid var(--eco-mid);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition);
}
.contact-email-link:hover { background: rgba(104,211,145,0.3); }

.contact-section-title {
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 1rem;
  font-weight: 700;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}
.service-card:hover { box-shadow: var(--shadow-lg); }
.service-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.service-card h4 { font-size: 0.95rem; font-weight: 700; color: var(--navy); margin-bottom: 0.4rem; }
.service-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }

.contact-cta-block {
  background: var(--eco-light);
  border: 1px solid var(--eco-mid);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 2rem;
}
.contact-cta-block p { color: var(--eco); font-weight: 600; margin-bottom: 0.8rem; }

/* Méthodologie repliable */
.methodo-details {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.methodo-details summary {
  padding: 1rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
  background: var(--gray-50);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}
.methodo-details summary::-webkit-details-marker { display: none; }
.methodo-details summary::after { content: '▸'; margin-left: auto; transition: transform 0.2s; }
.methodo-details[open] summary::after { transform: rotate(90deg); }
.methodo-details summary:hover { background: var(--gray-100); }
.methodo-inner { padding: 0 1.2rem 1.2rem; }

/* ── HOME PAGE ───────────────────────────────────────────────────── */
.home-hero {
  background: var(--hero-gradient);
  color: #fff;
  padding: 5rem 2rem 4rem;
  text-align: center;
  margin: -2rem -2rem 0;
}
.home-hero-inner { max-width: 700px; margin: 0 auto; }
.home-logo { font-size: 3.5rem; margin-bottom: 1rem; }
.home-hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.6rem; letter-spacing: -0.02em; }
.home-tagline { font-size: 1.1rem; color: var(--gray-400); margin-bottom: 0.4rem; }
.home-sub { font-size: 0.85rem; color: var(--eco-mid); margin-bottom: 2rem; opacity: 0.9; }
.home-cta-row { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.home-cta-btn {
  padding: 0.8rem 1.8rem; border-radius: 8px; font-size: 0.95rem;
  font-weight: 700; cursor: pointer; border: 2px solid transparent;
  transition: all 0.2s;
}
.home-cta-primary { background: var(--eco); color: #fff; border-color: var(--eco); }
.home-cta-primary:hover { background: var(--navy); border-color: var(--navy); }
.home-cta-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.home-cta-secondary:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

.home-section { max-width: 960px; margin: 3rem auto 0; padding: 0 0.5rem; }
.home-section-title {
  font-size: 1.3rem; font-weight: 800; color: var(--navy);
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gray-200);
}

/* Outils */
.home-tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.home-tool-card {
  background: var(--color-surface); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 2rem 1.5rem; cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow);
}
.home-tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.htc-icon { font-size: 2.5rem; margin-bottom: 0.8rem; }
.home-tool-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 0.5rem; }
.home-tool-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1rem; }
.htc-stats { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.htc-stats span {
  font-size: 0.72rem; background: var(--gray-100); color: var(--text-muted);
  padding: 0.2rem 0.6rem; border-radius: 20px;
}
.htc-link { font-size: 0.85rem; font-weight: 700; color: var(--eco); }

/* À propos */
.home-about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.home-about-profile {
  background: var(--color-surface); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 2rem; text-align: center; box-shadow: var(--shadow);
}
.about-avatar { font-size: 3rem; margin-bottom: 0.5rem; }
.home-about-profile h3 { font-size: 1.2rem; font-weight: 800; color: var(--navy); }
.about-title { font-size: 0.85rem; color: var(--eco); font-weight: 600; margin-bottom: 0.8rem; }
.about-bio { font-size: 0.83rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; }
.about-contact-btn {
  display: inline-block; background: var(--eco-light); color: var(--eco);
  border: 1px solid var(--eco-mid); border-radius: 8px;
  padding: 0.4rem 1rem; font-size: 0.82rem; font-weight: 600;
  text-decoration: none; transition: background 0.2s;
}
.about-contact-btn:hover { background: var(--eco-light); }

/* Placeholder cards */
.home-placeholder-card {
  background: repeating-linear-gradient(
    45deg, var(--gray-50), var(--gray-50) 10px, white 10px, white 20px
  );
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius); padding: 2rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 140px;
}
.placeholder-icon { font-size: 2rem; margin-bottom: 0.5rem; opacity: 0.4; }
.placeholder-label { font-size: 0.85rem; font-weight: 600; color: var(--gray-400); margin-bottom: 0.3rem; }
.placeholder-hint { font-size: 0.75rem; color: var(--gray-400); }

/* Expertise */
.home-expertise-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.home-expertise-card {
  background: var(--color-surface); border: 1px solid var(--gray-200); border-radius: var(--radius);
  padding: 1.5rem 1rem; text-align: center; box-shadow: var(--shadow);
}
.hex-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.home-expertise-card h4 { font-size: 0.85rem; font-weight: 700; color: var(--navy); margin-bottom: 0.4rem; }
.home-expertise-card p { font-size: 0.75rem; color: var(--text-muted); line-height: 1.5; }

/* Références */
.home-refs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.home-ref-card { min-height: 120px; }

/* ── SOUS-NAV REDESIGN ───────────────────────────────────────────── */
.nav-brand {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  padding: 0;
}
.nav-brand:hover { opacity: 0.85; }

/* ── RÉSULTATS ORGANISATION ──────────────────────────────────────── */
.result-header { margin-bottom: 1.5rem; }
.result-header h3 { font-size: 1.15rem; font-weight: 800; color: var(--navy); margin-bottom: 0.3rem; }
.result-subtitle { font-size: 0.82rem; color: var(--text-muted); }

.result-main-layout {
  display: grid; grid-template-columns: 260px 1fr;
  gap: 2rem; align-items: center; margin-bottom: 1.5rem;
  background: var(--gray-50); border-radius: var(--radius); padding: 1.5rem;
}
.result-donut-wrap { position: relative; height: 260px; max-width: 260px; }
.result-summary-panel { display: flex; flex-direction: column; gap: 1rem; }

.result-impact-legend { display: flex; flex-direction: column; gap: 0.5rem; }
.result-legend-item { display: flex; align-items: center; gap: 0.6rem; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.legend-label { font-size: 0.83rem; flex: 1; color: var(--text-muted); }
.legend-pct { font-size: 1rem; font-weight: 800; min-width: 40px; text-align: right; }

.result-dominant-block {
  background: var(--color-surface); border-radius: var(--radius-sm); padding: 0.8rem 1rem;
  border: 1px solid var(--gray-200);
}
.dominant-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.dominant-value { font-size: 1rem; font-weight: 800; }
.dominant-pct { font-size: 0.78rem; color: var(--text-muted); }

.result-pef-block {
  background: var(--eco-light); border-radius: var(--radius-sm); padding: 0.8rem 1rem;
  border: 1px solid var(--eco-mid);
}
.result-pef-value { font-size: 1.4rem; font-weight: 800; color: var(--eco); margin: 0.15rem 0; }
.result-pef-unit { font-size: 0.8rem; font-weight: 500; color: var(--eco); }

.result-gwp-block {
  background: var(--color-surface); border-radius: var(--radius-sm); padding: 0.8rem 1rem;
  border: 1px solid var(--gray-200);
}
.gwp-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.gwp-value { font-size: 1.2rem; font-weight: 800; color: var(--climat); }
.gwp-analogy { font-size: 0.78rem; color: var(--text-muted); }

.result-scope-section { margin-bottom: 1.5rem; }
.result-scope-section h4 { font-size: 0.88rem; font-weight: 700; color: var(--navy); margin-bottom: 0.8rem; }

.result-benchmark {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--color-info-bg); border: 1px solid var(--color-info-border); border-radius: var(--radius);
  padding: 1rem 1.2rem; margin-bottom: 1.2rem;
}
.benchmark-icon { font-size: 1.5rem; flex-shrink: 0; }
.benchmark-content p { font-size: 0.82rem; color: var(--color-info-text); line-height: 1.6; margin-bottom: 0.3rem; }
.benchmark-content strong { color: var(--navy); }

.result-hypotheses {
  border: 1px solid var(--gray-200); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 1.2rem;
}
.result-hypotheses summary {
  padding: 0.9rem 1.2rem; cursor: pointer; font-weight: 600;
  font-size: 0.9rem; color: var(--navy); background: var(--gray-50);
  list-style: none; display: flex; align-items: center;
  user-select: none;
}
.result-hypotheses summary::-webkit-details-marker { display: none; }
.result-hypotheses summary::after { content: '▸'; margin-left: auto; transition: transform 0.2s; }
.result-hypotheses[open] summary::after { transform: rotate(90deg); }
.result-hypotheses summary:hover { background: var(--gray-100); }
.hypotheses-inner { padding: 1.2rem; }
.hyp-intro { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1rem; }
.hyp-formula {
  background: var(--navy); color: white; border-radius: 8px;
  padding: 0.8rem 1.2rem; font-family: monospace; font-size: 0.9rem;
  margin-bottom: 1rem; text-align: center;
}
.hypotheses-inner h5 { font-size: 0.85rem; font-weight: 700; color: var(--navy); margin-bottom: 0.5rem; }
.hyp-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.hyp-table th { background: var(--navy); color: white; padding: 0.4rem 0.7rem; text-align: left; }
.hyp-table td { padding: 0.35rem 0.7rem; border-bottom: 1px solid var(--gray-100); }
.hyp-sources { font-size: 0.8rem; color: var(--text-muted); line-height: 1.8; padding-left: 1.2rem; }
.hyp-warning {
  font-size: 0.78rem; background: var(--sante-light); border: 1px solid var(--sante-mid);
  border-radius: var(--radius-sm); padding: 0.7rem 1rem; margin-top: 1rem;
  color: var(--sante); line-height: 1.6;
}

.result-detail-section { margin-top: 1rem; }
.result-detail-toggle-btn {
  width: 100%; padding: 0.7rem; background: var(--gray-50);
  border: 1px solid var(--gray-200); border-radius: 8px;
  font-size: 0.85rem; font-weight: 600; color: var(--navy-light);
  cursor: pointer; transition: background 0.15s;
}
.result-detail-toggle-btn:hover { background: var(--gray-100); }

/* ── Profil organisation ── */
.org-profile-section {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.org-profile-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.3rem;
}
.org-profile-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.org-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.org-field { display: flex; flex-direction: column; gap: 0.3rem; }
.org-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.org-input {
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--color-surface);
  color: var(--text);
  transition: border-color 0.15s;
  font-family: inherit;
}
.org-input:focus { outline: none; border-color: var(--navy-light); }
.org-input--error { border-color: var(--climat) !important; background: var(--climat-light); }

/* ── Activity cards ── */
.activity-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 1.25rem;
}
.activity-card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-100);
}
.activity-card.activity-energie      { border-left: 4px solid #E67E22; }
.activity-card.activity-mobilite     { border-left: 4px solid #3498DB; }
.activity-card.activity-achats       { border-left: 4px solid #9B59B6; }
.activity-card.activity-services     { border-left: 4px solid #1ABC9C; }
.activity-card.activity-alimentation { border-left: 4px solid #27AE60; }

/* ── Badge neutral ── */
.badge.badge-neutral {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

/* ── Result profile meta ── */
.result-profile-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0.3rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  /* Nav */
  nav { padding: 0 0.75rem; gap: 0.5rem; }
  .nav-brand { font-size: 0.92rem; }
  .nav-link { font-size: 0.78rem; padding: 0.35rem 0.6rem; }
  .nav-links { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-tools-menu { position: fixed; top: 60px; left: 0.75rem; }

  /* Sub-nav */
  .subnav { padding: 0.4rem 0.75rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
            white-space: nowrap; scrollbar-width: none; }
  .subnav::-webkit-scrollbar { display: none; }

  /* Layout */
  .main { padding: 1rem; }

  /* Hero générique */
  .hero { padding: 2rem 1rem; }
  .hero h1 { font-size: 1.4rem; }
  .hero-stats { gap: 1.2rem; }

  /* Home hero */
  .home-hero { padding: 3rem 1.2rem 2.5rem; margin: -1rem -1rem 0; }
  .home-hero h1 { font-size: 1.8rem; }
  .home-tagline { font-size: 0.95rem; }
  .home-cta-btn { padding: 0.65rem 1.2rem; font-size: 0.88rem; }

  /* Home sections grids */
  .home-tools-grid { grid-template-columns: 1fr; }
  .home-about-grid { grid-template-columns: 1fr; }
  .home-expertise-grid { grid-template-columns: 1fr 1fr; }
  .home-refs-grid { grid-template-columns: 1fr 1fr; }

  /* Cards catalogue */
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  /* Detail panel */
  .detail-overlay { padding: 0; }
  .detail-panel { width: 100vw; height: 100vh; }

  /* Indicator table */
  .indicator-row { grid-template-columns: 1fr 110px 70px; }

  /* Compare charts */
  .compare-chart-box { min-width: 100%; }

  /* Empreinte */
  .profile-btn { min-width: 140px; padding: 0.6rem 0.9rem; }
  .gauge-legend { gap: 1rem; }

  /* Contact/Services */
  .services-grid { grid-template-columns: 1fr; }

  /* Organisation formulaire */
  .entreprise-form-grid { grid-template-columns: 1fr; }
  .fe-input { width: 85px; font-size: 0.9rem; }

  /* Organisation résultats */
  .result-main-layout { grid-template-columns: 1fr; }
  .result-donut-wrap { height: 200px; max-width: 200px; margin: 0 auto; }
  .damage-grid { grid-template-columns: 1fr; }

  /* Organisation profil */
  .org-profile-grid { grid-template-columns: 1fr; }

  /* Article modal */
  .article-overlay { padding: 0; }
  .article-modal { width: 100vw; height: 100vh; border-radius: 0; display: flex; flex-direction: column; overflow: hidden; }
  .article-modal-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .article-modal-img { height: 180px; }
  .article-modal-contenu { padding: 1.25rem; }

  /* News */
  .news-card-img { height: 180px; }
}

/* ── Article card (section Actualités) ──────────────────────────────────── */
.home-news-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: var(--color-surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.news-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.news-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.news-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-date {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.news-card-titre {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: color var(--transition);
}
.news-card-titre:hover { color: var(--navy-light); }

.news-card-resume {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1.2rem;
}

.news-card-btn {
  display: inline-block;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  align-self: flex-start;
}
.news-card-btn:hover { background: var(--navy-light); }

/* ── Article modal ──────────────────────────────────────────────────────── */
.article-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 300;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 1rem 1rem;
  overflow-y: auto;
}
.article-overlay.open { display: flex; }

.article-modal {
  background: var(--color-surface);
  width: min(760px, 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: auto;
}

.article-modal-header {
  background: var(--navy);
  color: white;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.article-modal-date {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
  margin-bottom: 0.3rem;
}

.article-modal-titre {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
}

.article-modal-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
  transition: background var(--transition);
}
.article-modal-close:hover { background: rgba(255,255,255,0.3); }

.article-modal-body { padding: 0 0 2rem; }

.article-modal-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.article-modal-contenu {
  padding: 1.75rem 2rem;
  font-size: 0.93rem;
  line-height: 1.8;
  color: var(--text);
}
.article-modal-contenu h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 1.5rem 0 0.5rem;
}
.article-modal-contenu p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}
.article-modal-contenu em { font-style: italic; }
.article-sources-block {
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  background: var(--gray-50);
  border-left: 3px solid var(--gray-400);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.article-sources-block strong { display: block; margin-bottom: 0.4rem; color: var(--text); }
.article-sources-block ul { padding-left: 1.2rem; }
.article-sources-block li { margin-bottom: 0.25rem; }

/* ═══════════════════════════════════════════════════════════════════
   PAGE MÉTHODE — REFONTE MULTI-NIVEAUX
   ═══════════════════════════════════════════════════════════════════ */

/* ── Hero ── */
.methode-hero {
  background: var(--hero-gradient);
  color: white;
  padding: 3rem 2rem 2.5rem;
  margin: -2rem -2rem 0;
  text-align: center;
}
.methode-hero-inner { max-width: 680px; margin: 0 auto; }
.methode-hero-badge {
  display: inline-block;
  background: rgba(104,211,145,0.2);
  border: 1px solid rgba(104,211,145,0.4);
  color: var(--eco-mid);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.methode-hero h2 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
.methode-hero p  { color: rgba(255,255,255,0.7); font-size: 0.95rem; }

/* ── Sélecteur de niveau ── */
.methode-level-bar {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 1.2rem 2rem;
  position: sticky;
  top: 60px;
  z-index: 80;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.methode-level-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.7rem;
}
.methode-level-tabs {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.mlevel-tab {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.2rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}
.mlevel-tab:hover { border-color: var(--navy-light); background: var(--gray-50); }
.mlevel-tab.active {
  border-color: var(--navy);
  background: var(--navy);
  color: white;
}
.mlevel-icon { font-size: 1.3rem; flex-shrink: 0; }
.mlevel-title { font-size: 0.88rem; font-weight: 700; display: block; line-height: 1.2; }
.mlevel-sub   { font-size: 0.72rem; opacity: 0.7; display: block; }
.mlevel-tab.active .mlevel-sub { opacity: 0.8; }

/* ── Contenu niveau ── */
.methode-level-content { max-width: 900px; margin: 0 auto; padding: 2rem 0.5rem 4rem; }
.methode-level-content.hidden { display: none; }

/* ── Sections génériques ── */
.methode-section { margin-bottom: 2.5rem; }
.methode-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gray-200);
}
.methode-p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.methode-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.8rem;
  background: var(--gray-50);
  border-radius: 6px;
  padding: 0.6rem 1rem;
  border-left: 3px solid var(--gray-300);
}
.methode-sources-box {
  background: var(--color-info-bg);
  border-left: 3px solid var(--color-info-border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.9rem 1.2rem;
  font-size: 0.8rem;
  color: var(--color-info-text);
  line-height: 1.8;
  margin-top: 2rem;
}
.methode-sources-box a { color: var(--navy); font-weight: 600; }

/* ── Insight box ── */
.methode-insight-box {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--color-info-bg);
  border-left: 4px solid var(--color-info-border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text);
}
.mib-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 0.1rem; }

/* ── Niveau 1 : stats CO2 ── */
.methode-co2-limits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.2rem;
}
.co2-limit-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.clc-num { font-size: 1.8rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.clc-label { font-size: 0.85rem; font-weight: 700; color: var(--text); margin: 0.3rem 0 0.4rem; }
.clc-sub { font-size: 0.75rem; color: var(--text-muted); line-height: 1.5; }

/* ── Niveau 1 : 4 damage cards ── */
.methode-damage-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.mdc-card {
  border-radius: var(--radius);
  padding: 1.4rem;
  border: 1px solid transparent;
  box-shadow: var(--shadow);
}
.mdc-climat     { background: var(--climat-light);    border-color: var(--climat-mid); }
.mdc-eco        { background: var(--eco-light);       border-color: var(--eco-mid); }
.mdc-sante      { background: var(--sante-light);     border-color: var(--sante-mid); }
.mdc-ressources { background: var(--ressources-light);border-color: var(--ressources-mid); }

.mdc-emoji { font-size: 2rem; margin-bottom: 0.4rem; }
.mdc-name  { font-size: 0.95rem; font-weight: 700; color: var(--navy); margin-bottom: 0.2rem; }
.mdc-pct   {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.6rem;
  color: var(--text-muted);
}
.mdc-desc { font-size: 0.83rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 0.7rem; }
.mdc-ex   { font-size: 0.78rem; color: var(--text-muted); font-style: italic; border-top: 1px solid rgba(0,0,0,0.08); padding-top: 0.5rem; }

/* ── Niveau 1 : échelle mPt ── */
.methode-score-explain { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.mse-def {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--navy);
  color: white;
  border-radius: var(--radius-sm);
  padding: 0.8rem 1.2rem;
  margin-bottom: 1.2rem;
}
.mse-unit { font-size: 2rem; font-weight: 800; flex-shrink: 0; }
.mse-eq   { font-size: 0.88rem; opacity: 0.9; line-height: 1.5; }
.mse-scale-title { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); margin-bottom: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; }
.mse-bar-list { display: flex; flex-direction: column; gap: 0.5rem; }
.mse-bar-item { display: flex; align-items: center; gap: 0.8rem; font-size: 0.82rem; }
.mse-bar-ref  { opacity: 0.5; border-top: 1px dashed var(--gray-200); padding-top: 0.5rem; margin-top: 0.2rem; }
.mse-bar-label { width: 160px; flex-shrink: 0; color: var(--text-muted); }
.mse-bar-track { flex: 1; height: 12px; background: var(--gray-100); border-radius: 6px; overflow: hidden; }
.mse-bar-fill  { height: 100%; border-radius: 6px; min-width: 3px; }
.mse-bar-val   { width: 60px; text-align: right; font-weight: 700; color: var(--text); font-size: 0.8rem; }

/* ── Niveau 2 : formule visuelle ── */
.methode-formula-visual {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.2rem;
}
.mfv-formula {
  background: var(--navy);
  color: white;
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.5rem;
  font-family: 'Courier New', monospace;
  font-size: 1.05rem;
  line-height: 2;
  margin-bottom: 1.2rem;
  text-align: center;
  letter-spacing: 0.01em;
}
.mfv-sigma  { font-size: 1.5em; vertical-align: middle; }
.mfv-bracket { opacity: 0.6; }
.mfv-op     { opacity: 0.7; margin: 0 0.3em; }
.mfv-term   { border-radius: 4px; padding: 0.1em 0.4em; font-weight: 700; }
.mfv-brut   { background: rgba(197,48,48,0.4); }
.mfv-norm   { background: rgba(44,82,130,0.5); }
.mfv-poids  { background: rgba(39,103,73,0.4); }

.mfv-legend { display: flex; flex-direction: column; gap: 0.7rem; }
.mfv-leg-item { display: flex; align-items: flex-start; gap: 0.8rem; font-size: 0.85rem; line-height: 1.5; color: var(--text-muted); }
.mfv-leg-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; margin-top: 0.25rem; }
.mfv-brut.mfv-leg-dot  { background: var(--climat); }
.mfv-norm.mfv-leg-dot  { background: var(--navy-light); }
.mfv-poids.mfv-leg-dot { background: var(--eco); }

/* ── Niveau 2 : exemple de calcul ── */
.methode-calc-example {
  background: var(--eco-light);
  border: 1px solid var(--eco-mid);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
}
.mce-title { font-size: 0.85rem; font-weight: 700; color: var(--eco); margin-bottom: 0.8rem; }
.mce-steps { display: flex; flex-direction: column; gap: 0.5rem; }
.mce-step  { display: flex; align-items: flex-start; gap: 0.8rem; font-size: 0.85rem; color: var(--text); line-height: 1.5; }
.mce-step-n {
  background: var(--eco);
  color: white;
  border-radius: 50%;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* ── Niveau 2 : grille indicateurs ── */
.methode-indicators-grid { display: flex; flex-direction: column; gap: 0.5rem; }
.mind-group { margin-bottom: 0.3rem; }
.mind-group-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}
.mind-row {
  display: grid;
  grid-template-columns: 1fr 80px 120px 60px;
  gap: 0.5rem;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  font-size: 0.82rem;
  border: 1px solid transparent;
  transition: background 0.15s;
}
.mind-row:nth-child(odd) { background: var(--gray-50); }
.mind-row:hover { background: var(--gray-100); }
.mind-name  { color: var(--text); }
.mind-code  { font-family: monospace; font-size: 0.75rem; color: var(--text-muted); }
.mind-unit  { font-size: 0.72rem; color: var(--gray-400); }
.mind-weight {
  text-align: right;
  font-weight: 700;
  font-size: 0.85rem;
}
.mind-desc { font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.mind-fait { font-size: 0.72rem; color: var(--navy-light); font-style: italic; margin-top: 1px; line-height: 1.4; }

.mind-weight-bar {
  grid-column: 1 / -1;
  height: 3px;
  background: var(--gray-200);
  border-radius: 2px;
  overflow: hidden;
}
.mind-weight-bar-fill { height: 100%; border-radius: 2px; }

/* ── Niveau 2 : exemples NF ── */
.methode-nf-examples {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-top: 0.8rem;
}
.mnfe-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font-size: 0.83rem;
}
.mnfe-ind  { font-weight: 700; color: var(--navy); width: 80px; flex-shrink: 0; }
.mnfe-nf   { color: var(--text-muted); font-family: 'Courier New', monospace; font-size: 0.78rem; }

/* ── Niveau 2 : barres de pondération ── */
.methode-weight-bars { display: flex; flex-direction: column; gap: 0.4rem; }
.mwb-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.82rem;
}
.mwb-label { width: 200px; flex-shrink: 0; color: var(--text-muted); }
.mwb-track { flex: 1; height: 14px; background: var(--gray-100); border-radius: 7px; overflow: hidden; }
.mwb-fill  { height: 100%; border-radius: 7px; }
.mwb-val   { width: 48px; text-align: right; font-weight: 700; color: var(--text); font-size: 0.8rem; }

/* ── Jump level button ── */
.methode-level-jump {
  background: none;
  border: none;
  color: var(--navy-light);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: underline;
  padding: 0;
}

/* ── Niveau 3 : formule box ── */
.methode-formula-box {
  background: var(--navy);
  color: white;
  border-radius: var(--radius);
  padding: 1rem 1.4rem;
  margin: 1rem 0;
  font-family: 'Courier New', monospace;
  font-size: 0.88rem;
}
.mfb-note {
  margin-top: 0.6rem;
  font-family: var(--font-main);
  font-size: 0.78rem;
  opacity: 0.75;
  line-height: 1.6;
}

/* ── Niveau 3 : flow DELPHI ── */
.methode-delphi-flow {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}
.mdf-step {
  flex: 1;
  min-width: 160px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.mdf-num {
  width: 28px; height: 28px;
  background: var(--navy);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700;
  margin-bottom: 0.5rem;
}
.mdf-label { font-size: 0.85rem; font-weight: 700; color: var(--navy); margin-bottom: 0.4rem; }
.mdf-desc  { font-size: 0.78rem; color: var(--text-muted); line-height: 1.6; }
.mdf-arrow { font-size: 1.5rem; color: var(--gray-400); align-self: center; flex-shrink: 0; }

.methode-delphi-criteria {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin: 1rem 0;
}
.mdc-crit {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
}
.mdc-crit-name { font-size: 0.85rem; font-weight: 700; color: var(--navy); margin-bottom: 0.4rem; }
.mdc-crit-def  { font-size: 0.78rem; color: var(--text-muted); line-height: 1.6; }

/* ── Niveau 3 : tableau DELPHI ── */
.methode-delphi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.methode-delphi-table th {
  background: var(--navy);
  color: white;
  padding: 0.6rem 0.9rem;
  text-align: left;
  font-weight: 600;
}
.methode-delphi-table td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--gray-200);
}
.methode-delphi-table tr.mdt-highlight td { background: var(--climat-light); }
.methode-delphi-table tr:hover td { background: var(--gray-50); }
.mdt-score {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
}
.mdt-score.high { background: var(--eco-light); color: var(--eco); }
.mdt-score.med  { background: var(--sante-light); color: var(--sante); }
.mdt-score.low  { background: var(--climat-light); color: var(--climat); }

/* ── Niveau 3 : accordéons ── */
.methode-accordions { display: flex; flex-direction: column; gap: 0.5rem; }
.macc-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.macc-header {
  width: 100%;
  background: var(--gray-50);
  border: none;
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.macc-header:hover { background: var(--gray-100); }
.macc-item.open .macc-header { background: var(--navy); color: white; }
.macc-icon  { font-size: 1.1rem; flex-shrink: 0; }
.macc-title { flex: 1; font-size: 0.88rem; font-weight: 700; }
.macc-chevron { transition: transform 0.2s; font-size: 0.75rem; }
.macc-item.open .macc-chevron { transform: rotate(90deg); }
.macc-body {
  display: none;
  padding: 1rem 1.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.75;
  border-top: 1px solid var(--gray-200);
  background: white;
}
.macc-item.open .macc-body { display: block; }

/* ── Niveau 3 : alternatives ── */
.methode-alt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.malt-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}
.malt-header {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.7rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-100);
}
.malt-body  { font-size: 0.82rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 0.7rem; }
.malt-limit { font-size: 0.78rem; color: var(--sante); font-style: italic; }

/* ── Références ── */
.methode-refs { display: flex; flex-direction: column; gap: 0.5rem; }
.mref-item {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.5rem 0.8rem;
  border-left: 3px solid var(--gray-300);
  background: var(--gray-50);
  border-radius: 0 4px 4px 0;
}
.mref-item em { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 640px) {
  .methode-hero h2 { font-size: 1.4rem; }
  .methode-damage-cards { grid-template-columns: 1fr; }
  .methode-co2-limits { grid-template-columns: 1fr; }
  .methodo-nf-examples { grid-template-columns: 1fr; }
  .methode-delphi-criteria { grid-template-columns: 1fr; }
  .methode-alt-grid { grid-template-columns: 1fr; }
  .methode-delphi-flow { flex-direction: column; }
  .mdf-arrow { display: none; }
  .mind-row { grid-template-columns: 1fr 70px 55px; }
  .mind-unit { display: none; }
  .mse-bar-label { width: 110px; font-size: 0.75rem; }
  .mlevel-tab { padding: 0.5rem 0.9rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   CATALOGUE ORGANISATION — Hiérarchique Secteur → Catégorie → Item
   ═══════════════════════════════════════════════════════════════════ */

/* ── En-tête catalogue ── */
.org-catalog-header { margin: 1.5rem 0 0.5rem; }
.org-catalog {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

/* ── Panneau secteur ── */
.org-secteur-panel {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
}
.org-secteur-panel[open] { box-shadow: var(--shadow); }
.org-secteur-panel summary { list-style: none; }
.org-secteur-panel summary::-webkit-details-marker { display: none; }
.org-secteur-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  user-select: none;
  border-left: 4px solid var(--sec-color, #718096);
  transition: background 0.12s;
}
.org-secteur-header:hover { background: var(--gray-50); }
.org-secteur-panel[open] > .org-secteur-header {
  border-bottom: 1px solid var(--gray-200);
  background: color-mix(in srgb, var(--sec-color, #718096) 6%, white);
}
.org-sec-icon { font-size: 1.1rem; flex-shrink: 0; }
.org-sec-name { font-weight: 600; font-size: 0.9rem; color: var(--navy); flex: 1; }
.org-sec-count {
  font-size: 0.72rem; color: var(--text-muted);
  background: var(--gray-100); padding: 0.15rem 0.5rem; border-radius: 20px;
}
.org-sec-chevron {
  font-size: 1rem; color: var(--text-muted);
  transition: transform 0.2s; display: inline-block;
}
.org-secteur-panel[open] .org-sec-chevron { transform: rotate(90deg); }
.org-secteur-body { padding: 0.75rem 1rem; }

/* ── Sélecteur de postes ── */
.org-adder-section {
  margin: 1.5rem 0;
}
.org-adder-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.6rem;
}
.org-adder-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.org-adder-select {
  flex: 1;
  padding: 0.25rem 0.5rem;
  font-size: 0.82rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--navy);
  min-height: 90px;
}
.org-adder-btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--eco);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.org-adder-btn:hover { opacity: 0.9; }

/* ── Liste des postes sélectionnés ── */
.org-selected-list {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.org-selected-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 0.5rem 0;
  margin: 0;
}
.org-sel-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
}
.org-sel-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.org-sel-info {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.org-sel-name {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--navy);
}
.org-sel-uf {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
}
.org-sel-bom-text {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-style: italic;
  width: 100%;
  line-height: 1.3;
}
.org-sel-qty {
  width: 68px;
  padding: 0.3rem 0.4rem;
  font-size: 0.85rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  text-align: right;
  background: var(--color-surface);
  flex-shrink: 0;
}
.org-sel-qty:focus { outline: none; border-color: var(--eco); }
.org-sel-qty--error { border-color: var(--climat) !important; background: var(--climat-light); }
.org-sel-remove {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 0.2rem;
  line-height: 1;
  flex-shrink: 0;
}
.org-sel-remove:hover { color: #e53e3e; }

@media (max-width: 640px) {
  .org-sel-gwp { display: none; }
  .org-adder-select { font-size: 0.78rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CATALOGUE ORGANISATION — grille filtrée
   ═══════════════════════════════════════════════════════════════════════════ */

.org-catalogue-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 0.75rem 2rem;
}
.org-catalogue-header { margin-bottom: 1.25rem; }
.org-catalogue-header h2 { font-size: 1.35rem; color: var(--navy); margin-bottom: 0.3rem; }
.org-catalogue-intro { font-size: 0.85rem; color: var(--text-muted); }

/* ── Filtres ── */
.org-cat-filters {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.org-sector-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.org-sector-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  background: var(--color-surface);
  color: var(--navy);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
}
.org-sector-chip:hover { background: var(--gray-100); border-color: var(--gray-400); }
.org-sector-chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.org-sector-count {
  font-size: 0.7rem;
  opacity: 0.7;
}
.org-search-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.org-search-input {
  flex: 1;
  max-width: 380px;
  padding: 0.45rem 0.75rem;
  font-size: 0.88rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--navy);
}
.org-search-input:focus { outline: none; border-color: var(--navy-light); }
.org-results-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Grille de cartes ── */
.org-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

/* ── Carte compacte ── */
.org-cat-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.75rem;
  background: var(--color-surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  transition: box-shadow 0.14s, border-color 0.14s;
  position: relative;
}
.org-cat-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--gray-300);
}
.org-cat-card.selected {
  border-color: var(--eco);
  background: color-mix(in srgb, var(--eco) 5%, white);
}
.org-cat-secteur-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.org-cat-cat-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}
.org-cat-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
}
.org-cat-uf {
  font-size: 0.69rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.35rem;
}
.org-cat-add-btn {
  margin-top: auto;
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--eco);
  border-radius: 6px;
  background: transparent;
  color: var(--eco);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  text-align: center;
}
.org-cat-add-btn:hover { background: var(--eco); color: #fff; }
.org-cat-add-btn.added {
  background: var(--eco);
  color: #fff;
  border-color: var(--eco);
}

/* ── Liste sélectionnée dans l'outil ── */
.org-selected-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.org-items-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--eco);
  color: #fff;
  border-radius: 20px;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.org-link-btn {
  background: none;
  border: none;
  color: var(--eco);
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.org-link-btn:hover { opacity: 0.8; }

/* ── États vides ── */
.org-empty-state,
.org-analyse-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-muted);
}
.org-empty-icon {
  font-size: 2.5rem;
  opacity: 0.5;
}
.org-empty-state p,
.org-analyse-empty p { font-size: 0.9rem; max-width: 380px; }
.org-analyse-empty h3 { font-size: 1rem; color: var(--navy); }

@media (max-width: 640px) {
  .org-cards-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
  .org-catalogue-wrapper { padding: 0.75rem 0.5rem; }
  .org-sector-chips { gap: 0.3rem; }
  .org-sector-chip { font-size: 0.72rem; padding: 0.25rem 0.5rem; }
  .org-search-input { max-width: 100%; }
}

/* ── Toast notifications ────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: auto;
  max-width: 90vw;
  text-align: center;
}

.toast.toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.toast--warning {
  background: var(--sante);
  border-left: 4px solid var(--sante-mid);
}

/* ── Auth Modal ─────────────────────────────────────────────────────────── */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 400;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 1rem 1rem;
}
.auth-overlay.open { display: flex; }

.auth-modal {
  background: var(--color-surface);
  width: min(400px, 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.auth-modal-header {
  background: var(--navy);
  color: white;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.auth-modal-titre { font-size: 1.1rem; font-weight: 700; }
.auth-modal-close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  border-radius: 6px;
  transition: var(--transition);
}
.auth-modal-close:hover { background: rgba(255,255,255,0.3); }

.auth-modal-body { padding: 1.5rem; }

.auth-field { margin-bottom: 1rem; }
.auth-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.auth-error {
  background: var(--climat-light);
  border: 1px solid var(--climat-mid);
  color: var(--climat);
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}
.auth-submit-btn { width: 100%; margin-top: 0.5rem; }
.auth-switch {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.auth-switch-btn {
  background: none;
  border: none;
  color: var(--navy-light);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
  padding: 0;
}

.auth-user-info {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}
