/* ══════════════════════════════════════════════════════════════
   LoveIA — app installée sur l'écran d'accueil (PWA)
   Mêmes correctifs que VOYA : dimensions, zones sûres, zoom,
   menu du bas lisible.
   ══════════════════════════════════════════════════════════════ */

/* 1. Plus de zoom automatique (iOS zoome sur tout champ < 16px et
      le zoom reste bloqué : ça déborde et le menu du bas disparaît) */
@media (hover:none) and (pointer:coarse) {
  input, select, textarea, .chat-input, .meet-search-input, .ef-input { font-size:16px !important; }
}

/* 2. Jamais de défilement horizontal, sans casser les éléments fixés */
html, body { overflow-x:clip !important; max-width:100%; }
@supports not (overflow:clip) { html, body { overflow-x:hidden !important; } }
html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
body { overscroll-behavior-y:none; -webkit-tap-highlight-color:transparent; }
.screen, #screen-app { min-height:100vh; min-height:100dvh; }
img, video, iframe, canvas { max-width:100%; }

/* 3. Zones sûres : encoche / Dynamic Island en haut, barre d'accueil en bas */
.app-header { padding-top:calc(1.25rem + env(safe-area-inset-top, 0px)) !important; }
#screen-auth, #screen-onboarding { padding-top:env(safe-area-inset-top, 0px); padding-bottom:env(safe-area-inset-bottom, 0px); }
.chat-overlay, .partner-profile-overlay {
  padding-top:env(safe-area-inset-top, 0px);
  padding-bottom:env(safe-area-inset-bottom, 0px);
}
.flash-notif { top:calc(1rem + env(safe-area-inset-top, 0px)) !important; }
.modal-overlay { padding-bottom:env(safe-area-inset-bottom, 0px); }

/* 4. Menu du bas : taille "appli", au-dessus de la barre d'accueil */
.hb-bar {
  height:calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  padding:0 max(6px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(6px, env(safe-area-inset-left, 0px)) !important;
  align-items:center;
}
.hb-quick-tabs { gap:0 !important; min-width:0; }
.hb-quick-btn {
  flex:1 1 auto !important; min-width:0; min-height:60px; justify-content:center; gap:4px !important;
  padding:4px 1px !important; border-radius:14px;
  font-size:11px !important; font-weight:700 !important;
  text-transform:none !important; letter-spacing:0 !important; line-height:1.1;
  white-space:nowrap;
}
.hb-quick-btn .qi { font-size:24px !important; line-height:1; }
.hb-quick-btn.active { background:rgba(194,24,91,.09); }
.hb-quick-btn:active { transform:scale(.94); }
.hb-center-btn { width:58px !important; height:58px !important; margin:0 4px; }
.hb-drawer { bottom:calc(76px + env(safe-area-inset-bottom, 0px)) !important; }
.hb-active-label { bottom:calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
.hb-cell-label { font-size:12.5px !important; }
#screen-app { padding-bottom:calc(96px + env(safe-area-inset-bottom, 0px)) !important; }
.toast { bottom:calc(96px + env(safe-area-inset-bottom, 0px)) !important; }
/* Champ de saisie du chat au-dessus de la barre d'accueil */
.chat-input-bar { padding-bottom:calc(.75rem + env(safe-area-inset-bottom, 0px)) !important; }
.chat-overlay .chat-input-bar { padding-bottom:.75rem !important; }

/* Petits téléphones (iPhone SE, 360px…) */
@media (max-width:380px) {
  .hb-quick-btn { font-size:10px !important; }
  .hb-quick-btn .qi { font-size:21px !important; }
  .hb-center-btn { width:52px !important; height:52px !important; margin:0 2px; }
}

/* Plein écran : le fond de l'app remplit aussi la zone de la barre d'état */
html { background:#880E4F; }
html.pwa body { min-height:100vh; min-height:100dvh; }
