/* public_html/pwa-app/pwa-app.css
 * Invitations « installer l'application » et « Continuer avec Google ».
 * Préfixe njk-pwa- pour ne jamais entrer en conflit avec le reste du site.
 * Couleur d'accent injectée par pwa-app.js via --njk-accent. */

.njk-pwa {
  --njk-accent: #f97316;
  --njk-bg: #ffffff;
  --njk-text: #1e293b;
  --njk-muted: #64748b;
  --njk-line: #e2e8f0;
  --njk-bottom: 0px;
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--njk-bottom) + env(safe-area-inset-bottom, 0px));
  z-index: 2147483000;
  display: flex;
  justify-content: center;
  padding: 0 .75rem .75rem;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  .njk-pwa { --njk-bg: #161f30; --njk-text: #e2e8f0; --njk-muted: #94a3b8; --njk-line: #2a3a52; }
}

.njk-pwa-card {
  pointer-events: auto;
  width: 100%;
  max-width: 440px;
  background: var(--njk-bg);
  color: var(--njk-text);
  border: 1px solid var(--njk-line);
  border-radius: 1rem;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, .18);
  padding: 1rem 1rem .9rem;
  position: relative;
  overflow: hidden;
  animation: njk-pwa-up .35s ease both;
}
.njk-pwa-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--njk-accent);
}
@keyframes njk-pwa-up { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .njk-pwa-card { animation: none; } }

.njk-pwa-head { display: flex; align-items: flex-start; gap: .8rem; }
.njk-pwa-ico {
  flex: 0 0 auto;
  width: 46px; height: 46px; border-radius: .8rem;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--njk-accent) 14%, transparent);
  color: var(--njk-accent);
  font-size: 1.25rem;
}
.njk-pwa-ico img { width: 46px; height: 46px; border-radius: .8rem; object-fit: cover; }
.njk-pwa-txt { flex: 1 1 auto; min-width: 0; padding-right: 1.6rem; }
.njk-pwa-title { margin: 0; font-size: .98rem; font-weight: 700; line-height: 1.25; }
.njk-pwa-desc  { margin: .2rem 0 0; font-size: .82rem; line-height: 1.45; color: var(--njk-muted); }

.njk-pwa-x {
  position: absolute; top: .45rem; right: .45rem;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--njk-muted);
  font-size: 1.05rem; cursor: pointer; border-radius: 50%;
}
.njk-pwa-x:hover { background: color-mix(in srgb, var(--njk-muted) 15%, transparent); }

.njk-pwa-steps { margin: .8rem 0 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.njk-pwa-steps li {
  display: flex; align-items: center; gap: .6rem;
  font-size: .84rem; line-height: 1.35;
  background: color-mix(in srgb, var(--njk-muted) 9%, transparent);
  border-radius: .65rem; padding: .55rem .7rem;
}
.njk-pwa-steps i { width: 1.2rem; text-align: center; color: var(--njk-accent); }
/* Étapes numérotées : ce sont des explications, pas des boutons */
.njk-pwa-steps { counter-reset: njkstep; }
.njk-pwa-steps li { counter-increment: njkstep; cursor: default; user-select: none; background: transparent; padding: .35rem 0; }
.njk-pwa-steps li::before {
  content: counter(njkstep);
  flex: 0 0 auto; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--njk-accent); color: #fff; font-size: .78rem; font-weight: 700;
}

.njk-pwa-actions { display: flex; gap: .55rem; margin-top: .9rem; }
.njk-pwa-btn {
  flex: 1 1 0;
  min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: .75rem;
  font-size: .92rem; font-weight: 700;
  cursor: pointer; text-decoration: none;
  border: 1.5px solid var(--njk-line);
  background: transparent; color: var(--njk-text);
  transition: transform .15s ease, background .15s ease;
}
.njk-pwa-btn:hover { transform: translateY(-1px); }
.njk-pwa-btn:active { transform: translateY(0); }
.njk-pwa-btn--main { border-color: transparent; background: var(--njk-accent); color: #fff; flex-grow: 1.6; }
.njk-pwa-btn--main:hover { filter: brightness(.95); }
.njk-pwa .njk-pwa-btn--google { background: #ffffff !important; color: #111827 !important; -webkit-text-fill-color: #111827; border: 1.5px solid #cbd5e1 !important; flex: 1.6 1 0; min-width: 0; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); opacity: 1; }
.njk-pwa .njk-pwa-btn--google:hover { background: #f8fafc !important; }
.njk-pwa .njk-pwa-btn--google .fa-google { color: #ea4335 !important; -webkit-text-fill-color: #ea4335; }
.njk-pwa .njk-pwa-btn--google .njk-pwa-btn-txt { color: #111827 !important; -webkit-text-fill-color: #111827; display: inline; white-space: nowrap; opacity: 1; visibility: visible; }

.njk-pwa-btn:focus-visible, .njk-pwa-x:focus-visible { outline: 3px solid var(--njk-accent); outline-offset: 2px; }

/* Ordinateur : carte à droite plutôt que feuille pleine largeur */
@media (min-width: 768px) {
  .njk-pwa { justify-content: flex-end; padding: 0 1.25rem 1.25rem; }
  .njk-pwa-card { max-width: 400px; }
}