/* éditions des ruines : feuille de style unique (v2).
   Deux polices, celles du livre : Helvetica et Courier New, déjà sur les machines.
   Rien à télécharger, aucun script. */

:root {
  --papier: #F5F4F0;
  --encre: #121212;
  --rouge: #F2302F;
  --jaune: #F6CB2E;
  --bleu-pale: #A9C7EE;
  --rose: #E9849A;
  --gris: #A3A3A0;
  --trait-bleu: rgba(48, 98, 206, .4);
  --trait-rouge: rgba(226, 58, 48, .4);
  --grot: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", "Nimbus Sans", sans-serif;
  --mono: "Courier New", Courier, "Liberation Mono", "Nimbus Mono PS", monospace;
  --marge: 2.4vw;
  --filet: 1.5px solid var(--encre);
}

* { box-sizing: border-box; }
html { background: var(--papier); color: var(--encre); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  position: relative;
  font-family: var(--grot);
  font-size: 18px;
  line-height: 1.45;
  overflow-x: hidden;
}

/* traits de construction : quatre lignes fines qui traversent la page */
body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(var(--trait-bleu), var(--trait-bleu)) 2.4vw 0 / 1px 100% no-repeat,
    linear-gradient(var(--trait-rouge), var(--trait-rouge)) 33.3vw 0 / 1px 100% no-repeat,
    linear-gradient(var(--trait-bleu), var(--trait-bleu)) 61.8vw 0 / 1px 100% no-repeat,
    linear-gradient(var(--trait-rouge), var(--trait-rouge)) 97.2vw 0 / 1px 100% no-repeat;
}

a { color: inherit; }
a:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-weight: 400; }
.cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============ l’affiche (en-tête rouge) ============ */

.affiche {
  position: relative;
  background: var(--rouge);
  height: 65vw;
  line-height: 1;
  letter-spacing: -.01em;
}
.affiche h1 { margin: 0; font: inherit; letter-spacing: inherit; }
.m { position: absolute; white-space: nowrap; font-size: 7.4vw; }
.m-editions { left: 2.6vw; top: 3vw; }
.m-des { left: 61vw; top: 8vw; }
.m-ruines { left: 8.5vw; top: 21vw; z-index: 3; }

/* l’éboulis : le mot ruines s’effondre en copies de plus en plus serrées,
   derrière la façade, qui reste debout devant (façadisme) */
.eboulis { position: absolute; left: 8.5vw; top: 21vw; font-size: 7.4vw; z-index: 1; pointer-events: none; }
.eboulis span { position: absolute; left: 0; top: 0; white-space: nowrap; }

.facade {
  position: absolute;
  left: 26.5vw;
  top: 16.5vw;
  width: 31vw;
  margin: 0;
  z-index: 2;
}

.sous-titre {
  position: absolute;
  left: 61vw;
  top: 44vw;
  margin: 0;
  font-size: 2.3vw;
  letter-spacing: 0;
}
.parenthese {
  position: absolute;
  left: 61vw;
  top: 48.5vw;
  width: 27vw;
  margin: 0;
  font-family: var(--mono);
  font-size: max(15px, 1.2vw);
  line-height: 1.35;
  letter-spacing: 0;
}

/* ============ peuple pédé poème ============ */

