/* =====================================================================
   Viple / Livria — shell standalone (header, footer, LivriaID, admin).
   S'appuie sur les tokens de livria.css (.lv) et du thème .theme-livria.
   ===================================================================== */
html.theme-livria, .theme-livria {
    --theme-primary: #6D28D9;
    --theme-primary-rgb: 109, 40, 217;
    --theme-primary-light: #F3E8FF;
    --theme-primary-dark: #5B21B6;
    --theme-accent: #ff7096;
    --theme-accent-rgb: 255, 112, 150;
}
html, body {
    margin: 0;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #1d1533;
    background-color: #FAF6F0;
    background: #FAF6F0;
}
a { color: var(--theme-primary); }
button { font: inherit; cursor: pointer; }
.lv-primary-btn, .lv-ghost-btn { border-radius: 999px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.lv-primary-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------------------------------------------------------------- Header */
.vp-header {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1.5rem;
    padding: .75rem clamp(1rem, 4vw, 3rem); background: #FFFFFF; backdrop-filter: blur(12px);
    border-bottom: 1px solid #EAE2D6;
    box-shadow: 0 4px 20px -2px rgba(28, 25, 23, 0.05);
}
.vp-brand { display: inline-flex; align-items: baseline; gap: .4rem; text-decoration: none; font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.vp-brand__group { color: #1d1533; letter-spacing: .02em; }
.vp-brand__sep { color: #b9b0d4; font-weight: 400; }
.vp-brand__app { background: linear-gradient(135deg, var(--theme-primary), var(--theme-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vp-nav { display: flex; gap: .25rem; flex: 1; overflow-x: auto; }
.vp-nav a { padding: .5rem .9rem; border-radius: 999px; color: #374151; font-weight: 600; text-decoration: none; white-space: nowrap; transition: all .2s; }
.vp-nav a:hover { color: #6D28D9; background: var(--theme-primary-light); }
.vp-nav a.active { color: #fff; background: var(--theme-primary); }
.vp-actions { display: flex; align-items: center; gap: .6rem; }
.vp-pill { padding: .5rem 1rem !important; font-size: .9rem; }
.vp-icon { position: relative; font-size: 1.25rem; text-decoration: none; padding: .35rem; }
.vp-icon .lv-count { position: absolute; top: -4px; right: -8px; }
.vp-menu { position: relative; }
.vp-menu summary { list-style: none; display: flex; align-items: center; gap: .5rem; cursor: pointer; font-weight: 600; padding: .3rem .6rem .3rem .3rem; border-radius: 999px; border: 1px solid #EAE2D6; background: #fff; }
.vp-menu summary::-webkit-details-marker { display: none; }
.vp-menu__panel { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 220px; background: #fff; border-radius: 16px; box-shadow: 0 20px 50px -20px rgba(75,42,168,.45); border: 1px solid #EAE2D6; padding: .5rem; display: grid; gap: .15rem; animation: lv-rise .2s both; }
.vp-menu__panel a, .vp-menu__panel button { text-align: left; padding: .55rem .75rem; border-radius: 10px; color: #1d1533; text-decoration: none; border: 0; background: none; width: 100%; font-weight: 600; font-size: .9rem; }
.vp-menu__panel a:hover, .vp-menu__panel button:hover { background: var(--theme-primary-light); }
.vp-menu__panel form { margin: 0; border-top: 1px solid #EAE2D6; padding-top: .25rem; }

.vp-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: 1.25rem clamp(1rem, 4vw, 3rem) 5.5rem; color: #6f6787; font-size: .85rem; border-top: 1px solid #EAE2D6; background: #FFFFFF; }
.vp-footer a { color: inherit; display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; transition: color .15s; }
.vp-footer a:hover { color: #6D28D9; }
.vp-footer a svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 820px) {
    .vp-header { flex-wrap: wrap; gap: .6rem; }
    .vp-nav { order: 3; flex-basis: 100%; }
    .vp-menu summary { font-size: 0; gap: 0; }
}

/* ---------------------------------------------------------------- Utilitaires */
.lv-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.lv-page-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.lv-page-head p { color: var(--lv-muted); }
.lv-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.lv-spacer { flex: 1; }
.lv-success { color: #1a9a5b; font-weight: 600; }
.lv-muted { color: var(--lv-muted); }
.lv-split { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .lv-split { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Hero Banner & 4 Quick-Access Cards */
.lv-banner {
    border-radius: 28px;
    padding: clamp(1.75rem, 5vw, 3.25rem);
    margin-bottom: 2rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #4C1D95 0%, #6D28D9 55%, #EC4899 100%);
    box-shadow: 0 24px 50px -24px rgba(76, 29, 149, 0.55);
    animation: lv-rise .5s both;
}
.lv-banner h1 { font-size: clamp(2rem, 5vw, 3.1rem); max-width: 18ch; line-height: 1.1; position: relative; z-index: 2; }
.lv-banner p { max-width: 52ch; opacity: .92; font-size: 1.05rem; margin: 1rem 0 1.5rem !important; position: relative; z-index: 2; }
.lv-banner .lv-row { position: relative; z-index: 2; }
.lv-banner .lv-ghost-btn { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.4); }
.lv-banner .lv-ghost-btn:hover { background: rgba(255,255,255,.25); color: #fff; border-color: #fff; }
.lv-banner__dark-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
}
.lv-dark-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #FFFFFF;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
    transition: background .2s, border-color .2s, transform .15s;
}
.lv-dark-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}
.lv-dark-toggle-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.85;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.lv-banner__deco {
    position: absolute;
    right: 1.5rem;
    bottom: -0.75rem;
    width: clamp(140px, 20vw, 220px);
    height: auto;
    opacity: .22;
    transform: rotate(-8deg);
    pointer-events: none;
    z-index: 1;
}

.lv-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}
@media (max-width: 980px) {
    .lv-features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .lv-features { grid-template-columns: 1fr; }
}
.lv-feature {
    padding: 1.25rem;
    border-radius: var(--lv-radius);
    background: #FFFFFF;
    border: 1px solid #EAE2D6;
    box-shadow: 0 4px 20px -2px rgba(28, 25, 23, 0.05);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.lv-feature:hover {
    transform: translateY(-3px);
    border-color: #D8CBB8;
    box-shadow: 0 10px 26px -8px rgba(28, 25, 23, 0.09);
}
.lv-feature__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #F3E8FF;
    color: #6D28D9;
    display: inline-grid;
    place-items: center;
    margin-bottom: .6rem;
    flex-shrink: 0;
}
.lv-feature__icon svg {
    width: 20px;
    height: 20px;
    stroke: #6D28D9;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.lv-feature h3 { margin: .25rem 0 .25rem !important; font-size: 1.05rem; color: #1C1917; }
.lv-feature p { color: var(--lv-muted); font-size: .9rem; line-height: 1.45; }

/* ---------------------------------------------------------------- Livre détail (3 colonnes Desktop) */
.lv-detail-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}
.lv-back-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.48rem 1rem;
    border-radius: 999px;
    background: #FFFFFF;
    border: 1px solid #EAE2D6;
    color: #1C1917;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(28, 25, 23, 0.04);
    transition: background-color 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
}
.lv-back-pill:hover {
    background: #F5F3FF;
    border-color: #DDD6FE;
    color: #6D28D9;
    transform: translateX(-2px);
}
.lv-back-pill svg {
    flex-shrink: 0;
}

.lv-referral-banner {
    margin-bottom: 0.85rem;
    padding: 12px 16px;
    border-radius: 14px;
    background: #F5F3FF;
    border: 1px solid #DDD6FE;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.lv-referral-banner__text {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #4C1D95;
}
.lv-referral-banner__text svg {
    color: #6D28D9;
    flex-shrink: 0;
}
.lv-referral-banner__link {
    font-size: 0.82rem;
    font-weight: 800;
    color: #6D28D9;
    text-decoration: none;
    white-space: nowrap;
}
.lv-referral-banner__link:hover {
    text-decoration: underline;
}

.lv-detail {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 320px;
    gap: 2rem;
    align-items: start;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1.75rem !important;
    background: #FFFFFF;
    border: 1px solid #EAE2D6;
    border-radius: 22px;
    box-shadow: 0 4px 20px -2px rgba(28, 25, 23, 0.05);
}
.lv-detail:hover {
    transform: none !important;
}

/* Colonne Gauche (260px) */
.lv-detail__left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}
.lv-detail__cover {
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    overflow: hidden;
    background: #FAF6F0;
    border: 1px solid #EAE2D6;
    display: grid;
    place-items: center;
    color: #6D28D9;
    box-shadow: 0 18px 36px -10px rgba(28, 25, 23, 0.22), 0 4px 12px -2px rgba(28, 25, 23, 0.10);
    max-width: 100%;
}
.lv-detail__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.lv-detail__cover-placeholder {
    display: inline-grid;
    place-items: center;
    color: #6D28D9;
    opacity: 0.65;
}

.lv-detail__shelf-card {
    background: #FAF6F0;
    border: 1px solid #EAE2D6;
    border-radius: 14px;
    padding: 0.7rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.lv-detail__shelf-title {
    font-size: 0.73rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #57534E;
}
.lv-shelf-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    background: #FFFFFF;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid #EAE2D6;
}
.lv-shelf-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 7px 4px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #57534E;
    font-size: 0.73rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.16s, color 0.16s, box-shadow 0.16s;
    white-space: nowrap;
}
.lv-shelf-pill:hover {
    background: #F5F3FF;
    color: #6D28D9;
}
.lv-shelf-pill.active {
    background: #6D28D9;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(109, 40, 217, 0.25);
}

/* Colonne Centrale (flex: 1) */
.lv-detail__center {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    min-width: 0;
    max-width: 100%;
}
.lv-detail__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.lv-detail__badges .lv-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.25;
    border: 1px solid transparent;
}
.lv-badge-pill--genre {
    background: #F5F3FF;
    color: #6D28D9;
    border-color: #DDD6FE !important;
}
.lv-badge-pill--new {
    background: #ECFDF5;
    color: #047857;
    border-color: #A7F3D0 !important;
}
.lv-badge-pill--used {
    background: #FFFBEB;
    color: #B45309;
    border-color: #FDE68A !important;
}
.lv-badge-pill--mood {
    background: #F5F3FF;
    color: #6D28D9;
    border-color: #DDD6FE !important;
}
.lv-badge-pill--country {
    background: #FAF6F0;
    color: #57534E;
    border-color: #EAE2D6 !important;
}
.lv-badge-pill--trust {
    background: #F0FDF4;
    color: #166534;
    border-color: #BBF7D0 !important;
}
.lv-badge-pill--cashback {
    background: #FFFBEB;
    color: #B45309;
    border-color: #FDE68A !important;
}

.lv-detail__title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: #1C1917;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0;
    word-break: break-word;
}
.lv-detail__author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.lv-detail__author-text {
    font-size: 0.96rem;
    color: #57534E;
}
.lv-detail__author-text strong {
    color: #1C1917;
    font-weight: 700;
}
.lv-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 11px;
    font-size: 0.76rem;
    font-weight: 700;
    border-radius: 999px;
    border: 1px solid #EAE2D6;
    background: #FAF6F0;
    color: #1C1917;
    cursor: pointer;
    transition: all 0.16s;
}
.lv-follow-btn:hover {
    background: #F5F3FF;
    border-color: #DDD6FE;
    color: #6D28D9;
}
.lv-follow-btn.is-following {
    background: #F5F3FF;
    border-color: #C4B5FD;
    color: #6D28D9;
}

.lv-detail__desc {
    margin: 0;
    color: #374151;
    font-size: 0.96rem;
    line-height: 1.68;
    word-break: break-word;
}

.lv-detail__tw {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #B45309;
}
.lv-detail__tw svg {
    flex-shrink: 0;
    margin-top: 2px;
}
.lv-detail__ai {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #F5F3FF;
    border: 1px solid #DDD6FE;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #4C1D95;
}
.lv-detail__ai svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #6D28D9;
}

/* Bande-son d'ambiance */
.lv-ambient-box {
    background: #FAF6F0;
    border: 1px solid #EAE2D6;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.lv-ambient-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.lv-ambient-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #F5F3FF;
    color: #6D28D9;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
}
.lv-ambient-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.lv-ambient-text strong {
    font-size: 0.85rem;
    color: #1C1917;
}
.lv-ambient-status {
    font-size: 0.74rem;
    color: #57534E;
    font-weight: 600;
}
.lv-ambient-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}
.lv-ambient-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.79rem;
    font-weight: 700;
    border-radius: 999px;
    background: #FFFFFF;
    color: #1C1917;
    border: 1px solid #EAE2D6;
    cursor: pointer;
    transition: all 0.16s;
}
.lv-ambient-btn:hover {
    background: #F5F3FF;
    border-color: #DDD6FE;
    color: #6D28D9;
}
.lv-ambient-btn.active {
    background: #6D28D9 !important;
    color: #FFFFFF !important;
    border-color: #6D28D9 !important;
    box-shadow: 0 2px 8px rgba(109, 40, 217, 0.25);
}
.lv-ambient-btn.stop {
    padding: 6px 8px;
    background: #FEF2F2 !important;
    color: #DC2626 !important;
    border-color: #FECACA !important;
}

/* Bloc Impact Éco-Circulaire / Circuit court */
.lv-eco-box {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.lv-eco-box__main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 240px;
    min-width: 0;
}
.lv-eco-box__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #DCFCE7;
    color: #15803D;
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
}
.lv-eco-box__title {
    display: block;
    color: #166534;
    font-size: 0.88rem;
    font-weight: 800;
}
.lv-eco-box__sub {
    font-size: 0.76rem;
    color: #15803D;
    margin-top: 2px;
    line-height: 1.35;
}
.lv-eco-box__badge {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    background: #DCFCE7;
    color: #166534;
    white-space: nowrap;
}

/* Métadonnées techniques regroupées en bas */
.lv-detail__tech-meta {
    margin-top: 0.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid #EAE2D6;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    font-size: 0.79rem;
    color: #57534E;
}
.lv-detail__tech-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.lv-detail__tech-item strong {
    color: #1C1917;
    font-weight: 700;
}
.lv-detail__tech-sep {
    color: #D6CFC2;
}

/* Colonne Droite "Buy Box" (320px) */
.lv-detail__buybox {
    background: #FAF6F0;
    border: 1px solid #EAE2D6;
    border-radius: 18px;
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    box-shadow: 0 4px 20px -2px rgba(28, 25, 23, 0.04);
    box-sizing: border-box;
}
.lv-buybox__label {
    font-size: 0.76rem;
    font-weight: 700;
    color: #57534E;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.lv-buybox__cond-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.lv-buybox__cond-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}
.lv-buybox__cond-badge--new {
    background: #DCFCE7;
    color: #166534;
    border: 1px solid #BBF7D0;
}
.lv-buybox__cond-badge--used {
    background: #FEF3C7;
    color: #B45309;
    border: 1px solid #FDE68A;
}
.lv-buybox__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #16A34A;
}

.lv-buybox__cond-selector {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.lv-buybox__cond-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.lv-buybox__cond-opt {
    text-align: left;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1.5px solid #EAE2D6;
    background: #FFFFFF;
    cursor: pointer;
    transition: all 0.16s;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.lv-buybox__cond-opt.is-selected {
    border-color: #6D28D9;
    background: #F5F3FF;
    box-shadow: 0 2px 8px rgba(109, 40, 217, 0.12);
}
.lv-buybox__cond-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}
.lv-buybox__cond-name {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #1C1917;
}
.lv-buybox__cond-top strong {
    font-size: 0.92rem;
    color: #6D28D9;
}
.lv-buybox__cond-opt small {
    font-size: 0.7rem;
    color: #57534E;
}

.lv-buybox__price-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.2rem 0;
}
.lv-buybox__price-line {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.lv-buybox__price {
    font-size: 2.15rem;
    font-weight: 800;
    color: #1C1917;
    letter-spacing: -0.03em;
    line-height: 1.05;
}
.lv-buybox__old-price {
    font-size: 0.95rem;
    color: #78716C;
}
.lv-buybox__tax-note {
    font-size: 0.74rem;
    color: #57534E;
}

.lv-buybox__delay-notice {
    background: #FFF7ED;
    border: 1px solid #FDBA74;
    border-radius: 12px;
    padding: 10px 12px;
    color: #9A3412;
}
.lv-buybox__delay-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 0.84rem;
}
.lv-buybox__delay-notice p {
    margin: 4px 0 0;
    font-size: 0.76rem;
    color: #C2410C;
}

.lv-buybox__stock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    font-weight: 700;
}
.lv-buybox__stock.is-in-stock {
    color: #15803D;
}
.lv-buybox__stock.is-out-of-stock {
    color: #DC2626;
}
.lv-buybox__stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.16);
}
.lv-buybox__stock.is-out-of-stock .lv-buybox__stock-dot {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.16);
}

