    /* ── JETONS, direction C « Atelier » ──
       :root = variante sombre chaude ; body.light = thème sable, appliqué par défaut (voir toggleMode). */
    :root {
      --bg: oklch(19% 0.012 70);
      --surface: oklch(23.5% 0.014 70);
      --surface2: oklch(28% 0.016 70);
      --border: oklch(35% 0.016 70);
      --text: oklch(94% 0.012 82);
      --text-muted: oklch(74% 0.016 78);
      --accent: oklch(56% 0.14 264);
      --accent2: oklch(78% 0.09 264);
      --ocre: oklch(77% 0.14 76);
      --sur-accent: oklch(98% 0.006 85);
      --green: oklch(74% 0.13 150);
      --yellow: oklch(80% 0.13 85);
      --orange: oklch(74% 0.14 55);
      --red-orange: oklch(68% 0.16 35);
      --red: oklch(64% 0.17 28);
      --radius: 18px;
      --f-titre: 'Bricolage Grotesque', 'Trebuchet MS', sans-serif;
      --f-texte: 'Figtree', 'Segoe UI', system-ui, sans-serif;
    }
    /* ── THÈME SABLE (par défaut) ── */
    body.light {
      --bg: oklch(95.4% 0.018 82);
      --surface: oklch(99% 0.006 85);
      --surface2: oklch(91.5% 0.024 80);
      --border: oklch(84% 0.02 78);
      --text: oklch(22% 0.012 70);
      --text-muted: oklch(44% 0.014 70);
      --accent: oklch(38% 0.13 264);
      --accent2: oklch(38% 0.13 264);
      --sur-accent: oklch(99% 0.006 85);
      /* Couleurs de zone foncées : contraste AA sur sable */
      --green: oklch(48% 0.12 150);
      --yellow: oklch(52% 0.11 80);
      --orange: oklch(52% 0.14 50);
      --red-orange: oklch(50% 0.16 35);
      --red: oklch(45% 0.16 28);
    }
    body.light #date-debut-wrap input[type="date"] { color-scheme: light; }

    /* ── TOGGLE THÈME ── */
    #theme-toggle {
      margin-left: auto;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 8px;
      width: 38px; height: 38px;
      font-size: 20px;
      color: var(--text);
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      transition: background 0.2s, border-color 0.2s;
      flex-shrink: 0;
    }
    #theme-toggle:hover { background: var(--border); }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: var(--f-texte);
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      line-height: 1.6;
    }

    /* ── HEADER ── */
    header {
      background: var(--bg);
      border-bottom: 1px solid var(--border);
      padding: 18px 32px;
      display: flex;
      align-items: center;
      gap: 16px;
    }
    .logo {
      width: 44px; height: 44px;
      flex-shrink: 0;
    }
    header h1 { font-family: var(--f-titre); font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
    header p { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }

    /* ── LAYOUT SIDEBAR ── */
    #menu-toggle { display: none; }

    .app-body {
      display: flex;
      min-height: calc(100vh - 89px); /* sous header */
      position: relative;
    }

    /* ── SIDEBAR ── */
    #sidebar {
      width: 220px;
      flex-shrink: 0;
      display: flex;
      flex-direction: column;
      gap: 2px;
      padding: 16px 10px;
      border-right: 1px solid var(--border);
      background: var(--surface);
      position: sticky;
      top: 0;
      height: calc(100vh - 89px);
      overflow-y: auto;
      z-index: 50;
    }
    #sidebar button {
      background: none;
      border: none;
      color: var(--text-muted);
      padding: 10px 14px;
      font-size: 0.88rem;
      cursor: pointer;
      border-radius: 8px;
      white-space: nowrap;
      text-align: left;
      width: 100%;
      transition: background 0.15s, color 0.15s;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    #sidebar button:hover {
      color: var(--text);
      background: var(--surface2);
    }
    #sidebar button.active {
      color: var(--text);
      background: var(--surface2);
      font-weight: 600;
    }

    /* Overlay mobile */
    #sidebar-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.5);
      z-index: 149;
    }

    /* ── MAIN WRAPPER ── */
    .main-wrapper {
      flex: 1;
      min-width: 0;
    }

    /* ── MAIN ── */
    main { padding: 32px; max-width: 900px; margin: 0 auto; }
    .tab-panel { display: none; }
    .tab-panel.active { display: block; }

    /* ── CARDS ── */
    .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 24px;
      margin-bottom: 20px;
    }
    .card h2 {
      font-family: var(--f-titre);
      font-size: 1.15rem;
      font-weight: 600;
      letter-spacing: -0.01em;
      margin-bottom: 18px;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .card h2 .icon { font-size: 1.2rem; }

    /* ── FORM ── */
    .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    @media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
    label { font-size: 0.85rem; color: var(--text-muted); display: block; margin-bottom: 6px; }
    input, select {
      width: 100%;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 12px;
      color: var(--text);
      padding: 10px 14px;
      min-height: 46px;
      font-family: inherit;
      font-size: 1rem;
      outline: none;
      transition: border-color 0.2s;
    }
    input:focus, select:focus { border-color: var(--accent); }
    select option { background: var(--surface2); }
    .hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; }

    .btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: var(--accent);
      color: var(--sur-accent);
      border: none;
      border-radius: 999px;
      padding: 12px 28px;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      margin-top: 8px;
      transition: opacity 0.2s;
    }
    .btn:hover { opacity: 0.88; }

    /* ── ZONE BADGE ── */
    .zone-band {
      display: flex;
      gap: 0;
      border-radius: 8px;
      overflow: hidden;
      margin-bottom: 20px;
      height: 12px;
    }
    .zone-band-seg { flex: 1; }
    .seg-confort { background: var(--green); }
    .seg-vigilance { background: var(--yellow); }
    .seg-preparation { background: var(--orange); }
    .seg-decision { background: var(--red-orange); }
    .seg-execution { background: var(--red); }

    .zone-pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 18px;
      border-radius: 100px;
      font-weight: 700;
      font-size: 1.1rem;
      margin-bottom: 10px;
    }
    .pill-confort    { background: rgba(34,197,94,0.15); color: var(--green); }
    .pill-vigilance  { background: rgba(234,179,8,0.15);  color: var(--yellow); }
    .pill-preparation{ background: rgba(249,115,22,0.15); color: var(--orange); }
    .pill-decision   { background: rgba(239,68,68,0.15);  color: var(--red-orange); }
    .pill-execution  { background: rgba(220,38,38,0.2);   color: var(--red); }
    /* Pills rouges de la zone verdict : variantes claires lisibles sur fond sombre (AA) */
    .dash-zone.pill-decision  { color: #f87171; }
    .dash-zone.pill-execution { color: #f08080; }
    body.light .dash-zone.pill-decision  { color: var(--red-orange); }
    body.light .dash-zone.pill-execution { color: var(--red); }

    /* ── STATS GRID ── */
    .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 16px; }
    .stat {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 16px;
    }
    .stat .val { font-size: 1.5rem; font-weight: 700; color: var(--accent2); }
    .stat .lbl { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

    /* ── BADGE RAPPEL NAV ── */
    nav button { position: relative; }
    .nav-badge {
      position: absolute; top: 5px; right: 5px;
      width: 8px; height: 8px;
      background: #ef4444; border-radius: 50%;
      animation: pulse-badge 1.6s ease-in-out infinite;
      pointer-events: none;
    }
    @keyframes pulse-badge {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.55; transform: scale(1.5); }
    }

    /* ── ALERTE CHANGEMENT DE ZONE ── */
    #zone-change-alert {
      display: none;
      border-radius: 10px; padding: 12px 16px; margin-bottom: 14px;
      font-size: 0.88rem; font-weight: 500;
      border: 1.5px solid; animation: fadeIn 0.4s ease;
    }
    #zone-change-alert .zca-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }

    /* ── HISTORIQUE DES CALCULS ── */
    #historique-zone { margin-top: 16px; }
    .hist-timeline { display: flex; flex-direction: column; gap: 0; }
    .hist-item {
      display: grid;
      grid-template-columns: 16px 1px 1fr;
      column-gap: 12px;
      align-items: start;
      padding-bottom: 16px;
      position: relative;
    }
    .hist-item:last-child { padding-bottom: 0; }
    .hist-dot {
      width: 14px; height: 14px; border-radius: 50%;
      margin-top: 3px; flex-shrink: 0;
      box-shadow: 0 0 0 3px rgba(255,255,255,0.07);
    }
    .hist-item.hist-current .hist-dot {
      box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
    }
    .hist-line-col {
      width: 1px; background: var(--border);
      align-self: stretch; margin-top: 17px;
    }
    .hist-item:last-child .hist-line-col { background: transparent; }
    .hist-content { padding-bottom: 2px; }
    .hist-date { font-size: 0.74rem; color: var(--text-muted); display: block; margin-bottom: 2px; }
    .hist-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .hist-zone { font-size: 0.88rem; font-weight: 700; }
    .hist-pct { font-size: 0.82rem; color: var(--text-muted); }
    .hist-current .hist-zone::after {
      content: ' (actuel)'; font-size: 0.74rem; font-weight: 400;
      color: var(--text-muted);
    }

    /* ── DASHBOARD VIVANT ── */
    .dash-card {
      background: var(--surface);
      border: 0;
      border-radius: 24px;
      box-shadow: 0 1px 0 var(--border), 0 24px 48px -32px oklch(30% 0.03 70 / 0.45);
      padding: 24px 26px;
      margin-bottom: 24px;
    }
    .dash-head {
      display: flex; align-items: center; justify-content: space-between;
      gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
    }
    .dash-zone {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 5px 14px; border-radius: 100px;
      font-size: 0.85rem; font-weight: 700;
    }
    .dash-fresh { font-size: 0.78rem; color: var(--text-muted); }
    .dash-fresh.is-stale { color: var(--orange); font-weight: 600; }
    .dash-phrase {
      font-family: var(--f-titre);
      font-size: 1.15rem; line-height: 1.5; font-weight: 500;
      margin-bottom: 18px;
    }
    .dash-phrase strong { color: var(--accent2); font-weight: 800; }
    /* Verdict parlé : l'objet dominant de l'écran (spec : docs/spec-voix.md) */
    .dash-verdict {
      font-size: 1.45rem; line-height: 1.4; font-weight: 700;
      letter-spacing: -0.01em; margin-bottom: 8px;
    }
    .dash-verdict strong { color: var(--accent2); font-weight: 800; }
    .dash-verdict.is-stale { opacity: 0.62; }
    .dash-action {
      font-size: 0.98rem; color: var(--text-muted); font-weight: 500;
      margin-bottom: 18px;
    }
    .dash-legal { margin-top: 4px; margin-bottom: 14px; }
    .legal-link {
      background: none; border: none; padding: 0; cursor: pointer;
      font-size: 0.78rem; color: var(--text-muted);
      text-decoration: underline dotted; text-underline-offset: 3px;
    }
    .legal-link:hover, .legal-link:focus-visible { color: var(--accent2); }
    .dash-gauge {
      height: 14px; background: var(--surface2);
      border: 1px solid var(--border); border-radius: 100px;
      overflow: hidden;
    }
    .dash-gauge-fill {
      height: 100%; border-radius: 100px;
      transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
      background: var(--accent);
    }
    .dash-gauge-fill.zone-confort     { background: var(--green); }
    .dash-gauge-fill.zone-vigilance   { background: var(--yellow); }
    .dash-gauge-fill.zone-preparation { background: var(--orange); }
    .dash-gauge-fill.zone-decision    { background: var(--red-orange); }
    .dash-gauge-fill.zone-execution   { background: var(--red); }
    .dash-gauge-meta {
      display: flex; justify-content: space-between;
      font-size: 0.8rem; color: var(--text-muted);
      margin-top: 7px; margin-bottom: 20px;
    }
    .dash-cta { width: auto; padding: 12px 28px; font-size: 0.95rem; }
    @media (max-width: 560px) {
      .dash-card { padding: 20px 18px; }
      .dash-phrase { font-size: 1.02rem; }
      .dash-verdict { font-size: 1.18rem; }
      .dash-cta { width: 100%; }
    }

    /* ── PROGRESS BAR ── */
    .progress-wrap { margin: 18px 0; }
    .progress-label { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }
    .progress-bar {
      height: 10px;
      background: var(--surface2);
      border-radius: 100px;
      overflow: hidden;
    }
    .progress-fill { height: 100%; border-radius: 100px; transition: width 0.6s ease; }

    /* ── TIMELINE ── */
    .timeline { margin-top: 16px; }
    .tl-item {
      display: flex;
      gap: 14px;
      margin-bottom: 14px;
      align-items: flex-start;
    }
    .tl-dot {
      width: 10px; height: 10px;
      border-radius: 50%;
      margin-top: 6px;
      flex-shrink: 0;
    }
    .tl-dot.done { background: var(--green); }
    .tl-dot.warn { background: var(--orange); }
    .tl-dot.alert { background: var(--red); }
    .tl-dot.info { background: var(--accent); }
    .tl-title { font-weight: 600; font-size: 0.9rem; }
    .tl-desc { font-size: 0.82rem; color: var(--text-muted); }

    /* ── SIMULATION ── */
    .sim-table { width: 100%; border-collapse: collapse; }
    .sim-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
    .sim-table td:last-child { text-align: right; font-weight: 600; color: var(--accent2); }
    .sim-table tr:last-child td { border-bottom: none; }
    .sim-warn {
      background: var(--surface2);
      border: 0;
      border-radius: 12px;
      padding: 12px 16px;
      font-size: 0.9rem;
      color: var(--text);
      margin-top: 14px;
      line-height: 1.55;
    }

    /* ── SIMULATEUR SCÉNARIOS ── */
    .sim-slider-wrap {
      background: var(--surface2); border-radius: 10px;
      padding: 14px 16px; margin-bottom: 20px;
    }
    .sim-slider-label { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 10px; }
    .sim-slider-label strong { color: var(--accent2); font-size: 1rem; }
    #sim-slider { width: 100%; accent-color: var(--accent); cursor: pointer; }
    .sim-slider-bounds {
      display: flex; justify-content: space-between;
      font-size: 0.72rem; color: var(--text-muted); margin-top: 4px;
    }
    .sim-scenarios {
      display: grid; grid-template-columns: repeat(3, 1fr);
      gap: 12px; margin-bottom: 20px;
    }
    .sim-scenario-card {
      background: var(--surface2); border-radius: 10px;
      border: 1px solid var(--border); overflow: hidden;
    }
    .sim-scen-header {
      display: flex; align-items: center; gap: 10px;
      padding: 12px 14px; border-bottom: 1.5px solid transparent;
    }
    .sim-scen-emoji { font-size: 1.3rem; }
    .sim-scen-label { font-weight: 700; font-size: 0.88rem; }
    .sim-scen-badge {
      display: inline-block; font-size: 0.7rem; font-weight: 600;
      border-radius: 4px; padding: 1px 6px; margin-top: 3px;
    }
    .sim-scen-desc { font-size: 0.78rem; color: var(--text-muted); padding: 8px 14px 4px; }
    .sim-scen-row {
      display: flex; justify-content: space-between;
      padding: 6px 14px; font-size: 0.82rem; border-top: 1px solid var(--border);
    }
    .sim-scen-row span { color: var(--text-muted); }
    .sim-scen-row--last { padding-bottom: 14px; }
    .sim-annual-wrap { background: var(--surface2); border-radius: 10px; padding: 14px 16px; }
    .sim-annual-wrap h3 { margin-bottom: 12px; font-size: 0.95rem; }

    /* ── EDUCATION ── */
    .edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
    @media (max-width: 600px) { .edu-grid { grid-template-columns: 1fr; } }
    .edu-card {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 16px;
    }
    .edu-card h3 { font-size: 0.9rem; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
    .edu-card ul { padding-left: 16px; }
    .edu-card li { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 5px; }
    .edu-card li strong { color: var(--text); }

    .msg-cle {
      padding: 14px 18px;
      background: var(--surface2);
      border-radius: 14px;
      font-family: var(--f-titre);
      font-weight: 600;
      font-size: 1rem;
      color: var(--accent2);
      margin-bottom: 10px;
    }

    .erreur-list { counter-reset: erreur; }
    .erreur-item {
      display: flex;
      gap: 12px;
      align-items: flex-start;
      padding: 10px 0;
      border-bottom: 1px solid var(--border);
    }
    .erreur-item:last-child { border-bottom: none; }
    .erreur-num {
      background: rgba(239,68,68,0.15);
      color: var(--red-orange);
      width: 26px; height: 26px;
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 0.8rem;
      font-weight: 700;
      flex-shrink: 0;
    }
    .erreur-title { font-size: 0.88rem; font-weight: 600; }
    .erreur-desc { font-size: 0.78rem; color: var(--text-muted); }

    /* ── RECOMMENDATION BOX ── */
    .reco-box {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 18px;
      margin-top: 16px;
    }
    .reco-box h3 { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; }
    .reco-box p { font-size: 0.95rem; font-weight: 500; }

    /* ── EMPTY STATE ── */
    .empty {
      text-align: center;
      color: var(--text-muted);
      padding: 40px 20px;
      font-size: 0.9rem;
    }
    .empty .big { font-size: 2.5rem; margin-bottom: 12px; }

    footer {
      text-align: center;
      padding: 24px;
      color: var(--text-muted);
      font-size: 0.78rem;
      border-top: 1px solid var(--border);
      margin-top: 32px;
    }

    /* ── BLOG ── */
    .blog-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      transition: border-color 0.2s, transform 0.15s;
    }
    .blog-card.publie {
      cursor: pointer;
    }
    .blog-card.publie:hover {
      border-color: var(--accent);
      transform: translateY(-2px);
    }
    .blog-titre {
      font-size: 0.92rem;
      font-weight: 700;
      line-height: 1.4;
    }
    .blog-desc {
      font-size: 0.8rem;
      color: var(--text-muted);
      line-height: 1.6;
      flex: 1;
    }
    .blog-lire {
      font-size: 0.8rem;
      color: var(--accent2);
      font-weight: 600;
      margin-top: 4px;
    }
    .blog-badge {
      font-size: 0.7rem;
      padding: 3px 8px;
      border-radius: 100px;
      font-weight: 600;
    }

    .blog-status {
      font-size: 0.7rem;
      padding: 3px 8px;
      border-radius: 100px;
      font-weight: 600;
    }
    .blog-status.publie  { background: rgba(34,197,94,0.12); color: var(--green); }
    .blog-status.a-venir { background: rgba(139,146,184,0.12); color: var(--text-muted); }

    /* ── TUTORIELS ── */
    .tuto-section-title {
      font-size: 0.82rem; font-weight: 700; color: var(--text-muted);
      letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 14px;
    }
    .tuto-grid {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px;
    }
    .tuto-card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 18px;
      display: flex; flex-direction: column; gap: 8px;
      cursor: pointer; transition: border-color 0.2s, transform 0.15s;
    }
    .tuto-card:hover { border-color: var(--accent); transform: translateY(-2px); }
    .tuto-card-header { display: flex; justify-content: space-between; align-items: center; }
    .tuto-badge {
      font-size: 0.7rem; padding: 3px 9px; border-radius: 100px; font-weight: 600;
    }
    .tuto-duree { font-size: 0.75rem; color: var(--text-muted); }
    .tuto-titre { font-size: 0.92rem; font-weight: 700; line-height: 1.4; }
    .tuto-desc  { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; flex: 1; }
    .tuto-footer {
      display: flex; justify-content: space-between; align-items: center;
      margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border);
    }
    .tuto-nsteps { font-size: 0.75rem; color: var(--text-muted); }
    .tuto-lire   { font-size: 0.8rem; color: var(--accent2); font-weight: 600; }

    /* ── TUTO MODAL CONTENT ── */
    .tuto-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
    .tuto-meta-item {
      background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
      padding: 6px 12px; font-size: 0.78rem; color: var(--text-muted);
    }
    .tuto-step { display: flex; gap: 16px; margin-bottom: 20px; align-items: flex-start; }
    .step-num {
      width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
      background: linear-gradient(135deg, var(--accent), var(--accent2));
      color: #fff; display: flex; align-items: center; justify-content: center;
      font-weight: 700; font-size: 0.85rem; margin-top: 2px;
    }
    .step-body h3 { font-size: 0.92rem; font-weight: 700; margin-bottom: 6px; }
    .step-body p  { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; line-height: 1.6; }
    .step-body ul { padding-left: 16px; margin-bottom: 6px; }
    .step-body li { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 4px; }
    .step-tip {
      background: color-mix(in oklch, var(--accent) 8%, transparent);
      padding: 10px 14px; border-radius: 12px;
      font-size: 0.85rem; color: var(--text); margin-top: 8px;
    }
    .step-warn {
      background: color-mix(in oklch, var(--red-orange) 9%, transparent);
      padding: 10px 14px; border-radius: 12px;
      font-size: 0.85rem; color: var(--text); margin-top: 8px;
    }
    .tuto-divider { border: none; border-top: 1px solid var(--border); margin: 6px 0 20px; }

    /* ── MODALE TUTORIEL ── */
    #tuto-modal {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.75); z-index: 1001;
      align-items: flex-start; justify-content: center;
      padding: 40px 16px; overflow-y: auto;
    }
    #tuto-modal-titre { font-size: 1.25rem; font-weight: 700; line-height: 1.4; margin-bottom: 6px; padding-right: 40px; }
    #tuto-modal-cat   { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 20px; }
    #tuto-modal-body  { font-size: 0.9rem; line-height: 1.7; color: var(--text); }
    .tuto-filter {
      background: var(--surface2); border: 1px solid var(--border); color: var(--text-muted);
      border-radius: 8px; padding: 6px 14px; font-size: 0.8rem; cursor: pointer; transition: all 0.15s;
    }
    .tuto-filter:hover { color: var(--text); border-color: var(--accent); }
    .tuto-filter.active { background: color-mix(in oklch, var(--accent) 15%, transparent); border-color: var(--accent); color: var(--accent2); font-weight: 600; }

    /* ── MODALE ── */
    #blog-modal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.7);
      z-index: 1000;
      align-items: flex-start;
      justify-content: center;
      padding: 40px 16px;
      overflow-y: auto;
    }
    .modal-box {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      width: 100%;
      max-width: 720px;
      padding: 32px;
      position: relative;
    }
    .modal-close {
      position: absolute;
      top: 16px; right: 16px;
      background: var(--surface2);
      border: 1px solid var(--border);
      color: var(--text-muted);
      width: 32px; height: 32px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 1rem;
      display: flex; align-items: center; justify-content: center;
    }
    .modal-close:hover { color: var(--text); }
    #modal-titre { font-size: 1.3rem; font-weight: 700; line-height: 1.4; margin-bottom: 8px; padding-right: 40px; }
    #modal-cat   { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 24px; }
    #modal-body  { font-size: 0.92rem; line-height: 1.8; color: var(--text); }
    #modal-body h2 { font-size: 1.05rem; margin: 24px 0 10px; color: var(--accent2); }
    #modal-body p  { margin-bottom: 14px; }
    #modal-body ul { padding-left: 18px; margin-bottom: 14px; }
    #modal-body li { margin-bottom: 6px; color: var(--text-muted); }
    #modal-body strong { color: var(--text); }

    /* ── Prorata temporis ── */
    .prorata-info { background: var(--surface2); border: 1px solid var(--accent); border-radius: 10px; padding: 16px 20px; margin: 16px 0; }
    .prorata-title { font-weight: 700; color: var(--accent2); margin-bottom: 10px; font-size: 0.95rem; }
    .prorata-detail { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 10px; font-size: 0.88rem; color: var(--text); }
    .prorata-detail span strong { color: var(--accent2); }
    .prorata-formula { font-size: 0.78rem; color: var(--text-muted); font-family: monospace; margin: 0; }
    #date-debut-wrap input[type="date"] { color-scheme: dark; }

    /* ── Checklist interactive ── */
    .checklist-zone-btn { background: var(--surface2); border: 1px solid transparent; color: var(--text-muted); min-height: 40px; padding: 6px 16px; border-radius: 999px; font: inherit; font-size: 0.88rem; cursor: pointer; transition: all .2s; }
    .checklist-zone-btn:hover { color: var(--text); border-color: var(--accent); }
    .checklist-zone-btn.active { background: var(--accent); color: var(--sur-accent); border-color: var(--accent); font-weight: 600; }
    .checklist-progress-wrap { margin: 16px 0 4px; }
    .checklist-progress-text { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 6px; }
    .checklist-progress-bar { height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
    .checklist-progress-fill { height: 100%; border-radius: 4px; transition: width .4s, background .4s; }
    .checklist-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 8px; cursor: pointer; transition: background .15s; font-size: 0.88rem; color: var(--text); line-height: 1.4; user-select: none; flex-wrap: wrap; }
    .checklist-article-link { margin-left: auto; flex-shrink: 0; font-size: 0.75rem; color: var(--accent2); border: 1px solid color-mix(in oklch, var(--accent2) 30%, transparent); border-radius: 5px; padding: 1px 8px; white-space: nowrap; cursor: pointer; transition: background .15s; }
    .checklist-article-link:hover { background: color-mix(in oklch, var(--accent2) 12%, transparent); }
    .checklist-item:hover { background: var(--surface2); }
    .checklist-item.checklist-done span:last-child { color: var(--text-muted); text-decoration: line-through; }
    .checklist-checkbox { flex-shrink: 0; width: 18px; height: 18px; border: 2px solid var(--text-muted); border-radius: 4px; margin-top: 1px; display: flex; align-items: center; justify-content: center; transition: all .15s; }
    .checklist-checkbox.checked { background: var(--accent); border-color: var(--accent); }
    .checklist-checkbox.checked::after { content: '✓'; color: var(--sur-accent); font-size: 12px; font-weight: 700; line-height: 1; }
    .checklist-reset { background: none; border: 1.5px solid var(--border); color: var(--text-muted); min-height: 40px; padding: 6px 16px; border-radius: 999px; font: inherit; font-size: 0.85rem; cursor: pointer; margin-top: 12px; transition: all .15s; }
    .checklist-reset:hover { border-color: var(--text-muted); color: var(--text); }

    /* ── HERO 2 colonnes ── */
    .hero-grid { display: flex; align-items: center; gap: 40px; }
    .hero-text  { flex: 1; }
    .hero-chart-wrap { flex: 0 0 340px; opacity: 0.92; }
    @media (max-width: 740px) {
      .hero-grid { flex-direction: column-reverse; gap: 20px; }
      .hero-chart-wrap { width: 100%; flex: none; max-width: 100%; }
      .hero-text { text-align: center; }
      .hero-text .btn { width: 100%; justify-content: center; }
    }

    /* ── Animation point de bascule ── */
    @keyframes pulse-bascule {
      0%,100% { opacity: 0.45; }
      50%      { opacity: 0.08; }
    }
    .pulse-bascule { animation: pulse-bascule 2.4s ease-in-out infinite; }
    @keyframes pulse-bascule2 {
      0%,100% { opacity: 0.2; }
      50%      { opacity: 0.04; }
    }
    .pulse-bascule2 { animation: pulse-bascule2 2.4s ease-in-out 0.4s infinite; }

    /* ── Blog category header ── */
    .cat-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
    .cat-header-line { flex: 1; height: 1px; background: var(--border); }
    .cat-icon-wrap { flex-shrink: 0; }

    /* ── Visuels décoratifs ── */
    .tuto-card-strip { height: 4px; border-radius: 4px 4px 0 0; margin: -18px -18px 14px; }
    .edu-card-visual { height: 6px; border-radius: 4px; margin-bottom: 14px; }

    /* ── IMPRESSION / PDF ── */
    .btn-print {
      position: absolute; top: 16px; right: 56px;
      background: var(--surface2); border: 1px solid var(--border);
      color: var(--text-muted); width: 32px; height: 32px;
      border-radius: 8px; cursor: pointer; font-size: 0.9rem;
      display: flex; align-items: center; justify-content: center;
      transition: color 0.15s, border-color 0.15s;
    }
    .btn-print:hover { color: var(--text); border-color: var(--accent); }

    @media print {
      * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
      body > *:not(#tuto-modal) { display: none !important; }

      /* ── Export PDF calculateur ── */
      body.print-calcul > * { display: none !important; }
      body.print-calcul #export-print-zone { display: block !important; }
      #export-print-zone { display: none; }

      /* ── Export PDF projection ── */
      body.print-projection .tab-panel { display: none !important; }
      body.print-projection #tab-projection { display: block !important; }

      #tuto-modal {
        display: block !important; position: static !important;
        background: none !important; padding: 0 !important; overflow: visible !important;
      }
      #tuto-modal .modal-box {
        max-width: 100% !important; border: none !important;
        padding: 0 !important; background: #fff !important;
        box-shadow: none !important;
      }
      .modal-close, .btn-print { display: none !important; }
      #tuto-modal-cat   { color: #666 !important; font-size: 0.8rem; margin-bottom: 8px; }
      #tuto-modal-titre { color: #111 !important; font-size: 1.3rem; margin-bottom: 16px; padding-right: 0 !important; }
      #tuto-modal-body  { color: #222 !important; }
      #tuto-modal-body h3 { color: #111 !important; }
      #tuto-modal-body p, #tuto-modal-body li { color: #444 !important; }
      .step-num { background: #24408e !important; color: #fff !important; }
      .step-tip  { background: #eef1fa !important; border-left: 3px solid #24408e !important; color: #333 !important; }
      .step-warn { background: #fff0f0 !important; border-left: 3px solid #ef4444 !important; color: #c00 !important; }
      .tuto-meta-item { background: #f5f5f5 !important; color: #555 !important; border: 1px solid #ddd !important; }
      .tuto-divider { border-top: 1px solid #ddd !important; }
    }

    /* ── RESPONSIVE MOBILE ── */
    .sim-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    @media (max-width: 768px) {
      /* ── HAMBURGER ── */
      #menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        background: var(--surface2);
        border: 1px solid var(--border);
        border-radius: 8px;
        width: 38px; height: 38px;
        padding: 6px 8px;
        cursor: pointer;
        margin-left: auto;
        flex-shrink: 0;
      }
      #menu-toggle span {
        display: block;
        height: 2px;
        background: var(--text);
        border-radius: 2px;
        transition: transform 0.25s, opacity 0.25s;
      }
      body.sidebar-open #menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
      body.sidebar-open #menu-toggle span:nth-child(2) { opacity: 0; }
      body.sidebar-open #menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

      /* sur mobile, le flex-gap du header suffit — le hamburger prend margin-left:auto */
      #theme-toggle { margin-left: auto; }
      #menu-toggle { margin-left: 0; }

      /* ── SIDEBAR MOBILE ── */
      #sidebar {
        position: fixed;
        left: 0; top: 0;
        width: 260px;
        height: 100vh;
        z-index: 150;
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        padding-top: 20px;
        border-right: 1px solid var(--border);
        box-shadow: none;
      }
      body.sidebar-open #sidebar { transform: translateX(0); box-shadow: 4px 0 24px oklch(19% 0.012 70 / 0.35); }
      body.sidebar-open #sidebar-overlay { display: block; }

      .app-body { min-height: 100vh; }
    }

    @media (max-width: 600px) {
      header { padding: 14px 16px; gap: 10px; }
      header h1 { font-size: 1.15rem; }
      header p { display: none; }
      .logo { width: 36px; height: 36px; }

      main { padding: 14px; }

      .card { padding: 16px; margin-bottom: 14px; }

      .stats { grid-template-columns: 1fr 1fr; }
      .stat .val { font-size: 1.1rem; }

      .tuto-grid { grid-template-columns: 1fr; }
      .tuto-filter { padding: 5px 10px; font-size: 0.75rem; }

      .checklist-zone-btn { padding: 5px 10px; font-size: 0.75rem; }

      .modal-box { padding: 18px 14px; }
      #modal-titre { font-size: 1.1rem; }
      #tuto-modal-titre { font-size: 1.05rem; }
      #tuto-modal { padding: 20px 10px; }

      .zone-pill { font-size: 0.95rem; padding: 6px 14px; }

      .progress-label { font-size: 0.75rem; }

      .tuto-step { gap: 10px; }
      .step-num { width: 26px; height: 26px; font-size: 0.78rem; }

      .sim-table td { padding: 8px 10px; font-size: 0.82rem; }
      .sim-scenarios { grid-template-columns: 1fr; }

      footer { padding: 16px; font-size: 0.72rem; }
    }

    /* ── PAYWALL ── */
    #paywall-modal {
      display: none; position: fixed; inset: 0;
      background: rgba(15,17,23,0.88);
      z-index: 8000;
      align-items: center; justify-content: center;
      padding: 20px;
    }
    #paywall-modal.active { display: flex; }
    .paywall-box {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 36px 32px 28px;
      max-width: 440px; width: 100%;
      text-align: center;
      box-shadow: 0 16px 48px rgba(0,0,0,0.5);
      position: relative;
    }
    .paywall-emoji { font-size: 2.8rem; margin-bottom: 12px; }
    .paywall-box h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
    .paywall-box p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 20px; }
    .paywall-features {
      text-align: left;
      background: var(--surface2);
      border-radius: 10px;
      padding: 14px 18px;
      margin-bottom: 22px;
      font-size: 0.875rem;
      line-height: 2;
    }
    .paywall-features li { list-style: none; }
    .paywall-features li::before { content: '✅ '; }
    .paywall-price {
      font-size: 2rem; font-weight: 800;
      color: var(--accent2); margin-bottom: 4px;
    }
    .paywall-price-sub {
      font-size: 0.8rem; color: var(--text-muted);
      margin-bottom: 20px;
    }
    .btn-paywall {
      display: block; width: 100%;
      background: linear-gradient(135deg, var(--accent), var(--accent2));
      border: none; border-radius: 10px;
      color: #fff; font-size: 1rem; font-weight: 700;
      padding: 14px; cursor: pointer;
      transition: opacity 0.2s;
      margin-bottom: 12px;
    }
    .btn-paywall:hover { opacity: 0.88; }
    .btn-paywall-close {
      background: none; border: none;
      color: var(--text-muted); font-size: 0.82rem;
      cursor: pointer; padding: 6px;
    }
    .btn-paywall-close:hover { color: var(--text); }
    .paywall-lock-overlay {
      position: absolute; inset: 0;
      background: rgba(15,17,23,0.72);
      border-radius: inherit;
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      gap: 10px; cursor: pointer;
      z-index: 10;
      backdrop-filter: blur(3px);
    }
    .paywall-lock-overlay span { font-size: 1.6rem; }
    .paywall-lock-overlay p {
      font-size: 0.85rem; color: var(--text);
      font-weight: 600; margin: 0;
    }
    .paywall-lock-overlay small {
      font-size: 0.75rem; color: var(--text-muted);
    }
    .feature-locked { position: relative; }

    /* ── ONBOARDING ── */
    #onboarding-overlay.active { display: flex !important; }
    #onboarding-spotlight {
      position: fixed;
      z-index: 9001;
      border-radius: 12px;
      box-shadow: 0 0 0 9999px rgba(15,17,23,0.82);
      outline: 2px solid var(--accent);
      outline-offset: 3px;
      pointer-events: none;
      transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease;
    }
    #onboarding-tooltip {
      position: fixed;
      z-index: 9002;
      background: var(--surface);
      border: 1.5px solid var(--accent);
      border-radius: 14px;
      padding: 20px 22px 16px;
      width: 300px;
      box-shadow: 0 8px 32px rgba(36,64,142,0.28);
      pointer-events: all;
    }
    .onboarding-dots { display: flex; gap: 5px; }
    .onboarding-dot {
      width: 7px; height: 7px;
      border-radius: 50%;
      background: var(--border);
      transition: background 0.2s;
    }
    .onboarding-dot.active { background: var(--accent); }
    .btn-ob-skip {
      background: none; border: none;
      color: var(--text-muted); font-size: 0.8rem;
      cursor: pointer; padding: 4px 6px;
    }
    .btn-ob-skip:hover { color: var(--text); }
    .btn-ob-next {
      background: var(--accent); border: none;
      color: #fff; font-size: 0.875rem; font-weight: 600;
      cursor: pointer; padding: 8px 16px;
      border-radius: 8px; transition: opacity 0.2s;
    }
    .btn-ob-next:hover { opacity: 0.85; }

