@font-face {
  font-family: "redaction-20";
  src: url("http://localhost/paged.js/fonts/Redaction20-Regular.otf");
 }

 @font-face {
  font-family: "redaction-20-italique";
  src: url("http://localhost/paged.js/fonts/Redaction20-Italic.otf");
 }

 @font-face {
  font-family: "redaction-35";
  src: url("http://localhost/paged.js/fonts/Redaction35-Regular.otf");
 }

  @font-face {
  font-family: "redaction-35-italic";
  src: url("/www/paged.js/fonts/Redaction35-Regular.otf");
 }

 @font-face {
  font-family: "redaction-50";
  src: url("/www/paged.js/fonts/Redaction50-Regular.otf");
 }

 @font-face {
  font-family: "redaction-50-bold";
  src: url("/www/paged.js/fonts/Redaction50-Bold.otf");
 }

  @font-face {
  font-family: "redaction-50-italic";
  src: url("/www/paged.js/fonts/Redaction50-Italic.otf");
 }

 @font-face {
  font-family: "redaction-70-bold";
  src: url("/www/paged.js/fonts/Redaction70-Bold.otf");
 }

 @font-face {
  font-family: "redaction-70-italic";
  src: url("/www/paged.js/fonts/Redaction70-Bold.otf");
 }

@page {
  size: 105mm 297mm;
  }

@page :left{
  margin: 20mm 15mm 15mm 15mm;
   @top-left {
    content: counter(page);
    font-family: redaction-50-italic;
    font-size: 7pt;
  }
    @top-center {
    content: element(monTitreCourant)
  }
}
@page :right{
  margin: 20mm 15mm 15mm 15mm; 
  @top-right {
    content: counter(page);
    font-family: redaction-50-italic;
    font-size: 7pt;
  }
}

@page macouverture {
  margin: 20mm 15mm 15mm 15mm;
  @top-right { content: none; }
  @top-left { content: none; } 
  @bottom-right { content: none; }
  @bottom-left { content: none; }
}
.couverture { 
  page: macouverture;
  color: black;
  page-break-after: always;

}

@page:blank {
  @top-right { content: none; }
  @top-left { content: none; } 
  @bottom-right { content: none; }
  @bottom-left { content: none; }
}

@page leschapitres {
  @bottom-right { content: none; }
  @bottom-left { content: none; }
}

.chapitres { 
  page: leschapitres;
  page-break-before: left;
}

.chapitres-notes {
    page-break-before: left;
}

.chapitres-toc {
    page-break-before: right;
}

.chapitres-toc ul {
  list-style-type: none;
  margin-left: -40px;
}

.chapitres-colophon {
    page-break-before: right;
}
.chapitres-fin-planche {
    page-break-before: right;
}

.chapitres-notes ul {
  list-style-type: none;
}


.title-memoire {
  position: running(monTitreCourant);
  font-size: 7pt;
}

h1couv {
  font-size: 38pt;
  line-height: 38pt;
  font-family: "redaction-70-bold";
}

h2couv {
  font-size: 16pt;
  line-height: 18pt;
  font-family: "redaction-35";
  position: absolute;
  margin-top: 10mm;
}

.txtcouv {
  font-size: 11pt;
  font-family: "redaction-20";
  position: absolute;
  margin-top: 160mm;
}

.couvdos {
  font-size: 9pt;
  line-height: 11pt;
  font-family: "redaction-20";
  text-align: justify;
}

h1 {
  font-size: 56pt;
  line-height: 54pt;
  font-family: "redaction-70-bold";
  writing-mode: vertical-rl;
  transform: rotate(180deg) translate(75px);
  margin-bottom: 30mm;
  page-break-before: left;
  page-break-after: right;
}

h2 {
  font-size: 28pt;
  line-height: 24pt;
  font-family: "redaction-50";
  page-break-before: left;
  margin-bottom: 6cm;
  margin-top: -1px;
}

h2-biblio {
  font-size: 28pt;
  line-height: 24pt;
  font-family: "redaction-50";
}

body {
  font-size: 11pt;
  font-family: "redaction-20";
}

i {
  font-size: 11pt;
  font-family: "redaction-20-italique";
}

.ih1 {
  font-size: 56pt;
  line-height: 54pt;
  font-family: "redaction-70-italic";
  writing-mode: vertical-rl;
  transform: rotate(180deg) translate(75px);
  margin-bottom: 30mm;
}

.ih2 {
  font-size: 16pt;
  line-height: 18pt;
  font-family: "redaction-35-italic";
  margin-top: 10mm;
}

.footnotes {
  font-size: 9pt;
  font-family: "redaction-35";
  margin-top: 11pt;
}

