/* TentoniNumérik — R44.3.28.5
   Structure existante conservée. Corrections ciblées uniquement.
*/

/* Drapeau choisi réellement visible : neutralise le pseudo-drapeau FR historique. */
html.tn-r42-phone #language-btn::before,
html.tn-r42-tablet #language-btn::before,
html.tn-phone-boot #language-btn::before{
  content:none!important;
  display:none!important;
}
html.tn-r42-phone #language-btn>img,
html.tn-r42-tablet #language-btn>img,
html.tn-phone-boot #language-btn>img{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  width:25px!important;
  height:17px!important;
  object-fit:cover!important;
}

/* Titres générés historiquement par CSS : pilotables par la langue. */
.tn-responsive-extras .tn-ref-events header h3::after,
.tn-responsive-extras .tn-ref-resources header h3::after,
.tn-responsive-extras .tn-ref-weather>h3::after{
  content:attr(data-tn-i18n-label)!important;
}

/* AVATAR : gabarit final verrouillé en permanence, desktop/tablette/téléphone.
   Les lanceurs natifs sont cachés ; seul le lanceur global R36 reste visible.
   Cela empêche le flash "très grand / normal" lors des rerenders. */
#assistant-launch,#mc-launch,#tn141-avatar-rail,.tn141-avatar-rail{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
.floating-tools.public-floating .floating-person,
.floating-tools.logged-floating .floating-person{
  display:none!important;
  visibility:hidden!important;
}
#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:visible!important;
}
#tn-r36-global-assistant .tn-r36-assistant-title{
  width:160px!important;
  max-width:160px!important;
  font-size:16px!important;
  line-height:1.05!important;
}
#tn-r36-global-assistant .tn-r36-assistant-img{
  display:block!important;
  width:78px!important;
  min-width:78px!important;
  max-width:78px!important;
  height:104px!important;
  min-height:104px!important;
  max-height:104px!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  transform:none!important;
}

/* Téléphone connecté : disposition de secours demandée par l'utilisateur.
   Ligne 1 = marque + GRAND Tableau de bord.
   Ligne 2 = Accueil + Déconnexion + langue + enveloppe + alerte.
   Aucun autre élément du site n'est déplacé. */
@media(max-width:720px){
  body.tn-authenticated .topbar{
    min-height:108px!important;
    height:108px!important;
  }
  body.tn-authenticated .topbar .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;
  }
  body.tn-authenticated .topbar .topbar-inner .top-actions,
  body.tn-authenticated .topbar .topbar-inner .top-meta{
    display:contents!important;
  }

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

  /* Tableau de bord : large, horizontal, immédiatement lisible. */
  body.tn-authenticated .topbar .topbar-inner .top-actions #tn141-manager-launch{
    grid-column:8 / 13!important;
    grid-row:1!important;
    position:relative!important;
    display:grid!important;
    grid-template-columns:26px minmax(0,1fr)!important;
    grid-template-rows:1fr!important;
    align-items:center!important;
    justify-items:center!important;
    column-gap:5px!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:46px!important;
    min-height:46px!important;
    padding:4px 8px!important;
    margin:0!important;
    border-radius:15px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  body.tn-authenticated .topbar .topbar-inner .top-actions #tn141-manager-launch::before{
    position:static!important;
    grid-column:1!important;
    grid-row:1!important;
    width:22px!important;
    height:22px!important;
    margin:0!important;
    transform:none!important;
    align-self:center!important;
  }
  body.tn-authenticated .topbar .topbar-inner .top-actions #tn141-manager-launch::after{
    content:attr(data-tn-i18n-label)!important;
    position:static!important;
    grid-column:2!important;
    grid-row:1!important;
    width:auto!important;
    margin:0!important;
    transform:none!important;
    align-self:center!important;
    justify-self:start!important;
    white-space:nowrap!important;
    font-size:8px!important;
    line-height:1!important;
    text-align:left!important;
  }

  /* Accueil passe en seconde ligne comme demandé. */
  body.tn-authenticated .topbar .topbar-inner .mobile-menu-btn{
    grid-column:1 / 3!important;
    grid-row:2!important;
    width:48px!important;
    min-width:48px!important;
    max-width:48px!important;
    height:40px!important;
    min-height:40px!important;
    margin:0 auto!important;
  }
  body.tn-authenticated .topbar .topbar-inner .mobile-menu-btn::after{
    content:attr(data-tn-i18n-label)!important;
  }

  body.tn-authenticated .topbar .topbar-inner .top-actions #header-logout{
    grid-column:3 / 6!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;
  }
  body.tn-authenticated .topbar .topbar-inner .top-actions #header-logout::after{
    content:attr(data-tn-i18n-label)!important;
  }

  body.tn-authenticated .topbar .topbar-inner .top-actions #language-btn{
    grid-column:6 / 8!important;
    grid-row:2!important;
    margin:0 auto!important;
  }
  body.tn-authenticated .topbar .topbar-inner .top-actions>a.round-action{
    grid-column:8 / 10!important;
    grid-row:2!important;
    margin:0 auto!important;
  }
  body.tn-authenticated .topbar .topbar-inner .top-actions .education-alert-bell{
    grid-column:10 / 12!important;
    grid-row:2!important;
    margin:0 auto!important;
  }
}
