/* SignalNids — bandeau de téléchargement, navigateur mobile uniquement (V1.0.0).
   Isolé du CSS général : aucune règle ne modifie le menu mobile ou les formulaires. */
.sn-app-banner[hidden] { display: none !important; }

@media (max-width: 767px) {
  .sn-app-banner,
  .sn-app-banner * {
    box-sizing: border-box;
  }

  .sn-app-banner.is-visible {
    --sn-banner-green: #00513e;
    position: fixed;
    z-index: 1200;
    left: max(10px, env(safe-area-inset-left, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
    bottom: max(
      calc(var(--sn-app-banner-nav-offset, 0px) + 9px),
      calc(env(safe-area-inset-bottom, 0px) + 10px)
    );
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 9px 10px;
    width: auto;
    max-width: 470px;
    margin-inline: auto;
    padding: 10px 12px 12px;
    color: #103f31;
    background: #fff;
    border: 1px solid #c9dfd2;
    border-radius: 17px;
    box-shadow: 0 8px 30px rgba(0, 38, 29, .19), 0 2px 8px rgba(0, 38, 29, .08);
    font: 400 14px/1.35 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: left;
    -webkit-font-smoothing: antialiased;
    animation: sn-banner-appear .24s ease-out both;
  }

  .sn-app-banner__icon {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 1px solid #dce9e2;
    border-radius: 12px;
    background: #eaf4ed;
  }

  .sn-app-banner__copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
  }

  .sn-app-banner__copy strong {
    display: block;
    color: #093a2d;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.23;
    overflow-wrap: break-word;
  }

  .sn-app-banner__copy span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    color: #566860;
    font-size: 11px;
    line-height: 1.35;
  }

  .sn-app-banner__close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    color: #5d7068;
    background: #f3f7f4;
    box-shadow: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
  }

  .sn-app-banner__close svg {
    display: block;
    width: 19px;
    height: 19px;
  }

  .sn-app-banner__link,
  .sn-app-banner__link:visited {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 43px;
    padding: 10px 13px;
    color: #fff;
    background: var(--sn-banner-green);
    border: 1px solid var(--sn-banner-green);
    border-radius: 11px;
    text-align: center;
    text-decoration: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.25;
    cursor: pointer;
    touch-action: manipulation;
  }

  .sn-app-banner__link:hover,
  .sn-app-banner__link:active {
    color: #fff;
    background: #006c52;
    text-decoration: none;
  }

  .sn-app-banner__link svg { flex: 0 0 18px; }
  .sn-app-banner__link span { white-space: nowrap; }

  .sn-app-banner__link small {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 3px 6px;
    border-radius: 6px;
    color: #f7fff9;
    background: rgba(255, 255, 255, .15);
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
  }

  .sn-app-banner__close:focus-visible,
  .sn-app-banner__link:focus-visible {
    outline: 3px solid #e7b72e;
    outline-offset: 3px;
  }
}

@media (max-width: 350px) {
  .sn-app-banner.is-visible { gap: 8px; padding-inline: 9px; }
  .sn-app-banner__copy strong { font-size: 13px; }
  .sn-app-banner__link,
  .sn-app-banner__link:visited { gap: 6px; font-size: 12px; padding-inline: 8px; }
  .sn-app-banner__link small { display: none; }
}

/* Couche de protection supplémentaire lorsque le navigateur bascule en mode PWA. */
@media (display-mode: standalone) {
  .sn-app-banner.is-visible { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .sn-app-banner.is-visible { animation: none; }
}

@keyframes sn-banner-appear {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
