/* =============================================================================
   BACKOFFICE SYNEXTA - STYLE PRINCIPAL (v6 — production grade)
   =============================================================================
   Toutes les couleurs en variables CSS. Pour rebrander : modifier :root.
   ============================================================================= */

:root {
    /* ---- Palette principale ---- */
    --color-primary:          #1e3a8a;
    --color-primary-hover:    #1e40af;
    --color-primary-light:    #bfdbfe;
    --color-primary-soft:     #eff6ff;
    --color-primary-dark:     #1e3679;

    /* ---- Accent secondaire (apporte de la richesse visuelle) ---- */
    --color-accent:           #7c3aed;        /* Violet */
    --color-accent-light:     #ede9fe;
    --color-accent-soft:      #f5f3ff;

    /* ---- Neutres (slate, légèrement teintés bleu) ---- */
    --color-bg:               #f7f8fb;
    --color-bg-alt:           #eef2f7;
    --color-surface:          #ffffff;
    --color-surface-raised:   #ffffff;
    --color-border:           #e5e9f0;
    --color-border-strong:    #cbd5e1;

    /* ---- Texte ---- */
    --color-text:             #0f172a;
    --color-text-muted:       #64748b;
    --color-text-light:       #94a3b8;
    --color-text-on-primary:  #ffffff;

    /* ---- États sémantiques ---- */
    --color-success:          #16a34a;
    --color-success-bg:       #dcfce7;
    --color-success-text:     #166534;
    --color-warning:          #ea580c;
    --color-warning-bg:       #fef3c7;
    --color-warning-text:     #92400e;
    --color-danger:           #ef4444;
    --color-danger-bg:        #fee2e2;
    --color-danger-text:      #991b1b;
    --color-info:             #0ea5e9;
    --color-info-bg:          #dbeafe;
    --color-info-text:        #1e40af;

    /* ---- Header / Topbar ---- */
    --header-bg-gradient:     linear-gradient(135deg, #1e40af 0%, #1e3a8a 50%, #1e3679 100%);
    --header-text:            #ffffff;
    --header-icon:            rgba(255, 255, 255, 0.75);
    --header-icon-hover:      #ffffff;
    --header-icon-bg-hover:   rgba(255, 255, 255, 0.10);
    --header-border:          rgba(255, 255, 255, 0.10);
    --header-shadow:          0 1px 3px rgba(15, 23, 42, 0.12), 0 1px 2px rgba(15, 23, 42, 0.06);
    --header-height:          60px;

    /* ---- Sidebar ---- */
    --sidebar-bg:             #ffffff;
    --sidebar-border:         var(--color-border);
    --sidebar-text:           #334155;
    --sidebar-text-muted:     var(--color-text-muted);
    --sidebar-icon-color:     #64748b;
    --sidebar-icon-hover:     var(--color-primary);
    --sidebar-hover-bg:       #f1f5f9;
    --sidebar-active-bg:      var(--color-primary-soft);
    --sidebar-active-text:    var(--color-primary);
    --sidebar-active-icon:    var(--color-primary);
    --sidebar-active-border:  var(--color-primary);
    --sidebar-submenu-bg:     #fafbfc;
    --sidebar-section-color:  #94a3b8;
    --sidebar-shadow:         1px 0 0 rgba(15, 23, 42, 0.04);
    --sidebar-width:          270px;
    --sidebar-width-collapsed:64px;

    /* ---- Footer ---- */
    --footer-bg:              #0f172a;
    --footer-text:            #cbd5e1;
    --footer-text-muted:      #94a3b8;
    --footer-link-hover:      #ffffff;
    --footer-border:          rgba(255, 255, 255, 0.08);
    --footer-bottom-bg:       #020617;

    /* ---- Layout ---- */
    --container-max:          1280px;

    /* ---- Système d'ombres (4 niveaux progressifs) ---- */
    --shadow-xs:              0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm:              0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md:              0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
    --shadow-lg:              0 10px 15px -3px rgba(15, 23, 42, 0.10), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    --shadow-xl:              0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
    --shadow-glow-primary:    0 0 0 4px rgba(30, 58, 138, 0.10);

    /* ---- Rayons ---- */
    --radius-sm:              4px;
    --radius-md:              6px;
    --radius-lg:              8px;
    --radius-xl:              12px;
    --radius-full:            9999px;

    /* ---- Transitions ---- */
    --ease-out:               cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out:            cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring:            cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition:             all 180ms var(--ease-out);
    --transition-slow:        all 280ms var(--ease-out);
    --transition-color:       color 150ms var(--ease-out), background-color 150ms var(--ease-out), border-color 150ms var(--ease-out);
}

/* =============================================================================
   RESET & BASE
   ============================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv11", "ss01", "ss03";  /* ligatures Inter */
}

