/* ============================================================
   OFFICEA — PWA Install Button + Modale
   ============================================================ */

/* ============================================================
   1. BOUTON HEADER — discret, intégré naturellement
   ============================================================ */
.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(184, 132, 63, 0.4);
  color: #b8843f;
  padding: 7px 12px;
  border-radius: 6px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.pwa-install-btn:hover,
.pwa-install-btn:focus-visible {
  background: rgba(184, 132, 63, 0.08);
  border-color: #b8843f;
  outline: none;
}
.pwa-install-btn:active {
  transform: translateY(1px);
}
.pwa-install-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Variante minimal sur mobile : juste l'icône */
@media (max-width: 640px) {
  .pwa-install-btn {
    padding: 8px 10px;
    font-size: 11px;
  }
  .pwa-install-btn .pwa-install-btn-label {
    display: none;
  }
}

/* État masqué quand la page est déjà installée */
html.pwa-installed .pwa-install-btn,
html.pwa-installed [data-pwa-install] {
  display: none !important;
}

/* ============================================================
   2. MODALE — backdrop + carte
   ============================================================ */
.pwa-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s ease;
}
.pwa-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.pwa-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 41, 66, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.pwa-modal-card {
  position: relative;
  background: #f5f1e8;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 32px 28px calc(32px + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -8px 40px rgba(26, 41, 66, 0.25);
  transform: translateY(40px);
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  -webkit-overflow-scrolling: touch;
}
.pwa-modal.is-open .pwa-modal-card {
  transform: translateY(0);
}

/* Sur tablette / desktop : centrée, pas en bottom-sheet */
@media (min-width: 720px) {
  .pwa-modal {
    align-items: center;
    padding: 24px;
  }
  .pwa-modal-card {
    border-radius: 12px;
    max-height: 86vh;
    transform: translateY(20px) scale(0.98);
  }
  .pwa-modal.is-open .pwa-modal-card {
    transform: translateY(0) scale(1);
  }
}

.pwa-modal-card-compact {
  text-align: center;
}

/* Empêcher le scroll de la page en arrière-plan */
html.pwa-modal-open,
html.pwa-modal-open body {
  overflow: hidden;
}

/* ============================================================
   3. CONTENU MODALE
   ============================================================ */
.pwa-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(26, 41, 66, 0.06);
  border: none;
  color: #1a2942;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.pwa-modal-close:hover {
  background: rgba(26, 41, 66, 0.12);
}

.pwa-modal-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}
.pwa-modal-logo {
  width: 64px;
  height: 64px;
}

.pwa-modal-eyebrow {
  text-align: center;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b8843f;
  margin: 0 0 8px;
}

.pwa-modal-card h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(24px, 5vw, 30px);
  line-height: 1.2;
  color: #1a2942;
  text-align: center;
  margin: 0 0 16px;
}
.pwa-modal-card h2 em {
  color: #b8843f;
  font-style: italic;
}

.pwa-modal-intro {
  text-align: center;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: #4a4a4a;
  margin: 0 0 24px;
  padding: 0 8px;
}

/* ============================================================
   4. ÉTAPES — liste numérotée illustrée
   ============================================================ */
.pwa-steps {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pwa-step {
  display: flex;
  gap: 14px;
  background: #fff;
  border: 1px solid rgba(184, 132, 63, 0.18);
  border-radius: 12px;
  padding: 16px 16px 16px 14px;
  align-items: flex-start;
}

.pwa-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1a2942;
  color: #f5f1e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 17px;
  font-weight: 500;
}

.pwa-step-body {
  flex: 1;
  min-width: 0;
}

.pwa-step-title {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #1a2942;
  margin: 0 0 3px;
  line-height: 1.4;
}
.pwa-step-title strong {
  color: #b8843f;
  font-weight: 600;
}

.pwa-step-desc {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12.5px;
  color: #6a6a6a;
  margin: 0;
  line-height: 1.5;
}

.pwa-step-illu {
  margin-top: 10px;
  background: #f9f6ee;
  border-radius: 6px;
  padding: 8px;
  display: flex;
  justify-content: center;
}
.pwa-step-illu svg {
  height: 44px;
  width: auto;
}

/* ============================================================
   5. TIP & CTA
   ============================================================ */
.pwa-modal-tip {
  background: rgba(184, 132, 63, 0.08);
  border-left: 3px solid #b8843f;
  padding: 12px 14px;
  border-radius: 4px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 12.5px;
  line-height: 1.55;
  color: #4a4a4a;
  margin: 0 0 20px;
}
.pwa-modal-tip strong {
  color: #b8843f;
}

.pwa-modal-cta {
  width: 100%;
  background: #1a2942;
  color: #f5f1e8;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s;
}
.pwa-modal-cta:hover {
  background: #0f1a2a;
}
.pwa-modal-cta:active {
  transform: translateY(1px);
}
