/*
 * ICI.AM — coque d'affichage mobile v2
 * Reconstruction indépendante des anciens correctifs de viewport.
 * Les composants restent dessinés par app.css ; ce fichier est seul responsable
 * de la hauteur de page, de la répartition verticale et des fenêtres plein écran.
 */
:root{--imap-shell-height:100dvh}
*{box-sizing:border-box}
html,body{position:relative!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;overflow:hidden!important;background:#f4f7f6!important}
body{overscroll-behavior:none!important}

.mobile-app{position:relative!important;inset:auto!important;display:flex!important;flex-direction:column!important;width:100%!important;height:var(--imap-shell-height)!important;min-height:0!important;max-height:var(--imap-shell-height)!important;margin:0 auto!important;padding:0!important;overflow:hidden!important;background:#dce7e4!important}
.app-header{position:relative!important;flex:0 0 auto!important}
.app-main{position:relative!important;display:flex!important;flex:1 1 auto!important;flex-direction:column!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;overflow:hidden!important}
.primary-search{order:1!important;flex:0 0 auto!important}
.results-controls{order:2!important;flex:0 0 auto!important;min-height:0!important}
.workspace{order:3!important;position:relative!important;flex:1 1 auto!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;overflow:hidden!important}
.workspace>.view-panel,.workspace>#map{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important}
.app-main>#answerBar{order:4!important;position:relative!important;z-index:200!important;flex:0 0 auto!important;width:100%!important;height:auto!important;min-height:46px!important;max-height:none!important;margin:0!important;overflow:hidden!important;background:#fff!important}
.app-main>#answerBar{display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-items:center!important;gap:4px!important;padding:6px 8px 7px!important}
.suggestion-row{display:flex!important;align-items:center!important;gap:5px!important;width:100%!important;min-width:0!important}
.suggestion-row .suggestion-viewport{flex:1 1 auto!important;min-width:0!important}
.suggestion-publish-button{display:flex;align-items:center;justify-content:center;justify-self:center;max-width:calc(100% - 16px);min-height:28px;padding:4px 12px;border:1px solid #a9cec3;border-radius:999px;background:#f3faf7;color:#0d6557;text-decoration:none;text-align:center;font-size:.72rem;font-weight:850;line-height:1.2}
.suggestion-publish-button:active{background:#dff2ec}
.result-filters button{display:flex!important;align-items:center!important;gap:6px!important}.result-filter-icon{width:15px!important;height:15px!important;flex:0 0 15px!important}

.welcome-screen{position:fixed!important;inset:0!important;box-sizing:border-box!important;width:100%!important;height:var(--imap-shell-height)!important;min-height:0!important;max-height:var(--imap-shell-height)!important;margin:0!important;overflow:hidden!important;overscroll-behavior:none!important;background-color:#11685a!important}

.alert-dialog,.calendar-dialog{position:fixed!important;inset:0!important;box-sizing:border-box!important;width:100%!important;height:100dvh!important;min-height:0!important;max-height:100dvh!important;margin:0!important;padding:max(10px,env(safe-area-inset-top,0px)) 10px max(10px,env(safe-area-inset-bottom,0px))!important;overflow:hidden!important;place-items:end center!important;z-index:2147483600!important}
.alert-dialog-card,.calendar-dialog-card{box-sizing:border-box!important;width:100%!important;max-width:620px!important;max-height:calc(100dvh - 20px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;margin:0!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important}

@media(max-width:699px){
  html.installed-app,html.installed-app body{position:relative!important;inset:auto!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;overflow:hidden!important;background:#f4f7f6!important}
  html.installed-app .mobile-app{position:relative!important;inset:auto!important;width:100%!important;height:100dvh!important;min-height:0!important;max-height:100dvh!important;margin:0!important}
  html.installed-app .welcome-screen{position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;min-height:0!important;max-height:100dvh!important}
}

@media(min-width:700px){.mobile-app{max-width:1500px!important}}
@supports not (height:100dvh){:root{--imap-shell-height:100vh}.alert-dialog,.calendar-dialog{height:100vh!important;max-height:100vh!important}.alert-dialog-card,.calendar-dialog-card{max-height:calc(100vh - 20px)!important}}
