/* ------------------------------------------------------------------
   Piece pages (2026 redesign) – template site/templates/piece.php
   ------------------------------------------------------------------ */

/* Wider page, keeping clear of the vertical name on the right */
.piece-wide { width: 90%; }
@media (min-width: 768px) {
  .piece-wide { width: calc(100% - 160px); }
}

/* Title */
.piece-head { margin: 24px 0 20px; }
.piece-title {
  font-family: 'GraebenbachMedium', Helvetica, sans-serif;
  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: 0.02em;
}
@media (min-width: 992px) { .piece-title { font-size: 4rem; } }
.piece-abstract { margin-top: 12px; font-size: 1.05rem; max-width: 36em; color: #444; }

/* Large image */
.piece-hero { position: relative; margin-bottom: 14px; background: #000; }
.piece-hero button,
.piece-thumbs button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
/* Whole photo, never cropped: wide photos fill the width, upright ones sit centred on black */
.piece-hero img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 82vh;
  margin: 0 auto;
}
.piece-hero .piece-hero-label {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: auto;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.9);
  color: #000;
}
.piece-hero .piece-hero-label:hover { background: var(--accent); color: var(--on-accent); }

/* Thumbnails (when there are several photos) */
.piece-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.piece-thumbs img { display: block; width: 100%; height: auto; transition: opacity 0.2s; }
.piece-thumbs button:hover img { opacity: 0.75; }

/* Text area uses the full page width (lines, boxes, cards);
   only the running text itself keeps a comfortable reading width */
.piece-text { margin-top: 40px; }
.piece-text :is(p, li, blockquote, h3, h4) { max-width: 46em; }
.piece-text .collab :is(p, h3) { max-width: none; }
/* Lead text in the normal font size since 2026-11-07 (David: one text size on the whole site, less scrolling on phones) */
.piece-lead { font-size: inherit; line-height: inherit; }
.piece-lead p + p { margin-top: 0.7em; }
/* Same distance above the coloured line as below it (and as between the text blocks on ODC), 2026-11-07 */
.piece-lead + .fullborder { margin-top: 28px; }
.piece-quote {
  margin: 32px 0 0;
  padding-left: 18px;
  border-left: 3px solid var(--accent);
  font-size: 1.15rem;
  font-style: italic;
}
/* The old stylesheet makes quotes very large; one step smaller here */
.piece-quote blockquote, .piece-quote blockquote p { font-size: 1.3rem; line-height: 1.4; }

