html, body {
  color: #222;
}

main {
  max-width: 34em;
  font-size: 20px;
}
@media only screen and (max-width: 400px) {
  main {
    font-size: 16px;
  }
}

main, footer, .nav-container {
  width: 85%;
}

.nav-container {
  width: 100%;
  max-width: 100%;
}

h1.nav-title {
  width: 100%;
  text-align: center;
  font-size: 36px;
}

/* Taken from https://webaim.org/techniques/css/invisiblecontent/ */
.invisible {
  position:absolute;
  left:-10000px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}

.post {
  padding: 0;
}

.post p {
  hyphens: auto;
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  -webkit-hyphens: auto;
}

.post-title {
  margin-top: 4rem;
  font-size: 2.5rem;
}

.post-line {
  margin-bottom: 1rem;
}

.post-info {
  margin-bottom: 2rem;
}

footer {
  color: #767676;
}

footer a {
  color: #1676ca;
}

a {
  color: #2a7ac1;
}

sup, sub {
  vertical-align: baseline;
  position: relative;
  top: -0.4em;
}
sub { 
  top: 0.4em; 
}

blockquote {
  color: #767676;
}

.post blockquote {
  font-size: 95%;
}
.post blockquote p {
  text-align: left;
  hyphens: none;
  -ms-hyphens: none;
  -moz-hyphens: none;
  -webkit-hyphens: none;
}

@media only screen and (min-width: 1024px) {
  .post h1 {
    margin-left: -5em;
    margin-right: -5em;
  }
}

.epigraphe {
  margin-bottom: 2em;
}

.epigraphe blockquote {
  border: none;
  width: 30em;
  margin-left: 15em;
  font-size: 85%;
}
@media only screen and (max-width: 400px) {
  .epigraphe blockquote {
    width: auto;
    margin-left: auto;
  }
}

nav .introduction {
  --post-it-width: 283px;
  --post-it-height: 257px;
}
nav .introduction a {
  display: block;
  position: absolute;
}

nav .introduction-first {
  margin-top: calc(var(--post-it-height) / 3);
  transition: margin-top 1s;
}
nav .introduction-first a span:after {
  display: block;
  position: absolute;
  content: "";
  background: no-repeat url(/furtifs/media/a-lire-avant.png);
  top: calc(0px - var(--post-it-height) / 3);
  left: 28rem;
  width: var(--post-it-width);
  margin:0;
  padding: 0;
  height: var(--post-it-height);
  z-index: 2;
  animation: fadein 1s, wiggle 10s infinite;
}
@media (prefers-reduced-motion: reduce) {
  animation: fadein 1s;
}
@keyframes wiggle {
    0% { transform: none; }
   10% { transform: none; }
   11% { transform: rotate(0deg); }
   13% { transform: rotate(2deg); }
   15% { transform: rotate(-2deg); }
   17% { transform: rotate(2deg); }
   19% { transform: rotate(-2deg); }
   21% { transform: rotate(0deg); }
   22% { transform: none; }
  100% { transform: none; }
}
@media only screen and (max-width: 860px) {
  nav .introduction-first {
    margin-top: calc(var(--post-it-height) * 0.8);
  }
  nav .introduction-first a span:after {
    left: 8rem;
    top: calc(0px - var(--post-it-height) * 0.8);
  }
}
@keyframes fadein {
    0% { opacity: 0; }
   50% { opacity: 0; }
  100% { opacity: 1; }
}
nav .introduction-first em {
  opacity: 0;
  animation: fadeout 1s;
}
@keyframes fadeout {
    0% { opacity: 1; }
   50% { opacity: 0; }
  100% { opacity: 0; }
}

nav ol ol {
  list-style-type: lower-latin;
}

nav .active > a {
  color: black;
}

figure.graph {
  width: 100%;
  margin: 2em 0;
}

figure.graph figcaption {
  margin-bottom: 4em;
}
figure.graph figcaption p {
  text-align: center;
  hyphens: none;
  -ms-hyphens: none;
  -moz-hyphens: none;
  -webkit-hyphens: none;
  font-weight: bold;
}

figure.meme {
  max-width: 450px;
  margin: 1em auto;
  padding: 1em 1em 1em 1em;
  background: hsl(213, 46%, 84%);
}
figure.meme img,
figure.meme video {
  border: none;
  width: 100%;
}
figure.meme figcaption {
  margin: 0.8em 0 0 0;
  padding: 0;
}
figure.meme a {
  color: #5b5b5b;
}
figure.meme figcaption p {
  margin: 0;
  padding: 0;
  text-align: center;
  hyphens: none;
  -ms-hyphens: none;
  -moz-hyphens: none;
  -webkit-hyphens: none;
  font-weight: normal;
  color: #767676;
}

