  :root{
    --cream:#FAF6F0; --card:#FFFFFF; --sage:#4A6B57; --sage-deep:#2D4A3A;
    --sage-soft:#EAF1EC; --gold:#C9A96E; --gold-deep:#9C7B46; --peach:#E8C4B8;
    --peach-soft:#FBF2EC; --ink:#34302C; --muted:#8C8279; --line:#ECE3D8;
  }
  @font-face {
    font-family: 'Fraunces';
    src: url('../fonts/Fraunces.woff2') format('woff2');
    font-weight: 300 700;
    font-display: swap;
  }
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--cream); color: var(--ink); min-height: 100vh; padding: 2rem 1rem; }
  .card { background: var(--card); border-radius: 24px; max-width: 640px; margin: 0 auto; padding: 2.5rem 2.5rem 2.75rem; box-shadow: 0 18px 50px -18px rgba(74,107,87,0.28); border: 1px solid #F1E8DC; }
  .logo { font-size: 11px; font-weight: 600; color: var(--sage); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 1.75rem; }
  .progress-bar { display: flex; gap: 6px; margin-bottom: 2rem; }
  .progress-bar span { flex: 1; height: 5px; border-radius: 3px; background: #EADFCF; transition: background 0.3s; }
  .progress-bar span.done { background: var(--sage); }
  .section { display: none; }
  .section.active { display: block; }
  h2.sec-title { font-family: 'Fraunces', Georgia, serif; font-size: 29px; font-weight: 600; color: var(--sage-deep); letter-spacing: -0.01em; line-height: 1.18; margin-bottom: 10px; }
  p.sec-sub { font-size: 14.5px; color: var(--muted); margin-bottom: 1.5rem; line-height: 1.6; }
  .sec-label { font-size: 11px; font-weight: 700; color: var(--gold-deep); text-transform: uppercase; letter-spacing: 0.14em; margin: 1.75rem 0 8px; display: block; }
  .field-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 1rem; }
  .field { display: flex; flex-direction: column; gap: 5px; }
  label { font-size: 13px; color: #555; }
  input[type=number] { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; color: var(--ink); outline: none; transition: border-color 0.2s, box-shadow 0.2s; background: #fff; }
  input[type=number]:focus { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(74,107,87,0.12); }
  .radio-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
  .radio-btn { padding: 11px 16px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 12px; border: 1px solid var(--line); font-size: 14px; cursor: pointer; background: #fff; color: var(--ink); transition: all 0.15s; user-select: none; }
  .radio-btn:hover { border-color: var(--sage); background: #FBFAF7; }
  .radio-btn.sel { border-color: var(--sage); background: var(--sage-soft); color: var(--sage-deep); font-weight: 600; box-shadow: inset 0 0 0 1px var(--sage); }
  .multi-hint { font-size: 11px; color: #aaa; margin-bottom: 8px; }
  .nav-btns { display: flex; justify-content: space-between; margin-top: 2rem; }
  .btn-next { padding: 12px 32px; border-radius: 30px; border: none; background: var(--sage); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s; }
  .btn-next:hover { background: var(--sage-deep); }
  .btn-back { padding: 12px 28px; border-radius: 30px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; }
  .btn-back:hover { background: var(--cream); }
  .err { font-size: 12px; color: #c0392b; margin-top: 8px; display: none; }
  .metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 1.5rem; }
  .metric-card { background: var(--sage-soft); border: 1px solid #DCE7DE; border-radius: 16px; padding: 15px 16px; }
  .mc-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
  .mc-val { font-size: 23px; font-weight: 700; color: var(--sage-deep); }
  .mc-unit { font-size: 12px; color: var(--muted); font-weight: 500; }
  .cal-table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
  .cal-table th { font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
  .cal-table td { padding: 10px 12px; font-size: 14px; border-bottom: 1px solid var(--line); color: var(--ink); }
  .cal-table tr.rec td { background: var(--sage-soft); }
  .badge { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 20px; font-weight: 700; }
  .bg { background: #E7EFE9; color: var(--sage-deep); }
  .ba { background: #F7EEDD; color: #8A6D2E; }
  .bb { background: #F2E9D8; color: var(--gold-deep); }
  .brec { background: var(--gold); color: #fff; }
  .alert-box { border-radius: 14px; padding: 12px 16px; font-size: 13px; margin-bottom: 10px; line-height: 1.6; border: 1px solid; }
  .aw { background: #F7EEDD; border-color: var(--gold); color: #8A6D2E; }
  .ai { background: var(--sage-soft); border-color: var(--sage); color: var(--sage-deep); }
  .tip { display: flex; gap: 10px; padding: 13px 15px; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 8px; font-size: 13px; line-height: 1.6; color: var(--ink); background: #FFFDFB; }
  .tip-icon { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 12px; margin-top: 1px; font-weight: 700; }
  .ti-t { background: #E7EFE9; color: var(--sage-deep); }
  .ti-a { background: #F7EEDD; color: #8A6D2E; }
  .ti-p { background: #F2E9D8; color: var(--gold-deep); }
  .macro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(103px, 1fr)); gap: 10px; margin-bottom: 1.5rem; }
  .macro-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; min-width: 0; }
  .mn { font-size: 12px; color: var(--muted); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ma { font-size: 18px; font-weight: 600; color: var(--sage-deep); white-space: nowrap; }
  .mo { font-size: 11px; font-weight: 400; color: #bbb; margin-top: 2px; }
  .adaptive-box { margin-top: 1rem; background: #f5f5f3; border-radius: 12px; padding: 14px 16px; border: 1px solid #e8e8e4; }
  .adaptive-box p:first-child { font-size: 13px; font-weight: 600; color: #1a1a1a; margin-bottom: 6px; }
  .adaptive-box p:last-child { font-size: 13px; color: #666; line-height: 1.6; }
  .restart-btn { padding: 11px 26px; border-radius: 30px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; margin-top: 1.5rem; }
  .restart-btn:hover { background: var(--cream); }
  .disclaimer { font-size: 11px; color: #bbb; margin-top: 1.5rem; line-height: 1.5; text-align: center; }

  /* ── ÉCRAN D'INTRODUCTION (splash) ── */
  .card.on-intro .logo,
  .card.on-intro .progress-bar,
  .card.on-intro .progress-label { display: none; }
  .intro-eyebrow { font-size: 11px; font-weight: 700; color: var(--gold-deep); text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 14px; }
  .intro-title { font-family: 'Fraunces', Georgia, serif; font-size: 34px; font-weight: 600; color: var(--sage-deep); letter-spacing: -0.01em; line-height: 1.15; margin-bottom: 14px; }
  .intro-sub { font-size: 16px; color: var(--muted); line-height: 1.6; margin-bottom: 1.75rem; }
  .intro-card { background: #fff; border: 1px solid #E6DFD2; border-left: 5px solid var(--gold); border-radius: 18px; padding: 22px 24px; box-shadow: 0 8px 26px -14px rgba(74,107,87,0.25); margin-bottom: 1.5rem; }
  .intro-card p { font-size: 15px; color: #6B5F54; line-height: 1.65; margin-bottom: 14px; }
  .intro-card strong { color: var(--sage-deep); }
  .intro-reassure { background: var(--peach-soft); border-radius: 12px; padding: 13px 16px; font-size: 13px; color: var(--muted); line-height: 1.6; margin-top: 4px; }
  .intro-cta { display: block; width: 100%; padding: 16px 32px; border-radius: 30px; border: none; background: var(--sage); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; transition: background 0.15s; }
  .intro-cta:hover { background: var(--sage-deep); }
  .intro-meta { text-align: center; font-size: 12px; color: var(--muted); margin-top: 12px; letter-spacing: .02em; }

  /* ── ESTIMATEUR ── */
  .estim-info { background: var(--peach-soft); border-left: 3px solid var(--gold); border-radius: 14px; padding: 14px 18px; margin-bottom: 1rem; font-size: 13px; color: #6B5F54; line-height: 1.6; }
  .estim-info strong { color: var(--sage-deep); }
  .plan-hero { background: #fff; border: 1px solid #E6DFD2; border-left: 5px solid var(--gold); border-radius: 18px; padding: 22px 24px; margin: .25rem 0 1rem; box-shadow: 0 8px 26px -14px rgba(74,107,87,0.25); }
  .plan-hero-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 6px; }
  .plan-hero-label-sub { text-transform: none; }
  .plan-hero-main { font-family: 'Fraunces', Georgia, serif; color: var(--sage-deep); }
  .plan-kcal { font-size: 46px; font-weight: 700; line-height: 1; }
  .plan-unit { font-size: 17px; color: var(--muted); }
  .plan-hero-sub { font-size: 14px; color: #6B5F54; line-height: 1.6; margin-top: 10px; }
  .plan-hero-sub strong { color: var(--sage-deep); }
  .progress-label { font-size: 12px; color: var(--muted); font-weight: 600; margin: -1.25rem 0 1.75rem; letter-spacing: .02em; }
  .rythme-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 1.5rem; }
  .rythme-table th { font-size: 11px; font-weight: 600; color: #888; text-align: left; padding: 8px 10px; border-bottom: 1px solid #eee; }
  .rythme-table td { padding: 10px 10px; border-bottom: 1px solid #eee; vertical-align: top; line-height: 1.5; }
  .rythme-table tr.rec-row td { background: #f0fbf7; }
  .jalon-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
  .jalon-dot { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; border: 2px solid #ddd; color: #aaa; background: #f9f9f7; }
  .jalon-dot.final { border-color: #1D9E75; color: #0F6E56; background: #E1F5EE; }
  .jalon-card { flex: 1; border-radius: 10px; padding: 10px 14px; border: 1px solid #eee; background: #f9f9f7; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px; }
  .jalon-card.final { background: #f0fbf7; border-color: #1D9E75; }
  .jalon-left { font-size: 13px; color: #333; }
  .jalon-left strong { color: #1a1a1a; }
  .jalon-right { text-align: right; font-size: 12px; color: #888; }
  .jalon-right .jdate { font-size: 13px; color: #555; font-weight: 500; }

  /* ── CONTENU ÉDITORIAL (SEO + autorité) ── */
  /* Visible uniquement sur la page de résultats (body.on-results, posé par updateProgress).
     Reste dans le HTML source → indexé/ingéré par les crawlers & moteurs IA. */
  .seo-content { display: none; max-width: 640px; margin: 2.5rem auto 0; padding: 0 .25rem; }
  body.on-results .seo-content { display: block; }
  /* Accordéon repliable — contenu toujours dans le DOM (crawlable), replié par défaut pour ne pas distraire. */
  .seo-accordion { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 0 18px 4px; }
  .seo-accordion > summary { list-style: none; cursor: pointer; font-family: 'Fraunces', Georgia, serif; font-size: 18px; font-weight: 600; color: var(--sage-deep); padding: 16px 2px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .seo-accordion > summary::-webkit-details-marker { display: none; }
  .seo-accordion > summary::after { content: '▾'; font-size: 14px; color: var(--gold-deep); transition: transform .2s; }
  .seo-accordion[open] > summary { border-bottom: 1px solid var(--line); }
  .seo-accordion[open] > summary::after { transform: rotate(180deg); }
  .seo-accordion > h2:first-of-type { margin-top: 1rem; }
  .seo-content h2 { font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 600; color: var(--sage-deep); letter-spacing: -.01em; line-height: 1.2; margin: 2.25rem 0 .75rem; }
  .seo-content h3 { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.35; margin: 1.4rem 0 .4rem; }
  .seo-content p { font-size: 14.5px; color: #6B5F54; line-height: 1.7; margin-bottom: .85rem; }
  .seo-content strong { color: var(--sage-deep); }
  .author-card { background: #fff; border: 1px solid #E6DFD2; border-left: 5px solid var(--gold); border-radius: 18px; padding: 22px 24px; margin-top: 2.5rem; box-shadow: 0 8px 26px -14px rgba(74,107,87,.25); }
  .author-card .author-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 6px; }
  .author-card h2 { margin-top: 0; font-size: 21px; }
  .author-link { display: inline-block; margin-top: .35rem; font-size: 14px; font-weight: 700; color: var(--gold-deep); text-decoration: none; }
  .author-link:hover { text-decoration: underline; }

  @media (max-width: 500px) { .card { padding: 1.25rem; } h2.sec-title { font-size: 17px; } .intro-title { font-size: 26px; } .intro-sub { font-size: 15px; } .rythme-table { font-size: 12px; } .metric-grid { grid-template-columns: repeat(2, 1fr); } .seo-content h2 { font-size: 20px; } .author-card h2 { font-size: 19px; } }