/* ============================================================
   IVANN 49 v2 — Boutique 2 sections (F2P + Premium) + buff XP HUD
   Sentinel : SHOP_V2
   ============================================================ */
/* SHOP_V2 */

.ivann-shop {
    margin: 32px 0;
}
.ivann-shop__head {
    padding: 16px 20px; margin-bottom: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
    color: #f8fafc;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
}
.ivann-shop__title {
    margin: 0;
    font: 800 22px/1 system-ui, sans-serif;
    background: linear-gradient(90deg, #6ee7b7, #67e8f9);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ivann-shop__balances {
    display: flex; gap: 10px; flex-wrap: wrap;
}
.ivann-shop__balance {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 999px;
    color: #fff; font: 800 14px/1 system-ui, sans-serif;
}
.ivann-shop__balance svg { width: 16px; height: 16px; }
.ivann-shop__balance--gems {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.35);
}
.ivann-shop__balance--crystals {
    background: linear-gradient(135deg, #06b6d4, #7c3aed);
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.4);
}

/* Sections du shop */
.ivann-shop__section {
    margin: 28px 0 14px;
    font: 800 16px/1.2 system-ui, sans-serif;
    color: #6ee7b7;
    display: flex; align-items: center; gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(110, 231, 183, 0.15);
}
.ivann-shop__section svg { width: 20px; height: 20px; }
.ivann-shop__section small { font-size: 12px; opacity: 0.6; font-weight: 500; }
.ivann-shop__section--premium {
    color: #c4b5fd;
    border-bottom-color: rgba(196, 181, 253, 0.18);
}
.ivann-shop__section--packs {
    color: #fbbf24;
    border-bottom-color: rgba(251, 191, 36, 0.18);
}

