/* ==========================================================================
   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-typeset {
    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-typeset h1,
.ndc-typeset h2,
.ndc-typeset h3,
.ndc-typeset h4,
.ndc-typeset h5,
.ndc-typeset h6 {
    font-family: inherit;
    color: rgba(0, 0, 0, 0.87);
    letter-spacing: -0.01em;
}

.ndc-typeset 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-typeset h2 {
    font-size: 1.25em;
    font-weight: 300;
    line-height: 1.4;
    margin: 1.6em 0 0.64em;
    letter-spacing: -0.01em;
}

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

.ndc-typeset 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-typeset > :first-child { margin-top: 0; }

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

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

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

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

/* Code inline */
.ndc-typeset 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-typeset pre {
    margin: 1em 0;
    padding: 0.7720528em 1.1764em;
    background-color: #f5f5f5;
    border-radius: 0.1em;
    overflow: auto;
    line-height: 1.4;
}
.ndc-typeset pre code {
    background: none;
    padding: 0;
    font-size: 0.85em;
    color: #36464e;
}

/* Touches clavier */
.ndc-typeset 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-typeset blockquote {
    margin: 1em 0;
    padding: 0 0 0 1em;
    border-left: 0.2rem solid #4051b5;
    color: rgba(0, 0, 0, 0.54);
}

/* Tables */
.ndc-typeset 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-typeset th,
.ndc-typeset td {
    padding: 0.9375em 1.25em;
    border-top: 0.05em solid rgba(0, 0, 0, 0.07);
    vertical-align: top;
}
.ndc-typeset th {
    font-weight: 700;
    background-color: #fcfcfc;
}

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

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

/* ==========================================================================
   Admonitions
   ========================================================================== */
.ndc-typeset .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-typeset .admonition > p {
    margin: 0.6em 0;
}
.ndc-typeset .admonition > ul,
.ndc-typeset .admonition > ol {
    margin: 0.6em 0;
}
.ndc-typeset .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-typeset .admonition.note {
    border-left-color: #448aff;
    background-color: rgba(68, 138, 255, 0.1);
}
.ndc-typeset .admonition.note > .admonition-title { background-color: rgba(68, 138, 255, 0.2); }

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

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

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

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