/* Bande infinie (Lezieu, refaite le 03/11) : la grille sans fin, le grand titre du dossier allumé, la vue en grand, et la visionneuse habillée à son image.
   Les couleurs et la typo sont celles de la mise en page (--fond, --texte : --b-bg et --b-ink ; --b-fd : la typo des titres). */

.m-bande { touch-action: pan-y; cursor: crosshair; --pale: color-mix(in srgb, var(--texte) 30%, var(--fond)); }
.m-bande .mb-monde, .m-bande .mb-bande2 { position: absolute; inset: 0; transition: visibility 0s, opacity 0s; }
.m-bande:not([data-vue=bande]) .mb-bande2, .m-bande[data-vue=bande] .mb-monde { visibility: hidden; opacity: 0; transition: visibility 0s .55s, opacity 0s .55s; }
.m-bande .mb-monde { will-change: transform; }
.m-bande .mb-grille { position: absolute; inset: 0; }
.mb-col { position: absolute; left: 0; top: 0; width: calc(100% / 8); height: 100%; will-change: transform; }
@container (max-width: 620px) { .mb-col { width: 25%; } }

/* une photo de la grille : pâlie en noir et blanc, en couleur quand son dossier est allumé ; les coins s'arrondissent avec la vitesse */
.mb-case { position: absolute; margin: 0; overflow: hidden; border-radius: var(--rond, 0px); cursor: pointer; }
.mb-case img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(.78) brightness(1.12); opacity: .3; transition: filter .55s, opacity .55s; }
.mb-case.on img { filter: none; opacity: 1; }
@media (hover: hover) { .mb-case:hover img { opacity: 1; } }
/* l'arrivée et le retour : les photos montent, basculées, et se posent colonne après colonne */
.mb-grille.arrive .mb-case { animation: mb-pose 1.15s cubic-bezier(.16, 1, .3, 1) backwards; animation-delay: calc(var(--d, 0) * 1ms + var(--rg, 0) * 45ms); }
@keyframes mb-pose { from { opacity: 0; transform: perspective(700px) translateY(90px) rotateX(-62deg) scale(.82); } }

