/* Pasivite 2.8.52.7 — durcissement responsive anti-chevauchement
   Objectif: conserver la lisibilite meme avec texte agrandi, PWA/iOS et petits ecrans. */

/* Les enfants flex/grid peuvent sinon refuser de retrecir et se recouvrir. */
body:not(.admin-body) main,
body:not(.admin-body) main *,
body:not(.admin-body) .mobile-app-main,
body:not(.admin-body) .mobile-app-main *{box-sizing:border-box}
body:not(.admin-body) main :is(section,article,div,nav,form,label,a,button,span,strong,small,p,h1,h2,h3,h4,li),
body:not(.admin-body) .mobile-app-main :is(section,article,div,nav,form,label,a,button,span,strong,small,p,h1,h2,h3,h4,li){min-width:0}
body:not(.admin-body) main :is(h1,h2,h3,h4,p,strong,small,span,a,button,label,li),
body:not(.admin-body) .mobile-app-main :is(h1,h2,h3,h4,p,strong,small,span,a,button,label,li){overflow-wrap:break-word;word-break:normal}
body:not(.admin-body) main img{max-width:100%;height:auto}

/* Boussole Pro : placement explicite titre/description/fleche. Le navigateur ne peut
   plus auto-placer les deux textes dans la meme zone, meme avec police agrandie. */
.professional-guidance-options>a,
.professional-guidance-options>button{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 28px!important;
  grid-template-rows:auto auto!important;
  grid-template-areas:"pg-title pg-arrow" "pg-desc pg-arrow"!important;
  column-gap:12px!important;
  row-gap:5px!important;
  align-items:start!important;
  height:auto!important;
  min-height:74px!important;
  overflow:visible!important;
}
.professional-guidance-options>a>strong,
.professional-guidance-options>button>strong{
  grid-area:pg-title!important;
  display:block!important;
  position:static!important;
  width:auto!important;
  max-width:100%!important;
  margin:0!important;
  line-height:1.2!important;
}
.professional-guidance-options>a>small,
.professional-guidance-options>button>small{
  grid-area:pg-desc!important;
  display:block!important;
  position:static!important;
  width:auto!important;
  max-width:100%!important;
  margin:0!important;
  line-height:1.35!important;
}
.professional-guidance-options>a>b,
.professional-guidance-options>button>b{
  grid-area:pg-arrow!important;
  position:static!important;
  align-self:center!important;
  justify-self:center!important;
  line-height:1!important;
}
.professional-guidance-step-head>span{flex:0 0 34px}
.professional-guidance-step-head>div{min-width:0;flex:1 1 auto}
.professional-guidance-step-head strong,
.professional-guidance-step-head small{position:static!important;width:auto!important;max-width:100%!important}

/* Cartes/listes recurrentes : aucun texte ne doit sortir ou passer sous un voisin. */
body.mobile-mode :is(.pv-list>a,.mobile-pro-journeys>a,.mobile-home-primary-actions>a,.mobile-library-row,.mobile-pro-card,.mobile-action-pair>a,.pwa-app-details-body>a) > *{min-width:0}
body.mobile-mode :is(.pv-list>a,.mobile-pro-journeys>a,.mobile-home-primary-actions>a,.mobile-library-row,.mobile-pro-card,.mobile-action-pair>a,.pwa-app-details-body>a) :is(strong,small,span,p){max-width:100%;white-space:normal!important;overflow:visible;text-overflow:clip}

/* Les tableaux et blocs techniques restent consultables sans elargir toute la page. */
body:not(.admin-body) main :is(table,.table-wrap,.responsive-table,.pro-report-table){max-width:100%}
body:not(.admin-body) main :is(.table-wrap,.responsive-table,.pro-report-table){overflow-x:auto;-webkit-overflow-scrolling:touch}
pre,code{max-width:100%}
pre{overflow:auto}

/* PWA/mobile : garder de l'espace pour la barre fixe et les safe areas. */
body.mobile-mode.pwa-app-shell .mobile-app-main{padding-bottom:calc(92px + env(safe-area-inset-bottom))!important}

@media(max-width:680px){
  .professional-guidance-shell{width:100%!important;max-width:100%!important;padding-left:12px!important;padding-right:12px!important}
  .professional-guidance-step,.professional-guidance-result{width:100%!important;max-width:100%!important;padding:14px!important;overflow:visible!important}
  .professional-guidance-step-head{align-items:flex-start!important}
  .professional-guidance-options>a,.professional-guidance-options>button{padding:14px!important;min-height:0!important}
  .professional-guidance-options strong{font-size:clamp(.96rem,4.5vw,1.08rem)!important}
  .professional-guidance-options small{font-size:clamp(.78rem,3.6vw,.92rem)!important}
  .professional-guidance-options b{font-size:1.35rem!important}
}

/* Mode texte agrandi : la hauteur suit toujours le contenu. */
html.large-text .professional-guidance-options>a,
html.large-text .professional-guidance-options>button,
body.large-text .professional-guidance-options>a,
body.large-text .professional-guidance-options>button{min-height:0!important;height:auto!important}

/* Acces direct a l'Audit Pro depuis les deux Boussoles. */
.professional-guidance-shortcuts{display:flex;justify-content:flex-end;margin:0 0 10px}
.professional-guidance-shortcut-audit{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;align-items:center;width:min(360px,100%);padding:11px 13px;border:1px solid #b8ddd7;border-radius:14px;background:#f2fbf9;color:#12355b;text-decoration:none}
.professional-guidance-shortcut-audit strong,.professional-guidance-shortcut-audit small{display:block;min-width:0;white-space:normal}
.professional-guidance-shortcut-audit small{grid-column:1;color:#5f7382;line-height:1.3}
.professional-guidance-shortcut-audit>span{grid-column:2;grid-row:1/3;align-self:center;color:#087d75;font-size:1.25rem}
@media(max-width:680px){.professional-guidance-shortcuts{justify-content:stretch}.professional-guidance-shortcut-audit{width:100%}}
