/* Le contenu public reste invisible jusqu'à la fin du chargement Supabase. */
html:not(.public-ready) body.public-app main.container{visibility:hidden}

/* Correctif robuste pour les images associées aux étapes et rendez-vous.
   Ces règles passent aussi devant les anciens styles inline éventuellement encore rendus. */
body.public-app #program img[data-image-id],
body.public-app #program img[data-cover-id]{
  display:block!important;
  width:96px!important;
  min-width:96px!important;
  max-width:96px!important;
  height:96px!important;
  min-height:96px!important;
  max-height:96px!important;
  aspect-ratio:1/1!important;
  object-fit:cover!important;
  margin:0!important;
  border-radius:10px!important;
}

body.public-app #program .public-content:has(> img[data-image-id]),
body.public-app #program .public-content:has(> img[data-cover-id]){
  display:grid!important;
  grid-template-columns:96px minmax(0,1fr)!important;
  gap:10px!important;
  align-items:start!important;
  width:100%!important;
}

body.public-app #program .public-content:has(> img[data-image-id]) > .resources,
body.public-app #program .public-content:has(> img[data-cover-id]) > .resources,
body.public-app #program .public-content:has(> img[data-image-id]) > .public-content-body,
body.public-app #program .public-content:has(> img[data-cover-id]) > .public-content-body{
  grid-column:2!important;
  min-width:0!important;
}

@media(max-width:850px){
  body.public-app #program img[data-image-id],
  body.public-app #program img[data-cover-id]{
    width:72px!important;
    min-width:72px!important;
    max-width:72px!important;
    height:72px!important;
    min-height:72px!important;
    max-height:72px!important;
  }
  body.public-app #program .public-content:has(> img[data-image-id]),
  body.public-app #program .public-content:has(> img[data-cover-id]){
    grid-template-columns:72px minmax(0,1fr)!important;
  }
}
