/* Mobile drawer — backdrop + panel right slide-in. */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 21, 38, 0.5);
  backdrop-filter: blur(2px);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.drawer-backdrop.is-open { opacity: 1; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  width: min(360px, 88vw);
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.drawer.is-open {
  transform: translateX(0);
  box-shadow: -12px 0 40px rgba(7, 21, 38, 0.18);
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  height: 64px;
  border-bottom: 1px solid var(--hairline);
  flex-shrink: 0;
}
.drawer__brand { display: flex; align-items: center; height: 100%; padding: 6px 0; }
.drawer__brand img {
  height: 100%;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}
.drawer__close {
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  line-height: 0;
}
.drawer__close:hover { background: var(--bg-soft); color: var(--marine); }

.drawer__nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
  -webkit-overflow-scrolling: touch;
}

/* Liens topbar (membres) en haut du drawer */
.drawer__topbar {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0 0.75rem;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-soft);
}
.drawer__topbar a {
  padding: 0.5rem 1.25rem;
  color: var(--ink-2);
  font-size: 0.88rem;
}
.drawer__topbar a:hover { color: var(--marine); background: #fff; }

.drawer__sec { border-bottom: 1px solid var(--hairline); }
.drawer__sec:last-child { border-bottom: 0; }

.drawer__lvl1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.25rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}
.drawer__lvl1--link { display: block; }
.drawer__lvl1:hover { background: var(--bg-soft); }
.drawer__chev { transition: transform 0.2s ease; flex-shrink: 0; color: var(--ink-3); }
.drawer__lvl1[aria-expanded="true"] .drawer__chev {
  transform: rotate(180deg);
  color: var(--marine);
}

.drawer__sub {
  display: none;
  padding: 0 0 0.5rem 0;
  background: var(--bg-soft);
}
.drawer__lvl1[aria-expanded="true"] + .drawer__sub { display: block; }
.drawer__sub a {
  display: block;
  padding: 0.65rem 1.25rem 0.65rem 2.25rem;
  color: var(--ink-2);
  font-size: 0.95rem;
  border-left: 3px solid transparent;
}
.drawer__sub a:hover,
.drawer__sub a.is-active {
  color: var(--marine);
  background: #fff;
  border-left-color: var(--duck);
}

.drawer__foot {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex-shrink: 0;
}
.drawer__foot .btn--full {
  width: 100%;
  justify-content: center;
  display: inline-flex;
  text-align: center;
}
.drawer__social { display: flex; justify-content: center; }
.drawer__social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-2);
  font-size: 0.9rem;
  font-family: var(--font-display);
}
.drawer__social a:hover { color: var(--marine); }