a { color: inherit; text-decoration: none; }

button {
    font-family: inherit;
    cursor: pointer;
}

ul { list-style: none; margin: 0; padding: 0; }

/* Tabular figures pour TOUS les nombres dans les tableaux */
.numeric, .stat-card-value, .pipeline-stage-count {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* Scrollbar custom */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.15);
    border-radius: 10px;
    border: 2px solid var(--color-bg);
}
::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.25); }

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* =============================================================================
   LAYOUT GÉNÉRAL
   ============================================================================= */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-main {
    display: flex;
    flex: 1;
    width: 100%;
    align-items: flex-start;
}

.app-content {
    flex: 1;
    padding: 28px 32px;
    min-width: 0;
}

.container-bounded {
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
}

/* =============================================================================
   TOPBAR
   =============================================================================
   La topbar s'étale sur 100% de la largeur de l'écran (pas bornée).
   Le contenu intérieur (logo, search, etc.) part des bords de la fenêtre.
   ============================================================================= */
.topbar {
    background: var(--header-bg-gradient);
    color: var(--header-text);
    height: var(--header-height);
    width: 100%;
    border-bottom: 1px solid var(--header-border);
    box-shadow: var(--header-shadow);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-inner {
    /* Pas de max-width : le contenu s'étale sur toute la largeur */
    width: 100%;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-logo {
    display: block;
    width: 140px;
    height: 36px;
    background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAADACAMAAAB/Pny7AAAA7VBMVEX////x7+Lf3dA7g4JNo6T29vZNTlA/P0ExMTS7vLyenp9AQkL39ejJyL9JSk1gYWNcW1rTpUc4ODojIybU1NDm5dpqaWfU0sZBd3ZMlZf1u1B5eXfw8N/ttk9LpKJOoaVCjo3ToDt7o5ssfHxelI+v0s8+SU3n5+WwsKxUVFOlpaOEhoNtbnAuLDMbHB83NTv06Mrx16Xsw3j0wmnXr2DbtW3Zv4fjypvk17Tz3rTtsj/eu3ru5tXmx37QplCjv7bG1MwAcHKSsai2xrvX6OCRwLp1s7IwlZXC39mntbBlkJFLV1pNhopCamtcfnwLNP4gAAAEfklEQVR4nO3bbVfaSByGcUIQgsSoKVMsxqhA6hMuFNe1bN0SQcBK3e//cXYmEElIQpiekyHp3tcrj8cX/vjPJBM9yeUQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEELRXVQFdCGEsnN5/PGAt6siX1dX7WsBnJ2bUkkralql9F5l+bXnu76UW4WjTkfXFaWdvGZXZ59cqdI+5qn9kaMD5ZZ9AB+Ok7bszC03NcJVvsbT3o2iU80fSY+mWqGWyrVkSFyRPFdkl2GU64Qx5QqbC1H5LLyYfP5YoZhdAZjiJa+FG0MuNV0MZn8vcUx+7+C3wnSEYDRguDFilhkwwAADDDDAAAOMr0hk5jBGt9s11HBPdjDOI/Tjl97d3Z/3f3VDNdnBME63V6/XTw4PD78/hP15IDMY9st37+oLzPl5mCYzGLbGen+7GNrXLGMMqe9YFpjzb4+Bv0RlByNJ/9Q9mMPv3QxPRjJOfJjz4DrLMKYvra6zjGOMrGKkng8TcjnLEsZ/NbvP9tVsfs90MQ+BwazBzP/jkSaM1F9iwm4zkRgyaMmy3LBThZH6J+5x5ttjyFEzAkPOmtQiN58Gqz+w3UeAbu/uhGLuQ8+ZURg2Fqfm6my2iXEOm/0vD18j/qMWjmk0XYz8StKDme+SiCezKMxQXvY0ShEmpjDMwGORmy2SZcyoJfsaZBhjr1jkVnYxNc/mXzQkWcUELXLLTjHGe3BexQyDFv9oUoIxKMKIOWgOnkIs8tkoZRimeLbGFvGD/Bg7bC708txIGYZSxua0MJ1aUiTGDqWwRiQ1GPbbq8/jacHJp/Fi7Fb4YNhoaqnBMMvLpOBmRUymETkYOpoUYVTLNE9dzORZDcMM11iarVpqMOq4QCnm3HJqejRLzGCNhWoGKcHQ7UIJ7mDYhMZkFUNGZ2sx8k87FRj1efI+leW2MfyY6M3vjmaYBoxqm2yNnfowU0v1Ykg1zkI1ZPsYg12RPbvf1bx4MbXXWIt759wmhlCLyeZiBjTqEtOIt9BnTnuLGMPZLtMAw70QOD/iYMJPZIEaZKuTscMd89FMyHwyZLTJXFij7WFUYk1PV/eKt7HKMGS0IWX+zLkdDL27RCyw94VmMUzsRdnTgGwJY0/WU1iWROx1J7LAaGwiGuMckq14Cj3Y2ITHwp45BWOce7sVs8TYKqNHnAmfpdmya6KXmSGNC+t2vjsY6ok5kQU0Q+F7hkzYZSx2NuxSx4s5+7EvFvMy3WC/LOLEyM3XmVCMNTXjp/KrGPnos5hXThwMcQ6WiU1GKMa5u5i/B+ZlYpqbXMiygGkUeJZYqjHF2U96U+eypBvDaUkrplQsFo84Kb+AeasImow2+5T0ZNhgBL3aqL3xajgxR7OOCMyF8zqwNvv3E1fyEU9vn523u2+rCWNy+xXnHXeNr5LOlWPR9aQtuapW4Xy3nxX1av2aOko5cUyu3HY/us3TlQ/cHVwmb6Hbpny9m3zlxDfMoh0BCaIghBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIof9T/wGzlgG5tZp6PAAAAABJRU5ErkJggg==");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    flex-shrink: 0;
    transition: opacity 150ms var(--ease-out);
}
.topbar-logo:hover { opacity: 0.85; }

.topbar-spacer { flex: 1; }

/* Burger : masqué en DESKTOP (apparaît uniquement en <=768px via media query) */
.topbar-burger {
    display: none !important;
    flex-shrink: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 35;
    opacity: 0;
    transition: opacity 200ms var(--ease-out);
}

.sidebar-overlay.is-active {
    display: block;
    opacity: 1;
}

/* ---- Quicksearch (topbar) ---- */
.quicksearch {
    position: relative;
    width: 320px;
    max-width: 30vw;
}

.quicksearch input {
    width: 100%;
    height: 36px;
    padding: 0 60px 0 38px;
    background-color: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--header-text);
    font-size: 13px;
    outline: none;
    transition: var(--transition);
    border-radius: var(--radius-md);
}

.quicksearch input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.quicksearch input:hover {
    background-color: rgba(255, 255, 255, 0.14);
}

.quicksearch input:focus {
    background-color: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.quicksearch-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.55);
    pointer-events: none;
    transition: color 150ms var(--ease-out);
}

