:root{
  --bg:#0b0b0c; --fg:#f2f2f2; --muted:#b7b7b7;
  --border:rgba(255,255,255,.20);
}
html { overflow-x: hidden; }
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  letter-spacing:.2px;
  overflow-x: hidden;
  width: 100%;
}
a{color:inherit;text-decoration:none}
.container{max-width:1200px;margin:0 auto;padding:18px}
.nav{display:flex;align-items:center;justify-content:space-between;gap:12px; padding:10px 18px; border-bottom:1px solid var(--border)}
.nav a{font-size:18px;color:var(--muted)}
.tile-count svg{vertical-align:middle}
.grid{display:grid;gap:18px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));padding:18px;justify-items:center;align-items:start}
.tile{border:0; overflow:visible; background:transparent; display:inline-block; position:relative; padding:0;;align-self:start}
.tile img{max-width:100%; max-height:260px; width:auto; height:auto; object-fit:contain; display:block;}
.tile .label{position:absolute;left:0;right:0;bottom:0;box-sizing:border-box;background:rgba(0,0,0,.78);padding:4px 8px;font-size: 16px;color:var(--fg);text-align:left;display:flex;align-items:center;justify-content:space-between;gap:8px;line-height: 1.15;}
.tile .label-text{flex:1;min-width:0;}
.tile .tile-count{display:inline-flex;align-items:center;gap:4px;font-size:11px;color:rgba(255,255,255,0.50);white-space:nowrap;flex-shrink:0;}
h1{font-size:42px;margin:18px 0 8px}
h2{font-size:26px;margin:22px 0 8px}


  /* Fixed plate under the image (same footprint).
     It stays hidden at rest because it is fully covered by the image.
     When the image shifts 3px down-right, the plate becomes visible on top/left. */
  .tile::before{
    content:"";
    position:absolute;
    top:0; left:0;
    right:2px; bottom:2px;
    pointer-events:none;
    z-index:0;
    background: rgba(255,255,255,.30);
    box-shadow: 14px 14px 34px rgba(0,0,0,.60);
  }

  .tile .img-wrap{
    position: relative;
    z-index: 1;
    display: block;
    transition: transform .14s ease;
    will-change: transform;
  }

  .tile img{ display:block; }

  .tile:hover .img-wrap{
    transform: translate(3px,3px);
  }
}


/* ===== Album gallery (masonry) — tidy contact-sheet layout =====
   Goal: smaller thumbs + clean alignment + minimal dead space.
   - Uses flex-wrap rows (keeps reading order left→right).
   - No image upscaling: only max constraints (images will never grow beyond their intrinsic size).
*/
.masonry{
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 18px 10px;
}

.masonry a{
  display: block;
}

.masonry img{
  display: block;            /* avoid baseline gaps */
  width: auto;
  height: auto;
  max-width: 280px;          /* landscape cap */
  max-height: 240px;         /* portrait cap */
  object-fit: contain;
  transition: transform .16s ease;
  will-change: transform;
}


/* Mobile: force 2 columns (avoid single vertical list) */
@media (max-width: 700px){
  .masonry{
    gap: 14px;
    padding: 14px 12px 8px;
    justify-content: center;
  }
  .masonry a{
    flex: 0 0 calc(50% - 7px);
  }
  .masonry img{
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
  }
}


@media (hover:hover) and (pointer:fine){
  .masonry a:hover img{
    transform: translateY(-1px);
  }
}

@media (max-width: 640px){
  .masonry{
    gap: 12px;
    padding: 12px 12px 6px;
    justify-content: space-between;
  }
  .masonry a{
    flex: 0 0 calc(50% - 6px);   /* two columns */
    display: flex;
    justify-content: center;
  }
  .masonry img{
    max-width: 100%;
    max-height: 42vh;            /* keeps portraits under control */
  }
}


/* ===== Masonry: uniform shrink factor for ALL photos (landscape/portrait) =====
   We compute per-image thumbnail box size from the original w/h (data-pswp-width/height)
   so every photo is reduced by the SAME factor (target long side), regardless of orientation,
   without breaking the grid (no huge gaps).
*/
.masonry{
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
  gap: 22px !important;
  align-items: start !important;
  justify-items: center !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 18px !important;
}

