/* hellobastworkshop — feuille de style du site
   Papier clair et encre, ou l'inverse (attribut data-tone de la page) ; quatre polices :
   Host Grotesk (titres), Inter (texte), Space Mono (petites mentions en capitales), PP Neue Montreal (pied de page).
   Le fond porte une trame : des paires de lignes verticales en pointillés, sur les bords des colonnes de la grille. */

/* ------------------------------------------------------------------ réglages */
:root {
  --paper: #f8f6f2;
  --ink: #0e0e0e;

  --bg: var(--paper);
  --fg: var(--ink);
  --fg-2: rgba(14, 14, 14, 0.72);        /* texte secondaire */
  --fg-3: rgba(14, 14, 14, 0.58);        /* mentions */
  --rule: rgba(14, 14, 14, 0.18);        /* filets */
  --rule-2: rgba(14, 14, 14, 0.09);
  --accent: var(--fg);                   /* mises en valeur : la couleur du texte, sur la couleur du fond */
  --on-accent: var(--bg);

  --display: 'Host Grotesk', 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', 'Helvetica Neue', Arial, sans-serif;
  --font: 'Inter', 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Space Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --foot-font: 'PP Neue Montreal', 'Inter', 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', 'Helvetica Neue', Arial, sans-serif;

  --gutter: clamp(20px, 9.72vw, 150px);  /* marge de page : 140 px sur un écran de 1440 px */
  --page: 1480px;                        /* largeur utile maximale : celle de la barre du haut */
  --read: 680px;                         /* largeur maximale d'un texte courant */
  --gap: 24px;

  /* trame du fond : nombre de colonnes (6 sur ordinateur, 4 sur tablette, 2 sur téléphone), couleur et dessin d'une ligne.
     Chaque ligne fait 1 px de large, en tirets de 4 px espacés de 4 px ; sa couleur est celle du texte, très atténuée,
     pour rester juste au fond choisi en mode admin, clair ou sombre. */
  --grid-n: 6;
  --grid-line: var(--rule-2);
  --grid-dash: linear-gradient(to bottom, var(--grid-line) 50%, transparent 0);
  --grid-step: calc((100% + 1px - var(--gap)) / var(--grid-n));   /* d'une paire de lignes à la suivante */
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  :root { --grid-line: color-mix(in srgb, var(--fg) 6%, transparent); }
}

html[data-tone="dark"] {
  --bg: var(--ink);
  --fg: var(--paper);
  --fg-2: rgba(242, 240, 235, 0.72);
  --fg-3: rgba(242, 240, 235, 0.58);
  --rule: rgba(242, 240, 235, 0.2);
  --rule-2: rgba(242, 240, 235, 0.1);
  color-scheme: dark;
}

/* passage d'une page à l'autre en fondu (le fond change de couleur en douceur) */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 380ms; animation-timing-function: cubic-bezier(.4, 0, .2, 1); }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--fg);                      /* la couleur de fond est portée par <html> : la trame se glisse entre elle et le contenu */
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

main { flex: 1 0 auto; }

/* Trame du fond, entièrement en CSS : une bande fixe, de la largeur du contenu plus un espace de chaque côté, derrière la
   page. Chaque colonne de la grille (celle des cartes de projets) est bordée de deux lignes en pointillés ; entre deux
   colonnes, les deux lignes encadrent donc l'espace qui sépare les images. Les paires au-delà du nombre de colonnes
   tombent hors de la bande et ne sont pas dessinées : le même dessin sert à l'ordinateur (6 colonnes), à la tablette (4)
   et au téléphone (2). */
