/* --------- Variables ---------- */

:root{
  --baseline: 17px;
  --main-color: #0040eb;
}

*{
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* -------  S T Y L E S    P R I N T ------- */

@media print{

  @page{
    /* taille de l'édition */
    size: A5;
    /* taille des fonds perdus*/
    bleed: 6mm; 
    marks: crop;
    /* titre courant */
/*    @top-left-corner{
      content: "votre nom";
      font-size: 8pt;
      text-align: left;
      padding-left: 0.5cm;
    }
    @top-center{
      content: "titre du mémoire";
      font-size: 8pt;
      text-align: left;
    }
    @top-right{
      content: string(title);
      font-size: 8pt;
      text-align: left;
    } */
    /* notes de bas de page */
    @footnote {
      border-top: 1px solid gray;
      float: bottom;
      padding-top: var(--baseline);
    }
  }

  /* design de la première page */
  @page :first {
    margin: 6mm;
    @top-left-corner {content: none;}
    @top-left {content: none;}
    @top-center {content: none;}
    @top-right {content: none;}
    @top-right-corner {content: none;}
    @left-top {content: none;}
    @left-middle {content: none;}
    @left-bottom {content: none;}
    @right-top {content: none;}
    @right-middle {content: none;}
    @right-bottom {content: none;}
    @bottom-left-corner {content: none;}
    @bottom-left {content: none;}
    @bottom-center {content: none;}
    @bottom-right {content: none;}
    @bottom-right-corner {content: none;}
  }

  /* marge de la page de gauche */
  @page :left {
    margin: 6mm 30mm 20mm 13mm; 
    @bottom-left{
      content: counter(page);
      font-size: 10pt;
      font-family: "Absans", sans-serif;
      text-align: left;
    } 
    @left-middle{
      font-family: "Absans", sans-serif;
      font-size: 8pt;
      content: string(title);
      writing-mode: vertical-lr;
      margin-bottom: 3mm;
      margin-left: 4mm;
    } 
  }

  /* marge de la page de droite */
  @page :right {
    margin: 6mm 13mm 20mm 30mm;
    @right-middle{
      font-family: "Absans", sans-serif;
      font-size: 8pt;
      content: string(title);
      writing-mode: vertical-lr;
      margin-top: 3mm;
      margin-left: 4mm;
    } 
    @bottom-right{
      content: counter(page);
      font-size: 10pt;
      font-family: "Absans", sans-serif;
      text-align: right;
    } 
  }
}


/* -------  S T Y L E S    G É N É R A U X ------- */

body{
  /* ajouter cette fonction pour activer l'imposition */
  --paged-layout : booklet;
  font-size: 11pt; 
  font-family: "Paragon", serif;
  line-height: 1.4;
  color: var(--main-color);
}

img{
  max-width: 100%;
}

h1{
  font-size: 34px;
  font-family: "Absans", sans-serif;
  margin: 0px;
  margin-bottom: 20px;
  font-weight: normal;
}

h2{
  font-size: 25px;
  font-family: "Absans", sans-serif;
  text-align: center;
  margin-top: 0;
  margin-bottom: 5cm;
  text-transform: uppercase;
}


p{
  /* gestion bancale des césures */
  text-align: justify;
/*  text-align-last: left;*/
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  -webkit-hyphenate-limit-before: 3;
  -webkit-hyphenate-limit-after: 4;
  -ms-hyphenate-limit-chars: 7 3 4;
  hyphenate-limit-chars: 7 3 4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin-bottom: var(--baseline);
  margin-top: 0;
  /* veuves et orphelines (bancal) */
  widows: 3;
  orphans: 3;
}

a{
  color: #000;
  text-decoration: none;
}

ul, figure, ol{
  margin: 0;
  padding: 0
}

ul li{
  list-style: none;
}


/* COVER  */
.pagedjs_first_page .pagedjs_area{
  outline: 30px solid var(--main-color);
  outline-offset: 10px;
}

.cover p{
  font-family: "Absans", sans-serif;
}



.entrance h1{
  break-before: right;
  text-transform: uppercase;
  text-align: center;
  font-size: 40pt;
  margin:0;
  color: #FFF;
  string-set: title content(text);
}

.entrance .authors{
  text-align: center;
  text-align-last: center;
  font-family: "Absans", sans-serif;
  font-size: 15pt;
  margin:0;
  color: #FFF;
}

.entrance{
  page: entrance;
}


@page entrance{
  background: var(--main-color);
  margin: 6mm 13mm 20mm 13mm;
/*  background: rgb(235,235,235);*/
/*  background: linear-gradient(180deg, rgba(235,235,235,1) 0%, rgba(0,64,235,1) 100%);*/
}

.chapter h2{
  break-before: right;
}

.pagedjs_blank_page{
  background: var(--main-color);
}

/* --------  FULL PAGE IMAGE ---------  */
@page pagedjs-fullpage{
  background: #FFF;
  margin: 8mm;
}

/* ------- TABLE OF CONTENTS --------- */
@page toc{
  margin: 8mm;
}

#table-of-contents{
  break-before: right;
}

