/* ---------- VARIABLES ---------- */
:root {
    --primary: #1E3A8A;      /* bleu profond */
    --primary-dark: #0F2A5E;
    --secondary: #D32F2F;    /* rouge accent */
    --secondary-light: #FFCDD2;
    --gray-100: #F9FAFB;
    --gray-200: #F3F4F6;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --radius: 0.75rem;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    color: var(--gray-900);
    line-height: 1.5;
    scroll-behavior: smooth;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 100;
    text-decoration: none;
}
.skip-link:focus { top: 0; }

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

/* Header */
.site-header {
    position: sticky;
    top: 0;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    backdrop-filter: blur(8px);
    background-color: rgba(255,255,255,0.95);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
.logo {
    font-size: 1.5rem;
    font-weight: 800;
}
.logo span:first-child { color: var(--primary); }
.logo span span { color: var(--secondary); }
.main-nav ul {
    display: flex;
    gap: 1.8rem;
    list-style: none;
}
.main-nav a {
    text-decoration: none;
    font-weight: 500;
    color: var(--gray-700);
    transition: var(--transition);
}
.main-nav a:hover { color: var(--primary); }
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
}

/* Sidebar TOC */
.toc-sidebar {
    position: fixed;
    left: 0;
    top: 80px;
    width: 260px;
    bottom: 0;
    background: var(--gray-100);
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    padding: 1.5rem 1rem;
    z-index: 900;
}
.toc-sticky h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-700);
    margin-bottom: 1rem;
}
.toc-sticky ul {
    list-style: none;
    margin-left: 0;
}
.toc-sticky ul ul {
    margin-left: 1rem;
}
.toc-sticky a {
    display: block;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    color: var(--gray-700);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: 0.1s;
}
.toc-sticky a:hover, .toc-sticky a:focus {
    border-left-color: var(--secondary);
    color: var(--primary);
    padding-left: 0.5rem;
}
.pdf-download {
    margin-top: 2rem;
}
.btn-pdf {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--secondary);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    transition: var(--transition);
}
.btn-pdf:hover { background: #b71c1c; }

/* Main content offset par rapport à la sidebar */
#main-content {
    margin-left: 260px;
}

/* Sections */
.section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--gray-200);
}
.bg-light { background: var(--gray-100); }
.bg-dark {
    background: var(--primary-dark);
    color: white;
}
.bg-dark h2 { color: white; }

h2 {
    font-size: 1.9rem;
    margin-bottom: 2rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
}
h2:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    margin-top: 8px;
    border-radius: 2px;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #F0F4FF 0%, #FFFFFF 100%);
    padding: 5rem 0 4rem;
}
.hero-badge {
    display: inline-block;
    background: var(--secondary-light);
    color: var(--secondary);
    padding: 0.2rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.hero h1 {
    font-size: 3rem;
    line-height: 1.2;
    font-weight: 800;
}
.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--primary);
}
.hero-description {
    max-width: 600px;
    margin: 1.5rem 0 2rem;
    font-size: 1.1rem;
}
.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin: 2rem 0;
}
.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}
.stat-label {
    font-size: 0.9rem;
    color: var(--gray-700);
}
.hero-quote {
    font-style: italic;
    border-left: 4px solid var(--secondary);
    padding-left: 1rem;
    margin-top: 1rem;
    color: var(--gray-700);
}

/* Cards */
.cards-grid, .impact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.card, .impact-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.2s;
}
.card:hover { transform: translateY(-5px); }
.card i, .impact-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.card-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
}

/* Charts row */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}
.chart-box {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.table-responsive {
    overflow-x: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}
.data-table th, .data-table td {
    border: 1px solid #ddd;
    padding: 0.75rem;
    text-align: left;
}
.data-table th {
    background: var(--primary);
    color: white;
}
.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.sector-badge {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
}
.commerce { background: #1E3A8A; }
.agriculture { background: #2E7D32; }
.services { background: #ED6C02; }

.profil-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}
.profil-item {
    background: var(--gray-200);
    padding: 1rem 1.5rem;
    border-radius: 40px;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}
.filters-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}
.tab-btn {
    background: var(--gray-200);
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
}
.tab-btn.active {
    background: var(--primary);
    color: white;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
.recommendations-list {
    padding-left: 1.5rem;
    line-height: 1.6;
}
.recommendations-list li {
    margin-bottom: 0.8rem;
}
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.copyright {
    margin-top: 2rem;
    font-size: 0.8rem;
    opacity: 0.7;
}
.site-footer {
    text-align: center;
    padding: 1rem;
    background: var(--gray-900);
    color: white;
    font-size: 0.8rem;
}
.mt-2 { margin-top: 1rem; }
.text-center { text-align: center; }