/*
 * Deck-specific styles. reveal.js theme variables: https://revealjs.com/themes/
 * The slide is 1280x720 (16:9). reveal.js scales it to the projector (1080p).
 * Use px sizes, not vh: reveal.js scales the slide, so 1vh of the window is
 * not 1/100 of the slide height.
 * The README ("Layouts") shows how to use each class in Markdown.
 */

:root {
  --bluesky: #1185fe;
  --todo: #ffd43b;
  /* Part titles: amber, as a darkroom safelight. */
  --part-title: #ffa94d;
}

.reveal h1,
.reveal h2,
.reveal h3 {
  text-transform: none;
}

/* A part of the talk (Prise de vue, Développement…) starts with a slide that
   shows only its title, as `#` (h1). The other slides use `##` (h2). */
.reveal h1 {
  color: var(--part-title);
}

/* --- Slide frame ---------------------------------------------------------- */

/* index.html sets `center: false`, and each slide uses the full height.
   The title (a first `##`) is at the top, at the same place on each slide.
   The rest of the content is centered in the space under the title.
   A slide with class "centered" has no title at the top: all its content is
   centered, for example a section title alone. */
.reveal .slides section.present:not(.stack) {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  /* stretch, not center: a child with a width in % (an inline SVG diagram)
     needs the full width. text-align centers the text and the images. */
  align-items: stretch;
  height: 100%;
  padding: 40px;
  box-sizing: border-box;
}
.reveal .slides section:not(.centered) > h2:first-child:not(.top-left) {
  position: absolute;
  top: 40px;
  left: 0;
  right: 0;
  margin: 0;
}
.reveal .slides section:not(.centered):has(> h2:first-child:not(.top-left)) {
  padding-top: 140px;
}
.reveal .slides section > * {
  max-width: 100%;
}

