/* Correctif léger fluidité/animations - sans modifier la logique PHP */
:root{
  --tap-scale: .975;
  --soft-ease: cubic-bezier(.22,.61,.36,1);
}
html{
  scroll-behavior:smooth;
  -webkit-tap-highlight-color: transparent;
}
body{
  opacity:1;
  animation: appPageIn .22s var(--soft-ease) both;
}
body.app-is-leaving{
  pointer-events:none;
}
@keyframes appPageIn{
  from{opacity:.92; transform:translateY(5px);}
  to{opacity:1; transform:translateY(0);}
}
/* Boutons, menus et options : retour visuel immédiat au toucher */
a, button, .btn, .nav-link, .top-pill, .mobile-bottom-item,
.card, .dashboard-card, .module-card, .quick-card,
.notification-card, .notif-card, .reservation-card,
[role="button"], input[type="submit"], input[type="button"]{
  transition:transform .16s var(--soft-ease), opacity .16s var(--soft-ease), box-shadow .18s var(--soft-ease), background-color .18s var(--soft-ease), border-color .18s var(--soft-ease), color .18s var(--soft-ease);
}
a:active, button:active, .btn:active, .nav-link:active, .top-pill:active, .mobile-bottom-item:active,
.card:active, .dashboard-card:active, .module-card:active, .quick-card:active,
.notification-card:active, .notif-card:active, .reservation-card:active,
[role="button"]:active, input[type="submit"]:active, input[type="button"]:active{
  transform:scale(var(--tap-scale));
  opacity:.88;
}
@media (hover:hover){
  .btn:hover, .top-pill:hover, .nav-link:hover, .mobile-bottom-item:hover,
  .dashboard-card:hover, .module-card:hover, .quick-card:hover,
  .notification-card:hover, .notif-card:hover, .reservation-card:hover{
    transform:translateY(-1px);
  }
}
/* Barre du bas mobile : interaction plus douce */
.mobile-bottom-nav-facebook{
  animation: bottomNavIn .24s var(--soft-ease) both;
  transform:translateZ(0);
}
@keyframes bottomNavIn{
  from{opacity:.96; transform:translateY(8px);}
  to{opacity:1; transform:translateY(0);}
}
.mobile-bottom-item.active{
  transition:background-color .22s var(--soft-ease), color .22s var(--soft-ease), transform .16s var(--soft-ease);
}
/* Cartes : apparition légère, professionnelle */
.card, .dashboard-card, .module-card, .quick-card, .notification-card, .notif-card, .reservation-card, .stat-card{
  animation: softCardIn .24s var(--soft-ease) both;
}
@keyframes softCardIn{
  from{opacity:.88; transform:translateY(6px);}
  to{opacity:1; transform:translateY(0);}
}
/* Petit indicateur discret lors d'un changement de page */
.app-transition-loader{
  position:fixed;
  left:50%;
  bottom:calc(86px + env(safe-area-inset-bottom, 0px));
  z-index:99999;
  width:34px;
  height:34px;
  margin-left:-17px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  box-shadow:0 10px 30px rgba(15,23,42,.18);
  display:none;
  align-items:center;
  justify-content:center;
}
.app-transition-loader::after{
  content:"";
  width:16px;
  height:16px;
  border-radius:999px;
  border:2px solid rgba(20,132,82,.25);
  border-top-color:#148452;
  animation: appSpin .75s linear infinite;
}
body.app-is-loading .app-transition-loader{display:flex;}
@keyframes appSpin{to{transform:rotate(360deg);}}
/* Android/WebView : évite certains clignotements */
.app-shell, .content, .topbar, .mobile-bottom-nav-facebook{
  backface-visibility:hidden;
}
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
    scroll-behavior:auto !important;
  }
  .app-transition-loader{display:none !important;}
}
