/* Haut de page (Tony 01/11) : son portrait au centre, fondu dans sa ville bleue qui s'étend sur toute la largeur ; les écrans
   Instagram et TikTok de part et d'autre ; derrière, un mur de posts à trois profondeurs (loin = flou et sombre, milieu =
   léger flou, net = devant). Positions des posts : écart au centre (--x), hauteur (--y), largeur (--w), à l'échelle --k. */
.scene { position: relative; z-index: 0; height: 520px; margin: 0 auto; pointer-events: none; --k: 1; }
.ville { position: absolute; z-index: 0; left: 50%; top: calc(-1 * var(--pad-haut)); width: max(100vw, 1500px); height: 940px; translate: -50% 0;
  background: url(/img/hero/ville.webp) 50% 45% / cover no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 52% 58% at 50% 38%, #000 22%, rgba(0, 0, 0, 0.55) 55%, transparent 100%);
  mask-image: radial-gradient(ellipse 52% 58% at 50% 38%, #000 22%, rgba(0, 0, 0, 0.55) 55%, transparent 100%); }

.mur { position: absolute; z-index: 1; inset: 0; }
.post { position: absolute; left: calc(50% + var(--x) * var(--k)); top: calc(var(--y) * var(--k)); width: calc(var(--w) * var(--k)); height: auto;
  aspect-ratio: 4 / 5; object-fit: cover; border-radius: calc(12px * var(--k)); rotate: var(--r, 0deg);
  box-shadow: 0 24px 50px -18px rgba(0, 0, 0, 0.85); animation: flottePost var(--d, 9s) ease-in-out infinite alternate;
  transform: translate(calc(var(--mx, 0) * var(--p, 12px)), calc(var(--my, 0) * var(--p, 12px))); transition: transform 0.9s var(--ressort); }
@keyframes flottePost { to { translate: 0 var(--a, -12px); } }
.post.loin { filter: blur(5px) brightness(0.65); opacity: 0.5; --a: -8px; --p: 8px; }
.post.milieu { filter: blur(1.6px) brightness(0.82); opacity: 0.75; --p: 16px; }
.post.net { box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1); --a: -16px; --p: 28px; }
.p1 { --x: -500px; --y: -50px; --w: 100px; --r: 5deg; --d: 11s; }
.p2 { --x: -735px; --y: 315px; --w: 112px; --r: 5deg; --d: 13s; }
.p3 { --x: 570px; --y: -70px; --w: 110px; --r: 6deg; --d: 12s; }
.p4 { --x: 400px; --y: -50px; --w: 100px; --r: -4deg; --d: 10s; }
.p5 { --x: -690px; --y: -80px; --w: 118px; --r: -6deg; --d: 9s; }
.p6 { --x: -700px; --y: 110px; --w: 128px; --r: -3deg; --d: 10s; }
.p7 { --x: 570px; --y: 110px; --w: 128px; --r: 4deg; --d: 11s; }
.p8 { --x: 600px; --y: 320px; --w: 120px; --r: -5deg; --d: 12s; }
.p9 { --x: -340px; --y: -64px; --w: 116px; --r: -6deg; --d: 10s; }
.p10 { --x: 224px; --y: -72px; --w: 116px; --r: 6deg; --d: 12s; }
.p11 { --x: -570px; --y: 385px; --w: 134px; --r: 5deg; --d: 8s; }
.p12 { --x: 440px; --y: 385px; --w: 134px; --r: -5deg; --d: 9s; }
.p13 { --x: -545px; --y: 150px; --w: 160px; --r: -4deg; --d: 7s; }
.p14 { --x: 385px; --y: 150px; --w: 160px; --r: 4deg; --d: 8s; }

/* Les deux écrans de part et d'autre du portrait, légèrement tournés vers lui */
.reseaux { position: absolute; z-index: 2; inset: 0; display: flex; justify-content: center; align-items: flex-start; perspective: 1400px; }
.portrait { position: relative; z-index: 1; flex: none; width: 460px; aspect-ratio: 4 / 5; margin: 0 -6px; }
.portrait::before { content: ''; position: absolute; z-index: -1; inset: 8% 14% 22%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(125, 192, 213, 0.45), transparent); filter: blur(30px); }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 46%, #000 60%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 46%, #000 60%, transparent 100%); }
.tel { position: relative; z-index: 2; flex: none; width: 184px; aspect-ratio: 9 / 19.5; margin-top: 84px; border-radius: 28px; overflow: hidden; background: #000;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.08); color: #fff; font-size: 11px; }
.tel-insta { transform: rotateY(16deg) rotate(-5deg) translateY(28px); animation: flotteEcran 7s ease-in-out infinite alternate; }
.tel-tiktok { transform: rotateY(-16deg) rotate(5deg); animation: flotteEcran 8s ease-in-out infinite alternate-reverse; }
.tel > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tel svg { width: 20px; height: 20px; flex: none; }
.tel .tel-logo { width: 16px; height: 16px; margin-left: auto; }
.tel-avatar { width: 24px; height: 24px; border-radius: 50%; flex: none; background: var(--bleu); box-shadow: 0 0 0 2px #fff; }
.tel-haut, .tel-onglets, .tel-bas { position: absolute; left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; }
.tel-haut { top: 38px; }
.tel-haut b, .tel-legende b { font-weight: 600; }
.tel-bas { bottom: 18px; justify-content: space-between; }
.tel-bas span { display: flex; gap: 12px; }
.tel-onglets { top: 38px; justify-content: center; gap: 12px; color: rgba(255, 255, 255, 0.6); font-weight: 600; }
.tel-onglets b { color: #fff; }
.tel-onglets .tel-logo { position: absolute; right: 0; margin: 0; }
.tel-rail { position: absolute; right: 10px; bottom: 80px; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.tel-rail svg { width: 23px; height: 23px; }
.tel-legende { position: absolute; left: 12px; right: 52px; bottom: 22px; display: flex; flex-direction: column; gap: 2px; }
.tel-legende span { color: rgba(255, 255, 255, 0.8); }
.tel-haut, .tel-onglets, .tel-bas, .tel-rail, .tel-legende { text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6); }

/* Tablette : même scène, à l'échelle */
@media (max-width: 920px) {
  .scene { height: 410px; --k: 0.74; }
  .ville { height: 760px; }
  .portrait { width: 320px; margin: 0 -34px; }
  .tel { zoom: 0.74; }
}
/* Mobile : le portrait, les deux écrans serrés contre lui, et seulement quelques posts en haut et sur les côtés */
@media (max-width: 520px) {
  .scene { height: 300px; --k: 1; }
  .ville { height: 600px; width: 100vw; background-image: url(/img/hero/ville-960.webp); background-size: auto 100%;
    -webkit-mask-image: radial-gradient(ellipse 75% 55% at 50% 38%, #000 30%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
    mask-image: radial-gradient(ellipse 75% 55% at 50% 38%, #000 30%, rgba(0, 0, 0, 0.5) 60%, transparent 100%); }
  .portrait { width: 220px; margin: 0 -28px; }
  .portrait::before { filter: blur(20px); }
  .tel { zoom: 0.47; }
  .post { display: none; }
  .p9, .p10, .p13, .p14 { display: block; }
  .p13 { --x: -178px; --y: -30px; --w: 76px; --r: -8deg; }
  .p9 { --x: -98px; --y: -60px; --w: 60px; }
  .p10 { --x: 38px; --y: -62px; --w: 60px; }
  .p14 { --x: 102px; --y: -32px; --w: 76px; --r: 8deg; }
}
