/*
 * Fonts: Google Fonts avec fallback système
 * Si offline, utilise les fonts système natives
 */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* Fallback: définir des fonts locales si Google Fonts échoue */
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 400;
    src: local('Segoe UI'), local('SF Pro Display'), local('Helvetica Neue');
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 400;
    src: local('Cascadia Code'), local('Fira Code'), local('Consolas'), local('Monaco');
    font-display: swap;
}

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

:root {
    /* ========== COULEURS ========== */
    --color-bg-deep: #07070c;
    --color-bg-accent: #0e0e18;
    --color-bg-card: rgba(14, 14, 24, 0.82);
    --color-bg-elevated: rgba(24, 24, 40, 0.92);
    --color-bg-surface: rgba(20, 20, 34, 0.6);
    --color-card: rgba(255, 255, 255, 0.05);
    --color-border: rgba(255, 255, 255, 0.1);
    --color-border-light: rgba(255, 255, 255, 0.06);
    --color-border-glow: rgba(99, 102, 241, 0.35);
    --color-border-subtle: rgba(255, 255, 255, 0.04);
    --color-text: #eeeef3;
    --color-text-secondary: rgba(255, 255, 255, 0.7);
    --color-muted: rgba(255, 255, 255, 0.45);
    --color-brand: #6366f1;
    --color-brand-light: #818cf8;
    --color-brand-strong: #4f46e5;
    --color-brand-glow: rgba(99, 102, 241, 0.15);
    --color-accent: #06b6d4;
    --color-accent-light: #22d3ee;
    --color-accent-glow: rgba(6, 182, 212, 0.25);
    --color-success: #10b981;
    --color-success-glow: rgba(16, 185, 129, 0.2);
    --color-warning: #f59e0b;
    --color-warning-glow: rgba(245, 158, 11, 0.2);
    --color-danger: #ef4444;
    --color-danger-glow: rgba(239, 68, 68, 0.2);
    --color-info: #3b82f6;

    /* ========== TYPOGRAPHIE - Echelle modulaire (ratio 1.25) ========== */
    --font-size-xs: 0.64rem;
    /* 10.24px */
    --font-size-sm: 0.8rem;
    /* 12.8px */
    --font-size-base: 1rem;
    /* 16px */
    --font-size-md: 1.125rem;
    /* 18px */
    --font-size-lg: 1.25rem;
    /* 20px */
    --font-size-xl: 1.563rem;
    /* 25px */
    --font-size-2xl: 1.953rem;
    /* 31.25px */
    --font-size-3xl: 2.441rem;
    /* 39px */
    --font-size-4xl: 3.052rem;
    /* 48.8px */

    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    --line-height-tight: 1.2;
    --line-height-snug: 1.375;
    --line-height-normal: 1.6;
    --line-height-relaxed: 1.75;

    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;
    --letter-spacing-widest: 0.1em;

    /* ========== ESPACEMENTS - Echelle 8pt ========== */
    --space-2xs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    /* ========== RAYONS ========== */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 999px;

    /* ========== OMBRES - Multi-layer pour profondeur ========== */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.15);
    --shadow-card:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 12px 40px rgba(0, 0, 0, 0.2);
    --shadow-card-hover:
        0 0 0 1px rgba(99, 102, 241, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 20px 60px rgba(99, 102, 241, 0.12),
        0 0 80px rgba(99, 102, 241, 0.06);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15), 0 0 60px rgba(99, 102, 241, 0.05);
    --shadow-glow-accent: 0 0 30px rgba(6, 182, 212, 0.15), 0 0 60px rgba(6, 182, 212, 0.05);
    --shadow-inset: inset 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    --shadow-float:
        0 12px 28px rgba(0, 0, 0, 0.35),
        0 24px 60px rgba(0, 0, 0, 0.15);

    /* ========== BREAKPOINTS ========== */
    --bp-desktop: 1200px;
    --bp-tablet: 1024px;
    --bp-medium: 768px;
    --bp-small: 640px;

    /* ========== TRANSITIONS ========== */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-spring: 0.6s cubic-bezier(0.22, 1, 0.36, 1);

    /* ========== Z-INDEX ========== */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 500;
    --z-modal: 1000;
    --z-toast: 1500;
}

/* =========================================================
   NOTIFICATIONS (cloche + historique)
   - La cloche doit rester en haut à droite
   - L'historique doit être caché par défaut (sinon il apparaît "au milieu")
   ========================================================= */
