/* victorkalix.com — feuille de style
   Système tiré de la couverture du premier corpus : encre, filets doubles, cartouche,
   une seule famille serif. Fond blanc chaud ; l'ivoire de la couverture est réservé aux
   objets (couvertures, boutons, champs) ; un seul accent, sable foncé. Aucune animation.
   Mobile d'abord. Aucune ressource tierce. */

/* ---------- Polices (auto-hébergées, OFL 1.1) — @font-face générés dans polices.css ---------- */

:root {
  --fond: #fffdf7;        /* la page : blanc à peine chaud */
  --ivoire: #fff8df;      /* l'ivoire de la couverture : couvertures, boutons, champs */
  --sable: #866a3a;       /* accent unique — contraste 4,99 sur le fond */
  --encre: #000;
  --texte: #1b1913;
  --sourdine: #5a5546;
  --filet-fin: #00000033;
  --police: "Libertinus Serif", "Liberation Serif", "Times New Roman", Times, serif;
  --colonne: 34rem;
  --large: 60rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 106.25%;               /* 17 px */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--police);
  line-height: 1.6;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
}

a { color: var(--encre); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--encre);
  outline-offset: 3px;
}
img, svg { max-width: 100%; }

.saut {
  position: absolute; left: -999rem; top: 0;
  background: var(--encre); color: var(--ivoire); padding: 0.5rem 1rem; z-index: 10;
}
.saut:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- Le cadre : la page est une longue couverture ---------- */

.cadre {
  margin: 1.4rem 0.5rem 1.4rem;
  /* double filet : deux traits d'un pixel, le fond de la page entre eux (la bordure « double » s'empâte en gris) */
  border: 1px solid var(--encre);
  box-shadow: inset 0 0 0 3px var(--fond), inset 0 0 0 4px var(--encre);
  padding: 0 1rem;
  min-height: calc(100vh - 2.8rem);
  display: flex;
  flex-direction: column;
}
.cadre > main { flex: 1; }

/* Cartouches : un mot qui interrompt le filet, comme sur la couverture */
.cartouche { text-align: center; line-height: 1; }
.cartouche > * {
  display: inline-block;
  background: var(--fond);
  padding: 0 0.7em;
  color: var(--encre);
  text-decoration: none;
}
.cartouche-haut { margin-top: -0.95rem; }
.cartouche-haut > * { font-size: 1.75rem; letter-spacing: 0.01em; }
.cartouche-bas { margin-bottom: -0.62rem; margin-top: 2.5rem; }
.cartouche-bas > * { font-size: 1rem; }

.entete .sous-titre {
  text-align: center;
  font-style: italic;
  font-size: 0.86rem;
  color: var(--sourdine);
  margin: 0.55rem auto 0;
  max-width: 22rem;
  line-height: 1.35;
}
.menu {
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 1.15rem;
  font-size: 0.98rem;
}
.menu a { text-decoration: none; padding: 0.25rem 0; border-bottom: 1px solid transparent; }
.menu a:hover, .menu a[aria-current] { border-bottom-color: var(--encre); }

/* ---------- Filets et ornements ---------- */

hr, .filet {
  border: 0;
  border-top: 1px solid var(--encre);
  border-bottom: 1px solid var(--encre);
  height: 4px;
  width: 4.5rem;
  margin: 2.6rem auto;
}

/* ---------- Gabarit général ---------- */

main { padding: 2.4rem 0 1rem; }
.colonne { max-width: var(--colonne); margin-left: auto; margin-right: auto; }
.large { max-width: var(--large); margin-left: auto; margin-right: auto; }

h1, h2, h3 { color: var(--encre); font-weight: 400; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 6.2vw, 2.6rem); margin: 0 0 1rem; }
h2 { font-size: 1.45rem; margin: 2.8rem 0 0.9rem; }
h3 { font-size: 1.15rem; font-style: italic; margin: 2rem 0 0.6rem; }

