/* ==========================================================================
   PAGE: SPECTACLES
   ========================================================================== */

/* ==========================================================================
   HEADER HERO — 100vh, title + video + intro text, scaled to fill viewport
   ========================================================================== */

.spectacles-header {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Title block — ~30vh top zone */
.spectacles-header-content {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  height: 30vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.spectacles-header-content h1 {
  font-size: var(--size-h1);
  letter-spacing: 0;
  line-height: 0.85;
  margin: 0;
  margin-bottom: -4.5vh;
}

/* Hero video/image — ~40vh middle zone */
.spectacles-hero {
  position: relative;
  flex: 0 0 auto;
  height: 40vh;
  overflow: hidden;
}

.spectacles-hero-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Intro text — ~30vh bottom zone */
.spectacles-section-intro {
  position: relative;
  z-index: 2;
  padding: var(--gap);
  flex: 1 0 auto;
  display: flex;
  align-items: center;
}

/* Maquette : texte dans le blanc du texte (#F0EFEF), colonne de 938px */
.spectacles-section-text {
  font-size: var(--text-md);
  color: var(--fg);
  max-width: min(100%, 938px);
}

.spectacles-section-text p {
  margin: 0 0 0.6em;
}

.spectacles-section-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 959px) {
  .spectacles-header {
    min-height: auto;
    padding-top: 0;
  }

  /* Maquette « Spectacles mobile » (cadre 393, 329:526), en vw : titre au
     bord de la marge, ses capitales 24,58vw (97px) sous le haut de l'écran,
     donc sous le logo, sa ligne de base 1,17vw (4,6px) sous le haut de la
     vidéo ; vidéo de 363×173. Ligne de base à 0,8em du haut de la ligne
     (interligne 0,9), bas de ligne 0,1em sous elle. Thomas, 16/11/2026. */
  .spectacles-header-content {
    height: auto;
    padding: 0;
    align-items: flex-start;
    justify-content: flex-start;
  }

  /* Maquette mobile : 120px à 393px (100px sur les autres pages) */
  .spectacles-header-content h1 {
    font-size: clamp(120px, calc(49px + 12.97vw), 227px);
    line-height: 0.9;
    margin: calc(24.58vw - 0.1em) 0 calc(-1.17vw - 0.1em);
    max-width: min(100%, 7ch);
  }

  .spectacles-hero {
    height: auto;
    aspect-ratio: 363 / 173;
  }

  .spectacles-section-intro {
    padding: 24px var(--gap) 20px;
    align-items: flex-start;
  }

  .spectacles-section-text {
    font-size: clamp(18px, 4.6vw, 20px);
  }
}

/* Desktop hero refinements */
@media (min-width: 960px) {
  /* Maquette (cadre 1280, 734:638), en vw : titre à 62,1vw du bord (capitales
     de 798 à 1117 px), ses capitales 12,9vw sous le haut de l'écran, sa ligne
     de base 2,15vw (27 px) sous le haut de la vidéo, qu'il recouvre. Ligne de
     base à 0,775em du haut de sa ligne (interligne 0,85), bas de ligne 0,075em
     sous elle. Thomas, 16/11/2026. */
  .spectacles-header-content {
    height: auto;
    display: block;
    /* inside the section's own padding (24px) */
    padding: calc(12.9vw - 0.075 * var(--size-h1) - var(--section-padding-y)) 0 0 calc(62.1vw - var(--gap));
  }

  .spectacles-header-content h1 {
    margin-bottom: calc(-2.15vw - 0.075em);
  }

  /* Maquette à 1280 : texte de x = 66 à 1004 (938px), soit 5,16vw du bord et
     73,3 % de la largeur ; la proportion vaut à toutes les largeurs (Thomas,
     16/11/2026) */
  .spectacles-section-intro {
    padding: var(--section-padding-y) clamp(32px, 6vw, 60px) clamp(32px, 5vw, 40px) calc(5.16vw - var(--gap));
  }

  .spectacles-section-text {
    max-width: 73.3vw;
  }

  /* Maquette : vidéo de 1216 × 400 dans les marges de 24px (celles de la section) */
  .spectacles-hero {
    height: auto;
    aspect-ratio: 1216 / 400;
  }
}

/* ==========================================================================
   PROJECT GRID — 2-column cards with background image
   ========================================================================== */

.spectacles-section {
  background-color: var(--color-light-bg);
  padding: var(--gap);
}

.spectacles-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
}

