/* PayLink CRM — Styles globaux Light Clean */
/* Inspiré Stripe/Notion/Apple — AUCUN violet/purple/magenta */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    color: #111827;
    background-color: #F9FAFB;
    line-height: 1.6;
}

a {
    color: #2563EB;
    text-decoration: none;
}
a:hover {
    color: #1D4ED8;
}

/* ========== Layout ========== */
.app-layout {
    display: flex;
    min-height: 100vh;
    overflow: hidden;
    height: 100vh;
}

.app-sidebar {
    width: 260px;
    background: #FFFFFF;
    border-right: 1px solid #E5E7EB;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.app-main {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: auto;
    height: 100vh;
}

.app-topbar {
    height: 64px;
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.app-content {
    padding: 32px;
    flex: 1;
}

/* ========== Sidebar ========== */
.sidebar-logo {
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-icon {
    width: 36px;
    height: 36px;
    background: #2563EB;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.sidebar-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9CA3AF;
    padding: 0 12px;
    margin-bottom: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #4B5563;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.sidebar-link:hover {
    background: #F3F4F6;
    color: #111827;
}

.sidebar-link.active {
    background: #EFF6FF;
    color: #2563EB;
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #4B5563;
}

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

.sidebar-user-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 12px;
    color: #9CA3AF;
}

/* ========== Topbar ========== */
.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6B7280;
}

.topbar-breadcrumb a {
    color: #6B7280;
}
.topbar-breadcrumb a:hover {
    color: #111827;
}

.topbar-breadcrumb .separator {
    color: #D1D5DB;
}

.topbar-breadcrumb .current {
    color: #111827;
    font-weight: 500;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-user-dropdown {
    position: relative;
}

.topbar-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    transition: all 0.15s ease;
}

.topbar-user-btn:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

.topbar-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    min-width: 180px;
    display: none;
    z-index: 200;
    overflow: hidden;
}

.topbar-dropdown-menu.show {
    display: block;
}

.topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    color: #374151;
    transition: background 0.1s ease;
}

.topbar-dropdown-item:hover {
    background: #F9FAFB;
    color: #111827;
}

.topbar-dropdown-item.danger {
    color: #DC2626;
}

.topbar-dropdown-item.danger:hover {
    background: #FEF2F2;
}

/* ========== Mobile ========== */
.mobile-menu-btn {
    display: none;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #374151;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 90;
}

@media (max-width: 768px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay.show {
        display: block;
    }
    .app-main {
        margin-left: 0;
    }
    .mobile-menu-btn {
        display: block;
    }
    .app-content {
        padding: 20px 16px;
    }
    .topbar-breadcrumb span:not(.current) {
        display: none;
    }
}

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

.page-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
}

.page-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ========== Typography ========== */
h1 { font-size: 24px; font-weight: 600; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }

.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-muted { color: #6B7280; }
.text-success { color: #059669; }
.text-danger { color: #DC2626; }
.text-warning { color: #D97706; }
.text-primary { color: #2563EB; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
