/* =========================================================
   FRONT – MENU (Menu A)
   Fichier : /assets/css/front/front-menu.css
========================================================= */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1200;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.10);
}

body {
    padding-top: 60px;
}

.site-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-brand a {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
}

.site-brand img {
    display: block;
    height: 32px;
    width: auto;
}

/* Toggle (checkbox) */
.nav-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nav-burger {
    display: none;              /* ✅ caché en desktop */
    width: 42px;
    height: 38px;

    /* style bouton */
    background: #111;
    border: 1px solid #111;
    border-radius: 12px;
    cursor: pointer;

    /* layout (OK même si display:none) */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}


/* Traits du burger */
.nav-burger span {
    width: 18px;
    height: 2px;
    background: #fff;      /* 🔴 TEXTE/TRAITS BLANCS */
    border-radius: 2px;
}


.site-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-links a {
    text-decoration: none;
    color: inherit;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.site-links a:hover {
    background: rgba(0,0,0,.04);
}

.site-links a.is-active {
    background: rgba(0,0,0,.06);
    font-weight: 600;
}

.site-links a.has-photos {
    font-weight: 700;
    color: #8a1523;
    background: linear-gradient(135deg, rgba(207, 46, 46, .12), rgba(255, 170, 0, .14));
    border: 1px solid rgba(207, 46, 46, .20);
}

.site-links .cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #cf2e2e, #ff8a00);
    box-shadow: 0 4px 10px rgba(207, 46, 46, .35);
}

.site-links a.has-photos:hover {
    background: linear-gradient(135deg, rgba(207, 46, 46, .18), rgba(255, 170, 0, .22));
}

.cart-float-btn {
    position: fixed;
    right: 12px;
    top: 40%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 1px solid #dbe4ee;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
    z-index: 1180;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.cart-float-btn:hover {
    transform: translateY(-50%) translateX(-2px);
    border-color: rgba(207, 46, 46, .28);
    background: linear-gradient(180deg, #fff 0%, #fff7ed 100%);
    box-shadow: 0 14px 30px rgba(207, 46, 46, 0.18);
}

.cart-float-btn:focus-visible {
    outline: 2px solid #0ea5b7;
    outline-offset: 2px;
}

.cart-float-btn.has-photos {
    border-color: rgba(207, 46, 46, .32);
}

.cart-float-btn__badge {
    position: absolute;
    top: -6px;
    right: -6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #cf2e2e, #ff8a00);
    box-shadow: 0 4px 10px rgba(207, 46, 46, .35);
}

/* Responsive */
@media (max-width: 820px) {
    .nav-burger {
        display: inline-flex;
    }

    .site-links {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: #fff;
        border-bottom: 1px solid rgba(0,0,0,.10);
        padding: 10px 20px 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .nav-toggle:checked ~ .site-links {
        display: flex;
    }

    .site-links a {
        width: 100%;
        padding: 10px 12px;
    }

    .cart-float-btn {
        right: 8px;
        width: 42px;
        height: 42px;
        border-radius: 11px;
    }
}

.cart-preview-modal {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.cart-preview-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cart-preview-panel {
    position: fixed;
    width: min(360px, calc(100vw - 28px));
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
    transform: translateY(-6px) scale(0.98);
    transform-origin: top center;
    transition: transform 180ms ease, opacity 180ms ease;
    opacity: 0;
}

.cart-preview-modal.is-open .cart-preview-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.cart-preview-panel h2 {
    margin: 0 0 10px;
    font-size: 1rem;
}

.cart-preview-title {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.cart-preview-title strong {
    font-weight: 900;
}

.cart-preview-title-note {
    font-weight: 400;
    color: #64748b;
    font-size: 0.88rem;
}

.cart-preview-separator {
    height: 1px;
    background: #e2e8f0;
    margin: 20px 0 20px;
}

.cart-preview-line,
.cart-preview-empty {
    margin: 0;
    font-size: 0.93rem;
    color: #334155;
}

.cart-preview-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.cart-preview-stats span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.cart-preview-items {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(48vh, 340px);
    overflow: auto;
}

.cart-preview-item {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.cart-preview-thumb {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 8px;
    overflow: hidden;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 1.1rem;
}

.cart-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-preview-item-main {
    flex: 1 1 auto;
    min-width: 0;
}

.cart-preview-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.cart-preview-item-photo {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-preview-item-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

.cart-preview-item-album {
    margin-top: 2px;
    font-size: 0.78rem;
    color: #475569;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-preview-item-meta {
    margin-top: 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cart-preview-item-label {
    font-size: 0.83rem;
    color: #0f172a;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-preview-item-unit-price {
    font-size: 0.8rem;
    color: #ca0b8d;

    padding: 2px 8px;
    white-space: nowrap;
}

.cart-preview-line + .cart-preview-line {
    margin-top: 6px;
}

.cart-preview-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.cart-preview-actions {
    margin-top: 14px;
}

.cart-preview-go {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    border-radius: 10px;
    background: #0ea5b7;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid #0ea5b7;
}

.cart-preview-go:hover {
    background: #0b8fa0;
    border-color: #0b8fa0;
    text-decoration: none;
}

.cart-preview-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid #dbe4ee;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    transition: background 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.cart-preview-close:hover {
    background: #eef2f7;
    color: #0f172a;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
}

.cart-preview-close:active {
    transform: translateY(0);
}

.cart-preview-close:focus-visible {
    outline: 2px solid #0ea5b7;
    outline-offset: 2px;
}

.cart-preview-close-icon {
    position: relative;
    width: 14px;
    height: 14px;
    display: block;
}

.cart-preview-close-icon::before,
.cart-preview-close-icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
}

.cart-preview-close-icon::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.cart-preview-close-icon::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