.lv-buybox__cta {
    width: 100%;
    justify-content: center;
    padding: 0.88rem 1.25rem !important;
    border-radius: 12px !important;
    background: #6D28D9 !important;
    color: #FFFFFF !important;
    font-size: 0.96rem !important;
    font-weight: 800 !important;
    border: 0 !important;
    box-shadow: 0 8px 20px -4px rgba(109, 40, 217, 0.4) !important;
}
.lv-buybox__cta:hover:not(:disabled) {
    background: #5B21B6 !important;
}

.lv-buybox__digital {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lv-buybox__secondary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.lv-buybox__sec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.58rem 0.65rem;
    border-radius: 10px;
    background: #FFFFFF;
    border: 1px solid #EAE2D6;
    color: #1C1917;
    font-size: 0.77rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.16s, border-color 0.16s, color 0.16s;
    white-space: nowrap;
}
.lv-buybox__sec-btn:hover {
    background: #F5F3FF;
    border-color: #DDD6FE;
    color: #6D28D9;
}
.lv-buybox__sec-btn.is-active {
    background: #F5F3FF;
    border-color: #C4B5FD;
    color: #6D28D9;
}
.lv-buybox__sec-btn svg {
    flex-shrink: 0;
}

.lv-buybox__alert-popover {
    background: #FFFFFF;
    border: 1px solid #EAE2D6;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lv-buybox__alert-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #1C1917;
}
.lv-buybox__alert-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.lv-buybox__alert-input-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 85px;
}
.lv-buybox__alert-input-wrap input {
    width: 100%;
    padding: 5px 8px !important;
    font-size: 0.84rem !important;
}
.lv-buybox__alert-submit,
.lv-buybox__alert-cancel {
    padding: 5px 10px !important;
    font-size: 0.78rem !important;
}

