/* Documentation publique maguggen : CSS seul, aucune police ni ressource externe.
   Mode sombre automatique (réglage de l'appareil). Contrastes ≥ 4,5:1 (texte) et ≥ 3:1 (bordures utiles). */
:root {
  color-scheme: light dark;
  --bg: #ffffff; --bg2: #f3f5f8; --text: #1b1f24; --muted: #4a5360;
  --link: #0a4fb3; --link-visited: #5b2a9e; --border: #8a94a3; --soft: #d5dae2;
  --accent: #0a4fb3; --on-accent: #ffffff;
  --warn-bg: #fff4d6; --warn-bd: #8a5a00; --ok-bg: #e4f4e8; --ok-bd: #1e6b35; --info-bg: #e6eefb; --info-bd: #0a4fb3;
  --focus: #b3470a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c; --bg2: #1c2128; --text: #e9ecf1; --muted: #b4bcc8;
    --link: #8ab8ff; --link-visited: #c5a5ff; --border: #7b8594; --soft: #323a46;
    --accent: #8ab8ff; --on-accent: #0b1220;
    --warn-bg: #3a2e10; --warn-bd: #e0b04a; --ok-bg: #16301f; --ok-bd: #6fcf8a; --info-bg: #172338; --info-bd: #8ab8ff;
    --focus: #ffb27a;
  }
}
* { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.6;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: var(--link); text-underline-offset: .15em; }
a:visited { color: var(--link-visited); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--on-accent); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
.topbar { border-bottom: 1px solid var(--soft); background: var(--bg2); padding: .7rem 1rem; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; font-size: 1.1rem; }
.brand:visited { color: var(--text); }
.layout { max-width: 62rem; margin: 0 auto; padding: 1rem; display: block; }
main { min-width: 0; max-width: 42rem; }
h1 { font-size: 1.7rem; line-height: 1.25; margin: .4em 0 .6em; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 1.8em 0 .5em; padding-top: .3em; border-top: 1px solid var(--soft); }
h3 { font-size: 1.1rem; margin: 1.4em 0 .4em; }
.lead { font-size: 1.1rem; color: var(--muted); }
p, ul, ol, table { margin: .7em 0; }
li { margin: .3em 0; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--bg2); border: 1px solid var(--soft); border-radius: 4px; padding: 0 .3em; font-size: .92em; word-break: break-word; }
.guide-nav { background: var(--bg2); border: 1px solid var(--soft); border-radius: 8px; padding: .6rem 1rem; margin-bottom: 1rem; }
.guide-nav-title { font-weight: 700; margin: .2em 0; }
.guide-nav ol { margin: .2em 0; padding-left: 1.3rem; }
.guide-nav a[aria-current="page"] { color: var(--text); font-weight: 700; text-decoration: none; }
.cards { list-style: none; padding: 0; display: grid; gap: .8rem; }
.cards li { border: 1px solid var(--border); border-radius: 8px; padding: .8rem 1rem; background: var(--bg2); margin: 0; }
.cards a { font-size: 1.1rem; }
.cards span { display: block; color: var(--muted); }
.toc { padding-left: 1.3rem; }
.box { border-left: 5px solid var(--info-bd); background: var(--info-bg); padding: .6rem 1rem; border-radius: 4px; margin: 1em 0; }
.box > :first-child { margin-top: 0; } .box > :last-child { margin-bottom: 0; }
.box.warn { border-color: var(--warn-bd); background: var(--warn-bg); }
.box.ok { border-color: var(--ok-bd); background: var(--ok-bg); }
.box .box-title { font-weight: 700; display: block; }
.note { color: var(--muted); }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps > li { counter-increment: s; position: relative; padding-left: 2.6rem; margin: .9em 0; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: .05em; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-weight: 700; text-align: center; line-height: 1.9rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid var(--border); padding: .45rem .6rem; text-align: left; vertical-align: top; }
th { background: var(--bg2); }
.prevnext { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--soft); flex-wrap: wrap; }
.prevnext a { padding: .4rem 0; }
.foot { max-width: 62rem; margin: 2rem auto 0; padding: 1rem; border-top: 1px solid var(--soft); color: var(--muted); font-size: .9rem; }
@media (min-width: 60rem) {
  .layout:has(> .guide-nav) { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2.5rem; align-items: start; }
  .guide-nav { position: sticky; top: 1rem; margin: 0; }
}
.shot { margin: 1.4em 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--bg2); }
.shot.phone { max-width: 17rem; }
.shot.phones { max-width: 30rem; }
.shot figcaption { color: var(--muted); font-size: .92rem; margin-top: .4em; }
@media print { .topbar, .guide-nav, .prevnext, .skip { display: none; } body { background: #fff; color: #000; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
.tiles { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: 1.2em 0; }
.tile { display: flex; flex-direction: column; gap: .2rem; border: 1px solid var(--border); border-left: 6px solid var(--accent); border-radius: 10px; background: var(--bg2); padding: .8rem 1rem; }
.tile > span { color: var(--muted); font-size: .95rem; }

.demo-btn, .demo-btn:visited { display: inline-block; background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; padding: .5rem 1rem; border-radius: 8px; margin-right: .6rem; }
.demo-btn:hover { text-decoration: underline; }
.shot.phone + .shot.phone { margin-top: 1.4em; }