.spectacles-list-item {
  position: relative;
  overflow: hidden;
  /* card titles are sized against the card width (cqi) */
  container-type: inline-size;
}

.spectacles-list-link {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-decoration: none;
  color: var(--fg);
  position: relative;
  height: 70vh;
  overflow: hidden;
}

/* Background image — always visible */
.spectacles-list-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.4s ease, filter 0.4s ease;
}

/* Dark gradient at bottom for text readability */
.spectacles-list-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Title — centered at bottom, white text, transparent bg */
.spectacles-list-title {
  font-family: var(--font-title);
  font-size: clamp(24px, 5vw, 48px);
  letter-spacing: 0;
  font-variant-ligatures: none;
  overflow-wrap: break-word;
  line-height: 1;
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 0 var(--gap) var(--gap);
}

/* Title font chosen per project in the Panel ("Police du titre");
   without a choice, the mock-up's order by place (spectacles.php) */
.spectacles-list-title.title-font-plaak33 { font-family: 'Plaak33', var(--font-title); }
.spectacles-list-title.title-font-plaak21a { font-family: 'Plaak21A', var(--font-title); }
.spectacles-list-title.title-font-plaak21b { font-family: 'Plaak21B', var(--font-title); }
.spectacles-list-title.title-font-plaak26 { font-family: 'Plaak26', var(--font-title); }
.spectacles-list-title.title-font-plaak44b { font-family: 'Plaak44B', var(--font-title); }
.spectacles-list-title.title-font-plaak56 { font-family: 'Plaak56', var(--font-title); }

/* Sizes of the mock-up's three fonts: 70px (56), 227px (21A) and 100px (44B)
   on a 616px card at 1280, i.e. 11.36%, 36.85% and 16.23% of the card width.
   Plaak 33, 21B and 26 are not in the mock-up: they keep the sizes below. */
.spectacles-list-title.title-font-plaak56 { font-size: 11.36cqi; }
.spectacles-list-title.title-font-plaak21a { font-size: 36.85cqi; }
.spectacles-list-title.title-font-plaak44b { font-size: 16.23cqi; }

/* Maquette : la dernière ligne de base du titre à 30px du bas d'une carte de
   616px (4,87cqi), quelle que soit la police (padding = 4,87cqi moins ce que
   la ligne garde sous sa ligne de base) */
@media (min-width: 960px) {
  .spectacles-list-title.title-font-plaak21a { line-height: 0.8; padding-bottom: 3.03cqi; }
  .spectacles-list-title.title-font-plaak56 { line-height: 1; padding-bottom: 2.6cqi; }
  .spectacles-list-title.title-font-plaak44b { line-height: 1; padding-bottom: 0.81cqi; }
}

.spectacles-list-year {
  display: none;
}

/* 2-column grid on larger screens */
@media (min-width: 768px) {
  .spectacles-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  /* Maquette : cartes de 616 × 745 en moyenne (632 et 600 de large) */
  .spectacles-list-link {
    height: auto;
    aspect-ratio: 616 / 745;
  }

  .spectacles-list-title {
    font-size: clamp(28px, 10vh, 80px);
  }
}

@media (max-width: 959px) {
  .spectacles-section {
    padding: 12px var(--gap) var(--gap);
  }

  .spectacles-list-link {
    height: 56svh;
    min-height: 360px;
  }

  .spectacles-list-title {
    font-size: clamp(28px, 7.5vw, 42px);
    padding-bottom: 20px;
  }
}