.notification-bell {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(18, 18, 28, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    z-index: calc(var(--z-toast) + 2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    user-select: none;
}

.notification-bell:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(18, 18, 28, 0.78);
}

.notification-bell .bell-icon {
    font-size: 18px;
    line-height: 1;
    display: block;
    width: 18px;
    height: 18px;
    position: relative;
}

/* Cloche CSS (sans emoji) */
.notification-bell .bell-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 2px;
    width: 14px;
    height: 12px;
    background: currentColor;
    border-radius: 7px 7px 0 0;
}

.notification-bell .bell-icon::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 6px;
    width: 6px;
    height: 4px;
    background: currentColor;
    border-radius: 0 0 3px 3px;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(18, 18, 28, 0.95);
}

.notification-badge.hidden {
    display: none;
}

/* Conteneur "legacy" (si jamais utilisé) */
.notification-container {
    position: fixed;
    top: 72px;
    right: 18px;
    z-index: calc(var(--z-toast) + 1);
    pointer-events: none;
}

.notification-history {
    position: fixed;
    top: 72px;
    right: 18px;
    width: min(420px, calc(100vw - 36px));
    max-height: min(70vh, 620px);
    overflow: hidden;
    background: rgba(18, 18, 28, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    z-index: calc(var(--z-toast) + 1);
    display: none;
    /* IMPORTANT: caché par défaut */
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.notification-history.show {
    display: block;
}

.notification-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notification-history-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-history-title {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
}

.notification-history-clear {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.82);
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
}

.notification-history-clear:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
}

.notification-history-body {
    overflow: auto;
    max-height: calc(min(70vh, 620px) - 52px);
    padding: 10px;
}

.notification-history-item {
    padding: 10px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 10px;
    transition: all 0.2s;
}

.notification-history-item.unread {
    border-left: 3px solid var(--color-brand);
    background: rgba(99, 102, 241, 0.05);
}

.notification-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-mark-read {
    background: transparent;
    border: none;
    color: var(--color-brand-light);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.btn-mark-read:hover {
    background: rgba(99, 102, 241, 0.1);
    color: white;
}

.notification-history-empty {
    padding: 16px 10px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
}

.notification-show-more {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px dashed rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    color: var(--color-brand-light);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
}

.notification-show-more:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--color-brand);
}

body {
    background: var(--color-bg-deep);
    background-attachment: fixed;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    padding: var(--space-lg);
    position: relative;
    overflow-x: hidden;
    color: var(--color-text);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    letter-spacing: var(--letter-spacing-normal);
    font-weight: var(--font-weight-normal);
}

/* ============================================
   SYSTÈME TYPOGRAPHIQUE
   ============================================ */

/* Titres avec hiérarchie claire */
h1,
.h1 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: var(--space-lg);
}

h2,
.h2 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: var(--space-md);
}

h3,
.h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-snug);
    margin-bottom: var(--space-sm);
}

h4,
.h4 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-snug);
    margin-bottom: var(--space-sm);
}

h5,
.h5 {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-normal);
    margin-bottom: var(--space-xs);
}

h6,
.h6 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-normal);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wider);
    margin-bottom: var(--space-xs);
}

/* Classes de taille de texte */
.text-xs {
    font-size: var(--font-size-xs);
}

.text-sm {
    font-size: var(--font-size-sm);
}

.text-base {
    font-size: var(--font-size-base);
}

.text-md {
    font-size: var(--font-size-md);
}

.text-lg {
    font-size: var(--font-size-lg);
}

.text-xl {
    font-size: var(--font-size-xl);
}

.text-2xl {
    font-size: var(--font-size-2xl);
}

.text-3xl {
    font-size: var(--font-size-3xl);
}

/* Classes de poids */
.font-normal {
    font-weight: var(--font-weight-normal);
}

.font-medium {
    font-weight: var(--font-weight-medium);
}

.font-semibold {
    font-weight: var(--font-weight-semibold);
}

.font-bold {
    font-weight: var(--font-weight-bold);
}

/* Classes de couleur de texte */
.text-primary {
    color: var(--color-text);
}

.text-secondary {
    color: var(--color-text-secondary);
}

.text-muted {
    color: var(--color-muted);
}

.text-brand {
    color: var(--color-brand);
}

.text-accent {
    color: var(--color-accent);
}

.text-success {
    color: var(--color-success);
}

.text-warning {
    color: var(--color-warning);
}

.text-danger {
    color: var(--color-danger);
}

/* Texte avec gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--color-brand-light) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Label/Overline */
.overline {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-widest);
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
}

/* ============================================
   HIÉRARCHIE VISUELLE - EMPHASIS
   ============================================ */

