/* ================================================================
   VISION CANVAS — Mur des Secrets
   Styles isolés — n'affecte pas le reste du site
   ================================================================ */

:root {
    --v-gold:    #c8aa6e;
    --v-gold2:   #f0c040;
    --v-blue:    #0bc4e3;
    --v-purple:  #8b5cf6;
    --v-bg:      #010a13;
    --v-bg2:     #0a1628;
    --v-bg3:     #0d1b2a;
    --v-border:  #1e3a5f;
    --v-text:    #c8d6e0;
    --v-muted:   #4a6075;
}

/* ── Reset body ─────────────────────────────────────────────────── */
.vision-body {
    margin: 0;
    padding: 0;
    background: var(--v-bg);
    color: var(--v-text);
    font-family: 'Inter', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
html { height: 100%; }

/* ── Particules de fond ─────────────────────────────────────────── */
.v-bg-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 60% 40% at 20% 50%, rgba(11,196,227,.04) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 80% 30%, rgba(139,92,246,.05) 0%, transparent 70%),
        radial-gradient(ellipse 80% 80% at 50% 100%, rgba(200,170,110,.03) 0%, transparent 60%);
}

/* ── Header ─────────────────────────────────────────────────────── */
.v-header {
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(30,58,95,.6);
    background: rgba(1,10,19,.85);
    backdrop-filter: blur(12px);
}

.v-logo {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
}

.v-logo-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(200,170,110,.5));
}

.v-logo-text {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--v-gold);
    letter-spacing: .5px;
}

.v-logo-sub {
    font-size: .65rem;
    color: var(--v-muted);
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.v-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.v-potion-badge {
    display: flex;
    align-items: center;
    gap: .4rem;
    background: rgba(139,92,246,.12);
    border: 1px solid rgba(139,92,246,.3);
    border-radius: 20px;
    padding: .35rem .9rem;
    font-size: .82rem;
    font-weight: 700;
    color: #a78bfa;
    cursor: default;
    transition: all .2s;
}

.v-potion-badge:hover {
    background: rgba(139,92,246,.2);
    border-color: rgba(139,92,246,.5);
}

.v-btn-shop {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem 1rem;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff;
    border: 1px solid rgba(139,92,246,.4);
    transition: all .2s;
    box-shadow: 0 0 16px rgba(139,92,246,.3);
}

.v-btn-shop:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(139,92,246,.5);
}

.v-btn-back {
    color: var(--v-muted);
    text-decoration: none;
    font-size: .8rem;
    display: flex;
    align-items: center;
    gap: .3rem;
    transition: color .15s;
}

.v-btn-back:hover { color: var(--v-gold); }

/* ── Barre de progression ───────────────────────────────────────── */
.v-progress-bar {
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    padding: .6rem 1.5rem;
    background: rgba(10,22,40,.9);
    border-bottom: 1px solid rgba(30,58,95,.4);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.v-progress-label {
    font-size: .75rem;
    color: var(--v-muted);
    white-space: nowrap;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.v-progress-track {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,.06);
    border-radius: 6px;
    overflow: hidden;
    min-width: 100px;
}

.v-progress-fill {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--v-blue), var(--v-purple), var(--v-gold));
    background-size: 200% 100%;
    animation: v-shimmer 3s linear infinite;
    transition: width .8s ease;
    box-shadow: 0 0 8px rgba(11,196,227,.4);
}

@keyframes v-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.v-progress-pct {
    font-size: .82rem;
    font-weight: 800;
    color: var(--v-gold);
    white-space: nowrap;
}

.v-progress-count {
    font-size: .72rem;
    color: var(--v-muted);
    white-space: nowrap;
}

/* ── Layout principal ───────────────────────────────────────────── */
.v-main {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 0;
    flex: 1;
    min-height: 0;
    padding-bottom: 44px; /* bandeau fixe bas */
}

@media (max-width: 900px) {
    .v-main { grid-template-columns: 1fr; height: auto; }
}

/* ── Zone canvas ─────────────────────────────────────────────────── */
.v-canvas-zone {
    overflow: hidden;
    position: relative;
    padding: 8px;
    height: 100%;
}

/* Le wrap est positionné en absolu — le JS gère le centrage et le zoom */
.v-canvas-wrap {
    position: absolute !important;
    transform-origin: 0 0;
}

