/* TentoniNumérik R44.3.28.1 — consolidation téléphone uniquement.
   Aucun changement visuel tablette/ordinateur. */
@media(max-width:720px){
  html.tn-phone-boot,html.tn-r42-phone{
    width:100%!important;max-width:100%!important;min-width:0!important;
    min-height:100%!important;height:auto!important;overflow-x:hidden!important;overflow-y:auto!important;
    -webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;
  }
  html.tn-phone-boot body,html.tn-r42-phone body{
    width:100%!important;max-width:100%!important;min-width:0!important;
    min-height:100dvh!important;height:auto!important;max-height:none!important;
    margin:0!important;overflow-x:hidden!important;overflow-y:auto!important;position:relative!important;
    transform:none!important;zoom:1!important;-webkit-overflow-scrolling:touch!important;
  }
  html.tn-phone-boot body #app,html.tn-r42-phone body #app,
  html.tn-phone-boot body .site-shell,html.tn-r42-phone body .site-shell{
    width:100%!important;max-width:100%!important;min-width:0!important;
    min-height:100dvh!important;height:auto!important;max-height:none!important;
    left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
    transform:none!important;zoom:1!important;overflow:visible!important;
  }
  html.tn-phone-boot body .site-shell main,html.tn-r42-phone body .site-shell main{
    width:100%!important;max-width:100%!important;min-width:0!important;
    min-height:0!important;height:auto!important;max-height:none!important;
    overflow-x:hidden!important;overflow-y:visible!important;
  }
  html.tn-phone-boot body .site-shell.home-mode,html.tn-r42-phone body .site-shell.home-mode,
  html.tn-phone-boot body .site-shell.home-mode .home-page,html.tn-r42-phone body .site-shell.home-mode .home-page,
  html.tn-phone-boot body .site-shell.home-mode .home-dashboard-121,html.tn-r42-phone body .site-shell.home-mode .home-dashboard-121{
    width:100%!important;max-width:100%!important;min-width:0!important;
    min-height:0!important;height:auto!important;max-height:none!important;
    left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
    transform:none!important;zoom:1!important;overflow:visible!important;
  }

  /* Pages internes / formulaires */
  html.tn-phone-boot body .page-wrap,html.tn-r42-phone body .page-wrap{
    width:calc(100% - 16px)!important;max-width:100%!important;min-width:0!important;margin:12px auto 28px!important;
  }
  html.tn-phone-boot body .page-hero,html.tn-r42-phone body .page-hero{
    display:grid!important;grid-template-columns:56px minmax(0,1fr)!important;align-items:start!important;
    gap:11px!important;padding:15px!important;border-radius:16px!important;min-width:0!important;
  }
  html.tn-phone-boot body .page-hero>img,html.tn-r42-phone body .page-hero>img{
    width:56px!important;min-width:56px!important;max-width:56px!important;
    height:56px!important;min-height:56px!important;max-height:56px!important;
    object-fit:cover!important;border-radius:12px!important;
  }
  html.tn-phone-boot body .page-hero h1,html.tn-r42-phone body .page-hero h1{
    margin:0 0 6px!important;font-size:clamp(25px,7.7vw,32px)!important;line-height:1.04!important;overflow-wrap:anywhere!important;
  }
  html.tn-phone-boot body .page-hero p,html.tn-r42-phone body .page-hero p{
    font-size:12px!important;line-height:1.42!important;max-width:100%!important;
  }
  html.tn-phone-boot body .feature-grid,html.tn-r42-phone body .feature-grid,
  html.tn-phone-boot body .dashboard-grid,html.tn-r42-phone body .dashboard-grid,
  html.tn-phone-boot body .events-grid-r43,html.tn-r42-phone body .events-grid-r43{
    grid-template-columns:1fr!important;width:100%!important;min-width:0!important;gap:10px!important;
  }
  html.tn-phone-boot body .auth-page,html.tn-r42-phone body .auth-page{
    width:calc(100% - 16px)!important;max-width:none!important;margin:12px auto 28px!important;
  }
  html.tn-phone-boot body .auth-card,html.tn-r42-phone body .auth-card,
  html.tn-phone-boot body .auth-card.wide,html.tn-r42-phone body .auth-card.wide{
    display:grid!important;grid-template-columns:1fr!important;gap:16px!important;
    width:100%!important;min-width:0!important;padding:16px!important;border-radius:17px!important;
  }
  html.tn-phone-boot body .auth-intro h1,html.tn-r42-phone body .auth-intro h1{
    margin:3px 0 8px!important;font-size:28px!important;line-height:1.05!important;
  }
  html.tn-phone-boot body .auth-intro p,html.tn-r42-phone body .auth-intro p{
    margin:0!important;font-size:12px!important;line-height:1.45!important;
  }
  html.tn-phone-boot body .auth-links,html.tn-r42-phone body .auth-links{
    display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;gap:6px 12px!important;margin-top:12px!important;font-size:11px!important;
  }
  html.tn-phone-boot body .auth-form,html.tn-r42-phone body .auth-form,
  html.tn-phone-boot body .register-grid,html.tn-r42-phone body .register-grid{
    display:grid!important;grid-template-columns:1fr!important;gap:10px!important;min-width:0!important;
  }
  html.tn-phone-boot body .register-grid>*,html.tn-r42-phone body .register-grid>*{grid-column:1!important;min-width:0!important;}
  html.tn-phone-boot body .auth-form input,html.tn-r42-phone body .auth-form input,
  html.tn-phone-boot body .auth-form select,html.tn-r42-phone body .auth-form select{
    width:100%!important;min-width:0!important;height:44px!important;
  }
  html.tn-phone-boot body .auth-form button,html.tn-r42-phone body .auth-form button{min-height:44px!important;}
  html.tn-phone-boot body .dashboard-head,html.tn-r42-phone body .dashboard-head{
    display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:12px!important;padding:16px!important;
  }
  html.tn-phone-boot body .dashboard-head button,html.tn-r42-phone body .dashboard-head button{width:100%!important;}

  /* Avatar global : même gabarit avant/après connexion et actualisation */
  html.tn-phone-boot body #tn-r36-global-assistant,html.tn-r42-phone body #tn-r36-global-assistant,
  html.tn-phone-boot body #tn-r40-espace-assistant,html.tn-r42-phone body #tn-r40-espace-assistant{
    width:108px!important;min-width:108px!important;max-width:108px!important;
    height:96px!important;min-height:96px!important;max-height:96px!important;gap:2px!important;overflow:visible!important;
  }
  html.tn-phone-boot body #tn-r36-global-assistant .tn-r36-assistant-title,
  html.tn-r42-phone body #tn-r36-global-assistant .tn-r36-assistant-title,
  html.tn-phone-boot body #tn-r40-espace-assistant .tn-r40-title,
  html.tn-r42-phone body #tn-r40-espace-assistant .tn-r40-title{
    width:108px!important;min-width:108px!important;max-width:108px!important;
    font-size:11px!important;line-height:1.05!important;text-align:center!important;white-space:nowrap!important;
  }
  html.tn-phone-boot body #tn-r36-global-assistant .tn-r36-assistant-img,
  html.tn-r42-phone body #tn-r36-global-assistant .tn-r36-assistant-img,
  html.tn-phone-boot body #tn-r40-espace-assistant .tn-r40-img,
  html.tn-r42-phone body #tn-r40-espace-assistant .tn-r40-img{
    width:56px!important;min-width:56px!important;max-width:56px!important;
    height:76px!important;min-height:76px!important;max-height:76px!important;
    object-fit:contain!important;object-position:center bottom!important;
  }

  /* Chat compact, safe-area et clavier mobile */
  html.tn-phone-boot body .assistant-overlay,html.tn-r42-phone body .assistant-overlay{
    place-items:end center!important;padding:8px 10px calc(10px + env(safe-area-inset-bottom,0px))!important;overflow:hidden!important;
  }
  html.tn-phone-boot body .assistant-dialog,html.tn-r42-phone body .assistant-dialog{
    width:min(calc(100vw - 20px),390px)!important;max-width:390px!important;min-width:0!important;
    height:min(500px,60dvh)!important;min-height:min(350px,calc(100dvh - 20px))!important;
    max-height:calc(100dvh - 20px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;
    grid-template-rows:58px minmax(0,1fr) 54px!important;border-radius:17px!important;overflow:hidden!important;
  }
  html.tn-phone-boot body .assistant-dialog header,html.tn-r42-phone body .assistant-dialog header{padding:9px 11px!important;min-width:0!important;}
  html.tn-phone-boot body .assistant-mini-avatar,html.tn-r42-phone body .assistant-mini-avatar{
    width:36px!important;min-width:36px!important;max-width:36px!important;height:36px!important;min-height:36px!important;max-height:36px!important;
  }
  html.tn-phone-boot body .assistant-dialog header strong,html.tn-r42-phone body .assistant-dialog header strong{font-size:13px!important;}
  html.tn-phone-boot body .assistant-dialog header small,html.tn-r42-phone body .assistant-dialog header small{font-size:8.5px!important;}
  html.tn-phone-boot body .assistant-messages,html.tn-r42-phone body .assistant-messages{
    min-height:0!important;padding:10px!important;overflow-y:auto!important;overscroll-behavior:contain!important;
  }
  html.tn-phone-boot body .assistant-msg,html.tn-r42-phone body .assistant-msg{
    max-width:88%!important;padding:8px 10px!important;font-size:12px!important;line-height:1.36!important;
  }
  html.tn-phone-boot body .assistant-dialog form,html.tn-r42-phone body .assistant-dialog form{
    grid-template-columns:minmax(0,1fr) 68px!important;gap:6px!important;padding:7px!important;
  }
  html.tn-phone-boot body .assistant-dialog input,html.tn-r42-phone body .assistant-dialog input{
    min-width:0!important;width:100%!important;padding:0 9px!important;font-size:12px!important;
  }
  html.tn-phone-boot body .assistant-dialog form button,html.tn-r42-phone body .assistant-dialog form button{min-width:0!important;font-size:11px!important;}

  /* Pas de transition de taille : supprime l'effet grand -> petit. */
  html.tn-phone-boot body #tn-r36-global-assistant,html.tn-r42-phone body #tn-r36-global-assistant,
  html.tn-phone-boot body #tn-r40-espace-assistant,html.tn-r42-phone body #tn-r40-espace-assistant,
  html.tn-phone-boot body .auth-card,html.tn-r42-phone body .auth-card,
  html.tn-phone-boot body .assistant-dialog,html.tn-r42-phone body .assistant-dialog{
    transition-property:none!important;animation-duration:0s!important;animation-delay:0s!important;
  }
}
