/* Premier plan (Lezieu, refait le 08/11 d'après First Frame) : l'écran plein cadre et sa vague liquide, la croix de la souris, l'accueil, le lecteur d'un dossier,
   les affiches, la visionneuse. Couleurs de la mise en page : --fond (le noir), --texte (le blanc). Typo : --serif (les grands noms), --sans (les petites capitales). */

.m-ff { --ff-m: clamp(16px, 1.39cqw, 20px); --ff-h: clamp(46px, 3.75cqw, 54px); --ff-p: clamp(10px, .83cqw, 12px); --ff-g: clamp(26px, 3.33cqw, 48px);
  background: var(--fond); color: var(--texte); font-family: var(--sans); user-select: none; -webkit-user-select: none; overflow: hidden; touch-action: none; }
.ff-bande, .ff-rangee { touch-action: pan-x; }
.ff-grille-l { touch-action: pan-y; }
.m-ff button { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: inherit; letter-spacing: inherit; text-transform: inherit; }
.m-ff [hidden] { display: none !important; }
.ff-scene { position: absolute; inset: 0; background: #000; }
.ff-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ff-fondu img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
/* un voile léger en haut et en bas : les mots blancs restent lisibles sur une photo claire */
.ff-scene::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .38), rgba(0, 0, 0, 0) 24%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, .52)); pointer-events: none; }
.m-ff.sombre .ff-scene::after { background: linear-gradient(rgba(0, 0, 0, .42), rgba(0, 0, 0, .05) 26%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .66)); }
.ff-voile { position: absolute; inset: 0; z-index: 9; background: #000; opacity: 0; pointer-events: none; }
.m-ff :is(.ff-lien, .ff-devise, .ff-tag, .ff-num, .ff-idx, .ff-mot, .ff-filtres, .ff-aff-bas, .ff-aff-n) { font: 400 var(--ff-p)/1.3 var(--sans); text-transform: uppercase; letter-spacing: .02em; }
.ff-lien { transition: opacity .25s; }

/* le haut : le nom de la galerie dans sa case, les dossiers, « Dossiers » et « Photos » ; un trait dessous */
.ff-tete { position: absolute; z-index: 6; left: 0; right: 0; top: 0; height: var(--ff-h); display: flex; align-items: center; color: #fff; }
.m-ff .ff-logo { position: relative; height: 100%; padding: 0 clamp(18px, 2.7cqw, 39px); display: flex; align-items: center; max-width: 30cqw; font: 500 clamp(12px, .97cqw, 14px)/1 var(--serif); text-transform: uppercase; letter-spacing: .01em; border-right: 1px solid rgba(255, 255, 255, .2); }
.ff-logo span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ff-nav { display: flex; gap: clamp(14px, 2.1cqw, 30px); padding: 0 clamp(14px, 1.4cqw, 20px); min-width: 0; overflow: hidden; }
.ff-nav.d { margin-left: auto; }
.ff-nav .ff-lien { white-space: nowrap; }
.m-ff:not([data-ffpage="accueil"]) .ff-nav .ff-lien:not(.on) { opacity: .45; }
.m-ff .ff-nav .ff-lien:hover { opacity: 1; }
.ff-trait { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgba(255, 255, 255, .3); }

/* la croix de la souris */
.ff-croix { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .3s; }
.ff-croix.vu { opacity: 1; }
.ff-v { position: absolute; top: var(--ff-h); bottom: 0; left: var(--x, 50%); width: 1px; background: rgba(255, 255, 255, .25); }
.ff-v::before { content: ''; position: absolute; left: -2.5px; top: -3px; width: 6px; height: 6px; background: #fff; }
.ff-h { position: absolute; left: 0; right: 0; top: var(--y, 50%); height: 1px; background: rgba(255, 255, 255, .14); }
.ff-mot { position: absolute; left: calc(var(--x, 50%) + 6px); top: calc(var(--y, 50%) - 18px); color: #fff; }
.ff-mot::before { content: ''; position: absolute; left: -9px; top: 15px; width: 5px; height: 5px; background: #fff; }
.ff-idx { position: absolute; left: calc(var(--x, 50%) - 39px); bottom: calc(var(--ff-m) + 2px); color: #fff; font-size: 10px !important; }

/* l'accueil : la devise en haut à droite, le dossier en bas à gauche, un point par dossier en bas */
.ff-accueil, .ff-lecteur, .ff-affiches { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ff-accueil > *, .ff-lecteur > *, .ff-affiches > * { pointer-events: auto; }
.ff-devise { position: absolute; right: clamp(16px, 9.6cqw, 138px); top: calc(var(--ff-h) + clamp(30px, 4.2cqw, 60px)); margin: 0; color: #fff; max-width: 26ch; text-align: left; }
.ff-devise b { display: inline-flex; gap: 2px; margin-right: 1.4em; vertical-align: middle; }
.ff-devise b i { width: 4px; height: 4px; background: currentColor; }
.ff-devise b i:nth-child(2) { width: 3px; } .ff-devise b i:nth-child(3) { width: 2px; }
.ff-bloc { position: absolute; left: var(--ff-m); bottom: clamp(60px, 8cqw, 116px); display: flex; flex-direction: column; align-items: flex-start; gap: clamp(6px, .7cqw, 10px); color: #fff; max-width: 70%; }
.ff-titre { margin: 0; font: 400 var(--ff-g)/1.05 var(--serif); text-transform: uppercase; letter-spacing: -.01em; }
.ff-lm { display: block; overflow: hidden; padding-bottom: .04em; }
.ff-lm > span { display: block; }
.ff-tag { display: inline-block; padding: .18em .45em .12em; border-radius: 2px; }
.ff-cadre { border: 1px solid #fff; }
.ff-plein { background: #fff; color: #000; }
.ff-points { position: absolute; left: 22%; right: 22%; bottom: calc(var(--ff-m) + 6px); display: flex; justify-content: space-between; }
.m-ff .ff-pt { position: relative; width: 18px; height: 18px; display: grid; place-items: center; }
.ff-pt > i { width: 5px; height: 5px; background: rgba(255, 255, 255, .45); transition: background .3s, scale .3s; }
.ff-pt.on > i { background: #fff; }
.ff-pt:hover > i { scale: 1.6; background: #fff; }
.ff-pt-v { position: absolute; bottom: 26px; left: 50%; translate: -50% 6px; width: 120px; display: flex; flex-direction: column; gap: 5px; opacity: 0; pointer-events: none; transition: opacity .3s, translate .4s; }
.ff-pt-v img { width: 100%; aspect-ratio: 16 / 9; max-width: none; object-fit: cover; display: block; }
.ff-pt-v b { font: 400 10px/1.2 var(--sans); text-transform: uppercase; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ff-pt:hover .ff-pt-v { opacity: 1; translate: -50% 0; }

/* le lecteur d'un dossier */
.m-ff .ff-retour { position: absolute; left: var(--ff-m); top: calc(var(--ff-h) + 14px); color: #fff; }
.m-ff .ff-suiv { position: absolute; right: var(--ff-m); top: calc(var(--ff-h) + 14px); color: #fff; }
.ff-suiv b { display: inline-block; width: 5px; height: 5px; background: currentColor; margin-left: .6em; vertical-align: middle; }
.ff-ctl { position: absolute; left: var(--ff-m); right: var(--ff-m); bottom: clamp(150px, 15cqw, 216px); display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; align-items: center; gap: 0 clamp(14px, 1.4cqw, 22px); color: #fff; }
.m-ff .ff-fil { position: relative; height: 18px; }
.ff-fil::before { content: ''; position: absolute; left: 0; right: 0; top: 8px; height: 1px; background: rgba(255, 255, 255, .3); }
.ff-fil i { position: absolute; left: 0; top: 8px; height: 1px; width: 0; background: #fff; }
.ff-fil b { position: absolute; top: 6px; width: 5px; height: 5px; margin-left: -2px; background: #fff; }
.ff-bloc.l { bottom: clamp(30px, 3.5cqw, 50px); max-width: 52%; }
.ff-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ff-bande { position: absolute; right: var(--ff-m); bottom: clamp(30px, 3.5cqw, 50px); width: min(46%, 640px); display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; overscroll-behavior: contain; }
.ff-bande::-webkit-scrollbar { display: none; }
.ff-vg { position: relative; flex: none; margin: 0; width: clamp(110px, 11.8cqw, 170px); }
.m-ff .ff-vg-b { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.ff-vg-b img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; opacity: .62; transition: opacity .3s; }
.ff-vg-b span { position: absolute; left: 50%; top: 50%; translate: -50% -50%; color: #fff; font: 400 10px/1 var(--sans); text-transform: uppercase; opacity: 0; transition: opacity .3s; white-space: nowrap; }
.ff-vg-b:hover img, .ff-vg.on img { opacity: 1; }
.ff-vg-b:hover span { opacity: 1; }
.ff-vg.on .ff-vg-b { outline: 1px solid #fff; outline-offset: -1px; }
.ff-vg .ff-x, .ff-gc .ff-x { top: 4px; right: 4px; width: 24px; height: 24px; font-size: 11px; z-index: 2; }

/* la grille d'un dossier */
.ff-grille { position: absolute; inset: var(--ff-h) 0 0; z-index: 5; background: rgba(0, 0, 0, .9); display: flex; flex-direction: column; color: #fff; }
.ff-grille-h { display: flex; justify-content: space-between; align-items: center; padding: 14px var(--ff-m); font: 400 var(--ff-p)/1.3 var(--sans); text-transform: uppercase; }
.ff-grille-l { flex: 1; overflow-y: auto; overscroll-behavior: contain; display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(110px, 11cqw, 160px), 1fr)); gap: 6px; padding: 0 var(--ff-m) var(--ff-m); align-content: start; scrollbar-width: thin; }
.ff-gc { position: relative; margin: 0; }
.ff-gc button { display: block; width: 100%; aspect-ratio: 1; }
.ff-gc img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; opacity: .82; transition: opacity .25s; }
.ff-gc button:hover img { opacity: 1; }

/* les affiches */
.ff-affiches { background: #000; }
.ff-filtres { position: absolute; left: var(--ff-m); top: calc(var(--ff-h) + 12px); margin: 0; display: flex; flex-direction: column; gap: 4px; color: #fff; }
.ff-filtres b { display: inline-block; width: 6px; height: 6px; border: 1px solid #fff; border-radius: 50%; margin-right: .6em; }
.ff-rangee { position: absolute; left: 0; right: 0; top: calc(var(--ff-h) + 50px); bottom: 54px; overflow: hidden; }
.ff-rangee { display: flex; gap: clamp(8px, 1cqw, 14px); padding: 0 var(--ff-m); }
.ff-rangee > * { translate: var(--x, 0) 0; }
.m-ff .ff-aff { position: relative; flex: none; height: 100%; aspect-ratio: .7; overflow: hidden; background: #111; }
.ff-aff img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; filter: brightness(.42); transition: filter .5s, scale 1.2s cubic-bezier(.16, 1, .3, 1); }
.ff-aff:hover img { filter: brightness(1); scale: 1.03; }
.ff-aff-t { position: absolute; left: 0; right: 0; top: 7%; padding: 0 8%; text-align: center; font: 500 clamp(22px, 3cqw, 44px)/.95 var(--serif); text-transform: uppercase; color: #fff; letter-spacing: -.01em; opacity: .75; transition: opacity .4s; }
.ff-aff:hover .ff-aff-t { opacity: 1; }
.ff-aff-n { position: absolute; left: 0; right: 0; bottom: 6%; text-align: center; color: #fff; }
.ff-aff-bas { position: absolute; left: var(--ff-m); right: var(--ff-m); bottom: 18px; margin: 0; display: flex; justify-content: space-between; color: #fff; }

/* l'arrivée */
.ff-debut { position: absolute; inset: 0; z-index: 10; background: #000; cursor: pointer; }
.ff-debut-l { position: absolute; left: 0; right: 0; top: var(--ff-h); height: 1px; background: rgba(255, 255, 255, .6); transform-origin: left; scale: 0 1; }
.ff-debut-i { position: absolute; top: calc(var(--ff-h) - 22px); color: #fff; font: 500 13px/1 var(--serif); letter-spacing: .04em; }
.m-ff.en-debut .ff-tete, .m-ff.en-debut .ff-croix { visibility: hidden; }

/* sur téléphone (et dans l'aperçu téléphone) */
@container (max-width: 620px) {
  .m-ff { --ff-g: 28px; }
  .m-ff .ff-logo { max-width: 46cqw; padding: 0 14px; }
  .ff-devise { right: 16px; left: 16px; }
  .ff-bloc { max-width: calc(100% - 32px); bottom: 64px; }
  .ff-points { left: 16px; right: 16px; }
  .ff-ctl { grid-template-columns: auto auto minmax(0, 1fr); bottom: auto; top: calc(var(--ff-h) + 44px); gap: 8px 12px; }
  .ff-ctl [data-ffgrille] { grid-column: 1; } .ff-ctl [data-ffplein] { grid-column: 2 / -1; justify-self: start; }
  .ff-bloc.l { bottom: 130px; max-width: calc(100% - 32px); }
  .ff-bande { left: 16px; right: 16px; width: auto; bottom: 22px; }
  .ff-vg { width: 96px; }
  .m-ff .ff-aff { aspect-ratio: .62; }
  .ff-rangee { top: calc(var(--ff-h) + 64px); }
}

/* la visionneuse, habillée comme leur lecteur : noir, petites capitales, le nom du dossier en bas à gauche, « Fermer » */
.lb.peau-ff { background: #000; color: #fff; font-family: var(--ffl-m); grid-template-rows: auto minmax(0, 1fr) auto auto auto; }
.lb.peau-ff :is(.lb-top, .lb-bot) { color: #fff; font: 400 11px/1.3 var(--ffl-m); text-transform: uppercase; letter-spacing: .02em; }
.lb.peau-ff .lb-top { padding: 16px 96px 10px 20px; border-bottom: 1px solid rgba(255, 255, 255, .3); }
.lb.peau-ff :is(.lb-top, .lb-bot) button { background: transparent; color: #fff; border: 0; border-radius: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; opacity: .7; transition: opacity .25s; }
.lb.peau-ff :is(.lb-top, .lb-bot) button:hover { background: transparent; opacity: 1; }
.lb.peau-ff :is(.lb-top, .lb-bot) :is(button[aria-pressed=true], button.on) { opacity: 1; }
.lb.peau-ff .lb-zoom { background: transparent; }
.lb.peau-ff :is(.lb-name, .lb-pct, .lb-info .lb-name) { font: inherit; color: #fff; }
.lb.peau-ff .lb-exif { color: rgba(255, 255, 255, .55); text-transform: none; }
.lb.peau-ff .lb-k { color: #fff; border-color: rgba(255, 255, 255, .35); opacity: .6; }
.lb.peau-ff .lb-x[data-x] { display: none; }
.lb.peau-ff .lb-x.lb-plein { border: 0 !important; background: transparent !important; border-radius: 0 !important; }
.lb.peau-ff .lb-fant { display: none; }
.lb.peau-ff .lb-nav { top: 0; bottom: 0; height: auto; width: 14%; transform: none; border: 0; border-radius: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: #fff; opacity: .7; display: flex; align-items: center; padding: 0 20px; font: 400 11px/1 var(--ffl-m); text-transform: uppercase; }
.lb.peau-ff .lb-nav:hover { background: none; opacity: 1; }
.lb.peau-ff .lb-nav svg { display: none; }
.lb.peau-ff .lb-nav::after { content: attr(data-ff); }
.lb.peau-ff .lb-nav.prev { left: 0; justify-content: flex-start; }
.lb.peau-ff .lb-nav.next { right: 0; justify-content: flex-end; }
.lb.peau-ff.zoomed .lb-nav { width: 64px; }
.lb.peau-ff .lb-bot { border-top: 0; }
.lb.peau-ff .lb-bot .lb-tiroir { background: #000; color: #fff; border: 0; }
.lb.peau-ff .lb-bot :is(.lba, .lbd) { background: transparent; border: 1px solid rgba(255, 255, 255, .3); color: #fff; border-radius: 2px; }
.lb.peau-ff .lb-bot :is(.lba, .lbd).on { background: #fff; border-color: #fff; color: #000; opacity: 1; }
.ff-lb-x { position: absolute; z-index: 4; right: 20px; top: 15px; background: none; border: 0; padding: 2px 0; color: #fff; font: 400 11px/1.3 var(--ffl-m); text-transform: uppercase; cursor: pointer; }
.ff-lb-bas { display: flex; align-items: flex-end; justify-content: space-between; gap: 2em; padding: 14px 20px 12px; }
.ff-lb-g { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.ff-lb-tag { padding: .18em .45em .12em; border: 1px solid #fff; border-radius: 2px; font: 400 11px/1.3 var(--ffl-m); text-transform: uppercase; }
.ff-lb-t { font: 400 clamp(20px, 2.2cqw, 32px)/1.05 var(--ffl-d); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ff-lb-n { font: 400 11px/1.3 var(--ffl-m); flex: none; }
.ff-lb-fil { height: 1px; background: rgba(255, 255, 255, .25); }
.ff-lb-fil i { display: block; height: 100%; width: 0; background: #fff; transition: width .5s cubic-bezier(.65, 0, .35, 1); }
.lb.lb-blanc.peau-ff { background: #F2F2F0; color: #000; }
.lb.lb-blanc.peau-ff :is(.lb-top, .lb-bot, .lb-top button, .lb-bot button, .lb-name, .lb-pct, .lb-nav, .ff-lb-x, .ff-lb-bas) { color: #000; }
.lb.lb-blanc.peau-ff .lb-top { border-bottom-color: rgba(0, 0, 0, .2); }
.lb.lb-blanc.peau-ff .ff-lb-tag { border-color: #000; }
.lb.lb-blanc.peau-ff .ff-lb-fil { background: rgba(0, 0, 0, .15); } .lb.lb-blanc.peau-ff .ff-lb-fil i { background: #000; }
.lb-dans.peau-ff .lb-exif { display: none; }
@media (max-width: 1200px) { .lb.peau-ff .lb-exif { display: none; } }
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .lb.peau-ff .lb-top { padding: 12px 76px 8px 12px; }
  .lb.peau-ff .lb-nav { width: 52px; padding: 0 10px; }
  .ff-lb-x { right: 12px; top: 12px; }
  .ff-lb-bas { padding: 10px 12px 10px; }
}
/* 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-ff .lb-top { padding: 12px 76px 8px 12px; }
.device.mobile .lb.peau-ff .lb-nav { width: 52px; padding: 0 10px; }
.device.mobile .ff-lb-x { right: 12px; top: 12px; }
.device.mobile .ff-lb-bas { padding: 10px 12px 10px; }

.device.mobile .lb.peau-ff .lb-top { padding: 12px 76px 8px 12px; }
.device.mobile .lb.peau-ff .lb-nav { width: 52px; padding: 0 10px; }
