/**
 * Top 50 Table – CSS à copier-coller sur une autre page
 * Extrait de top50-ranking.php (variables + mise en forme du tableau)
 */

/* ========== Variables ========== */
:root {
    --primary: #ed0988;
    --bg-light: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* ========== Carte + zone scroll ========== */
.top50-main-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
    overflow: hidden;
}

.top50-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.top50-report-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-title::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
}

/* ========== Tableau ========== */
.top50-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.top50-table th {
    background: #f8fafc;
    text-align: left;
    padding: 20px 24px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 0 #f1f5f9;
}

.top50-table td {
    padding: 0px 24px 0px 24px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 14px;
}

.top50-table tbody tr {
    transition: background 0.15s ease;
}

.top50-table tbody tr:hover {
    background: #f8fafc;
}

/* ========== Colonne Rang + tendances ========== */
.top50-rank {
    font-weight: 800;
    font-size: 15px;
    color: var(--text-main);
    width: 40px;
}

.trend-indicator {
    font-size: 10px;
    margin-left: 5px;
    font-weight: bold;
}

.trend-up { color: #22c55e; }
.trend-down { color: #ef4444; }
.trend-equal { color: #cbd5e1; }

/* ========== Colonne Marque (logo + nom) ========== */
.top50-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top50-brand img,
.top50-brand-link img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
        margin: 10px 0;
}

.top50-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.top50-brand-name {
    font-weight: 700;
    color: var(--text-main);
}

.top50-brand-username {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    margin-top: 1px;
}

.top50-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
}

.top50-brand-link:hover .top50-brand-name {
    color: var(--link-color, #6366f1);
}

.top50-brand-cell {
    vertical-align: middle;
}

.top50-brand-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--border-color, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #64748b;
}

/* ========== Colonne Valeur (ex. Interactions) ========== */
.top50-val {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    text-align: right;
}

/* ========== Colonne Collaborations (avatars) ========== */
.collab-stack {
    display: flex;
    align-items: center;
}

.collab-stack img,
.collab-stack .collab-avatar-link img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
}

.collab-avatar-link {
    display: block;
    margin-left: -10px;
    transition: transform 0.15s ease;
}

.collab-avatar-link:hover {
    transform: scale(1.1);
    z-index: 1;
}

.collab-stack > *:first-child {
    margin-left: 0;
}

.collab-more {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -10px;
    color: var(--text-muted);
}

/* ========== Pied méthodologie (optionnel) ========== */
.methodology-footer {
    padding: 24px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.65;
    margin: 0;
}

.top50-footer-note {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .top50-table-scroll {
        overflow-x: auto;
    }
}

@media (max-width: 560px) {
    .top50-table td,
    .top50-table th {
        padding: 10px 16px 6px 16px;
    }
    .top50-brand img,
    .top50-brand-link img {
        width: 36px;
        height: 36px;
    }
    .top50-brand-placeholder {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}
