/* Photos : la vue STILL de FRASIL STREAM, reprise pour le portfolio.
   Un fond noir, un grain fixe éclairé par deux nuages de lumière qui dérivent lentement (un chaud, un froid),
   une vignette; la photo dans un passe-partout noir (8 % de son grand côté) avec une ombre profonde, puis la
   suivante en fondu. En haut les catégories, en bas le diaporama et Instagram. */

.night { height: 100%; overflow: hidden; background: #000; color: #e9e4da; }
.night .top { position: fixed; background: transparent; background-image: none; box-shadow: none; z-index: 20; }
.night .brand { color: #f1ebe0; }
.night .nav a { color: rgba(233, 228, 218, .62); }
.night .nav a:hover, .night .nav a[aria-current="page"] { color: #f6f1e7; }
.night .nav a::after { background: rgba(242, 166, 90, .85); height: 1px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.stage { position: fixed; inset: 0; overflow: hidden; background: #000; isolation: isolate; }
.stage > .grain { position: absolute; inset: 0; z-index: 1; background: url(img/grain-night.png) repeat; mix-blend-mode: screen; pointer-events: none; }
.stage > .lite { position: absolute; left: 50%; top: 45%; width: 0; height: 0; will-change: transform; animation: wanderA 47s ease-in-out infinite alternate; pointer-events: none; }
.stage > .lite i { position: absolute; left: -66vmax; top: -50vmax; width: 132vmax; height: 100vmax; will-change: transform; animation: wanderB 71s ease-in-out infinite alternate;
  background: radial-gradient(ellipse 30% 22% at 38% 46%, rgba(236,226,214,.211), rgba(236,226,214,0) 72%),
    radial-gradient(ellipse 26% 18% at 58% 40%, rgba(236,226,214,.169), rgba(236,226,214,0) 72%),
    radial-gradient(ellipse 34% 20% at 50% 58%, rgba(236,226,214,.137), rgba(236,226,214,0) 72%),
    radial-gradient(ellipse 18% 14% at 70% 54%, rgba(236,226,214,.116), rgba(236,226,214,0) 72%),
    radial-gradient(ellipse 22% 16% at 28% 60%, rgba(236,226,214,.105), rgba(236,226,214,0) 72%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(236,226,214,.053), rgba(236,226,214,0) 72%); }
.stage > .lite.cold { top: 62%; animation-duration: 59s; animation-direction: alternate-reverse; }
.stage > .lite.cold i { left: -82vmax; top: -46vmax; width: 164vmax; height: 92vmax; animation-duration: 83s; animation-direction: alternate-reverse; transform: scaleX(-1);
  background: radial-gradient(ellipse 30% 22% at 38% 46%, rgba(150,184,218,.186), rgba(150,184,218,0) 72%),
    radial-gradient(ellipse 26% 18% at 58% 40%, rgba(150,184,218,.149), rgba(150,184,218,0) 72%),
    radial-gradient(ellipse 34% 20% at 50% 58%, rgba(150,184,218,.121), rgba(150,184,218,0) 72%),
    radial-gradient(ellipse 18% 14% at 70% 54%, rgba(150,184,218,.102), rgba(150,184,218,0) 72%),
    radial-gradient(ellipse 22% 16% at 28% 60%, rgba(150,184,218,.093), rgba(150,184,218,0) 72%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(150,184,218,.046), rgba(150,184,218,0) 72%); }
@keyframes wanderA { from { transform: translate3d(-40vw, -24vh, 0); } to { transform: translate3d(36vw, 22vh, 0); } }
@keyframes wanderB { from { transform: translate3d(22vw, 24vh, 0); } to { transform: translate3d(-20vw, -26vh, 0); } }
.stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 85% 80% at 50% 42%, transparent 40%, rgba(0,0,0,.55)); }

/* Les catégories : trois titres en romain, celui qu'on regarde souligné d'une lueur de lampe */
.ph-head { position: absolute; z-index: 4; left: 0; right: 0; top: 86px; display: flex; justify-content: center; padding: 0 24px; }
.cats { display: flex; align-items: baseline; gap: 8px 34px; flex-wrap: wrap; justify-content: center; }
.cat {
  all: unset; cursor: pointer; position: relative; padding: 6px 0 8px;
  font-family: var(--serif); font-size: 21px; line-height: 1.1; letter-spacing: .005em; color: rgba(233, 228, 218, .5);
  transition: color .4s var(--ease);
}
.cat em { font-style: italic; }
.cat sup { margin-left: 5px; font: 600 10px/1 var(--sans); letter-spacing: .12em; vertical-align: 7px; color: rgba(233, 228, 218, .38); }
.cat::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, rgba(242,166,90,0), rgba(242,166,90,.95) 20%, rgba(242,166,90,.95) 80%, rgba(242,166,90,0)); transform: scaleX(0); transition: transform .6s var(--ease); }
.cat:hover { color: rgba(240, 235, 226, .82); }
.cat[aria-selected="true"] { color: #f6f1e7; }
.cat[aria-selected="true"]::after { transform: scaleX(1); }
.cat:focus-visible { outline: 1px solid rgba(242, 166, 90, .7); outline-offset: 6px; }

/* La photo, dans son passe-partout noir */
.show { position: absolute; inset: 0; z-index: 2; touch-action: pan-y; }
.pf {
  position: absolute; z-index: 2; margin: 0; left: var(--x); top: var(--y); padding: var(--b); background: #050505;
  opacity: 0; pointer-events: none; transition: opacity 1.8s ease-in-out;
  box-shadow: 0 2px 4px rgba(0,0,0,.3), 0 14px 34px -6px rgba(0,0,0,.5), 0 46px 110px -18px rgba(0,0,0,.62);
}
.pf.on { opacity: 1; pointer-events: auto; }
.pf.fast { transition-duration: .7s; }
.pf img { display: block; width: var(--w); height: var(--h); }
.pcr { position: absolute; right: 0; top: 100%; transform: translateY(10px); display: flex; align-items: center; gap: 8px; white-space: nowrap; font: 600 9.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: rgba(170, 170, 170, .6); }
.pcr a { color: inherit; text-decoration: none; padding: 4px 0; }
.pcr a:hover, .pcr a:focus-visible { color: #dcdcdc; }
.cat-note { position: absolute; z-index: 3; left: 50%; bottom: 128px; transform: translateX(-50%); margin: 0; font-family: var(--serif); font-style: italic; font-size: 17px; color: rgba(233, 228, 218, .6); white-space: nowrap; }

/* Les flèches */
.arrow {
  all: unset; cursor: pointer; position: absolute; z-index: 5; top: 50%; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%;
  display: grid; place-items: center; color: rgba(240, 235, 226, .78); box-shadow: inset 0 0 0 1px rgba(240, 235, 226, .2);
  transition: color .3s, box-shadow .3s, background-color .3s;
}
.arrow.prev { left: 34px; }
.arrow.next { right: 34px; }
.arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.arrow:hover { color: #fff; box-shadow: inset 0 0 0 1px rgba(240, 235, 226, .5); background-color: rgba(255, 255, 255, .04); }
.arrow:focus-visible, .play:focus-visible, .follow:focus-visible { outline: 2px solid rgba(242, 166, 90, .8); outline-offset: 3px; }
.arrow[hidden] { display: none; }

/* En bas : le diaporama à gauche, Instagram à droite */
.dock { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 44px 30px; }
.ctl { display: flex; align-items: center; gap: 18px; }
.play { all: unset; cursor: pointer; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: rgba(240, 235, 226, .85); box-shadow: inset 0 0 0 1px rgba(240, 235, 226, .22); transition: box-shadow .3s, color .3s; }
.play:hover { color: #fff; box-shadow: inset 0 0 0 1px rgba(240, 235, 226, .5); }
.play svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.play .i-play { fill: currentColor; stroke-width: 1; }
.play[aria-pressed="true"] .i-play, .play[aria-pressed="false"] .i-pause { display: none; }
.play[hidden] { display: none; }
.count { font: 600 12px/1 var(--sans); letter-spacing: .2em; color: rgba(233, 228, 218, .62); font-variant-numeric: tabular-nums; }
.count b { font-weight: 600; color: #f3eee4; }
.count i { font-style: normal; margin: 0 8px; opacity: .5; }
.prog { position: relative; width: 120px; height: 1px; background: rgba(233, 228, 218, .16); overflow: hidden; }
.prog i { position: absolute; inset: 0; background: rgba(242, 166, 90, .9); transform-origin: 0 0; transform: scaleX(0); }
.prog.run i { transform: scaleX(1); transition: transform var(--each, 7s) linear; }
.prog[hidden] { display: none; }

.follow {
  display: inline-flex; align-items: center; gap: 14px; padding: 11px 22px 11px 14px; border-radius: 999px; text-decoration: none; color: #f6f1e7;
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(240, 235, 226, .22), 0 10px 30px -12px rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color .3s, box-shadow .3s, transform .3s var(--ease);
}
.follow:hover { background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(240, 235, 226, .45), 0 0 0 6px rgba(214, 36, 159, .08), 0 14px 34px -12px rgba(0, 0, 0, .9); }
.follow .ig { width: 30px; height: 30px; flex: none; }
.follow span { display: grid; gap: 3px; }
.follow b { font: 600 15px/1.1 var(--sans); letter-spacing: .01em; }
.follow small { font: 400 12.5px/1.2 var(--sans); color: rgba(233, 228, 218, .62); }

/* Téléphone */
@media (max-width: 720px) {
  .night .top { position: fixed; background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,0)); }
  .ph-head { top: 92px; padding: 0 12px; }
  .cats { gap: 6px 20px; }
  .cat { font-size: 17px; }
  .arrow { width: 40px; height: 40px; margin-top: -20px; background: rgba(0, 0, 0, .25); }
  .arrow.prev { left: 8px; }
  .arrow.next { right: 8px; }
  .dock { flex-direction: column; align-items: stretch; gap: 14px; padding: 0 16px max(18px, env(safe-area-inset-bottom)); }
  .ctl { justify-content: center; }
  .follow { justify-content: center; }
  .cat-note { bottom: 150px; font-size: 15px; white-space: normal; width: 86%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .stage > .lite, .stage > .lite i { animation: none; }
}
