/* Contenu de documentation rendu par DocRenderer (pages publiques et aperçu admin). */
.doc-content { font-size: 1rem; line-height: 1.75; color: var(--text); max-width: 760px; }
.doc-content > *:first-child { margin-top: 0; }
.doc-content p { margin: 0 0 1rem; }
.doc-content ul, .doc-content ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.doc-content li { margin: .25rem 0; }
.doc-content li > p { margin: 0; }
.doc-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.doc-content blockquote { margin: 0 0 1rem; padding: .2rem 0 .2rem 1rem; border-left: 3px solid var(--border); color: var(--muted); }
.doc-content mark { background: var(--yellow-soft); color: inherit; padding: 0 .15em; border-radius: 3px; }
.doc-content a.doc-external::after { content: "↗"; font-size: .75em; margin-left: .15em; }
.doc-content code { font-size: .86em; }

/* Titres et ancres */
.doc-heading { position: relative; scroll-margin-top: 90px; margin: 2.2rem 0 .8rem; }
h2.doc-heading { font-size: 1.45rem; padding-top: .4rem; }
h3.doc-heading { font-size: 1.15rem; }
h4.doc-heading { font-size: 1rem; }
.doc-anchor { margin-left: .4rem; color: var(--muted); opacity: 0; font-weight: 400; text-decoration: none; }
.doc-heading:hover .doc-anchor, .doc-anchor:focus { opacity: 1; }

/* Code */
.doc-code { margin: 0 0 1.2rem; border-radius: 12px; overflow: hidden; background: #0F1110; border: 1px solid #1E201F; }
.doc-code-head { display: flex; justify-content: space-between; align-items: center; padding: .4rem .5rem .4rem .9rem; background: #171918; border-bottom: 1px solid #232524; min-height: 2.2rem; }
.doc-code-label { font-size: .76rem; color: #A3A7A2; font-family: ui-monospace, monospace; }
.doc-copy { font-size: .75rem; color: #D4D6D2; background: transparent; border: 1px solid #2E302F; border-radius: 6px; padding: .2rem .6rem; cursor: pointer; }
.doc-copy:hover { color: #fff; border-color: #555; }
.doc-copy.is-done { color: var(--green); border-color: var(--green); }
.doc-code pre { margin: 0; padding: 1rem 1.1rem; overflow-x: auto; }
.doc-code pre code { background: none; border: none; padding: 0; color: #E8EAE6; font-size: .86rem; line-height: 1.6; white-space: pre; }

/* Onglets de code */
.doc-codegroup { margin: 0 0 1.2rem; }
.doc-codegroup .doc-code { margin: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.doc-tabs { display: flex; gap: .2rem; overflow-x: auto; background: #171918; border-radius: 12px 12px 0 0; padding: .35rem .35rem 0; border: 1px solid #1E201F; border-bottom: none; }
.doc-tab { background: transparent; border: none; color: #A3A7A2; font-size: .82rem; font-weight: 600; padding: .45rem .8rem; border-radius: 8px 8px 0 0; cursor: pointer; white-space: nowrap; }
.doc-tab:hover { color: #fff; }
.doc-tab.is-active { background: #0F1110; color: var(--yellow); }

/* Encadrés */
.doc-callout { margin: 0 0 1.2rem; padding: .9rem 1.1rem; border-radius: 12px; border: 1px solid var(--border); border-left-width: 4px; background: var(--surface); }
.doc-callout-title { font-weight: 700; margin: 0 0 .3rem; font-size: .92rem; }
.doc-callout-body > *:last-child { margin-bottom: 0; }
.doc-callout-info { border-left-color: var(--green); background: var(--green-soft); }
.doc-callout-success { border-left-color: var(--green-dark); background: var(--green-soft); }
.doc-callout-warning { border-left-color: var(--yellow); background: var(--yellow-soft); }
.doc-callout-danger { border-left-color: var(--red); background: var(--red-soft); }
.doc-callout-sandbox { border-left-color: var(--pink); background: var(--pink-soft); }

/* Étapes */
.doc-steps { list-style: none; counter-reset: doc-step; padding: 0 !important; margin: 0 0 1.5rem; }
.doc-step { position: relative; counter-increment: doc-step; padding: 0 0 1.4rem 2.8rem; margin: 0 !important; border-left: 2px solid var(--border); margin-left: 1rem !important; }
.doc-step:last-child { border-left-color: transparent; padding-bottom: .2rem; }
.doc-step::before { content: counter(doc-step); position: absolute; left: -1.05rem; top: -.1rem; width: 2rem; height: 2rem; border-radius: 999px; background: var(--black); color: var(--yellow); font-weight: 800; font-size: .9rem; display: flex; align-items: center; justify-content: center; }
.doc-step-title { font-family: var(--font-title); font-weight: 700; font-size: 1.05rem; margin: 0 0 .5rem; scroll-margin-top: 90px; }
.doc-step-body > *:last-child { margin-bottom: 0; }

/* Médias */
.doc-video, .doc-figure { margin: 0 0 1.4rem; }
.doc-video-frame { position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #000; }
.doc-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.doc-figure img { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); display: block; }
.doc-video figcaption, .doc-figure figcaption { font-size: .82rem; color: var(--muted); margin-top: .45rem; text-align: center; }

/* Tableaux */
.doc-table-wrap { overflow-x: auto; margin: 0 0 1.2rem; border: 1px solid var(--border); border-radius: 12px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.doc-table th, .doc-table td { padding: .6rem .8rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.doc-table th { background: var(--bg); font-weight: 700; font-size: .82rem; }
.doc-table tr:last-child td { border-bottom: none; }
.doc-table td > p, .doc-table th > p { margin: 0; }

@media (max-width: 640px) {
    .doc-content { font-size: .97rem; }
    .doc-step { padding-left: 2.2rem; }
}