.publication {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.6vw;
  align-items: start;
  padding: 9vw var(--marge) 0;
}
.couv { grid-column: 2 / span 4; position: relative; margin: 0; cursor: pointer; }
.couv img { width: 100%; border: 1px solid var(--encre); background: #fff; }
.couv .arriere { position: absolute; left: 0; top: 0; transform: translate(4.5%, 3.2%); z-index: 0; }
.couv .avant { position: relative; z-index: 1; }
.couv:hover .avant, .couv:focus .avant { opacity: 0; }
.couv:hover .arriere, .couv:focus .arriere { transform: none; z-index: 2; }

.notice { grid-column: 7 / span 5; }
.notice h1, .notice h2 { margin: 0 0 .25em; font-size: 4.6vw; line-height: .95; letter-spacing: -.02em; }
.notice .auteur { margin: 0 0 2.4em; font-family: var(--mono); font-size: max(15px, 1.12vw); }
.notice .auteur .sigle { font-family: var(--grot); font-size: 1.7em; letter-spacing: .3em; margin-right: .3em; }
.dos { margin: 0 0 2em; font-style: italic; font-size: max(20px, 1.75vw); line-height: 1.3; }
.boite {
  margin: 0 0 2.2em;
  font-family: var(--mono);
  font-size: max(15px, 1.12vw);
  line-height: 1.3;
  white-space: pre;
  overflow-x: auto;
}
.soiree { margin: 0 0 2.2em; max-width: 30em; font-size: max(16px, 1.2vw); text-align: justify; hyphens: auto; }

/* l’extrait, en escalier, avec des aplats de couleur */
.extrait {
  position: relative;
  margin: 9vw 0 0;
  padding: 0 var(--marge) 0 calc(8.33vw + 1vw);
  font-size: max(18px, 1.45vw);
  line-height: 1.38;
}
.etiquette { font-family: var(--mono); font-size: max(14px, 1.05vw); margin: 0 0 2.4em; }
.points { height: 14px; background: radial-gradient(circle, var(--jaune) 4.6px, transparent 5.2px) 0 0 / 15px 14px repeat-x; }
.extrait .points { width: 31vw; margin: 0 0 2.6em; }
.extrait .points.fin { width: 46vw; margin: 2.6em 0 0 auto; }
.extrait p.v { position: relative; z-index: 1; max-width: 30em; margin: 0 0 1.5em var(--decal, 0); }
.extrait sup { font-size: .6em; line-height: 0; }
.extrait sup a { text-decoration: none; }
.extrait .note { font-size: .7em; margin: 2.4em 0 0; }
.aplat { position: absolute; z-index: 0; }
.aplat-jaune { background: var(--jaune); right: 0; top: 7.2em; width: 31vw; height: 7.4em;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 22% 100%, 22% 62%, 0 62%); }
.aplat-bleu { background: var(--bleu-pale); left: 0; height: 2.2em; }
.aplat-rose { background: var(--rose); right: 3vw; width: 22vw; height: 4.6em;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 38% 100%, 38% 46%, 0 46%); }
.aplat-gris { background: var(--gris); width: 11vw; height: 2.6em; }

/* ============ le texte de présentation (v5) ============ */
/* Une colonne tapée, coupée à l’avance (56 signes, 36 sur téléphone).
   Le glitch ne touche que quelques lignes : décalées, recopiées de travers,
   une bande de pixels dans l’interligne. On lit d’un bout à l’autre. */

