/* Une hauteur explicite : le bord bas du containing block iOS peut exclure la
   barre système, même avec viewport-fit=cover. Ne pas calculer depuis bottom:0. */
/* La hauteur du shell appartient au contenant commun. Elle est ensuite mise à
   jour par client-app-shell.js depuis le viewport réellement visible : iOS
   peut conserver une ancienne valeur de vh après une navigation interne. */
html[data-chr-shell]{--chr-app-viewport-height:100vh}
[data-client-opening],.chr-connexion__pending{position:fixed;top:0;left:0;right:0;bottom:auto;height:100vh;z-index:30;background:var(--chr-color-background,#f2f5fd)}
[data-client-opening][hidden]{display:none}
html:has([data-client-opening]:not([hidden])),html:has(.chr-connexion__pending:not([hidden])){--chr-screen-top:var(--chr-color-background,#f2f5fd)!important;background:var(--chr-color-background,#f2f5fd)!important}
[data-client-opening]~[data-client-navigation-status]{z-index:31}
@supports(height:100dvh){html[data-chr-shell]{--chr-app-viewport-height:100dvh}}
/* La valeur CSS reste une solution de repli avant l'initialisation JavaScript. */
@media(display-mode:standalone){html[data-chr-shell]{--chr-app-viewport-height:100dvh}}
html[data-chr-shell],html[data-chr-shell] body{margin:0;width:100%;height:var(--chr-app-viewport-height);min-height:0!important;overflow:hidden;background:var(--chr-screen-top,#fdeede)!important;padding:0!important}
[data-client-frames]{position:absolute;top:env(safe-area-inset-top,0px);left:0;right:0;height:calc(var(--chr-app-viewport-height) - env(safe-area-inset-top,0px))}
/* Mesure système transmise aux documents, pas un vide sous leur contenu. */
[data-client-frames]::after{content:'';position:fixed;visibility:hidden;pointer-events:none;width:0;height:env(safe-area-inset-bottom,0px)}
[data-client-frames] iframe{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}
[data-client-frames] iframe[hidden]{display:none}
[data-client-navigation-status]{position:fixed;bottom:calc(16px + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);z-index:20;border-radius:24px;padding:10px 18px;background:#243544;color:white;font:14px system-ui}
[data-client-navigation-status][hidden]{display:none}
[data-client-navigation-status] button{margin-left:10px;padding:6px 10px;border:0;border-radius:12px}
/* Dans le contenant, les insets sont possédés par le parent, une seule fois. */
html[data-chr-embedded]{--chr-safe-top:0px;--chr-safe-bottom:0px;--chr-safe-left:0px;--chr-safe-right:0px}
/* Le document retenu remplit son cadre, pas une hauteur de maquette ou le viewport iOS extérieur. */
html[data-chr-embedded],html[data-chr-embedded] body{height:100%!important;min-height:0!important;overflow:hidden}
html[data-chr-embedded] body.chr-app-frame,html[data-chr-embedded] body>.chr-app-frame{height:100%!important;min-height:0!important;margin-block:0!important}
html[data-chr-embedded] body .status,html[data-chr-embedded] body .homebar{display:none!important}
