/* Polices hébergées ici : aucun appel à un service tiers.
   Antonio : WOFF2 variable, polices système en secours.
   Work Sans : un seul WOFF2 variable ; chaque plage a son OTF statique de secours. */
@font-face {
  font-family: "Antonio";
  font-style: normal;
  font-weight: 100 700;
  font-display: optional;
  src: url("/fonts/antonio-latin-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 100 500;
  font-display: optional;
  src:
    url("/fonts/work-sans-latin-wght-normal.woff2") format("woff2"),
    url("/fonts/WorkSans-Regular.otf") format("opentype");
}

@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 501 700;
  font-display: optional;
  src:
    url("/fonts/work-sans-latin-wght-normal.woff2") format("woff2"),
    url("/fonts/WorkSans-SemiBold.otf") format("opentype");
}

@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 701 900;
  font-display: optional;
  src:
    url("/fonts/work-sans-latin-wght-normal.woff2") format("woff2"),
    url("/fonts/WorkSans-ExtraBold.otf") format("opentype");
}

:root {
  color-scheme: light;
  --paper: #ffd400;
  --ink: #111111;
  --card: #ffffff;
  --muted: #4a4a4a;
  --accent: #f0386b;
  --wall: #383838;
  --display: Antonio, Impact, "Arial Narrow", sans-serif;
  --gutter: clamp(1rem, 4vw, 3rem);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

/* La place reste réservée : l'élément apparaît sans décaler la page. */
.needs-js {
  visibility: hidden;
}

body.has-js .needs-js {
  visibility: visible;
}

@media (scripting: none) {
  .needs-js {
    display: none;
  }
}

/* Les bandes pleine largeur comptent la barre de défilement dans 100vw. */
body {
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.4 "Work Sans", "Helvetica Neue", Arial, sans-serif;
}

a {
  color: inherit;
  text-underline-offset: 0.15em;
}

/* Noir sur le jaune et le blanc ; jaune sur les zones noires : au moins 3:1 partout. */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus, var(--ink));
  outline-offset: 2px;
}

.masthead,
.filters {
  --focus: var(--paper);
}

