/* Diagrammes — Goulven Michel — DNSEP 2026-2027*/

@font-face {
  font-family: "Bradford";
  src: url("font/BradfordLLEdu-Book.woff2") format("woff2");
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bradford";
  src: url("font/BradfordLLEdu-BookItalic.woff2") format("woff2");
  font-style: italic;
  font-display: swap;
}

:root {
  --papier: #ecebe6;
  --encre: #1f1f1d;
  --interligne: 1.45;
  --ligne: 1.45em;
  --mesure: 29.6em;
}

::selection {
  color: var(--papier);
  background: var(--encre);
}

* { box-sizing: border-box; }

html {
  font-size: clamp(17px, 0.55vw + 11px, 20px);
  scroll-behavior: smooth;
  scroll-padding-top: 2em;
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font: 400 1rem/var(--interligne) "Bradford", Georgia, serif;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-size: 1em; font-weight: 400; margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
img { display: block; max-width: 100%; height: auto; }
.sc { font-variant-caps: all-small-caps; letter-spacing: 0.04em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Triptyque */

.triptyque {
  display: grid;
  grid-template-columns: minmax(11rem, 0.5fr) minmax(calc(var(--mesure) + 5em), 1.2fr) minmax(18rem, 0.8fr);
}

.volet-gauche, .volet-droit {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 2rem;
  scrollbar-width: none;        
}
.volet-gauche::-webkit-scrollbar, .volet-droit::-webkit-scrollbar { display: none; } /* Safari, Chrome */

/* Sommaire */
.marque { margin: 0 0 calc(var(--ligne) * 2); }
.marque a, .sommaire a { text-decoration: none; }
.marque .auteur { display: block; }
.sommaire ol { list-style: none; margin: 0; padding: 0; }
.sommaire > ol > li + li { margin-top: var(--ligne); }
.sommaire ol ol ol { padding-left: 1.5em; }
.sommaire a:hover, .sommaire a.actif { text-decoration: underline; }

/* Colonne de droite */
.volet-droit { background: var(--encre); color: var(--papier); font-size: 0.95em; }
.volet-droit .legende { margin: 0 0 1em; }
.volet-droit .photo { max-height: 34vh; width: auto; margin: 0 0 1em; }
.volet-droit .profil { width: min(100%, 42vh); mix-blend-mode: lighten; }
.volet-droit .note, .volet-droit blockquote p { margin: 0; text-align: justify; hyphens: auto; }
.volet-droit .num { margin-right: 0.3em; }
.volet-droit .concept + .concept { margin-top: calc(var(--ligne) * 2); }
.volet-droit blockquote { margin: var(--ligne) 0 0; }
.volet-droit .url { word-break: break-all; }

/*  Texte  */

.texte { padding: 2rem 2.5em 30vh; min-width: 0; }
.texte > * { max-width: var(--mesure); margin-left: auto; margin-right: auto; }

.texte p, .texte li {
  margin: 0;
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 6 3 3;
}
.texte p + p { text-indent: 2em; }
.texte p.sans-alinea { text-indent: 0; }
.texte .pause { height: var(--ligne); }

/* Titres  */
.texte h2, .texte h3 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  margin: calc(var(--ligne) * 3) auto var(--ligne);
}
.texte h2.partie { margin-top: calc(var(--ligne) * 5); }
.texte h2 .num { margin-right: 0.3em; }

.couverture { min-height: calc(100vh - 2rem); display: flex; flex-direction: column; padding-bottom: calc(var(--ligne) * 2); }
.genese { margin: calc(var(--ligne) * 1.5) 0; }
.genese img { width: 100%; }
.colophon { margin-top: auto; }
.texte .colophon p { text-align: left; text-indent: 0; margin-bottom: var(--ligne); }

.exergue { margin: calc(var(--ligne) * 4) auto; }
.exergue blockquote { margin: 0; }
.exergue footer { margin-top: var(--ligne); }

/* Appels de note */
a.appel { font-variant-position: super; text-decoration: none; }
a.appel:hover { text-decoration: underline; }

/* Œuvres (soulignées) et concepts (soulignés en pointillé) */
a.oeuvre { text-decoration-line: underline; }
.c { text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: 0.22em; cursor: help; }
body[data-concept~="sig"] .c[data-c~="sig"],
body[data-concept~="aff"] .c[data-c~="aff"],
body[data-concept~="op"] .c[data-c~="op"],
body[data-concept~="noe"] .c[data-c~="noe"] { text-decoration-style: solid; }

/* Citations  */
q.cit { quotes: none; font-style: italic; }
q.cit cite, q.cit i, q.cit .hors-cit { font-style: normal; }
.exergue q.cit { font-style: normal; }

/* Annexe */
.annexe-grille { list-style: none; padding: 0; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; }

/* Notes et bibliographie */
.notes-fin li, .biblio li { display: grid; grid-template-columns: 2.4em 1fr; margin-bottom: 0.6em; }
.notes-fin a.n { text-decoration: none; }
.texte .url { word-break: break-all; hyphens: none; }

/*  Une colonne  */

.barre { display: none; }

@media (max-width: 1099px) {
  .triptyque { display: block; }
  .volet-gauche, .volet-droit { display: none; }

  .barre {
    display: block;
    position: sticky; top: 0; z-index: 1;
    background: var(--papier);
    border-bottom: 1px solid;
  }
  .barre summary { list-style: none; cursor: pointer; padding: 0.6em 16px; display: flex; justify-content: space-between; gap: 1em; }
  .barre summary::-webkit-details-marker { display: none; }
  .barre .section-courante { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .barre[open] .ouvrir::after { content: "Fermer"; }
  .barre:not([open]) .ouvrir::after { content: "Sommaire"; }
  .barre nav { padding: 0.4em 16px 1.4em; max-height: 75vh; overflow-y: auto; }

  .texte { padding: 1.5em 16px 6em; }
  .texte > * { max-width: 34em; }
  .couverture { min-height: auto; }

  /* Œuvres */
  .insert { margin: 0.8em 0 1.2em; }
  .insert-note, .insert-concept { border-left: 1px solid; padding-left: 1em; }
  .insert-oeuvre { background: var(--encre); color: var(--papier); padding: 1em; }
  .insert .photo { margin-bottom: 1em; }
  .insert .profil { mix-blend-mode: lighten; }
  .insert blockquote { margin: 0.6em 0 0; }
  .texte .insert p { text-indent: 0; }
}

@media print {
  .volet-gauche, .volet-droit, .barre { display: none; }
  .triptyque { display: block; }
}

/* Zoom */
.volet-droit img, .insert img { cursor: zoom-in; }
#zoom {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--encre);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: zoom-out;
}
#zoom[hidden] { display: none; }
#zoom img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
#zoom.profil img { height: 100%; mix-blend-mode: lighten; }
