/* PointHebdo — Design System V1 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    --ph-font: 'Plus Jakarta Sans', system-ui, sans-serif;
    --ph-sidebar-w: 280px;
    --ph-topbar-h: 72px;
    --ph-primary: #0f172a;
    --ph-primary-light: #1e293b;
    --ph-accent: #0ea5e9;
    --ph-accent-dark: #0284c7;
    --ph-accent-soft: rgba(14, 165, 233, 0.12);
    --ph-success: #10b981;
    --ph-warning: #f59e0b;
    --ph-danger: #ef4444;
    --ph-info: #6366f1;
    --ph-bg: #f1f5f9;
    --ph-surface: #ffffff;
    --ph-border: #e2e8f0;
    --ph-text: #0f172a;
    --ph-text-muted: #64748b;
    --ph-text-light: #94a3b8;
    --ph-radius: 14px;
    --ph-radius-sm: 10px;
    --ph-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.04);
    --ph-shadow-lg: 0 8px 32px rgba(15, 23, 42, 0.1);
    --ph-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--ph-font);
    background: var(--ph-bg);
    color: var(--ph-text);
    font-size: 0.9375rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.ph-app { display: flex; min-height: 100vh; }

.ph-sidebar {
    width: var(--ph-sidebar-w);
    background: linear-gradient(180deg, var(--ph-primary) 0%, #0c1222 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1040;
    transition: transform var(--ph-transition);
    overflow-y: auto;
}

.ph-sidebar-brand {
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.ph-sidebar-brand .logo-icon {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--ph-accent), #38bdf8);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
}

.ph-sidebar-brand h1 { font-size: 1.125rem; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.ph-sidebar-brand .version { font-size: 0.7rem; color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

.ph-nav-section { padding: 1rem 0.75rem 0.25rem; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,.35); font-weight: 700; padding-left: 1.25rem; }

.ph-nav-link {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 1rem; margin: 0.15rem 0.75rem;
    color: rgba(255,255,255,.7); text-decoration: none;
    border-radius: var(--ph-radius-sm); font-weight: 500; font-size: 0.875rem;
    transition: all var(--ph-transition);
}

.ph-nav-link i { font-size: 1.1rem; width: 1.25rem; text-align: center; opacity: 0.85; }
.ph-nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.ph-nav-link.active { background: linear-gradient(135deg, rgba(14,165,233,.25), rgba(14,165,233,.1)); color: #fff; box-shadow: inset 0 0 0 1px rgba(14,165,233,.3); }
.ph-nav-link.active i { color: #38bdf8; }

.ph-sidebar-footer { margin-top: auto; padding: 1rem; border-top: 1px solid rgba(255,255,255,.08); }
.ph-user-card { background: rgba(255,255,255,.06); border-radius: var(--ph-radius-sm); padding: 0.875rem; margin-bottom: 0.75rem; }
.ph-user-avatar { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--ph-accent), #818cf8); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; flex-shrink: 0; }
.ph-user-name { font-weight: 600; font-size: 0.875rem; }
.ph-user-role { font-size: 0.75rem; color: rgba(255,255,255,.5); }

.ph-main { flex: 1; margin-left: var(--ph-sidebar-w); display: flex; flex-direction: column; min-height: 100vh; }

.ph-topbar {
    height: var(--ph-topbar-h);
    border-bottom: 1px solid var(--ph-border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.75rem; position: sticky; top: 0; z-index: 1030;
    backdrop-filter: blur(8px); background: rgba(255,255,255,.92);
}

.ph-content { padding: 1.75rem; flex: 1; }

.ph-page-header { margin-bottom: 1.75rem; }
.ph-page-header h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 0.25rem; }
.ph-page-header .subtitle { color: var(--ph-text-muted); font-size: 0.875rem; margin: 0; }
.ph-breadcrumb { font-size: 0.8rem; color: var(--ph-text-light); margin-bottom: 0.5rem; }
.ph-breadcrumb a { color: var(--ph-text-muted); text-decoration: none; }
.ph-breadcrumb a:hover { color: var(--ph-accent); }

.ph-card { background: var(--ph-surface); border: 1px solid var(--ph-border); border-radius: var(--ph-radius); box-shadow: var(--ph-shadow); overflow: hidden; }
.ph-card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--ph-border); display: flex; align-items: center; justify-content: space-between; background: #fafbfc; }
.ph-card-header h5 { margin: 0; font-size: 0.9375rem; font-weight: 600; }
.ph-card-body { padding: 1.25rem; }
.ph-card-footer { padding: 0.875rem 1.25rem; border-top: 1px solid var(--ph-border); background: #fafbfc; }

.ph-stat-card { background: var(--ph-surface); border: 1px solid var(--ph-border); border-radius: var(--ph-radius); padding: 1.25rem; box-shadow: var(--ph-shadow); position: relative; overflow: hidden; transition: transform var(--ph-transition), box-shadow var(--ph-transition); height: 100%; }
.ph-stat-card:hover { transform: translateY(-2px); box-shadow: var(--ph-shadow-lg); }
.ph-stat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; }
.ph-stat-card.stat-primary::before { background: var(--ph-accent); }
.ph-stat-card.stat-success::before { background: var(--ph-success); }
.ph-stat-card.stat-warning::before { background: var(--ph-warning); }
.ph-stat-card.stat-info::before { background: var(--ph-info); }

.ph-stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: 0.75rem; }
.ph-stat-icon.icon-primary { background: var(--ph-accent-soft); color: var(--ph-accent); }
.ph-stat-icon.icon-success { background: rgba(16,185,129,.12); color: var(--ph-success); }
.ph-stat-icon.icon-warning { background: rgba(245,158,11,.12); color: var(--ph-warning); }
.ph-stat-icon.icon-info { background: rgba(99,102,241,.12); color: var(--ph-info); }
.ph-stat-label { font-size: 0.8rem; color: var(--ph-text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.ph-stat-value { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }
.ph-progress { height: 6px; background: var(--ph-border); border-radius: 99px; overflow: hidden; margin-top: 0.75rem; }
.ph-progress-bar { height: 100%; background: linear-gradient(90deg, var(--ph-accent), #38bdf8); border-radius: 99px; }

.btn-ph-primary { background: linear-gradient(135deg, var(--ph-accent), var(--ph-accent-dark)); border: none; color: #fff; font-weight: 600; padding: 0.55rem 1.25rem; border-radius: var(--ph-radius-sm); font-size: 0.875rem; box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3); transition: all var(--ph-transition); }
.btn-ph-primary:hover { background: linear-gradient(135deg, #38bdf8, var(--ph-accent)); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4); }
.btn-ph-outline { background: transparent; border: 1.5px solid var(--ph-border); color: var(--ph-text); font-weight: 500; padding: 0.5rem 1.15rem; border-radius: var(--ph-radius-sm); font-size: 0.875rem; transition: all var(--ph-transition); }
.btn-ph-outline:hover { border-color: var(--ph-accent); color: var(--ph-accent); background: var(--ph-accent-soft); }
.btn-ph-success { background: linear-gradient(135deg, var(--ph-success), #059669); border: none; color: #fff; font-weight: 600; padding: 0.55rem 1.25rem; border-radius: var(--ph-radius-sm); font-size: 0.875rem; }
.btn-ph-success:hover { color: #fff; opacity: 0.92; }
.btn-ph-danger-outline { border: 1.5px solid rgba(239,68,68,.4); color: var(--ph-danger); background: transparent; font-weight: 500; padding: 0.5rem 1.15rem; border-radius: var(--ph-radius-sm); font-size: 0.875rem; }
.btn-ph-danger-outline:hover { background: rgba(239,68,68,.08); color: var(--ph-danger); }
.btn-ph-ghost { background: transparent; border: none; color: var(--ph-text-muted); font-weight: 500; padding: 0.5rem 1rem; border-radius: var(--ph-radius-sm); }
.btn-ph-ghost:hover { color: var(--ph-text); background: var(--ph-bg); }
.btn-ph-sm { padding: 0.35rem 0.85rem; font-size: 0.8rem; }

.ph-badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.75rem; border-radius: 99px; font-size: 0.75rem; font-weight: 600; }
.ph-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.ph-badge-draft { background: #f1f5f9; color: #64748b; }
.ph-badge-submitted { background: #fef3c7; color: #b45309; }
.ph-badge-manager-validated { background: #dbeafe; color: #1d4ed8; }
.ph-badge-validated { background: #d1fae5; color: #047857; }
.ph-badge-rejected { background: #fee2e2; color: #b91c1c; }
.ph-badge-archived { background: #e0e7ff; color: #4338ca; }

.ph-table { width: 100%; margin: 0; border-collapse: collapse; }
.ph-table thead th { background: #f8fafc; padding: 0.75rem 1.25rem; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ph-text-muted); border-bottom: 1px solid var(--ph-border); white-space: nowrap; }
.ph-table tbody td { padding: 0.875rem 1.25rem; border-bottom: 1px solid var(--ph-border); vertical-align: middle; font-size: 0.875rem; }
.ph-table tbody tr:last-child td { border-bottom: none; }
.ph-table tbody tr:hover { background: #f8fafc; }

.ph-form-label { font-size: 0.8125rem; font-weight: 600; color: var(--ph-text); margin-bottom: 0.4rem; }
.ph-form-control, .ph-form-select { border: 1.5px solid var(--ph-border); border-radius: var(--ph-radius-sm); padding: 0.6rem 0.875rem; font-size: 0.875rem; font-family: var(--ph-font); transition: border-color var(--ph-transition), box-shadow var(--ph-transition); background: var(--ph-surface); width: 100%; }
.ph-form-control:focus, .ph-form-select:focus { border-color: var(--ph-accent); box-shadow: 0 0 0 3px var(--ph-accent-soft); outline: none; }
.ph-filter-bar { background: var(--ph-surface); border: 1px solid var(--ph-border); border-radius: var(--ph-radius); padding: 1rem 1.25rem; box-shadow: var(--ph-shadow); margin-bottom: 1.25rem; }

.ph-empty { text-align: center; padding: 3rem 1.5rem; color: var(--ph-text-muted); }
.ph-empty i { font-size: 2.5rem; color: var(--ph-text-light); margin-bottom: 1rem; display: block; }

.ph-alert { border: none; border-radius: var(--ph-radius-sm); padding: 0.875rem 1.125rem; font-size: 0.875rem; font-weight: 500; display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.ph-alert-success { background: #d1fae5; color: #065f46; }
.ph-alert-danger { background: #fee2e2; color: #991b1b; }

.ph-comment { padding: 0.875rem; background: #f8fafc; border-radius: var(--ph-radius-sm); margin-bottom: 0.75rem; border-left: 3px solid var(--ph-accent); }
.ph-comment-author { font-weight: 600; font-size: 0.8125rem; }
.ph-comment-date { font-size: 0.75rem; color: var(--ph-text-light); }
.ph-comment-body { font-size: 0.875rem; margin: 0.35rem 0 0; color: var(--ph-text-muted); }

.ph-side-panel { position: sticky; top: calc(var(--ph-topbar-h) + 1rem); }
.ph-action-stack { display: flex; flex-direction: column; gap: 0.5rem; }

.ph-report-hero { background: linear-gradient(135deg, var(--ph-primary) 0%, #1e3a5f 100%); border-radius: var(--ph-radius); padding: 1.5rem 1.75rem; color: #fff; margin-bottom: 1.5rem; position: relative; overflow: hidden; }
.ph-report-hero::after { content: ''; position: absolute; top: -50%; right: -10%; width: 300px; height: 300px; background: radial-gradient(circle, rgba(14,165,233,.2) 0%, transparent 70%); pointer-events: none; }
.ph-report-hero h2 { font-size: 1.375rem; font-weight: 700; margin: 0 0 0.35rem; position: relative; }
.ph-report-hero .meta { font-size: 0.875rem; opacity: 0.75; position: relative; }

.ph-list-item { padding: 0.875rem 1.25rem; border-bottom: 1px solid var(--ph-border); display: flex; align-items: center; justify-content: space-between; transition: background var(--ph-transition); }
.ph-list-item:last-child { border-bottom: none; }
.ph-list-item:hover { background: #f8fafc; }

.ph-login-page { min-height: 100vh; display: flex; }
.ph-login-brand { flex: 1; background: linear-gradient(135deg, var(--ph-primary) 0%, #0c4a6e 50%, var(--ph-accent-dark) 100%); display: flex; flex-direction: column; justify-content: center; padding: 3rem; color: #fff; position: relative; overflow: hidden; }
.ph-login-brand::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.ph-login-brand-content { position: relative; max-width: 420px; }
.ph-login-brand h1 { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 1rem; }
.ph-login-brand p { font-size: 1rem; opacity: 0.8; line-height: 1.7; }
.ph-login-features { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 1rem; }
.ph-login-feature { display: flex; align-items: center; gap: 0.875rem; font-size: 0.9rem; opacity: 0.9; }
.ph-login-feature i { width: 36px; height: 36px; background: rgba(255,255,255,.12); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.ph-login-form-side { width: 480px; display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--ph-bg); }
.ph-login-card { width: 100%; max-width: 400px; background: var(--ph-surface); border-radius: var(--ph-radius); padding: 2.25rem; box-shadow: var(--ph-shadow-lg); border: 1px solid var(--ph-border); }
.ph-login-card h2 { font-size: 1.375rem; font-weight: 700; margin-bottom: 0.35rem; letter-spacing: -0.02em; }
.ph-login-card .subtitle { color: var(--ph-text-muted); font-size: 0.875rem; margin-bottom: 1.75rem; }

.ph-stars { font-size: 1.25rem; color: #e2e8f0; }
.ph-stars .active { color: #f59e0b; }

.ph-mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; color: var(--ph-text); padding: 0.25rem; }
.ph-sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 1035; }

@media (max-width: 991.98px) {
    .ph-sidebar { transform: translateX(-100%); }
    .ph-sidebar.open { transform: translateX(0); }
    .ph-sidebar-overlay.show { display: block; }
    .ph-main { margin-left: 0; }
    .ph-mobile-toggle { display: block; }
    .ph-login-brand { display: none; }
    .ph-login-form-side { width: 100%; }
    .ph-content { padding: 1.25rem; }
    .ph-topbar { padding: 0 1.25rem; }
}

.pagination { margin: 0; gap: 0.25rem; }
.page-link { border-radius: 8px !important; border-color: var(--ph-border) !important; color: var(--ph-text-muted) !important; font-size: 0.875rem; font-weight: 500; }
.page-item.active .page-link { background: var(--ph-accent) !important; border-color: var(--ph-accent) !important; }

.modal-content { border: none; border-radius: var(--ph-radius); box-shadow: var(--ph-shadow-lg); }
.modal-header { border-bottom: 1px solid var(--ph-border); padding: 1.25rem 1.5rem; }
.modal-body { padding: 1.5rem; }
.modal-footer { border-top: 1px solid var(--ph-border); padding: 1rem 1.5rem; }

.ph-activity-row { background: #f8fafc; border: 1px solid var(--ph-border); border-radius: var(--ph-radius-sm); padding: 0.75rem; margin-bottom: 0.5rem; }
.ph-highlight-card { background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); border: 1px solid #bae6fd; border-radius: var(--ph-radius); padding: 1.5rem; }
.ph-warning-card .ph-card-header { background: #fef2f2; border-bottom-color: #fecaca; color: #b91c1c; }
.ph-count-badge { background: #fee2e2; color: #b91c1c; font-weight: 700; font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 99px; }
.ph-kpi-grid dt { font-size: 0.8rem; color: var(--ph-text-muted); font-weight: 500; }
.ph-kpi-grid dd { font-weight: 600; color: var(--ph-text); }
.ph-upload-zone { border: 2px dashed var(--ph-border); border-radius: var(--ph-radius-sm); padding: 1.25rem; text-align: center; transition: border-color var(--ph-transition); }
.ph-upload-zone:hover { border-color: var(--ph-accent); background: var(--ph-accent-soft); }
