/* ============================================================
   RENCONTRES — Caractère Libre
   Page liste des rencontres · Figma node 2303-907 / 2303-1034
   ============================================================ */

/* Cette feuille ne se charge que sur la page Rencontres : on y neutralise le
   scroll-behavior:smooth global (main.css) pour que l'atterrissage sur l'ancre
   #renc-resultats (après un filtrage GET) soit INSTANTANÉ — le navigateur se
   positionne directement sur les filtres avant l'affichage, sans animation qui
   « remonte pour redescendre » (le tournis signalé). */
html { scroll-behavior: auto; }

/* ══════════════════════════════════════════════════
   PAGE BACKGROUND
   Rose du header jusqu'aux filtres (inclus)
   Gris clair sur la grille cards
══════════════════════════════════════════════════ */

.page-rencontres {
  background: #ffedf1;
}

/* Le header nav flotte sur le fond rose */
.page-rencontres .site-header {
  background: transparent;
}

@media (max-width: 1180px) {
  .page-rencontres .site-header {
    padding: 24px 16px 0;
  }
}

@media (max-width: 767px) {
  .page-rencontres .site-header {
    position: relative;
    padding: 12px 16px;
  }
}

/* Grille cards sur fond gris */
.page-rencontres .bloc-rencontres-grille {
  background: #F7F7F7;
}


/* ══════════════════════════════════════════════════
   INTRO RENCONTRES
══════════════════════════════════════════════════ */

.rencontres-intro {
  padding: 32px 0 0;
}

.rencontres-intro__grid {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 50px;
}

/* Colonne gauche */
.rencontres-intro__card {
  flex: 0 0 628px;
  width: 628px;
  height: 400px;
  background: #FFE2E9;
  border-radius: 24px;
  padding: 74px 74px 44px;
  display: flex;
  flex-direction: column;
  justify-content: top;
  gap: 16px;
  box-sizing: border-box;
}

.rencontres-intro__tagline {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: var(--weight-regular);
  color: var(--color-text);
  margin: 0;
}

.rencontres-intro__titre {
  font-family: var(--font-display);
  font-size: 62px;
  font-weight: var(--weight-black);
  text-transform: uppercase;
  color: #36344c;
  line-height: 1;
  margin: -10px 0 0 0;
  
}

.rencontres-intro__desc {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: var(--weight-regular);
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
}

/* Colonne droite — décalée de 34px vers le bas */
.rencontres-intro__media {
  flex: 0 0 494px;
  width: 494px;
  height: 400px;
  margin-top: 34px;
  position: relative;
  border-radius: 12px;
  /* overflow visible : le halo blanc du hover déborde de la zone (534×440) —
     le radius de la photo est porté par l'image elle-même */
  isolation: isolate;
}

/* Halo blanc au survol — Figma 534×440, radius 24 (média 494×400 + 20px de débord) */
.rencontres-intro__media::before {
  content: "";
  position: absolute;
  inset: -20px;
  border-radius: 24px;
  background: #fff;
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
  z-index: -1;
}

.rencontres-intro__media:hover::before { opacity: 1; }

/* Lien pleine zone → single-histoire.php de l'histoire mise en avant */
.rencontres-intro__media-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 12px;
}

.rencontres-intro__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: 12px;
}

/* Caption fond #36344C, ancrée en bas à droite — sans espace */
.rencontres-intro__caption {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 3;   /* au-dessus du lien pleine zone */
  display: flex;
  align-items: center;
  gap: 12px;
  background: #36344C;
  border-radius: 10px 10px 10px 0; /* bas-gauche à angle droit */
  padding: 14px 18px;
  text-decoration: none;
  color: #fff;
  transition: background var(--transition-fast);
  min-width: 208px;
}

.rencontres-intro__caption:hover {
  background: #2a2840;
}

.rencontres-intro__caption svg {
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  color: #fff;
  
}

.rencontres-intro__caption-auteur {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: var(--weight-black);
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 2px;
  line-height: 1.1;

}

.rencontres-intro__caption-titre {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  color: #fff;
  margin: 0;
  line-height: 1.1;
}

/* Intro : variante unique (V2 supprimée le 2026-07-18 — CSS/markup verbatim retirés) */

/* Neutralise le row-gap 120px de rencontre.css */
.cards-grid {
  row-gap: 80px;
}

/* ══════════════════════════════════════════════════
   FILTRES — dans la zone rose, alignés à gauche
══════════════════════════════════════════════════ */

.rencontres__filtres {
  padding-top: 32px;
  padding-bottom: 40px;
  /* Cible de l'ancre #renc-resultats : espace au-dessus des filtres quand la
     page filtrée atterrit dessus (voir cl_renc_filtre_url). */
  scroll-margin-top: 120px;
}

.page-rencontres .filtres__bar {
  justify-content: flex-start;
}

/* ══════════════════════════════════════════════════
   GRILLE DES CARDS
══════════════════════════════════════════════════ */

.bloc-rencontres-grille {
  padding-top: 40px;
  padding-bottom: 60px;
}

/* ══════════════════════════════════════════════════
   CARD-PERSO overrides — page Rencontres
══════════════════════════════════════════════════ */

