/* /home/albin/web/hub.atelier-da.fr/public_html/assets/css/style.css */
/* Atelier DA Design System — Aligned with news.atelier-da.fr */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;1,500;1,600;1,700&display=swap');

:root {
    /* Color Palette */
    --bg-page: #FBFBFA;
    --bg-surface: #FFFFFF;
    --bg-surface-elevated: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #FFFFFF;
    
    --border-subtle: #E2E8F0;
    --border-focus: #2563EB;
    --border-accent: rgba(37, 99, 235, 0.35);

    /* Cobalt Blues */
    --cobalt: #2563EB;
    --cobalt-hover: #1D4ED8;
    --cobalt-soft: #EFF6FF;
    --cobalt-dark: #1E40AF;
    --cobalt-glow: rgba(37, 99, 235, 0.18);

    /* Slates (Typography & Accents) */
    --slate-dark: #0F172A;
    --slate-text: #1E293B;
    --slate-muted: #64748B;
    --slate-light: #94A3B8;
    --slate-subtle: #E2E8F0;

    /* Text semantic variables */
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --text-dim: #64748B;
    --text-accent: #2563EB;

    /* Legacy compatibility mappings */
    --primary-cyan: #2563EB;
    --primary-indigo: #1D4ED8;
    --primary-gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    --accent-gold: #D97706;
    --accent-emerald: #059669;
    --accent-rose: #DC2626;
    --color-danger: #DC2626;

    /* Radii */
    --radius-card: 16px;
    --radius-pill: 9999px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-subtle: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
    --shadow-hover: 0 16px 36px -4px rgba(15, 23, 42, 0.08), 0 6px 12px -2px rgba(15, 23, 42, 0.04);
    --shadow-glow: 0 10px 25px -3px rgba(37, 99, 235, 0.22);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 14px -2px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px -8px rgba(15, 23, 42, 0.12);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-serif: 'Playfair Display', Georgia, serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--slate-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--slate-text);
    min-height: 100vh;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(37, 99, 235, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(15, 23, 42, 0.02) 0%, transparent 40%);
    background-attachment: fixed;
    overflow-x: hidden;
    max-width: 100vw;
}

.font-serif {
    font-family: var(--font-serif);
}

.font-sans {
    font-family: var(--font-sans);
}

/* Layouts */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.sidebar {
    width: 270px;
    min-width: 270px;
    max-width: 270px;
    flex-shrink: 0;
    background: #FFFFFF;
    border-right: 1px solid var(--border-subtle);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    z-index: 40;
    box-shadow: 2px 0 16px rgba(15, 23, 42, 0.02);
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.sidebar-close-btn {
    display: none;
    background: #F1F5F9;
    border: 1px solid var(--border-subtle);
    color: var(--slate-dark);
    font-size: 1rem;
    font-weight: 700;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.main-content {
    flex: 1 1 0%;
    min-width: 0;
    padding: 32px 40px;
    width: auto;
    max-width: calc(100vw - 270px);
    margin: 0;
    box-sizing: border-box;
}

/* Mobile Topbar & Backdrop */
.mobile-topbar {
    display: none;
    height: 60px;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 50;
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.mobile-toggle-btn {
    background: none;
    border: none;
    color: var(--slate-dark);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.mobile-brand-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--slate-dark);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* Brand Sidebar */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--slate-dark);
    padding: 0 4px;
}

.brand-monogram {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.16);
    flex-shrink: 0;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: var(--cobalt);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
}

.brand-title {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--slate-dark);
    line-height: 1.2;
}

.brand-accent {
    color: var(--cobalt);
}

.brand-subtitle {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    color: var(--slate-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    margin-top: 2px;
}

/* Nav Menu */
.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 2px;
}

.sidebar::-webkit-scrollbar, .nav-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb, .nav-menu::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: var(--radius-md);
    color: var(--slate-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.94rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

.nav-link svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    transition: transform 0.2s;
    color: var(--slate-light);
}

.nav-link:hover {
    color: var(--slate-dark);
    background: #F8FAFC;
    border-color: var(--border-subtle);
}

.nav-link:hover svg {
    color: var(--slate-dark);
}

.nav-link.active {
    color: var(--cobalt);
    background: var(--cobalt-soft);
    border-color: rgba(37, 99, 235, 0.2);
    font-weight: 600;
}