.quicksearch:focus-within .quicksearch-icon {
    color: rgba(255, 255, 255, 0.85);
}

/* Hint clavier "⌘K" sur la droite */
.quicksearch-hint {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    pointer-events: none;
    font-family: inherit;
}

/* ---- Boutons icônes header ---- */
.icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--header-icon);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.icon-btn:hover {
    color: var(--header-icon-hover);
    background-color: var(--header-icon-bg-hover);
    transform: translateY(-1px);
}

.icon-btn:active { transform: translateY(0); }

.icon-btn .badge {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background-color: var(--color-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    pointer-events: none;
    box-shadow: 0 0 0 2px var(--color-primary-dark);
}

/* Pulsation discrète sur les badges */
.icon-btn .badge::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: var(--color-danger);
    opacity: 0.4;
    animation: pulse-badge 2s ease-in-out infinite;
    z-index: -1;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50%      { transform: scale(1.4); opacity: 0; }
}

/* ---- User menu ---- */
.usermenu { position: relative; }

.usermenu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 10px 0 4px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--header-text);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.usermenu-trigger:hover {
    background-color: var(--header-icon-bg-hover);
    border-color: rgba(255, 255, 255, 0.14);
}

.usermenu-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    text-transform: uppercase;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.usermenu-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- Dropdowns ---- */
.dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 260px;
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-xl);
    z-index: 100;
    border-radius: var(--radius-lg);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
    pointer-events: none;
    transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
}

