/* TentoniNumérik — R44.3.28.6
   Base R44.3.28.5.
   Correction ciblée : téléphone connecté + stabilité avatar.
   Langues R44.3.28.5 conservées sans modification.
*/

/* ================================================================
   AVATAR PUBLIC / CONNECTÉ — stabilité stricte
   Empêche toute image naturelle surdimensionnée de déborder pendant
   un rerender ou avant la fin du chargement des feuilles historiques.
   ================================================================ */
#tn-r36-global-assistant#tn-r36-global-assistant{
  width:160px!important;
  min-width:160px!important;
  max-width:160px!important;
  height:132px!important;
  min-height:132px!important;
  max-height:132px!important;
  overflow:hidden!important;
  contain:layout paint size!important;
}
#tn-r36-global-assistant#tn-r36-global-assistant .tn-r36-assistant-title{
  display:block!important;
  width:160px!important;
  max-width:160px!important;
  height:auto!important;
  font-size:16px!important;
  line-height:1.05!important;
  overflow:hidden!important;
}
#tn-r36-global-assistant#tn-r36-global-assistant .tn-r36-assistant-img{
  display:block!important;
  position:static!important;
  width:78px!important;
  min-width:78px!important;
  max-width:78px!important;
  height:104px!important;
  min-height:104px!important;
  max-height:104px!important;
  margin:0 auto!important;
  padding:0!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  transform:none!important;
  overflow:hidden!important;
}
#assistant-launch#assistant-launch,
#mc-launch#mc-launch,
#tn141-avatar-rail#tn141-avatar-rail,
.tn141-avatar-rail.tn141-avatar-rail,
.floating-tools.public-floating .floating-person.floating-person,
.floating-tools.logged-floating .floating-person.floating-person{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}

/* ================================================================
   TÉLÉPHONE CONNECTÉ
   Ligne 1 : marque | Accueil | Tableau de bord
   Ligne 2 : Déconnexion | drapeau | enveloppe | alerte
   La spécificité renforcée neutralise les anciennes couches !important.
   ================================================================ */
@media(max-width:720px){
  html body.tn-authenticated .topbar.topbar{
    min-height:108px!important;
    height:108px!important;
  }

  html body.tn-authenticated .topbar .topbar-inner.topbar-inner{
    display:grid!important;
    grid-template-columns:repeat(12,minmax(0,1fr))!important;
    grid-template-rows:50px 42px!important;
    column-gap:4px!important;
    row-gap:4px!important;
    align-items:center!important;
    min-height:108px!important;
    height:108px!important;
    padding:6px 8px!important;
    overflow:hidden!important;
  }

  html body.tn-authenticated .topbar .topbar-inner .top-meta.top-meta,
  html body.tn-authenticated .topbar .topbar-inner .top-actions.top-actions{
    display:contents!important;
  }

  html body.tn-authenticated .topbar .topbar-inner .brand.brand.brand{
    grid-column:1 / 8!important;
    grid-row:1!important;
  }

  /* Accueil revient exactement sur la première ligne. */
  html body.tn-authenticated .topbar .topbar-inner #mobile-menu#mobile-menu.mobile-menu-btn{
    grid-column:8 / 10!important;
    grid-row:1!important;
    width:48px!important;
    min-width:48px!important;
    max-width:48px!important;
    height:46px!important;
    min-height:46px!important;
    margin:0 auto!important;
  }

  /* Tableau de bord : le vrai span est utilisé.
     Le texte "▦" brut est masqué par font-size:0.
     L'icône et le texte forment UN groupe flex centré. */
  html body.tn-authenticated .topbar .topbar-inner .top-actions
  #tn141-manager-launch#tn141-manager-launch{
    grid-column:10 / 13!important;
    grid-row:1!important;
    position:static!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    width:90px!important;
    min-width:90px!important;
    max-width:90px!important;
    height:46px!important;
    min-height:46px!important;
    padding:3px 5px!important;
    margin:0 auto!important;
    border-radius:15px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    font-size:0!important;
    line-height:1!important;
  }

  html body.tn-authenticated .topbar .topbar-inner .top-actions
  #tn141-manager-launch#tn141-manager-launch::before{
    content:""!important;
    display:block!important;
    position:static!important;
    flex:0 0 20px!important;
    width:20px!important;
    min-width:20px!important;
    max-width:20px!important;
    height:20px!important;
    min-height:20px!important;
    max-height:20px!important;
    margin:0!important;
    transform:none!important;
    align-self:center!important;
    background:url('/assets/r44-3-26-2/dashboard-phone.svg') center/contain no-repeat!important;
  }

  html body.tn-authenticated .topbar .topbar-inner .top-actions
  #tn141-manager-launch#tn141-manager-launch::after{
    content:none!important;
    display:none!important;
  }

  html body.tn-authenticated .topbar .topbar-inner .top-actions
  #tn141-manager-launch#tn141-manager-launch span{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    position:static!important;
    flex:0 1 auto!important;
    width:auto!important;
    max-width:62px!important;
    height:auto!important;
    margin:0!important;
    padding:0!important;
    color:#174b86!important;
    font-size:7.1px!important;
    font-weight:900!important;
    line-height:1!important;
    letter-spacing:-.08px!important;
    text-align:center!important;
    white-space:normal!important;
    overflow:visible!important;
    transform:none!important;
  }

  /* Deuxième ligne restaurée proprement. */
  html body.tn-authenticated .topbar .topbar-inner .top-actions
  #header-logout#header-logout{
    grid-column:2 / 5!important;
    grid-row:2!important;
    width:82px!important;
    min-width:82px!important;
    max-width:82px!important;
    height:40px!important;
    min-height:40px!important;
    margin:0 auto!important;
  }

  html body.tn-authenticated .topbar .topbar-inner .top-actions
  #language-btn#language-btn{
    grid-column:5 / 7!important;
    grid-row:2!important;
    margin:0 auto!important;
  }

  html body.tn-authenticated .topbar .topbar-inner .top-actions
  >a.round-action.round-action{
    grid-column:7 / 9!important;
    grid-row:2!important;
    margin:0 auto!important;
  }

  html body.tn-authenticated .topbar .topbar-inner .top-actions
  .education-alert-bell.education-alert-bell{
    grid-column:9 / 11!important;
    grid-row:2!important;
    margin:0 auto!important;
  }
}