body::before {
  content: "";
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  height: 100lvh;                        /* téléphone : couvre aussi la zone libérée quand la barre du navigateur se replie */
  width: calc(min(100% - 2 * var(--gutter), var(--page)) + 2 * var(--gap));
  margin-inline: auto;
  pointer-events: none;
  background:
    var(--grid-dash) 0 0 / 1px 8px repeat-y,
    var(--grid-dash) calc(var(--gap) - 1px) 0 / 1px 8px repeat-y,
    var(--grid-dash) calc(var(--grid-step) * 1) 0 / 1px 8px repeat-y,
    var(--grid-dash) calc(var(--grid-step) * 1 + var(--gap) - 1px) 0 / 1px 8px repeat-y,
    var(--grid-dash) calc(var(--grid-step) * 2) 0 / 1px 8px repeat-y,
    var(--grid-dash) calc(var(--grid-step) * 2 + var(--gap) - 1px) 0 / 1px 8px repeat-y,
    var(--grid-dash) calc(var(--grid-step) * 3) 0 / 1px 8px repeat-y,
    var(--grid-dash) calc(var(--grid-step) * 3 + var(--gap) - 1px) 0 / 1px 8px repeat-y,
    var(--grid-dash) calc(var(--grid-step) * 4) 0 / 1px 8px repeat-y,
    var(--grid-dash) calc(var(--grid-step) * 4 + var(--gap) - 1px) 0 / 1px 8px repeat-y,
    var(--grid-dash) calc(var(--grid-step) * 5) 0 / 1px 8px repeat-y,
    var(--grid-dash) calc(var(--grid-step) * 5 + var(--gap) - 1px) 0 / 1px 8px repeat-y,
    var(--grid-dash) calc(var(--grid-step) * 6) 0 / 1px 8px repeat-y,
    var(--grid-dash) calc(var(--grid-step) * 6 + var(--gap) - 1px) 0 / 1px 8px repeat-y;
}
@media print { body::before { display: none; } }

img, video, iframe { display: block; max-width: 100%; }
img, video { height: auto; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--fg);
  color: var(--bg);
}
.skip:focus { top: 12px; }

/* largeurs : tout le contenu s'aligne sur la barre du haut ; les textes gardent une longueur de ligne lisible */
.wrap { width: min(100% - 2 * var(--gutter), var(--page)); margin-inline: auto; }
.col  { width: 100%; }
.read { width: min(100%, var(--read)); }

/* petites mentions en capitales */
.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* bouton pilule */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 38px;
  padding: 9px 17px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}
.pill .arrow { transition: transform 180ms ease; }
@media (hover: hover) {
  .pill:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
  .pill:hover .arrow { transform: translateX(3px); }
}

/* ------------------------------------------------------------------ en-tête */
/* logo à gauche, phrase de présentation ; à droite, lieux et heures si site.json en indique ("clocks") */
.mast-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: clamp(20px, 3vw, 44px);
  padding: 26px 0 22px;
}

/* une ligne par ville : point (atelier) · ville · heure, les heures alignées l'une sous l'autre */
.mast-place {
  display: grid;
  grid-template-columns: 6px auto auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 5px;
  color: var(--fg-2);
  white-space: nowrap;
}
.mast-clock { display: contents; }
.mast-place .dot { grid-column: 1; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.mast-city { grid-column: 2; }
.mast-time { grid-column: 3; justify-self: end; color: var(--fg); font-variant-numeric: tabular-nums; }

/* même écriture que les mentions « See all → » */
.mast-statement {
  max-width: 700px;
  color: var(--fg-2);
  line-height: 1.55;
}

/* présentation tapée à la première page de la visite (assets/site.js) : en attendant le script, elle reste invisible ;
   si le script ne vient pas, elle s'affiche d'elle-même au bout de trois secondes */
.tw-wait .mast-statement { visibility: hidden; animation: tw-show 0s linear 3s forwards; }
@keyframes tw-show { to { visibility: visible; } }
.tw-off { visibility: hidden; }                 /* le texte pas encore tapé garde sa place : aucune ligne ne bouge */
.tw-cur { position: relative; display: inline-block; width: 0; height: 1em; vertical-align: baseline; }
.tw-cur::after {                                 /* curseur plein, de la taille d'une lettre */
  content: "";
  position: absolute;
  left: 1px;
  bottom: -0.16em;
  width: 0.62em;
  height: 1.12em;
  background: var(--fg);
}
.tw-cur.is-blink::after { animation: tw-blink 0.5s steps(1, end) 3 forwards; }
@keyframes tw-blink { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; } }

