/* Additions of the WordPress theme on top of site.css (the prototype was desktop-only): admin bar, mobile header and menu, small-screen fixes. */

/* the admin toolbar of a logged-in editor sits above the page: the fixed header and the pinned hero move under it */
.admin-bar .nav{top:var(--wp-admin--admin-bar--height,32px)}
.admin-bar .hero-pin .hero{top:var(--wp-admin--admin-bar--height,32px)}
@media (max-width:600px){html #wpadminbar{position:fixed}}  /* WordPress lets it scroll away on phones: it would leave a gap above the fixed header */
.admin-bar .mnav{padding-top:calc(110px + var(--wp-admin--admin-bar--height,32px) + env(safe-area-inset-top,0px))}

.nav-burger,.mnav{display:none}
@media (max-width:980px){
  /* header: once scrolled, the floating glass pill keeps its side and top margins and its rounded corners but spans the whole width; the logo shrinks */
  .nav .nav-cta{display:none}
  .nav .logo{width:104px}
  .nav-in{border-radius:var(--r-btn)}  /* same corners in both states: only the glass fades in and out, the shape never morphs */
  .nav.mini .nav-in{width:100%;padding:6px 8px 6px 18px}
  .nav.mini .logo{width:82px}

  /* burger: two lines, no frame; they cross into an X when the menu is open */
  .nav-burger{position:relative;display:block;width:44px;height:44px;padding:0;border:0;background:none;color:inherit;cursor:pointer}
  .nav-burger i{position:absolute;left:10px;right:10px;height:1.5px;background:currentColor;transition:transform .5s cubic-bezier(.76,0,.24,1),top .5s cubic-bezier(.76,0,.24,1)}
  .nav-burger i:first-child{top:17px}.nav-burger i:last-child{top:25px}
  .nav-open .nav-burger i:first-child{top:21px;transform:rotate(45deg)}
  .nav-open .nav-burger i:last-child{top:21px;transform:rotate(-45deg)}

  /* panel: fades in over the page, the rows rise in after it */
  .mnav{display:flex;flex-direction:column;position:fixed;inset:0;z-index:55;overflow-y:auto;padding:calc(110px + env(safe-area-inset-top,0px)) max(var(--gut),env(safe-area-inset-right,0px)) calc(28px + env(safe-area-inset-bottom,0px)) max(var(--gut),env(safe-area-inset-left,0px));
    background:var(--nuit);color:#fff;visibility:hidden;opacity:0;
    transition:opacity .45s ease,visibility 0s linear .45s}
  .nav-open .mnav{visibility:visible;opacity:1;transition:opacity .45s ease,visibility 0s}
  .nav-open .nav{color:#fff}
  .nav-open .nav .nav-in{background-color:transparent!important;box-shadow:none!important}
  .nav-open .nav .nav-in::before{-webkit-backdrop-filter:none;backdrop-filter:none}  /* the pill disappears into the panel */
  .mnav ul{list-style:none;margin:0;padding:0}
  .mnav-list>li,.mnav-foot{opacity:0;transform:translateY(18px);transition:opacity .3s,transform .3s}
  .nav-open .mnav-list>li,.nav-open .mnav-foot{opacity:1;transform:none;transition:opacity .5s calc(.15s + var(--i,0) * .06s),transform .7s cubic-bezier(.2,.7,.2,1) calc(.15s + var(--i,0) * .06s)}
  .mnav-top{display:flex;align-items:center;justify-content:space-between;width:100%;padding:16px 0;border:0;background:none;color:inherit;font:400 26px/1.2 var(--body);text-align:left;text-decoration:none;cursor:pointer}
  .mnav-top svg{width:18px;height:18px;flex:none;transition:transform .4s cubic-bezier(.76,0,.24,1)}
  .mnav-list>li.open>.mnav-top svg{transform:rotate(90deg)}
  .mnav-top[aria-current]{color:var(--corail)}
  /* sub-pages: the list unfolds under its parent (grid rows 0fr → 1fr) */
  .mnav-sub{display:grid;grid-template-rows:0fr;transition:grid-template-rows .45s cubic-bezier(.76,0,.24,1)}
  .mnav-list>li.open>.mnav-sub{grid-template-rows:1fr}
  .mnav-sub>ul{overflow:hidden}
  .mnav-sub a{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 0;border-bottom:1px solid rgba(255,255,255,.12);font-size:15px;color:rgba(255,255,255,.85);text-decoration:none}
  .mnav-sub li:last-child a{margin-bottom:10px}
  .mnav-sub a svg{width:12px;height:12px;flex:none}
  .mnav-sub a[aria-current]{color:#fff;font-weight:600}
  .mnav-foot{display:flex;justify-content:space-between;gap:16px;margin-top:auto;padding-top:40px;font-size:15px}
  .mnav-foot a{color:rgba(255,255,255,.72);text-decoration:none}
}
@media (max-width:640px){
  .foot-grid{grid-template-columns:1fr}
}
@media (max-width:560px){
  .kcards{grid-template-columns:1fr}
  .rail .card{flex-basis:84vw}
}