/* ── Contrôles zoom ──────────────────────────────────────────────── */
.v-zoom-controls {
    position: fixed;
    bottom: 3.5rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: .3rem;
    background: rgba(10,22,40,.85);
    border: 1px solid rgba(30,58,95,.6);
    border-radius: 8px;
    padding: .3rem .4rem;
    backdrop-filter: blur(8px);
    z-index: 30;
}

.v-zoom-btn {
    background: rgba(139,92,246,.15);
    border: 1px solid rgba(139,92,246,.3);
    color: #a78bfa;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    line-height: 1;
}

.v-zoom-btn:hover {
    background: rgba(139,92,246,.3);
    border-color: rgba(139,92,246,.6);
}

.v-zoom-label {
    font-size: .72rem;
    font-weight: 700;
    color: #c8aa6e;
    min-width: 38px;
    text-align: center;
}

.v-zoom-reset {
    color: #4fc3f7;
    border-color: rgba(79,195,247,.3);
    background: rgba(79,195,247,.1);
}

.v-zoom-reset:hover {
    background: rgba(79,195,247,.25);
    border-color: rgba(79,195,247,.6);
}

.v-canvas-wrap {
    cursor: crosshair;
    border-radius: 8px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(200,170,110,.2),
        0 0 40px rgba(11,196,227,.08),
        0 0 80px rgba(139,92,246,.06);
    transition: box-shadow .3s;
    will-change: transform;
}

.v-canvas-wrap:hover {
    box-shadow:
        0 0 0 1px rgba(200,170,110,.4),
        0 0 60px rgba(11,196,227,.15),
        0 0 100px rgba(139,92,246,.1);
}

#vision-canvas {
    display: block;
    image-rendering: pixelated;
}

/* Tooltip survol bloc */
.v-cursor-tip {
    position: fixed;
    background: rgba(10,22,40,.95);
    border: 1px solid rgba(139,92,246,.4);
    border-radius: 6px;
    padding: .35rem .7rem;
    font-size: .72rem;
    color: #a78bfa;
    font-weight: 700;
    pointer-events: none;
    z-index: 999;
    display: none;
    white-space: nowrap;
}

/* Flash de révélation */
@keyframes v-reveal-flash {
    0%   { box-shadow: 0 0 0 1px rgba(200,170,110,.4), 0 0 80px rgba(11,196,227,.5); }
    100% { box-shadow: 0 0 0 1px rgba(200,170,110,.2), 0 0 40px rgba(11,196,227,.08); }
}

.v-canvas-wrap.revealed {
    animation: v-reveal-flash .6s ease forwards;
}

/* ── Message "pas de potions" ────────────────────────────────────── */
.v-no-potions {
    position: absolute;
    inset: 0;
    background: rgba(1,10,19,.85);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    z-index: 20;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}

.v-no-potions.show {
    opacity: 1;
    pointer-events: all;
}

.v-no-potions-icon { font-size: 2.5rem; }
.v-no-potions-title { font-family: 'Cinzel', serif; color: var(--v-gold); font-size: 1rem; font-weight: 700; }
.v-no-potions-sub { color: var(--v-muted); font-size: .82rem; }

