/* Page rencontres (v26) : pas de fond manuscrit (comme à propos/contact et journal), bande-fenêtre sous l'en-tête.
   Ouverture à la manière d'à propos (le bandeau défilant de la v27 est parti sur à propos, v29) ;
   un fil à la main que chaque rencontre croise ; photos en noir et blanc qui retrouvent leurs couleurs au toucher. */

html, .p-rencontres { background: var(--blanc); }

/* ---------- Ouverture : titre, photo ---------- */
.ouverture {
  position: relative;
  display: grid;
  grid-template-columns: 2.6em minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 4vw;
  padding: 44px 4vw 0;
  align-items: start;
}
.signe-titre { grid-column: 1; grid-row: 1; align-self: center; width: 2.1em; height: 2.1em; font-size: clamp(16px, 1.3vw, 19.5px); }
.signe-titre .signe { width: 100%; height: 100%; overflow: visible; }
.titre {
  grid-column: 2 / -1; grid-row: 1; margin: 0 0 0 -4vw;
  font-family: var(--termes); font-weight: 400;
  font-size: clamp(30px, 3vw, 46px); line-height: 1.05; letter-spacing: -.01em;
}
.titre em { font-style: italic; }

.portrait { grid-column: 2 / 4; grid-row: 2; margin: 34px 0 0; position: relative; z-index: 1; width: min(100%, 980px); justify-self: start; }
.photo { padding: 0; line-height: 0; }
.photo img { width: 100%; height: auto; }
.portrait .etiq { position: absolute; right: 14px; bottom: -11px; }

/* ---------- Publications Instagram ---------- */
.instagrams {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 5vw;
  padding: clamp(40px, 4vw, 70px) 4vw clamp(60px, 6vw, 100px);
}
.integre { padding: 0; position: relative; background: var(--blanc); overflow: hidden; }
.integre iframe { display: block; width: 100%; height: 100%; border: 0; position: relative; z-index: 1; background: var(--blanc); }
.insta { width: min(100%, 400px); height: 640px; }
.insta-1 { margin-top: 70px; }
/* dans l’aperçu (publications non chargées), le cadre se réduit au lien */
.integre.seul { height: 210px; }
.insta iframe, .video iframe { filter: grayscale(1); transition: filter .5s; }
.insta:hover iframe, .video:hover iframe { filter: none; }
/* repli (aperçu, ou si la publication ne se charge pas) : un lien tout simple */
.repli {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5em;
  color: var(--noir); text-decoration: none; font-family: var(--cursor); font-size: 13px; text-align: center; padding: 1em;
}
.repli .signe { width: 2.4em; height: 2.4em; }
.repli .adr { font-size: 11.5px; opacity: .7; }
.repli:hover span:not(.adr) { text-decoration: underline; }

/* ---------- RENCONTRES PASSÉES : grand mot noir en biais, coupé par le bord (comme les rubriques de l'accueil) ---------- */
.rubrique {
  margin: clamp(80px, 9vw, 150px) 0 clamp(40px, 4vw, 70px); overflow: hidden; line-height: .82; padding: .22em 0 .06em;
  font-family: var(--cn); font-weight: 700; text-transform: uppercase;
  font-size: 10.4vw; letter-spacing: -.01em; white-space: nowrap;
}
.rubrique span { display: inline-block; transform: rotate(-1.6deg) translateX(-2.2vw); transform-origin: left center; padding: .06em 0; }

/* ---------- Le fil des rencontres ---------- */
.fil-des-rencontres { position: relative; padding: 0 4vw; }
.rencontre {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr);
  align-items: start;
  padding: 0 0 clamp(60px, 6.5vw, 110px);
}
.trace { position: absolute; top: 0; bottom: 0; left: 50%; width: 22px; transform: translateX(-50%); }
.trace .fil { position: absolute; inset: 0; width: 100%; height: 100%; }
.rencontre:last-child .trace .fil { height: 70%; }
.trace .croise {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 34px; background: var(--blanc); border-radius: 50%; padding: 3px;
}
.trace .croise .signe { width: 100%; height: 100%; overflow: visible; }