/* Item premium : bordure violette */
.ivann-shop-item--premium {
    border-color: rgba(168, 85, 247, 0.25);
    box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.15);
}
.ivann-shop-item__price--crystals { color: #c4b5fd; }
.ivann-shop-item--premium.is-owned {
    border-color: #c084fc;
}
.ivann-shop-item--premium .ivann-shop-item__buy {
    background: linear-gradient(135deg, #06b6d4, #7c3aed);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}
.ivann-shop-item--premium.is-owned .ivann-shop-item__buy {
    background: linear-gradient(135deg, #c084fc, #9333ea);
    color: #fff;
}

/* Packs Cristaux (recharge) */
.ivann-shop__packs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
}
.ivann-shop-pack {
    background: linear-gradient(135deg, #1e1b4b 0%, #0c0a1d 100%);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 14px;
    padding: 18px 14px;
    text-align: center;
    color: #f8fafc;
    transition: transform 200ms, border-color 200ms;
}
.ivann-shop-pack:hover {
    transform: translateY(-3px);
    border-color: rgba(168, 85, 247, 0.5);
}
.ivann-shop-pack__icon {
    color: #c4b5fd;
    margin-bottom: 10px;
}
.ivann-shop-pack__icon svg { width: 36px; height: 36px; }
.ivann-shop-pack__amount {
    font: 900 28px/1 system-ui, sans-serif;
    background: linear-gradient(90deg, #67e8f9, #c4b5fd);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    margin-bottom: 4px;
}
.ivann-shop-pack__bonus {
    font-size: 11px;
    color: #fde047;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    min-height: 14px;
}
.ivann-shop-pack__btn {
    width: 100%;
    padding: 10px;
    border: none; border-radius: 8px; cursor: pointer;
    background: linear-gradient(135deg, #06b6d4, #7c3aed);
    color: #fff;
    font: 800 14px/1 system-ui, sans-serif;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    transition: transform 150ms;
}
.ivann-shop-pack__btn:hover { transform: scale(1.04); }

.ivann-shop__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.ivann-shop-item {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 14px;
    padding: 20px;
    color: #f8fafc;
    border: 1px solid rgba(255,255,255,0.06);
    display: flex; flex-direction: column; gap: 14px;
    transition: transform 200ms, box-shadow 200ms;
}
.ivann-shop-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.4);
}
.ivann-shop-item__icon {
    width: 64px; height: 64px;
    display: grid; place-items: center;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
}
.ivann-shop-item__icon svg { width: 36px; height: 36px; }
.ivann-shop-item--skin .ivann-shop-item__icon  { background: rgba(251, 191, 36, 0.15); color: #fde047; }
.ivann-shop-item--buff .ivann-shop-item__icon  { background: rgba(99, 102, 241, 0.18); color: #c4b5fd; }
.ivann-shop-item--loot .ivann-shop-item__icon  { background: rgba(244, 114, 182, 0.18); color: #f9a8d4; }

.ivann-shop-item__name {
    margin: 0; font: 800 17px/1.2 system-ui, sans-serif;
}
.ivann-shop-item__desc {
    margin: 0; font: 500 13px/1.45 system-ui, sans-serif; opacity: 0.78;
    flex: 1;
}
.ivann-shop-item__footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.ivann-shop-item__price {
    display: inline-flex; align-items: center; gap: 6px;
    font: 800 16px/1 system-ui, sans-serif;
    color: #6ee7b7;
}
.ivann-shop-item__price svg { width: 16px; height: 16px; }
.ivann-shop-item__buy {
    padding: 9px 18px;
    border: none; border-radius: 8px; cursor: pointer;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff; font: 800 13px/1 system-ui, sans-serif;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transition: transform 150ms;
}
.ivann-shop-item__buy:hover { transform: scale(1.05); }
.ivann-shop-item__buy:disabled {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.4);
    cursor: not-allowed; box-shadow: none; transform: none;
}
.ivann-shop-item.is-owned {
    border-color: #facc15;
}
.ivann-shop-item.is-owned .ivann-shop-item__buy {
    background: linear-gradient(135deg, #facc15, #f59e0b);
    color: #422006; cursor: default;
}

/* ====== Loot box modal ====== */
@keyframes ivann-loot-flip {
    0%   { transform: rotateY(0deg) scale(0.8); opacity: 0; }
    50%  { transform: rotateY(180deg) scale(1.15); }
    100% { transform: rotateY(360deg) scale(1); opacity: 1; }
}
@keyframes ivann-loot-glow {
    0%, 100% { box-shadow: 0 0 30px var(--rarity-glow, rgba(255,255,255,0.3)); }
    50%      { box-shadow: 0 0 60px var(--rarity-glow, rgba(255,255,255,0.6)); }
}
.ivann-loot-modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    z-index: 100000;
    display: grid; place-items: center;
    animation: fadeIn 250ms ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.ivann-loot-modal__card {
    --rarity-glow: rgba(255,255,255,0.4);
    width: 320px; padding: 32px 24px;
    border-radius: 18px;
    background: linear-gradient(135deg, #1f2937 0%, #0f172a 100%);
    color: #f8fafc; text-align: center;
    border: 2px solid var(--rarity-color, #6b7280);
    animation: ivann-loot-flip 800ms cubic-bezier(.18,.89,.32,1.28) both,
               ivann-loot-glow 1.6s ease-in-out 800ms infinite;
}
.ivann-loot-modal__card[data-rarity="common"]    { --rarity-color: #94a3b8; --rarity-glow: rgba(148,163,184,0.4); }
.ivann-loot-modal__card[data-rarity="rare"]      { --rarity-color: #38bdf8; --rarity-glow: rgba(56,189,248,0.5); }
.ivann-loot-modal__card[data-rarity="epic"]      { --rarity-color: #c084fc; --rarity-glow: rgba(192,132,252,0.55); }
.ivann-loot-modal__card[data-rarity="legendary"] { --rarity-color: #fbbf24; --rarity-glow: rgba(251,191,36,0.7); }
.ivann-loot-modal__icon {
    width: 96px; height: 96px; margin: 0 auto 16px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    color: var(--rarity-color);
}
.ivann-loot-modal__icon svg { width: 50px; height: 50px; }
.ivann-loot-modal__rarity {
    font: 800 11px/1 system-ui, sans-serif;
    text-transform: uppercase; letter-spacing: 1.5px;
    color: var(--rarity-color);
    margin-bottom: 6px;
}
.ivann-loot-modal__title {
    font: 900 22px/1.2 system-ui, sans-serif;
    margin: 0 0 8px;
}
.ivann-loot-modal__sub {
    font-size: 13px; opacity: 0.78; margin: 0 0 20px;
}
.ivann-loot-modal__btn {
    padding: 10px 22px; border: none; border-radius: 8px; cursor: pointer;
    background: rgba(255,255,255,0.1); color: #fff;
    font: 800 13px/1 system-ui, sans-serif;
    transition: background 150ms;
}
.ivann-loot-modal__btn:hover { background: rgba(255,255,255,0.18); }

/* ====== Badge BUFF XP actif (dans le HUD) ====== */
.ivann-buff-badge {
    position: fixed;
    top: 110px;
    left: 16px;
    z-index: 99994;
    display: none;
    align-items: center; gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    font: 800 12px/1 system-ui, sans-serif;
    box-shadow: 0 4px 12px rgba(99,102,241,0.45);
}
.ivann-buff-badge.is-active { display: inline-flex; }
.ivann-buff-badge svg { width: 14px; height: 14px; }

/* ====== Badge skin "Maitre de Code" (dans la barre admin/profil) ====== */
.ivann-skin-master {
    display: inline-flex; align-items: center; gap: 6px;
    margin-left: 10px; padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #facc15, #f59e0b);
    color: #422006;
    font: 800 11px/1 system-ui, sans-serif;
    text-transform: uppercase; letter-spacing: 0.6px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
    vertical-align: middle;
}
.ivann-skin-master svg { width: 12px; height: 12px; }
.ivann-skin-apex {
    background: linear-gradient(135deg, #c084fc, #9333ea);
    color: #fff;
    box-shadow: 0 2px 8px rgba(192, 132, 252, 0.5);
}
