/* ============================================
   MONSTER HUNTER RPG - Inventaire & Équipement
   ============================================ */

/* ============================================
   CONTENEUR INVENTAIRE
   ============================================ */

.inventory-panel {
    width: 100%;
    max-width: 800px;
}

.inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.inventory-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    letter-spacing: 0.15em;
}

.inventory-gold {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    color: var(--neon-yellow);
}

.gold-icon {
    font-size: 1.3rem;
}

/* ============================================
   LAYOUT INVENTAIRE
   ============================================ */

.inventory-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 25px;
}

@media (max-width: 768px) {
    .inventory-layout {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   SECTION ÉQUIPEMENT
   ============================================ */

.equipment-section {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 255, 247, 0.3);
    padding: 20px;
}

.equipment-title {
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 15px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.equipment-slots {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.equipment-slot {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 60px;
}

.equipment-slot:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 247, 0.05);
}

.equipment-slot.empty {
    border-style: dashed;
    opacity: 0.6;
}

.equipment-slot.empty:hover {
    opacity: 1;
}

.slot-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
}

.slot-info {
    flex: 1;
    min-width: 0;
}

.slot-type {
    font-size: 0.7rem;
    color: var(--text-dimmer);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.slot-item-name {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slot-item-name.empty {
    color: var(--text-dimmer);
    font-style: italic;
}

/* Couleurs selon rareté */
.slot-item-name.common { color: var(--rarity-common); }
.slot-item-name.uncommon { color: var(--rarity-uncommon); }
.slot-item-name.rare { color: var(--rarity-rare); }
.slot-item-name.epic { color: var(--rarity-epic); }
.slot-item-name.legendary { color: var(--rarity-legendary); }

/* ============================================
   GRILLE D'INVENTAIRE
   ============================================ */

.inventory-section {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(0, 255, 247, 0.3);
    padding: 20px;
}

.inventory-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.inventory-tab {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-dim);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.inventory-tab:hover {
    border-color: var(--neon-cyan);
    color: var(--text-light);
}

.inventory-tab.active {
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
    background: rgba(255, 0, 255, 0.1);
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

@media (max-width: 600px) {
    .inventory-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   SLOTS D'INVENTAIRE
   ============================================ */

.inventory-slot {
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-width: 50px;
}

.inventory-slot:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 247, 0.05);
    transform: translateY(-2px);
}

.inventory-slot.selected {
    border-color: var(--neon-magenta);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

.inventory-slot.empty {
    opacity: 0.5;
}

.inventory-slot.empty:hover {
    opacity: 0.7;
}

/* Icône de l'objet */
.item-icon {
    font-size: 1.8rem;
    margin-bottom: 2px;
}

/* Quantité (pour consommables) */
.item-quantity {
    position: absolute;
    bottom: 3px;
    right: 5px;
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
    color: white;
    text-shadow: 1px 1px 2px black;
}

/* Indicateur de rareté */
.inventory-slot.common { border-color: rgba(157, 157, 157, 0.5); }
.inventory-slot.uncommon { border-color: rgba(30, 255, 0, 0.5); }
.inventory-slot.rare { border-color: rgba(0, 112, 221, 0.5); }
.inventory-slot.epic { border-color: rgba(163, 53, 238, 0.5); }
.inventory-slot.legendary {
    border-color: rgba(255, 128, 0, 0.5);
    animation: legendaryGlow 2s ease-in-out infinite;
}

@keyframes legendaryGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 128, 0, 0.3); }
    50% { box-shadow: 0 0 15px rgba(255, 128, 0, 0.6); }
}

.inventory-slot.common:hover { border-color: var(--rarity-common); }
.inventory-slot.uncommon:hover { border-color: var(--rarity-uncommon); }
.inventory-slot.rare:hover { border-color: var(--rarity-rare); }
.inventory-slot.epic:hover { border-color: var(--rarity-epic); }
.inventory-slot.legendary:hover { border-color: var(--rarity-legendary); }

