/* ==========================================================================
   ndc-typeset.css
   Mimique du rendu MkDocs Material utilisé sur :
   https://nuitducode.forge.apps.education.fr/docs/
   Reproduit les styles de typographie, admonitions, kbd et highlights.
   ========================================================================== */

.ndc-markdown {
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.87);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-wrap: break-word;
}

/* Titres */
.ndc-markdown h1,
.ndc-markdown h2,
.ndc-markdown h3,
.ndc-markdown h4,
.ndc-markdown h5,
.ndc-markdown h6 {
    font-family: inherit;
    color: rgba(0, 0, 0, 0.87);
    letter-spacing: -0.01em;
}

.ndc-markdown h1 {
    font-size: 1.5625em;
    font-weight: 300;
    line-height: 1.3;
    margin: 0 0 1.25em;
    color: rgba(0, 0, 0, 0.54);
}

.ndc-markdown h2 {
    font-size: 1.25em;
    font-weight: 300;
    line-height: 1.4;
    margin: 1.6em 0 0.64em;
    letter-spacing: -0.01em;
}

.ndc-markdown h3 {
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    margin: 1.6em 0 0.8em;
    letter-spacing: -0.01em;
}

.ndc-markdown h4 {
    font-size: 0.875em;
    font-weight: 700;
    line-height: 1.4;
    margin: 1em 0 0.5em;
    letter-spacing: -0.01em;
}

/* Premier titre : pas de marge en haut */
.ndc-markdown > :first-child { margin-top: 0; }

/* Paragraphe */
.ndc-markdown p {
    margin: 0 0 1em;
}

/* Liens */
.ndc-markdown a {
    color: #4051b5;
    text-decoration: none;
    word-break: break-word;
}
.ndc-markdown a:hover {
    color: #526cfe;
    text-decoration: underline;
}

/* Listes */
.ndc-markdown ul,
.ndc-markdown ol {
    margin: 0 0 1em;
    padding-left: 1.25em;
}
.ndc-markdown ul ul,
.ndc-markdown ul ol,
.ndc-markdown ol ul,
.ndc-markdown ol ol {
    margin: 0.4em 0;
}
.ndc-markdown li {
    margin-bottom: 0.4em;
}
.ndc-markdown li:last-child { margin-bottom: 0; }

/* Mise en forme inline */
.ndc-markdown strong { font-weight: 700; }
.ndc-markdown em    { font-style: italic; }
.ndc-markdown u     { text-decoration: underline; }

/* Code inline */
.ndc-markdown code {
    font-family: "Roboto Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.85em;
    padding: 0 0.2941em;
    background-color: rgba(175, 184, 193, 0.2);
    border-radius: 0.1em;
    color: #36464e;
    word-break: break-word;
}

/* Bloc de code */
.ndc-markdown pre {
    margin: 1em 0;
    padding: 0.7720528em 1.1764em;
    background-color: #f5f5f5;
    border-radius: 0.1em;
    overflow: auto;
    line-height: 1.4;
}
.ndc-markdown pre code {
    background: none;
    padding: 0;
    font-size: 0.85em;
    color: #36464e;
}

/* Touches clavier */
.ndc-markdown kbd {
    font-feature-settings: "kern";
    font-family: "Roboto Mono", SFMono-Regular, Consolas, Menlo, monospace;
    background-color: #fafafa;
    border-radius: 0.1rem;
    box-shadow: 0 0.05rem 0 0.07rem #b8b8b8, 0 0.01rem 0 #b8b8b8, 0 -0.1rem 0.1rem #fff inset;
    color: #000000de;
    display: inline-block;
    font-size: .85em;
    padding: 0 4px;
    vertical-align: 1px;
    word-break: break-word;
    margin: 0 4px 0 4px;
}

/* Citation */
.ndc-markdown blockquote {
    margin: 1em 0;
    padding: 0 0 0 1em;
    border-left: 0.2rem solid #4051b5;
    color: rgba(0, 0, 0, 0.54);
}

/* Tables */
.ndc-markdown table {
    display: block;
    width: max-content;
    max-width: 100%;
    overflow: auto;
    border: 0.05em solid rgba(0, 0, 0, 0.07);
    border-radius: 0.1em;
    font-size: 0.85em;
    margin: 1em 0;
}
.ndc-markdown th,
.ndc-markdown td {
    padding: 0.9375em 1.25em;
    border-top: 0.05em solid rgba(0, 0, 0, 0.07);
    vertical-align: top;
}
.ndc-markdown th {
    font-weight: 700;
    background-color: #fcfcfc;
}

/* Image */
.ndc-markdown img {
    max-width: 100%;
    height: auto;
    border-radius: 0.1em;
}

/* Séparateur */
.ndc-markdown hr {
    border: 0;
    border-top: 0.05em dotted rgba(0, 0, 0, 0.26);
    margin: 1.5em 0;
}

/* ==========================================================================
   Admonitions
   ========================================================================== */
.ndc-markdown .admonition {
    margin: 1em 0 2em 0;
    padding: 1em;
    background-color: rgba(68, 138, 255, 0.1);
    border-left: 0.2rem solid #448aff;
    border-radius: 0.1em;
    font-size: 0.95em;
    page-break-inside: avoid;
    overflow: hidden;
}
.ndc-markdown .admonition > p {
    margin: 0.6em 0;
}
.ndc-markdown .admonition > ul,
.ndc-markdown .admonition > ol {
    margin: 0.6em 0;
}
.ndc-markdown .admonition-title {
    margin: 0em -0.6em !important;
    padding: 0.4em 0.6em;
    font-weight: 700;
    background-color: rgba(68, 138, 255, 0.2);
}

/* note (par défaut) — bleu */
.ndc-markdown .admonition.note {
    border-left-color: #448aff;
    background-color: rgba(68, 138, 255, 0.1);
}
.ndc-markdown .admonition.note > .admonition-title { background-color: rgba(68, 138, 255, 0.2); }

/* danger — rouge */
.ndc-markdown .admonition.danger {
    border-radius: 4px;
    border-left-color: #e74c3c;
    background-color: #e74c3c;
    color: white;
}
.ndc-markdown .admonition.danger > .admonition-title { background-color: rgba(255, 23, 68, 0.2); }

/* warning — orange */
.ndc-markdown .admonition.warning {
    border-left-color: #ff9100;
    background-color: rgba(255, 145, 0, 0.1);
}
.ndc-markdown .admonition.warning > .admonition-title { background-color: rgba(255, 145, 0, 0.2); }

/* tip / success — vert */
.ndc-markdown .admonition.tip,
.ndc-markdown .admonition.success {
    border-left-color: #00bfa5;
    background-color: rgba(0, 191, 165, 0.1);
}
.ndc-markdown .admonition.tip > .admonition-title,
.ndc-markdown .admonition.success > .admonition-title { background-color: rgba(0, 191, 165, 0.2); }

/* info / abstract — cyan */
.ndc-markdown .admonition.info,
.ndc-markdown .admonition.abstract {
    border-left-color: #00b8d4;
    background-color: rgba(0, 184, 212, 0.1);
}
.ndc-markdown .admonition.info > .admonition-title,
.ndc-markdown .admonition.abstract > .admonition-title { background-color: rgba(0, 184, 212, 0.2); }