/* ── Sidebar ─────────────────────────────────────────────────────── */
.v-sidebar {
    border-left: 1px solid rgba(30,58,95,.5);
    background: rgba(10,22,40,.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

@media (max-width: 900px) {
    .v-sidebar { border-left: none; border-top: 1px solid rgba(30,58,95,.5); max-height: 300px; }
}

.v-sidebar-header {
    padding: 1rem 1.25rem .75rem;
    border-bottom: 1px solid rgba(30,58,95,.4);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.v-sidebar-title {
    font-family: 'Cinzel', serif;
    font-size: .8rem;
    font-weight: 700;
    color: var(--v-gold);
    letter-spacing: .5px;
    text-transform: uppercase;
}

.v-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: v-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes v-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .6; transform: scale(.8); }
}

.v-feed {
    flex: 1;
    overflow-y: auto;
    padding: .75rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.v-feed::-webkit-scrollbar { width: 4px; }
.v-feed::-webkit-scrollbar-track { background: transparent; }
.v-feed::-webkit-scrollbar-thumb { background: rgba(30,58,95,.8); border-radius: 4px; }

.v-feed-item {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    padding: .5rem .6rem;
    border-radius: 6px;
    background: rgba(255,255,255,.02);
    border: 1px solid rgba(30,58,95,.3);
    font-size: .75rem;
    animation: v-feed-in .3s ease;
}

@keyframes v-feed-in {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
}

.v-feed-icon { font-size: .9rem; flex-shrink: 0; margin-top: 1px; }
.v-feed-text { flex: 1; color: var(--v-text); line-height: 1.4; }
.v-feed-user { color: var(--v-gold); font-weight: 700; }
.v-feed-time { color: var(--v-muted); font-size: .68rem; margin-top: 2px; display: block; }

/* ── Info artiste ────────────────────────────────────────────────── */
.v-artist-banner {
    padding: .85rem 1.25rem;
    border-top: 1px solid rgba(30,58,95,.4);
    background: rgba(200,170,110,.04);
}

.v-artist-label {
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--v-muted);
    font-weight: 700;
    margin-bottom: .4rem;
}

.v-artist-name {
    color: var(--v-gold);
    font-weight: 700;
    font-size: .82rem;
    margin-bottom: .25rem;
}

.v-artist-share {
    font-size: .72rem;
    color: var(--v-muted);
}

.v-artist-share span {
    color: #22c55e;
    font-weight: 700;
}

/* ── Page boutique ───────────────────────────────────────────────── */
.v-shop-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    position: relative;
    z-index: 5;
}

.v-shop-hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.v-shop-hero-icon { font-size: 3rem; margin-bottom: .75rem; filter: drop-shadow(0 0 16px rgba(139,92,246,.6)); }
.v-shop-title {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--v-gold), var(--v-gold2), var(--v-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: .5rem;
}

.v-shop-sub { color: var(--v-muted); font-size: .9rem; line-height: 1.6; }

.v-shop-balance {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    background: rgba(139,92,246,.1);
    border: 1px solid rgba(139,92,246,.3);
    border-radius: 12px;
    padding: .6rem 1.2rem;
    margin-top: 1rem;
    font-size: .9rem;
    color: #a78bfa;
    font-weight: 700;
}

.v-packs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.v-pack {
    position: relative;
    background: linear-gradient(135deg, rgba(13,27,42,.9), rgba(10,22,40,.95));
    border: 1px solid var(--v-border);
    border-radius: 14px;
    padding: 1.5rem 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    overflow: hidden;
}

.v-pack:hover {
    transform: translateY(-3px);
    border-color: rgba(139,92,246,.5);
    box-shadow: 0 8px 32px rgba(139,92,246,.2);
}

.v-pack.featured {
    border-color: rgba(200,170,110,.4);
    box-shadow: 0 0 24px rgba(200,170,110,.1);
}

.v-pack-badge {
    position: absolute;
    top: .6rem; right: .6rem;
    background: var(--v-gold);
    color: #000;
    font-size: .6rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.v-pack-icon { font-size: 2.2rem; margin-bottom: .75rem; }
.v-pack-potions { font-family: 'Cinzel', serif; font-size: 1.6rem; font-weight: 900; color: #a78bfa; margin-bottom: .25rem; }
.v-pack-label { font-size: .78rem; color: var(--v-muted); margin-bottom: 1rem; }
.v-pack-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--v-gold);
    margin-bottom: 1rem;
}

.v-pack-btn {
    display: block;
    width: 100%;
    padding: .6rem;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
}

.v-pack-btn:hover { filter: brightness(1.15); transform: scale(1.02); }
.v-pack-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }

/* Bloc artiste info ─────────────────────────────────────────────── */
.v-artist-info {
    background: rgba(200,170,110,.04);
    border: 1px solid rgba(200,170,110,.15);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.v-artist-info-icon { font-size: 2rem; flex-shrink: 0; }
.v-artist-info-text h4 { color: var(--v-gold); font-size: .9rem; font-weight: 700; margin: 0 0 .3rem; }
.v-artist-info-text p { color: var(--v-muted); font-size: .8rem; margin: 0; line-height: 1.5; }
.v-artist-info-text strong { color: #22c55e; }

/* Succès achat ──────────────────────────────────────────────────── */
.v-success-banner {
    background: rgba(34,197,94,.08);
    border: 1px solid rgba(34,197,94,.3);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.v-success-banner h3 { color: #22c55e; font-size: 1.1rem; font-weight: 800; margin: 0 0 .5rem; }
.v-success-banner p  { color: var(--v-muted); font-size: .85rem; margin: 0; }