/* logo : le mot « Bast » dans un bloc plein */
.logo {
  display: block;
  padding: 0 7px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.mast-nav { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

.mast-nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 61px;
}

.nav, .nav-group { display: flex; flex-wrap: wrap; align-items: center; column-gap: clamp(16px, 2vw, 26px); }

.nav a {
  position: relative;
  padding: 8px 0;
  white-space: nowrap;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 3px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}
.nav a[aria-current="page"]::after { transform: none; height: 2px; }
@media (hover: hover) { .nav a:hover::after { transform: none; } }

/* ------------------------------------------------------------------ titres */
.display {
  font-family: var(--display);
  font-size: clamp(38px, 5.28vw, 92px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.026em;
  text-wrap: balance;
}
.display.is-long { font-size: clamp(26px, 3vw, 46px); line-height: 1.12; letter-spacing: -0.02em; }

.hero .display { max-width: 15em; }

.display mark {
  display: inline-block;
  padding: 0 0.13em 0.07em;
  border-radius: 0.05em;
  background: var(--accent);
  color: var(--on-accent);
  line-height: 0.93;
}

.sec-title {
  font-family: var(--display);
  font-size: clamp(26px, 2.36vw, 38px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.sec-big {
  font-family: var(--display);
  font-size: clamp(34px, 3.9vw, 64px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.026em;
}

/* ------------------------------------------------------------------ accueil */
.hero { padding: clamp(64px, 7.6vw, 130px) 0 clamp(72px, 9.7vw, 170px); }

.hero-label { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: clamp(20px, 2.2vw, 34px); color: var(--fg-2); }
.hero-label a { padding-bottom: 5px; border-bottom: 1px solid transparent; transition: border-color 180ms ease, color 180ms ease; }
@media (hover: hover) { .hero-label a:hover { border-bottom-color: var(--accent); color: var(--fg); } }

.sec { padding-bottom: clamp(88px, 9.7vw, 170px); }

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(28px, 3.3vw, 52px);
}

.more { color: var(--fg-2); padding-bottom: 4px; white-space: nowrap; transition: color 180ms ease; }
@media (hover: hover) { .more:hover { color: var(--accent); } }

.sec-label { margin-bottom: 18px; color: var(--fg-3); }

/* index de tous les projets */
.index { counter-reset: row; border-top: 1px solid var(--rule); }
.index li { counter-increment: row; border-bottom: 1px solid var(--rule); }
.index li[data-cat="trash"] { display: none; }
.index a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 3.2em;
  align-items: baseline;
  column-gap: 20px;
  padding: 15px 0 14px;
  transition: color 180ms ease, padding 220ms ease;
}
.index-name { font-family: var(--display); font-size: clamp(19px, 1.67vw, 26px); line-height: 1.2; letter-spacing: -0.02em; }
.index-cat { color: var(--fg-3); white-space: nowrap; }
.index-num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--fg-3); text-align: right; }
.index-num::before { content: counter(row, decimal-leading-zero); }
@media (hover: hover) {
  .index a:hover { color: var(--accent); padding-left: 10px; }
}

/* ------------------------------------------------------------------ pages de catégorie : cartes */
.page-head { padding: clamp(56px, 7.6vw, 130px) 0 clamp(44px, 5.5vw, 96px); }

.works {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--gap);                 /* même espace entre les lignes qu'entre les colonnes : plus de nom sous les images */
}

.card { grid-column: span 2; min-width: 0; display: block; }
.card.is-featured { grid-column: span 3; }
.works.is-teaser > .card:not(.is-featured) { display: none; }
.card[data-cat="trash"] { display: none; }

/* pages de catégorie : grille régulière, deux images par ligne, même espace entre les lignes qu'entre les colonnes */
.works.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.works.is-grid > .card { grid-column: auto; }

/* pas de nom sous les images, sur l'accueil comme sur les pages de catégorie
   (il reste lu par les lecteurs d'écran et les moteurs de recherche) */
.card { position: relative; }
.card-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.card-media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  background: var(--rule-2);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity 240ms ease; }



@media (hover: hover) {
  .card:hover .card-media img { opacity: 0.86; }
}

/* ------------------------------------------------------------------ page projet */
.case { padding-top: clamp(28px, 3.3vw, 56px); }

.case-cover img, .case-cover video { width: 100%; }