code.language-XXX:before {
  content: "🔨 ";
}

code.language-XXX {
  white-space: pre-line;
  border: dashed #ccc 1px;
  background: hsl(0, 10%, 90%);
  padding: 0.2em;
  font-size: 14px;
  line-height: 1.1;
  display: block; 
}

.post blockquote code {
  background-color: inherit;
  color: inherit;
}

.ressource:before {
  content: "🔭 ";
  display: block;
  width: 3em;
  position: absolute;
  font-size: 300%;
  left: 0.2em;
}

.ressource {
  display: block;
  background-color: hsl(183, 46%, 84%);
  font-size: smaller;
  position: relative; 
  text-align: justify;
  hyphens: auto;
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  -webkit-hyphens: auto;
  left: 5em;
  padding: 1.2em 1em 0.2em 4em;
  width: 30em;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

.ressource a {
  color: #1666ad;
}

@media only screen and (max-width: 800px) {
  .ressource {
    left: 0px;
    width: auto;
  }
}

.warning:before {
  content: "⚠ ";
  display: block;
  width: 3em;
  position: absolute;
  font-size: 300%;
  left: 0.3em;
}

.warning {
  display: block;
  background-color: hsl(0, 70%, 50%);
  color: white;
  font-size: smaller;
  position: relative; 
  text-align: justify;
  hyphens: auto;
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  -webkit-hyphens: auto;
  margin: 1em -1em;
  padding: 1.5em 1em 0.5em 4.5em;
  margin-top: 2em;
  margin-bottom: 2em;
}

.warning a {
  color: white;
  text-decoration: underline;
}

.summary {
  margin: 2em;
  text-align: justify;
  hyphens: auto;
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  -webkit-hyphens: auto;
}

.reponse {
  background: hsl(153, 46%, 84%);
  margin: 1em -1em;
  padding: 0.5em 1em 0.1em 1em;
}

.reponse h2, .reponse h3 {
  text-align: center;
  font-size: 25px;
  margin-top: 0.2em;
}

.reponse blockquote {
  border-color: #555;
  color: #555;
}

.footnotes {
  font-size: 80%;
  hyphens: none;
  margin-bottom: 3rem;
}
.footnotes hr {
  height: 2px;
  background-image: linear-gradient(90deg, transparent, #e5e5e5 10%, #e5e5e5, #e5e5e5 90%, transparent);
  border: 0;
}

/* Taken from https://danielpost.com/articles/making-hugos-footnotes-accessible/
 */
@keyframes highlight {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.footnotes-ref {
 display: inline-block;
}

.footnotes li,
.footnote-ref {
  position: relative;
  z-index: 1;
}

.footnotes li::after,
.footnote-ref::after {
  position: absolute;
  z-index: -1;
  content: '';
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    -100deg,
    transparent,
    hsla(51, 92%, 75%, 0.3) 5%,
    hsla(51, 92%, 75%, 0.6) 95%,
    hsla(51, 92%, 75%, 0.0) 98%,
    transparent);
  opacity: 0;
}
.footnotes li::after {
  left: -2em;
  width: calc(100% + 2 * 2em);
}

.footnotes li:target::after,
.footnotes li:focus::after,
.footnote-ref:target::after,
.footnote-ref:focus::after {
  animation: highlight 2s cubic-bezier(0.3, 0, 1, 0.7);
}


@media only screen and (min-height: 512px) {
  .footnotes-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin-bottom: 0;
    background-color: #e5e5e5;
    background: linear-gradient(180deg, transparent, #e5e5e5 5%, #e5e5e5);
    padding-top: 1em;
    z-index: 10;
  }
  .footnotes-sticky ol {
    padding-left: 2em;
    padding-right: 1em;
  }
  .footnotes-sticky hr {
    display: none;
  }

  .footnotes-sticky li {
    display: none;
    max-width: 34em;
    margin-left: auto;
    margin-right: auto;
  }
  .footnotes-sticky li.observed {
    display: list-item;
  }
  .footnotes-sticky .observed .footnote-backref {
     display: none;
  }
}

.pagination {
  border-top: none;
  padding-bottom: 6rem;
}

.pagination a {
  line-height: 6rem;
  width: 5rem;
  font-size: x-large;
}
.pagination a.arrow:hover {
  background-color: #ddd;
}
