  /* 
     1. VARIABLES DE MARQUE : palette noir & blanc
      */
    :root {
      --ink: #2B2422;
      --ink-soft: #6F625D;
      --bg: #FFFDFB;
      --bg-alt: #F7F1ED;
      --line: #E8DED7;
      --line-strong: #2B2422;
      --white: #FFFFFF;
      --act1: #A0522D;
      --act2: #702963;
      --act1-text: #FFFFFF;
      --act2-text: #FFFFFF;


      --font-display: "Libre Baskerville", "Fraunces", serif;
      --font-body: "Manrope", "Work Sans", sans-serif;
      --font-mono: "IBM Plex Mono", monospace;

      --max-w: 760px;
      --sidebar-w: 264px;
      --motion: .18s ease;
    }

    [data-theme="dark"] {
      --ink: #F3EDE9;
      --ink-soft: #B9AAA3;
      --bg: #211917;
      --bg-alt: #302522;
      --line: #493A35;
      --line-strong: #F3EDE9;
      --white: #F3EDE9;
    }

    body.high-contrast {
      --ink-soft: var(--ink);
      --line: var(--line-strong);
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      background: var(--bg);
      color: var(--ink);
      font-family: var(--font-body);
      font-weight: 400;
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
      transition: background-color var(--motion), color var(--motion);
    }

    h1,
    h2,
    h3,
    h4 {
      font-family: var(--font-display);
      font-weight: 500;
      margin: 0;
      line-height: 180%;
      color: var(--ink);
    }

    h1 em {
      font-family: var(--font-body);
      font-weight: 300;
      font-style: normal;
    }

    h2 em {
      font-family: var(--font-body);
      font-weight: 300;
      font-style: normal;
      font-size: clamp(1.2rem, 3vw, 4.2rem);
    }

    em {
      font-family: var(--font-m);
      font-weight: 100;
    }

    p {
      margin: 0 0 1em;
      color: var(--ink-soft);
      max-width: 62ch;
    }

    a {
      color: var(--ink);
    }

    ::selection {
      background: var(--act2);
      color: #FFFFFF;
    }

    /* ---- Accessibilité clavier ---- */
    a:focus-visible,
    button:focus-visible,
    [tabindex]:focus-visible,
    input:focus-visible,
    select:focus-visible {
      outline: 2px solid var(--act1);
      outline-offset: 3px;
    }

    @media (prefers-reduced-motion: reduce) {
      html {
        scroll-behavior: auto;
      }

      * {
        animation: none !important;
        transition: none !important;
      }
    }

    /* 
     2. STRUCTURE : sidebar + contenu
      */
    .layout {
      display: flex;
      min-height: 100vh;
    }

    .sidebar {
      width: var(--sidebar-w);
      flex-shrink: 0;
      position: sticky;
      top: 0;
      align-self: flex-start;
      height: 100vh;
      padding: 2.2rem 1.6rem;
      border-right: 1px solid var(--line);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      background: var(--bg);
      transition: background-color var(--motion), border-color var(--motion);
    }

    .brand-mark {
      display: flex;
      align-items: center;
      gap: .6rem;
      margin-bottom: 2.4rem;
    }

    .brand-mark svg {
      width: 30px;
      height: 30px;
      flex-shrink: 0;
    }

    .brand-mark span {
      font-family: var(--font-display);
      font-size: 1.05rem;
      letter-spacing: .02em;
    }

    nav.toc ol {
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: .15rem;
    }

    nav.toc a {
      display: flex;
      gap: .7rem;
      align-items: baseline;
      text-decoration: none;
      color: var(--ink-soft);
      font-size: .92rem;
      padding: .5rem .5rem;
      border-radius: 3px;
      transition: color var(--motion), background-color var(--motion);
    }

    nav.toc a .num {
      font-family: var(--font-mono);
      font-size: .72rem;
      color: var(--ink-soft);
      min-width: 1.4em;
    }

    nav.toc a:hover {
      background: var(--bg-alt);
      color: var(--ink);
    }

    nav.toc a.active {
      color: var(--ink);
      background: var(--bg-alt);
      font-weight: 500;
    }

    nav.toc a.active .num {
      color: var(--act1);
    }

    .sidebar-foot {
      font-size: .78rem;
      color: var(--ink-soft);
    }

    .sidebar-foot a {
      color: var(--ink-soft);
    }

    main {
      flex: 1;
      min-width: 0;
    }

    /* ---- Barre d'outils flottante ---- */
    .toolbar {
      position: fixed;
      top: 1rem;
      right: 1rem;
      z-index: 45;
      display: flex;
      gap: .5rem;
    }

    .toolbar button,
    .menu-toggle {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      background: var(--ink);
      color: var(--bg);
      border: none;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: transform var(--motion);
    }

    .toolbar button:hover,
    .menu-toggle:hover {
      transform: scale(1.06);
    }

    .toolbar svg,
    .menu-toggle svg {
      width: 18px;
      height: 18px;
    }

    .menu-toggle {
      display: none;
      position: fixed;
      top: 1rem;
      left: 1rem;
      z-index: 45;
    }

    /* ---- Panneau de réglages ---- */
    .settings-panel {
      position: fixed;
      top: 0;
      right: 0;
      height: 100vh;
      width: 300px;
      max-width: 86vw;
      background: var(--bg);
      border-left: 1px solid var(--line);
      padding: 5rem 1.6rem 2rem;
      z-index: 44;
      transform: translateX(100%);
      transition: transform .25s ease;
      overflow-y: auto;
    }

    .settings-panel.open {
      transform: translateX(0);
    }

    .settings-panel h3 {
      font-size: 1.1rem;
      margin-bottom: 1.4rem;
    }

    .field {
      margin-bottom: 1.4rem;
    }

    .field label {
      display: block;
      font-size: .82rem;
      color: var(--ink-soft);
      margin-bottom: .4rem;
    }

    .field input[type="text"] {
      width: 100%;
      padding: .55rem .6rem;
      border: 1px solid var(--line);
      background: var(--bg);
      color: var(--ink);
      font-family: var(--font-body);
      font-size: .92rem;
    }

    .field input[type="color"] {
      width: 100%;
      height: 38px;
      border: 1px solid var(--line);
      padding: 2px;
      background: var(--bg);
      cursor: pointer;
    }

    .field.checkbox {
      display: flex;
      align-items: center;
      gap: .6rem;
    }

    .field.checkbox input {
      width: 16px;
      height: 16px;
    }

    .field.checkbox label {
      margin: 0;
      color: var(--ink);
      font-size: .88rem;
    }

    .settings-close {
      display: inline-flex;
      align-items: center;
      gap: .4rem;
      background: none;
      border: 1px solid var(--line);
      color: var(--ink);
      font-size: .82rem;
      padding: .5rem .8rem;
      cursor: pointer;
      margin-top: .4rem;
    }

    /* 
     3. COUVERTURE / HERO
      */
    .cover {
      min-height: 92vh;
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 4rem clamp(2rem, 6vw, 6rem);
      border-bottom: 1px solid var(--line);
    }

    .cover .eyebrow {
      font-family: var(--font-mono);
      font-size: .78rem;
      color: var(--ink-soft);
      margin-bottom: 1rem;
    }

    .cover h1 {
      font-size: clamp(3.2rem, 8vw, 7.2rem);
      line-height: 1.4;
      letter-spacing: -.01em;
      max-width: 14ch;
    }


    .cover .tagline {
      margin-top: 1.6rem;
      font-size: 1.25rem;
      color: var(--ink-soft);
      max-width: 46ch;
      font-family: var(--font-display);
      font-style: italic;
    }

    .cover .meta {
      margin-top: 3rem;
      display: flex;
      gap: 2.4rem;
      flex-wrap: wrap;
      font-size: .85rem;
      color: var(--ink-soft);
    }

    .cover .meta strong {
      display: block;
      color: var(--ink);
      font-size: 1rem;
      font-family: var(--font-display);
    }

    /* 
     4. SECTIONS
      */
    section.chapter {
      padding: 5.5rem clamp(2rem, 6vw, 6rem);
      border-bottom: 1px solid var(--line);
    }

    .chapter-head {
      display: flex;
      gap: 1.2rem;
      align-items: flex-start;
      margin-bottom: 2.6rem;
    }

    .chapter-head .index {
      font-family: var(--font-m);
      font-size: 3rem;
      line-height: 1;
      color: var(--act1);
      /* opacity: .4; */
    }

    .chapter-head h2 {
      font-size: clamp(1.8rem, 3vw, 2.4rem);
      line-height: 140%;
    }

    .chapter-head .desc {
      margin-top: .2rem;
    }

    .content {
      max-width: var(--max-w);
    }

    .grid-3 {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 1.6rem;
    }

    .grid-2 {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 1.6rem;
    }

    .card {
      border: 1px solid var(--line);
      padding: 1.4rem;
      background: var(--bg);
    }

    .card h4 {
      font-size: 1.02rem;
      margin-bottom: .5rem;
    }

    .card p {
      font-size: .92rem;
      margin-bottom: 0;
    }

    hr.rule {
      border: none;
      border-top: 1px solid var(--line);
      margin: 2.4rem 0;
    }

    /* ---- Voix / ton ---- */
    .voice-do-dont {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.2rem;
      margin-top: 1rem;
    }

    .voice-do-dont>div {
      padding: 1.2rem 1.4rem;
    }

    .voice-do-dont .do {
      border-left: 3px solid var(--ink);
    }

    .voice-do-dont .dont {
      border-left: 3px dashed var(--ink-soft);
    }

    .voice-do-dont h5 {
      margin: 0 0 .5rem;
      font-size: .8rem;
      color: var(--ink);
    }

    .voice-do-dont p {
      font-size: .92rem;
      margin: 0;
    }

    /* ---- Logo ---- */
    .logo-stage {
      /* background: var(--ink); */
      padding: 3.5rem 2rem;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 1.6rem;
    }

    .logo-stage.light {
      background: var(--bg-alt);
    }

    .logo-stage svg {
      height: 64px;
      width: auto;
    }

    .logo-variants {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1rem;
      margin-bottom: 2.4rem;
    }

    .logo-variants figure {
      margin: 0;
      border: 1px solid var(--line);
    }

    .logo-variants .swatch-cell {
      height: 92px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .logo-variants figcaption {
      font-size: .78rem;
      text-align: center;
      padding: .5rem;
      color: var(--ink-soft);
      border-top: 1px solid var(--line);
    }

    .clearspace-demo {
      border: 1px dashed var(--ink-soft);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 2.2rem;
      margin: 1rem 0 0.4rem;
    }

    .dont-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1rem;
      margin-top: 1rem;
    }

    .dont-card {
      position: relative;
      border: 1px solid var(--line);
      background: var(--bg);
      height: 110px;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }

    .dont-card svg {
      height: 44px;
    }

    .dont-card::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(to top right, transparent calc(50% - 5px), var(--act2) calc(50% - 5px), var(--act2) calc(50% + 5px), transparent calc(50% + 5px));
      opacity: .65;
    }

    .dont-label {
      font-size: .76rem;
      text-align: center;
      margin-top: .5rem;
      color: var(--ink-soft);
    }

    /* ---- Couleurs ---- */
    .swatch-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1.2rem;
    }

    .swatch {
      border: 1px solid var(--line);
      background: var(--bg);
      cursor: pointer;
      overflow: hidden;
      position: relative;
    }

    .swatch .fill {
      height: 96px;
    }

    .swatch .info {
      padding: .7rem .8rem;
    }

    .swatch .info .name {
      font-size: .88rem;
      font-weight: 500;
    }

    .swatch .info .hex {
      font-family: var(--font-mono);
      font-size: .76rem;
      color: var(--ink-soft);
    }

    .swatch .info .contrast {
      font-size: .7rem;
      color: var(--ink-soft);
      margin-top: .35rem;
      display: flex;
      gap: .6rem;
      flex-wrap: wrap;
    }

    .swatch .info .contrast .ok {
      color: var(--ink);
      font-weight: 600;
    }

    .swatch .copied {
      position: absolute;
      inset: 0;
      background: rgba(43, 36, 34, .92);
      color: var(--white);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: .82rem;
      opacity: 0;
      pointer-events: none;
      transition: opacity .18s ease;
    }

    [data-theme="dark"] .swatch .copied {
      background: rgba(240, 240, 240, .92);
      color: #2B2422;
    }

    .swatch.copied-flag .copied {
      opacity: 1;
    }

    .action-demo {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
      margin: 1.2rem 0 2.4rem;
    }

    .btn {
      font-family: var(--font-body);
      font-size: .92rem;
      font-weight: 500;
      padding: .75rem 1.4rem;
      border: none;
      cursor: pointer;
    }

    .btn-primary {
      background: var(--act1);
      color: var(--act1-text);
      transition: background-color var(--motion), transform var(--motion), box-shadow var(--motion);
    }

    .btn-primary:hover {
      background: #874322;
      transform: translateY(-1px);
      box-shadow: 0 4px 14px rgba(160, 82, 45, .20);
    }

    .btn-secondary {
      background: var(--act2);
      color: var(--act2-text);
      transition: background-color var(--motion), transform var(--motion), box-shadow var(--motion);
    }

    .btn-secondary:hover {
      background: #5C2151;
      transform: translateY(-1px);
      box-shadow: 0 4px 14px rgba(112, 41, 99, .20);
    }

    .btn-ghost {
      background: transparent;
      color: var(--ink);
      border: 1px solid var(--line);
    }

    .ratio-bar {
      display: flex;
      height: 14px;
      margin-top: 2rem;
      border: 1px solid var(--line);
    }

    .ratio-bar span {
      display: block;
      height: 100%;
    }

    .ratio-legend {
      display: flex;
      gap: 1.6rem;
      margin-top: .8rem;
      font-size: .82rem;
      color: var(--ink-soft);
      flex-wrap: wrap;
    }

    .ratio-legend .dot {
      width: 9px;
      height: 9px;
      display: inline-block;
      margin-right: .4rem;
      border-radius: 50%;
    }

    /* ---- Typographie ---- */
    .type-specimen {
      border-top: 1px solid var(--line);
      padding: 1.6rem 0;
    }

    .type-specimen .label {
      font-family: var(--font-mono);
      font-size: .74rem;
      color: var(--ink-soft);
      margin-bottom: .6rem;
    }

    .type-specimen .sample-display {
      font-family: var(--font-display);
      font-size: 3.4rem;
      line-height: 1;
    }

    .type-specimen .sample-body {
      font-family: var(--font-body);
      font-size: 1.02rem;
      max-width: 58ch;
      color: var(--ink);
    }

    .scale-row {
      display: flex;
      align-items: baseline;
      gap: 1.2rem;
      padding: .7rem 0;
      border-top: 1px solid var(--line);
    }

    .scale-row .tag {
      font-family: var(--font-mono);
      font-size: .72rem;
      color: var(--ink-soft);
      width: 3.4rem;
      flex-shrink: 0;
    }

    .scale-row .sample {
      font-family: var(--font-display);
    }

    /* ---- Graphisme ---- */
    .icon-row {
      display: flex;
      gap: 1.4rem;
      flex-wrap: wrap;
      margin-top: 1rem;
    }

    .icon-row .icon-box {
      width: 68px;
      height: 68px;
      border: 1px solid var(--line);
      background: var(--bg);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--ink);
    }

    .photo-tiles {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1rem;
      margin-top: 1rem;
    }

    .photo-tiles .tile {
      aspect-ratio: 4/5;
      background: linear-gradient(160deg, #59443C 0%, #211917 70%);
      position: relative;
      overflow: hidden;
          background-size: cover;
          background-position: center;
    }

    .photo-tiles .tile::after {
      content: "";
      position: absolute;
      inset: 0;
      background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .12), transparent 55%);
    }

    /* ---- Applications ---- */
    .app-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.8rem;
      margin-top: 1.2rem;
    }

    .mock {
      background: var(--bg);
      border: 1px solid var(--line);
      padding: 1.6rem;
    }

    .mock-label {
      font-family: var(--font-mono);
      font-size: .72rem;
      color: var(--ink-soft);
      margin-bottom: 1rem;
    }

    .biz-card {
      background: var(--bg-alt);
      color: var(--ink);
      aspect-ratio: 1.75/1;
      padding: 1.4rem;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .biz-card .mark {
      display: flex;
      align-items: center;
      gap: .5rem;
    }

    .biz-card .mark svg {
      /* width: 22px; */
      height: 22px;
    }

    .biz-card .who {
      font-size: .82rem;
      opacity: .8;
    }

    .biz-card .who strong {
      display: block;
      font-family: var(--font-display);
      font-size: 1.05rem;
      opacity: 1;
    }

    .social-post .frame {
      aspect-ratio: 1/1;
      background: var(--ink);
      position: relative;
      display: flex;
      align-items: flex-end;
      padding: 1.2rem;
      background-image: none;
      background-size: cover;
      background-position: center;
    }

    .social-post .frame span {
      position: relative;
      color: var(--bg);
      font-family: var(--font-display);
      font-size: 1.3rem;
      max-width: 70%;
    }

    .letterhead {
      aspect-ratio: 1/1.35;
      padding: 1.6rem;
      display: flex;
      flex-direction: column;
    }

    .letterhead .top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      border-bottom: 1px solid var(--line);
      padding-bottom: .8rem;
    }

    .letterhead .top svg {
      /* width: 20px; */
      height: 24px;
    }

    .letterhead .lines {
      margin-top: 4.2rem;
      display: flex;
      flex-direction: column;
      gap: 3rem;
    }

    .letterhead .lines div {
      height: 3px;
      background: var(--line);
    }



    .letterhead .lines div:nth-child(5) {
      width: 70%;
    }

    .badge-tile {
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .badge-tile .badge {
      width: 92px;
      height: 92px;
      border-radius: 20px;
      background: var(--bg-alt);
      border: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .badge-tile .badge svg {
      /* width: 34px;
      height: 34px; */
    }

    /* ---- Ressources ---- */
    .resource-list {
      display: flex;
      flex-direction: column;
    }

    .resource-list .row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 1rem 0;
      border-top: 1px solid var(--line);
      font-size: .95rem;
    }

    .resource-list .row:last-child {
      border-bottom: 1px solid var(--line);
    }

    .resource-list .row .fmt {
      font-family: var(--font-mono);
      font-size: .76rem;
      color: var(--ink-soft);
    }

    footer.end {
      padding: 3rem clamp(2rem, 6vw, 6rem) 4rem;
      font-size: .85rem;
      color: var(--ink-soft);
    }

    /* 
     5. RESPONSIVE
      */
    @media (max-width: 900px) {
      .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 40;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 2px 0 24px rgba(43, 36, 34, .16);
      }

      .sidebar.open {
        transform: translateX(0);
      }

      .menu-toggle {
        display: flex;
      }

      .grid-3,
      .logo-variants,
      .dont-grid,
      .swatch-grid {
        grid-template-columns: repeat(2, 1fr);
      }

      .app-grid,
      .grid-2,
      .voice-do-dont,
      .photo-tiles {
        grid-template-columns: 1fr;
      }

      section.chapter {
        padding: 3.4rem 1.4rem;
      }

      .cover {
        padding: 3rem 1.4rem;
        min-height: 70vh;
      }
    }

    /* 
     6. IMPRESSION
      */
    @media print {

      .sidebar,
      .menu-toggle,
      .toolbar,
      .settings-panel {
        display: none;
      }

      .layout {
        display: block;
      }

      section.chapter {
        break-inside: avoid;
        padding: 1.4rem 0;
      }

      .cover {
        min-height: auto;
      }

      body {
        background: #FFFDFB;
        color: #2B2422;
      }
    }