/* Lists: no bullets, centered. Each item is a step (fragment). */
.reveal ul,
.reveal ol {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
/* The theme sets a bullet type on nested lists: remove it on each item. */
.reveal li {
  list-style: none;
}
.reveal ul ul,
.reveal ul ol {
  margin: 0;
  font-size: 0.9em;
}

/* Keep tall (portrait) phone videos inside the slide. */
.reveal video {
  max-height: 504px;
  max-width: 100%;
}

/* Images keep their ratio and stay inside the slide. */
.reveal img {
  max-height: 432px;
  object-fit: contain;
}

/* --- Links ---------------------------------------------------------------- */

/* External links get a small "opens elsewhere" arrow. Add class="no-icon" to remove it. */
.reveal a[href^='http']:not(.no-icon)::after {
  content: '';
  display: inline-block;
  width: 0.6em;
  height: 0.6em;
  margin-left: 0.15em;
  vertical-align: 0.35em;
  background-color: currentColor;
  -webkit-mask: var(--external-icon) center / contain no-repeat;
  mask: var(--external-icon) center / contain no-repeat;
  --external-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6'/%3E%3Cpath d='M20 4 10 14'/%3E%3Cpath d='M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E");
}

.reveal .bluesky,
.reveal .bluesky a {
  color: var(--bluesky);
}

/* Brand logo before a link: <a class="icon-instagram" href="…">@name</a>.
   Icons from Simple Icons (CC0): https://simpleicons.org */
.reveal .icon-instagram::before,
.reveal .icon-bluesky::before {
  content: '';
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 0.3em;
  vertical-align: -0.1em;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.reveal .icon-instagram::before {
  --icon: url('../assets/images/icons/instagram.svg');
}
.reveal .icon-bluesky::before {
  --icon: url('../assets/images/icons/bluesky.svg');
}

.reveal .small-link {
  font-size: 0.5em;
}

.reveal .huge {
  font-size: 2.2em;
}

/* --- Columns -------------------------------------------------------------- */

/* Two or more blocks side by side: <div class="columns"><div>…</div><div>…</div></div> */
.reveal .columns {
  width: 100%;
  display: flex;
  gap: 1em;
  align-items: center;
  justify-content: center;
}
.reveal .columns > * {
  flex: 1;
  min-width: 0;
}

/* Columns with a vertical line between them. */
.reveal .columns.split {
  align-items: stretch;
}
.reveal .columns.split > * + * {
  border-left: 2px solid rgba(255, 255, 255, 0.5);
  padding-left: 1em;
}
/* More space between the items, so that each step is easy to read. */
.reveal .columns.split li + li {
  margin-top: 0.7em;
}

/* Columns aligned at the top (an image, then the text under it). */
.reveal .columns.top {
  align-items: flex-start;
}
.reveal .columns.top img {
  height: 230px;
  width: 100%;
}

.reveal .caption {
  font-size: 0.5em;
  opacity: 0.7;
}

/* Small details under a column title, as the vocabulary definitions. */
.reveal .columns .detail {
  margin-top: 0.3em;
  font-size: 0.68em;
  opacity: 0.85;
}

/* --- Text ----------------------------------------------------------------- */

.reveal .small {
  font-size: 0.7em;
}

.reveal .big {
  font-size: 1.6em;
  font-weight: bold;
}

.reveal .left,
.reveal .left ul {
  text-align: left;
}
.reveal .left li + li {
  margin-top: 0.5em;
}

/* Visible marker for content that is not ready. */
.reveal .todo {
  color: var(--todo);
  border: 3px dashed var(--todo);
  padding: 0.5em 1em;
  display: inline-block;
}

/* Vocabulary slide: each term, then its definition under it. */
.reveal .vocabulary {
  font-size: 0.68em;
}
.reveal .vocabulary p {
  margin: 0;
}
.reveal .vocabulary .term {
  margin-top: 0.5em;
  font-weight: bold;
  font-size: 1.15em;
}
.reveal .vocabulary .definition {
  opacity: 0.85;
}

/* Two spectral sensitivity charts, one above the other, in the center. */
.reveal .sensitivity img {
  display: block;
  max-height: 310px;
  margin: 0.2em auto;
}

/* Small headings in the resources slide. */
.reveal .resources h3 {
  font-size: 0.8em;
  margin: 0.6em 0 0.2em;
  opacity: 0.8;
}
.reveal .resources ul {
  font-size: 0.75em;
  display: block;
}

/* --- Images over the slide ------------------------------------------------ */

/* An image above the slide content, in the center. With "fragment fade-in-then-out",
   it shows for one step, and the next step hides it. */
.reveal .overlay {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 90%;
  max-height: 90%;
  z-index: 10;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

/* Elements on top of each other. reveal.js "r-stack" puts all the children in
   the same place, in the center. */
.reveal .r-stack {
  width: 100%;
}
.reveal .r-stack img,
.reveal .r-stack svg,
.reveal .r-stack video {
  max-height: 518px;
  max-width: 100%;
}

/* --- Slide layouts -------------------------------------------------------- */

/* Photo on the left, text at the bottom right. Put the photo in the slide
   background, so that it fills the window height, also when the window is not
   16:9. The text goes in <div class="text">:
   <!-- .slide: class="photo-left" data-background-image="…" data-background-size="auto 100%" data-background-position="left center" --> */
.reveal section.photo-left .text {
  position: absolute;
  right: 40px;
  bottom: 40px;
  text-align: right;
}

/* Text in the top-left corner of the slide. */
.reveal .top-left {
  position: absolute;
  top: 40px;
  left: 40px;
  margin: 0;
  color: #fff;
}

/* Text at the bottom of the slide, out of the flow: it does not move the
   centered content. */
.reveal .bottom {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  margin: 0;
}

/* One sentence that fills the slide. */
.reveal .fill {
  font-weight: bold;
  line-height: 1.1;
  text-transform: uppercase;
}