/* ============================================
   TOOLTIP D'OBJET
   ============================================ */

.item-tooltip {
    position: fixed;
    z-index: 2000;
    background: var(--bg-card);
    border: 2px solid var(--neon-cyan);
    padding: 15px;
    min-width: 250px;
    max-width: 320px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.item-tooltip.visible {
    opacity: 1;
}

.item-tooltip-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.item-tooltip-icon {
    font-size: 2rem;
}

.item-tooltip-title {
    flex: 1;
}

.item-tooltip-name {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.item-tooltip-name.common { color: var(--rarity-common); }
.item-tooltip-name.uncommon { color: var(--rarity-uncommon); }
.item-tooltip-name.rare { color: var(--rarity-rare); }
.item-tooltip-name.epic { color: var(--rarity-epic); }
.item-tooltip-name.legendary { color: var(--rarity-legendary); }

.item-tooltip-type {
    font-size: 0.8rem;
    color: var(--text-dimmer);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.item-tooltip-stats {
    margin-bottom: 12px;
}

.item-stat {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.9rem;
}

.item-stat-name {
    color: var(--text-dim);
}

.item-stat-value {
    color: var(--neon-green);
    font-family: 'Orbitron', monospace;
}

.item-stat-value.negative {
    color: var(--neon-red);
}

.item-tooltip-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 12px;
}

.item-tooltip-actions {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-dimmer);
}

.item-tooltip-actions span {
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 3px;
}

/* ============================================
   COMPARAISON D'ÉQUIPEMENT
   ============================================ */

.item-comparison {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

.comparison-title {
    font-size: 0.75rem;
    color: var(--text-dimmer);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.comparison-stat {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 0.85rem;
}

.comparison-stat .stat-diff {
    font-family: 'Orbitron', monospace;
}

.comparison-stat .stat-diff.positive {
    color: var(--neon-green);
}

.comparison-stat .stat-diff.positive::before {
    content: '+';
}

.comparison-stat .stat-diff.negative {
    color: var(--neon-red);
}

/* ============================================
   MENU CONTEXTUEL
   ============================================ */

.context-menu {
    position: fixed;
    z-index: 2500;
    background: var(--bg-card);
    border: 2px solid var(--neon-cyan);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: all 0.15s ease;
}

.context-menu.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.context-menu-item {
    padding: 10px 15px;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.context-menu-item:hover {
    background: rgba(0, 255, 247, 0.1);
    color: var(--neon-cyan);
}

.context-menu-item.danger:hover {
    background: rgba(255, 0, 100, 0.1);
    color: var(--neon-red);
}

.context-menu-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.context-menu-item.disabled:hover {
    background: transparent;
    color: var(--text-light);
}

.context-menu-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 5px 0;
}

/* ============================================
   POTIONS RAPIDES (HUD)
   ============================================ */

.quick-potions {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 50;
}

.quick-potion-slot {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.quick-potion-slot:hover:not(.empty) {
    border-color: var(--neon-green);
    transform: translateY(-3px);
}

.quick-potion-slot.empty {
    opacity: 0.4;
    cursor: default;
}

.quick-potion-icon {
    font-size: 1.5rem;
}

.quick-potion-count {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
    color: white;
    text-shadow: 1px 1px 2px black;
}

.quick-potion-key {
    position: absolute;
    top: 2px;
    left: 4px;
    font-family: 'Orbitron', monospace;
    font-size: 0.6rem;
    color: var(--text-dimmer);
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Animation de pickup d'objet */
@keyframes itemPickup {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); filter: brightness(1.5); }
    100% { transform: scale(1); }
}

.inventory-slot.item-added {
    animation: itemPickup 0.4s ease;
}

/* Animation de suppression */
@keyframes itemRemove {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.5); opacity: 0; }
}

.inventory-slot.item-removed {
    animation: itemRemove 0.3s ease forwards;
}