/* ══ VISUAL ENHANCEMENTS ══ */

/* Tab fade-in */
.tab-panel.active { animation: tabFadeIn 0.35s ease-out; }
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

#hero-section > * { position: relative; z-index: 1; }

    /* ══ ACCUEIL, direction C (phase 2) ══ */
    .acc-ouverture { padding: 24px 0 40px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
    .acc-ouverture h2 { font-family: var(--f-titre); font-weight: 800; font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); line-height: 1.06; letter-spacing: -0.02em; max-width: 16ch; }
    .acc-chapo { margin-top: 16px; max-width: 46ch; font-size: 1.12rem; line-height: 1.55; color: var(--text-muted); }
    .acc-ouverture .btn { margin-top: 26px; min-height: 48px; padding: 12px 28px; }
    .acc-rassurance { margin-top: 12px; font-size: 0.85rem; color: var(--text-muted); }

    .acc-section { padding: 36px 0; border-bottom: 1px solid var(--border); }
    .acc-section h3 { font-family: var(--f-titre); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.01em; }
    .acc-etapes { list-style: none; counter-reset: etape; margin-top: 22px; display: grid; gap: 22px; }
    @media (min-width: 760px) { .acc-etapes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; } }
    .acc-etapes li { counter-increment: etape; padding-top: 14px; border-top: 2px solid var(--text); color: var(--text-muted); line-height: 1.55; }
    .acc-etapes li::before { content: counter(etape); display: block; font-family: var(--f-titre); font-weight: 800; font-size: 2rem; line-height: 1; color: var(--accent); margin-bottom: 10px; }
    .acc-etapes strong { display: block; color: var(--text); margin-bottom: 4px; }

    .acc-risques { margin-top: 18px; display: grid; gap: 16px; }
    @media (min-width: 760px) { .acc-risques { grid-template-columns: 1fr 1fr; } }
    .acc-risques div { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; }
    .acc-risques dt { font-weight: 700; }
    .acc-risques dd { margin-top: 6px; color: var(--text-muted); line-height: 1.55; }

    .acc-faq { margin-top: 14px; display: flex; flex-direction: column; }
    .acc-fin { padding: 40px 0 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
    .acc-fin p { font-family: var(--f-titre); font-weight: 600; font-size: 1.25rem; }
    .acc-fin .btn { margin-top: 0; }
    .acc-recommander { margin: 8px 0; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
    .acc-recommander p { flex: 1 1 260px; color: var(--text-muted); }
    .acc-recommander strong { color: var(--text); }
    .acc-bouton-discret { background: transparent; border: 1.5px solid var(--border); color: var(--text); min-height: 44px; padding: 8px 18px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 8px; }
    .acc-bouton-discret:hover { border-color: var(--text); }

    /* ══ CALCULATEUR, direction C (phase 3) ══ */
    .card h2 .icon { display: none; } /* plus d'emojis devant les titres de cartes */
    .calc-verdict { font-family: var(--f-titre); font-weight: 600; font-size: 1.3rem; line-height: 1.3; margin-top: 14px; max-width: 40ch; text-wrap: pretty; }
    .calc-zone-desc { margin-top: 6px; color: var(--text-muted); font-size: 0.95rem; }
    .jauge-piste { position: relative; height: 12px; border-radius: 999px; background: var(--surface2); overflow: hidden; }
    .jauge-remplissage { height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.85s cubic-bezier(0.22, 1, 0.36, 1); }
    .jauge-remplissage.zone-decision, .jauge-remplissage.zone-execution { background: var(--red-orange); }
    .jauge-repere { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: color-mix(in oklch, var(--bg) 70%, transparent); }
    .jauge-repere--seuil { width: 2px; background: var(--text); opacity: 0.55; }
    @media (prefers-reduced-motion: reduce) { .jauge-remplissage, #segbar-cursor { transition: none !important; } }
    .calc-detail { margin-top: 6px; }
    .calc-detail summary { cursor: pointer; color: var(--accent2); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
    .btn-secondaire { background: transparent; border: 1.5px solid var(--border); color: var(--text); border-radius: 999px; min-height: 40px; padding: 6px 16px; font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; }
    .btn-secondaire:hover { border-color: var(--text); }
    .zone-pill { font-family: var(--f-texte); }

    /* ══ PROJECTION, SIMULATION (phase 4) ══ */
    .vide { padding: 48px 8px; text-align: left; max-width: 46ch; }
    .vide p { color: var(--text-muted); font-size: 1.05rem; line-height: 1.55; }
    .vide .btn { margin-top: 18px; }

    /* ══ CONTENUS (phase 6) : catégories neutres, la couleur reste réservée aux zones ══ */
    .blog-badge, .tuto-badge { background: var(--surface2); color: var(--text-muted); }
    .tuto-card-strip { display: none; }
    /* Les articles de data/articles.js portent des encadrés en ligne à liseré gauche : on les rend en aplat. */
    #modal-body [style*="border-left"] { border-left: 0 !important; border-radius: 12px !important; color: var(--text) !important; }
