:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --card-bg: #1e293b;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
}

header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary);
    letter-spacing: -0.025em;
}

.subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: 0.5rem;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.drop-zone:hover {
    border-color: var(--primary);
}

.btn {
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: none;
    font-weight: 500;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--primary-hover);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.chart-container {
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}

.stat-card {
    padding: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.table-container {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 0.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

th {
    background: var(--bg);
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: var(--bg);
}

.badge {
    padding: 0.25rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 1rem;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
}

.tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    color: var(--text-muted);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

select, input {
    padding: 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
}

.loader {
    padding: 2rem;
    color: var(--primary);
    font-weight: 600;
}

.social-share a {
    transition: transform 0.2s, filter 0.2s;
}

.social-share a:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.home-bg {
    position: relative;
    overflow: hidden;
}

.home-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('fb_og_image.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.1; /* Transparence pour le fond */
    z-index: 0;
    pointer-events: none;
}

.home-bg > * {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .social-share {
        border-right: none !important;
        margin-right: 0 !important;
        padding-right: 0 !important;
    }
}