/* Liens de note (dans le texte) */
sup {
  text-decoration: none;
  color: gray;
  font-family: "redaction-35";
  font-size: 7pt;
}


/* Conteneur d'image */
.image-container {
  page-break-inside: avoid; /* Empêche la coupure sur 2 pages */
  margin: 1em 0;
}

/* Image elle-même */
.image-container img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.image-container-aff img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Image elle-même */
.image-container-600 img {
  max-width: 200%;
  height: auto;
  display: block;
  margin-top: 0;
  margin-left: -100px; 
}

.image-container-proto img {
  max-width: 200%;
  height: auto;
  display: block;
  margin: 0 auto;
  margin-left: -100px; 

}

.image-container-proj img {
  max-width: 125%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Légende */
.image-container figcaption {
  font-size: 9pt;
  line-height: 10pt;
  text-align: left;
  font-family: "redaction-10";
  margin-top: 1mm;
  page-break-after: always;
  color: gray;
}
.image-container-proto figcaption {
  font-size: 9pt;
  line-height: 10pt;
  text-align: left;
  font-family: "redaction-10";
  margin-top: 1mm;
  page-break-after: always;
  color: gray;
}

.image-container-600 figcaption {
  font-size: 9pt;
  line-height: 11pt;
  text-align: left;
  font-family: "redaction-10";
  margin-top: 1mm;
  margin-left: -40px;
  color: gray;
}

.image-container-aff figcaption {
  font-size: 9pt;
  line-height: 11pt;
  text-align: left;
  font-family: "redaction-10";
  margin-top: 1mm;
  margin-left: -40px;
  color: gray;
}

.image-container-proj figcaption {
  font-size: 9pt;
  line-height: 11pt;
  text-align: left;
  font-family: "redaction-10";
  margin-top: 1mm;
  margin-left: -40px;
  color: gray;
}

.glossaire {
  columns: 2;
  column-gap: 5mm;
  font-size: 9pt;
  font-family: "redaction-35";
  margin-top: 11pt;
    page-break-before: left;
  page-break-after: right;

}

/* Tableaux */
 table {
      border-style: dashed;
      border-width: 2px;
      border-collapse: collapse;
      width: 100%;
      max-width: 500px;
      margin: 20px 0;
      font-family: redaction-20;
    }
    th, td {
      border: 1px solid #000;
      padding: 8px 12px;
      text-align: left;
    }
    th {
      background-color: #f2f2f2;
      font-weight: bold;
    }
    tr:nth-child(even) {
      background-color: #f9f9f9;
    }

#toc li a {
  font-family: "redaction-50";
  font-size: 14pt;
  color: black;
}

#toc li a::after {
  content: target-counter(attr(href), page);
  float: right;
  font-family: "redaction-50";
  font-size: 14pt;

}

/* set the style for the list numbering to none */
#list-toc-generated {
  list-style: none;
}

#list-toc-generated .toc-element {
  break-inside: avoid;

}

#list-toc-generated .toc-element a::after {
  content: " p. " target-counter(attr(href), page);
  float: right;
}

#list-toc-generated .toc-element-level-1 {
  margin-top: 25px;
  font-weight: bold;
}

#list-toc-generated .toc-element-level-2 {
  margin-left: 25px;
}

/* counters */

#list-toc-generated {
  counter-reset: counterTocLevel1;
}

#list-toc-generated .toc-element-level-1 {
  counter-increment: counterTocLevel1;
  counter-reset: counterTocLevel2;
}

#list-toc-generated .toc-element-level-1::before {
  content: counter(counterTocLevel1) ". ";
  padding-right: 5px;
}

#list-toc-generated .toc-element-level-2 {
  counter-increment: counterTocLevel2;
}

#list-toc-generated .toc-element-level-2::before {
  content: counter(counterTocLevel1) ". " counter(counterTocLevel2) ". ";
  padding-right: 5px;
}

/* hack for leaders */

#list-toc-generated {
  overflow-x: hidden;
}

/* fake leading */
#list-toc-generated .toc-element::after {
  content: ".............................................."
    ".............................................."
    ".............................................." "........";
  float: left;
  width: 0;
  padding-left: 5px;
  letter-spacing: 2px;
}

#list-toc-generated .toc-element {
  display: flex;
}

#list-toc-generated .toc-element a::after {
  position: absolute;
  right: 0;
  background-color: white;
  padding-left: 6px;
}

#list-toc-generated .toc-element a {
  right: 0;
}

.back-page {
  break-before: left;
}
.end-vacat-page {
  page-break-before: always;
  height: var(--pagedjs-pagebox-height);
}