/* ================================================================
   WaterFlow Pro v2 — Feuille de style premium
   Palette : bleu profond institutionnel + cyan eau + vert écologie + orange accent
   ================================================================ */

/* ---------- Variables ---------- */
:root {
    --wf-primary: #0B3D91;
    --wf-primary-dark: #062D6E;
    --wf-primary-light: #1F6FB4;

    --wf-secondary: #0EA5B7;         /* cyan eau */
    --wf-secondary-dark: #0B7F8C;
    --wf-secondary-light: #67D9E5;

    --wf-accent: #E06C00;             /* orange accent */
    --wf-accent-dark: #B35500;
    --wf-accent-light: #FFA057;

    --wf-success: #10B981;            /* vert écologie */
    --wf-success-dark: #047857;
    --wf-success-light: #D1FAE5;
    --wf-warning: #F59E0B;
    --wf-warning-light: #FEF3C7;
    --wf-danger: #EF4444;
    --wf-danger-light: #FEE2E2;
    --wf-info: #3B82F6;

    /* Neutres */
    --wf-bg: #F4F6FB;
    --wf-bg-alt: #FFFFFF;
    --wf-surface: #FFFFFF;
    --wf-surface-alt: #F9FAFC;
    --wf-border: #E5E9F2;
    --wf-border-strong: #CFD6E4;
    --wf-text: #0F172A;
    --wf-text-muted: #64748B;
    --wf-text-subtle: #94A3B8;

    /* Effets */
    --wf-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --wf-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    --wf-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
    --wf-radius: 12px;
    --wf-radius-lg: 18px;
    --wf-radius-sm: 8px;

    /* Typographie */
    --wf-font: "Inter", "Segoe UI", Roboto, system-ui, sans-serif;

    /* Transitions */
    --wf-ease: cubic-bezier(.4, 0, .2, 1);
    --wf-dur: .18s;
}

/* ---------- Mode sombre ---------- */
[data-theme="dark"] {
    --wf-bg: #0B1220;
    --wf-bg-alt: #111827;
    --wf-surface: #151F30;
    --wf-surface-alt: #1C2A40;
    --wf-border: #23304A;
    --wf-border-strong: #31415F;
    --wf-text: #E2E8F0;
    --wf-text-muted: #94A3B8;
    --wf-text-subtle: #64748B;
    --wf-shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --wf-shadow: 0 4px 14px rgba(0, 0, 0, .5);
    --wf-shadow-lg: 0 12px 32px rgba(0, 0, 0, .6);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { height: auto; }
body {
    font-family: var(--wf-font);
    color: var(--wf-text);
    background: var(--wf-bg);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color .15s ease, color .15s ease;
}

h1, h2, h3, h4, h5 { color: var(--wf-text); letter-spacing: -.01em; }
h1 { font-weight: 800; }
h2 { font-weight: 700; }
a { color: var(--wf-primary-light); text-decoration: none; transition: color var(--wf-dur); }
a:hover { color: var(--wf-primary); }

code, pre { font-family: "JetBrains Mono", "Fira Code", Consolas, monospace; }

/* ---------- Typographie utilitaire ---------- */
.text-muted { color: var(--wf-text-muted) !important; }
.text-subtle { color: var(--wf-text-subtle); }
.fw-semibold { font-weight: 600; }

/* ================================================================
   BOUTONS
   ================================================================ */
.btn { font-weight: 500; border-radius: 10px; padding: .55rem 1.1rem; transition: all var(--wf-dur) var(--wf-ease); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--wf-primary-light); outline-offset: 2px; }