#table-of-contents h1{
  font-size: 15pt;
  margin-bottom: 2cm;
}

#table-of-contents ul{
    padding:0;
}

#list-toc-generated{ 
  list-style: none;
}

#list-toc-generated .toc-element a::after{
  content: target-counter(attr(href), page);
  position: absolute;
  bottom: 0cm;
  right: 0cm;
}

#list-toc-generated .toc-element a{
  color: var(--main-color);
}


#list-toc-generated .toc-element-level-1{
  margin-top: var(--baseline);
  margin-bottom: 0.2cm;
  position: relative;
  font-size: 25pt;
  font-family: "Absans", sans-serif;
}

#list-toc-generated .toc-element-level-2{
/*  margin-left: 1cm;*/
  margin-bottom: 1cm;
  position: relative;
  font-size: 20pt;
} 

/* -------- FOOTNOTES ---------- */
.footnote::footnote-call {
    color: gray;
}

.footnote::footnote-marker {
  font-size: 11pt;
  color: black
}


/* ------- MARGIN NOTES --------- */

.margin-note {
  word-break: break-word;
  padding-right: 7mm;
  padding-left: 10mm;
  line-height: 1.35;
  font-size: 7pt;
  text-align: left;
  font-weight: normal;
  top: auto;
  text-indent: 0cm;
  hyphens: none;
}

.margin-note sup{
  font-size: 5pt;
}

.note-call, sup{
  font-size: 7pt;
  font-weight: normal;
  /* méthode pour régler l'interlignage correctement quand il y a un note*/
  line-height: 0;
}

.note-marker{
  margin-right: 0.08cm;
  font-weight: 500;
}

.note-marker:before, .note-call:after{
  content:"" !important;
}

.note-marker:after{
  content:".";
}

.footnote-ref{
  text-decoration: none;
  pointer-events: none;
}

.footnote-ref sup{
  font-size: 7pt;
  pointer-events: none;
  margin-left: 0.02cm;
  vertical-align: top;
  position: relative;
  top:-1px;
  font-weight: bold;
}

.footnote-p sup{
  font-size: 5pt;
  top:0;
}

.note-call_footnote-p{
  display: none;
}

.note-pointer{
  font-size: 7pt;
  pointer-events: none;
  font-weight: bold;
  vertical-align: bottom;
  margin-right: 4px;
}

/* ------ G L O S S A I R E ------ */
.link-page a::after{ content: target-counter(attr(href), page); }
.link-page::after{ content: ", "; }
.link-page:last-of-type::after{ content: none; }
.index-value::after{ content: " – "; }


/* -------  V O T R E    C S S  ------- */

/* Cover */
.cover h1, 
.cover p{
  font-size: 42pt;
  line-height: 1.2;
}

.cover p{
  margin-top: 6.9cm;
}

#glossary {
  page: glossary;
  color: #FFF;
  font-size: 9pt;
}

#glossary .term {
  break-inside: avoid-column;
}

#glossary .term p {
  text-align: left;
  hyphens: none;
}

@page glossary{
  margin: 13mm;
  background: black;
}

.backcover{
  break-before: left;
  page: backcover;
}



@page backcover {
  margin: 6mm;
  @top-left-corner {content: none;}
  @top-left {content: none;}
  @top-center {content: none;}
  @top-right {content: none;}
  @top-right-corner {content: none;}
  @left-top {content: none;}
  @left-middle {content: none;}
  @left-bottom {content: none;}
  @right-top {content: none;}
  @right-middle {content: none;}
  @right-bottom {content: none;}
  @bottom-left-corner {content: none;}
  @bottom-left {content: none;}
  @bottom-center {content: none;}
  @bottom-right {content: none;}
  @bottom-right-corner {content: none;}
}