.masonry a{
  display:block !important;
  align-self: start !important;
  justify-self: center !important;
}

.masonry img{
  display:block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

/* tighter spacing on smaller screens */
@media (max-width: 900px){
  .masonry{
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important;
    gap: 18px !important;
    padding: 14px !important;
  }
}
@media (max-width: 560px){
  .masonry{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    padding: 12px !important;
  }
}

/* Hover cue (desktop) */
@media (hover:hover) and (pointer:fine){
  .masonry a:hover img{
    transform: translateY(-1px);
  }
}

/* ===== Uniform shrink factor (same ratio) + FIXED spacing grid =====
   Keeps the "dynamic pretty" grid, but with consistent gaps/alignment (no row stretching).
*/
.masonry{
  display: grid !important;
  /* fixed cell width => stable spacing */
  grid-template-columns: repeat(auto-fill, minmax(260px, 260px)) !important;
  gap: 22px !important;
  justify-content: center !important;
  align-items: start !important;
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 18px !important;
}

.masonry a{
  display: block !important;
  overflow: visible !important;
}

.masonry img{
  display: block !important;
}

/* slightly tighter on tablets */
@media (max-width: 900px){
  .masonry{
    grid-template-columns: repeat(auto-fill, minmax(220px, 220px)) !important;
    gap: 18px !important;
    padding: 14px !important;
  }
  .masonry a{ width:220px !important; }
}

/* phones: always 2 columns */
@media (max-width: 560px){
  .masonry{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    padding: 12px !important;
  }
  .masonry a{ width:100% !important; }
}



@media (max-width: 560px){
  .pswp__custom-caption{
    font-size: 13px !important;
    padding: 7px 11px !important;
  }
}



/* center the counter */
.pswp__counter{
  position:absolute !important;
  left:50% !important;
  transform:translateX(-50%) !important;
  top:16px !important;
  text-align:center;
}

/* ===== PhotoSwipe caption — JS-positioned just below the image ===== */
.pswp__custom-caption{
  position:absolute;
  left:50%;
  bottom:40px;  /* fallback; overridden by JS */
  transform:translateX(-50%);
  text-align:center;
  max-width:min(860px, 90vw);
  color:#fff;
  background:rgba(0,0,0,0.55);
  padding:8px 16px;
  border-radius:6px;
  font-size:15px;
  line-height:1.45;
  pointer-events:none;
  transition: bottom 0.15s ease, opacity 0.2s ease;
}


/* ===== Toolbar (top) ===== */
header.toolbar{
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
}

header.toolbar .menu{
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

header.toolbar .menu-item{
  text-decoration: none;
  color: rgba(255,255,255,0.78);
  font-size: 13px;
  letter-spacing: 0.06em;
  padding: 6px 8px;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}

header.toolbar .menu-item:hover{
  background: rgba(255,255,255,0.08);
  color: #fff;
}

header.toolbar .lang-switch{
  display: inline-flex;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  overflow: hidden;
}

header.toolbar .lang-btn{
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
}

header.toolbar .lang-btn.active{
  background: rgba(255,255,255,0.16);
  color: #fff;
}

@media (max-width: 640px){
  header.toolbar{
    gap: 10px;
    padding: 12px 12px;
  }
  header.toolbar .menu{
    gap: 8px;
  }
  header.toolbar .menu-item{
    padding: 6px 6px;
  }
}



/* ===== About page (2026) ===== */
.about-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.about-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 40px;
}

.about-block {
  border-left: 1px solid rgba(255,255,255,0.10);
  padding-left: 28px;
}

.about-lead {
  font-size: 19px;
  line-height: 1.7;
  color: var(--fg);
  margin: 0 0 24px;
}

.about-meta {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 20px;
}

.about-contact a {
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}

.about-contact a:hover {
  color: var(--fg);
  border-color: rgba(255,255,255,0.4);
}

.about-sign {
  font-size: 15px;
  color: var(--fg);
  font-style: italic;
  margin-top: 32px;
}

/* about injected into /about/ page */
.about .about-block {
  padding: 16px 0 0;
  border-left: none;
}

/* ===== Toolbar: active item ===== */
header.toolbar .menu-item.is-active {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

/* ===== Toolbar lang-switch as <a> (info pages) ===== */
header.toolbar .lang-switch a.lang-btn {
  display: inline-block;
  text-decoration: none;
}

/* ===== Info page (Warning / Exhibitions / About unified) ===== */
.info-page {
  display: flex;
  flex-direction: column;
  gap: 64px;
  padding-top: 56px;
  padding-bottom: 80px;
  max-width: 720px;
}

.info-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-margin-top: 80px;
}

.info-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.info-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-block p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255,255,255,0.80);
}