.btn-wf-primary {
    background: var(--wf-primary); color: #fff; border: 0;
    box-shadow: 0 2px 6px rgba(11, 61, 145, .24);
}
.btn-wf-primary:hover { background: var(--wf-primary-dark); color: #fff; box-shadow: 0 4px 12px rgba(11, 61, 145, .35); }

.btn-wf-secondary { background: var(--wf-secondary); color: #fff; border: 0; }
.btn-wf-secondary:hover { background: var(--wf-secondary-dark); color: #fff; }

.btn-wf-accent {
    background: var(--wf-accent); color: #fff; border: 0;
    box-shadow: 0 2px 6px rgba(224, 108, 0, .28);
}
.btn-wf-accent:hover { background: var(--wf-accent-dark); color: #fff; box-shadow: 0 4px 14px rgba(224, 108, 0, .4); }

.btn-wf-success { background: var(--wf-success); color: #fff; border: 0; }
.btn-wf-success:hover { background: var(--wf-success-dark); color: #fff; }

.btn-wf-outline {
    background: transparent; color: var(--wf-primary);
    border: 1.5px solid var(--wf-primary);
}
.btn-wf-outline:hover { background: var(--wf-primary); color: #fff; }

.btn-wf-ghost {
    background: transparent; color: var(--wf-text-muted); border: 0;
}
.btn-wf-ghost:hover { background: var(--wf-surface-alt); color: var(--wf-text); }

.btn-icon {
    width: 36px; height: 36px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
}

/* ================================================================
   FORMULAIRES
   ================================================================ */
.form-control, .form-select {
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    color: var(--wf-text);
    border-radius: 10px;
    padding: .55rem .85rem;
    font-size: 14px;
    transition: border-color var(--wf-dur), box-shadow var(--wf-dur);
}
.form-control:focus, .form-select:focus {
    border-color: var(--wf-primary-light);
    box-shadow: 0 0 0 3px rgba(31, 111, 180, .18);
    outline: none;
}
.form-control::placeholder { color: var(--wf-text-subtle); }
.form-label { font-weight: 500; color: var(--wf-text); font-size: 13px; margin-bottom: .4rem; }
.form-check-input:checked { background-color: var(--wf-primary); border-color: var(--wf-primary); }

/* ================================================================
   FRONT OFFICE — Topbar & navigation
   ================================================================ */
.wf-topbar {
    background: linear-gradient(135deg, var(--wf-primary), var(--wf-primary-dark));
    color: #fff;
}
.wf-topbar .small { font-size: 12.5px; }

.wf-nav {
    background: var(--wf-surface);
    box-shadow: 0 2px 12px rgba(15, 23, 42, .06);
    border-bottom: 1px solid var(--wf-border);
}
.wf-nav .navbar-brand { font-size: 1.1rem; color: var(--wf-primary); }
.wf-nav .nav-link {
    color: var(--wf-text); font-weight: 500; font-size: 14px;
    position: relative; padding: .7rem 1rem;
}
.wf-nav .nav-link::after {
    content: ""; position: absolute; bottom: .4rem; left: 50%;
    width: 0; height: 2px; background: var(--wf-accent);
    transition: all var(--wf-dur) var(--wf-ease);
    transform: translateX(-50%);
}
.wf-nav .nav-link:hover::after, .wf-nav .nav-link.active::after { width: 24px; }
.wf-nav .nav-link:hover { color: var(--wf-primary); }

.wf-brand-dot {
    width: 40px; height: 40px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #67D9E5, var(--wf-primary));
    display: inline-block;
    box-shadow: 0 4px 12px rgba(11, 61, 145, .4);
}

/* ================================================================
   FRONT OFFICE — Hero
   ================================================================ */
.wf-hero {
    background: linear-gradient(135deg, #0B3D91 0%, #1F6FB4 50%, #0EA5B7 100%);
    color: #fff;
    padding: 6rem 0 7rem;
    position: relative;
    overflow: hidden;
}
.wf-hero::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .12), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(103, 217, 229, .2), transparent 50%);
    pointer-events: none;
}
.wf-hero::after {
    content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 80px;
    background: var(--wf-bg);
    clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 60%);
}
.wf-hero h1 {
    font-weight: 800; letter-spacing: -.03em;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    color: #fff; margin-bottom: 1.2rem;
    animation: fadeInUp .6s var(--wf-ease);
}
.wf-hero .lead {
    font-size: 1.2rem; color: rgba(255, 255, 255, .88);
    max-width: 620px; animation: fadeInUp .7s var(--wf-ease);
}
.wf-hero .badge {
    font-size: .78rem; padding: .5rem .9rem; border-radius: 999px;
    background: rgba(255, 255, 255, .2); color: #fff; backdrop-filter: blur(10px);
    animation: fadeInUp .5s var(--wf-ease);
}
.wf-hero-actions { position: relative; z-index: 2; animation: fadeInUp .8s var(--wf-ease); }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; } to { opacity: 1; }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ================================================================
   COMPOSANTS — Cartes KPI
   ================================================================ */
.wf-kpi-card {
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius-lg);
    padding: 1.4rem 1.3rem;
    box-shadow: var(--wf-shadow-sm);
    transition: transform var(--wf-dur) var(--wf-ease), box-shadow var(--wf-dur);
    position: relative; overflow: hidden;
}
.wf-kpi-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--wf-primary);
    transform: scaleX(0); transform-origin: left;
    transition: transform var(--wf-dur) var(--wf-ease);
}
.wf-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--wf-shadow);
}
.wf-kpi-card:hover::before { transform: scaleX(1); }
.wf-kpi-card .wf-kpi-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; margin-bottom: .8rem;
    background: rgba(11, 61, 145, .1); color: var(--wf-primary);
}
.wf-kpi-card.success .wf-kpi-icon { background: rgba(16, 185, 129, .12); color: var(--wf-success); }
.wf-kpi-card.warning .wf-kpi-icon { background: rgba(245, 158, 11, .12); color: var(--wf-warning); }
.wf-kpi-card.danger .wf-kpi-icon { background: rgba(239, 68, 68, .12); color: var(--wf-danger); }
.wf-kpi-card.info .wf-kpi-icon { background: rgba(14, 165, 183, .12); color: var(--wf-secondary); }

.wf-kpi-card .wf-kpi-value {
    font-size: 2.1rem; font-weight: 800; color: var(--wf-text);
    line-height: 1.1; letter-spacing: -.02em;
}
.wf-kpi-card .wf-kpi-label {
    color: var(--wf-text-muted); font-size: 13px; margin-top: .25rem;
    text-transform: uppercase; letter-spacing: .04em;
}
.wf-kpi-card .wf-kpi-trend {
    font-size: 12px; margin-top: .5rem; display: inline-flex;
    align-items: center; gap: .25rem; font-weight: 500;
}
.wf-kpi-card .wf-kpi-trend.up { color: var(--wf-success); }
.wf-kpi-card .wf-kpi-trend.down { color: var(--wf-danger); }

/* Stat simple (pour back office) */
.wf-stat {
    background: var(--wf-surface); border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius); padding: 1.1rem 1.3rem;
    transition: box-shadow var(--wf-dur);
}
.wf-stat:hover { box-shadow: var(--wf-shadow); }
.wf-stat .value { font-size: 1.75rem; font-weight: 800; color: var(--wf-text); line-height: 1.1; }
.wf-stat .label { color: var(--wf-text-muted); font-size: 13px; margin-top: .2rem; }

/* ================================================================
   SECTIONS
   ================================================================ */
.wf-section { padding: 4.5rem 0; }
.wf-section h2 {
    font-weight: 800; color: var(--wf-text); margin-bottom: 1rem;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
}
.wf-section.bg-alt { background: var(--wf-bg-alt); }
.wf-section-title { text-align: center; margin-bottom: 3rem; }
.wf-section-title h2 { display: inline-block; position: relative; padding-bottom: .8rem; }
.wf-section-title h2::after {
    content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 60px; height: 3px; border-radius: 2px;
    background: linear-gradient(90deg, var(--wf-accent), var(--wf-accent-light));
}
.wf-section-title .eyebrow {
    text-transform: uppercase; letter-spacing: .12em;
    color: var(--wf-secondary); font-weight: 600; font-size: 13px; margin-bottom: .6rem;
}

/* ================================================================
   CARDS (projets, blog, donateurs)
   ================================================================ */
