/* Pulsing Badge Vert */
.pulse-badge-green {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(46, 204, 113, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

@keyframes pulse-red-text {
    0% { opacity: 0.7; text-shadow: 0 0 4px rgba(255, 59, 48, 0.3); }
    50% { opacity: 1; text-shadow: 0 0 12px rgba(255, 59, 48, 0.8); }
    100% { opacity: 0.7; text-shadow: 0 0 4px rgba(255, 59, 48, 0.3); }
}
.pulse-red-text {
    color: #ff3b30 !important;
    animation: pulse-red-text 1.5s infinite !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}
.favoris-count-row {
    color: #ff9500 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    display: flex;
    justify-content: center !important;
    align-items: center !important;
    background: rgba(255, 149, 0, 0.08) !important;
    border: 1px solid rgba(255, 149, 0, 0.3) !important;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

:root {
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-blue: #007aff;
    --accent-gold: #c5a059;
    --card-width: 240px;
}

html, body {
    height: 100% !important;
    overflow: hidden !important;
}

body {
    background-color: #0f111a;
    color: #fff;
    margin: 0;
    padding: 20px;
    font-family: 'Inter', sans-serif;
    display: flex !important;
    flex-direction: column;
}

/* Ajustement pour que le layout occupe tout l'espace sous la nav */
.page-wrapper {
    flex: 1;
    min-height: 0;
    margin: 0 !important;
    padding: 0 20px 20px 20px !important;
}

/* Personnalisation du scrollbar pour un look premium */
.table-wrapper::-webkit-scrollbar {
    width: 8px;
}
.table-wrapper::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}
.table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}
.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* --- PREMIUM TITLE STYLING --- */
.premium-title-wrapper {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 25px;
    padding-top: 5px;
}

.title-accent-bar {
    width: 4px;
    height: 36px;
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    border-radius: 2px;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}

.premium-page-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 25px;
    font-family: 'Inter', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #fff;
    text-transform: uppercase;
}

.title-main-text {
    background: linear-gradient(180deg, #FFFFFF 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.title-sep {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
    margin: 0 5px;
    font-size: 1.4rem;
}

.title-sub-text {
    color: #10b981;
    text-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
    white-space: nowrap;
}

.title-count-badge {
    background: rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #34c759;
    margin-left: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

.mega-boutique-header-fixed {
    background: #0f111a;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.filters-sidebar {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 300px;
    z-index: 100;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 10px;
    font-weight: 700;
}

.filter-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px;
    border-radius: 10px;
    outline: none;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-width), 1fr));
    gap: 25px;
}

.item-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Typographie Responsive Proportionnelle */
.item-card .yt-number {
    font-size: clamp(0.75rem, calc(var(--zoom-val) * 0.0042 * 1rem), 1.05rem) !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    display: flex;
    align-items: center;
    gap: clamp(4px, calc(var(--zoom-val) * 0.03px), 10px);
}
.item-card .item-name {
    font-size: clamp(0.85rem, calc(var(--zoom-val) * 0.0048 * 1rem), 1.2rem) !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.item-card .price-tag {
    font-size: clamp(0.95rem, calc(var(--zoom-val) * 0.0055 * 1rem), 1.35rem) !important;
    color: #2ecc71 !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.2);
}
.item-card .condition-badge {
    font-size: clamp(0.6rem, calc(var(--zoom-val) * 0.0035 * 1rem), 0.9rem) !important;
    line-height: 1.2 !important;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
}
.item-card .seller-info {
    font-size: clamp(0.65rem, calc(var(--zoom-val) * 0.0038 * 1rem), 0.95rem) !important;
    line-height: 1.2 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
}
.item-card .btn-action {
    font-size: clamp(0.7rem, calc(var(--zoom-val) * 0.0042 * 1rem), 1.05rem) !important;
    line-height: 1.2 !important;
    width: 100%;
    padding: clamp(3px, calc(var(--zoom-val) * 0.03px), 10px) !important;
    margin-top: clamp(4px, calc(var(--zoom-val) * 0.04px), 12px) !important;
    font-weight: 700 !important;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.item-card .photo-dot {
    display: inline-block;
    width: clamp(6px, calc(var(--zoom-val) * 0.04px), 12px);
    height: clamp(6px, calc(var(--zoom-val) * 0.04px), 12px);
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    cursor: help;
}

.item-card .photo-dot:hover {
    transform: scale(1.3);
}

.dot-reference {
    background: #f39c12;
    box-shadow: 0 0 8px rgba(243, 156, 18, 0.6);
}

.dot-reelle {
    background: #2ecc71;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.6);
}

.item-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.img-container {
    width: 100%;
    aspect-ratio: 1;
    background: #1a1d26;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 15px;
}

.stamp-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.item-card:hover .stamp-img {
    transform: scale(1.05);
}

.item-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.seller-verified {
    color: #2ecc71;
    font-size: 0.9em;
}

.btn-buy {
    background: rgba(52, 211, 153, 0.12) !important;
    color: #34c759 !important;
    border: 1px solid rgba(52, 211, 153, 0.3) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    text-shadow: 0 0 8px rgba(52, 211, 153, 0.3) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37), inset 0 1px 0 0 rgba(255, 255, 255, 0.1) !important;
    font-weight: 700 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-buy:hover {
    background: rgba(52, 211, 153, 0.22) !important;
    color: #fff !important;
    border: 1px solid rgba(52, 211, 153, 0.5) !important;
    box-shadow: 0 8px 32px 0 rgba(52, 211, 153, 0.2), inset 0 1px 0 0 rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px) scale(1.02) !important;
    text-shadow: none !important;
}

.btn-login {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Pagination Style */
.pagination-sticky-bottom {
    background: rgba(26, 29, 39, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    border-radius: 0 0 18px 18px;
    z-index: 100;
}

.pagination-links {
    display: flex;
    gap: 5px;
}

.pagination-links a, .pagination-links span {
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination-links a:hover {
    background: rgba(255,255,255,0.1);
}

.pagination-links .current-page {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

.per-page-container select, .goto-page-form input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
}

.goto-page-form button {
    background: var(--accent-blue);
    border: none;
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 900px) {
    .page-wrapper {
        grid-template-columns: 1fr;
    }
    .filters-sidebar {
        position: static;
    }
}

/* --- SECOND STYLE BLOCK --- */
.btn-favorite {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
}

.btn-favorite svg {
    width: 18px;
    height: 18px;
    fill: transparent;
    transition: all 0.2s ease;
}

.btn-favorite:hover {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ff4757;
    transform: scale(1.1);
}

.btn-favorite.is-active {
    color: #ff4757;
    border-color: rgba(255, 71, 87, 0.3);
    background: rgba(255, 71, 87, 0.1);
}

.btn-favorite.is-active svg {
    fill: #ff4757;
    stroke: #ff4757;
    animation: pulse-heart 0.3s ease-out;
}

@keyframes pulse-heart {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

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

.shimmer-element {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