.dropdown-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.dropdown-header {
    padding: 12px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--color-text);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    transition: var(--transition-color);
}

.dropdown-item svg {
    color: var(--color-text-muted);
    transition: color 150ms var(--ease-out);
}

.dropdown-item:hover { background-color: var(--color-bg-alt); }
.dropdown-item:hover svg { color: var(--color-primary); }

.dropdown-divider {
    height: 1px;
    background: var(--color-border);
    margin: 4px 0;
}

.dropdown-empty {
    padding: 28px 16px;
    font-size: 13px;
    color: var(--color-text-muted);
    text-align: center;
    line-height: 1.5;
}

.dropdown-empty small {
    display: block;
    margin-top: 4px;
    color: var(--color-text-light);
}

/* =============================================================================
   SIDEBAR
   ============================================================================= */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    box-shadow: var(--sidebar-shadow);
    transition: width 280ms var(--ease-out);

    position: sticky;
    top: var(--header-height);
    align-self: flex-start;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
}

.sidebar-header {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 12px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    transition: padding 280ms var(--ease-out), justify-content 280ms var(--ease-out);
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0;
}

.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    border-radius: var(--radius-md);
    transition: var(--transition);
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    color: var(--color-primary);
    background: var(--color-bg-alt);
}

.sidebar-scroll {
    height: calc(100% - 48px);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-scroll::-webkit-scrollbar { width: 6px; }
.sidebar-scroll::-webkit-scrollbar-thumb { border: 1px solid var(--sidebar-bg); }

.sidebar-nav {
    width: 100%;
    padding: 8px 0 24px;
}

.sidebar-nav > li { width: 100%; }

.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 16px 9px 13px;
    color: var(--sidebar-text);
    font-size: 14px;
    font-weight: 500;
    border: none;
    background: transparent;
    text-align: left;
    border-left: 3px solid transparent;
    transition: var(--transition-color);
    white-space: nowrap;
    cursor: pointer;
    overflow: hidden;
}

.sidebar-link:hover {
    background: var(--sidebar-hover-bg);
    color: var(--color-primary);
}

.sidebar-link:hover .sidebar-icon {
    color: var(--sidebar-icon-hover);
    transform: scale(1.08);
}

.sidebar-link.active {
    background: linear-gradient(90deg, var(--sidebar-active-bg) 0%, transparent 100%);
    color: var(--sidebar-active-text);
    border-left-color: var(--sidebar-active-border);
    font-weight: 600;
}

.sidebar-link.active .sidebar-icon {
    color: var(--sidebar-active-icon);
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    flex-shrink: 0;
    color: var(--sidebar-icon-color);
    display: block;
    transition: color 150ms var(--ease-out), transform 200ms var(--ease-out);
}

.sidebar-link-label {
    flex: 1 1 auto;
    transition: opacity 200ms var(--ease-out);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badge optionnel à côté d'un item */
.sidebar-link-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    background: var(--color-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.sidebar-link-badge.is-info { background: var(--color-info); }
.sidebar-link-badge.is-success { background: var(--color-success); }

.sidebar-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--color-text-light);
    transition: transform 220ms var(--ease-out), opacity 200ms var(--ease-out);
}

.sidebar-accordion[aria-expanded="true"] .sidebar-chevron {
    transform: rotate(180deg);
    color: var(--color-primary);
}