.wf-card-project, .wf-card-blog, .wf-card-donor {
    background: var(--wf-surface); border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius-lg); overflow: hidden;
    transition: transform var(--wf-dur) var(--wf-ease), box-shadow var(--wf-dur);
    height: 100%;
}
.wf-card-project:hover, .wf-card-blog:hover {
    transform: translateY(-4px); box-shadow: var(--wf-shadow-lg);
}
.wf-card-project img, .wf-card-blog img { width: 100%; height: 200px; object-fit: cover; }
.wf-card-project .p-4, .wf-card-blog .p-4 { padding: 1.4rem !important; }
.wf-card-project h5 { color: var(--wf-text); font-weight: 700; }
.wf-card-donor {
    text-align: center; padding: 1.5rem; display: flex;
    align-items: center; justify-content: center; flex-direction: column;
    min-height: 140px;
}

/* ================================================================
   FOOTER
   ================================================================ */
.wf-footer {
    background: #0B1426;
    color: rgba(255, 255, 255, .7);
    padding: 4rem 0 0;
}
.wf-footer h5, .wf-footer h6 { color: #fff; font-weight: 700; margin-bottom: 1rem; }
.wf-footer a { color: rgba(255, 255, 255, .7); }
.wf-footer a:hover { color: #fff; }
.wf-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 1.3rem 0; margin-top: 3rem;
    color: rgba(255, 255, 255, .5);
}
.wf-social {
    width: 38px; height: 38px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, .08); color: #fff;
    transition: all var(--wf-dur);
}
.wf-social:hover {
    background: var(--wf-accent); color: #fff;
    transform: translateY(-3px);
}

/* ================================================================
   BACK OFFICE — Layout
   ================================================================ */
.wf-backoffice { display: flex; min-height: 100vh; background: var(--wf-bg); }

.wf-sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--wf-primary) 0%, var(--wf-primary-dark) 100%);
    color: #fff;
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
    overflow-y: auto;
    transition: width var(--wf-dur) var(--wf-ease);
    z-index: 50;
}
.wf-sidebar::-webkit-scrollbar { width: 6px; }
.wf-sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); border-radius: 4px; }

.wf-sidebar.collapsed { width: 72px; }
.wf-sidebar.collapsed .wf-sidebar-brand span,
.wf-sidebar.collapsed .wf-nav-link span,
.wf-sidebar.collapsed .wf-nav-section { display: none; }
.wf-sidebar.collapsed .wf-nav-link { padding: .8rem; justify-content: center; }

.wf-sidebar-brand {
    display: flex; align-items: center; gap: .7rem;
    padding: 1.1rem 1.25rem; border-bottom: 1px solid rgba(255, 255, 255, .1);
    font-weight: 700; color: #fff;
}
.wf-sidebar-brand img { height: 34px; }
.wf-sidebar-brand .wf-brand-dot-sm {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #67D9E5, #0EA5B7);
    flex-shrink: 0;
}

.wf-sidebar-nav { padding: .6rem 0 2rem; flex: 1; }
.wf-nav-section {
    font-size: 11px; letter-spacing: .1em; color: rgba(255, 255, 255, .45);
    text-transform: uppercase; padding: 1.2rem 1.3rem .4rem;
    font-weight: 600;
}
.wf-nav-link {
    display: flex; align-items: center; gap: .8rem;
    padding: .65rem 1.25rem;
    color: rgba(255, 255, 255, .82); text-decoration: none;
    font-size: 14px; position: relative;
    transition: all var(--wf-dur);
}
.wf-nav-link i { font-size: 1.1rem; width: 20px; text-align: center; flex-shrink: 0; }
.wf-nav-link:hover {
    background: rgba(255, 255, 255, .06); color: #fff;
}
.wf-nav-link.active {
    background: rgba(255, 255, 255, .12); color: #fff;
}
.wf-nav-link.active::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px; background: var(--wf-accent);
}

/* Main content */
.wf-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.wf-topbar-back {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: var(--wf-surface);
    padding: .7rem 1.5rem;
    border-bottom: 1px solid var(--wf-border);
    position: sticky; top: 0; z-index: 40;
    backdrop-filter: blur(10px);
    background-color: color-mix(in srgb, var(--wf-surface) 95%, transparent);
}
.wf-breadcrumbs { color: var(--wf-text-muted); font-size: 13px; flex: 1; display: flex; align-items: center; gap: .4rem; }
.wf-breadcrumbs a { color: var(--wf-text-muted); }
.wf-breadcrumbs a:hover { color: var(--wf-primary); }
.wf-breadcrumbs .bi-chevron-right { font-size: 10px; opacity: .6; }

.wf-topbar-right { display: flex; align-items: center; gap: .5rem; }

.wf-search-btn {
    background: var(--wf-bg);
    border: 1px solid var(--wf-border);
    padding: .4rem .9rem;
    border-radius: 10px;
    color: var(--wf-text-muted);
    font-size: 13px;
    display: inline-flex; align-items: center; gap: .5rem;
    min-width: 240px; transition: all var(--wf-dur);
}
.wf-search-btn:hover { background: var(--wf-surface-alt); border-color: var(--wf-border-strong); }
.wf-search-btn kbd {
    font-size: 11px; padding: 1px 6px; background: var(--wf-border);
    color: var(--wf-text-muted); border-radius: 4px; border: 0;
}

.wf-theme-toggle {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--wf-surface); border: 1px solid var(--wf-border);
    color: var(--wf-text-muted); display: inline-flex;
    align-items: center; justify-content: center;
    transition: all var(--wf-dur);
}
.wf-theme-toggle:hover { background: var(--wf-surface-alt); color: var(--wf-primary); }

.wf-content { padding: 1.8rem; flex: 1; }

.wf-footer-back {
    padding: 1rem 1.8rem; border-top: 1px solid var(--wf-border);
    background: var(--wf-surface); color: var(--wf-text-muted); font-size: 12.5px;
}

/* ================================================================
   CARTES BACK OFFICE
   ================================================================ */
