/* GESCHOOL PWA – styles install prompt (banner + modale + iOS instructions) */

#pwa-install-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100000;
  background: linear-gradient(90deg, #154e0e 0%, #28a745 100%);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transform: translateY(-100%);
  transition: transform 0.35s ease-out;
  flex-wrap: wrap;
}
#pwa-install-banner.is-visible {
  transform: translateY(0);
}
#pwa-install-banner .pwa-message {
  flex: 1 1 auto;
  min-width: 200px;
  text-align: left;
}
#pwa-install-banner .pwa-btn {
  background: #fff;
  color: #154e0e;
  border: 0;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}
#pwa-install-banner .pwa-btn:hover {
  background: #f1f1f1;
}
#pwa-install-banner .pwa-btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
}
#pwa-install-banner .pwa-btn--ghost:hover {
  background: rgba(255,255,255,0.12);
}

/* Décalage du contenu de page pour ne pas masquer le header */
body.pwa-banner-visible {
  padding-top: 52px;
}
@media (max-width: 600px) {
  body.pwa-banner-visible {
    padding-top: 72px;
  }
}

/* Modale custom (utilise les classes Bootstrap si dispo, fallback inline) */
.pwa-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}
.pwa-modal-backdrop.is-visible {
  opacity: 1;
}
.pwa-modal-card {
  background: #fff;
  border-radius: 12px;
  max-width: 460px;
  width: 100%;
  padding: 28px 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.3s ease-out;
}
.pwa-modal-backdrop.is-visible .pwa-modal-card {
  transform: translateY(0);
}
.pwa-modal-card img.pwa-modal-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 12px;
  display: block;
  border-radius: 16px;
  background: #f4f4f4;
  padding: 6px;
}
.pwa-modal-card h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: #154e0e;
}
.pwa-modal-card p {
  margin: 8px 0 16px;
  line-height: 1.5;
  color: #444;
}
.pwa-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.pwa-modal-actions .pwa-btn {
  background: linear-gradient(90deg, #154e0e 0%, #28a745 100%);
  color: #fff;
  border: 0;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}
.pwa-modal-actions .pwa-btn:hover {
  filter: brightness(1.05);
}
.pwa-modal-actions .pwa-btn--ghost {
  background: #fff;
  color: #154e0e;
  border: 1px solid #154e0e;
}

/* iOS instructions card */
.pwa-ios-card {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  width: min(92%, 420px);
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.22);
  z-index: 100000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  transition: transform 0.4s ease-out;
  border-top: 4px solid #154e0e;
}
.pwa-ios-card.is-visible {
  transform: translateX(-50%) translateY(0);
}
.pwa-ios-card .pwa-ios-title {
  font-weight: 700;
  color: #154e0e;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pwa-ios-card .pwa-ios-steps {
  margin: 8px 0;
  padding-left: 18px;
  color: #333;
  line-height: 1.5;
}
.pwa-ios-card .pwa-ios-steps li {
  margin: 4px 0;
}
.pwa-ios-card .pwa-ios-icon {
  display: inline-block;
  background: #f3f3f3;
  border-radius: 4px;
  padding: 1px 6px;
  margin: 0 2px;
  font-size: 13px;
}
.pwa-ios-card .pwa-ios-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: 0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #777;
}
.pwa-ios-card .pwa-ios-close:hover {
  color: #000;
}
