/* Scope : seulement le rendu Jupyter (external renderer "jupyter") */
.markup.jupyter {
  /* Si vous trouvez que c’est trop intrusif, commentez ces deux lignes */
  background-color: #111111;
  color: #e0e0e0;
}

/* Typo de base pour le code */
.markup.jupyter pre,
.markup.jupyter code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
}

/* Bloc de code nbconvert (Pygments) */
.markup.jupyter .highlight {
  background-color: #1e1e1e;
  color: #d4d4d4;
  padding: 0.6em 0.8em;
  border-radius: 4px;
  overflow-x: auto;
  line-height: 1.4;
}

/* On enlève le fond blanc parfois hérité du thème global */
.markup.jupyter .highlight pre {
  background: transparent;
  margin: 0;
}

/* Commentaires */
.markup.jupyter .highlight .c,
.markup.jupyter .highlight .c1,
.markup.jupyter .highlight .ch,
.markup.jupyter .highlight .cm,
.markup.jupyter .highlight .cp,
.markup.jupyter .highlight .cpf,
.markup.jupyter .highlight .cs {
  color: #6a9955;           /* vert commentaires */
  font-style: italic;
}

/* Mots-clés (if, for, import, def, class, etc.) */
.markup.jupyter .highlight .k,
.markup.jupyter .highlight .kc,
.markup.jupyter .highlight .kd,
.markup.jupyter .highlight .kn,
.markup.jupyter .highlight .kp,
.markup.jupyter .highlight .kr,
.markup.jupyter .highlight .kt {
  color: #c586c0;           /* violet mots-clés */
  font-weight: normal;
}

/* Noms (identifiants, modules, attributs…) */
.markup.jupyter .highlight .n,
.markup.jupyter .highlight .na,
.markup.jupyter .highlight .nb,
.markup.jupyter .highlight .nc,
.markup.jupyter .highlight .no,
.markup.jupyter .highlight .nd,
.markup.jupyter .highlight .ni,
.markup.jupyter .highlight .ne,
.markup.jupyter .highlight .nf,
.markup.jupyter .highlight .nl,
.markup.jupyter .highlight .nn,
.markup.jupyter .highlight .nx {
  color: #d4d4d4;
}

/* Nombres */
.markup.jupyter .highlight .m,
.markup.jupyter .highlight .mb,
.markup.jupyter .highlight .mf,
.markup.jupyter .highlight .mh,
.markup.jupyter .highlight .mi,
.markup.jupyter .highlight .mo,
.markup.jupyter .highlight .il {
  color: #b5cea8;           /* vert pâle */
}

/* Chaînes */
.markup.jupyter .highlight .s,
.markup.jupyter .highlight .sa,
.markup.jupyter .highlight .sb,
.markup.jupyter .highlight .sc,
.markup.jupyter .highlight .sd,
.markup.jupyter .highlight .s1,
.markup.jupyter .highlight .s2,
.markup.jupyter .highlight .se,
.markup.jupyter .highlight .sh,
.markup.jupyter .highlight .si,
.markup.jupyter .highlight .sx,
.markup.jupyter .highlight .sr,
.markup.jupyter .highlight .ss,
.markup.jupyter .highlight .dl {
  color: #ce9178;           /* marron/rouge pour les chaînes */
}

/* Opérateurs (+, -, =, ==, etc.) */
.markup.jupyter .highlight .o,
.markup.jupyter .highlight .ow {
  color: #d4d4d4;
}

/* Ponctuation */
.markup.jupyter .highlight .p,
.markup.jupyter .highlight .pm {
  color: #d4d4d4;
}

/* Erreurs / choses "bizarres" */
.markup.jupyter .highlight .err {
  color: #ffffff;
  background-color: #e51400;
}

/* Espace blanc visible (rarement utile mais autant le rendre discret) */
.markup.jupyter .highlight .w {
  color: #666666;
}

/* Prompts In[ ] / Out[ ] */
.markup.jupyter .jp-InputPrompt,
.markup.jupyter .jp-OutputPrompt {
  color: #858585;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  padding-right: 0.5em;
}

/* Un peu d’air autour des cellules */
.markup.jupyter .jp-Notebook-cell {
  margin-bottom: 1.2em;
}

/* Texte Markdown rendu dans le notebook */
.markup.jupyter .jp-RenderedHTMLCommon.jp-RenderedMarkdown {
  color: #e0e0e0;
}

/* Tableaux HTML générés par pandas (classe .dataframe) */
.markup.jupyter table.dataframe {
  border-collapse: collapse;
  margin: 0.6em 0;
  width: 100%;
  background-color: #1b1b1b;
}

.markup.jupyter table.dataframe th,
.markup.jupyter table.dataframe td {
  border: 1px solid #333333;
  padding: 0.25em 0.5em;
}

.markup.jupyter table.dataframe thead th {
  background-color: #252526;
  color: #e0e0e0;
}

.markup.jupyter table.dataframe tbody tr:nth-child(2n) {
  background-color: #151515;
}
