:root {
    --ink: #1d2a2e;
    --muted: #55656a;
    --line: #d3dbdd;
    --paper: #ffffff;
    --page: #f2f5f4;
    --accent: #1f5f5b;
    --accent-hover: #174845;
    --focus: #0b57d0;
  }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: var(--page);
    line-height: 1.5;
  }

  /* --- Page de démo (à supprimer dans votre site) --- */
  .demo { max-width: 40rem; margin: 0 auto; padding: 3rem 1.25rem 8rem; }
  .demo footer { margin-top: 3rem; font-size: .9rem; color: var(--muted); }
  .link-btn {
    background: none; border: 0; padding: 0; font: inherit;
    color: var(--accent); text-decoration: underline; cursor: pointer;
  }

  /* --- Bandeau --- */
  .consent-banner {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 1000;
    background: var(--paper);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .08);
    padding: 1.25rem;
    animation: slide-in .3s ease-out;
  }
  .consent-banner[hidden] { display: none; }

  .consent-inner {
    max-width: 62rem;
    margin: 0 auto;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .consent-text { flex: 1 1 26rem; max-width: 42rem; }
  .consent-text h2 { margin: 0 0 .25rem; font-size: 1.05rem; }
  .consent-text p { margin: 0; font-size: .92rem; color: var(--muted); }

  .consent-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

  .btn {
    font: inherit;
    font-size: .92rem;
    font-weight: 600;
    padding: .65rem 1.1rem;
    border-radius: 6px;
    border: 2px solid var(--accent);
    cursor: pointer;
    background: var(--accent);
    color: #fff;
  }
  .btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
  .btn-outline { background: transparent; color: var(--accent); }
  .btn-outline:hover { background: #e6efee; border-color: var(--accent); }

  :is(.btn, .link-btn, input):focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
  }

  /* --- Fenêtre de préférences --- */
  dialog.consent-dialog {
    width: min(34rem, calc(100% - 2rem));
    border: 0;
    border-radius: 10px;
    padding: 1.5rem;
    color: var(--ink);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  }
  dialog.consent-dialog::backdrop { background: rgba(20, 30, 32, .55); }
  .consent-dialog h2 { margin: 0 0 .5rem; font-size: 1.2rem; }
  .consent-dialog > p { margin: 0 0 1rem; color: var(--muted); font-size: .92rem; }

  .category {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: flex-start;
    padding: .9rem 0;
    border-top: 1px solid var(--line);
  }
  .category strong { display: block; }
  .category span { font-size: .88rem; color: var(--muted); }
  .category input[type="checkbox"] {
    width: 1.3rem; height: 1.3rem; margin-top: .2rem; accent-color: var(--accent);
    flex-shrink: 0;
  }
  .dialog-actions {
    display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap;
    margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line);
  }

  @keyframes slide-in {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  @media (prefers-reduced-motion: reduce) {
    .consent-banner { animation: none; }
  }
  @media (max-width: 600px) {
    .consent-actions { width: 100%; }
    .consent-actions .btn { flex: 1 1 100%; }
  }