.surtitre {
  font-style: italic;
  color: var(--sourdine);
  font-size: 0.95rem;
  margin: 0 0 0.9rem;
}
.surtitre a { color: inherit; }
.entete-page { text-align: center; margin-bottom: 2.2rem; }
.entete-page h1 .t2 { display: block; font-size: 0.62em; font-style: italic; margin-top: 0.45em; line-height: 1.3; }
.duree { color: var(--sourdine); font-size: 0.9rem; margin: 0.8rem 0 0; }

.bouton, button {
  display: inline-block;
  font: inherit;
  font-size: 0.98rem;
  color: var(--encre);
  background: var(--ivoire);
  border: 1px solid var(--encre);
  padding: 0.5rem 1.15rem;
  text-decoration: none;
  cursor: pointer;
  border-radius: 0;
}
.bouton:hover, button:hover { background: var(--encre); color: var(--ivoire); }
.fleche::after { content: "\00a0→"; }

/* ---------- Texte long ---------- */

.texte { font-size: 1.12rem; line-height: 1.62; hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 7 3 3; }
.texte p { margin: 0 0 1.05em; }
.texte h2, .texte h3 { hyphens: manual; -webkit-hyphens: manual; }
.texte ul, .texte ol { padding-left: 1.3em; margin: 0 0 1.05em; }
.texte li { margin-bottom: 0.5em; }
.texte blockquote {
  margin: 1.4em 0;
  padding: 0 0 0 1.1em;
  border-left: 1px solid var(--encre);
  box-shadow: inset 2px 0 0 var(--fond), inset 3px 0 0 var(--encre);
  font-style: italic;
}
.texte blockquote em { font-style: normal; }
.texte a { overflow-wrap: anywhere; }
.texte > p:first-child em:only-child,
.texte > p:first-child + p em:only-child { color: var(--sourdine); }
/* Colophon : tout ce qui suit le dernier filet */
.texte hr:last-of-type ~ p {
  font-size: 0.92rem;
  text-align: center;
  color: var(--sourdine);
  hyphens: manual; -webkit-hyphens: manual;
  overflow-wrap: anywhere;
}
.texte hr:last-of-type ~ p a { color: inherit; }
/* La ligne des droits, un ton sous la signature (13 px au moins : lisible au téléphone) */
.texte hr:last-of-type ~ p.droits { font-size: 0.82rem; margin-top: 0.35em; }

/* Sommaire repliable d'un texte */
.sommaire {
  border-top: 1px solid var(--filet-fin);
  border-bottom: 1px solid var(--filet-fin);
  margin: 0 0 2.4rem;
  font-size: 0.98rem;
}
.sommaire summary { cursor: pointer; padding: 0.7rem 0; letter-spacing: 0.04em; }
.sommaire ol { list-style: none; margin: 0 0 1rem; padding: 0; }
.sommaire li { margin: 0.35rem 0; line-height: 1.35; }
.sommaire li li { margin-left: 1.2rem; font-style: italic; font-size: 0.95em; }
.sommaire a { text-decoration: none; }
.sommaire a:hover { text-decoration: underline; }

/* Tableaux : fiches sur mobile, tableau au large */
.tableau { margin: 1.8rem 0; }
.tableau table { width: 100%; border-collapse: collapse; font-size: 0.98rem; line-height: 1.45; hyphens: manual; -webkit-hyphens: manual; }
.tableau thead { position: absolute; left: -999rem; }
.tableau tr { display: block; border-top: 1px solid var(--encre); box-shadow: inset 0 2px 0 var(--fond), inset 0 3px 0 var(--encre); padding: 1rem 0 0.3rem; }
.tableau td { display: block; padding: 0 0 0.75rem; }
.tableau td::before {
  content: attr(data-label);
  display: block;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--sourdine);
  margin-bottom: 0.1rem;
}
.tableau td:first-child::before { content: none; }
.tableau td:first-child { font-size: 1.08rem; }

