/* ======================================================================
   MENU MOBILE — tiroir de navigation
   Balisage : index.html, <dialog class="Drawer">
   Script   : sections/02-header/header.js
   ====================================================================== */

.Drawer {
  --drawer-width: min(22em, 84dvw, 100dvw - 24px);
  --drawer-backdrop: 0;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  overflow: visible;
}

.Drawer::backdrop {
  background: #08152B;
  opacity: calc(var(--drawer-backdrop) * 0.55);
}

.Drawer-scroller {
  position: relative;
  display: grid;
  grid-template-columns: 100% var(--drawer-width);
  overflow-x: scroll;
  overscroll-behavior: none;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.Drawer-scroller::-webkit-scrollbar {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .Drawer-scroller {
    scroll-behavior: smooth;
  }
}

.Drawer-scroller::before {
  content: '';
  scroll-snap-align: start;
  scroll-initial-target: nearest;
}

.Drawer-sheet {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100svh;
  padding: 32px 28px;
  background: linear-gradient(to bottom var(--in-oklab), var(--navy-dark), var(--navy-abyss));
  color: var(--sky-light);
  border-left: 1px solid rgba(237, 241, 253, 0.16);
  overflow-y: auto;
  scroll-snap-align: end;
  scrollbar-width: none;
}

.Drawer-sheet::-webkit-scrollbar {
  display: none;
}

@supports (animation-timeline: scroll()) {
  .Drawer {
    timeline-scope: --drawer-fade;
    animation: fade-drawer-backdrop linear both;
    animation-timeline: --drawer-fade;
  }

  .Drawer-scroller {
    scroll-timeline: --drawer-fade x;
  }

  @property --drawer-backdrop {
    syntax: '<number>';
    inherits: true;
    initial-value: 0;
  }

  @keyframes fade-drawer-backdrop {
    0% { --drawer-backdrop: 0; }
    100% { --drawer-backdrop: 1; }
  }
}

.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(237, 241, 253, 0.15);
}

.drawer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 200;
  color: #FFFFFF;
}

.drawer-brand em {
  font-style: italic;
  font-weight: 430;
}

.drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  border: 1px solid rgba(237, 241, 253, 0.24);
  color: #FFFFFF;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.drawer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-block: 28px;
}

.drawer-nav a {
  display: block;
  padding-block: 13px;
  border-bottom: 1px solid rgba(237, 241, 253, 0.1);
  font-size: 17px;
  font-weight: 400;
  color: var(--sky-light);
}

.drawer-footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drawer-meta {
  font-size: 12.5px;
  color: rgba(237, 241, 253, 0.7);
}