.lv-buybox__feedback {
    padding: 8px 12px;
    border-radius: 10px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
}

.lv-buybox__share {
    padding-top: 0.85rem;
    border-top: 1px solid #EAE2D6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.lv-buybox__share-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #57534E;
}
.lv-buybox__share-btns {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.lv-share-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1px solid #EAE2D6;
    color: #57534E;
    display: inline-grid;
    place-items: center;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.16s, border-color 0.16s, color 0.16s, transform 0.15s;
}
.lv-share-circle:hover {
    background: #F5F3FF;
    border-color: #DDD6FE;
    color: #6D28D9;
    transform: translateY(-1px);
}
.lv-share-circle.is-copied {
    background: #ECFDF5;
    border-color: #A7F3D0;
    color: #047857;
}

/* Responsive Tablet & Mobile : les 3 colonnes s'empilent proprement sans vide */
@media (max-width: 1040px) {
    .lv-detail {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 1.5rem;
    }
    .lv-detail__buybox {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .lv-detail {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 1.15rem !important;
    }
    .lv-detail__left {
        align-items: center;
    }
    .lv-detail__cover {
        width: 180px;
        max-width: 180px;
        margin: 0 auto;
    }
    .lv-detail__shelf-card {
        width: 100%;
        box-sizing: border-box;
    }
    .lv-detail__title {
        font-size: 1.45rem;
    }
    .lv-ambient-box {
        flex-direction: column;
        align-items: stretch;
    }
    .lv-ambient-actions {
        width: 100%;
    }
    .lv-ambient-actions .lv-ambient-btn {
        flex: 1 1 auto;
        justify-content: center;
    }
    .lv-buybox__secondary-actions {
        grid-template-columns: 1fr;
    }
}

.dark-mode .lv-detail__shelf-card,
.dark-mode .lv-detail__buybox,
.dark-mode .lv-ambient-box {
    background: #1c1829;
    border-color: rgba(124, 77, 255, 0.25);
    color: #f0f0f5;
}
.dark-mode .lv-detail__title,
.dark-mode .lv-buybox__price,
.dark-mode .lv-ambient-text strong,
.dark-mode .lv-detail__author-text strong,
.dark-mode .lv-detail__tech-item strong {
    color: #f0f0f5;
}
.dark-mode .lv-shelf-pills,
.dark-mode .lv-ambient-btn,
.dark-mode .lv-buybox__sec-btn,
.dark-mode .lv-share-circle,
.dark-mode .lv-back-pill {
    background: #252038;
    color: #f0f0f5;
    border-color: rgba(124, 77, 255, 0.3);
}

/* ---------------------------------------------------------------- Panier & Checkout */
.lv-cart {
    padding: 1.5rem;
    border-radius: var(--lv-radius, 20px);
    background: var(--lv-card, #FFFFFF);
    border: 1px solid var(--lv-border, #EAE2D6);
    box-shadow: var(--lv-shadow, 0 4px 20px -2px rgba(28, 25, 23, 0.05));
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.lv-cart__item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 1.15rem;
    padding: 0.9rem 1.1rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--lv-border, #EAE2D6);
    transition: box-shadow .2s, transform .2s;
}
.lv-cart__item:hover {
    box-shadow: 0 10px 26px -14px rgba(28, 25, 23, 0.15);
}
.lv-cart__item .lv-shelf__cover {
    width: 72px !important;
    height: 108px !important;
    max-width: 72px !important;
    max-height: 108px !important;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: #F5EFE6;
    display: grid;
    place-items: center;
    font-size: 1.75rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(29, 21, 51, .12);
    text-decoration: none;
}
.lv-cart__item .lv-shelf__cover img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}
.lv-cart__info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.lv-cart__info h4 {
    font-size: 1.02rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    line-height: 1.3;
}
.lv-cart__info p {
    margin: 0;
    font-size: 0.88rem;
}
.lv-qty {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #f6f3fc;
    border: 1px solid var(--lv-border, #EAE2D6);
    border-radius: 999px;
    padding: 0.25rem 0.35rem;
}
.lv-qty button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    color: var(--lv-ink, #1d1533);
    font-weight: 800;
    font-size: 1rem;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(29, 21, 51, .08);
    transition: background .15s, color .15s, transform .15s;
}
.lv-qty button:hover {
    background: var(--theme-primary, #6D28D9);
    color: #fff;
    transform: scale(1.06);
}
.lv-qty span {
    min-width: 28px;
    text-align: center;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--lv-ink, #1d1533);
}
.lv-cart__line {
    font-size: 1.08rem;
    font-weight: 800;
    color: #6D28D9;
    min-width: 82px;
    text-align: right;
    white-space: nowrap;
}
.lv-cart__item .lv-link-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(225, 29, 72, .2);
    background: #fff1f2;
    color: #e11d48;
    text-decoration: none;
    display: grid;
    place-items: center;
    font-size: 0.9rem;
    font-weight: 800;
    padding: 0;
    transition: all .15s;
}
.lv-cart__item .lv-link-btn:hover {
    background: #e11d48;
    color: #fff;
    border-color: #e11d48;
    transform: scale(1.08);
}
.lv-cart__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.25rem;
    border-radius: 16px;
    background: #F3E8FF;
    border: 1px solid var(--lv-border, #EAE2D6);
    font-size: 1.08rem;
    font-weight: 700;
    margin-top: 0.25rem;
}
.lv-cart__total strong {
    font-size: 1.45rem;
    font-weight: 800;
    color: #6D28D9;
}
@media (max-width: 680px) {
    .lv-cart { padding: 1rem; }
    .lv-cart__item {
        grid-template-columns: 60px minmax(0, 1fr) auto;
        gap: 0.75rem;
        padding: 0.85rem;
    }
    .lv-cart__item .lv-shelf__cover {
        width: 60px !important;
        height: 90px !important;
        max-width: 60px !important;
        max-height: 90px !important;
        grid-row: span 2;
    }
    .lv-cart__info {
        grid-column: 2 / 4;
    }
    .lv-qty {
        grid-column: 2 / 3;
        justify-self: start;
    }
    .lv-cart__line {
        min-width: auto;
    }
}

/* ---------------------------------------------------------------- Tables */
.lv-table-wrap { overflow-x: auto; border-radius: var(--lv-radius); border: 1px solid var(--lv-border); background: #fff; }
.lv-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.lv-table th { text-align: left; padding: .75rem 1rem; color: var(--lv-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; background: var(--theme-primary-light); }
.lv-table td { padding: .7rem 1rem; border-top: 1px solid var(--lv-border); vertical-align: middle; }
.lv-table tr:hover td { background: #fcfbff; }
.lv-table .lv-row { flex-wrap: nowrap; }
.lv-table input, .lv-table select { padding: .35rem .5rem; }
.lv-btn-sm { padding: .35rem .75rem !important; font-size: .8rem !important; }
.lv-danger { color: #d33 !important; border-color: rgba(221,51,51,.35) !important; }
.lv-tag { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; background: #ece7f7; color: var(--lv-muted); }
.lv-tag--ok { background: #e3f7ec; color: #1a9a5b; }
.lv-tag--warn { background: #fff3dc; color: #b7791f; }
.lv-tag--bad { background: #fde6ea; color: #d33; }
.lv-tag--info { background: var(--theme-primary-light); color: var(--theme-primary-dark); }

/* ---------------------------------------------------------------- Messagerie */
.lv-chat { display: grid; grid-template-columns: 300px 1fr; gap: 1rem; min-height: 60vh; }
.lv-chat__list { display: flex; flex-direction: column; gap: .35rem; padding: .5rem; border-radius: var(--lv-radius); background: var(--lv-card); border: 1px solid var(--lv-border); overflow-y: auto; max-height: 70vh; }
.lv-chat__conv { display: flex; gap: .65rem; align-items: center; padding: .65rem; border-radius: 14px; text-decoration: none; color: inherit; }
.lv-chat__conv:hover, .lv-chat__conv.active { background: var(--theme-primary-light); }
.lv-chat__conv small { color: var(--lv-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.lv-chat__thread { display: flex; flex-direction: column; border-radius: var(--lv-radius); background: var(--lv-card); border: 1px solid var(--lv-border); overflow: hidden; }
.lv-chat__head { padding: .9rem 1.1rem; border-bottom: 1px solid var(--lv-border); display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.lv-chat__msgs { flex: 1; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; overflow-y: auto; max-height: 55vh; }
.lv-bubble { max-width: 70%; padding: .6rem .9rem; border-radius: 18px; background: #fff; border: 1px solid var(--lv-border); align-self: flex-start; animation: lv-rise .25s both; white-space: pre-wrap; word-break: break-word; }
.lv-bubble--me { align-self: flex-end; background: var(--theme-primary); color: #fff; border-color: transparent; }
.lv-bubble--staff { background: #fff3dc; }
.lv-bubble small { display: block; opacity: .7; font-size: .7rem; margin-top: .2rem; }
.lv-chat__compose { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--lv-border); }
@media (max-width: 760px) { .lv-chat { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- LivriaID */
.lid { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 2rem 1rem; }
.lid__card { width: min(440px, 100%); padding: 2.25rem; border-radius: 28px; background: #fff; box-shadow: var(--lv-shadow); border: 1px solid var(--lv-border); display: grid; gap: 1rem; animation: lv-rise .45s both; }
.lid__logo { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.35rem; }
.lid__logo b { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--theme-primary), var(--theme-accent)); }
.lid__logo small { display: block; font-size: .75rem; color: var(--lv-muted); font-weight: 600; }
.lid__card form { display: grid; gap: .85rem; }
.lid__card .lv-primary-btn { justify-content: center; width: 100%; padding: .85rem; }
.lid__check { flex-direction: row !important; align-items: center; gap: .5rem !important; }
.lid__check input { width: auto; }
.lid__foot { text-align: center; color: var(--lv-muted); font-size: .9rem; }

/* ---------------------------------------------------------------- Admin */
.lva { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.lva-side { position: sticky; top: 0; height: 100vh; height: 100dvh; max-height: 100dvh; display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem 1rem; background: #1d1533; color: #fff; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.lva-side .vp-brand__group { color: #fff; }
.lva-side__tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: #b9b0d4; }
.lva-side nav { display: grid; gap: .2rem; }
.lva-side nav a { color: #d8d2ee; text-decoration: none; padding: .65rem .85rem; border-radius: 12px; font-weight: 600; font-size: .92rem; }
.lva-side nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.lva-side nav a.active { background: var(--theme-primary); color: #fff; }
.lva-side__back { margin-top: auto; color: #b9b0d4; text-decoration: none; font-size: .85rem; }
.lva-main { min-height: 100vh; }
.lva-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.lva-kpi { padding: 1.1rem 1.25rem; border-radius: var(--lv-radius); background: #fff; border: 1px solid var(--lv-border); box-shadow: var(--lv-shadow); text-decoration: none; color: inherit; animation: lv-rise .4s both; }
.lva-kpi strong { display: block; font-size: 1.8rem; color: var(--theme-primary); }
.lva-kpi span { color: var(--lv-muted); font-size: .85rem; }
.lv-kpi--alert strong, .lva-kpi--alert strong { color: var(--theme-accent); }
@media (max-width: 860px) {
    .lva { grid-template-columns: 1fr; }
}

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; padding: .75rem 1.25rem; background: #fff3dc; z-index: 100; box-shadow: 0 -4px 20px rgba(0,0,0,.15); }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }
