/* Institut Moisson PWA — Frontend Styles */

/* ── Bannière d'installation Android/Chrome ── */
#im-pwa-install-banner {
  position: fixed;
  bottom: -120px;
  left: 0; right: 0;
  z-index: 99999;
  padding: 0 16px 16px;
  transition: bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#im-pwa-install-banner.im-pwa-banner-visible {
  bottom: 0;
}

#im-pwa-install-banner.im-pwa-banner-hidden {
  bottom: -120px;
  transition: bottom 0.3s ease-in;
}

.im-pwa-banner-inner {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18), 0 2px 12px rgba(0,0,0,0.08);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  border-top: 3px solid #1a3a5c;
}

.im-pwa-banner-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.im-pwa-banner-icon-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #1a3a5c;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.im-pwa-banner-icon-placeholder svg {
  width: 24px;
  height: 24px;
}

.im-pwa-banner-text {
  flex: 1;
  min-width: 0;
}

.im-pwa-banner-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #1a3a5c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.im-pwa-banner-text span {
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.im-pwa-btn-install {
  background: #1a3a5c;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.1s;
}

.im-pwa-btn-install:hover {
  background: #0f2540;
  transform: scale(1.03);
}

.im-pwa-btn-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
  line-height: 1;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.im-pwa-btn-close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

/* ── iOS Install Hint ── */
#im-pwa-ios-hint {
  position: fixed;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  width: calc(100% - 32px);
  max-width: 360px;
  transition: bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#im-pwa-ios-hint.im-pwa-ios-visible {
  bottom: 24px;
}

.im-pwa-ios-inner {
  background: #1a3a5c;
  color: #fff;
  border-radius: 16px;
  padding: 20px 20px 24px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  position: relative;
}

.im-pwa-ios-close {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.im-pwa-ios-inner p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
}

.im-pwa-ios-inner ol {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.8;
}

.im-pwa-icon-share {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  padding: 0 4px;
  font-style: normal;
}

.im-pwa-ios-arrow {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 12px solid #1a3a5c;
}
