/* ===== 04-media-post-menu.css ===== */
/* ===== extrait de index.html : style #9 ===== */
  .media {
    position: relative;

    /*
      Le scroll vertical reste autorisé,
      mais Safari ne doit pas gérer le double tap comme un zoom.
    */
    touch-action: pan-y pinch-zoom;

    user-select: none;
    -webkit-user-select: none;
  }

  .media > img {
    -webkit-user-drag: none;
  }

  .media-like-heart {
    position: absolute;
    left: 50%;
    top: 50%;

    width: 104px;
    height: 104px;

    display: grid;
    place-items: center;

    pointer-events: none;

    opacity: 0;

    transform:
      translate(-50%, -50%)
      scale(.35);

    z-index: 5;
  }

  .media-like-heart svg {
    width: 100%;
    height: 100%;

    fill: #fff;
    stroke: #fff;

    filter:
      drop-shadow(0 3px 12px rgba(0,0,0,.55));
  }

  .media-like-heart.show {
    animation:
      grftsh-heart-pop
      720ms
      cubic-bezier(.2,.85,.25,1)
      forwards;
  }

  @keyframes grftsh-heart-pop {
    0% {
      opacity: 0;
      transform:
        translate(-50%, -50%)
        scale(.35);
    }

    18% {
      opacity: 1;
      transform:
        translate(-50%, -50%)
        scale(1.16);
    }

    40% {
      opacity: 1;
      transform:
        translate(-50%, -50%)
        scale(.96);
    }

    60% {
      opacity: 1;
      transform:
        translate(-50%, -50%)
        scale(1);
    }

    100% {
      opacity: 0;
      transform:
        translate(-50%, -50%)
        scale(1.08);
    }
  }

/* ===== extrait de index.html : style #10 ===== */
  /*
    GRFTSH — protection UX des médias

    Ceci bloque les mécanismes faciles :
    - long press iOS
    - sélection
    - glisser-déposer
    - menu contextuel géré plus bas en JS

    Ce n'est volontairement pas présenté comme un DRM :
    une capture d'écran ou une extraction réseau
    restent techniquement possibles sur le Web.
  */

  .media,
  .public-profile-grid-item,
  .avatar,
  .profile-avatar,
  .public-profile-avatar,
  .comment-avatar {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }

  .media img,
  .public-profile-grid-item img,
  .avatar img,
  .profile-avatar img,
  .public-profile-avatar img,
  .comment-avatar img {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }

  /*
    L'image elle-même ne capte pas les interactions :
    son conteneur continue de recevoir les taps,
    notamment notre double-tap Like.
  */
  .media > img,
  .public-profile-grid-item > img {
    pointer-events: none;
  }

/* ===== extrait de index.html : style #11 ===== */
  .post-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1900;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    padding:
      12px
      max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));

    background: rgba(0,0,0,.68);

    overscroll-behavior: none;
  }

  .post-menu-overlay[hidden] {
    display: none;
  }

  .post-menu-sheet {
    width: 100%;
    max-width: 520px;

    display: grid;
    gap: 8px;
  }

  .post-menu-action {
    width: 100%;
    min-height: 54px;

    padding: 12px 18px;

    border: 1px solid #292929;
    border-radius: 16px;

    background: #151515;
    color: #fff;

    font: inherit;
    font-size: 15px;
    font-weight: 700;

    cursor: pointer;
  }

  .post-menu-action:active {
    opacity: .72;
  }

  .post-menu-cancel {
    margin-top: 2px;
    background: #0b0b0b;
  }

  @media (min-width: 700px) {
    .post-menu-overlay {
      align-items: center;
    }
  }
