/* ==========================================================================
   CIRPAE-TIC — AFFICHAGE INTÉGRAL DE TOUTES LES IMAGES DE CONTENU (V30)
   
   OBJECTIF :
   Toute image de contenu dans le Visual Builder et sur le site public
   doit être affichée dans son INTÉGRALITÉ, sans recadrage, coupure,
   zoom automatique, étirement, déformation ni masquage par son conteneur.
   Le ratio naturel d'origine est TOUJOURS conservé.
   
   PÉRIMÈTRE :
   - Cible uniquement les images de contenu (.cirpaetic-stitch-page).
   - Ne modifie PAS les véritables arrière-plans décoratifs (.bg-cover,
     .cirpaetic-home-hero-image, .hero-fond).
   - Ne casse PAS les logos/icônes (.brand, .f-logo, .avatar, logos partenaires).
   ========================================================================== */

/* 1. Comportement standard des images de contenu :
      - neutraliser le recadrage 'cover' qui coupe l'image
      - conserver le ratio naturel d'origine
      - pas de hauteur forcée qui étire ou coupe l'image */
/* Spécificité supérieure à .cirpaetic-stitch-page .object-cover (0,2,0),
   donc aucune surcharge !important n'est nécessaire : un réglage volontaire
   posé en ligne par le Builder reste prioritaire. */
.cirpaetic-stitch-page img.object-cover,
.cirpaetic-stitch-page main img.object-cover {
  object-fit: contain;
  object-position: center;
  height: auto;
  max-width: 100%;
}

/* 2. Variantes responsive de hauteur sur l'image elle-même
      (ex. accueil « w-full h-48 md:h-56 object-cover ») : neutralisées pour
      que seule la hauteur naturelle de l'image s'applique. */
.cirpaetic-stitch-page img.md\:h-40,
.cirpaetic-stitch-page img.md\:h-48,
.cirpaetic-stitch-page img.md\:h-56,
.cirpaetic-stitch-page img.md\:h-64,
.cirpaetic-stitch-page img.h-full.object-cover {
  height: auto;
  max-height: none;
}

/* 3. Conteneurs d'images à hauteur fixe Tailwind (h-40, h-48, h-56, h-64, h-72, h-80, h-96) :
      Lorsque ces conteneurs enveloppent une image de contenu, leur hauteur fixe
      imposait un recadrage sévère. La hauteur doit s'adapter à la hauteur
      naturelle de l'image (height: auto).
      On cible les conteneurs qui ont une image directe OU descendante. */
.cirpaetic-stitch-page .h-32:has(> img),
.cirpaetic-stitch-page .h-40:has(> img),
.cirpaetic-stitch-page .h-48:has(> img),
.cirpaetic-stitch-page .h-56:has(> img),
.cirpaetic-stitch-page .h-64:has(> img),
.cirpaetic-stitch-page .h-72:has(> img),
.cirpaetic-stitch-page .h-80:has(> img),
.cirpaetic-stitch-page .h-96:has(> img) {
  height: auto;
  max-height: none;
  min-height: 0;
}

/* 4. Les conteneurs d'images ne doivent pas couper l'image */
.cirpaetic-stitch-page .image-container,
.cirpaetic-stitch-page .cptic-image-wrap {
  width: 100%;
  height: auto;
  overflow: visible;
}

.cirpaetic-stitch-page .image-container img,
.cirpaetic-stitch-page .cptic-image-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

/* Fin du correctif.
   Les images du header, du footer et de l'avatar ne sont pas concernées :
   elles sont en dehors de .cirpaetic-stitch-page et leurs règles d'origine
   (object-fit: contain / dimensions du logo) restent inchangées. */
