/* Page d'accueil */

.accueil { position: relative; padding-bottom: 4vh; }
.accueil > .ligne-axe { position: absolute; top: 0; bottom: 0; left: 61%; width: 10px; height: 100%; }

.section { position: relative; z-index: 1; padding: 0 4vw 2vw; }
:root { --titre-carte: clamp(22px, 1.75vw, 28px); --info-carte: 13px; }

/* Rubriques : un grand mot en contour, coupé par un bord de l'écran, que les couvertures recouvrent à peine */
/* Rubriques : un grand mot noir, un peu en biais, coupé par un bord de l'écran */
.rubrique {
  position: relative;
  z-index: 0;
  margin: 8vw 0 -1vw;
  font-size: 13.5vw;
  line-height: .8;
  white-space: nowrap;
  color: var(--noir);
  pointer-events: none;
}
.rubrique.gauche { margin-left: -1.6vw; transform: rotate(-1.6deg); transform-origin: left center; }
.rubrique.droite { text-align: right; margin-right: -1.8vw; transform: rotate(1.4deg); transform-origin: right center; }
.section-titre { position: relative; z-index: 2; }

/* ---------- Les six livres ---------- */
.livres {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 2vw;
  row-gap: 3vw;
  align-items: start;
}
.livre {
  position: relative;
  grid-column: var(--c) / span var(--s);
  grid-row: var(--r);
  margin-top: var(--m, 0);
  z-index: 1;
}
.livre .couv { width: 100%; }
.livre .fiche {
  position: relative;
  z-index: 2;
  margin: -2.6em 0 0 var(--decal, 14%);
  width: max(230px, calc(100% - var(--decal, 14%)));
  padding: 12px 16px 13px;
}
.livre.a-gauche .fiche { margin-left: calc(-1 * var(--decal, 14%)); }
.fiche .titre {
  display: block;
  font-family: var(--cn);
  font-weight: 700;
  font-size: var(--titre-carte);
  line-height: 1;
  text-decoration: none;
  margin-bottom: 6px;
}
.fiche a.titre:hover, .fiche a.titre:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .1em; }
.fiche .info { font-family: var(--cursor); font-size: var(--info-carte); line-height: 1.4; margin: 0; }
.livre .geste { z-index: 0; }

/* ---------- Les textes collectifs ---------- */
.collectifs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 2vw;
  row-gap: 3vw;
  align-items: start;
}
.collectif { position: relative; grid-column: var(--c) / span var(--s); grid-row: var(--r); margin-top: var(--m, 0); z-index: 1; }
.collectif .couv { width: 100%; }
.collectif .fiche { position: relative; z-index: 2; margin: -2.2em 0 0 10%; width: max(230px, 90%); padding: 12px 16px 13px; }

/* Les cartes d'articles sont dans articles.css (v49), partagé avec la page articles. */

/* ---------- Tablette ---------- */

/* ---------- Téléphone : une seule colonne ---------- */
@media (max-width: 760px) {
  body { font-size: 18px; }
  .section { padding: 0 5vw 4vw; }
  .rubrique { font-size: 17vw; margin: 14vw 0 0; }
  .accueil > .ligne-axe { left: 88%; }
  .livres, .collectifs { display: block; }
  .livre, .collectif { margin: 0 0 13vw; width: 88%; }
  .livre:nth-child(even), .collectif:nth-child(even) { margin-left: auto; }
  .livre .fiche, .livre.a-gauche .fiche { margin: -2.2em 0 0 12%; width: calc(100% + 6%); }
  .livre:nth-child(even) .fiche { margin-left: -18%; }
  .livre.petit { width: 66%; }
  .collectif .fiche { margin-left: 8%; width: 100%; }
  .collectif:nth-child(even) .fiche { margin-left: -12%; width: 112%; }
  .geste.ordi { display: none; }
}

/* ---------- Prochainement (v51) : trois annonces en cadres, à la manière des cartes ;
   titres en Times comme les pages journal et à propos (« pr*o*gramme »), notes en Courier comme les fiches ---------- */
