@charset "UTF-8";

/* ================================================================
   BULDAM — PWA Install Banner + iOS Modal
   Bannière fixe en bas de l'écran, toujours visible sur mobile.
   ================================================================ */

/* ── Bannière principale ───────────────────────────────────────── */
#pwa-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Safe area iPhone X+ */
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

#pwa-install-banner.pwa-banner-visible {
  transform: translateY(0);
}

.pwa-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #ffffff;
  border-top: 2px solid #667eea;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.14);
}

.pwa-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
}

.pwa-banner-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pwa-banner-text strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e1b4b;
  white-space: nowrap;
}

.pwa-banner-text span {
  font-size: 0.78rem;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Bouton Installer ─────────────────────────────────────────── */
.pwa-btn-install {
  flex-shrink: 0;
  min-height: 44px;
  padding: 10px 18px;
  background: #667eea;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.pwa-btn-install:hover,
.pwa-btn-install:focus-visible {
  background: #4f46e5;
  transform: scale(1.03);
  outline: none;
}

.pwa-btn-install:active {
  transform: scale(0.97);
}

/* ── Bouton Fermer ────────────────────────────────────────────── */
.pwa-btn-dismiss {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: #f1f5f9;
  color: #64748b;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.pwa-btn-dismiss:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ── Cacher si déjà installé ──────────────────────────────────── */
@media (display-mode: standalone) {
  #pwa-install-banner,
  #pwa-ios-modal { display: none !important; }
}

/* ── Modal iOS ────────────────────────────────────────────────── */
#pwa-ios-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 0;
}

#pwa-ios-modal.is-open {
  display: flex;
  animation: fadeIn 0.2s ease;
}

#pwa-ios-modal .modal-card {
  width: 100%;
  max-width: 500px;
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom, 0px));
  border-radius: 24px 24px 0 0;
  background: #ffffff;
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.2);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#pwa-ios-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

#pwa-ios-modal .modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e1b4b;
}

#pwa-ios-modal .modal-close {
  width: 36px;
  height: 36px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#pwa-ios-modal .modal-body p {
  margin: 0 0 12px;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.5;
}

#pwa-ios-modal .modal-steps {
  margin: 0 0 20px;
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#pwa-ios-modal .modal-steps li {
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.5;
}

#pwa-ios-modal .modal-dismiss {
  width: 100%;
  min-height: 48px;
  background: #667eea;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

/* ── Animations ───────────────────────────────────────────────── */
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