.tape {
  position: relative;
  margin: 0;
  max-width: 36em;
  font-family: var(--grot);
  font-size: max(17px, 1.3vw);
  line-height: 1.5;
  text-align: justify;
  hyphens: auto;
}
.rvb { position: relative; display: inline-block; }
.fant {
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  white-space: nowrap;
  pointer-events: none;
  mix-blend-mode: multiply;
  transform: translate(var(--dx, 0), var(--dy, 0));
}
.f-rouge { color: var(--rouge); }
.f-bleu { color: #2F62CE; }

/* le seuil : une bande du rouge de l’affiche, qui se replie quand on la dépasse en défilant */
.seuil { height: 12vw; margin-top: clamp(60px, 7vw, 120px); background: var(--rouge); }
@supports (animation-timeline: view()) {
  .seuil { animation: replier linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; transform-origin: top; }
  @keyframes replier { to { transform: scaleY(0); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) { .seuil { animation: none; } }

/* « s’effondrent » : le bas du mot est tombé */
.tombe { position: relative; display: inline-block; }
.tombe .haut { display: inline-block; clip-path: inset(0 0 46% 0); }
.tombe .bas { position: absolute; left: .04em; top: 0; white-space: nowrap; clip-path: inset(54% 0 0 0); transform: translateY(.42em); }

/* ============ organiser les ruines / à-propos de nous (en bas de l’accueil) ============ */

.apropos { padding: 0 var(--marge) 0 calc(8.33vw + 1vw); margin-top: clamp(50px, 5vw, 90px); }
.titre-recit { margin: 0; font-size: 4.6vw; line-height: .95; letter-spacing: -.02em; }
.sous-titre-recit { margin: .5em 0 0; font-size: 2.3vw; line-height: 1.1; }
.apropos-corps {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 4vw;
  align-items: start;
  margin-top: clamp(40px, 4.4vw, 80px);
}
.apropos .recit { grid-column: 1; grid-row: 1; }
/* la photographie reste à côté du texte pendant qu’on le lit, coupée par le bord droit */
.apropos-photo { grid-column: 2; grid-row: 1; position: sticky; top: 3vw; margin: .45em calc(-1 * var(--marge)) 0 0; }
.apropos-photo img { width: 100%; }

/* ============ publications (accueil) ============ */

.catalogue { padding: 0 var(--marge) 0 calc(8.33vw + 1vw); margin-top: clamp(60px, 8vw, 130px); }
.catalogue .etiquette { font-weight: 400; margin: 0 0 1.6em; }
.entree {
  display: grid;
  grid-template-columns: minmax(0, 15vw) minmax(0, 1fr);
  column-gap: 2.4vw;
  align-items: end;
  width: max-content;
  max-width: 100%;
  text-decoration: none;
}
.e-couv { grid-row: 1 / 3; }
.e-couv img { width: 100%; border: 1px solid var(--encre); background: #fff; box-shadow: 10px 9px 0 -1px #fff, 10px 9px 0 0 var(--encre); }
.e-titre {
  font-size: 4.6vw;
  line-height: .95;
  letter-spacing: -.02em;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% .06em no-repeat;
  padding-bottom: .08em;
}
.e-info { font-family: var(--mono); font-size: max(15px, 1.12vw); margin-top: .8em; align-self: start; }
.entree:hover .e-titre, .entree:focus-visible .e-titre { background: var(--encre); color: var(--papier); }
.entree:hover .e-couv img { transform: translate(-3px, -3px); }

/* ============ pages intérieures : la bande rouge ============ */

.bandeau {
  position: relative;
  background: var(--rouge);
  min-height: 15vw;
  padding: 2.6vw 30vw 2.4vw 2.6vw;
  overflow: hidden;
  line-height: 1;
}
.b-nom { margin: 0; font-size: 5.2vw; letter-spacing: -.01em; }
.b-nom a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% .07em no-repeat; padding-bottom: .06em; }
.b-nom a:hover, .b-nom a:focus-visible { background: var(--encre); color: var(--rouge); outline: none; }
.b-sous { margin: 1.4vw 0 0; font-size: max(15px, 1.5vw); line-height: 1.35; }
.b-par { font-family: var(--mono); font-size: .8em; }
/* la façade, en grand, centrée dans la hauteur de la bande, coupée en haut et en bas */
.b-facade { position: absolute; right: 7vw; top: 50%; transform: translateY(-50%); width: 15vw; }

/* ============ colophon ============ */

.colophon { padding: 0 var(--marge) 0 calc(8.33vw + 1vw); }
.titre-colophon { margin: clamp(60px, 8vw, 130px) 0 0; font-size: 4.6vw; line-height: .95; letter-spacing: -.02em; }
.c-intro { margin: clamp(30px, 3vw, 54px) 0 0; max-width: 34em; font-size: max(20px, 1.75vw); line-height: 1.35; letter-spacing: -.005em; }
.c-bloc { margin-top: clamp(54px, 6vw, 110px); border-top: var(--filet); padding-top: 14px; }
.c-bloc h2, .titre-rubrique { margin: 0 0 26px; font-size: 2.6vw; letter-spacing: .02em; line-height: 1; }
.c-logo { display: grid; grid-template-columns: minmax(0, 22vw) minmax(0, 1fr); column-gap: 3vw; align-items: start; }
.c-logo-img { margin: 0; }
.c-logo-img img { width: 100%; }
.c-credit { margin: 1.4em 0 0; font-family: var(--mono); font-size: max(15px, 1.05vw); }
.c-texte { margin: 0; max-width: 62ch; font-family: var(--mono); font-size: max(16px, 1.15vw); line-height: 1.6; }

.specimens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3vw; margin-top: 40px; }
.specimen { border-top: 1px solid var(--encre); padding-top: 12px; }
.specimen p { margin: 0; }
.sp-nom { font-family: var(--mono); font-size: max(15px, 1.05vw); }
.sp-grand { font-size: 13vw; line-height: 1; margin: .05em 0 .1em -.04em !important; letter-spacing: -.02em; }
.sp-alpha { font-size: max(16px, 1.5vw); line-height: 1.3; overflow-wrap: anywhere; margin-bottom: 1.2em !important; }
.sp-texte { font-family: var(--mono); font-size: max(15px, 1.05vw); line-height: 1.6; max-width: 52ch; }

.nuancier { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 26ch), 1fr)); gap: 34px 3vw; margin-top: 8px; font-family: var(--mono); font-size: max(15px, 1.05vw); }
.groupe .g-nom { margin: 0 0 12px; border-bottom: 1px solid var(--encre); padding-bottom: 6px; }
.groupe ul { list-style: none; margin: 0; padding: 0; }
.groupe li { display: grid; grid-template-columns: 2.6em minmax(0, 1fr); column-gap: .8em; align-items: start; margin-bottom: 12px; line-height: 1.35; }
.pastille { grid-row: 1 / 3; width: 2.6em; height: 2.6em; border: 1px solid var(--encre); display: block; }
.hex { display: block; }
.usage { display: block; color: #4a4a48; }

/* ============ lieux où nous trouver ============ */

.lieux { padding: 0 var(--marge) 0 calc(8.33vw + 1vw); margin-top: clamp(54px, 5.5vw, 96px); }
.lieux table {
  border: 2px outset #d8d8d4;
  border-spacing: 2px;
  font-family: var(--mono);
  font-size: max(16px, 1.12vw);
  min-width: min(100%, 36em);
  background: var(--papier);
}
.lieux caption { text-align: left; padding: 0 0 .6em; }
.lieux th, .lieux td { border: 1px inset #d8d8d4; padding: .35em .6em; text-align: left; font-weight: 400; }
.lieux td { height: 2.1em; }
.lieux .rien { font-family: var(--mono); font-size: max(16px, 1.12vw); margin: 1.2em 0 0; }

/* ============ pied ============ */

.pied {
  margin-top: 11vw;
  background: var(--encre);
  color: var(--papier);
  font-family: var(--mono);
  font-size: 14px;
  padding: 5vw var(--marge) 3vw;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2em;
}
.pied pre { margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.12; color: #cfcfca; }
.pied p { margin: 0; text-align: right; line-height: 1.6; }
.pied a { text-underline-offset: .2em; }

/* ============ fenêtres moyennes ============ */

@media (max-width: 1100px) {
  .apropos-corps { grid-template-columns: minmax(0, 1fr); }
  .apropos-photo { grid-column: 1; grid-row: 1; position: static; margin: 0 calc(-1 * var(--marge)) 0 0; }
  .apropos .recit { grid-row: 2; margin-top: clamp(34px, 4vw, 60px); }
}

/* ============ téléphone ============ */

@media (max-width: 760px) {
  :root { --marge: 5vw; }
  body { font-size: 17px; }
  body::before {
    background:
      linear-gradient(var(--trait-bleu), var(--trait-bleu)) 3vw 0 / 1px 100% no-repeat,
      linear-gradient(var(--trait-rouge), var(--trait-rouge)) 64vw 0 / 1px 100% no-repeat,
      linear-gradient(var(--trait-bleu), var(--trait-bleu)) 96vw 0 / 1px 100% no-repeat;
  }

  .affiche { height: 166vw; }
  .m, .eboulis { font-size: 15vw; }
  .m-editions { left: 3vw; top: 6vw; }
  .m-des { left: 60vw; top: 23vw; }
  .m-ruines, .eboulis { left: 4vw; top: 41vw; }
  .facade { left: 33vw; top: 50vw; width: 52vw; }
  .sous-titre { left: 5vw; top: 135vw; font-size: 6.2vw; }
  .parenthese { left: 5vw; top: 145vw; width: 80vw; font-size: 15px; }

  .publication { display: block; padding-top: 16vw; }
  .couv { width: 74%; margin: 0 0 14vw 6%; }
  .notice h1, .notice h2 { font-size: 11vw; }
  .dos { font-size: 20px; }
  .boite { font-size: 14px; }
  .soiree { text-align: left; font-size: 17px; hyphens: manual; }

  .extrait { padding-left: var(--marge); margin-top: 16vw; font-size: 18px; }
  .extrait p.v { margin-left: min(var(--decal, 0), 2.5em); }
  .extrait .points { width: 60vw; }
  .extrait .points.fin { width: 70vw; }
  .aplat-jaune { width: 14vw; }
  .aplat-rose { width: 12vw; right: 0; }
  .aplat-gris { display: none; }
  .aplat-bleu { width: 8vw !important; }


  .apropos { padding-left: var(--marge); margin-top: 8vw; }
  .sous-titre-recit { font-size: 6.2vw; }
  .apropos-photo { margin: 0 calc(-1 * var(--marge)); }
  .tape { font-size: 17px; }
  .seuil { height: 22vw; }

  .titre-recit { font-size: 11vw; }
  .catalogue { margin-top: 16vw; }
  .catalogue { padding-left: var(--marge); }
  .entree { grid-template-columns: 34vw minmax(0, 1fr); column-gap: 5vw; }
  .e-titre { font-size: 8vw; }
  .bandeau { min-height: 34vw; padding: 5vw 36vw 5vw 5vw; }
  .b-nom { font-size: 9vw; }
  .b-sous { font-size: 15px; margin-top: 3vw; }
  .b-facade { right: 4vw; width: 28vw; }
  .colophon { padding-left: var(--marge); }
  .titre-colophon { font-size: 11vw; margin-top: 16vw; }
  .c-bloc h2, .titre-rubrique { font-size: 6.4vw; }
  .c-texte { font-size: 15px; }
  .c-intro { font-size: 19px; }
  .specimens { grid-template-columns: 1fr; row-gap: 40px; }
  .c-logo { grid-template-columns: 1fr; row-gap: 26px; }
  .c-logo-img { width: 62%; }
  .sp-grand { font-size: 30vw; }

  .lieux { padding-left: var(--marge); }
  .lieux table { width: 100%; font-size: 15px; }
  .lieux .rien { font-size: 15px; }
  .pied { padding: 12vw 5vw 8vw; margin-top: 22vw; }
  .pied p { text-align: left; }
}

/* ============ page d’erreur (v13, d’après celle de baptisteguilbert.com) ============ */

.erreur-page { padding: clamp(50px, 6vw, 110px) var(--marge) clamp(70px, 9vw, 160px) calc(8.33vw + 1vw); }
.oh { display: flex; align-items: center; gap: 3vw; flex-wrap: wrap; }
.oh h1 { margin: 0; font-size: 11vw; line-height: .9; letter-spacing: -.03em; transform: rotate(-2deg); transform-origin: left bottom; }
.triste { margin: 0; font-family: var(--mono); font-size: max(13px, 1.25vw); line-height: 1.15; }
.cadre-erreur { display: inline-block; margin: 3.4vw 0 0; padding: .5em .8em; border: var(--filet); box-shadow: 6px 6px 0 var(--encre); background: var(--papier); font-size: max(20px, 1.8vw); }
.retour { display: inline-block; margin-top: 1.6em; background: var(--encre); color: var(--papier); font-family: var(--mono); font-size: 14px; padding: .25em .6em; text-decoration: none; }
.retour:hover, .retour:focus-visible { background: var(--rouge); color: var(--encre); }
@media (max-width: 760px) {
  .oh h1 { font-size: 22vw; }
  .erreur-page { padding-left: var(--marge); }
}
