/* ============================================================
   VisualPosiScreen LITE — Guide utilisateur
   Feuille de style commune (hors-ligne, sans dépendance)
   ============================================================ */

:root {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-alt: #eef2f6;
    --text: #1e2933;
    --text-soft: #566270;
    --border: #d5dde5;
    --accent: #1d6fb8;
    --accent-soft: #e7f1fa;
    --accent-strong: #14507f;
    --pro: #7a4bb8;
    --pro-soft: #f0e9fa;
    --lite: #1d8a5a;
    --lite-soft: #e4f5ec;
    --warn: #b5761b;
    --warn-soft: #fbf1df;
    --danger: #c0392b;
    --danger-soft: #fbe7e4;
    --code-bg: #1e2933;
    --code-text: #e6edf3;
    --radius: 8px;
    --maxw: 880px;
    --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: "Cascadia Code", "Consolas", "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #14191f;
        --surface: #1c232b;
        --surface-alt: #232c35;
        --text: #e6edf3;
        --text-soft: #9fb0bf;
        --border: #313c47;
        --accent: #4ea3e6;
        --accent-soft: #17303f;
        --accent-strong: #7cc0f0;
        --pro: #b58ce6;
        --pro-soft: #2a2140;
        --lite: #5cc896;
        --lite-soft: #16302a;
        --warn: #e0a63c;
        --warn-soft: #322813;
        --danger: #e8776a;
        --danger-soft: #331f1c;
        --code-bg: #0f151b;
        --code-text: #e6edf3;
    }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
}

.layout {
    display: flex;
    align-items: flex-start;
    max-width: 1240px;
    margin: 0 auto;
}

/* ---------- Barre latérale ---------- */
.sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    width: 270px;
    flex: 0 0 270px;
    height: 100vh;
    overflow-y: auto;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 24px 18px 40px;
}

.sidebar .brand {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    text-decoration: none;
    line-height: 1.3;
}

.sidebar .brand span {
    display: block;
    font-weight: 400;
    font-size: .8rem;
    color: var(--text-soft);
}

.sidebar .ver {
    margin: 10px 0 20px;
    font-size: .75rem;
    color: var(--text-soft);
}

.sidebar nav a {
    display: block;
    padding: 7px 12px;
    margin: 2px 0;
    border-radius: 6px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: .92rem;
}

.sidebar nav a:hover { background: var(--surface-alt); color: var(--text); }
.sidebar nav a.active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }

.sidebar nav .group {
    margin: 18px 0 4px;
    padding: 0 12px;
    font-size: .72rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-soft);
}

/* ---------- Contenu ---------- */
.content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 40px 48px 90px;
}

.content .inner { max-width: var(--maxw); margin: 0 auto; }

.breadcrumb {
    font-size: .8rem;
    color: var(--text-soft);
    margin-bottom: 8px;
}

h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin: .2em 0 .6em;
}

h2 {
    font-size: 1.35rem;
    margin: 2.2em 0 .7em;
    padding-bottom: .3em;
    border-bottom: 1px solid var(--border);
}

h3 { font-size: 1.08rem; margin: 1.6em 0 .5em; }

p { margin: .8em 0; }

a { color: var(--accent); }

ul, ol { padding-left: 1.4em; }
li { margin: .35em 0; }

code {
    font-family: var(--mono);
    font-size: .87em;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: .1em .4em;
}

pre {
    background: var(--code-bg);
    color: var(--code-text);
    border-radius: var(--radius);
    padding: 16px 18px;
    overflow-x: auto;
    font-size: .85rem;
    line-height: 1.5;
}

pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }

/* ---------- Bouton de téléchargement ---------- */
.btn-download {
    display: inline-flex;
    align-items: baseline;
    gap: .5em;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: .7em 1.2em;
    border-radius: var(--radius);
    margin: .6em 0 1.2em;
}

.btn-download:hover { background: var(--accent-strong); }
.btn-download .btn-sub { font-weight: 400; font-size: .82em; opacity: .85; }

kbd {
    font-family: var(--font);
    font-size: .8em;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: .1em .45em;
    white-space: nowrap;
}

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; margin: 1.2em 0; }

table {
    border-collapse: collapse;
    width: 100%;
    font-size: .9rem;
}

th, td {
    border: 1px solid var(--border);
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
}

th { background: var(--surface-alt); font-weight: 600; }
tbody tr:nth-child(even) td { background: var(--surface); }
tbody tr:nth-child(odd) td { background: var(--bg); }

/* ---------- Encadrés ---------- */
.callout {
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    background: var(--accent-soft);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin: 1.4em 0;
}

.callout.note   { border-left-color: var(--accent); background: var(--accent-soft); }
.callout.warn   { border-left-color: var(--warn);   background: var(--warn-soft); }
.callout.danger { border-left-color: var(--danger); background: var(--danger-soft); }
.callout.tip    { border-left-color: var(--lite);   background: var(--lite-soft); }

.callout .callout-title {
    font-weight: 700;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 4px;
    display: block;
}

.callout p:first-of-type { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* ---------- Badges LITE / PRO ---------- */
.badge {
    display: inline-block;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .15em .55em;
    border-radius: 999px;
    vertical-align: middle;
}

.badge.lite { background: var(--lite-soft); color: var(--lite); border: 1px solid var(--lite); }
.badge.pro  { background: var(--pro-soft);  color: var(--pro);  border: 1px solid var(--pro); }

tr.pro-row td:first-child { border-left: 3px solid var(--pro); }

/* ---------- Cartes ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin: 1.6em 0;
}

.card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    text-decoration: none;
    color: inherit;
}

.card:hover { border-color: var(--accent); }
.card h3 { margin: 0 0 6px; font-size: 1rem; color: var(--accent-strong); }
.card p { margin: 0; font-size: .85rem; color: var(--text-soft); }

/* ---------- Étapes ---------- */
ol.steps { counter-reset: step; list-style: none; padding-left: 0; }
ol.steps > li {
    position: relative;
    padding-left: 44px;
    margin: 1em 0;
}
ol.steps > li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0; top: 0;
    width: 30px; height: 30px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .9rem;
}

/* ---------- Pied de page / navigation ---------- */
.pager {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: .9rem;
}

.pager a { text-decoration: none; }
.pager .next { text-align: right; margin-left: auto; }
.pager span { display: block; font-size: .72rem; color: var(--text-soft); text-transform: uppercase; letter-spacing: .05em; }

footer.site {
    max-width: var(--maxw);
    margin: 40px auto 0;
    font-size: .8rem;
    color: var(--text-soft);
}

/* ---------- Menu mobile ---------- */
.topbar { display: none; }

@media (max-width: 900px) {
    .layout { flex-direction: column; }
    .sidebar {
        position: static;
        width: 100%;
        flex-basis: auto;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .content { padding: 28px 20px 70px; }
    .sidebar nav { columns: 2; }
}

.definition-list dt { font-weight: 600; margin-top: .8em; }
.definition-list dd { margin: .2em 0 .2em 0; color: var(--text-soft); }

.tag-legend { font-size: .82rem; color: var(--text-soft); }