.skip {
  position: absolute;
  z-index: 1;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

main:focus {
  outline: none;
}

main,
footer {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main {
  padding-bottom: 4rem;
}

h1,
.brand,
h2 {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.25rem 2rem;
  padding: 0.75rem var(--gutter);
  background: var(--ink);
  color: var(--paper);
}

.brand {
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand br {
  display: none;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 0 1.5rem;
  font-weight: 500;
}

nav a {
  padding: 0.6rem 0;
  color: #ffffff;
}

h1 {
  margin: clamp(1.5rem, 5vw, 3.5rem) 0 2rem;
  max-width: 11em;
  font-size: clamp(3rem, 11vw, 9rem);
  line-height: 1.25;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.lead {
  margin: 0 0 2rem;
  max-width: 44rem;
  font-size: 1.25rem;
  font-weight: 600;
}

article h1,
.company h1 {
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 1.1;
}

h2 {
  margin: 3rem 0 0.5rem;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 1.15;
}

article h3 {
  margin: 1.5rem 0 0.5rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.5rem;
  padding: 1.25rem;
  background: var(--ink);
  color: #ffffff;
}

.filters ~ .minis {
  margin-top: 1.5rem;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
}

/* Le champ et son bouton n'en font qu'un. */
.commune-group {
  display: flex;
  align-items: flex-end;
  flex: 1 1 16rem;
  min-width: 0;
}

.commune-group label {
  flex: 1;
  min-width: 0;
}

.commune-group input {
  width: 100%;
}

.commune-group button {
  flex: none;
}

.filters label.preferred {
  flex-basis: 100%;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}

/* Comme les boutons de la page : fond noir, bordure jaune, marque blanche. */
.preferred input {
  appearance: none;
  display: grid;
  place-content: center;
  flex: none;
  width: 2rem;
  min-height: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 2px solid var(--paper);
  background: var(--ink);
  color: #ffffff;
  cursor: pointer;
}

.preferred input:checked::before {
  content: "✓";
  font-weight: 600;
  line-height: 1;
}

.filters p {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.95rem;
}

.filters p:empty {
  display: none;
}

button {
  min-height: 3rem;
  padding: 0 1.25rem;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Les appels à l'action, boutons ou liens : plein pour inviter, contour une fois fait
   ou pour une action secondaire. Sur fond noir, .filters garde ses boutons jaunes. */
.cta {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.25rem 1.25rem;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.cta-secondary,
.cta[aria-pressed="false"] {
  background: transparent;
  color: var(--ink);
}

.cta[aria-pressed="true"]::before {
  content: "✓\a0";
}

.cta:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--accent);
}

.actions,
.states {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Boutons accolés : les bordures se superposent pour n'en faire qu'une. */
.button-group {
  display: flex;
  max-width: 100%;
}

.button-group .cta {
  padding-inline: 0.75rem;
}

.button-group .cta + .cta {
  margin-inline-start: -2px;
}

.button-group .cta:hover,
.button-group .cta:focus-visible {
  position: relative;
  z-index: 1;
}

.actions {
  margin-block: 1rem;
}

.states {
  margin-block: 1rem;
  column-gap: 1rem;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input {
  min-height: 3rem;
  padding: 0 0.75rem;
  border: 0;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

#radius {
  width: 6rem;
}

ul.performances,
ul.companies,
ul.minis,
.history {
  margin: 0;
  padding: 0;
  list-style: none;
}

.period > h2 {
  margin-bottom: 0;
}

h2 a {
  text-decoration: none;
}

h2 a:hover {
  text-decoration: underline;
}

/* Le surlignage fait partie du h2, sur le principe des icônes de Lea Verou :
   les tracés sont des jetons (--stroke-N, strokes.css), --stroke choisit lequel,
   et un masque découpe la couleur. Non hérités, ils n'atteignent pas les descendants. */
@property --stroke {
  syntax: "*";
  inherits: false;
}

@property --stroke-tilt {
  syntax: "*";
  inherits: false;
}

h2 {
  position: relative;
  isolation: isolate;
  width: fit-content;
  max-width: 100%;
  padding-inline: 0.12em;
}

h2::before {
  --stroke: inherit;
  --stroke-tilt: inherit;
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.06em;
  right: -0.12em;
  bottom: 0;
  height: var(--stroke-style-height, 0.72em);
  background-color: var(--stroke-style-color, var(--accent));
  opacity: var(--stroke-style-opacity, 0.68);
  -webkit-mask: var(--stroke) no-repeat center / 100% 100%;
  mask: var(--stroke) no-repeat center / 100% 100%;
  transform: rotate(var(--stroke-tilt, 0deg));
  forced-color-adjust: none;
  pointer-events: none;
}

.day > h3 {
  display: inline-block;
  margin: 1.5rem 0 0.75rem;
  padding: 0.25rem 0.75rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.0625rem;
  font-weight: 600;
}

.day > h3::first-letter {
  text-transform: uppercase;
}

.day .performances {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.performance {
  min-width: 0;
}

.card,
.mini {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  height: 100%;
  padding: 1rem;
  border: 3px solid var(--ink);
  background: var(--card);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.card {
  box-shadow: 6px 6px 0 var(--accent);
}

.card:hover,
.card:focus-visible,
.mini:hover,
.mini:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink);
}

.card .title,
.mini .title {
  margin: 0;
  font: 700 1.75rem/1.1 var(--display);
  text-transform: uppercase;
}

.mini .title {
  font-size: 1.35rem;
}

/* Seule l'année se clique : les dates dessous n'ont ni ombre ni survol. */
.past-year {
  margin-block: 1rem;
}

/* Mur de lettres : le titre répété déborde du conteneur jusqu'aux bords de la page, et le
   vrai titre le recouvre, ligne par ligne, sur son propre fond. Même taille, mêmes lignes. */
.wall {
  --wall-size: clamp(2.5rem, 7vw, 5.5rem);
  --wall-line: calc(var(--wall-size) * 1.2);
  position: relative;
  overflow: clip;
  margin-inline: calc(50% - 50vw);
  padding-block: var(--wall-line);
  padding-inline: calc(50vw - 50%);
  background: var(--ink);
  color: #ffffff;
  --focus: var(--paper);
}

.wall-letters {
  position: absolute;
  inset: 0 -1.5em;
  margin: 0;
  color: var(--wall);
  font: 700 var(--wall-size) / var(--wall-line) var(--display);
  text-transform: uppercase;
  /* Pas de retour à la ligne : le conteneur du mur coupe chaque ligne à son bord. */
  white-space: pre;
  user-select: none;
}

/* Le texte du mur n'est écrit qu'ici : le HTML ne porte que le titre, une fois par décalage. */
.wall-letters::before {
  --a: attr(data-wall) " ";
  --b: attr(data-wall-b);
  --c: attr(data-wall-c);
  --a3: var(--a) var(--a) var(--a);
  --b3: var(--b) var(--b) var(--b);
  --c3: var(--c) var(--c) var(--c);
  --a6: var(--a3) var(--a3);
  --b6: var(--b3) var(--b3);
  --c6: var(--c3) var(--c3);
  --a12: var(--a6) var(--a6);
  --b12: var(--b6) var(--b6);
  --c12: var(--c6) var(--c6);
  --a24: var(--a12) var(--a12);
  --b24: var(--b12) var(--b12);
  --c24: var(--c12) var(--c12);
  --a48: var(--a24) var(--a24);
  --b48: var(--b24) var(--b24);
  --c48: var(--c24) var(--c24);
  --block: var(--line-a) "\A" var(--line-b) "\A" var(--line-c) "\A";
  content: var(--block) var(--block) var(--block) var(--block) var(--block) var(--block);
}

.wall-letters[data-wall-size="xl"]::before {
  --line-a: var(--a3);
  --line-b: var(--b3);
  --line-c: var(--c3);
}

.wall-letters[data-wall-size="l"]::before,
.wall > .wall-letters[data-wall-size="xl"]::before {
  --line-a: var(--a6);
  --line-b: var(--b6);
  --line-c: var(--c6);
}

.wall-letters[data-wall-size="m"]::before,
.wall > .wall-letters[data-wall-size="l"]::before {
  --line-a: var(--a12);
  --line-b: var(--b12);
  --line-c: var(--c12);
}

.wall-letters[data-wall-size="s"]::before,
.wall > .wall-letters[data-wall-size="m"]::before {
  --line-a: var(--a24);
  --line-b: var(--b24);
  --line-c: var(--c24);
}

.wall > .wall-letters[data-wall-size="s"]::before {
  --line-a: var(--a48);
  --line-b: var(--b48);
  --line-c: var(--c48);
}

.wall-content {
  position: relative;
}

article .wall h1 {
  margin: 0;
  max-width: none;
  color: var(--paper);
  font-size: var(--wall-size);
  line-height: var(--wall-line);
  text-wrap: wrap;
}

.wall-by {
  margin: 0.5rem 0 0;
  font-weight: 700;
}

.wall-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0 0;
}

/* Le halo du texte posé sur un mur : un trait deux fois plus large, peint sous les lettres,
   dont seuls les 2px extérieurs restent visibles. */
.wall-content,
.mini-wall > a > :not(.wall-letters) {
  -webkit-text-stroke: 4px rgb(0 0 0 / 50%);
  paint-order: stroke fill;
}

/* Sur les titres, le halo suit la taille du texte : le même rapport que 2px sur 16px. */
.wall h1,
.mini-wall > a > .title {
  -webkit-text-stroke-width: 0.25em;
}

/* Les badges ont déjà leur propre fond. */
.wall .touring,
.wall .indoor,
.wall .audience,
.mini-wall .touring,
.mini-wall .indoor,
.mini-wall .audience {
  -webkit-text-stroke: 0;
}

.wall .touring,
.mini-wall .touring {
  background: var(--paper);
  color: var(--ink);
}

.wall .indoor,
.wall .audience,
.mini-wall .indoor,
.mini-wall .audience {
  border-color: #ffffff;
  background: var(--ink);
  color: #ffffff;
}

.wall + .subtitle {
  margin-top: 1.5rem;
}

/* La même chose en carte : le mur s'arrête au bord de la carte. */
.mini-wall > a {
  position: relative;
  overflow: clip;
  background: var(--ink);
  color: #ffffff;
}

.mini-wall {
  --wall-size: 1.35rem;
  --wall-line: 1.6rem;
}

.mini-wall .wall-letters {
  inset: 0 -1em;
}

.mini-wall > a > :not(.wall-letters) {
  position: relative;
  color: #ffffff;
}

.mini-wall > a > .touring {
  background: var(--paper);
  color: var(--ink);
}

.mini-wall .title {
  line-height: var(--wall-line);
}

.mini-wall > a > .title {
  color: var(--paper);
}

/* Bracelet des festivals : le fermoir à gauche, et un bord droit découpé selon la moitié
   droite d'un lampadaire, dont la moitié gauche reste en ombre dans le corps. Le découpage
   prend la hauteur du bracelet ; l'ombre est sur le parent pour suivre son contour. */
.bracelet,
.mini-bracelet > a {
  display: flex;
  align-items: stretch;
  color: #ffffff;
  --focus: var(--paper);
}

.bracelet {
  --clasp: 2.75rem;
  position: relative;
  margin-block: 1.5rem 3rem;
  /* La place de la découpe, qui dépend de la hauteur : elle peut empiéter sur la gouttière. */
  margin-right: clamp(2.5rem, 7vw, 3.5rem);
  filter: drop-shadow(7px 7px 0 var(--accent));
}

.mini-bracelet {
  --clasp: 1.5rem;
  filter: drop-shadow(6px 6px 0 var(--accent));
}

.mini-bracelet:has(> a:hover),
.mini-bracelet:has(> a:focus-visible) {
  transform: translate(-2px, -2px);
  filter: drop-shadow(8px 8px 0 var(--ink));
}

.mini-bracelet > a,
.mini-bracelet > a:hover,
.mini-bracelet > a:focus-visible {
  flex-direction: row;
  gap: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  transform: none;
}

.bracelet-body {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 2rem 0.5rem 2rem calc(var(--clasp) + 2.5rem);
  border-radius: 999px 0 0 999px;
  background: var(--ink) url("/festival-rue.svg") no-repeat right bottom / auto 100%;
}

.mini-bracelet .bracelet-body {
  min-height: 7rem;
  padding: 1rem 0.25rem 1rem 3.25rem;
}

/* Le fermoir. */
.bracelet-body::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 1rem;
  width: var(--clasp);
  height: var(--clasp);
  border: 0.25rem solid #ffffff;
  border-radius: 50%;
  background: radial-gradient(circle closest-side, var(--ink) 30%, var(--paper) 32%);
  transform: translateY(-50%);
}

.mini-bracelet .bracelet-body::before {
  left: 0.75rem;
  border-width: 0.15rem;
}

/* La découpe : sa largeur découle de sa hauteur, le dessin n'est jamais déformé. */
.bracelet::after,
.mini-bracelet > a::after {
  content: "";
  flex: none;
  aspect-ratio: 50 / 290;
  margin-left: -1px;
  background: var(--ink);
  -webkit-mask: url("/festival-lampadaire.svg") no-repeat center / 100% 100%;
  mask: url("/festival-lampadaire.svg") no-repeat center / 100% 100%;
}

/* Une hauteur étirée en flex n'est pas définie ici : seule la position absolue donne sa
   largeur à la découpe, quand un nom long fait grandir le bracelet. */
.bracelet::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(100% - 1px);
  margin-left: 0;
}

.bracelet h1 {
  position: relative;
  margin: 0;
  max-width: none;
  color: var(--paper);
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  line-height: 1.25;
  text-wrap: wrap;
}

.bracelet-body p {
  position: relative;
  margin: 0.5rem 0 0;
  font-weight: 700;
}

.mini-bracelet .bracelet-body p {
  margin-top: 0.25rem;
  font-weight: 400;
}

.bracelet h1 span,
.bracelet-body p span,
.mini-bracelet .title span {
  background: var(--ink);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-inline: 0.2em;
}

.mini-bracelet .title {
  position: relative;
  width: auto;
  margin: 0;
  padding: 0;
  color: var(--paper);
  line-height: 1.25;
}

.mini-bracelet .title::before {
  display: none;
}

/* Un flux RSS vu dans un navigateur (feed.xsl). */
.feed-title {
  font-size: clamp(2.25rem, 6vw, 4.5rem);
}

.notice {
  max-width: 44rem;
}

mark {
  /* Plus foncé que --accent : le blanc y atteint 4,5:1. */
  background: #d81b52;
  color: #ffffff;
  /* La marge négative annule le retrait : le fond déborde, le texte ne bouge pas. */
  padding: 0.1em 0.2em;
  margin: 0 -0.2em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.mini-wall small {
  position: relative;
  color: #ffffff;
}

/* Le même objet que .ticket, en petit : tout est écrit sur le billet, le talon reste vide.
   L'ombre est sur le <li> : le masque du lien la couperait, et elle suit ainsi les encoches. */
.mini-ticket {
  --notch: 9px;
  --stub: 1.75rem;
  filter: drop-shadow(6px 6px 0 var(--accent));
}

.mini-ticket:has(> a:hover),
.mini-ticket:has(> a:focus-visible) {
  transform: translate(-2px, -2px);
  filter: drop-shadow(8px 8px 0 var(--ink));
}

.mini-ticket > a,
.mini-ticket > a:hover,
.mini-ticket > a:focus-visible {
  transform: none;
  box-shadow: inset 0 0 0 3px var(--ink);
}

.mini-ticket > a {
  position: relative;
  overflow: hidden;
  padding-right: calc(var(--stub) + 1rem);
  border: 0;
  background:
    repeating-linear-gradient(var(--ink) 0 3px, #0000 3px 8px)
      right calc(var(--stub) - 1.5px) top / 3px 100% no-repeat,
    var(--card);
  -webkit-mask:
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 98%, #000),
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 98%, #000);
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 98%, #000),
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 98%, #000);
  mask-composite: intersect;
}

/* Le masque couperait un contour extérieur : le focus se dessine à l'intérieur du billet. */
.mini-ticket > a:focus-visible {
  outline-offset: -8px;
}

.mini-ticket time {
  white-space: nowrap;
}

.mini-ticket > a::before,
.mini-ticket > a::after {
  content: "";
  position: absolute;
  right: calc(var(--stub) - var(--notch) - 3px);
  width: calc(2 * var(--notch) + 6px);
  height: calc(2 * var(--notch) + 6px);
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.mini-ticket > a::before {
  top: calc(-1 * var(--notch) - 3px);
}

.mini-ticket > a::after {
  bottom: calc(-1 * var(--notch) - 3px);
}

.past-year summary {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 3px solid var(--ink);
  background: var(--card);
  box-shadow: 6px 6px 0 var(--accent);
  cursor: pointer;
  font-weight: 700;
}

.past-year summary:hover,
.past-year summary:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--ink);
}

.past-year summary::after {
  content: "+";
  margin-inline-start: auto;
  font: 700 1.75rem/1.1 var(--display);
}

.past-year[open] summary::after {
  content: "−";
}

.past-year h3 {
  margin: 0;
  font: 700 1.75rem/1.1 var(--display);
}

.past-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.past-date {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--ink);
  overflow-wrap: anywhere;
}

.past-when::first-letter {
  text-transform: uppercase;
}

.past-title {
  font-weight: 700;
}

.who {
  font-weight: 700;
}

.festival,
.mini small {
  color: var(--muted);
  font-size: 0.95rem;
}

.state-cancelled .title {
  text-decoration: line-through;
}

.minis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.5rem 0 1rem;
}

.next::first-letter {
  text-transform: uppercase;
}

.touring,
.indoor,
.audience,
.state {
  display: inline-block;
  padding: 0 0.4rem;
  border: 2px solid var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.touring {
  background: var(--ink);
  color: #ffffff;
}

.state-sold_out .state,
.state-postponed .state,
.state-cancelled .state {
  background: var(--accent);
}

.distance {
  white-space: nowrap;
}

.when {
  margin: 2rem 0 0;
  font-weight: 600;
}

.when::first-letter {
  text-transform: uppercase;
}

.when + h1 {
  margin-top: 0.5rem;
}

/* Billet à talon. Le texte reste du HTML ; seules les encoches sont découpées par un masque
   vectoriel, que l'ombre et le tracé des .ticket-stub suivent à toute taille. */
.ticket {
  --notch: 14px;
  --stub: 10rem;
  margin-block: 1.5rem 3rem;
  filter: drop-shadow(7px 7px 0 var(--accent));
}

.ticket-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--stub);
  /* Un masque ne coupe que l'affichage : les anneaux feraient défiler la page en largeur. */
  overflow: hidden;
  background: var(--card);
  box-shadow: inset 0 0 0 3px var(--ink);
  -webkit-mask:
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 98%, #000),
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 98%, #000);
  -webkit-mask-composite: source-in;
  mask:
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 98%, #000),
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 98%, #000);
  mask-composite: intersect;
}

.ticket-body {
  min-width: 0;
  padding: 1.25rem 1.5rem;
}

.ticket-body > :first-child {
  margin-top: 0;
}

.ticket-body > :last-child {
  margin-bottom: 0;
}

.ticket h1 {
  margin: 0.5rem 0 0.75rem;
  max-width: none;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
}

.state-cancelled .ticket h1 {
  text-decoration: line-through;
}

.ticket-stub {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 1.25rem 0.5rem;
  border-inline-start: 3px dotted var(--ink);
  text-align: center;
}

/* L'arrondi de chaque encoche : un anneau centré sur le bord du talon. */
.ticket-stub::before,
.ticket-stub::after {
  content: "";
  position: absolute;
  left: calc(-3px - var(--notch) - 3px);
  width: calc(2 * var(--notch) + 6px);
  height: calc(2 * var(--notch) + 6px);
  border: 3px solid var(--ink);
  border-radius: 50%;
}

.ticket-stub::before {
  top: calc(-1 * var(--notch) - 3px);
}

.ticket-stub::after {
  bottom: calc(-1 * var(--notch) - 3px);
}

.ticket-company {
  font-weight: 600;
}

.ticket-kind,
.ticket-number {
  font-size: 0.8rem;
  font-weight: 600;
}

.ticket-kind {
  text-transform: uppercase;
}

.ticket-number {
  font-weight: 400;
}

.ticket-date {
  display: flex;
  flex-direction: column;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
}

.ticket-day {
  font-size: 3.5rem;
}

.ticket-month {
  font-size: 1.5rem;
}

.ticket-weekday,
.ticket-year {
  font-family: "Work Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}

@media (max-width: 40rem) {
  .ticket {
    --stub: 5.5rem;
  }

  .ticket-sheet {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto var(--stub);
    -webkit-mask:
      radial-gradient(circle var(--notch) at 0 calc(100% - var(--stub)), #0000 98%, #000),
      radial-gradient(circle var(--notch) at 100% calc(100% - var(--stub)), #0000 98%, #000);
    -webkit-mask-composite: source-in;
    mask:
      radial-gradient(circle var(--notch) at 0 calc(100% - var(--stub)), #0000 98%, #000),
      radial-gradient(circle var(--notch) at 100% calc(100% - var(--stub)), #0000 98%, #000);
    mask-composite: intersect;
  }

  .ticket-stub {
    display: grid;
    grid-template-columns: 1fr auto;
    align-content: center;
    gap: 0 0.75rem;
    padding: 0.5rem 1.5rem;
    text-align: start;
    border-inline-start: 0;
    border-block-start: 3px dotted var(--ink);
  }

  .ticket-stub::before,
  .ticket-stub::after {
    top: calc(-3px - var(--notch) - 3px);
    bottom: auto;
  }

  .ticket-stub::before {
    left: calc(-1 * var(--notch) - 3px);
  }

  .ticket-stub::after {
    left: auto;
    right: calc(-1 * var(--notch) - 3px);
  }

  .ticket-date {
    grid-column: 2;
    grid-row: 1 / span 2;
    flex-direction: row;
    align-items: baseline;
    gap: 0.35rem;
  }

  .ticket-day {
    font-size: 2.5rem;
  }

  .ticket-month {
    font-size: 1.25rem;
  }
}

.subtitle {
  font-size: 1.25rem;
  font-weight: 600;
}

/* Tampon des compagnies : le même dessin à toutes les tailles, seule --stamp change.
   Le trait de surligneur passe derrière, la couronne blanche et le disque jaune devant. */
.stamp {
  --stamp: 3.25rem;
  position: relative;
  isolation: isolate;
  flex: none;
  width: var(--stamp);
  height: var(--stamp);
}

.stamp::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 14% -16%;
  background-color: var(--accent);
  opacity: 0.68;
  -webkit-mask: var(--stroke-1) no-repeat center / 100% 100%;
  mask: var(--stroke-1) no-repeat center / 100% 100%;
  forced-color-adjust: none;
}

.companies li:nth-child(3n + 2) .stamp::before {
  -webkit-mask-image: var(--stroke-4);
  mask-image: var(--stroke-4);
}

.companies li:nth-child(3n) .stamp::before {
  -webkit-mask-image: var(--stroke-7);
  mask-image: var(--stroke-7);
}

.badge {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  height: 100%;
  border: calc(var(--stamp) * 0.05) solid var(--ink);
  border-radius: 50%;
  background: radial-gradient(
    circle closest-side,
    var(--paper) 69%,
    var(--ink) 70% 75%,
    #ffffff 76%
  );
  color: var(--ink);
  font: 700 calc(var(--stamp) * 0.36) / 1 var(--display);
  transform: rotate(-8deg);
}

.badge img {
  width: 66%;
  height: 66%;
  border-radius: 50%;
  object-fit: cover;
}

.companies li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 2px solid var(--ink);
}

.companies a {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.companies .cta {
  flex: none;
}

.companies.show-lines a {
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.companies .title {
  margin: 0;
  font-size: 1.0625rem;
}

.companies small {
  display: block;
}

.cartouche > header {
  display: flex;
  /* Le tampon a la hauteur d'une ligne du titre et reste sur la première. */
  align-items: flex-start;
  gap: clamp(1rem, 3vw, 1.75rem);
  margin-top: 1.5rem;
}

.company h1 {
  margin: 0;
}

.cartouche > header .stamp {
  --stamp: calc(clamp(3rem, 9vw, 7rem) * 1.1);
}

.created {
  margin: 0.25rem 0 0;
}

.history li {
  padding: 0.2rem 0;
}

h1 small {
  font-weight: 400;
}

footer {
  padding-block: 1.5rem;
  border-top: 3px solid var(--ink);
  font-size: 0.95rem;
}

/* Sur mobile, toute grille passe sur une seule colonne. */
@media (max-width: 40rem) {
  .minis,
  .past-dates,
  .day .performances {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Lien vers un autre site : l'icône reste collée au dernier mot, la mention est pour les lecteurs d'écran. */
a[target="_blank"]::after {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-inline-start: 0.25em;
  background: currentColor;
  -webkit-mask: url("/external.svg") no-repeat center / contain;
  mask: url("/external.svg") no-repeat center / contain;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
