/* Couche mobile applicative. Aucune regle de mise en page ne s'applique au desktop. */
.mobile-app-context{display:none}
.pwa-install-action{display:none}
.mobile-primary-dock{display:none}

@media (max-width:760px){
  html{scroll-padding-top:82px}
  body.app-shell{
    min-width:0;
    padding-left:env(safe-area-inset-left);
    padding-right:env(safe-area-inset-right);
    -webkit-tap-highlight-color:rgba(13,91,74,.14);
  }
  body.app-shell.has-mobile-user-nav{padding-bottom:calc(82px + env(safe-area-inset-bottom))}
  body.app-shell.has-mobile-action-dock,
  body.app-shell:has([data-mobile-sticky-action]){padding-bottom:calc(148px + env(safe-area-inset-bottom))}

  body.app-shell input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  body.app-shell select,
  body.app-shell textarea{font-size:16px!important;max-width:100%}

  body.app-shell button,
  body.app-shell .btn,
  body.app-shell .mini-btn,
  body.app-shell [role="button"],
  body.app-shell summary{min-width:46px;min-height:46px}
  body.app-shell .btn,
  body.app-shell .mini-btn,
  body.app-shell button{touch-action:manipulation}

  body.app-shell .topbar{padding-top:env(safe-area-inset-top)}
  body.app-shell .topnav{
    min-height:62px;
    display:grid;
    grid-template-columns:44px minmax(0,1fr) 44px 44px;
    align-items:center;
    gap:6px;
    padding:8px 12px;
  }
  body.app-shell .brand{grid-column:1;grid-row:1;order:0;min-width:44px;min-height:44px;padding:2px;justify-content:center}
  body.app-shell .brand-title{display:none}
  body.app-shell .brand-mark,
  body.app-shell .brand-mark img{width:38px;height:38px}
  body.app-shell .mobile-app-context{
    grid-column:2;
    grid-row:1;
    order:0;
    display:grid;
    min-width:0;
    line-height:1.1;
  }
  body.app-shell .mobile-app-context strong{
    overflow:hidden;
    color:var(--ink-900,#17352d);
    font-size:.9rem;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  body.app-shell .mobile-app-context span{
    overflow:hidden;
    margin-top:3px;
    color:var(--ink-600,#60716c);
    font-size:.68rem;
    font-weight:700;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  body.app-shell .space-switch{display:none!important}
  body.app-shell .burger{
    grid-column:3;
    grid-row:1;
    order:0;
    width:44px;
    height:44px;
    margin:0;
    padding:0;
    border-radius:14px;
  }
  body.app-shell .nav-right{
    grid-column:4;
    grid-row:1;
    order:0;
    min-width:44px;
    justify-content:flex-end;
    gap:0;
  }
  body.app-shell .nav-right>.hello,
  body.app-shell .nav-right>.sep{display:none!important}
  body.app-shell .avatarBtn{width:44px;min-width:44px;height:44px;padding:2px;justify-content:center}
  body.app-shell .avatarBtn .chev{display:none}
  body.app-shell .menu{grid-column:1/-1;grid-row:2;order:0}

  body.app-shell .mobile-user-nav__item{min-height:58px;touch-action:manipulation}
  body.app-shell .mobile-user-nav{padding-bottom:env(safe-area-inset-bottom)}

  body.app-shell .mobile-primary-dock{
    display:flex;
    align-items:center;
    justify-content:center;
    position:fixed!important;
    z-index:850!important;
    right:max(12px,env(safe-area-inset-right));
    bottom:calc(12px + env(safe-area-inset-bottom));
    left:max(12px,env(safe-area-inset-left));
    width:auto!important;
    min-height:50px!important;
    margin:0!important;
    padding:0 18px!important;
    border:0!important;
    border-radius:16px!important;
    background:linear-gradient(135deg,#0d5b4a,#16715d)!important;
    color:#fff!important;
    font:inherit;
    font-weight:900!important;
    line-height:1.2;
    text-align:center;
    box-shadow:0 16px 42px rgba(16,42,42,.26)!important;
  }
  body.app-shell .mobile-primary-source{
    display:none!important;
  }
  body.app-shell.has-mobile-user-nav .mobile-primary-dock,
  body.app-shell.has-mobile-user-nav [data-mobile-sticky-proxy]{
    bottom:calc(80px + env(safe-area-inset-bottom));
  }

  body.app-shell .cantine-order-help,
  body.app-shell .portal-btn.secondary.cantine-order-help{
    width:48px!important;
    min-width:48px!important;
    height:48px!important;
    min-height:48px!important;
  }

  body.app-shell .cse-panel__dots{gap:0;flex-wrap:wrap;justify-content:center}
  body.app-shell .cse-panel__dot{
    position:relative;
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    min-height:44px!important;
    background:transparent!important;
  }
  body.app-shell .cse-panel__dot::before{
    content:"";
    position:absolute;
    top:50%;
    left:50%;
    width:9px;
    height:9px;
    border-radius:999px;
    background:rgba(255,255,255,.34);
    transform:translate(-50%,-50%);
  }
  body.app-shell .cse-panel__dot.is-active::before{background:#fff}

  body.app-shell .mobile-card-table{
    display:block;
    width:100%;
    min-width:0!important;
    border:0;
    background:transparent;
  }
  body.app-shell .mobile-card-table thead{display:none}
  body.app-shell .mobile-card-table tbody{display:grid;gap:12px;width:100%}
  body.app-shell .mobile-card-table tr{
    display:grid;
    width:100%;
    min-width:0;
    padding:12px 14px;
    border:1px solid #dfe8e4;
    border-radius:16px;
    background:#fff;
    box-shadow:0 10px 28px rgba(16,42,42,.06);
  }
  body.app-shell .mobile-card-table td,
  body.app-shell .mobile-card-table th{
    display:grid;
    grid-template-columns:minmax(96px,40%) minmax(0,1fr);
    gap:12px;
    align-items:start;
    width:100%!important;
    min-width:0!important;
    padding:10px 0!important;
    border:0!important;
    border-bottom:1px solid #edf2f0!important;
    text-align:right!important;
    white-space:normal!important;
  }
  body.app-shell .mobile-card-table td::before,
  body.app-shell .mobile-card-table th::before{
    content:attr(data-label);
    color:#60716c;
    font-size:.72rem;
    font-weight:900;
    letter-spacing:.035em;
    text-align:left;
    text-transform:uppercase;
  }
  body.app-shell .mobile-card-table td:last-child,
  body.app-shell .mobile-card-table th:last-child{border-bottom:0!important}
  body.app-shell .mobile-card-table [colspan]{display:block;text-align:left!important}
  body.app-shell .mobile-card-table [colspan]::before{display:none}
  body.app-shell .mobile-card-table td>*{max-width:100%}

  body.app-shell .help-modal,
  body.app-shell .cantine-image-modal,
  body.app-shell .reset-password-modal,
  body.app-shell .role-help-modal{padding:0!important}
  body.app-shell .help-modal__dialog,
  body.app-shell .cantine-image-modal__dialog,
  body.app-shell .reset-password-modal__dialog,
  body.app-shell .role-help-modal__dialog,
  body.app-shell .modal-card{
    position:fixed!important;
    inset:0!important;
    width:100%!important;
    max-width:none!important;
    height:100dvh!important;
    max-height:none!important;
    margin:0!important;
    padding-top:env(safe-area-inset-top)!important;
    padding-bottom:env(safe-area-inset-bottom)!important;
    border:0!important;
    border-radius:0!important;
    overflow:auto!important;
  }

  body.app-shell .site-footer{padding-bottom:calc(18px + env(safe-area-inset-bottom))}
  body.app-shell .pwa-install-action{
    position:fixed;
    z-index:1200;
    right:16px;
    bottom:calc(92px + env(safe-area-inset-bottom));
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:46px;
    padding:0 16px;
    border:1px solid rgba(255,255,255,.28);
    border-radius:16px;
    background:#0d5b4a;
    color:#fff;
    font:inherit;
    font-weight:850;
    box-shadow:0 16px 36px rgba(16,42,42,.24);
  }
}

@media (prefers-reduced-motion:reduce){
  html:focus-within{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    scroll-behavior:auto!important;
    transition-duration:.01ms!important;
  }
}