/* Videos: click to load */
.piece-videos { margin-top: 48px; scroll-margin-top: 70px; }
.video-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.video-tab {
  font: inherit;
  font-size: 0.95rem;
  padding: 5px 14px;
  border: 1px solid #000;
  background: none;
  cursor: pointer;
}
.video-now { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: #666; margin-bottom: 8px; }
.video-now::before { content: "▶ "; color: var(--accent); }
.video-tab.is-active, .video-tab:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #111;
  overflow: hidden;
}
.video-frame > * { position: absolute; }
.video-poster { inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.video-frame iframe { inset: 0; width: 100%; height: 100%; border: 0; }
.video-play {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  font: inherit;
  font-size: 1.1rem;
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
}
.video-play:hover { filter: brightness(1.08); }
.video-play-icon { font-size: 0.9rem; }
.video-notice {
  left: 0; right: 0; bottom: 10px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Fold-out sections */
.piece-folds { margin-top: 48px; }
.fold { border-top: 3px solid var(--accent); }
.fold:last-child { border-bottom: 1px solid #ddd; }
.fold summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-family: 'GraebenbachMedium', Helvetica, sans-serif;
  font-size: 1.1rem;
  text-transform: uppercase;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: '+'; font-size: 1.5rem; line-height: 1; }
.fold[open] summary::after { content: '−'; }
.fold summary:hover { color: #555; }
.fold-body { padding: 0 0 22px; }
.fold-body p + p { margin-top: 0.7em; }
.press-article + .press-article { margin-top: 18px; }

/* Supporters and previous/next */
.piece .sup-row { margin-top: 8px; }
.piece .paginate { margin-top: 48px; }

/* Full-screen gallery */
.gallery {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 10, 10, 0.97);
  display: flex;
  flex-direction: column;     /* image, then its caption right below it */
  align-items: center;
  justify-content: center;
}
.gallery[hidden] { display: none; }
.gallery-img {
  width: auto;
  max-width: 94vw;
  max-height: 82vh;           /* leaves room for the caption under the image and the counter at the bottom */
  object-fit: contain;
}
.gallery button {
  position: absolute;
  border: 0;
  background: none;
  color: #fff;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  padding: 10px 18px;
  opacity: 0.8;
}
.gallery button:hover { opacity: 1; color: var(--accent); }
.gallery-close { top: 10px; right: 14px; }
.gallery-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.gallery-next { right: 8px; top: 50%; transform: translateY(-50%); }
.gallery-count {
  position: absolute;
  bottom: 14px;
  left: 0; right: 0;
  text-align: center;
  color: #ccc;
  font-size: 0.9rem;
}
body.gallery-is-open { overflow: hidden; }

/* Photo credits */
.piece-credit { margin: -6px 0 14px; font-size: 0.8rem; color: #666; text-align: right; }
.gallery-caption {
  margin: 12px auto 28px;     /* directly under the image, above the counter */
  max-width: min(80vw, 760px);
  text-align: center;
  color: #bbb;
  font-size: 0.85rem;
  line-height: 1.4;
}
.gallery-caption:empty { display: none; }

/* ------------------------------------------------------------------
   Logo on the first photo, like a poster (field "Logo on photo": white / black / off)
   ------------------------------------------------------------------ */
.piece-hero .gallery-open { text-align: center; line-height: 0; }
.hero-frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
}
/* The logo layer spans the photo's width, so the text logos can scale with it */
.hero-logo {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6%;
  padding-left: 5%;
  opacity: 0.8;
  pointer-events: none;
  line-height: 1;
  container-type: inline-size;
}
.piece-hero .hero-logo img {
  display: block;
  width: 42%;
  height: auto;
  max-height: none;
  margin: 0;
}
/* Logos that would cover the dancers' faces: smaller (David, 2026-11-04) */
.piece-hero .hero-logo--krump-n-break-release img { width: 23%; }
/* ODC: the cover is light at the top left (parachute) and dark in the middle – logo moved to the top (David, 2026-11-07) */
.piece-hero .hero-logo--odc-odyssey { top: 6%; bottom: auto; }
/* Black logo files: turned white and blended into the photo.
   The blend sits on the whole logo layer (not the img): the layer's containment would otherwise
   blend the img against nothing and show a logo file's background as a box. */
.hero-logo--white img { filter: invert(1); }
.hero-logo--white { mix-blend-mode: screen; }
.hero-logo--black { mix-blend-mode: multiply; }
.hero-logo--white .text-logo { color: #fff; }
.hero-logo--black .text-logo { color: #000; }

/* Fonts for the logo drafts */
@font-face { font-family: 'SourceSansLight'; src: url('../fonts/sourcesanspro-300.woff') format('woff'); }
@font-face { font-family: 'SourceSansItalic'; src: url('../fonts/sourcesanspro-400-italic.woff') format('woff'); }

/* Typographic logo DRAFTS (site/snippets/text-logo.php) */
.text-logo { display: flex; flex-direction: column; align-items: flex-start; white-space: nowrap; text-align: left; line-height: 0.88; }

.text-logo--courage { flex-direction: row; align-items: baseline; }
.text-logo--courage .tl-cou  { font-family: 'SourceSansLight', sans-serif; font-size: 11cqw; letter-spacing: -0.01em; }
.text-logo--courage .tl-rage { font-family: 'GraebenbachMedium', sans-serif; font-size: 11cqw; letter-spacing: -0.04em; }

.text-logo--odc-odyssey .tl-odc     { font-family: 'GraebenbachMedium', sans-serif; font-size: 12cqw; letter-spacing: 0.04em; }
.text-logo--odc-odyssey .tl-odyssey { font-family: 'SourceSansLight', sans-serif; font-size: 4.6cqw; letter-spacing: 0.62em; margin-top: 0.4em; }

.text-logo--odyssees-impressionnistes .tl-odyssees { font-family: 'SourceSansItalic', serif; font-size: 9cqw; }
.text-logo--odyssees-impressionnistes .tl-impr     { font-family: 'GraebenbachGrotesk', sans-serif; font-size: 2.9cqw; letter-spacing: 0.46em; text-transform: uppercase; margin-top: 0.7em; }

.text-logo--yes-no-maybe span { font-family: 'GraebenbachMedium', sans-serif; font-size: 9cqw; letter-spacing: 0.02em; }
.text-logo--yes-no-maybe .tl-no    { text-decoration: line-through; text-decoration-thickness: 0.08em; }
.text-logo--yes-no-maybe .tl-maybe { font-family: 'SourceSansItalic', serif; font-size: 7cqw; margin-top: 0.1em; }

.text-logo .tl-plain { font-family: 'GraebenbachMedium', sans-serif; font-size: 8cqw; }

/* Label badges (e.g. Olympiade Culturelle) near the supporters */
.piece-label { display: block; width: 90px; height: auto; margin: 40px 0 0; }

/* Old texts start with a label heading ("Abstract", "Intention note", "Team", "Press" …).
   The new layout already names these sections, so the label is hidden (the text itself is unchanged). */
.piece-abstract > :is(h1, h2, h3, h4, h5, h6):first-child,
.piece-lead > :is(h1, h2, h3, h4, h5, h6):first-child,
.fold-body > :is(h1, h2, h3, h4, h5, h6):first-child { display: none; }

/* Collaborations on tour */
.piece-section-title {
  font-family: 'GraebenbachMedium', Helvetica, sans-serif;
  font-size: 1.1rem;
  text-transform: uppercase;
  border-top: 3px solid var(--accent);
  padding-top: 12px;
  margin-bottom: 10px;
}
.piece-collabs-intro { margin-bottom: 20px; }
.collabs { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 768px) { .collabs { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; } }
.collab { border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; }
.collab-place { font-size: 0.85rem; color: #666; text-transform: uppercase; letter-spacing: 0.04em; }
.collab-partner { font-family: 'GraebenbachMedium', Helvetica, sans-serif; font-size: 1.2rem; margin: 4px 0 8px; }
.collab p + p { margin-top: 0.6em; }
.collab-video {
  display: inline-block;
  margin: 10px 8px 0 0;
  padding: 4px 12px;
  border: 1px solid #000;
}
.collab-video:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* Quotes that sit in an ordinary text block (e.g. "Text block 3") look the same as the "Quote" field */
.piece-text .fullborder:has(> blockquote) {
  border-top: 0;
  padding: 0 0 0 18px;
  border-left: 3px solid var(--accent);
  margin: 32px 0 0;
  font-size: 1.15rem;
  font-style: italic;
}
.piece-text .fullborder blockquote,
.piece-text .fullborder blockquote p { font-size: 1.3rem; line-height: 1.4; }

/* Project pages (site/templates/project.php) share this layout; their text is running text, one comfortable column */
.project-text { font-size: 1.05rem; line-height: 1.5; }
.project-text p + p { margin-top: 0.7em; }

/* Programme fold-out on project pages: one small fold per event, with photo */
.prog-items { margin-top: 18px; }
.prog-item { border-top: 1px solid #ddd; }
.prog-item:last-child { border-bottom: 1px solid #ddd; }
.fold .prog-item summary {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0 14px;
  padding: 9px 0;
  font-size: 1rem;
  text-transform: none;
}
.fold .prog-item summary::after { margin-left: auto; font-size: 1.2rem; }
.fold .prog-item:not([open]) summary::after { content: '+'; }
.prog-when { font-family: inherit; color: #666; font-size: 0.9rem; }
.prog-item[open] .prog-when { display: none; }  /* the open text starts with the dates */
.prog-body { padding: 4px 0 22px; }
.prog-image { margin: 0 0 14px; }
.prog-image img { display: block; width: 100%; height: auto; }
@media (min-width: 768px) {
  /* Photo floats right, the text flows around and below it (David, 2026-11-06: no empty space under the photo) */
  .prog-body.has-image .prog-image { float: right; width: 40%; margin: 4px 0 14px 28px; }
  .prog-body.has-image::after { content: ""; display: block; clear: both; }
}

/* Same distance after a heading as between the paragraphs that follow */
.project-text :is(h1, h2, h3, h4) + p { margin-top: 1em; }
.prog-text p + p { margin-top: 0.7em; }
.prog-image figcaption { margin-top: 4px; font-size: 0.8rem; color: #666; }
.prog-credits { margin-top: 1.2em; padding-top: 0.8em; border-top: 1px solid #ddd; font-size: 0.9rem; line-height: 1.45; }
.prog-credits p + p { margin-top: 0.7em; }

/* One photo set per event (project pages) */
.event-gallery { margin-top: 48px; padding-top: 12px; border-top: 3px solid var(--accent); }
.event-gallery h3 { font-size: 1.1rem; text-transform: uppercase; margin: 0; }
.event-place { margin: 4px 0 14px; color: #666; font-size: 0.9rem; }
.event-thumbs { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 767px) { .event-thumbs { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .event-thumbs { grid-template-columns: repeat(6, 1fr); } }

/* Works in the cycle (e.g. ODC Unready Mades): one fold-out each, own video window inside */
.piece-works .inline-video { margin: 4px 0 20px; background: #111; }

/* Photos inside a work fold-out (e.g. Unready Mades, 2026-11-06) */
.work-thumbs { grid-template-columns: repeat(4, 1fr); margin: 1.2em 0; }
@media (max-width: 767px) { .work-thumbs { grid-template-columns: repeat(2, 1fr); } }

/* Galleries and credits in a fold start below the floated photo and use the full width */
.prog-text .work-thumbs, .prog-credits { clear: both; }

/* Quotes inside fold-outs (press, team …): normal size, italic, thin accent line (2026-11-07) */
.fold-body blockquote, .fold-body blockquote p { font-family: inherit; font-size: inherit; line-height: inherit; font-style: italic; }
.fold-body blockquote { margin: 0.6em 0 1em; padding-left: 14px; border-left: 3px solid var(--accent); }

/* Touring status (2026-11-09) */
.piece-touring { margin: 14px 0 0; font-size: 0.95rem; color: #444; }
.piece-touring a { color: inherit; text-decoration: none; font-weight: bold; }
.piece-touring a::before, .thumb-touring::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
.touring--request a::before, .thumb-touring.touring--request::before { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); }
.piece-touring a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
