/* mAIstra — Menu hamburger universel Lili */

.mlili-btn {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 32px);
  right: 20px;
  width: 44px;
  height: 44px;
  z-index: 900;
  display: none; /* toggled via JS */
  align-items: center;
  justify-content: center;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(184, 149, 106, 0.25);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  color: #1A1A1A;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 2px 10px rgba(26, 26, 26, 0.06);
  -webkit-tap-highlight-color: transparent;
}
.mlili-btn.is-visible { display: inline-flex; }
.mlili-btn:hover {
  background: rgba(255, 255, 255, 0.98);
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(26, 26, 26, 0.1);
}
.mlili-btn:active { transform: scale(0.96); }
.mlili-btn:focus-visible {
  outline: 2px solid #B8956A;
  outline-offset: 3px;
}
.mlili-btn__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}
.mlili-btn__bars span {
  display: block;
  height: 1.5px;
  background: #1A1A1A;
  border-radius: 2px;
  transition: transform 220ms ease, opacity 220ms ease;
}

/* Overlay + panel */
.mlili-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(26, 26, 26, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.mlili-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mlili-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 320px;
  max-width: 88vw;
  z-index: 960;
  background: #FAF7F2;
  border-left: 1px solid #E8DECF;
  box-shadow: -8px 0 32px rgba(26, 26, 26, 0.12);
  transform: translateX(100%);
  transition: transform 250ms ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mlili-panel.is-open { transform: translateX(0); }

.mlili-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
  border-bottom: 1px solid #E8DECF;
}
.mlili-panel__title {
  font-family: "Cormorant Infant", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  color: #1A1A1A;
  letter-spacing: 0.2px;
}
.mlili-panel__close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #1A1A1A;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.mlili-panel__close:hover { background: rgba(184, 149, 106, 0.12); }
.mlili-panel__close:focus-visible {
  outline: 2px solid #B8956A;
  outline-offset: 2px;
}

.mlili-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  flex: 1 1 auto;
}
.mlili-list__item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  color: #1A1A1A;
  text-decoration: none;
  font-family: "Cormorant Infant", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.2px;
  transition: background 160ms ease, color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.mlili-list__item a:hover,
.mlili-list__item a:focus-visible {
  background: rgba(184, 149, 106, 0.08);
  color: #9A7A54;
  outline: none;
}
.mlili-list__item a.is-current {
  color: #9A7A54;
  background: rgba(184, 149, 106, 0.06);
}
.mlili-list__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  font-size: 18px;
  font-style: normal;
}
.mlili-list__label { flex: 1 1 auto; }

.mlili-footer {
  border-top: 1px solid #E8DECF;
  padding: 8px 0 calc(env(safe-area-inset-bottom) + 8px);
}
.mlili-footer button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #6B7280;
  font-family: "Cormorant Infant", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.2px;
  text-align: left;
  transition: background 160ms ease, color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.mlili-footer button:hover,
.mlili-footer button:focus-visible {
  background: rgba(220, 38, 38, 0.06);
  color: #DC2626;
  outline: none;
}

/* Lock body scroll when panel open */
body.mlili-locked {
  overflow: hidden;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .mlili-btn,
  .mlili-overlay,
  .mlili-panel,
  .mlili-list__item a,
  .mlili-footer button {
    transition: none;
  }
}