/* Pied d'un texte */
.pied-texte { margin-top: 3rem; font-size: 0.98rem; }
.qui-ecrit { text-align: center; font-style: italic; margin: 0 0 2rem; }
.voisins { display: grid; gap: 1rem; margin: 0 0 1.6rem; padding: 0; list-style: none; }
.voisins a { display: block; text-decoration: none; border-top: 1px solid var(--filet-fin); padding-top: 0.6rem; line-height: 1.35; }
.voisins a:hover .vt { text-decoration: underline; }
.voisins .vl { display: block; font-style: italic; color: var(--sourdine); font-size: 0.88rem; }
.voisins .suiv { text-align: right; }
.liens-pied { text-align: center; color: var(--sourdine); }
.liens-pied a { color: inherit; }
.liens-pied span + span::before { content: " · "; }

/* ---------- Accueil ---------- */

.accueil-tete { text-align: center; padding: 1.2rem 0 0.5rem; }
.accroche { margin: 0.6rem 0 1.8rem; font-size: clamp(1.7rem, 7.4vw, 3.1rem); line-height: 1.16; color: var(--encre); }
.accroche span { display: block; }
.accroche span:nth-child(1) { color: var(--sable); }
.accroche span:nth-child(2) { font-size: 1.22em; }
.glyphe { width: 3.1rem; height: 3.1rem; display: block; margin: 0 auto; fill: var(--encre); }
.accueil-tete .glyphe { margin-bottom: 2rem; }
.description { font-size: 1.12rem; text-align: left; hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 7 3 3; }
.description p { margin: 0 0 1em; }
.centre { text-align: center; }

.rubrique { margin-top: 0; }
.rubrique-nom {
  text-align: center;
  font-size: 0.86rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sourdine);
  margin: 0 0 1.2rem;
}
.rubrique h2 { text-align: center; margin: 0 0 1rem; font-size: clamp(1.45rem, 5vw, 1.9rem); }
.rubrique h2 a { text-decoration: none; }
.rubrique h2 a:hover { text-decoration: underline; }
.rubrique .texte { font-size: 1.06rem; }
.rubrique .couverture + h2 { margin-top: 2.4rem; }

.pensee-une { margin: 0; text-align: center; font-size: clamp(1.3rem, 5vw, 1.7rem); line-height: 1.35; font-style: italic; color: var(--encre); text-wrap: balance; }

/* ---------- Couvertures (rendues en HTML/CSS) ---------- */

