/* ==========================================================================
   PAGE: HOME
   ========================================================================== */

.template-home .site-main {
  max-width: none;
  padding: 0;
}

/* No header menu on the home page (not rendered, see snippets/header.php):
   the menu entries are the big blocks below the video */

.template-home .hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.template-home .hero-content {
  margin: 0;
  padding: 0;
  width: 100%;
  background: transparent;
  text-align: center;
}

.template-home .hero-content h1 {
  color: var(--color-orange);
  font-family: 'Plaak21A', var(--font-title);
  font-size: 27.5vw;
  line-height: 1;
  white-space: nowrap;
  width: 100%;
  margin: 0;
  padding: 0;
}

.template-home .hero-content .hero-subtitle {
  font-family: var(--font-title);
  color: var(--color-orange);
  text-transform: uppercase;
  font-size: clamp(22px, 2.8vw, 50px);
  font-weight: normal;
  letter-spacing: 0.04em;
  line-height: 1;
  margin: 0;
  margin-top: -1em;
  text-align: center;
  /* stays readable on light frames of the video */
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

.template-home .home-construction-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  background: #000;
  overflow: hidden;
  padding: 10px 0;
}

.template-home .home-construction-track {
  display: flex;
  align-items: center;
  gap: 4rem;
  width: max-content;
  white-space: nowrap;
  will-change: transform;
  animation: home-band-scroll-rtl 16s linear infinite;
}

.template-home .home-construction-track span {
  color: #fff;
  font-family: var(--font-title);
  font-size: clamp(22px, 2.8vw, 42px);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@keyframes home-band-scroll-rtl {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0%);
  }
}

/* ==========================================================================
   SPLIT HERO — The site menu as big blocks (one per menu entry, home.php)
   ========================================================================== */

/* Maquette : blocs jointifs (aucune gouttière) */
.home-split-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: var(--gap);
  background: var(--color-light-bg);
  min-height: 100vh;
}

.home-split-block {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  /* titles are sized against the block width (cqi) */
  container-type: inline-size;
  /* blocks whose page has no image */
  background: var(--bg);
  color: var(--fg);
  text-decoration: none;
}

.home-split-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 for text readability */
.home-split-block::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;
}

/* --home-title-size is the wanted size; the second font-size caps it so the
   title never gets wider than its block (cqi = 1% of the block width).
   Plaak56: RÉFÉRENCES is 7.75em wide; Plaak21A: LIEUX COMMUNS, 2.12em.
   Maquette : ni étirement vertical ni espacement de lettres. */
.home-split-title {
  --home-title-size: clamp(32px, 8vw, 80px);
  position: relative;
  z-index: 2;
  max-width: 100%;
  font-family: var(--font-subtitle);
  font-size: var(--home-title-size);
  font-size: min(var(--home-title-size), calc((100cqi - 2 * var(--gap)) / 8));
  overflow-wrap: anywhere;
  letter-spacing: 0;
  font-variant-ligatures: none;
  line-height: 1;
  text-transform: uppercase;
  text-align: center;
  padding: 0 var(--gap) var(--gap);
  color: #F0EFEF;
}

.home-split-spectacles .home-split-title {
  font-family: 'Plaak56', var(--font-subtitle);
}

.home-split-lieux-communs .home-split-title {
  --home-title-size: clamp(96px, 24vw, 240px);
  font-family: 'Plaak21A', var(--font-title);
  font-size: min(var(--home-title-size), calc((100cqi - 2 * var(--gap)) / 2.2));
}

/* From 960px: two entries per row, at the maquette's 617×849 proportion; an
   odd entry left over (Références today) runs the full width under the pair.
   Thomas, 15/11/2026. One column below 960px (home-mobile.css). */