/* en haut : le titre de la galerie à gauche, les dossiers à droite (des liens vers leur page, avec leur nombre de photos ; aucun n'est « en cours » : le grand titre du bas dit lequel est allumé) */
.mb-haut { position: absolute; z-index: 4; left: var(--marge); right: var(--marge); top: 16px; display: flex; justify-content: space-between; align-items: baseline; gap: 24px; font: 600 14px/1.3 var(--sans); letter-spacing: -.01em; pointer-events: none; }
.mb-nom { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mb-dossiers { pointer-events: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 22px; }
.mb-dossiers button { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline 1px transparent; text-underline-offset: 4px; transition: text-decoration-color .3s, opacity .3s; opacity: .7; }
.mb-dossiers button:hover, .mb-dossiers button:focus-visible { opacity: 1; text-decoration-color: currentColor; }
.mb-dossiers sup { font-size: .72em; margin-left: 4px; opacity: .7; }

/* le grand titre : le dossier allumé, son nombre de photos en exposant, le total dessous ; les lettres montent quand il change */
.mb-titre { position: absolute; z-index: 4; left: 50%; bottom: max(14px, calc(var(--H, 800px) * .035)); translate: -50% 0; text-align: center; pointer-events: none; white-space: nowrap; max-width: calc(100% - 2 * var(--marge)); }
.mb-titre h2 { margin: 0; font: 600 calc(var(--b-ts, 1) * clamp(36px, 4.7cqw, 104px))/.92 var(--b-fd, var(--sans)); letter-spacing: -.045em; text-transform: var(--b-tt, none); overflow: hidden; text-overflow: ellipsis; padding: 0 .08em .04em; }
.mb-titre sup { font: 600 13px/1 var(--sans); letter-spacing: .02em; vertical-align: top; position: relative; top: .25em; margin-left: .25em; white-space: pre; }
.mb-titre p { margin: 8px 0 0; font: 600 13px/1 var(--sans); letter-spacing: -.01em; }
.mb-t i { display: inline-block; font-style: normal; }
.mb-t.entre i { animation: mb-lettre .75s cubic-bezier(.16, 1, .3, 1) backwards; animation-delay: calc(var(--i) * 26ms); }
@keyframes mb-lettre { from { opacity: 0; transform: translateY(.45em); } }

/* les deux vues, en bas à droite */
.mb-vues { position: absolute; z-index: 4; right: var(--marge); bottom: 18px; display: flex; gap: 12px; align-items: center; }
.mb-vues button { background: none; border: 0; padding: 4px; cursor: pointer; opacity: .32; transition: opacity .3s; line-height: 0; }
.mb-vues button[aria-pressed=true], .mb-vues button:hover { opacity: 1; }
.mb-vues svg { fill: currentColor; }

/* le voile gris du clic */
.mb-voile { position: absolute; inset: 0; z-index: 8; background: color-mix(in srgb, var(--texte) 42%, var(--fond)); opacity: 0; pointer-events: none; }
.m-bande.ouvre .mb-titre, .m-bande.ouvre .mb-haut, .m-bande.ouvre .mb-vues { opacity: 0; transition: opacity .4s; }

/* la deuxième vue : les photos en grand, côte à côte, sur fond sombre ; celle du milieu éclairée */
.m-bande[data-vue=bande] { background: #1C1C1C; color: #F1EFE7; transition: background-color .5s, color .5s; }
.mb-pan { position: absolute; left: 0; top: 0; height: 100%; margin: 0; overflow: hidden; cursor: pointer; will-change: transform; background: #262626; }
.mb-pan img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mb-pan::after { content: ''; position: absolute; inset: 0; background: rgba(12, 12, 12, .64); transition: opacity .7s; pointer-events: none; }
.mb-pan.vu::after { opacity: 0; }
.m-bande[data-vue=bande] .mb-titre { text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }

/* sur téléphone : le titre plus haut, les deux vues centrées dessous */
@container (max-width: 620px) {
  .mb-haut { top: 12px; font-size: 13px; flex-direction: column; gap: 4px; align-items: flex-start; }
  .mb-dossiers { justify-content: flex-start; flex-wrap: nowrap; white-space: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .mb-titre { bottom: calc(var(--H, 700px) * .1); }
  .mb-titre h2 { font-size: calc(var(--b-ts, 1) * clamp(30px, 11.5cqw, 60px)); }
  .mb-vues { right: auto; left: 50%; translate: -50% 0; bottom: calc(var(--H, 700px) * .035); }
}

/* la visionneuse de Lezieu, habillée par la Bande infinie : fond clair, textes sombres, le dossier à gauche, les vignettes à droite */
.lb.peau-bande { background: var(--pb-fond); color: var(--pb-texte); font-family: var(--pb-typo); }
.lb.peau-bande .lb-top, .lb.peau-bande .lb-bot, .lb.peau-bande .lb-info .lb-name, .lb.peau-bande .lb-pct { color: var(--pb-texte); }
.lb.peau-bande .lb-k { color: var(--pb-texte); border-color: color-mix(in srgb, var(--pb-texte) 30%, transparent); opacity: .6; }
.lb.peau-bande .lb-top button, .lb.peau-bande .lb-bot button { background: transparent; color: var(--pb-texte); border-radius: 0; font-weight: 600; }
.lb.peau-bande .lb-top button:hover, .lb.peau-bande .lb-bot button:hover { background: color-mix(in srgb, var(--pb-texte) 8%, transparent); }
.lb.peau-bande .lb-zoom { background: transparent; }
.lb.peau-bande .lb-x { border: 0 !important; }
.lb.peau-bande .lb-x.lb-plein { border: 1px solid color-mix(in srgb, var(--pb-texte) 30%, transparent) !important; }
.lb.peau-bande .lb-bot .lba { background: transparent; border: 1px solid color-mix(in srgb, var(--pb-texte) 22%, transparent); }
.lb.peau-bande .lb-bot .lba.on { background: var(--pb-texte); color: var(--pb-fond); border-color: var(--pb-texte); }
.lb.peau-bande .lb-nav { background: transparent; border-color: color-mix(in srgb, var(--pb-texte) 25%, transparent); color: var(--pb-texte); backdrop-filter: none; }
.lb.peau-bande .lb-view { margin: 0 clamp(150px, 13vw, 220px); }
.lb.peau-bande .lb-tiroir { color: var(--pb-texte); }
/* fond blanc ou fond noir (08/11), choisi dans la visionneuse : il passe avant les couleurs de la galerie */
.lb.lb-blanc.peau-bande { --pb-fond: #FAFAF8 !important; --pb-texte: #141414 !important; }
.lb.lb-noir.peau-bande { --pb-fond: #0B0C0D !important; --pb-texte: #F1EFE7 !important; }
.pb-dossier { position: absolute; z-index: 3; left: 24px; top: 50%; translate: 0 -50%; max-width: calc(clamp(150px, 13vw, 220px) - 36px); display: flex; flex-wrap: wrap; gap: 4px 12px; font: 600 14px/1.25 var(--pb-typo); pointer-events: none; }
.pb-dossier span { text-transform: uppercase; opacity: .5; letter-spacing: .01em; }
/* la pellicule du dossier, à droite : elle défile (molette, trackpad) et revient se poser sur la photo vue */
.pb-vignettes { position: absolute; z-index: 3; right: 72px; top: 70px; bottom: 70px; width: 72px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(transparent, #000 10%, #000 90%, transparent); }
.pb-vignettes::-webkit-scrollbar { display: none; }
.pb-piste { display: flex; flex-direction: column; gap: 10px; }
.pb-piste button { flex: none; display: block; width: 60px; height: 40px; padding: 0; border: 0; margin: 0 auto; background: color-mix(in srgb, var(--pb-texte) 8%, transparent); cursor: pointer; outline: 1px solid transparent; outline-offset: 4px; transition: outline-color .3s, opacity .3s; opacity: .85; }
.pb-piste button.on { outline-color: color-mix(in srgb, var(--pb-texte) 45%, transparent); opacity: 1; }
.pb-piste button:hover { opacity: 1; }
.pb-piste img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pb-vignettes.entre .pb-piste button { animation: pb-tombe .6s cubic-bezier(.16, 1, .3, 1) backwards; animation-delay: calc(420ms + min(var(--j), 24) * 28ms); }
@keyframes pb-tombe { from { opacity: 0; transform: translateY(-14px); } }
.pb-voile { position: absolute; inset: 0; z-index: 20; background: color-mix(in srgb, var(--pb-texte) 42%, var(--pb-fond)); pointer-events: none; }
@media (max-width: 620px), (pointer: coarse) and (max-height: 500px) {
  .lb.peau-bande .lb-view { margin: 0; }
  .pb-vignettes { display: none; }
  .pb-dossier { top: auto; bottom: 64px; translate: none; left: 16px; max-width: calc(100% - 32px); font-size: 13px; }
}
/* l'aperçu téléphone de la Mise en page (.device.mobile) : les mêmes règles qu'un vrai téléphone (15/11) */
.device.mobile .lb.peau-bande .lb-view { margin: 0; }
.device.mobile .pb-vignettes { display: none; }
.device.mobile .pb-dossier { top: auto; bottom: 64px; translate: none; left: 16px; max-width: calc(100% - 32px); font-size: 13px; }

.lb-dans.peau-bande .lb-view { margin: 0 150px; }
@container (max-width: 620px) { .lb-dans.peau-bande .lb-view { margin: 0; } }
