/* MOM ch5.97R58 — éditeurs images Groupe alignés sur le Personnel : largeur, header et rythme corrigés. */
.group-avatar-admin,
.mom-group-theme-image-editor{
  margin:0 0 var(--mom-window-inner-block-gap,10px);
  padding:14px;
  border:1px solid var(--line);
  border-radius:15px;
  background:var(--bg);
  box-sizing:border-box;
}
.group-avatar-head{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.group-avatar-current-wrap{
  width:64px;height:64px;flex:0 0 64px;
  display:grid;place-items:center;overflow:hidden;
  border:2px solid var(--line);border-radius:50%;background:var(--panel);
}
.group-avatar-current-wrap img{width:100%;height:100%;object-fit:cover}
.group-avatar-empty{display:grid;place-items:center;color:var(--text-dim);font-size:28px}
.group-avatar-empty .mom-material-icon{width:28px;height:28px}
.group-avatar-copy{min-width:0;text-align:left}
.group-avatar-copy h3,.mom-group-theme-image-editor h3{margin:0 0 3px;font-size:14px;line-height:1.25}
.group-avatar-copy p,.mom-group-theme-image-editor .mom-group-theme-image-help{margin:0;color:var(--text-dim);font-size:11px;line-height:1.35}
.group-avatar-actions,.group-avatar-crop-actions,.mom-group-header-actions,.mom-group-header-crop-actions{display:flex;gap:8px;margin-top:8px}
.group-avatar-actions{margin-top:0}
.group-avatar-actions button,.group-avatar-crop-actions button,.mom-group-header-actions button,.mom-group-header-crop-actions button{
  flex:1;min-width:0;min-height:40px;padding:9px 8px;
  border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--text);font:inherit;
}
.group-avatar-actions .danger,.mom-group-header-actions .danger{color:#e57373}
.group-avatar-actions button:disabled,.mom-group-header-actions button:disabled{opacity:.42}
.group-avatar-status,.mom-group-header-status{min-height:0;margin:0;color:var(--text-dim);font-size:10.5px;line-height:1.35}
.group-avatar-status:not(:empty),.mom-group-header-status:not(:empty){min-height:15px;margin-top:7px}
.group-avatar-progress,.mom-group-header-progress{display:none;width:100%;height:3px;margin:8px 0 0;overflow:hidden;border-radius:999px;background:var(--line)}
.group-avatar-progress.active,.mom-group-header-progress.active{display:block}
.group-avatar-progress span,.mom-group-header-progress span{display:block;width:0;height:100%;border-radius:inherit;background:var(--accent);transition:width .12s linear}
.group-avatar-inline-crop,.mom-group-header-inline-crop{margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.group-avatar-inline-crop[hidden],.mom-group-header-inline-crop[hidden]{display:none}
.group-avatar-inline-crop h4,.mom-group-header-inline-crop h4{margin:0 0 4px;font-size:13px}
.group-avatar-inline-crop p,.mom-group-header-inline-crop p{margin:0 0 10px;color:var(--text-dim);font-size:11px;line-height:1.4}
.group-avatar-crop{
  position:relative;width:min(72vw,270px);aspect-ratio:1;margin:0 auto;overflow:hidden;
  border-radius:50%;background:#090909;touch-action:none;overscroll-behavior:contain;
}
.group-avatar-crop img,.mom-group-header-crop-viewport img{
  position:absolute;left:50%;top:50%;max-width:none;max-height:none;transform-origin:center center;will-change:transform;user-select:none;pointer-events:none;
}
.group-avatar-crop-ring{position:absolute;inset:0;border:2px solid color-mix(in srgb,var(--text) 78%,transparent);border-radius:50%;pointer-events:none}
.group-avatar-zoom-label,.mom-group-header-zoom-label{display:flex;justify-content:space-between;align-items:center;margin:7px 0 2px;color:var(--text-dim);font-size:11px}
.group-avatar-zoom,#momHeaderCropZoom{width:100%;margin:2px 0 4px;accent-color:var(--accent);touch-action:pan-x}

.mom-group-theme-image-editor{position:relative}
.mom-group-theme-image-editor .mom-group-theme-image-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px}
.mom-group-theme-image-editor .mom-group-theme-image-copy{min-width:0}
.mom-group-theme-image-editor .category-vis-row{margin:0 0 10px}
.mom-group-theme-header-preview{
  /* ch5.97R60 — preview, crop, export et entête final : 1000 × 230. */
  position:relative;width:100%;aspect-ratio:1000/230;min-height:0;margin:0 0 8px;
  overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--panel);background-position:center;background-size:cover;
}
.mom-group-theme-header-preview.no-image:after{content:"+";position:absolute;inset:0;display:grid;place-items:center;color:var(--text-dim);font-size:32px;font-weight:300}
.mom-group-header-dimensions{margin:0 0 2px;color:var(--text-dim);font-size:10.5px;line-height:1.35;text-align:center}
.mom-group-header-crop-viewport{
  position:relative;width:100%;aspect-ratio:1000/230;min-height:0;overflow:hidden;
  border-radius:12px;background:#090909;touch-action:none;overscroll-behavior:contain;
}
.mom-group-header-crop-frame{position:absolute;inset:0;border:1px solid color-mix(in srgb,var(--text) 45%,transparent);border-radius:inherit;pointer-events:none}