.nav-link.active svg {
    color: var(--cobalt);
}

/* User Profile Widget */
.user-profile-widget {
    background: #F8FAFC;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: var(--cobalt);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--slate-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-badge {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--cobalt-soft);
    color: var(--cobalt);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-block;
}

.btn-logout {
    color: var(--slate-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.btn-logout:hover {
    color: #DC2626;
    background: #FEE2E2;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 36px;
    gap: 24px;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    color: var(--slate-dark);
    line-height: 1.2;
}

.page-description {
    color: var(--slate-muted);
    font-size: 1rem;
    max-width: 620px;
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    font-size: 0.92rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

.btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
}

.btn-primary, .btn-pill-cobalt {
    background: var(--cobalt);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    border: 1px solid var(--cobalt);
}

.btn-primary:hover, .btn-pill-cobalt:hover {
    background: var(--cobalt-hover);
    border-color: var(--cobalt-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -2px rgba(37, 99, 235, 0.35);
}

.btn-secondary, .btn-pill-outline {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    color: var(--slate-dark);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover, .btn-pill-outline:hover {
    background: #F8FAFC;
    border-color: var(--slate-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.82rem;
    border-radius: var(--radius-pill);
}

.btn-sm svg {
    width: 15px;
    height: 15px;
}

.btn-emerald {
    background: #ECFDF5;
    border-color: #A7F3D0;
    color: #047857;
}

.btn-emerald:hover {
    background: #D1FAE5;
    transform: translateY(-1px);
}

.btn-amber {
    background: #FFFBEB;
    border-color: #FDE68A;
    color: #B45309;
}

.btn-amber:hover {
    background: #FEF3C7;
    transform: translateY(-1px);
}

.btn-danger {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #B91C1C;
}

.btn-danger:hover {
    background: #DC2626;
    color: #FFFFFF;
    border-color: #DC2626;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 32px;
}

.stat-card {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    padding: 24px;
    box-shadow: var(--shadow-subtle);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: #CBD5E1;
    box-shadow: var(--shadow-hover);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #2563EB, #60A5FA);
}

.stat-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-muted);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.stat-value {
    font-family: var(--font-sans);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--slate-dark);
    letter-spacing: -0.02em;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.5rem 1.125rem;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-muted);
    background-color: #FFFFFF;
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

.filter-tab:hover {
    color: var(--slate-dark);
    background-color: #F8FAFC;
    border-color: var(--slate-light);
}

.filter-tab.active {
    background-color: var(--slate-dark);
    color: #FFFFFF;
    border-color: var(--slate-dark);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

/* Projects Cards Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 20px;
}

.project-card, .da-card {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    padding: 24px;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.project-card:hover, .da-card:hover {
    border-color: #CBD5E1;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}

.project-type-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: #F1F5F9;
    color: var(--slate-text);
    border: 1px solid var(--border-subtle);
}

.project-type-tag.type-perso {
    background: #EFF6FF;
    border-color: #BFDBFE;
    color: var(--cobalt-dark);
    font-weight: 700;
}

/* Status Badges */
.project-status-badge, .da-badge {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.da-badge {
    background-color: var(--cobalt-soft);
    color: var(--cobalt);
    border: 1px solid rgba(37, 99, 235, 0.18);
}

.da-badge-slate {
    background-color: #F1F5F9;
    color: #334155;
    border: 1px solid #E2E8F0;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--cobalt);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.status-conception,
.status-maquette {
    background: #F5F3FF;
    color: #6D28D9;
    border: 1px solid #DDD6FE;
}
.status-conception::before,
.status-maquette::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7C3AED;
}

.status-developpement {
    background: var(--cobalt-soft);
    color: var(--cobalt-dark);
    border: 1px solid #BFDBFE;
}
.status-developpement::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cobalt);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.status-recette,
.status-validation {
    background: #FFFBEB;
    color: #B45309;
    border: 1px solid #FDE68A;
}
.status-recette::before,
.status-validation::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #D97706;
}

.status-termine {
    background: #ECFDF5;
    color: #047857;
    border: 1px solid #A7F3D0;
}
.status-termine::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #059669;
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--slate-dark);
    margin-bottom: 8px;
    line-height: 1.3;
}

.project-subdomain {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--cobalt);
    text-decoration: none;
    margin-bottom: 16px;
    font-weight: 600;
    font-family: monospace;
    word-break: break-all;
}

