/* =====================================================================
   ARES_UI_PRO_V4 — sobre : accueil centre, menus popover ancres
   ===================================================================== */

/* --- accueil : centre, sans decor --- */
.app.accueil-actif .fil{
  display:flex!important;flex-direction:column!important;justify-content:center!important;
}
.app.accueil-actif .fil > .colonne{
  padding-top:calc(70px + env(safe-area-inset-top,0px))!important;
  padding-bottom:8px!important;
}
.app.accueil-actif .accueil{padding:0 0 6px!important}

/* --- scrim : simple voile, sans flou --- */
html body #ares-ui-scrim{
  position:fixed;inset:0;z-index:3900;background:rgba(3,5,13,.32);
  opacity:0;pointer-events:none;transition:opacity .16s ease;
}
html body #ares-ui-scrim.ouvert{opacity:1}
[data-theme="jour"] html body #ares-ui-scrim{background:rgba(20,26,45,.2)}

/* --- panneaux --- */
html body #ares-tools-menu-v123,
html body .menu-joindre{
  position:fixed!important;z-index:4000!important;display:block!important;
  box-sizing:border-box!important;padding:6px!important;margin:0!important;
  border:1px solid rgba(126,152,214,.22)!important;border-radius:15px!important;
  background:rgba(14,18,30,.96)!important;color:#eef3ff!important;
  box-shadow:0 18px 44px rgba(0,0,0,.5)!important;
  overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
  transform-origin:bottom center;
  transition:opacity .15s ease,transform .15s ease;
}
html body #ares-tools-menu-v123[hidden],
html body .menu-joindre[hidden]{display:none!important}
[data-theme="jour"] html body #ares-tools-menu-v123,
[data-theme="jour"] html body .menu-joindre{
  background:rgba(255,255,255,.97)!important;border-color:rgba(30,45,90,.13)!important;
  color:#141a2b!important;box-shadow:0 16px 40px rgba(20,30,60,.2)!important;
}

.ap-tete{
  display:flex;align-items:center;gap:8px;padding:7px 9px 8px;margin-bottom:2px;
  border-bottom:1px solid rgba(126,152,214,.16);
  font:700 10px/1 system-ui,sans-serif;letter-spacing:.12em;text-transform:uppercase;color:#93a4c9;
}
[data-theme="jour"] .ap-tete{color:#5b6784;border-bottom-color:rgba(30,45,90,.1)}

html body #ares-tools-menu-v123 > button,
html body .menu-joindre > button{
  position:static!important;display:flex!important;align-items:center!important;gap:11px!important;
  box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;
  min-height:46px!important;height:auto!important;margin:0!important;padding:8px 10px!important;
  border:1px solid transparent!important;border-radius:11px!important;background:transparent!important;
  color:inherit!important;font:600 13.5px/1.25 system-ui,sans-serif!important;
  text-align:left!important;white-space:normal!important;transform:none!important;box-shadow:none!important;
  cursor:pointer;transition:background .13s ease,border-color .13s ease;
}
html body #ares-tools-menu-v123 > button + button,
html body .menu-joindre > button + button{margin-top:1px!important}
html body #ares-tools-menu-v123 > button:hover,
html body .menu-joindre > button:hover{background:rgba(107,143,255,.12)!important;border-color:rgba(126,152,214,.2)!important}
html body #ares-tools-menu-v123 > button:active,
html body .menu-joindre > button:active{background:rgba(107,143,255,.2)!important}

/* entrees deja structurees : icone inline, rien d'autre */
html body .menu-joindre > button > svg{width:19px;height:19px;flex:none;color:#8fb4ff}
html body .menu-joindre > button > span{display:flex;flex-direction:column;gap:1px;min-width:0}
html body .menu-joindre > button > span > strong{font-weight:600;font-size:13.5px}
html body .menu-joindre > button > span > small{color:#93a4c9;font-size:11px;font-weight:500;line-height:1.3}
[data-theme="jour"] html body .menu-joindre > button > span > small{color:#5b6784}

/* entrees en texte simple : emoji laisse en tete, description en dessous */
.ap-txt{display:flex;flex-direction:column;gap:1px;min-width:0}
.ap-txt strong{font-weight:600;font-size:13.5px}
.ap-txt small{color:#93a4c9;font-size:11px;font-weight:500;line-height:1.3}
[data-theme="jour"] .ap-txt small{color:#5b6784}

/* --- mobile : burger degage, toolbar recentree --- */
@media (max-width:680px){
  html body .barre-flottante{z-index:60!important}
  html body .entete-haut{left:64px!important;right:10px!important;max-width:calc(100% - 74px)!important}
  html body #ares-ws-toolbar{
    display:flex!important;flex-direction:row!important;grid-template-columns:none!important;
    align-items:center!important;justify-content:center!important;gap:8px!important;
    width:100%!important;max-width:100%!important;margin:0 auto 10px!important;padding:0!important;
    position:relative!important;overflow:visible!important;z-index:auto!important;
  }
  html body #ares-ws-toolbar > #ares-tools-toggle-v123{
    position:static!important;inset:auto!important;display:inline-flex!important;
    align-items:center!important;justify-content:center!important;
    width:auto!important;min-width:0!important;max-width:none!important;min-height:36px!important;
    padding:8px 18px!important;margin:0!important;
    border:1px solid rgba(122,152,238,.42)!important;border-radius:999px!important;
    background:linear-gradient(125deg,rgba(30,52,102,.92),rgba(52,42,96,.92))!important;
    color:#eaf1ff!important;font:600 12.5px/1 system-ui,sans-serif!important;
    box-shadow:0 8px 22px rgba(0,0,0,.35)!important;cursor:pointer;
  }
  html body #ares-ws-toolbar > #ares-tools-toggle-v123::after{
    content:"";width:6px;height:6px;margin-left:8px;opacity:.65;
    border-right:2px solid currentColor;border-bottom:2px solid currentColor;
    transform:rotate(45deg) translateY(-2px);transition:transform .18s ease;
  }
  html body #ares-ws-toolbar > #ares-tools-toggle-v123[aria-expanded="true"]::after{
    transform:rotate(-135deg) translateY(-1px);
  }
}
@media (prefers-reduced-motion:reduce){
  html body #ares-ui-scrim,html body #ares-tools-menu-v123,html body .menu-joindre{transition:none!important}
}