@media (min-width: 960px) {
  .home-split-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
    container-type: inline-size;
  }

  /* height from the column width (50cqi), never taller than the screen; an
     aspect-ratio with a max-height would narrow the blocks instead */
  .home-split-block {
    height: min(calc(50cqi * 849 / 617), 100svh);
  }

  .home-split-block:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    height: auto;
    min-height: 50svh;
  }

  /* same title size as in a half-width block */
  .home-split-block:last-child:nth-child(odd) .home-split-title {
    --home-title-size: 5.675cqi;
  }

  /* Maquette à 1280 : blocs de 617px, SPECTACLES 70px (Plaak 56), LIEUX COMMUNS
     227px (Plaak 21A), soit 11,35 % et 36,8 % de la largeur du bloc : ces
     proportions suivent la largeur réelle du bloc */
  .home-split-title {
    --home-title-size: 11.35cqi;
  }

  .home-split-lieux-communs .home-split-title {
    --home-title-size: 36.8cqi;
  }

  /* Maquette : les deux titres sur une même ligne de base, 42px au-dessus du
     bas d'un bloc de 617px (6,8cqi). Padding = 6,8cqi moins ce que la ligne
     garde sous sa ligne de base (0,2em en Plaak 56 ; 0,05em en Plaak 21A à
     l'interligne 0,8) */
  .home-split-spectacles .home-split-title {
    padding-bottom: 4.53cqi;
  }

  .home-split-lieux-communs .home-split-title {
    line-height: 0.8;
    padding-bottom: 4.96cqi;
  }
}


/* ==========================================================================
   ACTUALITÉS — les trois prochaines actualités (home.php), maquette 1612:630
   (cadre de 1280, 1vw = 12,8px) : titre Plaak 21A de 227px, capitales 99px
   sous la vidéo, ligne de base 16px au-dessus d'une bande #050505 de 16px
   pleine largeur ; 48px plus bas, trois vignettes jointives de 411×328 dans
   les marges de 24px ; date Plaak 44B de 72,9px blanche sur l'image, à 8px
   du bord gauche et du bas ; légende « NOM DU PROJET · LIEU · QUI ACCUEILLE »
   en Plaak 56 de 14-14,8px, ligne de base 25px sous l'image ; 88px avant les
   blocs Spectacles / Lieux communs. Téléphone : home-mobile.css (326:372).
   ========================================================================== */

.home-news {
  /* la marge du titre reste dans le bloc (pas de fusion avec la vidéo) */
  display: flow-root;
  padding: 0 0 5vw;
  background: var(--color-light-bg);
  color: #050505;
}

.home-news-title {
  /* Plaak 21A à l'interligne 1 : ligne de base 0,85em sous le haut de la
     boîte, capitales de 0,70em ; donc capitales à 0,15em du haut et ligne de
     base à 0,15em du bas de la boîte */
  margin: calc(7.73vw - 0.15em) 0 calc(1.25vw - 0.15em);
  padding: 0 var(--gap);
  font-family: 'Plaak21A', var(--font-title);
  font-size: 17.73vw;
  line-height: 1;
  letter-spacing: 0;
  font-variant-ligatures: none;
  color: #050505;
}

.home-news-title-phone {
  display: none;
}

.home-news-band {
  height: 1.25vw;
  background: #050505;
}

.home-news-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 3.75vw;
  padding: 0 var(--gap);
}

.home-news-item {
  min-width: 0;
}

.home-news-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.home-news-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 411 / 328;
  background: #050505;
}

.home-news-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* interligne 0,75 : la ligne de base est 0,125em au-dessus du bas de la boîte */
.home-news-date {
  position: absolute;
  z-index: 5;
  left: 0.625vw;
  bottom: calc(0.625vw - 0.125em);
  font-family: 'Plaak44B', var(--font-title);
  font-size: 5.699vw;
  line-height: 0.75;
  letter-spacing: 0;
  font-variant-ligatures: none;
  color: #FFFFFF;
  white-space: nowrap;
  pointer-events: none;
}

/* nom du projet au bord de l'image, lieu à 36 % (149px sur 411), qui
   accueille calé à droite ; quand la ligne est trop courte, « qui
   accueille » passe à la ligne suivante, toujours calé à droite */
.home-news-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.6vw;
  margin: 0.97vw 0 0;
  font-family: 'Plaak56', var(--font-subtitle);
  font-size: max(12px, 1.094vw);
  line-height: 1.2;
  letter-spacing: 0;
  font-variant-ligatures: none;
  text-transform: uppercase;
  color: #050505;
}

/* les deux premières légendes s'arrêtent 37px avant le bord de leur image
   (374px sur 411), la dernière va jusqu'au bord, comme dessiné */
.home-news-item:not(:last-child) .home-news-caption {
  padding-right: 2.9vw;
}

.home-news-project {
  flex: 0 0 auto;
  min-width: 36.25%;
  max-width: 100%;
  font-size: max(12px, 1.156vw);
}

.home-news-place {
  flex: 0 1 auto;
  min-width: 0;
}

.home-news-host {
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
  text-align: right;
}

.home-news-link:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 4px;
}