.project-subdomain:hover {
    text-decoration: underline;
    color: var(--cobalt-hover);
}

.project-description {
    color: var(--slate-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-client-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #F8FAFC;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.project-client-name {
    font-weight: 600;
    color: var(--slate-dark);
}

.project-progress-wrap {
    margin-bottom: 22px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--slate-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

.progress-track, .progress-container {
    height: 7px;
    background: #E2E8F0;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar, .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563EB, #3B82F6);
    border-radius: var(--radius-full);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border-subtle);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 650px;
    padding: 36px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.2);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(16px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--slate-dark);
}

.modal-close, .btn-close {
    background: none;
    border: none;
    color: var(--slate-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.modal-close:hover, .btn-close:hover {
    color: var(--slate-dark);
    background: #F1F5F9;
}

/* Accessibilité: focus visible au clavier */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--cobalt);
    outline-offset: 2px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--slate-dark);
}

.form-label span.req {
    color: #DC2626;
}

.form-input, .form-select, .form-textarea, .da-input, .form-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--slate-dark);
    font-family: var(--font-sans);
    font-size: 0.92rem;
    line-height: 1.5;
    transition: all 0.2s ease;
    outline: none;
}

/* Compact inputs for tables */
td .form-control, td input.form-control, td select.form-control {
    padding: 6px 10px;
    font-size: 0.84rem;
    height: 36px;
    border-radius: 8px;
}

/* Input with icon (Login, Search) */
.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--slate-muted);
    pointer-events: none;
}

.input-with-icon .form-control,
.input-with-icon .form-input {
    padding-left: 42px;
}

/* Full-width block buttons */
.btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
}

.form-input::placeholder, .form-textarea::placeholder, .da-input::placeholder, .form-control::placeholder {
    color: var(--slate-light);
}

.form-select, select.form-control {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 42px;
}

.form-input:focus, .form-select:focus, .form-textarea:focus, .da-input:focus, .form-control:focus {
    border-color: var(--cobalt);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: #FFFFFF;
}

.form-input-prefix {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input-prefix:focus-within {
    border-color: var(--cobalt);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-input-prefix .form-input, .form-input-prefix .form-control {
    border: none;
    background: transparent;
    box-shadow: none !important;
}

.form-suffix {
    padding: 0 16px;
    color: var(--slate-muted);
    font-family: monospace;
    font-size: 0.9rem;
    background: #F8FAFC;
    border-left: 1px solid var(--border-subtle);
    line-height: 44px;
    white-space: nowrap;
}

.form-help {
    font-size: 0.8rem;
    color: var(--slate-muted);
    margin-top: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Tables */
.table-container, .table-responsive {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-subtle);
    width: 100%;
    max-width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table-wide {
    min-width: 650px;
}

/* Dashboard Split Grid (Audits & Devis) */
.dashboard-split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    margin-top: 36px;
    width: 100%;
    max-width: 100%;
}

@media (max-width: 1200px) {
    .dashboard-split-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.data-table th {
    background: #F8FAFC;
    padding: 14px 20px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #F1F5F9;
    font-size: 0.92rem;
    vertical-align: middle;
    color: var(--slate-text);
}

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

.data-table tr:hover td {
    background: #FBFBFA;
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.alert-success {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
}

.alert-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

.alert-info {
    background: var(--cobalt-soft);
    border: 1px solid #BFDBFE;
    color: var(--cobalt-dark);
}

/* DNS Box */
.dns-box {
    background: #F8FAFC;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 20px;
}

.dns-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 0.88rem;
    margin-top: 8px;
    color: var(--slate-dark);
}

.copy-btn {
    background: var(--cobalt-soft);
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--cobalt);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--cobalt);
    color: #FFFFFF;
}

/* Auth Pages (Login & Setup Password) */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg-page);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(15, 23, 42, 0.04) 0%, transparent 40%);
}

.auth-card {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 48px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.05);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563EB, #60A5FA);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    display: inline-flex;
    margin-bottom: 16px;
}

.auth-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--slate-dark);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.auth-subtitle {
    color: var(--slate-muted);
    font-size: 0.95rem;
}