.programmes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 2vw;
  align-items: start;
}
.programme { position: relative; z-index: 1; grid-column: var(--c) / span var(--s); grid-row: 1; margin-top: var(--m, 0); padding: 18px 20px 20px; }
.programme p { margin: 0; }
.prog-titre { font-family: var(--termes); font-weight: 400; font-size: clamp(28px, 2.3vw, 38px); line-height: 1.02; letter-spacing: -.01em; margin: 0 0 16px; }
.prog-titre em { font-style: italic; }
.annonce, .texte-prog { font-family: var(--termes); font-size: clamp(16.5px, 1.2vw, 18.5px); line-height: 1.45; }
.annonce { margin-bottom: 12px !important; }
.lien-prog { margin-bottom: 14px !important; }
.lien-prog .etiq { font-size: 12px; word-break: break-all; }
.infos { font-family: var(--cursor); font-size: var(--info-carte); line-height: 1.45; }
.infos + .infos { margin-top: 7px !important; }
.resume { margin-top: 16px !important; padding-top: 14px; border-top: 1.5px solid var(--noir); font-family: var(--termes); font-size: 15.5px; line-height: 1.45; }
.resume em { font-style: italic; }
.texte-prog em { font-style: italic; }

/* les cinq images du livre à venir : une bande de vignettes à faire défiler, en noir et blanc, en couleurs au survol ;
   un clic les ouvre en grand (visionneuse) */
.bande-vignettes {
  display: flex; gap: 8px; margin: 18px -20px -20px; padding: 12px 20px 16px;
  overflow-x: auto; scroll-snap-type: x proximity; border-top: 1.5px solid var(--noir);
  scrollbar-width: thin; scrollbar-color: var(--noir) transparent;
}
.bande-vignettes:focus-visible { outline: 2px solid var(--noir); outline-offset: -4px; }
.vignette { flex: 0 0 auto; scroll-snap-align: start; display: block; line-height: 0; border: 1.5px solid var(--noir); cursor: zoom-in; }
.vignette img { height: 150px; width: auto; filter: grayscale(1) contrast(1.05); transition: filter .5s; }
.vignette:hover img, .vignette:focus-visible img { filter: none; }

/* dernier programme : la photographie, grande, sous le texte */
.dernier .prog-photo { margin: 18px -20px -20px; border-top: 1.5px solid var(--noir); line-height: 0; }
.dernier .prog-photo img { width: 100%; height: auto; display: block; }
.prog-photo.attente { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: var(--papier); line-height: 1; }
.prog-photo.attente span { font-family: var(--cursor); font-size: 12px; opacity: .6; }

/* visionneuse (comme sur les pages de livres) */
a.visionneuse { cursor: zoom-in; }
.visio { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; }
.visio[hidden] { display: none; }
.visio img { max-width: 92vw; max-height: 90vh; width: auto; height: auto; background: #fff; box-shadow: 8px 8px 0 #000; }
.visio-b { position: absolute; border: 0; background: #fff; color: #000; font-family: var(--cursor); font-size: 28px; line-height: 1; width: 48px; height: 48px; cursor: pointer; }
.visio-b:hover, .visio-b:focus-visible { background: #000; color: #fff; outline: 1.5px solid #fff; }
.visio-fermer { top: 16px; right: 16px; }
.visio-prec { left: 16px; top: 50%; transform: translateY(-50%); }
.visio-suiv { right: 16px; top: 50%; transform: translateY(-50%); }
.visio-n { position: absolute; bottom: 12px; left: 0; right: 0; margin: 0; text-align: center; color: #fff; font-family: var(--cursor); font-size: 13px; }
@media (max-width: 760px) { .visio img { max-width: 100vw; max-height: 82vh; } .visio-prec, .visio-suiv { top: auto; bottom: 8px; transform: none; } }

/* tablette : deux annonces côte à côte, la troisième dessous */
@media (max-width: 1100px) {
  .programme:nth-child(1) { --c: 1 !important; --s: 6 !important; grid-row: 1; }
  .programme:nth-child(2) { --c: 7 !important; --s: 6 !important; grid-row: 1; }
  .programme:nth-child(3) { --c: 3 !important; --s: 8 !important; grid-row: 2; margin-top: 5vw; }
}
/* téléphone : l'une sous l'autre, en quinconce ; « PROCHAINEMENT » un peu plus petit pour qu'on le lise en entier */
@media (max-width: 760px) {
  .rubrique.long { font-size: 13.4vw; margin-right: -1vw; }
  .programmes { display: block; }
  .programme { width: 90%; margin: 0 0 9vw; }
  .programme:nth-child(even) { margin-left: auto; }
  .vignette img { height: 130px; }
}