.wf-card {
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    padding: 1.3rem;
    box-shadow: var(--wf-shadow-sm);
    transition: box-shadow var(--wf-dur);
}
.wf-card:hover { box-shadow: var(--wf-shadow); }
.wf-card-header {
    border-bottom: 1px solid var(--wf-border);
    padding-bottom: .7rem; margin-bottom: 1rem;
    display: flex; justify-content: space-between; align-items: center;
}
.wf-card-header h5, .wf-card-header h6 {
    margin: 0; color: var(--wf-text); font-weight: 700;
}
.wf-card h5, .wf-card h6 { color: var(--wf-text); }

/* Page header (titre + actions + breadcrumbs) */
.wf-page-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.wf-page-title { margin: 0; font-weight: 800; font-size: 1.6rem; }
.wf-page-subtitle { color: var(--wf-text-muted); margin-top: .3rem; font-size: 14px; }
.wf-page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ================================================================
   TABLES
   ================================================================ */
.wf-table {
    background: var(--wf-surface); border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius); overflow: hidden;
    box-shadow: var(--wf-shadow-sm);
}
.wf-table table { margin: 0; }
.wf-table thead {
    background: var(--wf-surface-alt); color: var(--wf-text-muted);
    font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
}
.wf-table thead th {
    font-weight: 600; padding: .85rem 1rem;
    border-bottom: 1px solid var(--wf-border);
    color: var(--wf-text-muted);
}
.wf-table tbody td {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--wf-border);
    color: var(--wf-text); font-size: 14px; vertical-align: middle;
}
.wf-table tbody tr:hover { background: var(--wf-surface-alt); }
.wf-table tbody tr:last-child td { border-bottom: 0; }

/* ================================================================
   BADGES STATUT
   ================================================================ */
.badge { padding: .35em .7em; font-weight: 500; border-radius: 8px; font-size: 11.5px; }
.badge-status-functional, .badge-status-functional { background: var(--wf-success-light); color: var(--wf-success-dark); }
.badge-status-partially, .badge-status-partial { background: var(--wf-warning-light); color: #92400E; }
.badge-status-nonfunctional, .badge-status-non { background: var(--wf-danger-light); color: #991B1B; }
.badge-status-abandoned { background: #E5E7EB; color: #4B5563; }
.badge-status-underconstruction, .badge-status-under { background: #DBEAFE; color: #1E40AF; }

.wf-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    margin-right: 6px;
}
.wf-dot-success { background: var(--wf-success); }
.wf-dot-warning { background: var(--wf-warning); }
.wf-dot-danger { background: var(--wf-danger); }
.wf-dot-muted { background: var(--wf-text-subtle); }

/* ================================================================
   MESSAGES FLASH
   ================================================================ */
.wf-messages .alert {
    border: 0; border-left: 4px solid var(--wf-primary);
    background: var(--wf-surface); color: var(--wf-text);
    box-shadow: var(--wf-shadow); border-radius: var(--wf-radius);
    padding: 1rem 1.2rem; animation: slideInRight .3s var(--wf-ease);
}
.wf-messages .alert-success { border-left-color: var(--wf-success); color: var(--wf-success-dark); }
.wf-messages .alert-danger { border-left-color: var(--wf-danger); color: #991B1B; }
.wf-messages .alert-warning { border-left-color: var(--wf-warning); color: #92400E; }
.wf-messages .alert-info { border-left-color: var(--wf-info); color: #1E40AF; }

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ================================================================
   AUTHENTIFICATION
   ================================================================ */
.wf-auth {
    min-height: 100vh; display: flex; align-items: center;
    background: linear-gradient(135deg, var(--wf-primary) 0%, var(--wf-secondary) 100%);
    padding: 2rem 1rem; position: relative; overflow: hidden;
}
.wf-auth::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, .1), transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(103, 217, 229, .2), transparent 50%);
}
.wf-auth-card {
    background: var(--wf-surface); border-radius: var(--wf-radius-lg);
    padding: 2.5rem; box-shadow: var(--wf-shadow-lg);
    max-width: 460px; margin: 0 auto; width: 100%;
    position: relative; z-index: 1;
    animation: fadeInUp .5s var(--wf-ease);
}
.wf-auth-card h1 { color: var(--wf-primary); font-weight: 800; font-size: 1.7rem; }

/* ================================================================
   RECHERCHE GLOBALE (palette Ctrl+K)
   ================================================================ */
.wf-search-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(4px);
    display: none; align-items: flex-start; justify-content: center;
    padding-top: 10vh;
}
.wf-search-overlay.open { display: flex; animation: fadeIn .15s ease; }
.wf-search-palette {
    background: var(--wf-surface); border-radius: var(--wf-radius-lg);
    box-shadow: var(--wf-shadow-lg);
    width: min(640px, 92vw); max-height: 70vh;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.wf-search-input {
    border: 0; border-bottom: 1px solid var(--wf-border);
    padding: 1.1rem 1.3rem; font-size: 16px;
    background: transparent; color: var(--wf-text);
    outline: none; width: 100%;
}
.wf-search-results { overflow-y: auto; padding: .5rem; }
.wf-search-item {
    display: flex; align-items: center; gap: .8rem;
    padding: .7rem 1rem; border-radius: 8px;
    color: var(--wf-text); text-decoration: none; cursor: pointer;
}
.wf-search-item:hover, .wf-search-item.active {
    background: var(--wf-surface-alt); color: var(--wf-primary);
}
.wf-search-item i { color: var(--wf-text-muted); }
.wf-search-item small { color: var(--wf-text-muted); }
.wf-search-footer {
    padding: .7rem 1.3rem; border-top: 1px solid var(--wf-border);
    font-size: 12px; color: var(--wf-text-muted);
    display: flex; justify-content: space-between;
}

/* ================================================================
   LOADING / SKELETON
   ================================================================ */
.wf-skeleton {
    background: linear-gradient(90deg, var(--wf-border) 25%, var(--wf-surface-alt) 50%, var(--wf-border) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.4s infinite;
    border-radius: 6px; display: inline-block;
}
@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ================================================================
   EMPTY STATES
   ================================================================ */
.wf-empty {
    text-align: center; padding: 3rem 1.5rem;
    color: var(--wf-text-muted);
}
.wf-empty-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--wf-surface-alt);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 2rem; color: var(--wf-text-subtle);
    margin-bottom: 1.2rem;
}
.wf-empty h4 { color: var(--wf-text); margin-bottom: .5rem; }

/* ================================================================
   DROPDOWN
   ================================================================ */
.dropdown-menu {
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    box-shadow: var(--wf-shadow-lg);
    padding: .4rem;
    background: var(--wf-surface);
}
.dropdown-item {
    border-radius: 8px; padding: .5rem .85rem;
    color: var(--wf-text); font-size: 13.5px;
    transition: background var(--wf-dur);
}
.dropdown-item:hover, .dropdown-item:focus {
    background: var(--wf-surface-alt); color: var(--wf-primary);
}

/* ================================================================
   LANGUE SELECT
   ================================================================ */
.wf-lang-select {
    background: rgba(255, 255, 255, .1); color: #fff; border: 0;
    padding: .25rem .6rem; border-radius: 8px; font-size: 12px;
}
.wf-lang-select option { color: #000; }

/* Back Office — adapter au surface */
.wf-topbar-back .wf-lang-select {
    background: var(--wf-surface-alt); color: var(--wf-text);
    border: 1px solid var(--wf-border);
}

/* ================================================================
   TABS
   ================================================================ */
.wf-tabs {
    display: flex; gap: .3rem; border-bottom: 1px solid var(--wf-border);
    margin-bottom: 1.5rem; overflow-x: auto;
}
.wf-tab {
    padding: .7rem 1.1rem;
    color: var(--wf-text-muted); font-weight: 500;
    border-bottom: 2px solid transparent; cursor: pointer;
    text-decoration: none; white-space: nowrap;
    transition: all var(--wf-dur);
}
.wf-tab:hover { color: var(--wf-text); }
.wf-tab.active {
    color: var(--wf-primary); border-bottom-color: var(--wf-primary);
}

/* ================================================================
   TIMELINE
   ================================================================ */
.wf-timeline { position: relative; padding-left: 2rem; }
.wf-timeline::before {
    content: ""; position: absolute; left: 8px; top: 0; bottom: 0;
    width: 2px; background: var(--wf-border);
}
.wf-timeline-item { position: relative; padding-bottom: 1.5rem; }
.wf-timeline-item::before {
    content: ""; position: absolute; left: -1.7rem; top: 4px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--wf-surface);
    border: 2px solid var(--wf-primary);
}
.wf-timeline-item.success::before { border-color: var(--wf-success); }
.wf-timeline-item.warning::before { border-color: var(--wf-warning); }
.wf-timeline-item.danger::before { border-color: var(--wf-danger); }

.wf-timeline-item .time { color: var(--wf-text-muted); font-size: 12px; }
.wf-timeline-item h6 { margin: .2rem 0; color: var(--wf-text); font-weight: 600; }
.wf-timeline-item p { margin: 0; color: var(--wf-text-muted); font-size: 13px; }

/* ================================================================
   AVATAR
   ================================================================ */
.wf-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--wf-primary), var(--wf-secondary));
    color: #fff; font-weight: 600; font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.wf-avatar-lg { width: 48px; height: 48px; font-size: 15px; }

