/* Aide du Karis CRM : page de présentation et manuel. Aucune dépendance, aucune requête externe.
   Palette du kit d'identité Karis Consulting ; charbon chaud = le fond du CRM (choix de Baron, le bleu nuit est écarté). */
@font-face { font-family: "Marcellus"; src: url("fonts/Marcellus-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jost"; src: url("fonts/Jost-variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --brass: #b8924a;          /* Laiton */
  --brass-ink: #6f531d;      /* Laiton très foncé : texte sur ivoire (6,4:1) */
  --coal: #100f0d;           /* Charbon : fond sombre et texte sur laiton (6,6:1) */
  --coal-2: #1d1b17;
  --ivory: #f6f1e7;          /* Ivoire */
  --sand: #e2dacb;           /* Sable */
  --ink: #1b1814;            /* texte sur ivoire (15:1) */
  --ink-soft: #4a4439;       /* texte secondaire sur ivoire (8,6:1) et sable (6,9:1) */
  --on-brass: #2a2114;       /* texte secondaire sur laiton (5,4:1) */
  --mute-dark: #bfb8aa;      /* texte secondaire sur charbon */
  --line: #cfc5b0;
  --serif: "Marcellus", "Iowan Old Style", Georgia, serif;
  --sans: "Jost", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --measure: 66ch;
  --ease: cubic-bezier(0.165, 0.84, 0.44, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 400 1.0625rem/1.62 var(--sans); }
img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible { outline-color: var(--brass); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -4rem; background: var(--coal); color: var(--ivory); padding: 0.75rem 1rem; z-index: 10; transition: top 160ms var(--ease); }
.skip:focus { top: 0.5rem; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -0.005em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { width: min(100% - 2 * var(--gutter), 72rem); margin-inline: auto; }

/* ---------- barre du haut ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; }
.top .logo { display: block; line-height: 0; }
.top .logo img, .top .logo-img { height: 5rem; width: auto; margin-left: -1.1rem; }
.lang { display: flex; gap: 0.25rem; }
.lang a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.85rem; text-decoration: none; font-weight: 500; border-radius: 3px; }
.lang a[aria-current="true"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
@media (hover: hover) { .lang a:not([aria-current]):hover { background: rgb(16 15 13 / 0.1); } }

/* ---------- accueil : le laiton ---------- */
.hero { background: var(--brass); color: var(--coal); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); padding-block: clamp(1.5rem, 5vw, 4rem) clamp(3rem, 8vw, 6.5rem); align-items: center; }
@media (min-width: 56rem) { .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.hero h1 { font-size: clamp(2.7rem, 7.4vw, 6rem); line-height: 1.02; }
.hero .lede { font-size: clamp(1.125rem, 2.2vw, 1.4rem); line-height: 1.5; max-width: 34ch; margin-top: clamp(1.25rem, 3vw, 2rem); color: var(--on-brass); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: clamp(1.75rem, 4vw, 2.75rem); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 1.6rem; font: 500 1.0625rem var(--sans); text-decoration: none; border: 2px solid var(--coal); border-radius: 3px; transition: background-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease); }
.btn:active { transform: scale(0.97); }
.btn-solid { background: var(--coal); color: var(--ivory); }
.btn-line { background: transparent; color: var(--coal); }
.on-dark .btn { border-color: var(--ivory); }
.on-dark .btn-solid { background: var(--ivory); color: var(--coal); }
.on-dark .btn-line { color: var(--ivory); }
@media (hover: hover) {
  .btn-solid:hover { background: var(--coal-2); }
  .btn-line:hover { background: var(--coal); color: var(--ivory); }
  .on-dark .btn-solid:hover { background: var(--sand); }
  .on-dark .btn-line:hover { background: var(--ivory); color: var(--coal); }
}
.hero-art { justify-self: center; width: min(100%, 26rem); }
.hero-art svg { display: block; width: 100%; height: auto; }
.hero-note { margin: 0; font-size: 0.9375rem; color: var(--on-brass); }
.bridge-art { overflow: visible; }

/* Un seul geste : les deux arches se tracent une fois. Sans animation si l'utilisateur la réduit. */
@media (prefers-reduced-motion: no-preference) {
  .arch { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1500ms var(--ease) 250ms forwards; }
  .arch + .arch { animation-delay: 900ms; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}

/* ---------- sections ---------- */
.band { padding-block: clamp(3.5rem, 9vw, 7rem); }
.band-sand { background: var(--sand); }
.band-coal { background: var(--coal); color: var(--ivory); }
.split { display: grid; gap: clamp(1.75rem, 4vw, 3.5rem); }
@media (min-width: 56rem) { .split { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } .split > .head { position: sticky; top: 2rem; align-self: start; } }
.head h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
.head p { color: var(--ink-soft); margin-top: 1rem; max-width: 30ch; }
.band-coal .head p { color: var(--mute-dark); }

/* Registre : une ligne par fonction, filets fins, pas de cartes. */
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.ledger li { display: grid; gap: 0.4rem 2rem; padding-block: 1.35rem; border-bottom: 1px solid var(--line); }
@media (min-width: 40rem) { .ledger li { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); } }
.ledger h3 { font-size: 1.5rem; }
.ledger p { margin: 0; color: var(--ink-soft); max-width: 52ch; }

/* Rôles : un vrai tableau */
.table-scroll { overflow-x: auto; }
table.roles { width: 100%; border-collapse: collapse; min-width: 28rem; }
.roles caption { text-align: left; font-family: var(--serif); font-size: 1.5rem; padding-bottom: 0.75rem; }
.roles th, .roles td { padding: 0.8rem 0.75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.roles thead th { font-weight: 500; border-bottom: 1px solid var(--ink); }
.roles tbody th { font-weight: 400; }
.roles td { text-align: center; width: 7.5rem; font-weight: 500; }
.roles thead th:not(:first-child) { text-align: center; }
.no { color: var(--ink-soft); font-weight: 400; }

/* À venir : pointillé, atténué, étiqueté */
.soon { display: grid; gap: 1rem; }
@media (min-width: 40rem) { .soon { grid-template-columns: 1fr 1fr; } }
.soon > div { border: 2px dashed var(--ink-soft); border-radius: 4px; padding: 1.6rem 1.5rem 1.4rem; }
.soon h3 { font-size: 1.75rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem 1rem; }
.tag { font: 500 0.8125rem var(--sans); border: 1px solid var(--ink); border-radius: 99px; padding: 0.15rem 0.7rem; letter-spacing: 0.02em; }
.soon p { margin: 0.9rem 0 0; color: var(--ink-soft); }
.soon .fine { font-size: 0.9375rem; }

/* Confiance : fond charbon */
.trust { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid rgb(246 241 231 / 0.35); }
.trust li { padding-block: 1.25rem; border-bottom: 1px solid rgb(246 241 231 / 0.18); max-width: 56ch; }
.trust strong { font: 400 1.4rem/1.2 var(--serif); display: block; margin-bottom: 0.3rem; }
.trust span { color: var(--mute-dark); }

/* Fin : accès */
.close { background: var(--brass); color: var(--coal); padding-block: clamp(3rem, 8vw, 5.5rem); }
.close h2 { font-size: clamp(2rem, 5vw, 3.6rem); max-width: 18ch; }
.close .small { color: var(--on-brass); margin: 1.25rem 0 0; max-width: 46ch; }
.foot { background: var(--coal); color: var(--mute-dark); padding-block: 1.5rem 2.5rem; font-size: 0.9375rem; border-top: 1px solid rgb(246 241 231 / 0.18); }
.foot p { margin: 0; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; }

/* ---------- manuel ---------- */
.doc-top { background: var(--coal); color: var(--ivory); }
.doc-top .top { padding-block: 0.8rem; }
.doc-top .top .logo img { height: 4.2rem; margin-left: -0.93rem; }
.doc-top .lang a { color: var(--ivory); }
.doc-top :focus-visible { outline-color: var(--brass); }
.doc-top .tools { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; justify-content: flex-end; }
.doc-top .tools a.home { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.85rem; }
@media (hover: hover) { .doc-top .lang a:not([aria-current]):hover { background: rgb(246 241 231 / 0.12); } }
.doc { display: grid; gap: 2rem; padding-block: clamp(1.5rem, 5vw, 3.5rem) clamp(3rem, 8vw, 6rem); }
@media (min-width: 60rem) { .doc { grid-template-columns: 17rem minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 5rem); } }
.toc { font-size: 0.9875rem; }
.toc-desktop { display: none; }
@media (min-width: 60rem) {
  .toc-desktop { display: block; position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow-y: auto; }
  .toc-mobile { display: none; }
}
.toc summary { min-height: 44px; display: flex; align-items: center; font: 500 1rem var(--sans); cursor: pointer; border: 1px solid var(--ink-soft); border-radius: 3px; padding: 0 1rem; }
.toc ol { list-style: none; margin: 0.75rem 0 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; }
.toc a { display: flex; gap: 0.7rem; align-items: baseline; padding: 0.55rem 0.5rem; text-decoration: none; border-radius: 3px; min-height: 44px; align-content: center; }
.toc a::before { content: counter(toc); font-family: var(--serif); color: var(--brass-ink); min-width: 1.4ch; }
.toc a[aria-current="page"] { background: var(--sand); font-weight: 500; }
.toc .admin-mark { color: var(--ink-soft); font-size: 0.875rem; }
@media (hover: hover) { .toc a:hover { background: var(--sand); } }
.toc-title { font: 400 1.1rem var(--serif); margin: 0 0 0.5rem; }

article { min-width: 0; }
article h1 { font-size: clamp(2.2rem, 5.4vw, 3.6rem); max-width: 18ch; }
article .intro { font-size: 1.2rem; line-height: 1.5; color: var(--ink-soft); max-width: 46ch; margin-top: 1.25rem; }
article h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 2.75rem 0 0.9rem; }
article h3 { font-size: 1.3rem; margin: 2rem 0 0.6rem; }
article p, article li { max-width: var(--measure); }
article ul { padding-left: 1.2rem; }
article li { margin-bottom: 0.45em; }
article li::marker { color: var(--brass-ink); }
article strong { font-weight: 600; }
article code { font: 500 0.95em var(--sans); background: var(--sand); padding: 0.1em 0.4em; border-radius: 3px; }
article a { color: var(--brass-ink); }
article hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.page-rule { width: 2.5rem; height: 3px; background: var(--brass); border: 0; margin: 1.5rem 0 0; }

ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 1.25rem 0; }
ol.steps > li { counter-increment: step; position: relative; padding: 0 0 0 3.2rem; margin-bottom: 1.15rem; min-height: 2.4rem; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: -0.15em; width: 2.3rem; height: 2.3rem; display: grid; place-items: center; font: 400 1.25rem var(--serif); border: 1px solid var(--brass-ink); color: var(--brass-ink); border-radius: 50%; }

.note { border: 1px solid var(--brass-ink); background: rgb(184 146 74 / 0.14); padding: 1rem 1.25rem; border-radius: 4px; margin: 1.5rem 0; max-width: var(--measure); }
.note > :last-child { margin-bottom: 0; }
.note-label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.note.admin { border-style: dashed; background: transparent; }

figure.capture { margin: 1.75rem 0; max-width: 46rem; border: 2px dashed var(--ink-soft); border-radius: 4px; min-height: 11rem; display: grid; place-content: center; text-align: center; padding: 1.5rem; gap: 0.4rem; background: rgb(226 218 203 / 0.45); }
figure.capture .capture-tag { margin: 0; font-weight: 600; max-width: none; }
figure.capture figcaption { color: var(--ink-soft); font-size: 0.9375rem; max-width: 40ch; }
figure.shot { margin: 1.75rem 0; max-width: 46rem; }
figure.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; }