.case-head { padding: clamp(40px, 5vw, 84px) 0 clamp(48px, 6vw, 104px); }

/* à gauche : titre et fiche (restent en vue pendant la lecture) ; à droite : le texte */
.case-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  column-gap: clamp(40px, 7vw, 120px);
  align-items: start;
}
.case-info { position: sticky; top: 28px; }
.case-body { max-width: 760px; }
.case-body > * + * { margin-top: 26px; }

.back {
  display: inline-block;
  margin-bottom: 26px;
  border-bottom: 1px solid currentColor;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0;
  transition: color 180ms ease;
}
@media (hover: hover) { .back:hover { color: var(--accent); } }

.case-title {
  font-family: var(--display);
  font-size: clamp(34px, 3.6vw, 58px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
}
/* titre en deux langues, sur deux lignes (chinois, puis anglais) dans les catégories qui le demandent : règle écrite par build.py */
.case-title .title-zh { letter-spacing: 0; }

.meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 22px 24px;
  margin: 30px 0 0;
  padding-top: 30px;
  border-top: 1px solid var(--rule);
}
.meta dt { margin-bottom: 6px; color: var(--fg-3); font-size: 13px; line-height: 1.4; letter-spacing: 0; }
.meta dd { font-size: 15px; line-height: 1.4; }
.meta a { border-bottom: 1px solid var(--rule); transition: border-color 180ms ease; }

/* expositions : sur toute la largeur de la fiche */
.meta-wide { grid-column: 1 / -1; }
.shows li + li { margin-top: 16px; }
.shows span { display: block; }
.shows .show-title span { display: inline; }
.shows li > span + span { margin-top: 3px; color: var(--fg-2); }
@media (hover: hover) { .meta a:hover { border-bottom-color: var(--accent); } }

/* texte courant */
.rte { font-size: 18px; line-height: 1.6; overflow-wrap: break-word; }
.rte > * + * { margin-top: 1.05em; }
.rte p:empty { display: none; }
.rte h1, .rte h2, .rte h3 { font-family: var(--display); font-size: 28px; font-weight: 400; line-height: 1.2; letter-spacing: -0.02em; }
.rte h4 { font-size: 18px; font-weight: 600; line-height: 1.4; }
.rte > h1 + *, .rte > h2 + *, .rte > h3 + * { margin-top: 0.8em; }
.rte strong, .rte b { font-weight: 600; }
.rte a { text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: 0.22em; transition: text-decoration-color 180ms ease, color 180ms ease; }
@media (hover: hover) { .rte a:hover { color: var(--accent); text-decoration-color: currentColor; } }
.rte ul, .rte ol { padding-left: 1.2em; list-style: revert; }
.rte pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 13px; }
.rte .c-darkAccent, .rte .c-lightAccent, .rte .c-black, .rte .c-white { color: inherit; }

.actions { margin-top: 30px; }
.case-body > .actions { margin-top: 34px; }
.actions .pill { max-width: 100%; white-space: normal; line-height: 1.5; text-align: left; }

/* images et vidéos d'un projet */
.blocks, .gallery { margin-bottom: clamp(40px, 5vw, 84px); }
.blocks > div > * + * { margin-top: 26px; }

.stack figure + figure { margin-top: clamp(20px, 2.2vw, 36px); }
.gallery:has(> [data-edit-region]:empty) { display: none; }      /* galerie sans photo : rien, pas même une marge */
.stack img, .stack video, .wall img, .wall video { width: 100%; }

figcaption.label { margin-top: 9px; color: var(--fg-3); font-size: 10px; }