/* ================================================================
   PROGRESS
   ================================================================ */
.wf-progress {
    height: 8px; border-radius: 999px;
    background: var(--wf-border); overflow: hidden;
}
.wf-progress-bar {
    height: 100%; background: var(--wf-primary);
    transition: width .3s var(--wf-ease);
}
.wf-progress-bar.success { background: var(--wf-success); }
.wf-progress-bar.warning { background: var(--wf-warning); }
.wf-progress-bar.danger { background: var(--wf-danger); }

/* ================================================================
   PAGINATION
   ================================================================ */
.pagination .page-link {
    border: 1px solid var(--wf-border);
    color: var(--wf-text); border-radius: 8px !important;
    margin: 0 2px; padding: .4rem .8rem;
}
.pagination .page-item.active .page-link {
    background: var(--wf-primary); border-color: var(--wf-primary); color: #fff;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 992px) {
    .wf-sidebar {
        position: fixed; left: -260px; z-index: 100;
        transition: left .2s ease;
    }
    .wf-sidebar.open { left: 0; }
    .wf-backoffice { display: block; }
    .wf-search-btn { min-width: 0; }
    .wf-search-btn span.d-none-mobile { display: none; }
    .wf-topbar-back { padding: .5rem .8rem; }
    .wf-content { padding: 1rem; }
}

/* ================================================================
   RTL
   ================================================================ */
[dir="rtl"] .wf-nav-link.active::before { left: auto; right: 0; }
[dir="rtl"] .wf-timeline { padding-left: 0; padding-right: 2rem; }
[dir="rtl"] .wf-timeline::before { left: auto; right: 8px; }
[dir="rtl"] .wf-timeline-item::before { left: auto; right: -1.7rem; }

/* ================================================================
   UTILS
   ================================================================ */
.cursor-pointer { cursor: pointer; }
.transition-all { transition: all var(--wf-dur) var(--wf-ease); }
.border-wf { border-color: var(--wf-border) !important; }
.bg-wf-surface { background: var(--wf-surface); }
.text-wf-muted { color: var(--wf-text-muted); }
.counter-animate { animation: pulse 2s var(--wf-ease) infinite; }

/* ================================================================
   Canvas Chart.js — prévenir la croissance infinie
   ================================================================ */
