/* ═══════════════════════════════════════════════════════════════
   SYSTÈME DE TAGS / BADGES
   ═══════════════════════════════════════════════════════════════ */

/* Navigation button premium style */
.sp-nav-btn--premium {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1)) !important;
    border-left: 3px solid #FFD700 !important;
}

.sp-nav-btn--premium:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.15)) !important;
}

/* Current tag display box */
.sp-current-tag-box {
    background: linear-gradient(135deg, rgba(30, 30, 42, 0.6), rgba(20, 20, 32, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 20px;
    margin-top: 16px;
}

.sp-current-tag-display {
    margin-top: 12px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 16px;
}

.sp-no-tag {
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    font-size: 14px;
}

/* Tags grid */
.sp-tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.sp-tags-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

/* Tag card */
.tag-card {
    background: linear-gradient(145deg, rgba(35, 35, 50, 0.8), rgba(25, 25, 40, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tag-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tag-card:hover::before {
    opacity: 1;
}

.tag-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.tag-card.equipped {
    border-color: #FFD700;
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.1));
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
}

.tag-card.equipped::after {
    content: '✓ ÉQUIPÉ';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #FFD700;
    color: #000;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.tag-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tag-card-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.tag-card-info h3 {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 4px 0;
}

.tag-card-rarity {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-card-rarity.common {
    background: rgba(150, 150, 150, 0.2);
    color: #b0b0b0;
}

.tag-card-rarity.rare {
    background: rgba(30, 144, 255, 0.2);
    color: #5fa8ff;
}

.tag-card-rarity.epic {
    background: rgba(138, 43, 226, 0.2);
    color: #b98aff;
}

.tag-card-rarity.legendary {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
}

.tag-card-rarity.limited {
    background: rgba(255, 105, 180, 0.2);
    color: #ff69b4;
}

.tag-card-preview {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.tag-card-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    margin-bottom: 12px;
}

.tag-card-limited-notice {
    background: rgba(255, 105, 180, 0.15);
    border: 1px solid rgba(255, 105, 180, 0.3);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
    color: #ff69b4;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tag-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.tag-card-btn {
    flex: 1;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-card-btn--equip {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

.tag-card-btn--equip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.tag-card-btn--shop {
    background: rgba(88, 101, 242, 0.2);
    color: var(--accent-primary);
    border: 1px solid rgba(88, 101, 242, 0.3);
}

.tag-card-btn--shop:hover {
    background: rgba(88, 101, 242, 0.3);
    border-color: rgba(88, 101, 242, 0.5);
}

/* Badges verrouillés */
.tag-card--locked {
    opacity: 0.7;
}

.tag-card--locked:hover {
    opacity: 1;
}

/* Bouton d'achat de badge */
.tag-buy-btn {
    flex: 1;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.15));
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #FFD700;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tag-buy-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 165, 0, 0.25));
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.tag-buy-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* User tag badge (in messages) - Badge indépendant */
.user-tag-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    font-size: 16px;
    margin-left: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    vertical-align: middle;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.badge-icon-only {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.user-tag-badge:hover {
    transform: scale(1.15);
    filter: brightness(1.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Profile badge display */
.profile-custom-badge-container {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    animation: fadeInUp 0.4s ease-out backwards;
}

.profile-custom-badge-container .user-tag-badge {
    width: 32px;
    height: 32px;
    font-size: 18px;
    margin-left: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(255, 255, 255, 0.15);
}

/* Tag tooltip */
.tag-tooltip {
    position: fixed;
    z-index: 100005;
    background: linear-gradient(135deg, rgba(25, 25, 35, 0.98), rgba(35, 35, 50, 0.98));
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6),
                0 0 0 1px rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
    min-width: 220px;
    max-width: 300px;
}

.tag-tooltip.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.tag-tooltip:hover {
    border-color: rgba(255, 255, 255, 0.25);
}

.tag-tooltip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tag-tooltip-icon {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.tag-tooltip-name {
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.tag-tooltip-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 10px;
}

.tag-tooltip-action {
    font-size: 12px;
    color: var(--accent-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tag-tooltip-limited {
    background: rgba(255, 105, 180, 0.15);
    border-radius: 6px;
    padding: 8px;
    font-size: 12px;
    color: #ff69b4;
    font-style: italic;
}

/* Profile tags display */
.profile-tags-section {
    margin-top: 16px;
}

.profile-tags-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.profile-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-tag-badge:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
}

.profile-tag-badge .tag-icon {
    font-size: 16px;
}