/* ---- Sous-menus ---- */
.sidebar-submenu {
    background: var(--sidebar-submenu-bg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 320ms var(--ease-out);
    border-left: 3px solid transparent;
}

.sidebar-submenu.open {
    max-height: 500px;
    border-left-color: var(--color-border);
}

.sidebar-sublink {
    position: relative;
    display: block;
    padding: 8px 16px 8px 51px;
    font-size: 13px;
    color: var(--sidebar-text-muted);
    transition: var(--transition-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-sublink::before {
    content: '';
    position: absolute;
    left: 36px;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-text-light);
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 150ms var(--ease-out), background-color 150ms var(--ease-out);
}

.sidebar-sublink:hover {
    color: var(--color-primary);
    background: rgba(30, 58, 138, 0.04);
}

.sidebar-sublink:hover::before { opacity: 1; background: var(--color-primary); }

.sidebar-sublink.active {
    color: var(--sidebar-active-text);
    background: var(--sidebar-active-bg);
    font-weight: 600;
}

.sidebar-sublink.active::before { opacity: 1; background: var(--color-primary); }

.sidebar-section {
    padding: 14px 16px 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--sidebar-section-color);
    white-space: nowrap;
    overflow: hidden;
}

/* ---- Sidebar fermée (centrage bulletproof via grid) ---- */
.sidebar.collapsed .sidebar-link {
    display: grid;
    place-items: center;
    width: 100%;
    height: 44px;
    padding: 0;
    gap: 0;
    border-left: none;
    border-right: none;
    text-align: center;
}

.sidebar.collapsed .sidebar-link.active {
    box-shadow: inset 3px 0 0 var(--color-primary);
    background: var(--sidebar-active-bg);
}

.sidebar.collapsed .sidebar-link-label,
.sidebar.collapsed .sidebar-chevron,
.sidebar.collapsed .sidebar-link-badge {
    display: none;
}

.sidebar.collapsed .sidebar-icon {
    width: 20px;
    height: 20px;
}

.sidebar.collapsed .sidebar-section { display: none; }

.sidebar.collapsed .sidebar-submenu {
    max-height: 0 !important;
    border-left: none;
}

/* =============================================================================
   FOOTER
   ============================================================================= */
.app-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    margin-top: auto;
}

.footer-cols {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 44px 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-col h4 {
    margin: 0 0 14px 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #fff;
}

.footer-col li { margin-bottom: 8px; }

.footer-col a {
    color: var(--footer-text-muted);
    font-size: 14px;
    transition: var(--transition-color);
}

.footer-col a:hover {
    color: var(--footer-link-hover);
}

.footer-bottom {
    background: var(--footer-bottom-bg);
    border-top: 1px solid var(--footer-border);
}

.footer-bottom-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 16px 24px;
    font-size: 12px;
    color: var(--footer-text-muted);
    text-align: center;
    letter-spacing: 0.01em;
}

/* =============================================================================
   PAGE HEADER
   ============================================================================= */
.page-header {
    margin-bottom: 28px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.page-header-inner { flex: 1; min-width: 0; }

.page-header h1 {
    margin: 0 0 6px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.page-header p {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.page-header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* =============================================================================
   STAT CARDS (KPI)
   ============================================================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 20px 22px;
    box-shadow: var(--shadow-xs);
    border-radius: var(--radius-md);
    transition: var(--transition);
    overflow: hidden;
}

/* Bande colorée à gauche pour identifier le type */
.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-primary);
    transition: width 200ms var(--ease-out);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--color-border-strong);
}

.stat-card:hover::before { width: 5px; }

.stat-card.is-success::before { background: var(--color-success); }
.stat-card.is-warning::before { background: var(--color-warning); }
.stat-card.is-danger::before  { background: var(--color-danger); }
.stat-card.is-accent::before  { background: var(--color-accent); }

.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.stat-card-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
}

.stat-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: var(--color-primary-soft);
    color: var(--color-primary);
    flex-shrink: 0;
}

.stat-card.is-success .stat-card-icon { background: var(--color-success-bg); color: var(--color-success-text); }
.stat-card.is-warning .stat-card-icon { background: var(--color-warning-bg); color: var(--color-warning-text); }
.stat-card.is-danger .stat-card-icon  { background: var(--color-danger-bg);  color: var(--color-danger-text); }
.stat-card.is-accent .stat-card-icon  { background: var(--color-accent-light); color: var(--color-accent); }

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.stat-card-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-success);
    margin-top: 6px;
}

.stat-card-trend.down { color: var(--color-danger); }

.stat-card-trend-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.stat-card-trend:not(.down) .stat-card-trend-arrow {
    border-bottom: 5px solid currentColor;
}

.stat-card-trend.down .stat-card-trend-arrow {
    border-top: 5px solid currentColor;
}

.stat-card-trend-period {
    color: var(--color-text-light);
    font-weight: 400;
    margin-left: 2px;
}

/* =============================================================================
   PANELS / CONTENT GRID (dashboard)
   ============================================================================= */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

@media (max-width: 900px) {
    .content-grid { grid-template-columns: 1fr; }
}

.panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-xs);
    border-radius: var(--radius-md);
}

.panel-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.panel-body {
    padding: 18px;
    font-size: 14px;
    color: var(--color-text-muted);
}

.activity-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 13px;
    color: var(--color-text);
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.activity-list li:last-child { border-bottom: none; }

.activity-time {
    color: var(--color-text-muted);
    font-size: 12px;
    flex-shrink: 0;
}