.wf-chart-wrap {
    position: relative;
    width: 100%;
}
.wf-chart-wrap canvas {
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Scroll smooth */
html { scroll-behavior: smooth; }

/* Print */
@media print {
    .wf-sidebar, .wf-topbar-back, .wf-footer, .wf-footer-back { display: none !important; }
    .wf-content { padding: 0; }
}

/* ================================================================
   v3 — Raffinements Front Office (sobre + premium)
   ================================================================ */

/* Hero plus sobre, monochrome institutionnel */
.wf-hero {
    background: linear-gradient(180deg, #0A2E7A 0%, #0B3D91 100%);
    padding: 5rem 0 6rem;
}
.wf-hero::before {
    background:
        radial-gradient(circle at 85% 15%, rgba(103, 217, 229, .08), transparent 50%),
        radial-gradient(circle at 15% 85%, rgba(255, 255, 255, .04), transparent 40%);
}
.wf-hero::after {
    height: 60px;
    clip-path: polygon(0 100%, 100% 100%, 100% 30%, 0 100%);
}
.wf-hero h1 {
    font-weight: 700;
    letter-spacing: -.025em;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    line-height: 1.1;
    margin-bottom: 1.2rem;
}
.wf-hero .lead {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .82);
    max-width: 580px;
}
.wf-hero .badge {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .15);
    font-weight: 500;
    letter-spacing: .02em;
    text-transform: none;
    font-size: .75rem;
    padding: .45rem .9rem;
}

/* KPI sobres */
.wf-kpi-card {
    box-shadow: none;
    border: 1px solid var(--wf-border);
    padding: 1.5rem;
    transition: border-color var(--wf-dur), transform var(--wf-dur);
}
.wf-kpi-card::before { display: none; }
.wf-kpi-card:hover {
    transform: none;
    border-color: var(--wf-primary-light);
    box-shadow: 0 2px 10px rgba(15, 23, 42, .05);
}
.wf-kpi-card .wf-kpi-icon {
    width: 40px; height: 40px;
    font-size: 1.1rem;
    border-radius: 10px;
}
.wf-kpi-card .wf-kpi-value {
    font-size: 1.9rem;
    letter-spacing: -.02em;
}
.wf-kpi-card .wf-kpi-label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    margin-top: .3rem;
    color: var(--wf-text-muted);
}

/* Sections plus aérées */
.wf-section { padding: 5rem 0; }
.wf-section h2 {
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--wf-text);
}
.wf-section-title .eyebrow {
    color: var(--wf-secondary-dark);
    font-weight: 600;
    font-size: 12.5px;
    letter-spacing: .12em;
}
.wf-section-title h2::after {
    width: 48px;
    height: 2px;
    background: var(--wf-accent);
    border-radius: 1px;
}

/* Nav plus légère */
.wf-nav { box-shadow: 0 1px 0 rgba(15, 23, 42, .06); }
.wf-nav .nav-link {
    padding: .8rem 1rem;
    font-size: 14px;
    color: var(--wf-text-muted);
}
.wf-nav .nav-link:hover,
.wf-nav .nav-link.active { color: var(--wf-primary); }
.wf-nav .nav-link::after { bottom: .5rem; height: 2px; background: var(--wf-primary); }

/* Cartes projet raffinées */
.wf-card-project, .wf-card-blog, .wf-card-donor {
    box-shadow: none;
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius);
    transition: border-color var(--wf-dur), box-shadow var(--wf-dur), transform var(--wf-dur);
}
.wf-card-project:hover, .wf-card-blog:hover {
    transform: translateY(-2px);
    border-color: var(--wf-primary-light);
    box-shadow: 0 4px 18px rgba(15, 23, 42, .07);
}
.wf-card-project .p-4 h5 { font-weight: 600; }

/* Boutons plus sobres */
.btn-wf-primary {
    box-shadow: none;
    font-weight: 500;
    letter-spacing: 0;
}
.btn-wf-primary:hover {
    box-shadow: 0 2px 8px rgba(11, 61, 145, .2);
}
.btn-wf-accent {
    box-shadow: none;
    font-weight: 500;
}
.btn-wf-accent:hover {
    box-shadow: 0 2px 8px rgba(224, 108, 0, .22);
}