.page-rencontres .card-perso {
  width: 292px;
  height: 490px;
  border-radius: 12px;
  background: #FFF;
  flex: 0 0 292px;
  overflow: hidden;
}

.page-rencontres .card-perso:hover {
  background: #ffe0e8;
}

/* Photo : 260×260px */
.page-rencontres .card-perso__photo-wrap {
  width: 260px;
  height: 260px;
  margin: 16px auto 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-surface);
  aspect-ratio: unset;
  flex-shrink: 0;
}

.page-rencontres .card-perso__photo {
  width: 260px;
  height: 260px;
  object-fit: cover;
}

/* Body : padding-top 25px (distance photo→auteur) */
.page-rencontres .card-perso__body {
  padding: 25px 16px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Auteur : 1er dans le DOM */
.page-rencontres .card-perso__auteur {
  font-family: "Big Shoulders Display", var(--font-display);
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  text-transform: uppercase;
  color: #36344C;
  margin: 0 0 4px;
}

/* Titre */
.page-rencontres .card-perso__titre {
  font-family: "Big Shoulders Display", var(--font-display);
  font-size: 32px;
  font-style: normal;
  font-weight: 900;
  line-height: normal;
  text-transform: uppercase;
  color: #36344C;
  margin: 0;
}

/* Appellation : 30px du bas de la card */
.page-rencontres .card-perso__appellation {
  margin-top: auto;
  padding-bottom: 30px;
  color: var(--color-blue);
}

/* Icône grappe */
.page-rencontres .card-perso__grappe {
  width: 20.998px;
  height: 26.896px;
}

/* Lien bloc */
.page-rencontres .card-perso__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

/* Message "aucun résultat" */
.rencontres__vide {
  color: var(--color-blue);
  text-align: center;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: var(--weight-medium);
  padding: 80px 0;
  width: 100%;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — TABLET (768–1180px)
══════════════════════════════════════════════════ */

@media (max-width: 1180px) {
  .rencontres-intro__titre { font-size: 56px; }
  .rencontres-intro__card  { padding: 32px; }

  .rencontres-intro__grid  { gap: 32px; }
  .rencontres-intro__card  { flex: 1; width: auto; }
  .rencontres-intro__media { flex: 1; width: auto; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 767px)
══════════════════════════════════════════════════ */

@media (max-width: 767px) {
  .rencontres-intro {
    padding: 20px 0 0;
  }

  /* Intro à 12px de chaque côté, comme la grille de cards (cohérence mobile) */
  .rencontres-intro > .container {
    width: calc(100% - 24px);
  }

  .rencontres-intro__grid {
    flex-direction: column;
    gap: 16px;
  }

  .rencontres-intro__card {
    width: 100%;
    flex: none;
    height: auto;
    padding: 24px 20px;
    gap: 12px;
  }

  .rencontres-intro__media {
    width: 100%;
    flex: none;
    height: 280px;
    margin-top: 0;
  }

  .rencontres-intro__tagline { font-size: 16px; }
  .rencontres-intro__titre   { font-size: 36px; }
  .rencontres-intro__desc    { font-size: 12px; }

  .rencontres__filtres {
    padding-top: 24px;
    padding-bottom: 28px;
  }

  .bloc-rencontres-grille {
    padding-top: 24px;
    padding-bottom: 40px;
  }

  /* Réduit les marges latérales sur la grille cards */
  .page-rencontres .bloc-rencontres-grille .container {
    width: calc(100% - 24px);
  }

  /* Annule le slider horizontal de components.css */
  .page-rencontres .cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow-x: visible;
    scroll-snap-type: none;
    margin-left: 0;
    margin-right: 0;
    gap: 12px;
    padding-bottom: 0;
  }

  .page-rencontres .cards-grid > * {
    scroll-snap-align: none;
    flex: none;
  }

  .page-rencontres .cards-grid > *:first-child {
    margin-left: 0;
  }

  /* Card : remplit la cellule grid → appellations alignées en bas de ligne */
  .page-rencontres .card-perso {
    width: 100%;
    flex: none;
    height: 100%;
  }

  .page-rencontres .card-perso__link {
    height: 100%;
  }

  .page-rencontres .card-perso__body {
    flex: 1;
  }

  .page-rencontres .card-perso__auteur { font-size: 16px; }
  .page-rencontres .card-perso__titre  { font-size: 24px; margin-bottom: 30px;}

  .page-rencontres .card-perso__appellation {
    font-size: 12px;
    line-height: 1.2;
    padding-bottom: 20px;

  }

  .page-rencontres .card-perso__grappe {
    width: 14px;
    height: 18px;
    flex-shrink: 0;
  }

  .page-rencontres .card-perso__photo-wrap {
    width: calc(100% - 24px);
    aspect-ratio: 1;
    height: auto;
    overflow: hidden;
  }

  .page-rencontres .card-perso__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .rencontres__vide {    font-size: 13px;}

  /* Glow de survol inutile sur mobile (tactile) : inset 0 pour ne pas
     déborder de 20px à droite et créer un scroll horizontal de page. */
  .rencontres-intro__media::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: transparent;
    opacity: 0;
    transition: opacity 220ms ease;
    pointer-events: none;
    z-index: -1;
}

}
