/* ========================= TOGGLE (hamburger) ========================= */
#menuToggle {
    position: fixed;
    top: 30px;
    left: 10px;
    z-index: 10;
    user-select: none;
}

#menuToggle input {
    width: 50px;
    height: 40px;
    position: absolute;
    top: -6px;
    left: -5px;
    cursor: pointer;
    opacity: 0;
    z-index: 200;
}

/* ========================= HAMBURGER ========================= */
#menuToggle span {
    display: block;
    width: 50px;
    height: 8px;
    margin-bottom: 6px;
    background: linear-gradient(to bottom, #8b6b4e, #5a3f2c);
    border-radius: 6px;
    border: 1px solid rgba(61, 42, 29, 0.9);
    transform-origin: 4px 0;
    transition:
        transform .5s cubic-bezier(.77, .2, .05, 1),
        background .5s cubic-bezier(.77, .2, .05, 1),
        opacity .3s ease,
        box-shadow .3s ease;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.20) inset,
        0 -1px 0 rgba(0, 0, 0, 0.14) inset,
        0 3px 0 #3b281c,
        0 6px 12px rgba(0, 0, 0, 0.22);
}

#menuToggle span:first-child {
    transform-origin: 0 0;
}

#menuToggle span:nth-last-child(2) {
    transform-origin: 0 100%;
}

/* animation croix */
#menuToggle input:checked ~ span {
    transform: rotate(45deg) translate(-2px, -1px);
    background: linear-gradient(to bottom, #6c4c36, #2f1d12);
}

#menuToggle input:checked ~ span:nth-last-child(3) {
    opacity: 0;
    transform: scale(.2);
}

#menuToggle input:checked ~ span:nth-last-child(2) {
    transform: rotate(-45deg);
}

/* ========================= MENU PANEL ========================= */
#menu {
    position: absolute;
    width: clamp(260px, 50vw, 900px);
    max-height: 90vh;
    margin: -100px 0 0 -50px;
    padding: 24px 20px 20px 80px;
    overflow-y: auto;
    list-style: none;
    background: linear-gradient(to bottom, rgba(255, 250, 244, 0.97), rgba(228, 203, 171, 0.92));
    border-radius: 42px;
    border: 1px solid rgba(98, 58, 28, 0.28);
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.55) inset,
        0 -2px 0 rgba(120, 70, 30, 0.10) inset,
        0 6px 0 rgba(120, 70, 30, 0.22),
        0 12px 22px rgba(0, 0, 0, 0.22);
    transform: translateX(-100%);
    transform-origin: 0 0;
    transition: transform .5s cubic-bezier(.77, .2, .05, 1);
    -webkit-font-smoothing: antialiased;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#menu::-webkit-scrollbar {
    display: none;
}

#menuToggle input:checked ~ ul {
    transform: none;
}

/* ========================= TYPO / LIENS ========================= */
#menu li {
    padding: 10px 0;
    font-size: clamp(18px, 5vw, 32px);
    border-bottom: 1px solid rgba(74, 36, 17, 0.10);
}

#menu a {
    display: block;
    text-decoration: none;
    color: #4a2411;
    font-family: "texte";
    transition: all .2s ease;
}

#menu a:hover {
    color: #6b2f12;
    transform: translateX(5px);
}

/* ========================= STRUCTURE UX ========================= */
.menu-player {
    font-size: clamp(14px, 3vw, 20px);
    font-weight: bold;
    color: #4a2411;
    margin-bottom: 10px;
}

.menu-home {
    font-weight: normal;
    font-size: clamp(22px, 5vw, 36px);
    margin-bottom: 10px;
}

/* catégories */
.menu-category {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
    padding: 10px 12px;
    font-family: "titres";
    letter-spacing: 1px;
    color: #4a2411;
    text-transform: capitalize;
    background: linear-gradient(to bottom, rgba(255, 248, 238, 0.94), rgba(235, 214, 186, 0.88));
    border-radius: 18px;
    border: 1px solid rgba(98, 58, 28, 0.22);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.45) inset,
        0 -1px 0 rgba(120, 70, 30, 0.08) inset,
        0 4px 0 rgba(120, 70, 30, 0.14),
        0 8px 14px rgba(0, 0, 0, 0.12);
}

/* ========================= LOCK SYSTEM ========================= */
.locked {
    opacity: .5;
}

.locked a {
    pointer-events: none;
}

.unlock {
    display: block;
    font-size: clamp(12px, 3vw, 16px);
    margin-left: 10px;
    color: #7b6248;
}

/* ========================= GRID (VIGNETTES) ========================= */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 12px;
    margin-bottom: 10px;
}

.menu-grid li {
    list-style: none;
    border: none;
    padding: 0;
}

/* tuiles */
.menu-grid a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 90px;
    border-radius: 16px;
    background: linear-gradient(to bottom, rgba(255, 250, 244, 0.95), rgba(236, 220, 199, 0.88));
    color: #4a2411;
    border: 1px solid rgba(110, 70, 35, 0.18);
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.50) inset,
        0 -2px 0 rgba(120, 70, 30, 0.08) inset,
        0 4px 0 rgba(120, 70, 30, 0.16),
        0 8px 14px rgba(0, 0, 0, 0.12);
    transition: all .2s ease;
}

.menu-grid a:hover {
    background: linear-gradient(to bottom, #8b6b4e, #5a3f2c);
    color: #fff8ef;
    border-color: #3d2a1d;
    transform: translateY(2px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.14) inset,
        0 -2px 0 rgba(0, 0, 0, 0.18) inset,
        0 2px 0 #3b281c,
        0 6px 10px rgba(0, 0, 0, 0.18);
}

.menu-grid span {
    font-size: 12px;
    margin-top: 5px;
}

.menu-grid .locked a {
    opacity: .4;
}

.menu-category {
    cursor: pointer;
    font-size: clamp(40px, 8vw, 62px) !important;
    line-height: 1;
    padding: 14px 18px;
    transition: transform .2s ease, box-shadow .25s ease;
}

.menu-category:hover {
    transform: translateY(1px);
}

.menu-section-item {
    overflow: hidden;
    max-height: 200px;
    opacity: 1;
    transition:
        max-height .35s ease,
        opacity .25s ease,
        padding-top .35s ease,
        padding-bottom .35s ease,
        margin-top .35s ease,
        margin-bottom .35s ease,
        border-color .25s ease;
}

.menu-section-item.is-hidden {
    max-height: 0 !important;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-width: 0 !important;
    pointer-events: none;
}