.texte {
  grid-row: 1; margin: 6px 0 0;
  padding: 16px 20px 18px;
  font-family: var(--termes); font-size: clamp(16px, 1.25vw, 19px); line-height: 1.38;
  max-width: 34em;
}
.texte p { margin: 0 0 .7em; }
.texte a { color: inherit; text-underline-offset: .15em; text-decoration-thickness: 1px; }
.texte a:hover { text-decoration-thickness: 2px; }
.texte strong { font-weight: 700; }
.gauche .texte { grid-column: 1; justify-self: end; }
.droite .texte { grid-column: 3; justify-self: start; }

.photos { grid-row: 1; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 22px 18px; padding-top: 34px; }
.gauche .photos { grid-column: 3; justify-content: flex-start; }
.droite .photos { grid-column: 1; grid-row: 1; justify-content: flex-end; }
.ph { margin: 0; position: relative; flex: 0 0 auto; }
/* largeur selon le nombre de photos et leur format (--r = largeur / hauteur) */
.n1 .ph { width: min(100%, calc(290px * var(--r) + 90px)); max-width: min(400px, var(--w)); }
.n2 .ph, .n3 .ph, .n4 .ph { width: min(46%, calc(210px * var(--r) + 60px)); max-width: var(--w); }
.n2 .ph-1, .n4 .ph-1, .n4 .ph-3, .n3 .ph-1 { margin-top: 46px; }
.ph-video { width: 100% !important; max-width: 440px; margin-top: 0 !important; }
.video { aspect-ratio: 16 / 9; width: 100%; }
.ph .etiq { display: inline-block; margin: 12px 0 0 10px; font-size: 11.5px; line-height: 1.35; max-width: 92%; }

/* Les souvenirs : noir et blanc, avec un grain ; la couleur revient au survol (ordinateur) ou au toucher (téléphone) */
.souvenir {
  display: block; width: 100%; padding: 0; margin: 0; line-height: 0; cursor: pointer;
  position: relative; overflow: hidden; font: inherit; color: inherit;
}
.souvenir img { width: 100%; height: auto; filter: grayscale(1) contrast(1.08); transition: filter .6s ease; }
.souvenir::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .38; mix-blend-mode: multiply; transition: opacity .6s ease;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1.4 -.35'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
}
@media (hover: hover) {
  .souvenir:hover img { filter: none; }
  .souvenir:hover::after { opacity: 0; }
}
.souvenir[aria-pressed="true"] img { filter: none; }
.souvenir[aria-pressed="true"]::after { opacity: 0; }
.souvenir:focus-visible { outline: 2px solid var(--noir); outline-offset: 4px; }

/* ---------- Téléphone / fenêtre étroite : une colonne, le fil à gauche ---------- */
@media (max-width: 760px) {
  .ouverture { grid-template-columns: 2.2em minmax(0, 1fr); padding: 30px 5vw 0; column-gap: 0; }
  .titre { grid-column: 2; margin: 0; }
  .portrait { grid-column: 1 / -1; grid-row: 2; margin: 28px 0 0; width: 100%; }

  .instagrams { padding: 40px 5vw 50px; gap: 40px; }
  .insta { width: 100%; max-width: 420px; }
  .insta-1 { margin-top: 0; }

  .rubrique { font-size: 19vw; margin: 70px 0 30px; white-space: normal; line-height: .84; }
  .rubrique span { transform: rotate(-1.6deg) translateX(-1.5vw); }

  .fil-des-rencontres { padding: 0 5vw 0 0; }
  .rencontre { grid-template-columns: 46px minmax(0, 1fr); padding-bottom: 56px; }
  .trace { left: 23px; }
  .gauche .texte, .droite .texte { grid-column: 2; grid-row: 1; justify-self: stretch; max-width: none; }
  .gauche .photos, .droite .photos { grid-column: 2; grid-row: 2; justify-content: flex-start; padding-top: 26px; }
  .n1 .ph { width: min(100%, calc(260px * var(--r) + 90px)); }
  .n2 .ph, .n3 .ph, .n4 .ph { width: calc(50% - 9px); }
  .n2 .ph-1, .n4 .ph-1, .n4 .ph-3, .n3 .ph-1 { margin-top: 30px; }
}