.couverture {
  width: 100%;
  max-width: 17rem;
  aspect-ratio: 1748 / 2480;
  margin: 0 auto;
  padding: 5.5%;
  color: var(--encre);
  text-decoration: none;
  background: var(--ivoire);
  box-shadow: 0 1px 2px #0000002e, 0 8px 24px #0000001f;
  container-type: inline-size;
  display: flex;
}
.couverture span { display: block; }
.couverture .c-cadre {
  flex: 1;
  width: 100%;
  border: 1px solid var(--encre);
  box-shadow: inset 0 0 0 2px var(--ivoire), inset 0 0 0 3px var(--encre);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.08;
}
.couverture .c-nom { background: var(--ivoire); padding: 0 0.5em; margin-top: -0.6em; font-size: 8.2cqw; position: relative; }
.couverture .c-corps { margin: auto 0; padding: 0 4cqw; }
.couverture .c-rang { font-style: italic; font-size: 4.4cqw; margin-bottom: 7cqw; display: block; }
.couverture .c-titre span { display: block; }
.couverture .c-titre .m { font-size: 8.6cqw; }
.couverture .c-titre .g { font-size: 11.6cqw; }
.couverture .c-titre .p { font-size: 6.6cqw; margin: 1.2cqw 0; }
.couverture .c-mention { display: block; font-size: 4.6cqw; margin-top: 7cqw; }
.couverture .glyphe { width: 11cqw; height: 11cqw; margin-top: 6cqw; }
.couverture-inerte { box-shadow: none; outline: 1px solid var(--filet-fin); }
a.couverture:hover { box-shadow: 0 1px 2px #00000040, 0 12px 30px #00000033; }

.etagere { display: grid; gap: 3rem; margin: 1rem 0 0; }
.etagere figure { margin: 0; text-align: center; }
.etagere figcaption { margin-top: 1.3rem; }
.etagere figcaption .titre { display: block; font-size: 1.15rem; line-height: 1.3; color: var(--encre); text-wrap: balance; }
.etagere figcaption .etat { display: block; font-style: italic; color: var(--sourdine); margin: 0.4rem 0 1rem; }

/* ---------- Page d'un corpus ---------- */

.phrase-unique { font-size: clamp(1.25rem, 4.6vw, 1.55rem); line-height: 1.35; text-align: center; color: var(--encre); margin: 2rem 0 1.4rem; text-wrap: balance; }
.table-matieres { margin: 0; padding: 0; list-style: none; }
.table-matieres > li { margin: 0; }
.tm-groupe { font-size: 0.86rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sourdine); margin: 2.4rem 0 0.4rem; text-align: center; }
.tm-piece { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0 0.4rem; padding: 0.95rem 0; border-top: 1px solid var(--filet-fin); text-decoration: none; }
.tm-piece .tm-rang { font-size: 1.05rem; padding-top: 0.12rem; }
.tm-piece .tm-titre { font-size: 1.22rem; line-height: 1.25; color: var(--encre); }
.tm-piece .tm-compl { display: block; font-style: italic; font-size: 0.98rem; color: var(--texte); margin-top: 0.15rem; line-height: 1.3; }
.tm-piece .tm-duree { display: block; font-size: 0.86rem; color: var(--sourdine); margin-top: 0.3rem; }
.tm-piece:hover .tm-titre { text-decoration: underline; }
.encart { border: 1px solid var(--filet-fin); background: var(--ivoire); padding: 1.1rem 1.2rem; margin: 2.6rem 0 0; font-size: 0.98rem; }
.encart p { margin: 0 0 0.6em; }
.encart p:last-child { margin: 0; }

/* ---------- Listes (articles) ---------- */

.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { border-top: 1px solid var(--filet-fin); padding: 1.6rem 0; }
.liste > li:first-child { border-top: 0; padding-top: 0; }
.liste h2 { margin: 0 0 0.3rem; font-size: 1.5rem; }
.liste h2 a { text-decoration: none; }
.liste h2 a:hover { text-decoration: underline; }
.liste .meta { color: var(--sourdine); font-size: 0.9rem; margin: 0 0 0.8rem; }

/* ---------- Pensées ---------- */

.pensees-intro { text-align: center; font-style: italic; color: var(--sourdine); margin: -0.4rem 0 2.2rem; }
.pensee { margin: 0 auto; padding: 2.6rem 0 0; max-width: 30rem; text-align: center; scroll-margin-top: 2rem; }
.pensee .num {
  display: inline-block;
  font-size: 0.86rem;
  letter-spacing: 0.18em;
  color: var(--sable);
  text-decoration: none;
  padding: 0.2rem 0.6rem;
  margin-bottom: 0.55rem;
}
.pensee .num:hover, .pensee:target .num { text-decoration: underline; text-underline-offset: 0.3em; }
.pensee blockquote { margin: 0; font-size: clamp(1.25rem, 4.6vw, 1.5rem); line-height: 1.42; color: var(--encre); text-wrap: balance; }
.pensee blockquote p { margin: 0; }
.pensees-section { text-align: center; font-size: clamp(1.6rem, 5.4vw, 2.1rem); margin: 0 0 0.6rem; }

/* ---------- Lettre d'information ---------- */