.info-copy {
  font-size: 13px !important;
  color: rgba(255,255,255,0.45) !important;
  margin-top: 8px !important;
  letter-spacing: 0.04em;
}

/* Exhibitions: placeholder + future list */
.info-exhibitions .info-placeholder {
  color: rgba(255,255,255,0.30) !important;
  font-size: 14px !important;
}

.expo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.expo-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
}

.expo-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.90);
  margin: 0;
}

.expo-where {
  font-size: 13px;
  color: rgba(255,255,255,0.50);
  margin: 0;
}

.expo-date {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
  margin: 0;
}

@media (max-width: 640px) {
  .info-page { gap: 48px; padding-top: 36px; }
}

.expo-body {
  font-size: 14px;
  line-height: 1.70;
  color: rgba(255,255,255,0.65);
  margin: 0;
}

.expo-links {
  font-size: 12px;
  margin: 0;
  margin-top: 4px;
}

.expo-links a {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  transition: color .15s, border-color .15s;
}

.expo-links a:hover {
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.40);
}

/* ===== Home intro ===== */
.home-intro {
  padding: 72px 24px 48px;
  text-align: center;
}

.home-title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 300;
  letter-spacing: 0.10em;
  color: #fff;
  margin: 0 0 14px;
  font-style: italic;
}

.home-sub {
  font-size: clamp(13px, 1.6vw, 16px);
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  margin: 0;
  font-weight: 400;
}

/* ===== Copyright — bottom of each page ===== */
.site-copyright {
  text-align: center;
  padding: 48px 24px 32px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.50);
  pointer-events: none;
}

/* ===================================================================
   TYPOGRAPHY — Cormorant Garamond (display) + DM Sans (UI)
   =================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

body {
  font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
}

.home-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.04em;
}

h1, h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  letter-spacing: 0.06em;
}

header.toolbar .menu-item {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  letter-spacing: 0.08em;
  font-size: 12px;
  text-transform: uppercase;
}

header.toolbar .lang-btn {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
}

/* ===================================================================


/* ===================================================================
   BREADCRUMB
   =================================================================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.35);
  font-family: 'DM Sans', sans-serif;
}

.bc-link {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: color 0.15s;
}

.bc-link:hover {
  color: rgba(255,255,255,0.90);
}

.bc-sep {
  color: rgba(255,255,255,0.20);
  font-size: 13px;
  line-height: 1;
}

.bc-current {
  color: rgba(255,255,255,0.75);
  font-weight: 500;
}

/* ===================================================================
   REVEAL ON SCROLL — chapter tiles on home + album tiles on chapter
   =================================================================== */
.tile.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.tile.reveal.inview {
  opacity: 1;
  transform: translateY(0);
}

/* stagger delays */
.tile.reveal:nth-child(1) { transition-delay: 0.00s; }
.tile.reveal:nth-child(2) { transition-delay: 0.07s; }
.tile.reveal:nth-child(3) { transition-delay: 0.14s; }
.tile.reveal:nth-child(4) { transition-delay: 0.21s; }
.tile.reveal:nth-child(5) { transition-delay: 0.28s; }
.tile.reveal:nth-child(6) { transition-delay: 0.35s; }
.tile.reveal:nth-child(n+7) { transition-delay: 0.40s; }

/* ===================================================================
   MOBILE — hide FR/EN lang switch on small screens
   =================================================================== */
@media (max-width: 640px) {
  header.toolbar .lang-switch {
    display: none;
  }
}