.wall { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.wall.c2 { --n: 2; }
.wall.c3 { --n: 3; }
.wall.c4 { --n: 4; }
.wall-col > figure + figure { margin-top: var(--gap); }
.wall-col { min-width: 0; }

.video { position: relative; width: 100%; background: var(--rule-2); }
.video::before { content: ''; display: block; padding-top: var(--ratio, 56.25%); }
.video iframe, .video video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video.is-portrait { max-width: 420px; margin-inline: auto; }
.video + .video { margin-top: var(--gap); }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.video-grid .video + .video { margin-top: 0; }

/* film d'un projet : la vidéo centrée, sans fond derrière elle ; commandes discrètes */
.film { margin: 0; }
.film-stage { display: flex; justify-content: center; }
.film-frame {
  position: relative;
  width: min(100%, calc(min(86vh, 900px) * var(--arn, 0.5625)));
  aspect-ratio: var(--ar, 9 / 16);
  overflow: hidden;
  background: #0e0e0e;
  color: #f2f0eb;
}
.film-frame video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.film figcaption { margin-top: 10px; }
.film + .film { margin-top: clamp(20px, 2.2vw, 36px); }
/* zone des vidéos d'une page projet : sans vidéo, elle ne prend aucune place */
.blocks[data-edit-region="v0"]:empty { display: none; }

.film-ui {
  position: absolute;
  right: 0; bottom: 0; left: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 44px 8px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
}
/* visibles en pause, au clavier, et : au survol (souris) ou quelques secondes après un appui (écran tactile) */
.film.is-paused .film-ui,
.film.is-active .film-ui,
.film-frame:focus-within .film-ui { opacity: 1; pointer-events: auto; }
@media (hover: hover) { .film-frame:hover .film-ui { opacity: 1; pointer-events: auto; } }

.film-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background-color 160ms ease;
}
.film-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.film-btn svg .f { fill: currentColor; }
.film-btn:focus-visible { outline: 2px solid #f2f0eb; outline-offset: -2px; }
@media (hover: hover) { .film-btn:hover { background: rgba(242, 240, 235, 0.18); } }

.film-bar { flex: 1 1 auto; display: flex; align-items: center; height: 32px; margin: 0 8px; cursor: pointer; touch-action: none; }
.film-bar i { position: relative; display: block; width: 100%; height: 2px; background: rgba(242, 240, 235, 0.32); }
.film-bar b { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: #f2f0eb; transform: scaleX(0); transform-origin: left; }
.film-time { margin-right: 4px; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* grand bouton de lecture, quand la vidéo est en pause */
.film-big {
  position: absolute;
  top: 50%; left: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  padding: 0;
  border: 1px solid rgba(242, 240, 235, 0.85);
  border-radius: 50%;
  background: rgba(14, 14, 14, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: inherit;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}
.film-big svg { width: 22px; height: 22px; margin-left: 3px; fill: currentColor; }
.film.is-paused .film-big { display: inline-flex; }
@media (hover: hover) { .film-big:hover { background: #f2f0eb; color: #0e0e0e; } }

/* plein écran */
.film-frame:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; background: #000; }
.film-frame:fullscreen video { object-fit: contain; }
.film-frame:-webkit-full-screen { width: 100vw; height: 100vh; aspect-ratio: auto; background: #000; }
.film-frame:-webkit-full-screen video { object-fit: contain; }

/* projet précédent / suivant */
.pager { margin: clamp(40px, 6vw, 100px) auto clamp(20px, 3vw, 40px); }
.pager-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); padding-top: 26px; border-top: 1px solid var(--rule); }
.pager a { display: block; transition: color 180ms ease; }
.pager .label { display: block; margin-bottom: 10px; color: var(--fg-3); }
.pager-next { text-align: right; }
.pager-title { display: block; font-family: var(--display); font-size: clamp(22px, 2.36vw, 38px); font-weight: 700; line-height: 1.05; letter-spacing: -0.022em; overflow-wrap: break-word; }
@media (hover: hover) { .pager a:hover { color: var(--accent); } }

/* ------------------------------------------------------------------ à propos */
.about { padding: clamp(56px, 8vw, 140px) 0 clamp(64px, 7vw, 120px); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  column-gap: clamp(28px, 4vw, 58px);
}
.about-side { padding-left: clamp(28px, 4vw, 58px); border-left: 1px solid var(--rule); }

.about-title {
  margin-bottom: 30px;
  font-family: var(--display);
  font-size: clamp(30px, 2.6vw, 42px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.026em;
}
.about-text .rte { max-width: 620px; color: var(--fg-2); font-size: 16px; line-height: 1.6; }
.about-text .rte strong { color: var(--fg); }

.about-side > .label { margin-bottom: 22px; color: var(--fg-3); }

.team li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; align-items: start; }
.team li + li { margin-top: 26px; }
/* portraits ronds : le cercle masque le carré blanc des fichiers d'origine */
.team-photo { aspect-ratio: 1; overflow: hidden; border-radius: 50%; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transform: scale(1.03); }
.team h3 { font-family: var(--font); font-size: 15px; font-weight: 600; line-height: 1.3; }
.team .rte { margin-top: 5px; color: var(--fg-2); font-size: 13px; line-height: 1.45; }
.team .rte > * + * { margin-top: 0.4em; }
.team .rte u, .team .rte span[style*="underline"] {
  display: block;
  margin-bottom: 5px;
  color: var(--fg-3);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-decoration: none !important;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------ pages de texte (contact, presse, portfolio…) */
.generic { padding-bottom: clamp(40px, 5vw, 80px); }
.generic .page-head { padding-bottom: clamp(36px, 4.4vw, 72px); }

.map { position: relative; height: clamp(260px, 30vw, 420px); background: var(--rule-2); }
.map iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
html[data-tone="dark"] .map iframe { filter: invert(0.92) hue-rotate(180deg); }

.press-item {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  gap: var(--gap) clamp(24px, 3vw, 44px);
  padding: 30px 0;
  border-top: 1px solid var(--rule);
}
.press-media img { width: 100%; }
.press-body .rte { font-size: 15px; line-height: 1.5; }
.press-title.rte h4 { font-family: var(--display); font-size: clamp(19px, 1.6vw, 24px); font-weight: 400; line-height: 1.25; letter-spacing: -0.015em; }
.press-text { margin-top: 14px; color: var(--fg-2); }
.press-body { max-width: 760px; }
.generic .blocks:has(.press-item) { margin-bottom: 0; }
.blocks > div > .press-item + .press-item { margin-top: 0; }   /* même espace entre tous les articles */

/* formulaire */
.form { margin-top: 12px; }
.field + .field { margin-top: 26px; }
.field label { display: block; margin-bottom: 8px; color: var(--fg-2); }
.field .req { color: var(--fg-3); }
.field input, .field textarea {
  display: block;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 17px;
  line-height: 1.4;
  transition: border-color 180ms ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 0; border-bottom-color: var(--fg); }
.form .pill { margin-top: 30px; }
.form-note { margin-top: 18px; font-size: 15px; }
.form-error { color: #c0392b; }
html[data-tone="dark"] .form-error { color: #ff8a80; }

/* ------------------------------------------------------------------ pied de page */
.foot { padding: clamp(72px, 9vw, 150px) 0 clamp(48px, 5.5vw, 90px); }

/* les colonnes de liens suivent la trame du fond : chacune commence au bord d'une colonne, contre sa ligne en pointillés.
   Police : PP Neue Montreal — Book pour les intitulés, Thin pour les liens. */
.foot-cols { display: grid; grid-template-columns: repeat(var(--grid-n), minmax(0, 1fr)); gap: 44px var(--gap); }
.foot-col { min-width: 0; }
.foot-col .label { margin-bottom: 22px; color: var(--fg-3); font-family: var(--foot-font); font-size: 11px; font-weight: 400; letter-spacing: 0.12em; }
.foot-col li + li { margin-top: 13px; }
.foot-col a { font-family: var(--foot-font); font-size: 20px; font-weight: 100; line-height: 1.3; letter-spacing: 0; white-space: nowrap; transition: color 180ms ease; }
@media (hover: hover) { .foot-col a:hover { color: var(--accent); } }
/* Liens qui sortent du site (Instagram, e-mail) : une petite flèche vers le bas à droite, juste devant le texte. Elle est dessinée
   en masque : elle prend la couleur du lien et suit sa taille (toutes deux réglables dans la page « Polices » du mode admin). */
.foot-col a[target="_blank"]::before,
.foot-col a[href^="mailto:"]::before {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-right: 0.55em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.4 1.4 10.6 10.6M10.6 3.2v7.4H3.2' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='square'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M1.4 1.4 10.6 10.6M10.6 3.2v7.4H3.2' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='square'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 180ms ease;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .foot-col a[target="_blank"]:hover::before,
  .foot-col a[href^="mailto:"]:hover::before { transform: translate(0.14em, 0.14em); }
}

.foot-end {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px 24px;
  margin-top: clamp(56px, 6vw, 90px);
  color: var(--fg-3);
  font-size: 10px;
}
/* les villes de l'atelier : l'une sous l'autre, calées à droite */
.foot-places { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; margin-left: auto; text-align: right; }

/* ------------------------------------------------------------------ écrans moyens */
@media (max-width: 1199px) {
  :root { --gutter: clamp(24px, 5.6vw, 64px); }
}

@media (max-width: 999px) {
  .foot-col { grid-column: span 2; }       /* colonnes de la trame trop étroites pour un lien : deux par colonne de liens */
  .case-grid { grid-template-columns: minmax(0, 1fr); row-gap: clamp(36px, 5vw, 56px); }
  .case-info { position: static; }
}

/* ------------------------------------------------------------------ tablette verticale et téléphone */
@media (max-width: 809px) {
  :root { --gutter: clamp(18px, 9.2vw, 44px); --gap: 16px; --read: 100%; --grid-n: 4; }

  /* film : la vidéo prend toute la largeur */
  .film-frame { width: min(100%, calc(86vh * var(--arn, 0.5625))); }

  /* galeries : les photos les unes sous les autres, dans leur ordre d'origine */
  .wall { display: flex; flex-direction: column; gap: var(--gap); }
  .wall-col { display: contents; }
  .wall figure { order: var(--i, 0); }
  .wall-col > figure + figure { margin-top: 0; }

  .mast-top { grid-template-columns: auto minmax(0, 1fr); align-items: center; padding: 14px 0 12px; }
  .mast-statement { display: none; }
  .mast-place { justify-self: end; }
  .logo { font-size: 36px; }                 /* une fois et demie la taille précédente (24 px) */
  .mast-nav-in { min-height: 50px; }
  .mast-cta { display: none; }
  /* menu : sur une ligne tant qu'il tient ; sinon les projets sur la première, l'atelier sur la seconde */
  .nav, .nav-group { column-gap: 18px; }
  .nav { padding: 5px 0; }
  .nav a { padding: 11px 0; }
  .nav a::after { bottom: 6px; }

  .display { letter-spacing: -0.03em; }

  .card, .card.is-featured { grid-column: span 3; }

  .index a { grid-template-columns: minmax(0, 1fr) 2.6em; }
  .index-cat { display: none; }

  .rte { font-size: 17px; }

  .about-grid { grid-template-columns: minmax(0, 1fr); row-gap: 56px; }
  .about-side { padding: 34px 0 0; border-left: 0; border-top: 1px solid var(--rule); }

  .video-grid { grid-template-columns: minmax(0, 1fr); }

  .foot-cols { display: block; }
  .foot-col + .foot-col { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--rule); }
}

/* très petits écrans (téléphone pliant fermé) : lieux et heures plus serrés, pour ne pas toucher le logo */
@media (max-width: 339px) {
  .mast-top { column-gap: 12px; }
  .mast-place { letter-spacing: 0.05em; column-gap: 6px; }
}

/* ------------------------------------------------------------------ téléphone */
@media (max-width: 559px) {
  :root { --grid-n: 2; }                 /* trame du fond : une paire de lignes de chaque côté, une au milieu */
  /* menu sur une seule ligne : les entrées secondaires (Press, Portfolio & CV) restent dans le pied de page */
  .nav .nav-wide { display: none; }
  .nav, .nav-group { flex-wrap: nowrap; column-gap: clamp(10px, 4.4vw, 18px); }
  /* film : commandes plus compactes, pour ne pas couvrir une vidéo horizontale */
  .film-time { display: none; }
  .film-ui { padding: 26px 4px 2px; }
  .film-btn { width: 38px; height: 38px; }
  .film-big { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .works.is-grid { grid-template-columns: minmax(0, 1fr); }
  .card, .card.is-featured { grid-column: 1 / -1; }

  .meta { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .press-item { grid-template-columns: minmax(0, 1fr); }
  .pager-in { grid-template-columns: minmax(0, 1fr); row-gap: 26px; }
  .pager-next { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  @view-transition { navigation: none; }
}