/* Viewer Frame */
.viewer-topbar {
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.device-switcher {
    display: flex;
    background: #F1F5F9;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    padding: 3px;
    gap: 2px;
}

.device-btn {
    background: none;
    border: none;
    color: var(--slate-muted);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.device-btn.active {
    background: #FFFFFF;
    color: var(--slate-dark);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
    font-weight: 600;
}

.viewer-frame-container {
    height: calc(100vh - 65px);
    display: flex;
    justify-content: center;
    align-items: center;
    background: #F1F5F9;
    padding: 16px;
    overflow: hidden;
}

.viewer-iframe {
    width: 100%;
    height: 100%;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: #FFFFFF;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

.viewer-iframe.tablet {
    width: 768px;
    max-width: 100%;
    height: min(1024px, 95%);
    border-radius: 20px;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.2);
}

.viewer-iframe.mobile {
    width: 390px;
    max-width: 100%;
    height: min(844px, 95%);
    border-radius: 36px;
    box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.25);
}

/* Detail Project Page */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--slate-muted);
    margin-bottom: 16px;
}

.breadcrumb-nav a {
    color: var(--slate-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.breadcrumb-nav a:hover {
    color: var(--cobalt);
}

.project-detail-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
    margin-top: 20px;
}

.detail-card {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-card);
    padding: 24px;
    position: relative;
    box-shadow: var(--shadow-subtle);
    margin-bottom: 24px;
}

.detail-card:last-child {
    margin-bottom: 0;
}

.detail-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.detail-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--slate-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.private-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--cobalt-soft);
    border: 1px solid #BFDBFE;
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    margin-bottom: 20px;
}

.private-banner-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.15);
    color: var(--cobalt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.private-banner-text strong {
    color: var(--cobalt-dark);
    font-size: 0.95rem;
    display: block;
    margin-bottom: 2px;
}

.private-banner-text p {
    color: var(--slate-muted);
    font-size: 0.82rem;
    margin: 0;
    line-height: 1.4;
}

.doc-section-card {
    background: #F8FAFC;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 18px;
    margin-bottom: 18px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.doc-section-card:hover {
    border-color: #CBD5E1;
    background: #FFFFFF;
}

.doc-section-card:last-child {
    margin-bottom: 0;
}

.doc-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--slate-dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.attached-file-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #FFFFFF;
    border: 1px dashed #CBD5E1;
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-top: 10px;
}

.attached-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.attached-file-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notes-editor {
    width: 100%;
    min-height: 200px;
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--slate-dark);
    font-family: var(--font-sans);
    font-size: 0.92rem;
    line-height: 1.6;
    padding: 14px;
    resize: vertical;
    transition: all 0.2s ease;
}

.notes-editor:focus {
    outline: none;
    border-color: var(--cobalt);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.quick-meta-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #F1F5F9;
}

.quick-meta-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.quick-meta-label {
    font-size: 0.85rem;
    color: var(--slate-muted);
}

.quick-meta-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--slate-dark);
}

/* =========================================================================
   EXTENSIONS DESIGN SYSTEM — MODULES DU HUB
   ========================================================================= */

.nav-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--slate-light);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 16px 12px 6px;
}

.nav-badge {
    background: var(--cobalt);
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    margin-left: auto;
}