/* Footer plus propre */
.wf-footer {
    background: #0A1A30;
    color: rgba(255, 255, 255, .7);
    padding: 4.5rem 0 0;
}
.wf-footer h5, .wf-footer h6 {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.wf-footer a { color: rgba(255, 255, 255, .65); transition: color var(--wf-dur); }
.wf-footer a:hover { color: #fff; }
.wf-footer-bottom {
    background: #061225;
    color: rgba(255, 255, 255, .5);
    margin-top: 3rem;
}
.wf-social {
    width: 36px; height: 36px;
    background: rgba(255, 255, 255, .06);
    transition: all var(--wf-dur);
}
.wf-social:hover { background: var(--wf-primary-light); transform: none; }

/* Topbar front plus discret */
.wf-topbar {
    background: #0A2E7A;
    font-size: 12.5px;
}
.wf-topbar .small { font-size: 12.5px; }

/* Badges subtils */
.badge.bg-primary-subtle { background: rgba(11, 61, 145, .08) !important; color: var(--wf-primary-dark) !important; }
.badge.bg-success-subtle { background: rgba(16, 185, 129, .1) !important; color: var(--wf-success-dark) !important; }
.badge.bg-info-subtle { background: rgba(14, 165, 183, .1) !important; color: var(--wf-secondary-dark) !important; }
.badge.bg-warning-subtle { background: rgba(245, 158, 11, .12) !important; color: #92400E !important; }

/* Cards donors / members — fond blanc propre */
.wf-card-donor {
    background: var(--wf-surface);
    transition: all var(--wf-dur);
}
.wf-card-donor:hover {
    border-color: var(--wf-primary-light);
    box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
}

/* Stats / KPI icon colors — plus tenues */
.wf-kpi-card.success .wf-kpi-icon { background: rgba(16, 185, 129, .1); }
.wf-kpi-card.warning .wf-kpi-icon { background: rgba(245, 158, 11, .1); }
.wf-kpi-card.danger  .wf-kpi-icon { background: rgba(239, 68, 68, .1); }
.wf-kpi-card.info    .wf-kpi-icon { background: rgba(14, 165, 183, .1); }

/* Contact et formulaires */
.wf-card { box-shadow: none; }

/* FAQ accordion plus net */
.accordion-button {
    font-weight: 500;
    font-size: 15px;
    padding: 1rem 1.2rem;
    color: var(--wf-text);
}
.accordion-button:not(.collapsed) {
    background: var(--wf-surface-alt);
    color: var(--wf-primary);
    box-shadow: none;
}
.accordion-body { color: var(--wf-text-muted); padding: .8rem 1.2rem 1.3rem; }

/* Hero CTA plus sobre */
.wf-hero .btn-light {
    background: #fff;
    color: var(--wf-primary);
    font-weight: 500;
    border: 0;
}
.wf-hero .btn-light:hover { background: #F3F4F6; color: var(--wf-primary-dark); }
.wf-hero .btn-wf-accent {
    background: var(--wf-accent);
    border: 0;
}

/* ================================================================
   BACK OFFICE — Dashboard moderne (dash-hero, KPIs, rankings, feeds)
   ================================================================ */
.wf-dash-hero {
    background: linear-gradient(135deg, #0B3D91 0%, #1F6FB4 55%, #0EA5B7 100%);
    color: #fff;
    border-radius: 20px;
    padding: 1.75rem 2rem 1.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 32px -12px rgba(11, 61, 145, 0.45);
}
.wf-dash-hero::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 85% 20%, rgba(255,255,255,0.18), transparent 45%),
        radial-gradient(circle at 15% 85%, rgba(103,217,229,0.25), transparent 55%);
    pointer-events: none;
}
.wf-dash-hero-content {
    position: relative; z-index: 2;
    display: flex; justify-content: space-between; align-items: flex-start;
    flex-wrap: wrap; gap: 1rem;
}
.wf-dash-hero-title {
    font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em;
    color: #fff; margin: 0 0 .25rem; line-height: 1.15;
}
.wf-dash-hero-name {
    background: linear-gradient(90deg, #FFA057, #67D9E5);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}
.wf-dash-hero-subtitle {
    color: rgba(255,255,255,0.85); margin: 0; font-size: .95rem;
}
.wf-dash-hero-actions {
    display: flex; gap: .5rem; flex-wrap: wrap;
    position: relative; z-index: 2;
}
.wf-dash-hero-actions .btn-light {
    background: rgba(255,255,255,0.95); color: #0B3D91; font-weight: 600; border: 0;
    backdrop-filter: blur(8px);
}
.wf-dash-hero-actions .btn-light:hover { background: #fff; transform: translateY(-1px); }
.wf-dash-hero-actions .btn-outline-light {
    border-color: rgba(255,255,255,0.5); color: #fff; backdrop-filter: blur(8px);
}
.wf-dash-hero-actions .btn-outline-light:hover {
    background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.8);
}

.wf-dash-hero-stats {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 1rem; margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.15);
}
.wf-dash-hero-stat .label {
    font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
    color: rgba(255,255,255,0.65); margin-bottom: .2rem;
}
.wf-dash-hero-stat .value {
    font-size: 1.5rem; font-weight: 800; color: #fff; line-height: 1;
}
@media (max-width: 768px) {
    .wf-dash-hero-stats { grid-template-columns: repeat(2, 1fr); }
    .wf-dash-hero { padding: 1.25rem 1.25rem 1rem; }
}

/* -------- KPI enhanced cards (gradients + sparklines) -------- */
.wf-kpi-enhanced {
    position: relative;
    border-radius: 18px;
    padding: 1.25rem 1.25rem 0;
    background: linear-gradient(135deg, #1F6FB4 0%, #0B3D91 100%);
    color: #fff;
    overflow: hidden;
    min-height: 170px;
    box-shadow: 0 10px 24px -8px rgba(11, 61, 145, 0.35);
    transition: transform .25s var(--wf-ease), box-shadow .25s;
}
.wf-kpi-enhanced:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px -8px rgba(11, 61, 145, 0.45);
}
.wf-kpi-enhanced.success {
    background: linear-gradient(135deg, #10B981 0%, #047857 100%);
    box-shadow: 0 10px 24px -8px rgba(16, 185, 129, 0.4);
}
.wf-kpi-enhanced.warning {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    box-shadow: 0 10px 24px -8px rgba(245, 158, 11, 0.4);
}
.wf-kpi-enhanced.danger {
    background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
    box-shadow: 0 10px 24px -8px rgba(239, 68, 68, 0.4);
}
.wf-kpi-enhanced .kpi-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: .5rem;
}
.wf-kpi-enhanced .kpi-icon {
    font-size: 1.6rem; opacity: .9;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}
.wf-kpi-enhanced .kpi-chip {
    background: rgba(255,255,255,0.25); color: #fff;
    font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
    backdrop-filter: blur(6px);
}
.wf-kpi-enhanced .kpi-chip.pulse {
    animation: wfPulse 1.8s ease-in-out infinite;
    background: rgba(255,255,255,0.35);
}
@keyframes wfPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.5); }
    50% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
}
.wf-kpi-enhanced .kpi-value {
    font-size: 2.2rem; font-weight: 800; line-height: 1;
    letter-spacing: -.02em; margin: .25rem 0;
    text-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.wf-kpi-enhanced .kpi-label {
    font-size: .85rem; opacity: .92; font-weight: 500;
    margin-bottom: .5rem;
}
.wf-kpi-enhanced .kpi-sub {
    font-size: 11px; opacity: .85; padding-bottom: .75rem;
}
.wf-kpi-enhanced .kpi-sub .bi { font-size: 12px; }
.wf-kpi-enhanced .kpi-sparkline {
    width: 100% !important; height: 45px !important;
    position: absolute; left: 0; right: 0; bottom: 0;
    pointer-events: none;
}
.wf-kpi-enhanced .kpi-progress {
    height: 4px; border-radius: 4px; background: rgba(255,255,255,0.2);
    overflow: hidden; margin-top: .4rem;
}
.wf-kpi-enhanced .kpi-progress-bar {
    height: 100%; background: #fff; border-radius: 4px;
    animation: wfGrowBar 1.2s var(--wf-ease);
}
@keyframes wfGrowBar {
    from { width: 0 !important; }
}

/* -------- Mon espace — cards d'action personnelle -------- */
.wf-my-space .wf-section-title {
    color: var(--wf-text); font-weight: 700;
    margin-bottom: .75rem; font-size: 1rem;
}
.wf-myspace-card {
    display: flex; align-items: center; gap: 1rem;
    background: #fff; border-radius: 14px; padding: 1rem 1.25rem;
    border: 1px solid var(--wf-border);
    color: var(--wf-text) !important;
    transition: all .22s var(--wf-ease);
    position: relative;
}
.wf-myspace-card:hover {
    transform: translateY(-2px);
    border-color: var(--wf-primary);
    box-shadow: 0 12px 24px -8px rgba(11, 61, 145, 0.2);
}
.wf-myspace-card.danger:hover { border-color: var(--wf-danger); }
.wf-myspace-card .my-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; flex-shrink: 0;
}
.wf-myspace-card .my-count {
    font-size: 1.6rem; font-weight: 800; color: var(--wf-text); line-height: 1;
}
.wf-myspace-card .my-label {
    font-size: .85rem; color: var(--wf-text-muted); margin-top: 2px;
}
.wf-myspace-card .my-arrow {
    margin-left: auto; color: var(--wf-text-subtle); font-size: 1.1rem;
    transition: transform .22s var(--wf-ease);
}
.wf-myspace-card:hover .my-arrow { transform: translateX(4px); color: var(--wf-primary); }

/* -------- Classement (ranking) -------- */
.wf-ranking { padding: .75rem 1rem; }
.wf-rank-row {
    display: flex; align-items: center; gap: .75rem;
    padding: .55rem 0; border-bottom: 1px solid var(--wf-border);
}
.wf-rank-row:last-child { border-bottom: 0; }
.wf-rank-row.compact { padding: .4rem 0; }
.rank-position {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px; color: #fff; flex-shrink: 0;
    background: var(--wf-text-subtle);
}
.rank-position.rank-1 { background: linear-gradient(135deg, #FBBF24, #D97706); box-shadow: 0 2px 8px rgba(251, 191, 36, .4); }
.rank-position.rank-2 { background: linear-gradient(135deg, #94A3B8, #64748B); }
.rank-position.rank-3 { background: linear-gradient(135deg, #FB923C, #C2410C); }
.rank-body { flex: 1; min-width: 0; }
.rank-name { font-weight: 600; color: var(--wf-text); font-size: .9rem; }
.rank-bar-bg {
    height: 6px; background: var(--wf-surface-alt); border-radius: 4px;
    overflow: hidden; margin-top: 4px;
}
.rank-bar { height: 100%; border-radius: 4px; transition: width 1s var(--wf-ease); }
.rank-bar.success { background: linear-gradient(90deg, #10B981, #34D399); }
.rank-bar.danger { background: linear-gradient(90deg, #EF4444, #F87171); }
.rank-meta { margin-top: 2px; }
.rank-value { font-weight: 700; font-size: .9rem; flex-shrink: 0; white-space: nowrap; }

/* -------- Jauge qualité (cercle conique) -------- */
.wf-quality-gauge {
    display: flex; justify-content: center; padding: .5rem 0;
}
.gauge-circle {
    width: 160px; height: 160px; border-radius: 50%; padding: 14px;
    background: conic-gradient(
        var(--wf-success) 0deg,
        var(--wf-success) calc(var(--rate, 0deg) * 3.6),
        var(--wf-border) calc(var(--rate, 0deg) * 3.6)
    );
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.06);
}
.gauge-inner {
    width: 100%; height: 100%; border-radius: 50%;
    background: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.gauge-value { font-size: 1.8rem; font-weight: 800; color: var(--wf-text); line-height: 1; }
.gauge-label { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--wf-text-muted); margin-top: 4px; }

/* -------- Activity feed -------- */
.wf-activity-feed { padding: .5rem 0; max-height: 360px; overflow-y: auto; }
.feed-item {
    display: flex; gap: .75rem; padding: .75rem 1.15rem;
    border-bottom: 1px solid var(--wf-border);
    transition: background .15s;
}
.feed-item:last-child { border-bottom: 0; }
.feed-item:hover { background: var(--wf-surface-alt); }
.feed-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem; flex-shrink: 0;
    background: var(--wf-surface-alt);
}
.feed-icon.text-primary { background: rgba(11, 61, 145, 0.1); }
.feed-icon.text-warning { background: rgba(245, 158, 11, 0.1); }
.feed-icon.text-danger { background: rgba(239, 68, 68, 0.1); }
.feed-icon.text-success { background: rgba(16, 185, 129, 0.1); }
.feed-body { flex: 1; min-width: 0; }
.feed-text { font-size: .9rem; color: var(--wf-text); line-height: 1.35; }
.feed-sub { margin-top: 1px; }
.feed-time { margin-top: 2px; }
.tiny { font-size: 10.5px; }

/* -------- Alertes mini -------- */
.wf-alert-list { padding: .25rem .75rem; }
.alert-mini {
    display: flex; align-items: center; gap: .65rem;
    padding: .5rem .5rem; border-radius: 8px;
    transition: background .15s;
}
.alert-mini:hover { background: var(--wf-surface-alt); }
.alert-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.alert-dot.bg-danger { animation: wfPulse 1.8s ease-in-out infinite; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }

/* -------- Status badge amélioré -------- */
.wf-status-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: 3px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 600;
    background: var(--wf-surface-alt); color: var(--wf-text);
}
.wf-status-badge .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--wf-text-subtle);
}
.wf-status-badge.success { background: var(--wf-success-light); color: var(--wf-success-dark); }
.wf-status-badge.success .dot { background: var(--wf-success); }
.wf-status-badge.warning { background: var(--wf-warning-light); color: #92400E; }
.wf-status-badge.warning .dot { background: var(--wf-warning); }
.wf-status-badge.danger { background: var(--wf-danger-light); color: #991B1B; }
.wf-status-badge.danger .dot { background: var(--wf-danger); }
.wf-status-badge.muted { background: var(--wf-surface-alt); color: var(--wf-text-muted); }