#themeHeaderClickOptions{margin-top:14px}

@media (max-width:360px){
  .group-avatar-admin,.mom-group-theme-image-editor{padding:12px}
  .group-avatar-current-wrap{width:58px;height:58px;flex-basis:58px}
  .group-avatar-actions button,.group-avatar-crop-actions button,.mom-group-header-actions button,.mom-group-header-crop-actions button{font-size:12px}
}

/* MOM ch5.97R58 — Thème Groupe : une seule autorité de scroll et métriques Personnel.
   #tabTheme est une section du Menu, pas une modale autonome : la règle générique
   .admin-modal-body ajoutait un second padding de 18 px et un second scroll de 68svh. */
#tabTheme.admin-modal-body{
  /* La fenêtre Groupe garde 22 px de padding pour les autres rubriques.
     Le Thème reprend exactement la largeur utile du panneau Personnel (18 px),
     soit 4 px de plus de chaque côté. */
  width:calc(100% + 8px);
  height:auto;
  min-height:0;
  margin-inline:-4px;
  padding:0;
  overflow:visible;
  box-sizing:border-box;
}
#tabTheme .group-avatar-admin,
#tabTheme .mom-group-theme-image-editor{
  width:100%;
  max-width:none;
}
#tabTheme .group-avatar-admin{
  padding:14px;
  border-radius:15px;
}
#tabTheme .mom-group-theme-image-editor{
  padding:13px;
  border-radius:14px;
}
#tabTheme .group-avatar-copy h3{
  margin:0 0 3px;
  color:var(--text);
  font-size:14px;
  line-height:1.25;
  text-transform:none;
  letter-spacing:normal;
}
#tabTheme .mom-group-theme-image-editor h3{
  margin:0 0 5px;
  color:var(--text);
  font-size:13px;
  line-height:1.25;
  text-transform:none;
  letter-spacing:normal;
}
#tabTheme .group-avatar-copy p,
#tabTheme .mom-group-theme-image-editor .mom-group-theme-image-help{
  margin:0;
  color:var(--text-dim);
  font-size:11px;
  line-height:1.4;
}
#tabTheme .mom-group-theme-image-editor .category-vis-row span{
  font-size:11px;
  font-weight:400;
}
#tabTheme .group-avatar-actions button,
#tabTheme .group-avatar-crop-actions button,
#tabTheme .mom-group-header-actions button,
#tabTheme .mom-group-header-crop-actions button{
  font-size:var(--mom-ui-button-font-size,13px);
  line-height:var(--mom-ui-button-line-height,1.15);
  font-weight:400;
}

#tabTheme #themeTabGlobal > h3{
  margin:0 0 8px;
  color:var(--text);
  font-size:13px;
  line-height:1.25;
  text-transform:none;
  letter-spacing:normal;
}