/* Badges de statuts généraux */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-lead-nouveau { background: #EFF6FF; color: #2563EB; border: 1px solid rgba(37, 99, 235, 0.2); }
.status-lead-en_cours { background: #FEF3C7; color: #D97706; border: 1px solid rgba(217, 119, 6, 0.2); }
.status-lead-audit_envoye { background: #F3E8FF; color: #7E22CE; border: 1px solid rgba(126, 34, 206, 0.2); }
.status-lead-converti { background: #ECFDF5; color: #059669; border: 1px solid rgba(5, 150, 105, 0.2); }
.status-lead-archive { background: #F1F5F9; color: #64748B; border: 1px solid rgba(100, 116, 139, 0.2); }

.status-inv-brouillon { background: #F1F5F9; color: #64748B; border: 1px solid #E2E8F0; }
.status-inv-envoye { background: #EFF6FF; color: #2563EB; border: 1px solid rgba(37, 99, 235, 0.2); }
.status-inv-accepte, .status-inv-payee { background: #ECFDF5; color: #059669; border: 1px solid rgba(5, 150, 105, 0.2); }
.status-inv-refuse, .status-inv-en_retard, .status-inv-annulee { background: #FEF2F2; color: #DC2626; border: 1px solid rgba(220, 38, 38, 0.2); }

/* Filtres & Barres d'actions */
.filter-tabs {
    display: flex;
    gap: 8px;
    background: #F1F5F9;
    padding: 4px;
    border-radius: 10px;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.filter-tab {
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--slate-muted);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    color: var(--slate-dark);
    background: #FFFFFF;
}

.filter-tab.active {
    background: #FFFFFF;
    color: var(--cobalt);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* Analytics Split Grid */
.analytics-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 28px;
}

/* Webmail Split-View */
.webmail-container {
    display: grid;
    grid-template-columns: 210px 320px 1fr;
    gap: 0;
    min-height: 600px;
    height: calc(100vh - 170px);
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
}

.webmail-folders {
    background: #F8FAFC;
    border-right: 1px solid var(--border-subtle);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.mail-folder-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--slate-text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
}

.mail-folder-link:hover, .mail-folder-link.active {
    background: #FFFFFF;
    color: var(--cobalt);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.webmail-list-pane {
    border-right: 1px solid var(--border-subtle);
    overflow-y: auto;
    background: #FFFFFF;
}

.mail-item {
    padding: 14px 16px;
    border-bottom: 1px solid #F1F5F9;
    cursor: pointer;
    transition: background-color 0.15s;
    text-decoration: none;
    display: block;
    color: inherit;
}

.mail-item:hover {
    background-color: #F8FAFC;
}

.mail-item.active {
    background-color: #EFF6FF;
    border-left: 3px solid var(--cobalt);
}

.mail-item.unread .mail-subject {
    font-weight: 700;
    color: var(--slate-dark);
}

.mail-sender {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-dark);
    margin-bottom: 2px;
    display: flex;
    justify-content: space-between;
}

.mail-subject {
    font-size: 0.88rem;
    color: var(--slate-text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mail-preview {
    font-size: 0.8rem;
    color: var(--slate-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.webmail-read-pane {
    overflow-y: auto;
    padding: 24px 32px;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
}

/* Facture Imprimable */
.invoice-paper {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 48px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto 30px;
    box-shadow: var(--shadow-md);
    box-sizing: border-box;
}

/* =========================================================================
   RESPONSIVE BREAKPOINTS HARMONISÉS
   ========================================================================= */

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .webmail-container {
        grid-template-columns: 180px 280px 1fr;
    }
}

@media (max-width: 992px) {
    .mobile-topbar {
        display: flex;
    }
    .sidebar-close-btn {
        display: flex;
    }
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        z-index: 1000;
        background: #FFFFFF;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 10px 0 30px rgba(15, 23, 42, 0.15);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        padding: 24px 20px;
        width: 100%;
        max-width: 100%;
    }
    .project-detail-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .analytics-split-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .webmail-container {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
    }
    .webmail-folders {
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        max-height: 220px;
        overflow-y: auto;
    }
    .webmail-list-pane {
        max-height: 380px;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }
    .webmail-read-pane {
        min-height: 380px;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        margin-bottom: 24px;
    }
    .page-header > div:last-child {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
    }
    .page-title {
        font-size: 1.75rem;
    }
    .page-description {
        font-size: 0.9rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .modal-card {
        padding: 20px 16px;
        max-height: 94vh;
        border-radius: var(--radius-lg);
    }
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    .invoice-paper {
        padding: 20px 14px;
        border-radius: var(--radius-md);
    }
    .invoice-header-row {
        flex-direction: column !important;
        gap: 16px !important;
    }
    .invoice-header-row > div:last-child {
        text-align: left !important;
    }
    .invoice-client-row {
        flex-direction: column !important;
        justify-content: flex-start !important;
    }
    .invoice-client-row > div {
        width: 100% !important;
        min-width: 0 !important;
    }
    .filter-tabs {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 16px 12px;
    }
    .stat-card {
        padding: 16px;
    }
    .stat-value {
        font-size: 1.8rem;
    }
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    .data-table th, .data-table td {
        padding: 10px 12px;
    }
}

@media print {
    body {
        background: #FFFFFF !important;
        color: #000000 !important;
    }
    .sidebar, .mobile-topbar, .page-header, .no-print, .btn, .nav-menu {
        display: none !important;
    }
    .main-content {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .invoice-paper {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
}

