/* Extrait de templates/base.html (servi par core/ressources.py, gardé en cache par le navigateur). */
    #pwa-install-prompt {
      position: fixed; z-index: 999999; display: none;
      left: 50%; transform: translateX(-50%);
      top: calc(10px + env(safe-area-inset-top, 0px));
      width: min(420px, calc(100vw - 20px));
      font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    }
    #pwa-install-prompt.pwa-visible { display: block; animation: pwaSlideUp .4s cubic-bezier(.2,.9,.3,1.1) both; }
    #pwa-install-prompt.pwa-leaving { animation: pwaSlideDown .3s ease-in both; }
    /* Arrive du haut de l'écran et repart vers le haut */
    @keyframes pwaSlideUp { from { opacity: 0; transform: translate(-50%, -24px) scale(.98); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
    @keyframes pwaSlideDown { to { opacity: 0; transform: translate(-50%, -24px) scale(.98); } }
    @media (min-width: 768px) {
      #pwa-install-prompt { left: auto; right: 20px; top: 84px; transform: none; width: 380px; }
      @keyframes pwaSlideUp { from { opacity: 0; transform: translateY(-16px) scale(.98); } to { opacity: 1; transform: none; } }
      @keyframes pwaSlideDown { to { opacity: 0; transform: translateY(-16px) scale(.98); } }
    }
    .pwa-card {
      position: relative; overflow: hidden; border-radius: 20px; padding: 16px;
      background: linear-gradient(145deg, rgba(var(--ixc-surface-rgb,24,24,28),0.92), rgba(var(--ixc-fond-rgb,8,8,10),0.94));
      border: 1px solid rgba(var(--ixc-encre-rgb,255,255,255),0.1);
      box-shadow: 0 20px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04) inset;
      -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    }
    .pwa-card::before {
      content: ''; position: absolute; top: -50px; right: -50px; width: 140px; height: 140px;
      background: transparent; pointer-events: none;
    }
    /* Croix de fermeture : cercle jaune plein, diamètre fixe, forme stable (pas d'effet au survol) */
    #pwa-dismiss-btn {
      position: absolute !important; top: 10px !important; right: 10px !important; z-index: 2;
      width: 28px !important; height: 28px !important;
      min-width: 28px !important; min-height: 28px !important;
      max-width: 28px !important; max-height: 28px !important;
      aspect-ratio: 1 / 1; box-sizing: border-box !important;
      padding: 0 !important; margin: 0 !important; border-radius: 50% !important;
      display: flex !important; align-items: center !important; justify-content: center !important;
      background: #FFD73A !important; border: 0 !important; color: #000 !important;
      box-shadow: none !important;
      cursor: pointer; line-height: 0 !important; flex-shrink: 0;
    }
    #pwa-dismiss-btn:hover, #pwa-dismiss-btn:active { background: #FFD73A !important; color: #000 !important; transform: none !important; }
    #pwa-dismiss-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
    #pwa-dismiss-btn svg { width: 13px !important; height: 13px !important; display: block; flex-shrink: 0; }
    @media (max-width: 360px) { #pwa-dismiss-btn { top: 8px !important; right: 8px !important; } }
    .pwa-row { position: relative; display: flex; align-items: center; gap: 12px; padding-right: 32px; }
    .pwa-icon { flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px; object-fit: cover;
      border: 1px solid rgba(var(--ixc-encre-rgb,255,255,255),0.12); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
    .pwa-icon.round { border-radius: 50%; }
    .pwa-title { color: var(--ixc-texte,#fff); font-weight: 700; font-size: 14px; line-height: 1.25; margin: 0 0 2px; }
    .pwa-sub { color: var(--ixc-texte-3,#9ca3af); font-size: 12px; line-height: 1.35; margin: 0; }
    .pwa-actions { position: relative; display: flex; gap: 8px; margin-top: 14px; }
    .pwa-actions button { flex: 1; min-width: 0; min-height: 44px; padding: 0 10px; white-space: nowrap; border-radius: 12px; font-size: 13px; cursor: pointer; transition: all .2s; }
    #pwa-later-btn { background: rgba(var(--ixc-encre-rgb,255,255,255),0.05); border: 1px solid rgba(var(--ixc-encre-rgb,255,255,255),0.1); color: var(--ixc-texte,#d1d5db); font-weight: 500; }
    #pwa-later-btn:hover { background: rgba(var(--ixc-encre-rgb,255,255,255),0.1); color: var(--ixc-texte,#fff); }
    #pwa-install-btn { display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; color: #000; font-weight: 700;
      background: #FFD73A; box-shadow: none; }
    #pwa-install-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
    #pwa-install-btn:active { transform: scale(.98); }
    #pwa-install-btn svg { width: 16px; height: 16px; }
    .pwa-row > div { min-width: 0; } .pwa-title, .pwa-sub { overflow-wrap: anywhere; }
    /* Tailles fixées : la feuille typographique du site agrandit sinon les titres, paragraphes et boutons */
    #pwa-install-prompt .pwa-title { font-family: inherit !important; font-size: 14px !important; line-height: 1.25 !important; font-weight: 700 !important; margin: 0 0 2px !important; letter-spacing: 0 !important; }
    #pwa-install-prompt .pwa-sub { font-family: inherit !important; font-size: 12px !important; line-height: 1.35 !important; margin: 0 !important; }
    #pwa-install-prompt .pwa-actions button { font-family: inherit !important; font-size: 13px !important; line-height: 1.2 !important; padding: 0 10px !important; min-height: 42px !important; height: auto !important; margin: 0 !important; }
    @media (max-width: 360px) { #pwa-install-prompt .pwa-title { font-size: 13px !important; } #pwa-install-prompt .pwa-sub { font-size: 11.5px !important; } #pwa-install-prompt .pwa-actions button { font-size: 12.5px !important; min-height: 40px !important; } }
    @media (max-width: 360px) { .pwa-card { padding: 12px; border-radius: 16px; } .pwa-row { gap: 10px; } .pwa-icon { width: 40px; height: 40px; border-radius: 12px; } .pwa-title { font-size: 13px; } .pwa-sub { font-size: 11.5px; } .pwa-actions { gap: 6px; margin-top: 12px; } .pwa-actions button { font-size: 12.5px; } }
    /* Paysage ou écran très bas : bandeau plus compact */
    @media (max-height: 480px) and (max-width: 1023px) { .pwa-card { padding: 10px 12px; } .pwa-actions { margin-top: 8px; } .pwa-actions button { min-height: 38px; } }
  