/* =============================================================================
   PAGES STANDALONE (login, 404, accès limité)
   ============================================================================= */
.standalone-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--color-bg);
    position: relative;
}

.dots-wrapper {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    mask-image: linear-gradient(45deg, transparent 10%, rgba(0,0,0,0.15) 40%, rgba(0,0,0,0.85) 100%);
    -webkit-mask-image: linear-gradient(45deg, transparent 50%, rgba(0,0,0,0.15) 80%, rgba(0,0,0,0.85) 100%);
}

.dots-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, #475569 1.5px, transparent 1.5px);
    background-size: 1em 1em;
}

.standalone-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: var(--color-surface);
    border-top: 4px solid var(--color-primary);
    box-shadow: var(--shadow-xl);
    padding: 36px;
    border-radius: var(--radius-sm);
}

.standalone-card.wide { max-width: 540px; text-align: center; }

.standalone-header { text-align: center; margin-bottom: 24px; }

.standalone-header h1 {
    margin: 0 0 6px 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.01em;
}

.standalone-header p {
    margin: 0;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.form-help {
    margin-top: 6px;
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.form-control {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid var(--color-border-strong);
    font-size: 14px;
    color: var(--color-text);
    outline: none;
    transition: var(--transition);
    border-radius: var(--radius-sm);
}

.form-control:hover { border-color: var(--color-text-muted); }

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 20px;
    background: var(--color-primary);
    color: var(--color-text-on-primary);
    border: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background: var(--color-primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn:active { transform: translateY(0); box-shadow: var(--shadow-xs); }

.btn.btn-block { width: 100%; }
.btn.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }

.btn.btn-secondary {
    background: var(--color-bg-alt);
    color: var(--color-text);
    box-shadow: none;
}

.btn.btn-secondary:hover {
    background: var(--color-border);
    box-shadow: var(--shadow-xs);
}

.btn.btn-ghost {
    background: transparent;
    color: var(--color-primary);
    box-shadow: none;
}

.btn.btn-ghost:hover {
    background: var(--color-primary-soft);
    box-shadow: none;
}

.btn.btn-outline {
    background: transparent;
    color: var(--color-text);
    box-shadow: none;
    border: 1px solid var(--color-border-strong);
}

.btn.btn-outline:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-text-muted);
}

.alert {
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    border-left: 3px solid;
    border-radius: var(--radius-sm);
    line-height: 1.5;
}

.alert-error   { background: var(--color-danger-bg);  color: var(--color-danger-text);  border-color: var(--color-danger); }
.alert-success { background: var(--color-success-bg); color: var(--color-success-text); border-color: var(--color-success); }
.alert-info    { background: var(--color-primary-soft); color: var(--color-primary); border-color: var(--color-primary); }

.error-code {
    font-size: 72px;
    font-weight: 800;
    background: var(--header-bg-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    margin: 0 0 8px 0;
    letter-spacing: -0.04em;
}

.error-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.error-text {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.login-tabs {
    display: flex;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--color-border);
}

.login-tab {
    flex: 1;
    padding: 10px 0;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: var(--transition-color);
}

.login-tab:hover { color: var(--color-text); }

.login-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 600;
}

/* =============================================================================
   ANIMATIONS D'ENTRÉE (subtiles, sur les widgets et stats)
   ============================================================================= */