.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
article table { border-collapse: collapse; width: 100%; min-width: 30rem; }
article th, article td { text-align: left; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
article thead th { border-bottom: 1px solid var(--ink); font-weight: 500; }
article td:not(:first-child), article thead th:not(:first-child) { text-align: center; }

.pager { display: grid; gap: 0.75rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
@media (min-width: 40rem) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a { display: block; padding: 0.9rem 1.1rem; border: 1px solid var(--ink-soft); border-radius: 3px; text-decoration: none; color: var(--ink); min-height: 44px; }
.pager a small { display: block; color: var(--ink-soft); }
.pager a span { font-family: var(--serif); font-size: 1.2rem; }
.pager .next { text-align: right; grid-column: 2; }
@media (max-width: 39.99rem) { .pager .next { grid-column: 1; text-align: left; } }
@media (hover: hover) { .pager a:hover { background: var(--sand); } }

.cards-index { list-style: none; padding: 0; margin: 2rem 0 0; border-top: 1px solid var(--ink); max-width: 46rem; }
.cards-index li { margin: 0; max-width: none; border-bottom: 1px solid var(--line); }
.cards-index a { display: grid; gap: 0.15rem 1.5rem; padding: 1.1rem 0.25rem; text-decoration: none; color: var(--ink); }
@media (min-width: 40rem) { .cards-index a { grid-template-columns: 2.5rem 1fr; } }
.cards-index .n { font: 400 1.4rem var(--serif); color: var(--brass-ink); grid-row: span 2; }
.cards-index .t { font: 400 1.35rem var(--serif); }
.cards-index .d { color: var(--ink-soft); }
@media (hover: hover) { .cards-index a:hover .t { text-decoration: underline; text-underline-offset: 0.2em; } }

/* Pied de page : liens touchables */
.foot a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 55.99rem) { .hero-art { width: min(62%, 20rem); justify-self: start; } }
.doc-top .top { flex-wrap: wrap; row-gap: 0; }
.doc-top .tools { flex-wrap: nowrap; margin-left: auto; }
@media (max-width: 34rem) { .doc-top .top { padding-block: 0.4rem 0.6rem; } .doc-top .tools { width: 100%; justify-content: space-between; } .doc-top .top .logo img { height: 3.4rem; margin-left: -0.75rem; } }

article tbody th { font-weight: 400; }