/* ===================================================================
   TILE label — Cormorant on title
   =================================================================== */
.tile .label-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.04em;
}

/* ===================================================================
   PAGE HEADER — parent label + grand titre
   =================================================================== */
.page-header {
  padding: 32px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 4px;
}

/* The breadcrumb inside page-header = just the parent link, styled as a tag */
.page-header .breadcrumb {
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-header .breadcrumb::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.22);
  display: block;
}

.page-header .bc-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.10em;
  color: rgba(255,255,255,0.62);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}

.page-header .bc-link:hover {
  color: rgba(255,255,255,0.95);
}

.page-header .page-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(28px, 3.8vw, 48px);
  letter-spacing: 0.02em;
  color: #fff;
  margin: 0;
  line-height: 1.0;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Chapter page (no parent breadcrumb — just title) */
.page-header:not(:has(.breadcrumb)) {
  padding-top: 36px;
}

@media (max-width: 640px) {
  .page-header { padding: 22px 14px 14px; gap: 8px; }
  .page-header .page-title { font-size: 36px; }
}

/* ===================================================================
   TYPOGRAPHY — Cormorant Garamond + DM Sans
   =================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

body { font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif; }

.home-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.04em;
}

h1, h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  letter-spacing: 0.06em;
}

header.toolbar .menu-item {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  letter-spacing: 0.08em;
  font-size: 12px;
  text-transform: uppercase;
}

header.toolbar .lang-btn { font-family: 'DM Sans', sans-serif; font-weight: 500; }

.tile .label-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.04em;
}

/* ===================================================================
   PAGE TRANSITION
   =================================================================== */


/* ===================================================================
   PAGE HEADER — breadcrumb + grand titre
   =================================================================== */
.page-header {
  padding: 32px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 4px;
}

.page-header .breadcrumb {
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-header .breadcrumb::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.22);
  display: block;
}

.page-header .bc-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.10em;
  color: rgba(255,255,255,0.62);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}

.page-header .bc-link:hover { color: rgba(255,255,255,0.95); }

.page-header .page-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(28px, 3.8vw, 48px);
  letter-spacing: 0.02em;
  color: #fff;
  margin: 0;
  line-height: 1.0;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ligne après le titre sur les pages chapitre (pas d'album breadcrumb) */
.page-header:not(:has(.breadcrumb)) .page-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.22);
  display: block;
  min-width: 40px;
}

@media (max-width: 640px) {
  .page-header { padding: 22px 14px 14px; gap: 8px; }
  .page-header .page-title { font-size: 32px; }
}

/* ===================================================================
   MOBILE — cacher FR/EN
   =================================================================== */
@media (max-width: 640px) {
  header.toolbar .lang-switch { display: none; }
}

/* ===================================================================
   REVEAL ON SCROLL — chapter tiles
   =================================================================== */
.tile.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.tile.reveal.inview { opacity: 1; transform: translateY(0); }
.tile.reveal:nth-child(1) { transition-delay: 0.00s; }
.tile.reveal:nth-child(2) { transition-delay: 0.07s; }
.tile.reveal:nth-child(3) { transition-delay: 0.14s; }
.tile.reveal:nth-child(4) { transition-delay: 0.21s; }
.tile.reveal:nth-child(5) { transition-delay: 0.28s; }
.tile.reveal:nth-child(6) { transition-delay: 0.35s; }
.tile.reveal:nth-child(n+7) { transition-delay: 0.40s; }

/* ===================================================================
   MASONRY hover — même effet décollage que les tiles
   CSS only, aucune modification du layout
   =================================================================== */
@media (hover:hover) and (pointer:fine) {
  .masonry a {
    position: relative;
  }

  .masonry a::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    right: 2px; bottom: 2px;
    pointer-events: none;
    z-index: 0;
    background: rgba(255,255,255,.30);
    box-shadow: 14px 14px 34px rgba(0,0,0,.60);
  }

  .masonry a img {
    position: relative;
    z-index: 1;
    transition: transform .14s ease;
    will-change: transform;
  }

  .masonry a:hover img {
    transform: translate(3px, 3px);
  }
}