/* Hero section - élément principal de la page */
.hero {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.hero-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-extrabold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, #fff 0%, var(--color-brand-light) 50%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

/* Section avec titre + description */
.section-intro {
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    margin-bottom: var(--space-xs);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--color-brand), var(--color-accent));
    border-radius: 2px;
}

.section-description {
    color: var(--color-text-secondary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
}

/* Carte mise en avant (featured) */
.card-featured {
    position: relative;
    border: 2px solid transparent;
    background:
        linear-gradient(var(--color-bg-card), var(--color-bg-card)) padding-box,
        linear-gradient(135deg, var(--color-brand), var(--color-accent)) border-box;
}

.card-featured::after {
    content: '⭐';
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    font-size: var(--font-size-sm);
}

/* Badge de statut */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
    padding: var(--space-2xs) var(--space-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
}

.badge-brand {
    background: rgba(99, 102, 241, 0.15);
    color: var(--color-brand-light);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ============================================
   ACCESSIBILITÉ - Focus & Contraste
   ============================================ */

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@import 'chat.css';

/* Background Effects - Aurora nebula */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 90% 60% at 15% -20%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 70% 50% at 85% 110%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 60% 20%, rgba(99, 102, 241, 0.04) 0%, transparent 60%),
        radial-gradient(circle at 30% 70%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: aurora-drift 25s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }

    100% {
        opacity: 1;
    }
}

/* Subtle dot grid pattern */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
}

/* LAYOUT HELPERS */
.page-shell {
    width: min(1280px, 100%);
    margin: 0 auto;
}

.stack {
    display: flex;
    flex-direction: column;
}

.gap-xs {
    gap: var(--space-xs);
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.gap-xl {
    gap: var(--space-xl);
}

.grid-auto {
    display: grid;
    gap: var(--space-md);
}

.grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-responsive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.action-grid .btn {
    flex-direction: column;
    height: 100px;
    padding: var(--space-md);
    gap: var(--space-xs);
    font-size: 13px;
    background: rgba(255, 255, 255, 0.03);
}

.action-grid .btn .card-icon {
    font-size: 24px;
}

.layout-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-xl);
    align-items: start;
}

.widget-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
}

.section-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.section-meta {
    font-size: 0.75rem;
    color: var(--color-muted);
}

.section-divider {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.meta-label {
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.02em;
    color: var(--color-text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.header-center {
    text-align: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
}

/* Jobs widget */
.job-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
}

.job-row:last-child {
    border-bottom: none;
}

/* Automation row - format compact sur une ligne */
.automation-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-md);
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.15s ease;
    border-radius: 4px;
    margin-bottom: 2px;
}

.automation-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.automation-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.automation-main {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
}

.automation-title {
    font-weight: 500;
    font-size: 0.9rem;
    /* Augmenté de 0.85rem à 0.9rem pour meilleure lisibilité */
    color: var(--color-text);
    flex: 1;
    min-width: 0;
    line-height: 1.4;
}

.automation-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.automation-details {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.8rem;
    /* Augmenté de 0.75rem à 0.8rem */
    color: var(--color-muted);
    flex-shrink: 0;
}

.automation-detail-item {
    white-space: nowrap;
}

.automation-extra {
    margin-top: 4px;
    font-size: 0.7rem;
    color: var(--color-muted);
    padding-left: var(--space-sm);
}

.automation-next-run-inline {
    color: #8ab4f8;
}

.automation-error-inline {
    color: #ff9800;
}

/* Scrollbar personnalisée pour la zone des automations */
#jobsWidget::-webkit-scrollbar {
    width: 8px;
}

#jobsWidget::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

#jobsWidget::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

#jobsWidget::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   AUTOMATIONS ACCORDION
   ============================================ */

.automations-alert-banner {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.automations-alert-banner.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ff6b6b;
}

