/* ==========================================================
   MENU LATERAL — le meme que l'application
   Bouton hamburger + volet qui glisse depuis la gauche.
   Les couleurs viennent de theme.css : rien n'est ecrit en dur.
   ========================================================== */

.ham {
    width: 40px; height: 40px; border-radius: 50%; flex: none;
    background: rgba(8, 8, 10, .5); border: 1px solid var(--line-2); color: var(--text);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: transform .25s var(--snap), border-color .25s, color .25s;
}
.ham:hover { border-color: var(--accent-line); color: var(--accent); }
.ham:active { transform: scale(.88); }
.ham svg { width: 19px; height: 19px; }

/* Pages sans barre du haut (compte, garage, formules) : le bouton flotte. */
.ham.floating {
    position: fixed; z-index: var(--z-nav);
    top: calc(14px + var(--sat));
    left: calc(14px + var(--sal));
    background: var(--card-2);
}

.gd-scrim {
    position: fixed; inset: 0; z-index: var(--z-sheet);
    background: rgba(0, 0, 0, .55);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.gd-scrim.open { opacity: 1; pointer-events: auto; }

.gd {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: calc(var(--z-sheet) + 1);
    width: 312px; max-width: 86vw;
    background: var(--bg-2); border-right: 1px solid var(--line);
    box-shadow: var(--sh-3);
    transform: translateX(-102%); transition: transform .34s var(--spring);
    display: flex; flex-direction: column;
    padding: calc(14px + var(--sat)) 0 calc(10px + var(--sab));
    overflow-y: auto; overscroll-behavior: contain;
}
.gd.open { transform: none; }

.gd-head { display: flex; align-items: center; gap: 12px; padding: 8px 20px 6px; }
.gd-mark {
    width: 42px; height: 42px; border-radius: 12px; flex: none;
    background: var(--leather); display: flex; align-items: center; justify-content: center;
    color: #fff;
}
.gd-mark svg { width: 22px; height: 22px; }
.gd-head b { font-size: 17px; font-weight: 800; letter-spacing: -.3px; display: block; }
.gd-head span {
    display: block; font-size: 12px; color: var(--muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px;
}

/* Pastille de formule : Pro (garage) · 3649 j */
.gd-plan {
    display: flex; align-items: center; gap: 8px; margin: 10px 20px 2px;
    text-decoration: none; color: inherit;
}
.gd-pill {
    padding: 6px 12px; border-radius: 100px; font-size: 12.5px; font-weight: 700;
    border: 1px solid; white-space: nowrap;
}
.gd-pill.free { color: var(--silver-3); border-color: var(--silver-3); background: rgba(110,116,122,.16); }
.gd-pill.premium { color: var(--silver); border-color: var(--silver-3); background: rgba(201,206,212,.14); }
.gd-pill.pro { color: var(--accent); border-color: var(--accent-line); background: var(--accent-tint); }
.gd-plan .chev { margin-left: auto; color: var(--silver-3); display: flex; }

/* Les deux onglets : Personnel / Atelier */
.gd-tabs {
    display: flex; gap: 4px; margin: 12px 20px 2px; padding: 4px;
    background: var(--card-2); border: 1px solid var(--line); border-radius: 100px;
}
.gd-tab {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 4px; border: none; background: transparent; cursor: pointer;
    border-radius: 100px; font-family: inherit; font-size: 13px; font-weight: 700;
    color: var(--silver-2); text-decoration: none; transition: background .18s, color .18s;
}
.gd-tab svg { width: 16px; height: 16px; }
.gd-tab.on { background: var(--leather); color: #fff; }

.gd-rule { height: 1px; margin: 12px 20px; background: var(--trim); opacity: .7; }
.gd-title {
    padding: 8px 20px 4px; font-size: 11px; letter-spacing: 1.2px;
    font-weight: 700; color: var(--muted); text-transform: uppercase;
}

.gd-item {
    width: 100%; display: flex; align-items: center; gap: 14px;
    padding: 13px 20px; background: transparent; border: none; cursor: pointer;
    font-family: inherit; font-size: 14.5px; font-weight: 600; color: var(--text);
    text-align: left; text-decoration: none;
    transition: background .16s, padding-left .22s var(--spring);
}
.gd-item:hover { background: var(--card); padding-left: 25px; }
.gd-item svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.gd-item small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.gd-item.accent { color: var(--accent); }
/* Sous-entree d'une rubrique (les pages du stock) : en retrait, plus discrete. */
.gd-item.gd-sub {
    padding: 9px 20px 9px 54px; font-size: 13.5px; font-weight: 600; color: var(--muted);
    position: relative;
}
.gd-item.gd-sub::before {
    content: ''; position: absolute; left: 29px; top: 0; bottom: 0; width: 1px;
    background: var(--line);
}
.gd-item.gd-sub:hover { color: var(--text); padding-left: 57px; }
.gd-subs { display: none; }
.gd-subs.open { display: block; }
.gd-caret { margin-left: auto; display: flex; align-items: center; justify-content: center;
            width: 26px; height: 26px; border-radius: 8px; color: var(--muted); }
.gd-caret svg { width: 15px; height: 15px; transition: transform .18s; }
.gd-caret.open svg { transform: rotate(90deg); }
.gd-caret:hover { background: var(--card); color: var(--text); }
.gd-item.gd-sub small { display: inline; }
.gd-item.danger { color: var(--bad); }
.gd-item.on { color: var(--accent); }
.gd-item .dot { width: 18px; display: flex; justify-content: center; }
.gd-item .dot i {
    width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--silver-3); display: block;
}
.gd-item.on .dot i { border-color: var(--accent); background: var(--accent); }

.gd-side { display: none; }
.gd-side.on { display: block; }

@media (max-width: 420px) {
    .gd { width: 300px; }
}


/* Notifications : pastille rouge (bouton menu, cloche de l'atelier, menu) */
.ham { position: relative; }
.ham.floating { position: fixed; }
.ntf-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 99px; background: var(--accent); color: #fff; font: 800 10.5px/18px var(--f-display);
    text-align: center; box-shadow: 0 0 0 2px var(--bg); pointer-events: none; }
.ntf-badge[hidden] { display: none; }
.ntf-badge.inline { position: static; display: inline-block; margin-left: auto; box-shadow: none; }
.ntf-badge.bump { animation: ntfBump .5s var(--snap); }
@keyframes ntfBump { 40% { transform: scale(1.35); } }
.gd-item[hidden] { display: none; }
