/*
 * Graphite : papier pointé, très grands titres, presque monochrome ; le code
 * coloré comme l'éditeur Java d'Eclipse (thème clair par défaut), sur fond
 * blanc, et la sortie des programmes sur fond sombre.
 * Space Grotesk (titres) + Public Sans (texte) + Fira Code (code).
 *
 * The variables are read by base.css (slides) and sheet.css (TD sheets).
 *
 * prettify only knows kinds of words: annotations and numbers are both
 * "lit" (grey, as Eclipse's annotations), and fields or static calls, which
 * Eclipse shows in blue or in italics, stay black.
 */
/* Served with the site (static/theme/fonts/): no connection needed. */
@import url("../fonts/fonts.css");

:root {
  --bg: #fafafa;
  --fg: #2b3440;
  --muted: #687384;
  /* University blue, taken directly from the logo. */
  --heading: #171c8f;
  --accent: #171c8f;
  --accent-soft: #eceeff;
  --strong: #171c8f;
  --rule: #e3e3e3;
  --dots: #d6d6d6;
  --warn: #b4234f;
  --warn-soft: #fceef3;
  --mark: #e2e5ff;
  --mark-fg: #171c8f;

  --label-cours: #5b2a86;
  --label-td: #356b68;
  --label-td-soft: #edf4f3;
  --label-exam: #b4234f;

  /* Links use the same violet, with a light violet background on code. */
  --link: #171c8f;
  --link-soft: #eceeff;

  --font-body: "Public Sans", system-ui, sans-serif;
  --font-heading: "Space Grotesk", sans-serif;
  --font-mono: "Fira Code", ui-monospace, monospace;
  --size: 26px;
  --heading-weight: 700;
  --heading-tracking: -0.04em;
  --h1: 4.6em;
  --h2: 2em;

  /* Code: as in Eclipse, on white. */
  --code-bg: #ffffff;
  --code-fg: #000000;
  --code-border: #d9dadc;
  --code-size: 0.5em;
  --code-mark: #fde68a;
  --inline-code-bg: #ececee;
  --inline-code-fg: #1a222c;
  --tok-kwd: #7f0055;   /* mots-clés, en gras */
  --tok-typ: #000000;   /* types */
  --tok-str: #2a00ff;   /* chaînes */
  --tok-com: #3f7f5f;   /* commentaires */
  --tok-lit: #646464;   /* annotations (et nombres) */
  --tok-pun: #000000;
  --tok-fun: #000000;

  /* The output of a program: dark. */
  --console-bg: #18181b;
  --console-fg: #e4e4e7;
}

/* Dotted paper. */
body,
body.reveal-viewport {
  background-color: var(--bg);
  background-image: radial-gradient(var(--dots) 1px, transparent 1px);
  background-size: 22px 22px;
}

pre .kwd {
  font-weight: 600;
}

/* ------------------------------------------------------------- slides */

.theme-graphite .slides > section {
  padding-top: 38px;
}

.theme-graphite .slides > section > h2:first-child {
  margin-bottom: 0.7em;
  line-height: 1.02;
  text-wrap: balance;
}

.theme-graphite h1 {
  line-height: 0.95;
}

/* The violet pixel chevron before the title of the cover (as on the home
   pages; the image is at the root of the site, static/images/). */
.theme-graphite .slides > section:first-child > h1::before {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin: 0 0.12em 0 -0.12em;
  vertical-align: -0.12em;
  background: url("../../images/chevron.svg") center / contain no-repeat;
  image-rendering: pixelated;
}

/* A short rule under the cover title. */
.theme-graphite h1::after {
  content: "";
  display: block;
  width: 1.2em;
  height: 0.08em;
  margin-top: 0.25em;
  background: var(--accent);
}

/* The subtitle of a cover: large and dark enough to be read from the back
   of the room. */
.theme-graphite h1 + h2 {
  margin-top: 0.75em;
  font-family: var(--font-heading);
  font-size: 1.45em;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--fg);
}

/* The authors sign the cover, at its bottom left, names in full. */
.theme-graphite .slides > section:first-child .authorsList {
  position: absolute;
  left: 84px;
  bottom: 64px;
  margin: 0;
  font-size: 0.66em;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.theme-graphite .slides > section:first-child .authorsList::before {
  content: "Arnaud Carayol   ·   Carine Pivoteau   ·   Pablo Rotondo";
  white-space: pre;
}

/* Optional pixel-art mascot on a course cover. */
.theme-graphite .slides > section:first-child .cover-mascot {
  position: absolute;
  right: 72px;
  bottom: 72px;
  width: auto;
  height: 114px;
  max-height: none;
  margin: 0;
  image-rendering: pixelated;
}

/* On dotted paper, the boxes need a solid background. */
.theme-graphite blockquote {
  background: var(--accent-soft);
}