.automations-alert-banner.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.automations-accordion {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.accordion-category {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 4px;
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.15s ease;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.accordion-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.accordion-chevron {
    display: inline-block;
    width: 16px;
    font-size: 0.75rem;
    color: var(--color-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.accordion-category.open .accordion-chevron {
    transform: rotate(90deg);
}

.accordion-cat-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
}

.accordion-cat-count {
    font-size: 0.75rem;
    color: var(--color-muted);
    opacity: 0.7;
}

.accordion-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.accordion-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.accordion-status-pill.pill-ok {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.accordion-status-pill.pill-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.accordion-status-pill.pill-error {
    background: rgba(239, 68, 68, 0.2);
    color: #ff6b6b;
}

.accordion-body {
    display: none;
    padding: 0 4px 4px;
}

.accordion-category.open .accordion-body {
    display: block;
}

/* ── Auto-table: colonnes alignees ── */
.auto-table {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}

.auto-row {
    display: grid;
    grid-template-columns: 52px 1fr 68px 76px 76px 120px;
    gap: 0 12px;
    align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.035);
    min-height: 36px;
}

.auto-row:last-child {
    border-bottom: none;
}

.auto-row:not(.auto-row-header):hover {
    background: rgba(255, 255, 255, 0.025);
    border-radius: 4px;
}

/* Header row */
.auto-row-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 4px 14px 6px;
    min-height: unset;
}

.auto-row-header .auto-col {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.5;
}

/* Column base */
.auto-col {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Status badge column */
.auto-col-status {
    text-align: center;
}

.auto-col-status .automation-status-badge {
    display: inline-block;
    font-size: 0.6rem;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Name column - two-line layout */
.auto-col-name {
    display: flex;
    flex-direction: column;
    gap: 1px;
    white-space: normal;
    overflow: hidden;
}

.auto-name-text {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auto-col-deps-text {
    font-size: 0.65rem;
    color: var(--color-muted);
    opacity: 0.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Trigger column */
.auto-col-trigger {
    font-size: 0.6rem;
    text-align: center;
    padding: 2px 0;
    color: var(--color-muted);
    opacity: 0.7;
}

/* Date columns */
.auto-col-last,
.auto-col-next {
    font-size: 0.72rem;
    color: var(--color-muted);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.auto-col-next {
    color: #8ab4f8;
    opacity: 0.8;
}

.schedule-label {
    font-size: 0.65rem;
    color: var(--color-muted);
    opacity: 0.7;
    font-style: italic;
    letter-spacing: 0.01em;
}

/* Action button column */
.auto-col-action {
    text-align: right;
}

.auto-action-btn {
    font-size: 0.65rem !important;
    padding: 3px 10px !important;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.auto-row:hover .auto-action-btn {
    opacity: 1;
}

/* Message row spans full width */
.auto-row-message {
    grid-column: 1 / -1;
    font-size: 0.68rem;
    color: var(--color-muted);
    padding: 2px 14px 4px 64px;
    opacity: 0.6;
    line-height: 1.3;
}

.auto-row-message.msg-error {
    color: #ff6b6b;
    opacity: 0.8;
}

.auto-row-message.msg-warning {
    color: #fbbf24;
    opacity: 0.7;
}

/* Card links with icon */
.card-link {
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-xl);
    transition: transform 0.2s ease;
}

.card-link span {
    color: var(--color-text);
}

.card-label {
    font-size: 0.85rem;
    font-weight: 600;
}

.card-link .card-icon {
    font-size: 1.75rem;
}

.card-link:hover {
    transform: translateY(-2px);
}

.content-card {
    padding: var(--space-lg);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2xs);
    padding: 0 var(--space-sm);
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.7rem;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.btn-sm {
    font-size: 0.75rem;
    padding: var(--space-xs) var(--space-sm);
}

/* NAVIGATION */
.nav-container {
    position: relative;
    z-index: 10;
    margin-bottom: var(--space-lg);
}

.nav-bar {
    background: rgba(10, 10, 18, 0.75);
    backdrop-filter: blur(28px) saturate(1.3);
    -webkit-backdrop-filter: blur(28px) saturate(1.3);
    border-radius: var(--radius-xl);
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 9px 16px;
    background: transparent;
    color: var(--color-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 13px;
    transition: var(--transition-base);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
    position: relative;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text);
    border-color: transparent;
}

.nav-btn.active {
    background: rgba(99, 102, 241, 0.15);
    color: white;
    font-weight: 600;
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow:
        0 0 20px rgba(99, 102, 241, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ============================================
   HEADER - Barre supérieure
   ============================================ */
.header {
    text-align: center;
    color: white;
    margin: 0;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky, 100);
    min-height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-xl);
    margin-bottom: var(--space-lg);
    background: rgba(10, 10, 18, 0.7);
    backdrop-filter: blur(28px) saturate(1.2);
    -webkit-backdrop-filter: blur(28px) saturate(1.2);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03),
        0 4px 24px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.header h1 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    margin: 0;
    letter-spacing: var(--letter-spacing-tight);
    background: linear-gradient(135deg, #fff 0%, var(--color-brand-light) 50%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.header-center {
    text-align: center;
    flex: 1;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.health-indicators {
    font-size: 11px;
    color: var(--color-text-secondary, #888);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.health-indicators span[id^="status-"] {
    font-weight: 600;
}

.health-indicators .status-ok {
    color: #4ade80;
    font-weight: 600;
}

.health-indicators .status-ko {
    color: #f87171;
    font-weight: 600;
}

.health-indicators .status-loading {
    color: #888;
    font-weight: 400;
}

.header-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-top: var(--space-2xs);
}

/* CONTAINER */
.container {
    max-width: 1600px;
    min-height: calc(100vh - 160px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-md);
    position: relative;
    z-index: 1;
    padding: 0;
    align-items: start;
}

.container.two-cols {
    grid-template-columns: repeat(2, 1fr);
}

.container.three-cols {
    grid-template-columns: repeat(3, 1fr);
}

.container.four-cols {
    grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   CARTES - Design System
   ============================================ */
.card {
    background: var(--color-bg-card);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border);
    transition:
        transform var(--transition-spring),
        box-shadow var(--transition-smooth),
        border-color var(--transition-base);
    height: fit-content;
    position: relative;
    overflow: hidden;
}

/* Ligne lumineuse en haut */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(99, 102, 241, 0.4) 20%,
            rgba(6, 182, 212, 0.6) 50%,
            rgba(99, 102, 241, 0.4) 80%,
            transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

/* Subtle inner glow at top */
.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.04) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-smooth);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(99, 102, 241, 0.2);
}

.card:hover::before {
    opacity: 1;
}

.card:hover::after {
    opacity: 1;
}

/* Card avec interaction active */
.card:active {
    transform: translateY(-1px);
    transition: var(--transition-fast);
}

/* Card header */
.card h2 {
    color: var(--color-text);
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    white-space: nowrap;
    overflow: visible;
    letter-spacing: var(--letter-spacing-tight);
}

/* Card subheader */
.card h3 {
    margin: var(--space-md) 0 var(--space-sm) 0;
    color: var(--color-accent);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    white-space: nowrap;
    overflow: visible;
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wider);
}

/* Variantes de cartes */
.card-compact {
    padding: var(--space-md);
}

.card-elevated {
    background: var(--color-bg-elevated);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.card-interactive {
    cursor: pointer;
}

.card-interactive:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Card avec bordure colorée */
.card-accent {
    border-left: 4px solid var(--color-accent);
}

.card-success {
    border-left: 4px solid var(--color-success);
}

.card-warning {
    border-left: 4px solid var(--color-warning);
}

.card-danger {
    border-left: 4px solid var(--color-danger);
}

/* ============================================
   BOUTONS - Micro-interactions
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    margin: var(--space-xs) 0;
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition-base);
    border: 1px solid var(--color-border);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
}

/* Effet ripple au click */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    transition: width 0.5s ease, height 0.5s ease;
    z-index: 0;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Gradient overlay au hover */
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-accent) 100%);
    opacity: 0;
    transition: var(--transition-base);
    z-index: -1;
}

.btn:hover::after {
    opacity: 1;
}

.btn:hover {
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

.btn:active {
    transform: translateY(0px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

/* Focus visible */
.btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 3px;
}

/* Bouton pleine largeur */
.btn-full {
    width: 100%;
    display: flex;
}

/* Tailles de boutons */
.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-base);
    border-radius: var(--radius-lg);
}

/* Bouton primaire (rempli) */
.btn-primary {
    background: linear-gradient(135deg, var(--color-brand) 0%, var(--color-brand-strong) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.45);
}

.btn-primary::after {
    background: linear-gradient(135deg, var(--color-brand-light) 0%, var(--color-brand) 100%);
}

/* Bouton secondaire (contour) */
.btn-secondary {
    background: transparent;
    border: 2px solid var(--color-brand);
    color: var(--color-brand-light);
}

.btn-secondary:hover {
    background: var(--color-brand);
    color: white;
}

/* Bouton ghost (minimal) */
.btn-ghost {
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-text);
    transform: translateY(0);
    box-shadow: none;
}

.btn-ghost::after {
    display: none;
}

/* États */
.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-loading {
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: btn-spin 0.8s linear infinite;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   DESIGN SYSTEM - Action Buttons
   ============================================ */
.btn-action-compact {
    font-size: 11px !important;
    padding: 10px !important;
    text-align: center;
    text-decoration: none;
    border: none !important;
    color: white !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-firefly {
    background: linear-gradient(135deg, #ff6d00 0%, #ff9100 100%) !important;
    font-size: 9px !important;
    padding: 6px 8px !important;
}

.btn-anomalies {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
    font-size: 9px !important;
    padding: 6px 8px !important;
}

.btn-chatgpt {
    background: linear-gradient(135deg, #10a37f 0%, #1a7f64 100%) !important;
}

.btn-claude {
    background: linear-gradient(135deg, #cc785c 0%, #d97757 100%) !important;
}



.btn-gemini {
    background: linear-gradient(135deg, #4285f4 0%, #a855f7 100%) !important;
    color: #fff !important;
}

.btn-stop {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
}

/* ============================================
   NEUTRON BUTTONS - Call to Action premium
   ============================================ */
.neutron-btn {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-brand) 100%);
    color: white;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: var(--font-size-sm);
    margin: var(--space-xs) 0;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    font-weight: var(--font-weight-semibold);
    border: none;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px var(--color-accent-glow);
    position: relative;
    overflow: hidden;
}

/* Shine effect */
.neutron-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 0.5s ease;
}

.neutron-btn:hover::before {
    left: 100%;
}

/* Glow overlay */
.neutron-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition-fast);
}

.neutron-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 35px var(--color-accent-glow), 0 0 20px var(--color-accent-glow);
}

.neutron-btn:hover::after {
    opacity: 1;
}

.neutron-btn:active {
    transform: translateY(-1px) scale(0.98);
    transition: var(--transition-fast);
}

.neutron-btn.loading {
    opacity: 0.8;
    cursor: wait;
}

.neutron-btn.loading::before {
    animation: neutron-shine 1.5s ease infinite;
}

@keyframes neutron-shine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* SECTION TOGGLE */
.section-toggle {
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin: 6px 0;
    border-radius: var(--radius-sm);
    font-weight: 500;
    border: 1px solid var(--color-border);
    transition: var(--transition-base);
    font-size: 13px;
}

.section-toggle:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--color-border-glow);
}

