    /* ── Variables & reset ──────────────────────────────────── */
    :root {
      --bg:          #ffffff;
      --bg-alt:      #f5f4f0;
      --text:        #1a1a1a;
      --text-muted:  #6b6b68;
      --border:      #e0dfd8;
      --accent:      #185FA5;
      --success:     #3B6D11;
      --warning:     #7A4F00;
      --danger:      #a32d2d;
      --radius:      8px;
      --font:        system-ui, 'Segoe UI', Arial, sans-serif;
    }

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

    body {
      font-family: var(--font);
      background: var(--bg);
      color: var(--text);
      padding: 0;
      max-width: 900px;
      margin: 0 auto;
      line-height: 1.6;
    }

    /* ── Onglets navigation ─────────────────────────────────── */
    .tabs {
      display: flex;
      border-bottom: 1px solid var(--border);
      background: var(--bg);
      position: sticky;
      top: 0;
      z-index: 10;
    }

    .tab-btn {
      padding: 1rem 1.5rem;
      font-size: 0.88rem;
      font-family: var(--font);
      font-weight: 500;
      background: none;
      border: none;
      border-bottom: 2px solid transparent;
      cursor: pointer;
      color: var(--text-muted);
      transition: color 0.15s, border-color 0.15s;
    }

    .tab-btn.active {
      color: var(--accent);
      border-bottom-color: var(--accent);
    }

    .tab-btn:hover:not(.active) { color: var(--text); }

    /* ── Contenu des panneaux ───────────────────────────────── */
    .panel { display: none; padding: 2rem 1.5rem; }
    .panel.active { display: block; }

    /* ── Typographie générale ───────────────────────────────── */
    h1 { font-size: 1.25rem; font-weight: 500; margin-bottom: 0.25rem; }
    h2 { font-size: 1rem; font-weight: 500; margin: 1.75rem 0 0.75rem; }
    h3 { font-size: 0.88rem; font-weight: 600; margin: 1.25rem 0 0.5rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; }

    .subtitle { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 2rem; }

    p { margin-bottom: 0.75rem; font-size: 0.9rem; }
    p:last-child { margin-bottom: 0; }

    /* ── Labels de section ──────────────────────────────────── */
    .section-label {
      font-size: 0.78rem;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--text-muted);
      margin-bottom: 0.75rem;
    }

    .section { margin-bottom: 2rem; }

    hr { border: none; border-top: 0.5px solid var(--border); margin: 2rem 0; }

    /* ── Inputs ─────────────────────────────────────────────── */
    .params-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin-bottom: 1rem;
    }

    .param-group label {
      display: block;
      font-size: 0.78rem;
      color: var(--text-muted);
      margin-bottom: 4px;
    }

    input[type="number"], input[type="text"] {
      width: 100%;
      padding: 7px 10px;
      border: 0.5px solid var(--border);
      border-radius: var(--radius);
      font-size: 0.9rem;
      font-family: var(--font);
      color: var(--text);
      background: var(--bg);
      outline: none;
      transition: border-color 0.15s;
    }

    input:focus { border-color: var(--accent); }

    .list-row {
      display: flex;
      gap: 10px;
      align-items: center;
      margin-bottom: 8px;
    }

    .list-row input[type="text"]   { flex: 2; min-width: 0; }
    .list-row input[type="number"] { flex: 1; min-width: 0; }
    .list-row span { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }

    /* ── Cartes métriques ───────────────────────────────────── */
    .metrics {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin-bottom: 1.5rem;
    }

    .metric-card { background: var(--bg-alt); border-radius: var(--radius); padding: 1rem; }
    .metric-card p.label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
    .metric-card p.value { font-size: 1.5rem; font-weight: 500; margin: 0; }

    /* ── Tableau ────────────────────────────────────────────── */
    .table-wrap { overflow-x: auto; }

    table { width: 100%; border-collapse: collapse; font-size: 0.82rem; table-layout: fixed; }

    thead th {
      text-align: right;
      padding: 8px 6px;
      font-weight: 500;
      font-size: 0.75rem;
      color: var(--text-muted);
      border-bottom: 0.5px solid var(--border);
    }

    thead th:first-child { text-align: left; }

    tbody td {
      padding: 9px 6px;
      text-align: right;
      border-bottom: 0.5px solid var(--border);
    }

    tbody td:first-child { text-align: left; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    .td-muted  { color: var(--text-muted); }
    .td-green  { color: var(--success); font-weight: 500; }
    .td-strong { font-weight: 500; }

    /* ── Barres ─────────────────────────────────────────────── */
    .bar-row { margin-bottom: 12px; }

    .bar-header { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 4px; }
    .bar-header span:last-child { color: var(--text-muted); }

    .bar-track { height: 8px; background: var(--bg-alt); border-radius: 4px; overflow: hidden; }
    .bar-fill  { height: 100%; border-radius: 4px; transition: width 0.3s ease; }

    /* ── Messages ───────────────────────────────────────────── */
    .error-msg { font-size: 0.78rem; color: var(--danger); margin-top: 6px; display: none; }

    .info-box {
      background: #EDF4FF;
      border-left: 3px solid var(--accent);
      border-radius: 0 var(--radius) var(--radius) 0;
      padding: 0.85rem 1rem;
      margin: 1rem 0;
      font-size: 0.88rem;
    }

    .warning-box {
      background: #FFF8EC;
      border-left: 3px solid #D4890A;
      border-radius: 0 var(--radius) var(--radius) 0;
      padding: 0.85rem 1rem;
      margin: 1rem 0;
      font-size: 0.88rem;
    }

    .success-box {
      background: #F0F7EC;
      border-left: 3px solid var(--success);
      border-radius: 0 var(--radius) var(--radius) 0;
      padding: 0.85rem 1rem;
      margin: 1rem 0;
      font-size: 0.88rem;
    }

    /* ── Tutoriel : blocs étapes ────────────────────────────── */
    .step {
      display: flex;
      gap: 1rem;
      margin-bottom: 1.5rem;
      align-items: flex-start;
    }

    .step-num {
      flex-shrink: 0;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--accent);
      color: #fff;
      font-size: 0.8rem;
      font-weight: 600;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-top: 2px;
    }

    .step-body { flex: 1; }
    .step-body strong { display: block; font-size: 0.92rem; margin-bottom: 0.35rem; }
    .step-body p, .step-body ul { font-size: 0.88rem; }

    /* ── Tableau tutoriel ───────────────────────────────────── */
    .tuto-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.84rem;
      margin: 0.75rem 0;
    }

    .tuto-table th {
      background: var(--bg-alt);
      padding: 7px 10px;
      text-align: left;
      font-weight: 500;
      font-size: 0.78rem;
      border: 0.5px solid var(--border);
    }

    .tuto-table td {
      padding: 7px 10px;
      border: 0.5px solid var(--border);
      vertical-align: top;
    }

    .tuto-table tr:nth-child(even) td { background: var(--bg-alt); }

    .highlight-green { color: var(--success); font-weight: 600; }
    .highlight-blue  { color: var(--accent);  font-weight: 600; }

    /* ── Formule ────────────────────────────────────────────── */
    .formula {
      background: var(--bg-alt);
      border-radius: var(--radius);
      padding: 0.75rem 1rem;
      font-size: 0.9rem;
      font-family: 'Courier New', monospace;
      margin: 0.75rem 0;
      color: var(--accent);
      font-weight: 500;
    }

    /* ── Composition grid ───────────────────────────────────── */
    .compo-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin: 1rem 0;
    }

    .compo-card {
      border: 0.5px solid var(--border);
      border-radius: var(--radius);
      padding: 0.9rem 1rem;
    }

    .compo-card .compo-title {
      font-size: 0.78rem;
      font-weight: 600;
      color: var(--accent);
      text-transform: uppercase;
      letter-spacing: 0.04em;
      margin-bottom: 0.5rem;
    }

    .compo-card p { font-size: 0.84rem; margin-bottom: 0.35rem; }

    /* ── Responsive ─────────────────────────────────────────── */
    @media (max-width: 600px) {
      .params-grid { grid-template-columns: 1fr 1fr; }
      .metrics     { grid-template-columns: 1fr; }
      .compo-grid  { grid-template-columns: 1fr; }
      .tab-btn     { padding: 0.75rem 0.9rem; font-size: 0.8rem; }
    }

/* ════════════════════════════════════════════════════════════
   EXPORT PDF — zone cachée à l'écran, utilisée uniquement
   lors du déclenchement de l'impression (window.print())
   ════════════════════════════════════════════════════════════ */
#zoneExportPDF { display: none; }

/* ── Mise en page d'impression (utilisée lors de l'export PDF) ── */
@media print {
  body * { visibility: hidden; }                 /* on cache tout le document par défaut */
  #zoneExportPDF, #zoneExportPDF * { visibility: visible; } /* sauf la zone d'export, rendue visible */
  #zoneExportPDF {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0;
  }
  .tabs { display: none; } /* les onglets ne doivent pas apparaître à l'impression */
}

/* ════════════════════════════════════════════════════════════
   PIED DE PAGE — crédits, licence, mentions légales
   ════════════════════════════════════════════════════════════ */
.app-footer {
  border-top: 0.5px solid var(--border);
  margin-top: 2.5rem;
  padding: 1.5rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.app-footer p { font-size: 0.76rem; margin-bottom: 0.6rem; }
.app-footer a { color: var(--accent); }

.app-footer .footer-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--success);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 1rem;
}