@media (prefers-reduced-motion: no-preference) {
    .stat-card,
    .widget,
    .panel {
        animation: fadeUp 400ms var(--ease-out) backwards;
    }
    .stat-card:nth-child(1)  { animation-delay: 0ms; }
    .stat-card:nth-child(2)  { animation-delay: 60ms; }
    .stat-card:nth-child(3)  { animation-delay: 120ms; }
    .stat-card:nth-child(4)  { animation-delay: 180ms; }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 768px) {

    .app-content { padding: 16px; }
    .footer-cols { grid-template-columns: 1fr; gap: 24px; }

    .topbar {
        height: auto;
        position: relative;
        box-shadow: none;
    }

    .topbar-inner {
        flex-wrap: wrap;
        padding: 0;
        height: auto;
        row-gap: 0;
    }

    .topbar-burger {
        display: inline-flex !important;
        order: 1;
        margin-left: 8px;
    }

    .topbar-logo {
        order: 2;
        margin-left: 8px;
        width: 120px;
        height: 32px;
    }

    .topbar-spacer {
        order: 3;
        flex: 1 1 auto;
        min-width: 0;
    }

    .topbar-inner > .topbar-burger,
    .topbar-inner > .topbar-logo,
    .topbar-inner > .topbar-spacer {
        height: 50px;
        display: flex;
        align-items: center;
    }

    .topbar-actions {
        order: 10;
        flex-basis: 100%;
        width: 100%;
        padding: 8px 12px;
        gap: 6px;
        background: var(--header-bg-gradient);
        border-top: 1px solid var(--header-border);
        position: sticky;
        top: 0;
        z-index: 50;
        box-shadow: var(--header-shadow);
    }

    .topbar-actions .quicksearch {
        flex: 1 1 auto;
        width: auto;
        max-width: none;
        min-width: 0;
    }

    .quicksearch-hint { display: none; }

    .topbar-actions .quicksearch input {
        height: 34px;
        font-size: 13px;
        padding-right: 12px;
    }

    .topbar-actions .usermenu-name { display: none; }

    .topbar-actions .usermenu-trigger {
        padding: 0 6px;
        gap: 4px;
    }

    .topbar-actions .icon-btn,
    .topbar-actions .usermenu-trigger {
        height: 34px;
    }

    /* Sidebar = drawer mobile */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        height: 100vh;
        width: 270px !important;
        z-index: 60;
        transform: translateX(-100%);
        transition: transform 280ms var(--ease-out);
        box-shadow: 0 0 30px rgba(15, 23, 42, 0.2);
    }

    .sidebar.mobile-open { transform: translateX(0); }

    /* En mobile, on force le mode "déplié" */
    .sidebar.collapsed .sidebar-link {
        display: flex;
        place-items: unset;
        align-items: center;
        height: auto;
        padding: 9px 16px 9px 13px;
        gap: 12px;
        text-align: left;
    }

    .sidebar.collapsed .sidebar-link-label,
    .sidebar.collapsed .sidebar-chevron,
    .sidebar.collapsed .sidebar-link-badge {
        display: inline-flex;
        width: auto !important;
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar.collapsed .sidebar-section {
        display: block;
        padding: 14px 16px 6px;
        height: auto;
        margin: 0;
        visibility: visible;
    }

    .sidebar-header { justify-content: flex-end; }

    .standalone-shell .topbar-burger { display: none; }

    .page-header { flex-direction: column; align-items: stretch; }
    .page-header-actions { width: 100%; }
}

@media (max-width: 480px) {
    .topbar-actions { gap: 4px; }
    .topbar-actions .quicksearch input { padding-left: 32px; }
}

/* =============================================================================
   PRINT-FRIENDLY (style.css)
   ============================================================================= */
@media print {
    .topbar,
    .sidebar,
    .sidebar-overlay,
    .app-footer { display: none !important; }

    .app-shell { display: block; }
    .app-main { display: block; }
    .app-content {
        padding: 0 !important;
        width: 100% !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 11pt;
    }

    @page {
        margin: 1.5cm;
    }

    h1, h2, h3, h4 {
        page-break-after: avoid;
    }

    /* Liens noirs */
    a {
        color: #000 !important;
        text-decoration: none !important;
    }

    /* Ne pas couper certains blocs */
    .page-header,
    .stat-card,
    .panel,
    .widget {
        page-break-inside: avoid;
    }

    /* Pas d'animations */
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* =============================================================================
   PROSE — pages de contenu textuel (longs articles, CGV, doc...)
   =============================================================================
   Optimisé pour la lecture : interlignage généreux, hiérarchie typographique
   marquée, longueur de ligne raisonnable.
   ============================================================================= */
.prose {
    max-width: 100%;
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.7;
}

.prose > * + * {
    margin-top: 1.2em;
}

.prose h2 {
    margin-top: 2.5em;
    margin-bottom: 0.8em;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-text);
    padding-bottom: 0.4em;
    border-bottom: 1px solid var(--color-border);
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    margin-top: 2em;
    margin-bottom: 0.6em;
    font-size: 17px;
    font-weight: 600;
    color: var(--color-text);
}

.prose h4 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-size: 15px;
    font-weight: 600;
}

.prose p {
    margin: 0;
}

.prose a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: var(--color-primary-light);
    text-underline-offset: 2px;
    transition: var(--transition-color);
}

.prose a:hover {
    color: var(--color-primary-hover);
    text-decoration-color: var(--color-primary);
}

.prose strong { font-weight: 600; color: var(--color-text); }
.prose em { font-style: italic; }

.prose code {
    padding: 1px 6px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.88em;
    color: #be185d;
}