.lettre { text-align: center; }
.lettre h2 { font-size: clamp(1.45rem, 5vw, 1.9rem); margin: 0 0 0.7rem; }
.lettre p { margin: 0 auto 1.2rem; max-width: 28rem; font-size: 1rem; }
.lettre form { display: flex; flex-direction: column; gap: 0.7rem; max-width: 24rem; margin: 0 auto; }
.lettre label { position: absolute; left: -999rem; }
.lettre input[type="email"] {
  font: inherit; font-size: 1rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--encre);
  background: var(--ivoire);
  color: var(--encre);
  border-radius: 0;
  width: 100%;
}
.pot { position: absolute; left: -999rem; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Pied de page ---------- */

.pied { text-align: center; font-size: 0.9rem; color: var(--sourdine); padding-top: 3rem; }
.pied p { margin: 0.35rem 0; }
.pied a { color: inherit; white-space: nowrap; }
.pied .sep::before { content: " · "; }
.pied .cartouche-bas { margin: 2.5rem 0 -0.62rem; }
.pied .glyphe { width: 2.2rem; height: 2.2rem; }

/* ---------- Au large ---------- */

@media (min-width: 44rem) {
  html { font-size: 112.5%; }        /* 18 px */
  .cadre { margin: 2rem 1.6rem; padding: 0 2.5rem; min-height: calc(100vh - 4rem); }
  .cartouche-haut > * { font-size: 2.1rem; }
  .cartouche-haut { margin-top: -1.15rem; }
  .entete .sous-titre { max-width: none; font-size: 0.92rem; }
  .menu { gap: 0.2rem 2rem; }
  main { padding-top: 3.4rem; }
  .texte p, .texte li, .texte blockquote, .description p {
    text-align: justify;
    hyphens: auto; -webkit-hyphens: auto;
    hyphenate-limit-chars: 7 3 3;
  }
  .etagere { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .voisins { grid-template-columns: 1fr 1fr; }
  .lettre form { flex-direction: row; }
  .lettre form button { white-space: nowrap; }
  .tableau thead { position: static; }
  .tableau tr { display: table-row; border: 0; padding: 0; box-shadow: none; }
  .tableau th, .tableau td { display: table-cell; padding: 0.75rem 0.8rem 0.75rem 0; vertical-align: top; text-align: left; border-top: 1px solid var(--filet-fin); }
  .tableau th { font-weight: 400; font-style: italic; color: var(--sourdine); border-top: 1px solid var(--encre); border-bottom: 1px solid var(--encre); font-size: 0.92rem; }
  .tableau td::before { content: none; }
  .tableau td:first-child { font-size: inherit; width: 30%; }
}
@media (min-width: 60rem) {
  /* un tableau à cellules longues respire mieux hors de la colonne de lecture */
  .tableau { width: min(54rem, 100vw - 9rem); margin-left: 50%; transform: translateX(-50%); }
  .tableau table { font-size: 1rem; }
  .tableau td:first-child { width: 26%; }
  /* l'accroche déborde la colonne : chaque ligne tient d'un seul tenant, comme un titre de couverture */
  .accroche { margin-left: -10rem; margin-right: -10rem; }
}
@media (min-width: 72rem) {
  html { font-size: 118.75%; }       /* 19 px */
}

/* ---------- Impression : le texte, rien d'autre ---------- */

@media print {
  html { font-size: 11pt; }
  body { background: #fff; color: #000; }
  .cadre { border: 0; box-shadow: none; margin: 0; padding: 0; min-height: 0; display: block; }
  .menu, .pied, .pied-texte, .lettre, .sommaire, .saut, .cartouche-bas { display: none; }
  .cartouche > * { background: #fff; }
  .accroche span:nth-child(1) { color: #000; }
  .cartouche-haut { margin-top: 0; }
  main { padding-top: 1.5rem; }
  .colonne { max-width: none; }
  .texte { font-size: 11pt; line-height: 1.5; }
  .texte a { text-decoration: none; }
  h2, h3 { break-after: avoid; }
  .tableau { width: auto; margin-left: 0; transform: none; }
  p { orphans: 3; widows: 3; }
  .tableau thead { position: static; }
  .tableau tr { display: table-row; border: 0; padding: 0; box-shadow: none; }
  .tableau th, .tableau td { display: table-cell; padding: 0.4rem 0.5rem 0.4rem 0; vertical-align: top; text-align: left; border-top: 1px solid #999; }
  .tableau td::before { content: none; }
}
