
html.mom-personal-page #personalProfileMoreBtn.personal-profile-more-btn{
  top:0;right:0;left:auto;
  width:44px;height:44px;min-width:44px;min-height:44px;
  padding:10px;touch-action:manipulation;
  
}
html.mom-personal-page #personalProfileMoreBtn.personal-profile-more-btn svg{
  width:20px;height:24px;pointer-events:none;
}
html.mom-personal-page #personalAvatarBtn.personal-avatar-btn{
  min-width:64px;min-height:64px;touch-action:manipulation;
  
}
html.mom-personal-page #personalAvatarBtn.personal-avatar-btn > *{pointer-events:none;}

html #firstPopupOverlay,
html #firstPopupOverlay.open,
html #firstPopupOverlay.popup-exit-running,
html #firstPopupVeil,
html.mom-popup-cinematic-reveal #firstPopupOverlay{
  background:transparent !important;
  background-color:transparent !important;
  background-image:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  filter:none;
}
html #firstPopupOverlay::before,
html #firstPopupOverlay::after,
html #firstPopupVeil::before,
html #firstPopupVeil::after{
  content:none;
  display:none !important;
  background:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  filter:none;
}
html #firstPopupBlurLayer,
html.mom-startup-popup-ready #firstPopupBlurLayer,
html.mom-popup-cinematic-reveal #firstPopupBlurLayer{
  display:none;
  opacity:0;
  visibility:hidden;
  background:transparent;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  filter:none;
  transition:none;
  animation:none;
}
html.mom-popup-color-fading #appRoot,
html.mom-popup-color-fading .icon-btn-row,
html.mom-popup-cinematic-reveal #appRoot,
html.mom-popup-cinematic-reveal .icon-btn-row{
  filter:none;
  -webkit-filter:none;
}
html #momStartupSolidThemeLayer{
  background:var(--bg,#080706) !important;
  background-image:none !important;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  filter:none;
}

html.startup-lock.mom-first-popup-visual-reveal:not(.startup-homepage) #appRoot,
html.startup-lock.mom-first-popup-visual-reveal:not(.startup-homepage) .mini-player{
  visibility:visible !important;
  opacity:1 !important;
  pointer-events:none !important;
}

html.startup-lock.mom-first-popup-visual-reveal:not(.startup-homepage) #appRoot,
html.startup-lock.mom-first-popup-visual-reveal:not(.startup-homepage) #appRoot *{
  animation-play-state:paused;
}

#firstPopupCloseBtn,#personalPopupCloseBtn{position:absolute;top:10px;right:10px;width:34px;height:34px;padding:5px;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--text);display:grid!important;place-items:center;z-index:20;}
#firstPopupCloseBtn svg,#personalPopupCloseBtn svg{width:24px;height:24px;display:block}
html.mom-first-popup-manual-open #firstPopupOverlay.open{background:rgba(0,0,0,.20)!important;background-color:rgba(0,0,0,.20)!important;backdrop-filter:blur(8px)!important;-webkit-backdrop-filter:blur(8px)!important}


/* === Chantier 5.68 — contrat unique de surface et de transition des fenêtres ===
   Toute fenêtre passée par MOMWindowRegistry reçoit data-mom-window-surface=standard.
   Les fenêtres du moteur MOM historique utilisent le même contrat. Aucune priorité
   forcée n'est nécessaire : ce fichier est le dernier niveau de la cascade. */
:root{
  --mom-window-inline-gap:20px;
  --mom-window-block-gap:12px;
  --mom-window-max-width:380px;
}

[data-mom-window-surface="standard"]:not(.mom-personal-nested-overlay),
.mom-window-overlay:not(.mom-personal-nested-overlay){
  inset:0 0 var(--mom-dock-reserve,calc(var(--mom-bottom-bar-height,56px) + var(--mom-ui-bottom-inset,0px))) 0;
  align-items:center;
  justify-content:center;
  padding:var(--mom-window-block-gap) var(--mom-window-inline-gap);
  box-sizing:border-box;
}

[data-mom-window-surface="standard"]:not(.mom-personal-nested-overlay)>[data-mom-window-surface-panel="standard"],
.mom-window-overlay:not(.mom-personal-nested-overlay)>.mom-window-panel{
  width:min(var(--mom-window-max-width),100%);
  max-width:var(--mom-window-max-width);
  height:min(88svh,calc(100% - var(--mom-window-block-gap) - var(--mom-window-block-gap)));
  max-height:none;
  margin:0 auto;
  box-sizing:border-box;
}

@keyframes momWindowViewIn{
  from{opacity:0;transform:translateY(10px) scale(.98)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
.mom-window-view-enter{
  animation:momWindowViewIn .24s cubic-bezier(.2,.8,.2,1);
}
@media (prefers-reduced-motion:reduce){
  .mom-window-view-enter{animation-duration:.01ms}
}

/* === Chantier 5.71 — croix unique pour les fenêtres ===
   La position reprend la référence Groupe : 20 px du haut et de la droite.
   Toutes les fenêtres standard utilisent uniquement .mom-window-close. */
[data-mom-window-surface-panel="standard"]{
  position:relative;
}
[data-mom-window-surface-panel="standard"] > .admin-modal-head{
  padding-right:52px;
  box-sizing:border-box;
}

/* Le shell Personnel est lui aussi un cadre fixe : la vue affichée est le
   viewport qui défile, qu'il s'agisse de Paramètres ou d'une sous-vue. */
html.mom-personal-page #personalSettingsOverlay>.personal-control-sheet[data-mom-unified-personal-menu="1"]{
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
html.mom-personal-page #personalSettingsOverlay>.personal-control-sheet>.mom-personal-settings-view{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}

/* === ch5.97R52 — espacement commun des blocs internes de fenêtres ===
   Une seule valeur pilote désormais la distance verticale entre les surfaces
   « carte / bloc » des fenêtres Personnel, Groupe et Admin. Les composants
   conservent leur padding propre : seul l'air entre deux fonds est normalisé. */
:root{
  --mom-window-inner-block-gap:6px;
}

/* Personnel — grands fonds internes (Thème + réglages). */
html.mom-personal-page .personal-control-sheet .personal-theme-avatar-editor,
html.mom-personal-page .personal-control-sheet .personal-card-theme-editor,
html.mom-personal-page .personal-control-sheet .personal-background-theme-editor,
html.mom-personal-page .personal-control-sheet .personal-custom-theme-controls{
  margin-top:0;
  margin-bottom:var(--mom-window-inner-block-gap);
}
html.mom-personal-page .personal-control-sheet .personal-setting-row{
  margin-top:var(--mom-window-inner-block-gap);
}
html.mom-personal-page .personal-language-choices,
html.mom-personal-page .personal-mention-list,
html.mom-personal-page .personal-conversation-list{
  gap:var(--mom-window-inner-block-gap);
}

/* Groupe — cartes/boîtes du Menu et des vues secondaires. */
.menu-panel .menu-newsletter-box,
.menu-panel .language-menu-box,
.language-card{
  margin-bottom:var(--mom-window-inner-block-gap);
}

/* Admin — mêmes distances, que le bloc soit dans une modale dédiée ou
   dans la vue Admin imbriquée du Menu Groupe. */
.admin-kpi-grid,
.admin-action-list,
.admin-notification-list{
  gap:var(--mom-window-inner-block-gap);
}
.admin-health-card,
.admin-roadmap,
#adminQuickReplyContext{
  margin-bottom:var(--mom-window-inner-block-gap);
}