.prose pre {
    margin: 1.2em 0;
    padding: 16px 18px;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    -webkit-overflow-scrolling: touch;
}

.prose pre code {
    background: transparent;
    border: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

.prose ul, .prose ol {
    padding-left: 1.5em;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose ul ul { list-style: circle; }

.prose li {
    margin: 0.4em 0;
}

.prose li > ul,
.prose li > ol {
    margin-top: 0.3em;
}

.prose blockquote {
    margin: 1.5em 0;
    padding: 14px 20px;
    border-left: 4px solid var(--color-primary);
    background: var(--color-primary-soft);
    color: var(--color-text);
    font-style: italic;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.prose blockquote cite {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--color-text-muted);
    font-style: normal;
}

.prose blockquote cite::before { content: '— '; }

.prose hr {
    border: none;
    height: 1px;
    background: var(--color-border);
    margin: 2.5em 0;
}

/* Tableaux */
.prose-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.2em 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.prose-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 480px;
}

.prose-table thead th {
    text-align: left;
    padding: 10px 14px;
    background: #fafbfc;
    border-bottom: 1px solid var(--color-border);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
}

.prose-table thead th.text-right { text-align: right; }
.prose-table thead th.text-center { text-align: center; }

.prose-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    vertical-align: top;
}

.prose-table tbody td.text-right { text-align: right; }
.prose-table tbody td.text-center { text-align: center; }
.prose-table tbody tr:last-child td { border-bottom: none; }
.prose-table tbody tr:nth-child(even) { background: #fafbfc; }

.prose-table tfoot td {
    padding: 11px 14px;
    border-top: 2px solid var(--color-border);
    background: var(--color-bg-alt);
    font-weight: 600;
}

.prose-table tfoot td.text-right { text-align: right; }

/* Description list */
.prose-dl {
    margin: 1.2em 0;
}

.prose-dl dt {
    font-weight: 600;
    color: var(--color-text);
    margin-top: 1em;
}

.prose-dl dt:first-child { margin-top: 0; }

.prose-dl dd {
    margin: 4px 0 0 0;
    padding-left: 16px;
    border-left: 2px solid var(--color-border);
    color: var(--color-text-muted);
}

/* Callouts (info / warning / success) */
.prose-callout {
    margin: 1.5em 0;
    padding: 14px 16px;
    border-left: 4px solid;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 14px;
    line-height: 1.6;
}

.prose-callout strong {
    display: inline;
    margin-right: 4px;
}

.prose-callout.is-info {
    background: var(--color-info-bg);
    color: var(--color-info-text);
    border-color: var(--color-info);
}

.prose-callout.is-warning {
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
    border-color: var(--color-warning);
}

.prose-callout.is-success {
    background: var(--color-success-bg);
    color: var(--color-success-text);
    border-color: var(--color-success);
}

.prose-callout.is-danger {
    background: var(--color-danger-bg);
    color: var(--color-danger-text);
    border-color: var(--color-danger);
}

/* Figure / image illustrative */
.prose-figure {
    margin: 1.5em 0;
}

.prose-figure-placeholder {
    height: 200px;
    background: var(--color-bg-alt);
    border: 2px dashed var(--color-border-strong);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 13px;
    font-style: italic;
}

.prose-figure figcaption {
    margin-top: 8px;
    font-size: 13px;
    color: var(--color-text-muted);
    text-align: center;
    font-style: italic;
}

/* Print pour les pages prose */
@media print {
    .prose {
        max-width: 100% !important;
        font-size: 11pt;
        line-height: 1.5;
    }

    .prose h2,
    .prose h3,
    .prose h4 {
        color: #000 !important;
    }

    .prose pre {
        background: #f5f5f5 !important;
        color: #000 !important;
        border: 1px solid #888;
    }

    .prose code {
        background: #f5f5f5 !important;
        color: #000 !important;
    }

    .prose blockquote {
        background: #f5f5f5 !important;
        color: #000 !important;
        border-left-color: #888 !important;
    }

    .prose-callout {
        background: #f5f5f5 !important;
        color: #000 !important;
        border-color: #888 !important;
    }

    .prose-table thead th,
    .prose-table tfoot td {
        background: #f0f0f0 !important;
        color: #000 !important;
    }

    .prose-table-wrap {
        overflow: visible !important;
        border-color: #888 !important;
    }

    .prose-figure-placeholder {
        display: none;
    }
}
