/* ******************************
 * Fonts
 */

/* For titles */
@font-face {
	font-family: 'EB Garamond';
	src: url(template_fonts/EB_Garamond/static/EBGaramond-Regular.ttf) format('truetype');
	font-weight: normal;
	font-style: normal;
  }
  @font-face {
	font-family: 'EB Garamond';
	src: url(template_fonts/EB_Garamond/static/EBGaramond-Bold.ttf) format('truetype');
	font-weight: bold;
	font-style: normal;
  }
  @font-face {
	font-family: 'EB Garamond';
	src: url(template_fonts/EB_Garamond/static/EBGaramond-Italic.ttf) format('truetype');
	font-weight: normal;
	font-style: italic;
  }
  @font-face {
	font-family: 'EB Garamond';
	src: url(template_fonts/EB_Garamond/static/EBGaramond-BoldItalic.ttf) format('truetype');
	font-weight: bold;
	font-style: italic;
  }
  
  /* For articles */
  @font-face {
	font-family: 'Merriweather';
	src: url(template_fonts/Merriweather/Merriweather-Regular.ttf) format('truetype');
	font-weight: normal;
	font-style: normal;
  }
  @font-face {
	font-family: 'Merriweather';
	src: url(template_fonts/Merriweather/Merriweather-Bold.ttf) format('truetype');
	font-weight: bold;
	font-style: normal;
  }
  @font-face {
	font-family: 'Merriweather';
	src: url(template_fonts/Merriweather/Merriweather-Italic.ttf) format('truetype');
	font-weight: normal;
	font-style: italic;
  }
  @font-face {
	font-family: 'Merriweather';
	src: url(template_fonts/Merriweather/Merriweather-BoldItalic.ttf) format('truetype');
	font-weight: bold;
	font-style: italic;
  }
  /* 'Book Antigua is only an imitation of Palatino' (https://latex.org/forum/viewtopic.php?t=4943). */
  /*
  @font-face {
	font-family: 'Book Antiqua';
	src: url(template_fonts/Book_Antiqua/Book-Antiqua.ttf) format('truetype');
	font-weight: normal;
	font-style: normal;
  }
  @font-face {
	font-family: 'Book Antiqua';
	src: url(template_fonts/Book_Antiqua/Book-Antiqua-Bold.ttf) format('truetype');
	font-weight: bold;
	font-style: normal;
  }
  @font-face {
	font-family: 'Book Antiqua';
	src: url(template_fonts/Book_Antiqua/bookantiquaitalic.ttf) format('truetype');
	font-weight: normal;
	font-style: italic;
  }
  @font-face {
	font-family: 'Book Antiqua';
	src: url(template_fonts/Book_Antiqua/bookantiquabolditalic.ttf) format('truetype');
	font-weight: bold;
	font-style: italic;
  }
  */
  
  
  /* ******************************
   * General
   */
  
  :root {
	  --titles-lineheight: 1;
	  --main-element-width: 550px;
	  --lateral-menu-width: 250px;
	  --menu-and-links-color: #6a9fb5;
	  --table-thead-tr-color: #aacff5;
	  --text-color: #444;
	  --details-element-color: #f9f9f9;
  }
  
  html {
	  font-family: /*'Book Antiqua', */Merriweather, Verdana, serif;
	  font-size: 16px;
  }
  /* If 'Book Antiqua' */
  /* main p, main ul, main ol, main blockquote { font-size-adjust: 0.54; } */
  
  body, #header-menu-column, article, time, footer { margin: 0; padding: 0; }
  #header-menu-column { z-index: 10; }
  
  h1, h2, h3, h4, h5, h6 { font-family: 'EB Garamond', Georgia, serif; }
  
  /* Links to footnotes and footnotes (if any) */
  #footnotes { border-top: 1px dotted var(--text-color); }
  #footnotes li {
	text-align: left;
	text-align: justify;
	margin-left: 16px;
	font-size: 80%;
  }
  a[rel="footnote"] { font-weight: bolder; }
  a[rel="footnote"]:before { content: "("; }
  a[rel="footnote"]:after  { content: ")"; }
  
  /* Additional information on the article */
  .appendix-data {
	  color: var(--text-color);
	  margin: 0;
	  padding: 8px;
  }
  aside.appendix-data h2 { font-size: 20px; }
  aside.appendix-data p, aside.appendix-data div, aside.appendix-data a { font-size: 14px; }
  aside.appendix-data img { display: block; margin: auto; }
  
  
  
  /* ******************************
   * Main navigation bar: blog menu
   */
  
  #header-menu-column {
	  background: var(--menu-and-links-color);
	  position: relative;
	  width: 100%;
	  text-align: center;
	  padding: 30px 0 30px 0;
  }
  
  /* Responsive: if width greater than... */
  @media (min-width: 900px) {
	  #header-menu-column {
		  position: fixed;
		  top: 0;
		  bottom: 0;
		  left: 0;
		  width: var(--lateral-menu-width);
		  height: 100%;
	  }
  }
  
  #header-menu-column ul {
	  list-style-type: none;
	  margin: 0;
	  padding: 0;
  }
  
  #header-menu-column h1 {
	  font-size: 42px;
	  font-weight: normal;
	  margin: 0;
	  padding: 0;
	  line-height: 1;
  }
  #header-menu-column h2 {
	  font-size: 20px;
	  font-weight: normal;
	  color: #fff;
	  opacity: 50%;
	  margin: 0;
	  padding: 0;
  }
  
  /* Separates the main menu from the blog header */
  #header-menu-column header {
	  margin: 0 40px 35px 40px;
	  padding: 0;
  }
  
  #header-menu-column nav { line-height: 2.71; }
  #header-menu-column a, footer a { color: #fff; text-decoration: none; }
  #header-menu-column a:hover, #header-menu-column a:focus, footer a:hover, footer a:focus {
	  color: #fff;
	  text-decoration: underline;
  }
  #contact-and-social-network-icons { margin: 0; padding: 0; }
  #contact-and-social-network-icons svg, #contact-and-social-network-icons a {
	display: inline-block;
	text-align: center;
	vertical-align: middle;
	color: #fff;
	line-height: 35px;
	height: 18px;
  }
  #contact-and-social-network-icons svg path, #contact-and-social-network-icons svg g { fill: rgba(255, 255, 255, 0.84); }
  
  
  
  /* ******************************
   * Main content
   */

  .interlanguage-list { font-size: 75%; margin: 0; padding: 2px 0; vertical-align: middle; }
  .interlanguage-list svg { vertical-align: middle; margin: 0 4px 0 0; padding: 0; }
  .interlanguage-list ul { display: inline-block; list-style-type: none;  margin: 0; padding: 0;}
  .interlanguage-list a {
	  background: #fff;
	  color: var(--menu-and-links-color);
	  border: 1px solid var(--menu-and-links-color);
	  border-radius: 6px;
	  margin: 0;
	  padding: 3px 5px;
  }
  .interlanguage-list a:hover {
	  background: var(--menu-and-links-color);
	  color: var(--details-element-color);
	  text-decoration: none;
  }
  a.date-published:hover { text-decoration: none; }

  main {
	  background: #fff;
	  position: relative;
	  margin: 0;
	  padding: 0 35px 0 35px;
	  text-align: justify;
	  color: var(--text-color);
	  line-height: 1.5;
	  max-width: 550px;
  }
  
  /* Responsive: if width greater than... */
  @media (min-width: 900px) {
	  main {
		  top: 0;
		  bottom: 0;
		  left: var(--lateral-menu-width);
		  width: var(--main-element-width);
		  height: 100%;
	  }
  }
  
  main h1 {
	  font-size: 42px;
	  font-weight: normal;
	  line-height: var(--titles-lineheight);
	  text-align: center;
	  margin: 0;
	  padding: 20px 0;
  }
  main h2 {
	  border-left: 4px solid #ccc;
	  padding: 4px 0 4px 8px;
	  font-size: 28px;
	  line-height: var(--titles-lineheight);
  }
  main h3 {
	  margin-left: 24px;
	  font-weight: normal;
	  font-size: 28px;
	  line-height: var(--titles-lineheight);
	  border-bottom: 4px dotted #ccc;
  }
  main h4 {
	  margin-left: 36px;
	  font-weight: normal;
	  font-size: 24px;
	  line-height: var(--titles-lineheight);
	  border-bottom: 2px dotted #ccc;
  }
  
  main details.main-article-details {
	  margin: 20px;
	  padding: 10px;
	  border: 1px solid #aaa;
	  border-radius: 10px;
	  background: var(--details-element-color);
  }
  details.main-article-details h2 {
	  font-size: 18px;
	  margin: 0 0 6px 0;
	  padding: 0;
	  border: 0;
  }
  main details.main-article-details p, main details.main-article-details span, main details.main-article-details li, .publication-date-in-original-language { font-size: 80%; }
  details.main-article-details ul.tags li { font-size: 100%; }
  main summary { font-weight: bold; }
  main .article-date-inline, main time, .publication-date-in-original-language { color: #9a9a9a; }
  main .article-date-inline, main time { text-transform: capitalize; }
  main li > p { display: inline; }
  main #list-posts li { padding-bottom: 12px; }
  .publication-date-in-original-language { display: inline-block; border-top: 1px dotted #9a9a9a; padding-top: 2px; }
  
  main blockquote {
	  border-left: 4px solid #ccc;
	  padding: 1px 12px;
	  background: #f5f5f5;
  }

  main pre {
	white-space: break-spaces;
	padding: 12px;
	background:#f5f5f5;
	border-radius: 8px;
  }

  p code, li code {
	background: #effaff;
    color: var(--menu-and-links-color);
    padding: 3px;
    border-radius: 3px;
    margin-right: 0 3px 0 3px;
  }
  p code, pre { font-size: 0.9em; }
  
  main a {
	  color: var(--menu-and-links-color);
	  text-decoration: none;
  }
  main a:hover, main a:focus {
	  color: var(--menu-and-links-color);
	  text-decoration: underline;
  }
  
  main strong { color: #333; }

  main dfn {
	font-style: italic;
	text-decoration-line: underline;
	text-decoration-style: dotted;
  }
  
  main img.article-img {
	  display: block;
	  margin: auto;
  }
  
  main img {
	  max-width: 100%;
	  padding: 4px 0 4px 0;
  }
  
  /* Responsive: if width greater than... */
  @media (min-width: 900px) {
	  main img.article-img {
		  width: initial;
		  max-width: var(--main-element-width);
	  }
  }

  /* Tables (if any)
   * Adapted from: https://dev.to/dcodeyt/creating-beautiful-html-tables-with-css-428l
   */
  main table {
	border-radius: 8px;
	overflow: hidden;
    border-collapse: collapse;
    margin: 21px auto;
    font-family: sans-serif;
	min-width: 300px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
  }
  main table thead { background: var(--table-thead-tr-color); }
  main table th, main table td { padding: 4px 12px; }
  main table thead tr { background: var(--table-thead-tr-color); }
  main table tbody tr { border-bottom: 1px solid #ddd; }
  main table tbody tr:nth-of-type(even) { background: var(--details-element-color); }
  main table tbody tr:last-of-type { border-bottom: 2px solid var(--table-thead-tr-color); }
  
  /* Bibliography (if any) */
  li.csl-entry { margin-bottom: 12px; }
  
  /* Footer... */
  footer {
	  font-size: 80%;
	  text-transform: capitalize;
	  text-align: center;
	  border-top: 1px dotted var(--text-color);
	  color: var(--text-color);
  }
  footer ul { list-style-type: none; margin: 6px 0 6px 0; padding: 0; }
  footer ul > li { display: inline-block; }
  footer ul > li:last-child::after, footer ul > li::before { color: var(--text-color); content: ' • '; }
  
  
  
  /* *******************************************
   * Secondary navigation bar: table of contents
   * (For certain long pages)
   */
  
  #toc {
	  font-size: 80%;
	  background: var(--details-element-color);
	  border: 1px solid #aaa;
	  display: table;
	  margin: 0;
	  padding: 6px;
	  width: auto;
  }
  .toc-title {
	  line-height: 1;
	  margin: 0;
	  padding: 6px;
	  font-weight: bold;
	  text-align: center;
  }
  @media (min-width: 1200px) {
	  #toc {
		  min-width: var(--lateral-menu-width);
		  background: #fff;
		  border: 0;
		  display: inline-block;
		  position: fixed;
		  top: 42px;
		  left: calc(var(--main-element-width) + var(--lateral-menu-width) + 100px);
	  }
	  #toc li { padding-top: 6px; }
  }
  
  /* Nesting counters for sections and subsections */
  #toc ol { counter-reset: section; list-style-type: none; }
  #toc li::before { counter-increment: section; content: counters(section,".") " - "; }
  
  /* Indents the susections of the article in ToC */
  #toc ol { margin: 0; padding: 0 0 0 18px; }
  #toc_liste { margin: 0; padding: 0; }
  
  
  
  /* **********************************************
   * For article tags
   * Source: https://codepen.io/wbeeftink/pen/dIaDH
   */
  
  .tags {
	  margin: 0 0 14px 0;
	  padding: 0 0 10px 0;
	  font-family: arial;
  }
  
  .tags li {
	  list-style: none;
	  overflow: hidden;
	  float: left;
  }
  
  .tag {
	  background: #e5e5e5;
	  border-radius: 3px 0 0 3px;
	  color: var(--text-color);
	  display: inline-block;
	  height: 20px;
	  line-height: 20px;
	  position: relative;
	  margin: 0 7px 0 0;
	  padding: 0 17px 0 17px;
	  text-decoration: none;
	  -webkit-transition: color 0.2s; /* Chromium and Safari */
	  -moz-transition: color 0.2s;
	  -o-transition: color 0.2s;
	  transition: color 0.2s; /* Generic */
  }
  
  .tag::before {
	  background: var(--details-element-color);
	  border-radius: 10px;
	  box-shadow: inset 0 1px rgba(0, 0, 0, 0.25);
	  content: '';
	  height: 4px;
	  left: 7px;
	  position: absolute;
	  width: 4px;
	  top: 7px;
  }
  
  .tag::after {
	  background: var(--details-element-color);
	  border-bottom: 10px solid transparent;
	  border-left: 7px solid #e5e5e5;
	  border-top: 10px solid transparent;
	  content: '';
	  position: absolute;
	  right: 0;
	  top: 0;
  }
  
  .tag:hover, .tag:focus {
	  background-color: var(--menu-and-links-color);
	  color: #fff;
	  text-decoration: none;
  }
  
  .tag:hover::after, .tag:focus::after {
	  border-left-color: var(--menu-and-links-color);
  }

  .clear { clear: both; display: block; }
  
  
  
  /* **************************************
   * Corrections to print on paper properly
   */
  @media print
  {
	  /* Do not display nav */
	  #header-menu-column nav, footer nav {
		  display: none;
	  }
  
	  main { width: 100%; }
  
	  main img.article-img {
		  display: inline-block;
		  page-break-inside: avoid; /* Does not work with "display: block" in Firefox */
		  margin: 0 14px 0 14px;
		  max-width: 40%;
		  height: auto;
	  }
  
	  /* To save space on sheets */
	  main img.article-img:nth-child(even) {
		  float: left;
		  clear: left;
	  }
	  main img.article-img:nth-child(odd) {
		  float: right;
		  clear: right;
	  }
  }
  
