/* Migrated from inline <style> — guide-restauration.css */
/* ── Design tokens — cream landing system ── */
    :root {
      --cream: #F7F5F0;
      --cream-dark: #EFECE4;
      --white: #FFFFFF;
      --dark: #1C1A14;
      --dark-2: #2D2A1E;
      --text: #1C1A14;
      --text-muted: #6B6560;
      --text-faint: #9B9590;
      --accent: #1B4FCC;
      --accent-hover: #1640A8;
      --accent-light: rgba(27,79,204,0.08);
      --green: #1B4FCC;
      --green-bg: rgba(27,79,204,0.08);
      --border: rgba(28,26,20,0.10);
      --border-strong: rgba(28,26,20,0.16);
      --shadow-sm: 0 1px 4px rgba(28,26,20,0.06);
      --shadow-md: 0 4px 20px rgba(28,26,20,0.09), 0 1px 4px rgba(28,26,20,0.04);
      --radius: 10px;
      --radius-md: 14px;
    }

    *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      font-family: 'DM Sans', system-ui, sans-serif;
      background: var(--cream);
      color: var(--text);
      line-height: 1.7;
      -webkit-font-smoothing: antialiased;
    }
    a { color: var(--accent); text-decoration: none; }
    a:hover { color: var(--accent-hover); text-decoration: underline; }
    h1, h2, h3 {
      font-family: 'Fraunces', Georgia, serif;
      line-height: 1.2;
      letter-spacing: -0.02em;
    }

    /* ── Skip to content ── */
    .skip-link {
      position: fixed;
      top: 8px;
      left: 8px;
      z-index: 10000;
      padding: 8px 16px;
      background: var(--dark);
      color: #fff;
      border-radius: var(--radius);
      font-size: 14px;
      font-weight: 600;
      text-decoration: none;
      transform: translateY(-200%);
      transition: transform 0.15s ease;
    }
    .skip-link:focus {
      transform: translateY(0);
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    /* ── Sticky header ── */
    .guide-header {
      position: sticky;
      top: 0;
      z-index: 100;
      background: rgba(247, 245, 240, 0.92);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
      box-shadow: var(--shadow-sm);
    }
    .guide-header-inner {
      max-width: 1060px;
      margin: 0 auto;
      padding: 0 24px;
      height: 64px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .nav-brand {
      font-family: 'Fraunces', serif;
      font-size: 22px;
      font-weight: 400;
      color: var(--text);
      text-decoration: none;
    }
    .nav-brand:hover { text-decoration: none; }
    .nav-brand em { font-style: italic; color: var(--accent); }

    .btn-pdf {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 9px 18px;
      background: var(--green);
      color: #fff;
      border: none;
      border-radius: var(--radius);
      font-family: 'DM Sans', sans-serif;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: opacity 0.2s, transform 0.1s;
      white-space: nowrap;
    }
    .btn-pdf:hover { opacity: 0.85; transform: translateY(-1px); }
    .btn-pdf:active { transform: translateY(0); }
    .btn-pdf:disabled { opacity: 0.6; cursor: wait; transform: none; }
    .btn-pdf svg { width: 16px; height: 16px; flex-shrink: 0; }

    /* ── Hero ── */
    .guide-hero {
      padding: 88px 24px 56px;
      max-width: 720px;
      margin: 0 auto;
      text-align: center;
    }
    .eyebrow {
      display: inline-block;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.10em;
      text-transform: uppercase;
      color: var(--green);
      margin-bottom: 16px;
    }
    .guide-hero h1 {
      font-size: clamp(32px, 5vw, 48px);
      font-weight: 400;
      margin-bottom: 20px;
      color: var(--text);
    }
    .guide-hero h1 em { font-style: italic; color: var(--accent); }
    .hero-sub {
      font-size: 18px;
      color: var(--text-muted);
      max-width: 580px;
      margin: 0 auto 24px;
      line-height: 1.65;
    }
    .read-time {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      color: var(--text-faint);
      background: var(--cream-dark);
      padding: 6px 14px;
      border-radius: 20px;
    }
    .read-time svg { flex-shrink: 0; }

    /* ── Two-column layout ── */
    .guide-layout {
      max-width: 1060px;
      margin: 0 auto;
      padding: 0 24px 96px;
      display: grid;
      grid-template-columns: 220px 1fr;
      gap: 56px;
      align-items: start;
    }

    /* ── TOC sidebar ── */
    .guide-toc {
      position: sticky;
      top: 80px;
    }
    .toc-label {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--text-faint);
      margin-bottom: 12px;
    }
    .toc-nav ol {
      list-style: none;
      border-left: 2px solid var(--border);
      padding-left: 16px;
    }
    .toc-nav li { margin-bottom: 4px; }
    .toc-nav a {
      font-size: 13px;
      color: var(--text-muted);
      display: block;
      padding: 4px 0;
      line-height: 1.45;
      transition: color 0.15s;
      text-decoration: none;
    }
    .toc-nav a:hover { color: var(--text); text-decoration: none; }
    .toc-nav a.toc-active {
      color: var(--accent);
      font-weight: 600;
    }
    .toc-toggle { display: none; }

    /* ── Article content ── */
    .guide-content {
      max-width: 720px;
      min-height: 400px;
    }
    .guide-content h2 {
      font-size: clamp(22px, 3vw, 28px);
      font-weight: 400;
      margin: 56px 0 20px;
      padding-top: 8px;
      color: var(--text);
    }
    .guide-content > h2:first-child { margin-top: 0; }
    .guide-content h3 {
      font-size: 18px;
      font-weight: 600;
      font-family: 'DM Sans', sans-serif;
      margin: 32px 0 12px;
      color: var(--text);
    }
    .guide-content p {
      font-size: 16px;
      line-height: 1.8;
      margin-bottom: 20px;
    }
    .guide-content ul,
    .guide-content ol {
      margin: 0 0 20px 24px;
      font-size: 16px;
      line-height: 1.8;
    }
    .guide-content li { margin-bottom: 8px; }
    .guide-content strong { font-weight: 600; }
    .guide-content em { font-style: italic; }
    .guide-content a { color: var(--accent); }
    .guide-content a:hover { color: var(--accent-hover); }
    .guide-content blockquote {
      border-left: 3px solid var(--green);
      margin: 28px 0;
      padding: 16px 20px;
      background: var(--green-bg);
      border-radius: 0 var(--radius) var(--radius) 0;
      font-size: 15px;
      color: var(--text-muted);
    }
    .guide-content blockquote p:last-child { margin-bottom: 0; }
    .guide-content hr {
      border: none;
      border-top: 1px solid var(--border);
      margin: 48px 0;
    }
    .guide-content table {
      width: 100%;
      border-collapse: collapse;
      margin: 20px 0 28px;
      font-size: 14px;
    }
    .guide-content th {
      background: var(--dark);
      color: #fff;
      padding: 10px 14px;
      text-align: left;
      font-weight: 600;
    }
    .guide-content td {
      padding: 10px 14px;
      border-bottom: 1px solid var(--border);
    }
    .guide-content tr:nth-child(even) td { background: rgba(28,26,20,0.03); }
    .guide-content code {
      font-family: 'Courier New', monospace;
      font-size: 14px;
      background: var(--cream-dark);
      padding: 2px 6px;
      border-radius: 4px;
    }

    /* ── Loading skeleton ── */
    .skeleton-block {
      height: 18px;
      background: linear-gradient(
        90deg,
        var(--cream-dark) 25%,
        #E3DFDA 50%,
        var(--cream-dark) 75%
      );
      background-size: 200% 100%;
      animation: shimmer 1.5s ease-in-out infinite;
      border-radius: 4px;
      margin-bottom: 14px;
    }
    .skeleton-block.sk-title { height: 30px; width: 65%; margin-bottom: 28px; }
    .skeleton-block.sk-short { width: 42%; }
    .skeleton-block.sk-medium { width: 78%; }
    .skeleton-block.sk-full { width: 100%; }
    .skeleton-block.sk-gap { margin-top: 44px; }
    @keyframes shimmer {
      0%   { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }
    .load-error {
      color: var(--text-muted);
      font-size: 15px;
      padding: 24px 0;
      line-height: 1.6;
    }

    /* ── Footer ── */
    .guide-footer {
      background: var(--dark);
      padding: 24px;
    }
    .guide-footer-inner {
      max-width: 720px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
    }
    .footer-brand {
      font-family: 'Fraunces', serif;
      font-size: 18px;
      color: #F7F5F0;
    }
    .footer-brand em { font-style: italic; color: rgba(247,245,240,0.45); }
    .footer-links {
      display: flex;
      gap: 16px;
      flex-wrap: wrap;
      align-items: center;
    }
    .footer-links a {
      font-size: 13px;
      color: rgba(247,245,240,0.50);
      text-decoration: none;
      transition: color 0.15s;
    }
    .footer-links a:hover { color: rgba(247,245,240,0.90); text-decoration: none; }
    .footer-copy { font-size: 12px; color: rgba(247,245,240,0.25); }

    /* ── Responsive — tablet / mobile ── */
    @media (max-width: 900px) {
      .guide-layout {
        grid-template-columns: 1fr;
        gap: 0;
      }
      .guide-toc {
        position: static;
        order: -1;
        margin-bottom: 32px;
      }
      .toc-label { display: none; }
      .toc-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 12px 16px;
        background: var(--cream-dark);
        border: 1px solid var(--border-strong);
        border-radius: var(--radius);
        font-family: 'DM Sans', sans-serif;
        font-size: 14px;
        font-weight: 600;
        color: var(--text);
        cursor: pointer;
        transition: background 0.15s;
      }
      .toc-toggle:hover { background: #E8E4DA; }
      .toc-toggle::after {
        content: '▾';
        font-size: 16px;
        transition: transform 0.2s;
        color: var(--text-muted);
      }
      .toc-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
      .toc-nav {
        display: none;
        padding: 12px 16px;
        background: var(--cream-dark);
        border: 1px solid var(--border-strong);
        border-top: none;
        border-radius: 0 0 var(--radius) var(--radius);
      }
      .toc-nav.toc-open { display: block; }
      .toc-nav ol { border-left: none; padding-left: 0; }
      .toc-nav a { padding: 6px 0; border-bottom: 1px solid var(--border); }
      .toc-nav li:last-child a { border-bottom: none; }
    }

    @media (max-width: 600px) {
      .guide-hero { padding: 48px 16px 40px; }
      .guide-layout { padding: 0 16px 64px; }
      .guide-header-inner { padding: 0 16px; }
      .btn-pdf span { display: none; }
      .guide-footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
    }

    /* ── Print — fallback to browser print ── */
    @media print {
      .guide-header, .guide-toc, .guide-footer { display: none !important; }
      .guide-layout { display: block; padding: 0; }
      .guide-content { max-width: 100%; }
      body { background: #fff; }
    }

    /* ── Focus / accessibility ── */
    :focus-visible {
      outline: 3px solid var(--accent);
      outline-offset: 3px;
      border-radius: 3px;
    }

    /* ═══════════════════════════════════════════════════════════
       VISUAL GUIDE COMPONENTS — DAF conseils, jauges, simulateurs
    ═══════════════════════════════════════════════════════════ */

    /* ── Conseil DAF block ── */
    .conseil-daf {
      display: flex;
      gap: 16px;
      align-items: flex-start;
      background: #FFFBF0;
      border: 1px solid rgba(212, 160, 23, 0.22);
      border-left: 4px solid #D4A017;
      border-radius: 0 12px 12px 0;
      padding: 20px 24px;
      margin: 28px 0;
    }
    .conseil-daf-icon {
      font-size: 22px;
      flex-shrink: 0;
      line-height: 1.3;
      margin-top: 1px;
    }
    .conseil-daf-body { flex: 1; }
    .conseil-daf-title {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.10em;
      text-transform: uppercase;
      color: #9A6F08;
      margin-bottom: 10px;
    }
    .conseil-daf p {
      font-size: 15px;
      color: var(--dark-2);
      line-height: 1.7;
      margin: 0 0 10px;
    }
    .conseil-daf p:last-child { margin: 0; }

    /* ── Formula box ── */
    .formula-box {
      background: var(--cream-dark);
      border: 1.5px solid var(--border-strong);
      border-radius: 12px;
      padding: 22px 28px;
      margin: 28px 0;
      text-align: center;
    }
    .formula-text {
      font-family: 'Courier New', 'Courier', monospace;
      font-size: 17px;
      font-weight: 700;
      color: var(--accent);
      letter-spacing: -0.01em;
      line-height: 1.4;
    }
    .formula-caption {
      font-size: 13px;
      color: var(--text-muted);
      margin-top: 10px;
      font-style: italic;
    }

    /* ── Ratio gauge ── */
    .ratio-gauge-wrapper {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 22px 24px;
      margin: 28px 0;
      box-shadow: var(--shadow-sm);
    }
    .ratio-gauge-title {
      font-size: 14px;
      font-weight: 600;
      color: var(--text);
      margin-bottom: 14px;
    }
    .ratio-gauge-bar {
      height: 26px;
      border-radius: 13px;
      overflow: hidden;
      display: flex;
    }
    .gauge-zone {
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 700;
      color: rgba(255,255,255,0.95);
      letter-spacing: 0.02em;
      text-shadow: 0 1px 3px rgba(0,0,0,0.22);
      white-space: nowrap;
      overflow: hidden;
    }
    .gauge-zone.green  { background: #1B4FCC; }
    .gauge-zone.orange { background: #D4770A; }
    .gauge-zone.red    { background: #B0332A; }
    .ratio-gauge-labels {
      display: flex;
      justify-content: space-between;
      margin-top: 8px;
      font-size: 12px;
      color: var(--text-muted);
    }

    /* ── Comparison table ── */
    .comparison-table-wrapper {
      overflow-x: auto;
      margin: 24px 0;
      border-radius: 12px;
      border: 1px solid var(--border);
      box-shadow: var(--shadow-sm);
    }
    .comparison-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 14px;
      min-width: 460px;
    }
    .comparison-table thead th {
      background: var(--dark);
      color: rgba(247,245,240,0.92);
      padding: 11px 16px;
      text-align: left;
      font-weight: 600;
      font-size: 13px;
      white-space: nowrap;
    }
    .comparison-table thead th:first-child { border-radius: 10px 0 0 0; }
    .comparison-table thead th:last-child  { border-radius: 0 10px 0 0; }
    .comparison-table tbody td {
      padding: 11px 16px;
      border-bottom: 1px solid var(--border);
      vertical-align: middle;
      line-height: 1.55;
    }
    .comparison-table tbody tr:last-child td { border-bottom: none; }
    .comparison-table tbody tr:hover td {
      background: rgba(27,79,204,0.04);
      transition: background 0.12s;
    }

    /* ── Sector badges ── */
    .badge-sector {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 20px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.04em;
      font-family: 'Courier New', monospace;
    }
    .badge-trad   { background: #EAF0FE; color: #1B4FCC; }
    .badge-rapide { background: #FEF3E2; color: #C35A00; }
    .badge-bar    { background: #F3E8FF; color: #6B21A8; }

    /* ── Euro equivalents callout ── */
    .euro-equiv {
      background: linear-gradient(135deg, #1644A0 0%, #1B4FCC 100%);
      color: rgba(255,255,255,0.95);
      border-radius: 14px;
      padding: 22px 28px;
      margin: 28px 0;
      font-size: 15px;
      line-height: 1.7;
    }
    .euro-equiv strong { font-weight: 700; color: #fff; }
    .euro-equiv .euro-big {
      font-family: 'Fraunces', Georgia, serif;
      font-size: 21px;
      font-weight: 400;
      display: block;
      margin-bottom: 10px;
      color: #fff;
      line-height: 1.35;
    }

    /* ── Simulators ── */
    .simulator {
      background: var(--white);
      border: 1.5px solid var(--border-strong);
      border-radius: 16px;
      padding: 28px;
      margin: 32px 0;
      box-shadow: var(--shadow-md);
    }
    .simulator-title {
      font-size: 17px;
      font-weight: 700;
      margin-bottom: 6px;
      color: var(--text);
    }
    .simulator-desc {
      font-size: 14px;
      color: var(--text-muted);
      margin-bottom: 22px;
      line-height: 1.55;
    }
    .sim-fields {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin-bottom: 20px;
    }
    .sim-fields.three-cols { grid-template-columns: 1fr 1fr 1fr; }
    .sim-field label {
      display: block;
      font-size: 12px;
      font-weight: 700;
      color: var(--text-muted);
      margin-bottom: 6px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }
    .sim-field input {
      width: 100%;
      padding: 11px 14px;
      border: 1.5px solid var(--border-strong);
      border-radius: 8px;
      font-family: 'DM Sans', sans-serif;
      font-size: 16px;
      font-weight: 600;
      background: var(--cream);
      color: var(--text);
      outline: none;
      transition: border-color 0.15s, box-shadow 0.15s;
      -moz-appearance: textfield;
    }
    .sim-field input::-webkit-outer-spin-button,
    .sim-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .sim-field input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(27,79,204,0.10);
    }
    .sim-result {
      background: var(--cream-dark);
      border-radius: 10px;
      padding: 18px 22px;
      display: flex;
      align-items: flex-start;
      gap: 20px;
      min-height: 72px;
    }
    .sim-result-left { flex-shrink: 0; }
    .sim-pct {
      font-size: 38px;
      font-weight: 700;
      font-family: 'Fraunces', Georgia, serif;
      line-height: 1;
      color: var(--text-faint);
      min-width: 92px;
    }
    .sim-pct.status-green  { color: #1B4FCC; }
    .sim-pct.status-orange { color: #D4770A; }
    .sim-pct.status-red    { color: #B0332A; }
    .sim-gauge-mini {
      width: 100%;
      height: 8px;
      background: var(--border);
      border-radius: 4px;
      overflow: hidden;
      margin-top: 10px;
    }
    .sim-gauge-fill {
      height: 100%;
      border-radius: 4px;
      transition: width 0.45s ease, background-color 0.45s ease;
      background: var(--text-faint);
    }
    .sim-result-text {
      flex: 1;
      font-size: 14px;
      color: var(--text-muted);
      line-height: 1.65;
      padding-top: 4px;
    }
    .sim-result-text strong { color: var(--text); }

    /* ── Steps list ── */
    .steps-list {
      list-style: none;
      padding: 0;
      margin: 28px 0;
    }
    .step-item {
      display: flex;
      gap: 16px;
      margin-bottom: 18px;
      align-items: flex-start;
    }
    .step-num {
      flex-shrink: 0;
      width: 32px;
      height: 32px;
      background: var(--accent);
      color: #fff;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 14px;
      margin-top: 1px;
    }
    .step-body { flex: 1; }
    .step-title {
      font-weight: 600;
      font-size: 15px;
      color: var(--text);
      margin-bottom: 4px;
    }
    .step-desc {
      font-size: 14px;
      color: var(--text-muted);
      line-height: 1.65;
    }

    /* ── Component responsive ── */
    @media (max-width: 600px) {
      .sim-fields,
      .sim-fields.three-cols { grid-template-columns: 1fr; }
      .sim-result { flex-direction: column; gap: 12px; }
      .sim-pct { min-width: auto; }
      .formula-text { font-size: 14px; }
      .euro-equiv .euro-big { font-size: 17px; }
      .conseil-daf { padding: 16px 18px; }
      .simulator { padding: 20px; }
    }
