/* SP-28b (2026-05-12 v2) — SourcePoint CMP slim override
   Selecteurs reels apres inspection DOM live :
   - sd-cmp-MtHO2 : backdrop fixed full
   - sd-cmp-dK6gK : wrapper fixed full
   - sd-cmp-OOIlF : modal visible (relative box)
   - sd-cmp-gpI1s : LCP element

   Strategie : reduire la modale visible pour qu elle ne soit plus LCP.
   Hashes consideres stables tant que SourcePoint ne redeploie pas.
*/

/* Mobile : transforme la modale fullscreen en bottom sheet 25vh */
@media (max-width: 768px) {
  /* Backdrop + wrapper fixed : passer en bottom 25vh */
  div.sd-cmp-MtHO2,
  div.sd-cmp-dK6gK {
    position: fixed !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: auto !important;
    max-height: 28vh !important;
    width: 100% !important;
    background: rgba(0,0,0,0.4) !important;
    z-index: 2147483646 !important;
  }

  /* Modale visible : compresser */
  div.sd-cmp-OOIlF {
    max-height: 220px !important;
    height: auto !important;
    width: calc(100vw - 24px) !important;
    margin: 0 auto !important;
    overflow-y: auto !important;
    background: #FFFFFF !important;
    border-radius:6px 12px 0 0 !important;
    padding: 12px 16px !important;
    box-sizing: border-box !important;
  }

  /* Contenu intérieur (texte+boutons) */
  div.sd-cmp-OOIlF div.sd-cmp-hk3jy,
  div.sd-cmp-OOIlF div.sd-cmp-vfoED,
  div.sd-cmp-OOIlF div.sd-cmp-gpI1s,
  div.sd-cmp-OOIlF div.sd-cmp-c4EEG {
    max-height: none !important;
    height: auto !important;
  }

  /* Texte block : ellipsis ligne 2 */
  div.sd-cmp-OOIlF p,
  div.sd-cmp-VhJqD {
    font-size: 12px !important;
    line-height: 1.35 !important;
    margin: 0 0 6px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  /* Titre */
  div.sd-cmp-OOIlF h1,
  div.sd-cmp-OOIlF h2 {
    font-size: 14px !important;
    margin: 0 0 6px !important;
  }

  /* Boutons */
  div.sd-cmp-OOIlF button {
    min-height: 34px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
  }

  /* Logo image trop large */
  div.sd-cmp-VRR6d {
    max-width: 40px !important;
    max-height: 40px !important;
  }
}

/* Desktop : centré mais hauteur plafonnée à 280px */
@media (min-width: 769px) {
  div.sd-cmp-OOIlF {
    max-height: 280px !important;
    max-width: 520px !important;
    overflow-y: auto !important;
  }
}
