/* ==========================================================================
   Vandeto — Menu Mobile · 4 modèles (drawer / fullscreen / sheet / grid)
   ========================================================================== */
.vmm,
.vmm * { box-sizing: border-box; }

.vmm {
    position: fixed;
    inset: 0;
    z-index: 99999;
    color: var(--vmm-text, #11151c);
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.vmm[hidden] { display: none; }

.vmm__backdrop {
    position: absolute; inset: 0;
    background: rgba(8, 11, 16, .5);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
    opacity: 0; transition: opacity .3s ease;
}
.vmm.is-open .vmm__backdrop { opacity: 1; }

.vmm__panel {
    position: absolute;
    background: var(--vmm-bg, #fff);
    display: flex; flex-direction: column;
    overflow: hidden;
    will-change: transform, opacity;
}

/* ---- Header ------------------------------------------------------------- */
.vmm__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 16px 18px; flex-shrink: 0;
    border-bottom: 1px solid rgba(17, 21, 28, .07);
    padding-top: calc(16px + env(safe-area-inset-top));
}
.vmm__logo { max-height: 36px; width: auto; display: block; }
.vmm__title { font-weight: 800; font-size: 18px; }
.vmm__close {
    width: 40px; height: 40px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%;
    background: rgba(17, 21, 28, .06); color: inherit; cursor: pointer;
    transition: background .15s ease;
}
.vmm__close:active { background: rgba(17, 21, 28, .12); }
.vmm__close svg { width: 20px; height: 20px; }
.vmm__close--float {
    position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px; z-index: 3;
    background: rgba(17, 21, 28, .08);
}

/* ---- Menu list (drawer / fullscreen / sheet) ---------------------------- */
.vmm__nav { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.vmm-menu { list-style: none; margin: 0; padding: 8px 0; }
.vmm-sub  { list-style: none; margin: 0; padding: 0; }

.vmm-item { position: relative; }
.vmm-link {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 22px; min-height: 50px;
    text-decoration: none; color: inherit;
    font-size: 16px; font-weight: 600; line-height: 1.3;
}
.vmm-link:hover, .vmm-link:focus { color: var(--vmm-accent, #ff1700); }
.vmm-item--parent > .vmm-link { padding-right: 56px; }

.vmm-toggle {
    position: absolute; top: 6px; right: 12px;
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: transparent; color: inherit; cursor: pointer;
    border-radius: 10px;
    transition: transform .25s ease, background .15s ease;
}
.vmm-toggle:active { background: rgba(17, 21, 28, .06); }
.vmm-toggle svg { width: 20px; height: 20px; }
.vmm-item--open > .vmm-toggle { transform: rotate(180deg); }

.vmm-sub {
    max-height: 0; overflow: hidden;
    background: rgba(17, 21, 28, .025);
    transition: max-height .3s ease;
}
.vmm-item--open > .vmm-sub { max-height: 1200px; }
.vmm-sub .vmm-link { padding-left: 36px; font-weight: 500; font-size: 15px; min-height: 44px; }
.vmm-sub .vmm-sub .vmm-link { padding-left: 52px; }

/* ---- CTA ---------------------------------------------------------------- */
.vmm__cta-wrap {
    flex-shrink: 0; padding: 14px 18px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(17, 21, 28, .07);
}
.vmm__cta {
    display: block; text-align: center; text-decoration: none;
    background: var(--vmm-accent, #ff1700); color: #fff;
    font-weight: 800; font-size: 15px; padding: 15px; border-radius: 14px;
    box-shadow: 0 12px 24px -10px var(--vmm-accent, #ff1700);
}

/* ---- User block (profile / login-register / logout) --------------------- */
.vmm__user {
    flex-shrink: 0;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(17, 21, 28, .07);
    display: flex; flex-direction: column; gap: 12px;
}
.vmm__user--out { gap: 10px; }

.vmm__profile {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: inherit;
    padding: 8px; margin: -2px; border-radius: 14px;
    background: rgba(17, 21, 28, .035);
    transition: background .15s ease;
}
.vmm__profile:active { background: rgba(17, 21, 28, .07); }
.vmm__avatar {
    width: 48px; height: 48px; flex-shrink: 0;
    border-radius: 50%; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(var(--vmm-accent-rgb, 255, 23, 0), .14);
    box-shadow: 0 0 0 2px rgba(17, 21, 28, .05);
}
.vmm__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vmm__avatar-i { font-size: 19px; font-weight: 800; color: var(--vmm-accent, #ff1700); }
.vmm__profile-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.vmm__profile-txt strong { font-size: 15.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vmm__profile-txt small { font-size: 12.5px; color: var(--vmm-accent, #ff1700); font-weight: 600; }
.vmm__profile-arr { width: 18px; height: 18px; opacity: .4; flex-shrink: 0; }

.vmm__account {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.vmm__acc {
    display: flex; align-items: center; gap: 9px;
    padding: 11px 12px; border-radius: 12px;
    background: rgba(17, 21, 28, .04);
    text-decoration: none; color: inherit;
    font-size: 13.5px; font-weight: 600;
    transition: background .15s ease;
}
.vmm__acc:active { background: rgba(17, 21, 28, .08); }
.vmm__acc i { color: var(--vmm-accent, #ff1700); font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }

.vmm__logout {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border-radius: 12px;
    background: rgba(220, 38, 38, .07);
    color: #dc2626; font-weight: 700; font-size: 14px;
    text-decoration: none;
    transition: background .15s ease;
}
.vmm__logout:active { background: rgba(220, 38, 38, .14); }
.vmm__logout i { font-size: 15px; }

.vmm__auth-btn {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    padding: 14px; border-radius: 14px;
    font-weight: 800; font-size: 15px; text-decoration: none;
    transition: filter .15s ease, background .15s ease;
}
.vmm__auth-btn i { font-size: 15px; }
.vmm__auth-btn--primary {
    background: var(--vmm-accent, #ff1700); color: #fff;
    box-shadow: 0 12px 24px -12px var(--vmm-accent, #ff1700);
}
.vmm__auth-btn--primary:active { filter: brightness(.94); }
.vmm__auth-btn--ghost {
    background: transparent; color: var(--vmm-text, #11151c);
    border: 1.5px solid rgba(17, 21, 28, .14);
}
.vmm__auth-btn--ghost:active { background: rgba(17, 21, 28, .05); }

/* Model tweaks for the user block */
.vmm--fullscreen .vmm__user { padding: 16px 26px; }
.vmm--grid .vmm__user { padding: 14px 16px; }
.vmm--fullscreen .vmm__profile-txt strong { font-size: 17px; }

/* ==========================================================================
   MODEL 1 — Drawer (side panel)
   ========================================================================== */
.vmm--drawer .vmm__panel {
    top: 0; bottom: 0;
    width: min(86vw, 360px);
    box-shadow: 0 0 70px rgba(0, 0, 0, .35);
    transition: transform .36s cubic-bezier(.22, .61, .36, 1);
}
.vmm--drawer.vmm--side-left  .vmm__panel { left: 0;  border-radius: 0 22px 22px 0; transform: translateX(-102%); }
.vmm--drawer.vmm--side-right .vmm__panel { right: 0; border-radius: 22px 0 0 22px; transform: translateX(102%); }
.vmm--drawer.is-open .vmm__panel { transform: none; }

/* ==========================================================================
   MODEL 2 — Fullscreen
   ========================================================================== */
.vmm--fullscreen .vmm__panel {
    inset: 0; width: 100%; border-radius: 0;
    opacity: 0; transform: scale(1.04);
    transition: opacity .3s ease, transform .35s ease;
}
.vmm--fullscreen.is-open .vmm__panel { opacity: 1; transform: none; }
.vmm--fullscreen .vmm__nav {
    display: flex; flex-direction: column; justify-content: center;
    padding: 10px 26px calc(10px + env(safe-area-inset-bottom));
}
.vmm--fullscreen .vmm-menu { padding: 0; width: 100%; }
.vmm--fullscreen .vmm-link { font-size: 25px; font-weight: 800; padding: 12px 0; }
.vmm--fullscreen .vmm-item--parent > .vmm-link { padding-right: 56px; }
.vmm--fullscreen .vmm-sub .vmm-link { font-size: 17px; font-weight: 600; padding-left: 14px; }
.vmm--fullscreen .vmm-toggle { top: 8px; }
/* staggered entrance */
.vmm--fullscreen.is-open .vmm-menu > .vmm-item { animation: vmm-rise .42s both; }
.vmm--fullscreen.is-open .vmm-menu > .vmm-item:nth-child(1) { animation-delay: .06s; }
.vmm--fullscreen.is-open .vmm-menu > .vmm-item:nth-child(2) { animation-delay: .11s; }
.vmm--fullscreen.is-open .vmm-menu > .vmm-item:nth-child(3) { animation-delay: .16s; }
.vmm--fullscreen.is-open .vmm-menu > .vmm-item:nth-child(4) { animation-delay: .21s; }
.vmm--fullscreen.is-open .vmm-menu > .vmm-item:nth-child(5) { animation-delay: .26s; }
.vmm--fullscreen.is-open .vmm-menu > .vmm-item:nth-child(6) { animation-delay: .31s; }
.vmm--fullscreen.is-open .vmm-menu > .vmm-item:nth-child(n+7) { animation-delay: .36s; }
@keyframes vmm-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   MODEL 3 — Bottom sheet
   ========================================================================== */
.vmm--sheet .vmm__panel {
    left: 0; right: 0; bottom: 0;
    max-height: 88vh;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -24px 60px rgba(0, 0, 0, .32);
    transform: translateY(100%);
    transition: transform .38s cubic-bezier(.22, .61, .36, 1);
}
.vmm--sheet.is-open .vmm__panel { transform: none; }
.vmm--sheet.vmm--dragging .vmm__panel { transition: none; }
.vmm__handle {
    width: 44px; height: 5px; border-radius: 99px;
    background: rgba(17, 21, 28, .18);
    margin: 10px auto 2px; flex-shrink: 0;
}
.vmm--sheet .vmm__head { border-bottom: 1px solid rgba(17, 21, 28, .06); }

/* ==========================================================================
   MODEL 4 — Grid (launchpad)
   ========================================================================== */
.vmm--grid .vmm__panel {
    inset: 0; width: 100%; border-radius: 0;
    opacity: 0; transform: scale(1.04);
    transition: opacity .3s ease, transform .35s ease;
}
.vmm--grid.is-open .vmm__panel { opacity: 1; transform: none; }
.vmm--grid .vmm__nav { padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); }
.vmm--grid .vmm-menu {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 12px 0;
}
.vmm--grid .vmm-item { position: relative; }
.vmm--grid .vmm-link {
    flex-direction: column; align-items: flex-start; justify-content: space-between;
    gap: 22px; min-height: 104px; padding: 16px;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(17, 21, 28, .035), rgba(17, 21, 28, .07));
    border: 1px solid rgba(17, 21, 28, .06);
    font-size: 16px; font-weight: 700;
}
.vmm--grid .vmm-link::before {
    content: ""; display: block; width: 38px; height: 38px; border-radius: 12px;
    background: var(--vmm-accent, #ff1700);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14M13 6l6 6-6 6'/></svg>") center/20px no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14M13 6l6 6-6 6'/></svg>") center/20px no-repeat;
    opacity: .9;
}
.vmm--grid .vmm-link:active { transform: scale(.98); }
.vmm--grid .vmm-toggle { display: none; }
.vmm--grid .vmm-sub { display: none; }

/* ---- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .vmm *, .vmm__panel, .vmm__backdrop { transition-duration: .01ms !important; animation: none !important; }
}