.section-toggle-icon {
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.section-toggle.active .section-toggle-icon {
    transform: rotate(180deg);
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-content.active {
    max-height: 1000px;
}

/* PROJECT BUTTONS */
.project-btn {
    background: linear-gradient(135deg, var(--color-success) 0%, #34d399 100%);
    color: white;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    text-align: left;
    margin: 6px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    transition: var(--transition-base);
    border: none;
    width: 100%;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
    font-size: 13px;
}

.project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

.project-toggle-icon {
    transition: transform 0.3s ease;
    font-size: 12px;
    opacity: 0.8;
}

.project-btn.active .project-toggle-icon {
    transform: rotate(180deg);
}

.project-actions {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    margin-top: 0;
}

.project-actions.active {
    max-height: 300px;
    padding: var(--space-sm) 0;
    margin-top: var(--space-xs);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    margin: 4px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--color-text);
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid var(--color-border);
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition-base);
}

.action-btn:hover {
    background: var(--color-brand);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.action-btn.launch {
    background: linear-gradient(135deg, var(--color-success) 0%, #34d399 100%);
    color: white;
    border: none;
    font-weight: 600;
}

.action-btn.launch:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* FOOTER */
.footer {
    text-align: center;
    color: var(--color-muted);
    margin-top: var(--space-xl);
    padding: var(--space-md);
    font-size: 12px;
    position: relative;
    z-index: 1;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* ============================================
   ANIMATIONS & MICRO-INTERACTIONS
   ============================================ */

/* Keyframes de base */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px var(--color-accent-glow);
    }

    50% {
        box-shadow: 0 0 40px var(--color-accent-glow), 0 0 60px var(--color-accent-glow);
    }
}

/* Classes d'animation */
.animate-fade-in {
    animation: fadeIn 0.5s var(--transition-smooth) both;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-fade-in-down {
    animation: fadeInDown 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-scale-in {
    animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Délais d'animation staggerés */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

/* Animation des cartes au chargement */
.card {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.card:nth-child(1) {
    animation-delay: 0.05s;
}

.card:nth-child(2) {
    animation-delay: 0.1s;
}

.card:nth-child(3) {
    animation-delay: 0.15s;
}

.card:nth-child(4) {
    animation-delay: 0.2s;
}

.card:nth-child(5) {
    animation-delay: 0.25s;
}

.card:nth-child(6) {
    animation-delay: 0.3s;
}

.card:nth-child(7) {
    animation-delay: 0.35s;
}

.card:nth-child(8) {
    animation-delay: 0.4s;
}

.card:nth-child(9) {
    animation-delay: 0.45s;
}

.card:nth-child(10) {
    animation-delay: 0.5s;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg,
            var(--color-bg-card) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            var(--color-bg-card) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 1em;
    margin-bottom: var(--space-xs);
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: var(--space-sm);
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* Hover scale effect */
.hover-scale {
    transition: transform var(--transition-bounce);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Hover lift effect */
.hover-lift {
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
}

/* WIDGETS (Dashboard) */
.widget {
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    margin: var(--space-sm) 0;
    border: 1px solid var(--color-border-light);
    transition: var(--transition-base);
}

.widget:hover {
    border-color: var(--color-border);
    background: rgba(99, 102, 241, 0.08);
}

.widget h3 {
    font-size: 13px;
    margin-bottom: var(--space-sm);
    color: var(--color-accent);
    font-weight: 600;
}

.widget-content {
    color: var(--color-text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

/* QUICK ACCESS (Dashboard) */
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin: var(--space-md) 0;
}

.quick-btn {
    padding: var(--space-md);
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 500;
    font-size: 13px;
    transition: var(--transition-base);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.quick-btn:hover {
    background: var(--color-brand);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.quick-btn .icon {
    font-size: 22px;
    line-height: 1;
}

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

    .container.three-cols,
    .container.four-cols,
    .grid-three {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .layout-split {
        grid-template-columns: 1fr;
    }

    .container.two-cols {
        grid-template-columns: 1fr;
    }

    .grid-three {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

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

    .nav-bar {
        justify-content: flex-start;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        padding-bottom: var(--space-xs);
    }

    .nav-btn {
        scroll-snap-align: start;
    }

    .quick-access-grid,
    .action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body {
        padding: var(--space-xs);
    }

    .header {
        flex-direction: column;
        gap: var(--space-sm);
        height: auto;
    }

    .card {
        padding: var(--space-md);
    }

    .card-link {
        padding: var(--space-lg);
    }
}

/* ============================================
   RECHERCHE GLOBALE
   ============================================ */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.search-container {
    width: 90%;
    max-width: 600px;
    background: rgba(30, 30, 45, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.search-overlay.active .search-container {
    transform: translateY(0);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 12px;
}

.search-icon {
    font-size: 20px;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 16px;
    font-family: inherit;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.search-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.search-category {
    color: #FFEB3B;
    font-size: 11px;
    font-weight: 700;
    padding: 8px 12px 4px 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 2px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-item:hover {
    background: rgba(102, 126, 234, 0.3);
    transform: translateX(4px);
}

.search-result-icon {
    font-size: 18px;
}

.search-result-name {
    color: white;
    font-size: 14px;
    flex: 1;
}

.search-no-results {
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
}

.search-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.search-footer span {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

/* ============================================
   FAVORIS INTELLIGENTS
   ============================================ */

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.favorite-item {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.favorite-item:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.favorite-item.pinned {
    background: rgba(255, 235, 59, 0.1);
    border-color: rgba(255, 235, 59, 0.3);
}

.favorite-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    color: white;
}

.favorite-name {
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.favorite-clicks {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
}

.favorite-pin {
    position: absolute;
    top: 6px;
    right: 6px;
    background: transparent;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    transition: all 0.2s;
}

.favorite-pin:hover {
    opacity: 1;
    transform: scale(1.2);
}

.favorite-item.pinned .favorite-pin {
    opacity: 1;
}

/* Pin icon sur tous les liens */
.pin-icon {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    padding: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.btn:hover .pin-icon,
.quick-btn:hover .pin-icon {
    opacity: 0.8;
}

.pin-icon:hover {
    opacity: 1 !important;
    transform: scale(1.2);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.stat-item {
    background: rgba(99, 102, 241, 0.08);
    border-radius: var(--radius-sm);
    padding: var(--space-md) var(--space-sm);
    text-align: center;
    border: 1px solid var(--color-border-light);
    transition: var(--transition-base);
}

.stat-item:hover {
    border-color: var(--color-border);
    background: rgba(99, 102, 241, 0.12);
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 4px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--color-accent-light, #22d3ee) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Bouton de recherche dans la navigation */
.search-btn {
    background: rgba(255, 235, 59, 0.2);
    color: #FFEB3B;
    border: 1px solid rgba(255, 235, 59, 0.4);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.search-btn:hover {
    background: rgba(255, 235, 59, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 235, 59, 0.3);
}

.search-btn .kbd {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    margin-left: 4px;
}

/* ============================================
   HAMBURGER MENU MOBILE
   ============================================ */

/* Hamburger Button */
.hamburger-btn {
    display: none;
    position: fixed;
    top: var(--space-md);
    left: var(--space-md);
    z-index: 1001;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px;
    cursor: pointer;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition-base);
}

.hamburger-icon.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-icon.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-icon.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Desktop Navigation */
.nav-desktop {
    display: flex;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.mobile-nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Mobile Navigation Panel */
.nav-mobile {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: var(--color-bg-deep);
    border-right: 1px solid var(--color-border);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform var(--transition-smooth);
    overflow-y: auto;
}

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

.nav-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.nav-mobile-title {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-brand-light), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-mobile-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--color-text);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition-base);
}

.nav-mobile-close:hover {
    background: var(--color-danger);
    color: white;
}

.nav-mobile-items {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.nav-mobile-btn {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: var(--transition-base);
}

.nav-mobile-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-text);
}

.nav-mobile-btn.active {
    background: linear-gradient(135deg, var(--color-brand), var(--color-brand-strong));
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.nav-mobile-icon {
    font-size: 20px;
}

.nav-mobile-label {
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hamburger-btn {
        display: block;
    }

    .nav-desktop {
        display: none;
    }

    .mobile-nav-overlay,
    .nav-mobile {
        display: block;
    }

    .nav-container {
        margin-bottom: var(--space-md);
    }

    .header {
        padding-left: 70px;
        /* Space for hamburger */
    }
}

/* ============================================
   ACCESSIBILITÉ AVANCÉE
   ============================================ */

/* Skip link pour navigation clavier */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-brand);
    color: white;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    z-index: var(--z-toast);
    transition: top var(--transition-fast);
    font-weight: var(--font-weight-semibold);
}

.skip-link:focus {
    top: var(--space-md);
}

/* Screen reader only */
.sr-only,
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --color-border: rgba(255, 255, 255, 0.3);
        --color-text-secondary: rgba(255, 255, 255, 0.9);
        --color-muted: rgba(255, 255, 255, 0.75);
    }

    .card {
        border-width: 2px;
    }

    .btn {
        border-width: 2px;
    }
}

/* ============================================
   UTILITAIRES SUPPLÉMENTAIRES
   ============================================ */

/* Conteneur centré */
.container-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Espacement vertical entre éléments */
.space-y-xs>*+* {
    margin-top: var(--space-xs);
}

.space-y-sm>*+* {
    margin-top: var(--space-sm);
}

.space-y-md>*+* {
    margin-top: var(--space-md);
}

.space-y-lg>*+* {
    margin-top: var(--space-lg);
}

.space-y-xl>*+* {
    margin-top: var(--space-xl);
}

/* Espacement horizontal entre éléments */
.space-x-xs>*+* {
    margin-left: var(--space-xs);
}

.space-x-sm>*+* {
    margin-left: var(--space-sm);
}

.space-x-md>*+* {
    margin-left: var(--space-md);
}

.space-x-lg>*+* {
    margin-left: var(--space-lg);
}

/* Dividers */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), transparent);
    margin: var(--space-lg) 0;
}

.divider-vertical {
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, var(--color-border), transparent);
    margin: 0 var(--space-md);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    color: var(--color-muted);
}

.empty-state-icon {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.empty-state-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.empty-state-description {
    font-size: var(--font-size-sm);
    max-width: 300px;
    margin: 0 auto;
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-elevated);
    color: var(--color-text);
    font-size: var(--font-size-xs);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    z-index: var(--z-tooltip, 1000);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* Progress indicator */
.progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-brand), var(--color-accent));
    border-radius: var(--radius-pill);
    transition: width var(--transition-smooth);
}

.progress-bar-animated {
    background: linear-gradient(90deg,
            var(--color-brand),
            var(--color-accent),
            var(--color-brand));
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

/* Icon container */
.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.15));
    font-size: var(--font-size-xl);
}

.icon-box-sm {
    width: 36px;
    height: 36px;
    font-size: var(--font-size-md);
}

.icon-box-lg {
    width: 64px;
    height: 64px;
    font-size: var(--font-size-2xl);
}

/* ============================================
   SCROLLBAR GLOBALE - Premium
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.18);
    background-clip: content-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* ============================================
   GLASS MORPHISM UTILITIES
   ============================================ */
.glass {
    background: rgba(14, 14, 24, 0.6);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.glass-light {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.glass-strong {
    background: rgba(10, 10, 18, 0.85);
    backdrop-filter: blur(32px) saturate(1.4);
    -webkit-backdrop-filter: blur(32px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================
   GLOW BORDERS - Animated
   ============================================ */
.glow-border {
    position: relative;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--color-brand), var(--color-accent), var(--color-brand));
    background-size: 200% 200%;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.glow-border:hover::before {
    opacity: 0.6;
    animation: glow-rotate 4s linear infinite;
}

@keyframes glow-rotate {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ============================================
   SELECTION STYLING
   ============================================ */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(99, 102, 241, 0.3);
    color: white;
}

/* ============================================
   SMOOTH SCROLL
   ============================================ */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