/* ===================================================================
   MASONRY — caption hover (fade + glisse depuis le bas)
   =================================================================== */
.masonry a {
  overflow: hidden;
}

.masonry a .caption-hover {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 6px 8px;
  background: rgba(0,0,0,.62);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,.95);
  line-height: 1.3;
  opacity: 0;
  transform: translate(0px, 4px);
  transition: opacity 0.22s ease, transform 0.14s ease;
  pointer-events: none;
}

@media (hover:hover) and (pointer:fine) {
  .masonry a:hover .caption-hover {
    opacity: 1;
    transform: translate(3px, 3px);
  }
}

/* ===================================================================
   TOOLBAR — délimitation + séparateurs + Chapitres mis en valeur
   =================================================================== */

/* Border bottom plus visible */
header.toolbar {
  border-bottom: 1px solid rgba(255,255,255,0.32);
}

/* Séparateur entre items */
header.toolbar .menu-item + .menu-item {
  border-left: 1px solid rgba(255,255,255,0.32);
  padding-left: 16px;
  margin-left: 2px;
}

/* Chapitres — isolé, font un poil plus grande */
header.toolbar .menu-item:first-child {
  border-left: none;
  font-size: 13px;
  color: rgba(255,255,255,0.92);
  padding-right: 18px;
  margin-right: 4px;
  border-right: 1px solid rgba(255,255,255,0.38);
}

/* Annuler le border-left sur le 2e item (déjà géré par border-right du 1er) */
header.toolbar .menu-item:nth-child(2) {
  border-left: none;
  padding-left: 8px;
}

/* Toolbar border-bottom : discret sur pages intérieures (chapter + album), plein sur home */
body[data-page-type="chapter"] header.toolbar,
body[data-page-type="album"] header.toolbar {
  border-bottom-color: rgba(255,255,255,0.10);
}

/* Protection images — appui long mobile + sélection */
img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ===================================================================
   PHOTOSWIPE — mobile fixes
   =================================================================== */

/* Force fullscreen correct sur mobile (ignore la toolbar sticky) */
.pswp {
  --pswp-root-z-index: 2000;
}

/* Bouton fermer — toujours visible */
.pswp__button--close {
  display: block !important;
  opacity: 1 !important;
}

/* Sur mobile: s'assurer que pswp prend tout l'écran */
@media (max-width: 768px) {
  .pswp {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }
}

/* PhotoSwipe — couvre complètement la toolbar sticky */
.pswp {
  z-index: 99999 !important;
}

/* Bouton close — toujours visible et cliquable */
.pswp__button--close {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: all !important;
}

/* ===================================================================
   MOBILE — toolbar compacte + masonry serré
   =================================================================== */
@media (max-width: 640px) {
  /* Toolbar : font plus petite, padding minimal */
  header.toolbar {
    padding: 10px 8px;
    gap: 0;
    overflow: hidden;
  }
  header.toolbar .menu {
    gap: 0;
    overflow: hidden;
  }
  header.toolbar .menu-item {
    font-size: 10px;
    padding: 4px 6px;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }
  /* Cacher EXHIBITIONS sur très petits écrans */
  header.toolbar .menu-item:last-child {
    display: none;
  }
  /* Séparateurs toolbar mobile */
  header.toolbar .menu-item + .menu-item {
    padding-left: 6px;
  }
  header.toolbar .menu-item:first-child {
    padding-right: 6px;
  }
}

@media (max-width: 640px) {
  /* Masonry 2 colonnes — réduire gaps et padding */
  .masonry {
    gap: 8px !important;
    padding: 8px !important;
  }
}

/* Mobile masonry — 2 colonnes pleine largeur, pas de centrage */
@media (max-width: 640px) {
  .masonry {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    justify-content: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .masonry a {
    width: 100% !important;
  }
  .masonry img {
    width: 100% !important;
    height: auto !important;
  }
}

/* Mobile masonry — CSS grid full width, images s'adaptent */
@media (max-width: 640px) {
  .masonry {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 30px !important;
    padding: 30px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .masonry figure {
    margin: 0 !important;
  }
  .masonry a {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    position: relative !important;
  }
  .masonry img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: unset !important;
  }
}
