/* ============================================================
   Chanti — Design System v2
   Couleurs : Violet #714B67 · Teal #017e84 · Beige #f0ede8
   Police   : Lato 300/400/700/900
   ============================================================ */

/* ── Google Font ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap');

/* ── Variables ───────────────────────────────────────────── */
:root {
  --pt-primary:      #714B67;
  --pt-primary-d:    #5a3a52;
  --pt-primary-l:    #f3eef1;
  --pt-accent:       #017e84;
  --pt-accent-l:     #e6f4f5;
  --pt-success:      #28a745;
  --pt-success-l:    #eaf6ec;
  --pt-warning:      #e07b39;
  --pt-warning-l:    #fdf0e8;
  --pt-danger:       #d9534f;
  --pt-danger-l:     #fdf0f0;
  --pt-info:         #5b7fc9;
  --pt-info-l:       #eef2fb;
  --pt-bg:           #f0ede8;
  --pt-white:        #ffffff;
  --pt-topbar-bg:    #714B67;
  --pt-text:         #212529;
  --pt-text-m:       #495057;
  --pt-text-l:       #868e96;
  --pt-border:       #dee2e6;
  --pt-border-l:     #e9ecef;

  /* compat aliases (old vars) */
  --pt-primary-dark:  var(--pt-primary-d);
  --pt-primary-light: var(--pt-accent);
  --pt-gray-50:       #f8f9fa;
  --pt-gray-100:      var(--pt-border-l);
  --pt-gray-200:      var(--pt-border);
  --pt-gray-400:      #adb5bd;
  --pt-gray-600:      var(--pt-text-l);
  --pt-gray-800:      var(--pt-text-m);

  --pt-sidebar-bg:    var(--pt-white);
  --pt-sidebar-text:  var(--pt-text-m);
  --pt-sidebar-hover: var(--pt-primary-l);
  --pt-sidebar-active:#f3eef1;
  --pt-sidebar-w:     220px;
  --pt-topbar-h:      48px;

  --pt-radius:        6px;
  --pt-radius-sm:     4px;
  --pt-radius-lg:     10px;
  --pt-shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --pt-shadow:        0 2px 8px rgba(0,0,0,.10);
  --pt-shadow-lg:     0 8px 32px rgba(0,0,0,.15);

  --pt-font:          'Lato', system-ui, sans-serif;
  --pt-font-mono:     'Consolas', 'Monaco', monospace;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; scroll-behavior: smooth; }
body { font-family: var(--pt-font); color: var(--pt-text); background: var(--pt-bg); }
a { color: var(--pt-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { fill: currentColor; }

/* ────────────────────────────────────────────────────────────
   APP LAYOUT
──────────────────────────────────────────────────────────── */
.pt-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ────────────────────────────────────────────────────────────
   TOPBAR (purple, 48px)
──────────────────────────────────────────────────────────── */
.pt-topbar {
  height: var(--pt-topbar-h);
  background: var(--pt-topbar-bg);
  display: flex;
  align-items: center;
  padding: 0 16px;
  flex-shrink: 0;
  z-index: 200;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
  gap: 4px;
}

/* Logo */
.pt-topbar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 20px;
  border-right: 1px solid rgba(255,255,255,.2);
  margin-right: 6px;
  flex-shrink: 0;
  text-decoration: none !important;
}

.pt-topbar__logo:hover { text-decoration: none; }

.pt-logo-svg { width: 28px; height: 22px; flex-shrink: 0; }

.pt-logo-text {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -.3px;
  white-space: nowrap;
  line-height: 1;
}

.pt-logo-text .pt-logo-pro  { color: #d4b8cc; }
.pt-logo-text .pt-logo-track{ color: #fff; }

/* Spacer */
.pt-topbar__spacer { flex: 1; }

/* Toggle button (mobile) */
.pt-topbar__toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.8);
  padding: .3rem;
  border-radius: var(--pt-radius-sm);
  display: none;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.pt-topbar__toggle:hover { background: rgba(255,255,255,.15); color: #fff; }
.pt-topbar__toggle svg { width: 20px; height: 20px; display: block; }

/* Right area */
.pt-topbar__right {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Topbar icon button (generic) */
.pt-topbar-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--pt-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  font-size: 15px;
  transition: background .15s;
  position: relative;
  background: none;
  border: none;
}
.pt-topbar-icon-btn:hover { background: rgba(255,255,255,.15); color: #fff; }

/* Topbar user block */
.pt-topbar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 8px 4px 12px;
  border-radius: var(--pt-radius-sm);
  cursor: pointer;
  transition: background .15s;
  border-left: 1px solid rgba(255,255,255,.2);
  margin-left: 4px;
}
.pt-topbar-user:hover { background: rgba(255,255,255,.12); }
a.pt-topbar-user { color: inherit; text-decoration: none; }
.pt-topbar-user__name { color: #fff; font-size: 13px; font-weight: 700; line-height: 1.2; }
.pt-topbar-user__role { color: rgba(255,255,255,.6); font-size: 11px; }

/* Topbar avatar */
.pt-topbar-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}

/* Logout button (in topbar) */
.pt-logout-btn {
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  border-radius: var(--pt-radius-sm);
  color: rgba(255,255,255,.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  flex-shrink: 0;
}
.pt-logout-btn:hover { background: rgba(255,255,255,.15); color: #fff; }
.pt-logout-btn svg { width: 18px; height: 18px; }

/* ────────────────────────────────────────────────────────────
   NOTIFICATIONS (in topbar)
──────────────────────────────────────────────────────────── */
.pt-notif { position: relative; }

.pt-notif__btn {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,.8);
  width: 34px;
  height: 34px;
  border-radius: var(--pt-radius-sm);
  position: relative;
  transition: background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pt-notif__btn:hover { background: rgba(255,255,255,.15); color: #fff; }
.pt-notif__btn svg { width: 20px; height: 20px; }

.pt-notif__badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #f39c12;
  color: white;
  font-size: .6rem;
  font-weight: 700;
  min-width: 14px;
  height: 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--pt-topbar-bg);
}

.pt-notif__badge--hidden { display: none; }

.pt-notif__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: var(--pt-white);
  border-radius: var(--pt-radius);
  box-shadow: var(--pt-shadow-lg);
  border: 1px solid var(--pt-border);
  z-index: 400;
}

.pt-notif__dropdown.is-open { display: block; }

.pt-notif__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--pt-border-l);
  font-size: 13px;
  font-weight: 700;
}

.pt-notif__list { max-height: 350px; overflow-y: auto; }

.notif-item {
  display: block;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--pt-border-l);
  cursor: pointer;
  transition: background .1s;
  font-size: 13px;
  text-decoration: none;
  color: inherit;
}
.notif-item:hover  { background: var(--pt-gray-50); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: var(--pt-primary-l); border-left: 3px solid var(--pt-primary); }
.notif-item .notif-msg  { line-height: 1.4; color: var(--pt-text-m); }
.notif-item .notif-date { font-size: .75rem; color: var(--pt-text-l); margin-top: .2rem; }
.pt-notif__loading, .notif-empty { padding: 1rem; text-align: center; color: var(--pt-text-l); font-size: .85rem; }

.pt-btn-link {
  background: none;
  border: none;
  color: var(--pt-primary);
  cursor: pointer;
  font-size: .82rem;
  padding: 0;
  font-family: var(--pt-font);
}

/* ────────────────────────────────────────────────────────────
   LAYOUT BODY (below topbar)
──────────────────────────────────────────────────────────── */
.pt-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ────────────────────────────────────────────────────────────
   SIDEBAR (white, 220px)
──────────────────────────────────────────────────────────── */
.pt-sidebar {
  width: var(--pt-sidebar-w);
  background: var(--pt-white);
  border-right: 1px solid var(--pt-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  transition: transform .25s ease;
}

/* Sidebar version footer */
.pt-sidebar-version {
  margin-top: auto;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--pt-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.pt-sidebar-version__name {
  font-size: .72rem;
  color: var(--pt-text-muted);
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.pt-sidebar-version__badge {
  font-size: .68rem;
  font-weight: 600;
  color: var(--pt-primary);
  background: var(--pt-primary-l);
  padding: 1px 7px;
  border-radius: 20px;
  letter-spacing: .02em;
}

/* Nav sections */
.pt-nav-section { padding: 10px 8px 4px; }

.pt-nav-label {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--pt-text-l);
  padding: 6px 8px 4px;
  display: block;
}

.pt-nav-divider { height: 1px; background: var(--pt-border-l); margin: 4px 8px; }

.pt-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--pt-radius-sm);
  color: var(--pt-text-m);
  font-size: 13.5px;
  cursor: pointer;
  transition: all .1s;
  margin-bottom: 1px;
  user-select: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.pt-nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: .7;
}

.pt-nav-item:hover {
  background: var(--pt-primary-l);
  color: var(--pt-primary);
  text-decoration: none;
}

.pt-nav-item.is-active,
.pt-nav-item:focus {
  background: var(--pt-primary-l);
  color: var(--pt-primary);
  font-weight: 700;
  text-decoration: none;
}

.pt-nav-item.is-active svg { opacity: 1; }

/* Nav badge */
.pt-nav-badge {
  margin-left: auto;
  background: var(--pt-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}
.pt-nav-badge--orange { background: var(--pt-warning); }

/* ────────────────────────────────────────────────────────────
   MAIN AREA
──────────────────────────────────────────────────────────── */
.pt-main {
  flex: 1;
  overflow-y: auto;
  background: var(--pt-bg);
  display: flex;
  flex-direction: column;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.pt-breadcrumb-bar {
  background: var(--pt-white);
  border-bottom: 1px solid var(--pt-border);
  padding: 0 24px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--pt-text-l);
  flex-shrink: 0;
}

.pt-breadcrumb-bar .bc-sep { color: var(--pt-border); margin: 0 2px; }
.pt-breadcrumb-bar .bc-current { color: var(--pt-text); font-weight: 700; }
.pt-breadcrumb-bar .bc-link { color: var(--pt-primary); cursor: pointer; }
.pt-breadcrumb-bar .bc-link:hover { text-decoration: underline; }

/* Old breadcrumb (keep for compat) */
.pt-breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--pt-text-l);
  margin-top: .2rem;
}
.pt-breadcrumb a { color: var(--pt-primary); }
.pt-breadcrumb span { color: var(--pt-gray-400); }

/* ── Toolbar ─────────────────────────────────────────────── */
.pt-toolbar {
  background: var(--pt-white);
  border-bottom: 1px solid var(--pt-border);
  padding: 9px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── Page content ────────────────────────────────────────── */
.pt-content {
  flex: 1;
  padding: 24px;
}

/* ── Page header ─────────────────────────────────────────── */
.pt-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 1rem;
}

.pt-page-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--pt-text);
  line-height: 1.2;
}

.pt-page-subtitle {
  color: var(--pt-text-l);
  font-size: 13px;
  margin-top: .25rem;
}

.pt-page-actions { display: flex; gap: .5rem; align-items: center; flex-shrink: 0; flex-wrap: wrap; }

/* ────────────────────────────────────────────────────────────
   BUTTONS
──────────────────────────────────────────────────────────── */
.pt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--pt-radius-sm);
  font-family: var(--pt-font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .12s;
  white-space: nowrap;
  text-decoration: none !important;
}

.pt-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.pt-btn--primary   { background: var(--pt-primary); color: #fff; border-color: var(--pt-primary-d); }
.pt-btn--primary:hover { background: var(--pt-primary-d); }

.pt-btn--secondary { background: var(--pt-white); color: var(--pt-text-m); border-color: var(--pt-border); }
.pt-btn--secondary:hover { background: var(--pt-bg); color: var(--pt-text); }

.pt-btn--accent { background: var(--pt-accent); color: #fff; border-color: #016268; }
.pt-btn--accent:hover { background: #016268; }

.pt-btn--danger  { background: var(--pt-danger); color: #fff; }
.pt-btn--danger:hover  { background: #c82333; }

.pt-btn--success { background: var(--pt-success); color: #fff; }
.pt-btn--success:hover { background: #1e7e34; }

.pt-btn--ghost   { background: none; color: var(--pt-text-m); border-color: transparent; }
.pt-btn--ghost:hover { background: var(--pt-border-l); }

.pt-btn--sm  { padding: 4px 10px; font-size: 12px; }
.pt-btn--xs  { padding: 3px 8px;  font-size: 11px; }
.pt-btn--lg  { padding: 10px 20px; font-size: 14px; }
.pt-btn--full { width: 100%; justify-content: center; }

/* ── Icon-only action buttons ───────────────────────────── */
.pt-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 7px;
    border: 1px solid var(--pt-border); background: #fff;
    cursor: pointer; padding: 0; transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
    flex-shrink: 0; text-decoration: none;
}
.pt-icon-btn svg { width: 15px; height: 15px; fill: currentColor; pointer-events: none; }
.pt-icon-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,.1); }

.pt-icon-btn--view    { color: #3b82f6; border-color: #bfdbfe; background: #eff6ff; }
.pt-icon-btn--view:hover    { background: #dbeafe; border-color: #93c5fd; }

.pt-icon-btn--edit    { color: #0ea5e9; border-color: #bae6fd; background: #f0f9ff; }
.pt-icon-btn--edit:hover    { background: #e0f2fe; border-color: #7dd3fc; }

.pt-icon-btn--delete  { color: #ef4444; border-color: #fecaca; background: #fff5f5; }
.pt-icon-btn--delete:hover  { background: #fee2e2; border-color: #fca5a5; }

.pt-icon-btn--archive { color: #6b7280; border-color: #e5e7eb; background: #f9fafb; }
.pt-icon-btn--archive:hover { background: #f3f4f6; border-color: #d1d5db; }

.pt-icon-btn--unarchive { color: #10b981; border-color: #a7f3d0; background: #ecfdf5; }
.pt-icon-btn--unarchive:hover { background: #d1fae5; border-color: #6ee7b7; }

.pt-icon-btn--activate  { color: #10b981; border-color: #a7f3d0; background: #ecfdf5; }
.pt-icon-btn--activate:hover  { background: #d1fae5; border-color: #6ee7b7; }

.pt-icon-btn--deactivate { color: #f59e0b; border-color: #fde68a; background: #fffbeb; }
.pt-icon-btn--deactivate:hover { background: #fef3c7; border-color: #fcd34d; }

.pt-icon-btn--publish { color: #8b5cf6; border-color: #ddd6fe; background: #f5f3ff; }
.pt-icon-btn--publish:hover { background: #ede9fe; border-color: #c4b5fd; }

.pt-icon-btn--details { color: #64748b; border-color: #e2e8f0; background: #f8fafc; }
.pt-icon-btn--details:hover { background: #f1f5f9; border-color: #cbd5e1; }

.pt-icon-btn--toggle-off { color: #ef4444; border-color: #fecaca; background: #fff5f5; }
.pt-icon-btn--toggle-off:hover { background: #fee2e2; }
.pt-icon-btn--toggle-on  { color: #10b981; border-color: #a7f3d0; background: #ecfdf5; }
.pt-icon-btn--toggle-on:hover  { background: #d1fae5; }

/* ────────────────────────────────────────────────────────────
   KPI / STAT CARDS
──────────────────────────────────────────────────────────── */
.pt-stats-grid,
.pt-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.pt-stats-grid--3 { grid-template-columns: repeat(3, 1fr); }
.pt-stats-grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ── Nouvelle carte KPI (dashboard admin) ── */
.pt-kpi {
  background: var(--pt-white);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
  box-shadow: var(--pt-shadow-sm);
  transition: box-shadow .15s, transform .1s;
}
.pt-kpi:hover { box-shadow: var(--pt-shadow); transform: translateY(-1px); }

.pt-kpi__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--pt-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pt-kpi__icon svg { width: 22px; height: 22px; fill: currentColor; }

.pt-kpi__body { display: flex; flex-direction: column; min-width: 0; }
.pt-kpi__val  { font-size: 24px; font-weight: 900; line-height: 1; color: var(--pt-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Finance row : cartes plus larges + font adaptatif + pas d'ellipsis */
.pt-kpi-row--finance { grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); }
.pt-kpi-row--finance .pt-kpi__val { font-size: clamp(13px, 1.8vw, 20px); white-space: normal; overflow: visible; text-overflow: clip; }
.pt-kpi__lbl  {
  font-size: 10px;
  color: var(--pt-text-l);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-top: 4px;
  line-height: 1.3;
}

/* Variantes couleur */
.pt-kpi--violet .pt-kpi__icon { background: var(--pt-primary-l); color: var(--pt-primary); }
.pt-kpi--teal   .pt-kpi__icon { background: var(--pt-accent-l);  color: var(--pt-accent);  }
.pt-kpi--green  .pt-kpi__icon { background: var(--pt-success-l); color: var(--pt-success); }
.pt-kpi--red    .pt-kpi__icon { background: #fee2e2;             color: #dc2626;            }
.pt-kpi--gray   .pt-kpi__icon { background: var(--pt-border-l);  color: var(--pt-text-l);  }
.pt-kpi--orange .pt-kpi__icon { background: var(--pt-warning-l); color: var(--pt-warning); }

/* ── Lignes 2 et 3 du dashboard (grilles 2 colonnes) ── */
.pt-dash-row2 {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
  margin-bottom: 20px;
}
.pt-dash-row3 {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* ── Barre empilée (répartition projets) ── */
.pt-stacked-bar {
  height: 18px;
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  background: var(--pt-border-l);
  margin-bottom: 14px;
}
.pt-stacked-bar__seg { height: 100%; transition: width .4s ease; }
.pt-stacked-bar__seg--nouveau  { background: #94a3b8; }
.pt-stacked-bar__seg--en-cours { background: var(--pt-accent); }
.pt-stacked-bar__seg--termine  { background: #16a34a; }

.pt-stacked-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 4px;
}
.pt-stacked-legend__item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--pt-text-m);
}
.pt-stacked-legend__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pt-stacked-legend__item strong { font-weight: 800; color: var(--pt-text); }

/* ── Jauge demi-cercle (avancement moyen) ── */
.pt-gauge { width: 200px; max-width: 100%; }
.pt-gauge__svg { width: 100%; display: block; overflow: visible; }

/* ── Card alerte (projets en retard) ── */
.pt-card--alert {
  border-color: #fca5a5;
}
.pt-card--alert .pt-card__header {
  background: #fef2f2;
  border-bottom-color: #fca5a5;
}

/* ── Liste d'activité récente ── */
.pt-activity-list { list-style: none; padding: 0; margin: 0; }

.pt-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--pt-border-l);
  transition: background .1s;
}
.pt-activity-item:hover { background: #faf9f8; }
.pt-activity-item:last-child { border-bottom: none; }

.pt-activity-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pt-accent);
  flex-shrink: 0;
  margin-top: 5px;
}
/* Couleurs par type d'action */
.pt-activity-item__dot--login,
.pt-activity-item__dot--create_projet,
.pt-activity-item__dot--create_user   { background: #16a34a; }
.pt-activity-item__dot--logout        { background: #94a3b8; }
.pt-activity-item__dot--update_user,
.pt-activity-item__dot--update_avancement { background: var(--pt-accent); }
.pt-activity-item__dot--archive_projet,
.pt-activity-item__dot--unarchive_projet  { background: var(--pt-warning); }
.pt-activity-item__dot--toggle_user   { background: var(--pt-danger); }

.pt-activity-item__body  { flex: 1; min-width: 0; }
.pt-activity-item__text  { font-size: 12.5px; color: var(--pt-text-m); line-height: 1.5; }
.pt-activity-item__text strong { color: var(--pt-text); }
.pt-activity-item__text em { color: var(--pt-primary); font-style: normal; font-weight: 600; }
.pt-activity-item__time  { font-size: 11px; color: var(--pt-text-l); margin-top: 2px; }

.pt-stat-card {
  background: var(--pt-white);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--pt-shadow-sm);
}

/* KPI icon */
.pt-stat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--pt-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.pt-stat-card__icon svg { width: 22px; height: 22px; }

/* Icon color variants */
.pt-stat-card--admin    .pt-stat-card__icon { background: var(--pt-primary-l); color: var(--pt-primary); }
.pt-stat-card--chef     .pt-stat-card__icon { background: var(--pt-warning-l); color: var(--pt-warning); }
.pt-stat-card--client   .pt-stat-card__icon { background: var(--pt-accent-l);  color: var(--pt-accent);  }
.pt-stat-card--total    .pt-stat-card__icon { background: var(--pt-primary-l); color: var(--pt-primary); }
.pt-stat-card--en-cours .pt-stat-card__icon { background: var(--pt-warning-l); color: var(--pt-warning); }
.pt-stat-card--termine  .pt-stat-card__icon { background: var(--pt-success-l); color: var(--pt-success); }
.pt-stat-card--nouveau  .pt-stat-card__icon { background: var(--pt-info-l);    color: var(--pt-info);    }

.pt-stat-card__value { font-size: 26px; font-weight: 900; line-height: 1; color: var(--pt-text); }
.pt-stat-card__label {
  font-size: 11px;
  color: var(--pt-text-l);
  margin-top: 3px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* compat aliases */
.pt-stat-card__body { display: flex; flex-direction: column; }

/* ────────────────────────────────────────────────────────────
   CARDS
──────────────────────────────────────────────────────────── */
.pt-card {
  background: var(--pt-white);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius);
  box-shadow: var(--pt-shadow-sm);
  margin-bottom: 20px;
  overflow: hidden;
}

.pt-card--form { max-width: 720px; }
.pt-card--info { }

.pt-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 20px;
  border-bottom: 1px solid var(--pt-border-l);
}

.pt-card__title {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--pt-text-m);
}

.pt-card__body { padding: 18px 20px; }
.pt-card__body--flush { padding: 0; }

/* ────────────────────────────────────────────────────────────
   TABLES
──────────────────────────────────────────────────────────── */

.pt-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .pt-col-hide-sm { display: none !important; }
}
@media (max-width: 480px) {
  .pt-col-hide-xs { display: none !important; }
}

.pt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.pt-table thead tr { background: var(--pt-bg); }

.pt-table th {
  font-size: 11px;
  font-weight: 900;
  color: var(--pt-text-l);
  text-transform: uppercase;
  letter-spacing: .7px;
  padding: 9px 16px;
  text-align: left;
  border-bottom: 2px solid var(--pt-border);
  white-space: nowrap;
}

.pt-table td {
  padding: 12px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--pt-border-l);
  vertical-align: middle;
}

.pt-table tbody tr { transition: background .1s; }
.pt-table tbody tr:hover { background: #faf9f8; }
.pt-table tbody tr:last-child td { border-bottom: none; }
.pt-table--hoverable tbody tr:hover { background: #faf9f8; }
.pt-table--compact th { padding: 8px 12px; }
.pt-table--compact td { padding: 8px 12px; font-size: 13px; }
.pt-table__empty { text-align: center; color: var(--pt-text-l); padding: 2rem !important; }

/* Table link */
.pt-col-link { color: var(--pt-primary); font-weight: 700; cursor: pointer; }
.pt-col-link:hover { text-decoration: underline; }
.pt-col-sub { color: var(--pt-text-l); font-size: 12px; }
.pt-user-cell { display: flex; align-items: center; gap: .6rem; }

/* ────────────────────────────────────────────────────────────
   BADGES
──────────────────────────────────────────────────────────── */
.pt-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.pt-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* Status badges */
.pt-badge--statut-nouveau,
.pt-badge--nouveau   { background: var(--pt-info-l);    color: var(--pt-info);    }
.pt-badge--statut-nouveau::before,
.pt-badge--nouveau::before   { background: var(--pt-info); }

.pt-badge--statut-en_cours,
.pt-badge--en_cours  { background: var(--pt-warning-l); color: var(--pt-warning); }
.pt-badge--statut-en_cours::before,
.pt-badge--en_cours::before  { background: var(--pt-warning); }

.pt-badge--statut-termine,
.pt-badge--termine   { background: var(--pt-success-l); color: var(--pt-success); }
.pt-badge--statut-termine::before,
.pt-badge--termine::before   { background: var(--pt-success); }

.pt-badge--statut-brouillon,
.pt-badge--brouillon { background: #f3f4f6; color: #6b7280; }
.pt-badge--statut-brouillon::before,
.pt-badge--brouillon::before { background: #9ca3af; }

/* Role badges */
.pt-badge--admin       { background: var(--pt-primary-l); color: var(--pt-primary); }
.pt-badge--admin::before { background: var(--pt-primary); }
.pt-badge--responsable { background: #e1f0fa; color: #0277bd; }
.pt-badge--responsable::before { background: #0277bd; }
.pt-badge--chef_projet { background: var(--pt-warning-l); color: var(--pt-warning); }
.pt-badge--chef_projet::before { background: var(--pt-warning); }
.pt-badge--client      { background: var(--pt-accent-l);  color: var(--pt-accent);  }
.pt-badge--client::before { background: var(--pt-accent); }
.pt-badge--business_manager { background: #fdf4ff; color: #9333ea; }
.pt-badge--business_manager::before { background: #9333ea; }
.pt-badge--neutral     { background: var(--pt-border-l); color: var(--pt-text-l); }
.pt-badge--neutral::before { background: var(--pt-text-l); }

.pt-badge--xs { padding: 2px 7px; font-size: 10px; }
.pt-badge--lg { padding: 5px 14px; font-size: 12px; }

/* ────────────────────────────────────────────────────────────
   PROGRESS BARS
──────────────────────────────────────────────────────────── */
.pt-progress-wrap { display: flex; align-items: center; gap: 10px; }

.pt-progress {
  flex: 1;
  height: 7px;
  background: var(--pt-border-l);
  border-radius: 4px;
  overflow: hidden;
  min-width: 60px;
}

.pt-progress--lg  { height: 10px; border-radius: 5px; }
.pt-progress--xl  { height: 14px; border-radius: 7px; }

.pt-progress__bar {
  height: 100%;
  border-radius: inherit;
  background: var(--pt-primary);
  transition: width .4s ease;
}

.pt-progress__bar--gradient { background: linear-gradient(90deg, var(--pt-primary), var(--pt-accent)); }
.pt-progress__bar--success  { background: var(--pt-success); }
.pt-progress__bar--info     { background: var(--pt-info); }

.pt-progress__label { font-size: 12px; font-weight: 700; color: var(--pt-text-m); min-width: 34px; text-align: right; }

/* Avancement section */
.pt-avancement { margin-top: 1rem; }
.pt-avancement__header { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: .4rem; }

.pt-avancement-banner {
  background: var(--pt-white);
  border-radius: var(--pt-radius);
  box-shadow: var(--pt-shadow-sm);
  padding: 16px 20px;
  margin-bottom: 20px;
  border: 1px solid var(--pt-border);
}

.pt-avancement-banner__label { font-size: 11px; color: var(--pt-text-l); margin-bottom: .25rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.pt-avancement-banner__value { font-size: 2rem; font-weight: 900; color: var(--pt-primary); margin-bottom: .75rem; }

/* ────────────────────────────────────────────────────────────
   PROJECT HEADER (detail page)
──────────────────────────────────────────────────────────── */
.pt-proj-header {
  background: var(--pt-white);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius);
  box-shadow: var(--pt-shadow-sm);
  margin-bottom: 20px;
  overflow: hidden;
}

.pt-proj-header__top {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--pt-border-l);
}

.pt-proj-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.pt-proj-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--pt-text);
}

.pt-proj-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: var(--pt-text-l);
  margin-bottom: 10px;
}
.pt-proj-meta b { color: var(--pt-text-m); font-weight: 700; }

.pt-proj-header__bottom {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.pt-proj-prog-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--pt-text-l);
  text-transform: uppercase;
  letter-spacing: .5px;
  min-width: 120px;
  white-space: nowrap;
}

.pt-proj-prog-bar {
  flex: 1;
  height: 10px;
  background: var(--pt-border-l);
  border-radius: 5px;
  overflow: hidden;
}

.pt-proj-prog-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--pt-primary), var(--pt-accent));
}

.pt-proj-prog-pct {
  font-size: 16px;
  font-weight: 900;
  color: var(--pt-primary);
  min-width: 44px;
  text-align: right;
}

/* ────────────────────────────────────────────────────────────
   PHASES GRID (cards)
──────────────────────────────────────────────────────────── */
.pt-phases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.pt-phase-card {
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius);
  padding: 16px;
  background: var(--pt-white);
}

.pt-phase-card--done   { border-left: 3px solid var(--pt-success); }
.pt-phase-card--active { border-left: 3px solid var(--pt-primary); }

.pt-phase-card__name { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.pt-phase-card__status { margin-top: 8px; }

/* Phase list items (list view, inside card) */
.pt-phase-item {
  padding: 12px 20px;
  border-bottom: 1px solid var(--pt-border-l);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pt-phase-item:last-child { border-bottom: none; }

.pt-phase-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  flex-wrap: wrap;
  gap: .5rem;
}

.pt-phase-item__title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 13.5px;
  flex: 1;
  text-align: left;
  min-width: 0;
}

.pt-phase-item__order {
  width: 22px;
  height: 22px;
  background: var(--pt-primary);
  color: white;
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pt-phase-item__actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.pt-phase-item__progress { display: flex; align-items: center; gap: .75rem; }
.pt-phase-slider-form { display: flex; flex: 1; align-items: center; }

/* ────────────────────────────────────────────────────────────
   PHOTOS GRID
──────────────────────────────────────────────────────────── */
.pt-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.pt-photo-item,
.pt-photo-card {
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius);
  overflow: hidden;
  background: var(--pt-white);
  box-shadow: var(--pt-shadow-sm);
  transition: box-shadow .2s;
}

.pt-photo-item:hover { box-shadow: var(--pt-shadow); }

.pt-photo-item__img {
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--pt-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-photo-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.pt-photo-item__img:hover img { transform: scale(1.05); }

.pt-photo-thumb {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  background: var(--pt-bg);
}

.pt-photo-body { padding: 10px 12px; }
.pt-photo-name { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.pt-photo-date { font-size: 11px; color: var(--pt-text-l); margin-bottom: 6px; }

.pt-photo-item__phase       { font-size: .7rem; padding: .25rem .5rem; background: var(--pt-primary); color: white; }
.pt-photo-item__caption-row { display: flex; align-items: center; justify-content: space-between; padding: .25rem .5rem; min-height: 1.8rem; gap: .25rem; }
.pt-photo-item__caption     { font-size: .78rem; color: var(--pt-text-l); flex: 1; }
.pt-photo-item__meta        { display: flex; justify-content: space-between; align-items: center; padding: .3rem .5rem; background: var(--pt-gray-50); }

/* ── Toast notifications temps réel ─────────────────────────────────────── */
.pt-toast-container {
  position: fixed; bottom: 1.25rem; right: 1.25rem;
  display: flex; flex-direction: column; gap: .5rem;
  z-index: 9999; pointer-events: none;
}
.pt-toast {
  display: flex; align-items: center; gap: .6rem;
  min-width: 260px; max-width: 360px;
  padding: .7rem 1rem; border-radius: 10px;
  background: #1e1e2e; color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
  font-size: .86rem; pointer-events: all;
  opacity: 0; transform: translateY(12px);
  transition: opacity .3s, transform .3s;
}
.pt-toast--visible  { opacity: 1; transform: translateY(0); }
.pt-toast--notif    { border-left: 4px solid var(--pt-primary); }
.pt-toast--msg      { border-left: 4px solid var(--pt-accent);  }
.pt-toast__icon     { font-size: 1.1rem; flex-shrink: 0; }
.pt-toast__text     { flex: 1; line-height: 1.35; }
.pt-toast__close {
  background: none; border: none; color: rgba(255,255,255,.5);
  font-size: 1.1rem; cursor: pointer; padding: 0 .2rem; flex-shrink: 0;
  transition: color .15s;
}
.pt-toast__close:hover { color: #fff; }

/* ── Messagerie ──────────────────────────────────────────────────────────── */

/* Bouton messages topbar */
.pt-topbar-msg-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  color: rgba(255,255,255,.85); text-decoration: none;
  transition: background .18s;
}
.pt-topbar-msg-btn:hover { background: rgba(255,255,255,.15); color: #fff; }
.pt-topbar-msg-btn svg  { width: 22px; height: 22px; fill: currentColor; }
.pt-topbar-msg-btn__badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #e53e3e; color: #fff; border-radius: 8px;
  font-size: .62rem; font-weight: 700; line-height: 16px; text-align: center;
}

/* Layout messagerie (liste à gauche + chat à droite) */
.pt-msg-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1rem;
  height: calc(100vh - 130px);
  min-height: 500px;
}
@media (max-width: 768px) {
  .pt-msg-layout { grid-template-columns: 1fr; }
}

/* ─ Inbox (liste des conversations) ─ */
.pt-msg-inbox {
  display: flex; flex-direction: column; overflow: hidden; padding: 0 !important;
}
.pt-msg-inbox--side { overflow-y: auto; }
.pt-msg-inbox__search { padding: .6rem .75rem; border-bottom: 1px solid var(--pt-border-l); }

.pt-msg-inbox__item {
  display: flex; align-items: center; gap: .65rem;
  padding: .75rem 1rem; cursor: pointer; text-decoration: none; color: var(--pt-text);
  border-bottom: 1px solid var(--pt-border-l); transition: background .12s;
}
.pt-msg-inbox__item:hover    { background: var(--pt-primary-l); }
.pt-msg-inbox__item--active  { background: var(--pt-primary-l); border-left: 3px solid var(--pt-primary); }
.pt-msg-inbox__item--unread  { background: #f5f0fa; }
.pt-msg-inbox__item--unread .pt-msg-inbox__name { font-weight: 700; }

.pt-msg-inbox__info  { flex: 1; min-width: 0; }
.pt-msg-inbox__name  { display: flex; align-items: baseline; gap: .35rem; font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-msg-inbox__role  { font-size: .68rem; font-weight: 400; color: var(--pt-text-l); }
.pt-msg-inbox__preview { display: block; font-size: .75rem; color: var(--pt-text-m); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .15rem; }
.pt-msg-inbox__preview em { font-style: normal; color: var(--pt-text-l); }
.pt-msg-inbox__meta  { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; flex-shrink: 0; }
.pt-msg-inbox__time  { font-size: .68rem; color: var(--pt-text-l); white-space: nowrap; }
.pt-msg-inbox__badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pt-primary); color: #fff; font-size: .68rem; font-weight: 700; text-align: center; line-height: 18px; }

/* ─ Chat ─ */
.pt-msg-chat {
  display: flex; flex-direction: column; overflow: hidden; padding: 0 !important;
}
.pt-msg-chat--empty {
  display: flex; align-items: center; justify-content: center;
}

.pt-msg-chat__body {
  flex: 1; overflow-y: auto; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .35rem;
}

.pt-msg-chat__empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
  color: var(--pt-text-l); font-size: .88rem;
}

/* Footer saisie */
.pt-msg-chat__footer { padding: .6rem 1rem; border-top: 1px solid var(--pt-border-l); }
.pt-msg-chat__footer form { display: flex; align-items: flex-end; gap: .5rem; }
.pt-msg-chat__input {
  flex: 1; resize: none; overflow-y: hidden; min-height: 38px; max-height: 120px;
  padding: .5rem .75rem; border: 1px solid var(--pt-border); border-radius: 20px;
  font-size: .88rem; font-family: inherit; background: var(--pt-gray-50);
  transition: border-color .15s;
}
.pt-msg-chat__input:focus { outline: none; border-color: var(--pt-primary); background: #fff; }
.pt-msg-chat__send {
  flex-shrink: 0; width: 40px; height: 40px; padding: 0;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* ─ Bulles ─ */
.pt-msg-date-sep {
  text-align: center; margin: .5rem 0; position: relative;
}
.pt-msg-date-sep::before {
  content: ''; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--pt-border-l);
}
.pt-msg-date-sep span {
  position: relative; background: #fff; padding: 0 .75rem;
  font-size: .7rem; color: var(--pt-text-l); font-weight: 600;
}

.pt-msg-bubble-row {
  display: flex; align-items: flex-end; gap: .5rem;
  max-width: 75%; align-self: flex-start;
}
.pt-msg-bubble-row--mine { flex-direction: row-reverse; align-self: flex-end; }

.pt-msg-bubble {
  position: relative; padding: .5rem .85rem .9rem;
  background: #fff; border: 1px solid var(--pt-border-l); border-radius: 16px 16px 16px 4px;
  font-size: .875rem; line-height: 1.45; color: var(--pt-text);
  box-shadow: 0 1px 2px rgba(0,0,0,.06); max-width: 100%; word-break: break-word;
}
.pt-msg-bubble--mine {
  background: var(--pt-primary); color: #fff; border-color: var(--pt-primary-d);
  border-radius: 16px 16px 4px 16px;
}
.pt-msg-bubble__time {
  position: absolute; bottom: .2rem; right: .65rem;
  font-size: .6rem; opacity: .6; white-space: nowrap;
}

/* ─ Avatar ─ */
.pt-msg-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--pt-primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; flex-shrink: 0;
}
.pt-msg-avatar--sm  { width: 32px; height: 32px; font-size: .75rem; }
.pt-msg-avatar--xs  { width: 26px; height: 26px; font-size: .65rem; }

/* ─ Dropdown nouveau message ─ */
.pt-msg-contact-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 240px; background: #fff; border: 1px solid var(--pt-border);
  border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.12);
  z-index: 200; overflow: hidden;
}
.pt-msg-contact-dropdown__title {
  padding: .5rem .9rem; font-size: .72rem; font-weight: 700;
  color: var(--pt-text-l); text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--pt-border-l); margin: 0;
}
.pt-msg-contact-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .6rem .9rem; text-decoration: none; color: var(--pt-text);
  transition: background .12s;
}
.pt-msg-contact-item:hover, .pt-msg-contact-item--active { background: var(--pt-primary-l); }
.pt-msg-contact-item strong { display: block; font-size: .83rem; }
.pt-msg-contact-role { font-size: .7rem; color: var(--pt-text-l); font-style: normal; }

/* ── Gantt interactif ────────────────────────────────────────────────────── */
.pt-gantt { overflow-x: auto; min-width: 0; }

/* Ruler */
.pt-gantt__ruler-row { display: flex; margin-bottom: .25rem; }
.pt-gantt__label-col { width: 160px; flex-shrink: 0; }
.pt-gantt__ruler {
  flex: 1; position: relative; height: 20px;
  border-bottom: 1px solid var(--pt-border-l);
}
.pt-gantt__tick {
  position: absolute; top: 0; font-size: .62rem; color: var(--pt-text-l);
  transform: translateX(-50%); white-space: nowrap; user-select: none;
}
.pt-gantt__tick::after {
  content: ''; display: block; width: 1px; height: 5px;
  background: var(--pt-border); margin: 0 auto;
}

/* Grid */
.pt-gantt__grid { position: relative; }

/* Vlines overlay — couvre uniquement la zone des tracks (à droite du label) */
.pt-gantt__vlines-overlay {
  position: absolute; top: 0; bottom: 0;
  left: 160px; right: 0;
  pointer-events: none; z-index: 0;
}
.pt-gantt__vline {
  position: absolute; top: 0; bottom: 0;
  width: 1px; background: rgba(0,0,0,.06);
  pointer-events: none; z-index: 0;
}

/* Today marker */
.pt-gantt__today {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: var(--pt-danger, #e53e3e); opacity: .7; z-index: 3; pointer-events: none;
}
.pt-gantt__today::before {
  content: 'Auj.'; position: absolute; top: 2px; left: 4px;
  font-size: .6rem; color: var(--pt-danger, #e53e3e); font-weight: 700; white-space: nowrap;
}

/* Rows */
.pt-gantt__row { display: flex; align-items: center; margin-bottom: .55rem; }
.pt-gantt__label {
  font-size: .78rem; font-weight: 600; color: var(--pt-text-m);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pt-gantt__label-dates {
  font-size: .65rem; color: #6b7280; margin-top: .1rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pt-gantt__late-badge { font-size: .65rem; color: var(--pt-danger, #e53e3e); margin-left: .2rem; }

/* Track */
.pt-gantt__track {
  flex: 1; height: 32px; background: var(--pt-gray-100, #f1f2f5);
  border-radius: 6px; position: relative; overflow: visible;
}

/* Bar */
.pt-gantt__bar {
  position: absolute; top: 4px; height: 24px;
  border-radius: 5px; display: flex; align-items: stretch;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(107,70,139,.08);
  cursor: grab; z-index: 2; min-width: 12px;
  transition: box-shadow .15s;
}
.pt-gantt__bar:hover    { box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.pt-gantt__bar--dragging{ cursor: grabbing; box-shadow: 0 4px 16px rgba(0,0,0,.25); opacity: .92; }
/* Statuts */
.pt-gantt__bar--done     { background: rgba(56,161,105,.15);  border-color: rgba(56,161,105,.5); }
.pt-gantt__bar--late     { background: rgba(217,83,79,.3);    border-color: rgba(217,83,79,.9);  border-width: 2px; }
.pt-gantt__bar--en-cours { background: rgba(66,133,244,.12);  border-color: rgba(66,133,244,.5); }
.pt-gantt__bar--nouveau  { background: rgba(107,114,128,.15); border-color: rgba(107,114,128,.5); }
.pt-gantt__bar--no-dates { border: 2px dashed #d1d5db; background: rgba(209,213,219,.1); opacity: .7; }

/* Drag handles */
.pt-gantt__handle {
  width: 7px; flex-shrink: 0; cursor: ew-resize;
  background: rgba(0,0,0,.1); transition: background .15s;
  display: flex; align-items: center; justify-content: center;
}
.pt-gantt__handle--left  { border-radius: 4px 0 0 4px; }
.pt-gantt__handle--right { border-radius: 0 4px 4px 0; }
.pt-gantt__handle::after {
  content: ''; display: block; width: 2px; height: 10px;
  background: rgba(0,0,0,.25); border-radius: 1px;
}
.pt-gantt__handle:hover { background: rgba(0,0,0,.22); }

/* Bar body + fill */
.pt-gantt__bar-body {
  flex: 1; position: relative; overflow: hidden; cursor: grab;
}
.pt-gantt__bar--dragging .pt-gantt__bar-body { cursor: grabbing; }
.pt-gantt__bar-fill {
  position: absolute; inset: 0; border-radius: 0;
  background: var(--pt-primary); opacity: .55; pointer-events: none;
  transition: width .2s;
}
.pt-gantt__bar--done .pt-gantt__bar-fill     { background: var(--pt-success, #38a169); }
.pt-gantt__bar--late .pt-gantt__bar-fill     { background: var(--pt-danger, #d9534f); opacity: .85; }
.pt-gantt__bar--late .pt-gantt__bar-body     { background: rgba(217,83,79,.25); }
.pt-gantt__bar--late .pt-gantt__handle       { background: rgba(217,83,79,.4); }
.pt-gantt__bar--no-dates .pt-gantt__bar-fill { display: none; }
.pt-gantt__bar-label {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  font-size: .67rem; font-weight: 700; color: var(--pt-text); pointer-events: none;
  white-space: nowrap; text-shadow: 0 0 4px #fff;
}

/* Tooltip */
.pt-gantt__tooltip {
  position: fixed; background: #1a202c; color: #fff;
  padding: .4rem .7rem; border-radius: 6px; font-size: .75rem;
  pointer-events: none; z-index: 9999; display: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.3); max-width: 220px; line-height: 1.4;
}

/* Legend */
.pt-gantt__legend {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-top: .85rem; font-size: .74rem; color: var(--pt-text-m);
}
.pt-gantt__legend-dot {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 2px; margin-right: .3rem; vertical-align: middle;
}

/* Photo sections groupées par phase */
.pt-photo-section { margin-bottom: 1.5rem; }
.pt-photo-section:last-child { margin-bottom: 0; }
.pt-photo-section__header {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem 0 .55rem;
  border-bottom: 2px solid var(--pt-border);
  margin-bottom: .85rem;
}
.pt-photo-section__label {
  font-weight: 600; font-size: .88rem;
  display: flex; align-items: center; gap: .4rem;
  flex: 1;
}

/* Upload zone */
.pt-upload-zone { position: relative; border: 2px dashed var(--pt-border); border-radius: var(--pt-radius); overflow: hidden; }
.pt-upload-zone__input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.pt-upload-zone__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 2rem;
  cursor: pointer;
  color: var(--pt-text-l);
  text-align: center;
}
.pt-upload-zone__label svg { width: 40px; height: 40px; color: var(--pt-text-l); }
.pt-upload-zone__files { padding: .5rem 1rem; }
.pt-upload-zone__file-item { font-size: .82rem; padding: .25rem 0; color: var(--pt-text); }

/* ────────────────────────────────────────────────────────────
   COMMENTS
──────────────────────────────────────────────────────────── */
.pt-comments { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.5rem; }

.pt-comment {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}

.pt-comment--mine { flex-direction: row-reverse; }

.pt-comment__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pt-primary-l);
  color: var(--pt-primary);
  font-size: .7rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pt-comment--client    .pt-comment__avatar { background: var(--pt-accent-l);  color: var(--pt-accent); }
.pt-comment--chef_projet .pt-comment__avatar { background: var(--pt-warning-l); color: var(--pt-warning); }
.pt-comment--admin     .pt-comment__avatar { background: var(--pt-primary-l); color: var(--pt-primary); }

.pt-comment__body {
  background: var(--pt-gray-50);
  border-radius: var(--pt-radius);
  padding: .75rem 1rem;
  flex: 1;
  border: 1px solid var(--pt-border-l);
}

.pt-comment--mine .pt-comment__body { background: var(--pt-primary-l); border-color: #ddc8d5; }

.pt-comment__header { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; flex-wrap: wrap; }
.pt-comment__header b { color: var(--pt-primary); }
.pt-comment__content { font-size: .875rem; line-height: 1.5; color: var(--pt-text-m); }

.pt-comment-form { border-top: 1px solid var(--pt-border-l); padding-top: 1rem; }
.pt-comment-form__input { margin-bottom: .75rem; }

.pt-reply-btn { margin-top: .4rem; opacity: .7; }
.pt-reply-btn:hover { opacity: 1; }
.pt-reply-form { margin-top: .6rem; }
.pt-reply-form textarea { margin-bottom: 0; }
.pt-reply-form__actions { display: flex; gap: .5rem; margin-top: .5rem; }

.pt-replies {
  margin-top: .75rem;
  padding-left: 1rem;
  border-left: 3px solid var(--pt-border-l);
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.pt-comment--reply .pt-comment__body { background: var(--pt-white); }
.pt-comment__avatar--sm { width: 26px; height: 26px; font-size: .65rem; }

/* Comment area (Odoo style) */
.pt-comment-area { border: 1px solid var(--pt-border); border-radius: var(--pt-radius-sm); overflow: hidden; }
.pt-comment-area textarea {
  width: 100%;
  border: none;
  padding: 10px 14px;
  font-family: var(--pt-font);
  font-size: 13.5px;
  color: var(--pt-text);
  resize: none;
  min-height: 68px;
  outline: none;
  background: var(--pt-white);
}
.pt-comment-area-footer {
  padding: 7px 12px;
  background: var(--pt-bg);
  border-top: 1px solid var(--pt-border-l);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ────────────────────────────────────────────────────────────
   DETAIL LAYOUT
──────────────────────────────────────────────────────────── */
.pt-detail-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.pt-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pt-three-col { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

.pt-detail-list { display: grid; grid-template-columns: 130px 1fr; gap: .5rem .75rem; margin-top: 1rem; font-size: .875rem; }
.pt-detail-list dt { color: var(--pt-text-l); font-weight: 700; }
.pt-detail-list dd { color: var(--pt-text); }
.pt-project-desc { color: var(--pt-text-m); line-height: 1.6; font-size: 13px; }

/* ────────────────────────────────────────────────────────────
   FORMS
──────────────────────────────────────────────────────────── */
.pt-form { display: flex; flex-direction: column; gap: 0; }
.pt-form-section { padding: 1.5rem 0; border-bottom: 1px solid var(--pt-border-l); }
.pt-form-section:last-of-type { border-bottom: none; }

.pt-form-section__title {
  font-size: .8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--pt-text-l);
  margin-bottom: 1rem;
}

.pt-form-group { display: flex; flex-direction: column; gap: .4rem; }
.pt-form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }

.pt-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--pt-border-l);
}

.pt-label    { font-size: .85rem; font-weight: 700; color: var(--pt-text-m); }
.pt-required { color: var(--pt-danger); }
.pt-hint     { font-size: .78rem; color: var(--pt-text-l); }

.pt-input {
  padding: .5rem .85rem;
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-sm);
  font-size: .9rem;
  font-family: var(--pt-font);
  color: var(--pt-text);
  background: var(--pt-white);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.pt-input:focus {
  outline: none;
  border-color: var(--pt-primary);
  box-shadow: 0 0 0 3px rgba(113,75,103,.12);
}

.pt-textarea { resize: vertical; min-height: 80px; }
.pt-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23868e96' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; background-size: 18px; padding-right: 2rem; }

.pt-input-group { position: relative; display: flex; }
.pt-input-group .pt-input { border-right: none; border-radius: var(--pt-radius-sm) 0 0 var(--pt-radius-sm); }

.pt-input-addon {
  background: var(--pt-border-l);
  border: 1px solid var(--pt-border);
  border-radius: 0 var(--pt-radius-sm) var(--pt-radius-sm) 0;
  padding: 0 .75rem;
  cursor: pointer;
  color: var(--pt-text-l);
  display: flex;
  align-items: center;
  transition: background .15s;
}
.pt-input-addon:hover { background: var(--pt-border); }
.pt-input-addon svg { width: 18px; height: 18px; }

.pt-range { width: 100%; accent-color: var(--pt-primary); }

/* Role selector */
.pt-role-selector { display: flex; gap: .75rem; flex-wrap: wrap; }
.pt-role-option { cursor: pointer; }
.pt-role-option input { display: none; }
.pt-role-option__label {
  display: inline-block;
  padding: .5rem 1.2rem;
  border: 2px solid var(--pt-border);
  border-radius: var(--pt-radius-sm);
  font-size: .85rem;
  font-weight: 700;
  transition: all .15s;
  cursor: pointer;
}
.pt-role-option input:checked + .pt-role-option__label { border-color: var(--pt-primary); background: var(--pt-primary-l); color: var(--pt-primary); }

/* ────────────────────────────────────────────────────────────
   STATUS & MISC INDICATORS
──────────────────────────────────────────────────────────── */
.pt-status { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 700; }
.pt-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.pt-status--active::before   { background: var(--pt-success); }
.pt-status--inactive::before { background: var(--pt-text-l); }
.pt-status--active   { color: var(--pt-success); }
.pt-status--inactive { color: var(--pt-text-l); }

/* ────────────────────────────────────────────────────────────
   ALERTS
──────────────────────────────────────────────────────────── */
.pt-alert {
  padding: .8rem 1rem;
  border-radius: var(--pt-radius-sm);
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .875rem;
  font-weight: 700;
}

.pt-alert--success { background: var(--pt-success-l); color: #155724; border: 1px solid #b4e0bc; }
.pt-alert--error   { background: var(--pt-danger-l);  color: #721c24; border: 1px solid #f5c6cb; }
.pt-alert--warning { background: var(--pt-warning-l); color: #856404; border: 1px solid #ffd57e; }
.pt-alert--info    { background: var(--pt-info-l);    color: #004085; border: 1px solid #b8d4f1; }
.pt-alert__close   { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: inherit; padding: 0 .2rem; line-height: 1; opacity: .7; }

/* Notification banner */
.pt-notif-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  background: #fff8e6;
  border: 1px solid #f5c842;
  border-radius: var(--pt-radius);
  margin-bottom: 18px;
  font-size: 13px;
  color: #7a5c00;
}

/* ────────────────────────────────────────────────────────────
   LOG ROWS
──────────────────────────────────────────────────────────── */
.pt-log-row {
  display: flex;
  gap: 14px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--pt-border-l);
  font-size: 13px;
  align-items: flex-start;
  transition: background .1s;
}
.pt-log-row:last-child { border-bottom: none; }
.pt-log-row:hover { background: #faf9f8; }

.pt-log-time {
  font-size: 11px;
  color: var(--pt-text-l);
  min-width: 90px;
  padding-top: 2px;
  font-weight: 700;
  white-space: nowrap;
}

.pt-log-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.pt-log-dot--add    { background: var(--pt-success); }
.pt-log-dot--edit   { background: var(--pt-info); }
.pt-log-dot--del    { background: var(--pt-danger); }
.pt-log-dot--access { background: var(--pt-primary); }

.pt-log-text { color: var(--pt-text-m); line-height: 1.5; flex: 1; }
.pt-log-text b { color: var(--pt-text); font-weight: 700; }

/* ────────────────────────────────────────────────────────────
   PROJECT CARDS / LISTS
──────────────────────────────────────────────────────────── */
.pt-project-list { display: flex; flex-direction: column; }

.pt-project-row {
  display: grid;
  grid-template-columns: 1fr auto 180px;
  align-items: center;
  gap: 1rem;
  padding: 12px 20px;
  border-bottom: 1px solid var(--pt-border-l);
  transition: background .1s;
  color: var(--pt-text);
}
.pt-project-row:hover { background: #faf9f8; text-decoration: none; }
.pt-project-row:last-child { border-bottom: none; }
.pt-project-row__title { font-weight: 700; font-size: 13.5px; }
.pt-project-row__meta  { display: flex; gap: 1rem; font-size: .78rem; color: var(--pt-text-l); margin-top: .2rem; }
.pt-project-row__progress { display: flex; align-items: center; gap: .5rem; }

.pt-project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

.pt-project-card {
  background: var(--pt-white);
  border-radius: var(--pt-radius);
  box-shadow: var(--pt-shadow-sm);
  border: 1px solid var(--pt-border);
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.pt-project-card:hover { box-shadow: var(--pt-shadow); transform: translateY(-2px); }
.pt-project-card__header { padding: .75rem 1rem .25rem; }
.pt-project-card__body   { padding: .75rem 1rem; flex: 1; }
.pt-project-card__footer { padding: .75rem 1rem; border-top: 1px solid var(--pt-border-l); }
.pt-project-card__title  { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.pt-project-card__title a  { color: var(--pt-text); }
.pt-project-card__title a:hover { color: var(--pt-primary); text-decoration: none; }
.pt-project-card__client { font-size: .82rem; color: var(--pt-text-l); margin-bottom: .5rem; }
.pt-project-card__dates  { display: flex; flex-direction: column; gap: .2rem; font-size: .78rem; color: var(--pt-text-l); margin-bottom: .5rem; }

/* ────────────────────────────────────────────────────────────
   MODALS
──────────────────────────────────────────────────────────── */
.pt-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

.pt-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

.pt-modal__box {
  position: relative;
  background: var(--pt-white);
  border-radius: var(--pt-radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--pt-shadow-lg);
}

.pt-modal--photo { align-items: center; justify-content: center; }
.pt-modal--photo .pt-modal__box--photo {
    position: relative; max-width: 92vw; max-height: 92vh;
    background: transparent; border-radius: 0; box-shadow: none;
    display: flex; flex-direction: column; align-items: center; overflow: visible;
}
.pt-photo-viewer__img {
    max-width: 88vw; max-height: 80vh; object-fit: contain; display: block;
    border-radius: 6px; box-shadow: 0 8px 40px rgba(0,0,0,.6);
    transition: opacity .18s ease; user-select: none; -webkit-user-drag: none;
}
.pt-photo-viewer__img.fading { opacity: 0; }
.pt-photo-viewer__bottom {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: .5rem .25rem 0; gap: 1rem;
}
.pt-photo-viewer__caption { color: rgba(255,255,255,.8); font-size: .85rem; flex: 1; text-align: center; }
.pt-photo-viewer__counter { color: rgba(255,255,255,.45); font-size: .78rem; white-space: nowrap; }
.pt-lightbox__close {
    position: fixed; top: 1rem; right: 1rem; z-index: 9999;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(0,0,0,.6); border: 2px solid rgba(255,255,255,.5); color: #fff;
    font-size: 1.4rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s; box-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.pt-lightbox__close:hover { background: rgba(0,0,0,.85); border-color: #fff; }
.pt-lightbox__nav {
    position: fixed; top: 50%; transform: translateY(-50%); z-index: 9999;
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(0,0,0,.6); border: 2px solid rgba(255,255,255,.5); color: #fff;
    font-size: 2rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s, transform .15s; user-select: none;
    box-shadow: 0 2px 16px rgba(0,0,0,.6);
}
.pt-lightbox__nav:hover { background: rgba(0,0,0,.85); border-color: #fff; transform: translateY(-50%) scale(1.08); }
.pt-lightbox__nav--prev { left: 1.2rem; }
.pt-lightbox__nav--next { right: 1.2rem; }
.pt-lightbox__nav:disabled { opacity: .25; cursor: default; pointer-events: none; }

.pt-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .875rem 1.25rem;
  border-bottom: 1px solid var(--pt-border-l);
}
.pt-modal__header h4 { font-size: .9rem; font-weight: 700; }
.pt-modal__close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--pt-text-l); padding: 0; line-height: 1; }
.pt-modal__close--white { color: white; }
.pt-modal__body { padding: 1.25rem; }
.pt-modal__footer { padding: 1rem 1.25rem; border-top: 1px solid var(--pt-border-l); display: flex; justify-content: flex-end; gap: .75rem; }

.pt-photo-viewer__img { max-width: 100%; max-height: 80vh; object-fit: contain; display: block; }
.pt-photo-viewer__caption { color: var(--pt-gray-400); text-align: center; padding: .75rem; font-size: .85rem; }

/* ────────────────────────────────────────────────────────────
   EMPTY STATES
──────────────────────────────────────────────────────────── */
.pt-empty-state { text-align: center; padding: 3rem 2rem; }
.pt-empty-state--sm { padding: 1.5rem; }
.pt-empty-state__icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: .5; }
.pt-empty-state h4 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.pt-empty-state p  { color: var(--pt-text-l); font-size: .875rem; margin-bottom: 1.25rem; }

/* ────────────────────────────────────────────────────────────
   FILTERS
──────────────────────────────────────────────────────────── */
.pt-filters { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }

.pt-filter-btn {
  padding: .35rem .85rem;
  border: 1px solid var(--pt-border);
  border-radius: 20px;
  background: var(--pt-white);
  font-size: .82rem;
  cursor: pointer;
  transition: all .15s;
  color: var(--pt-text-l);
  font-family: var(--pt-font);
  font-weight: 700;
}
.pt-filter-btn.is-active,
.pt-filter-btn:hover { background: var(--pt-primary); color: white; border-color: var(--pt-primary); }

/* ────────────────────────────────────────────────────────────
   MISC
──────────────────────────────────────────────────────────── */
.pt-code { background: var(--pt-border-l); padding: .15rem .4rem; border-radius: 3px; font-family: var(--pt-font-mono); font-size: .8rem; color: var(--pt-primary-d); }
.pt-pre  { background: var(--pt-gray-50); padding: 1rem; border-radius: var(--pt-radius-sm); font-size: .82rem; white-space: pre-wrap; font-family: var(--pt-font-mono); max-height: 300px; overflow: auto; }
.pt-text-muted  { color: var(--pt-text-l); }
.pt-text-sm     { font-size: .8rem; }
.pt-text-center { text-align: center; }

.pt-info-box {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  background: var(--pt-accent-l);
  border-left: 3px solid var(--pt-accent);
  padding: .75rem 1rem;
  border-radius: 0 var(--pt-radius-sm) var(--pt-radius-sm) 0;
  font-size: .85rem;
  color: #014d51;
  margin-bottom: 1rem;
}
.pt-info-box svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: .1rem; }

.pt-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pt-primary-l);
  color: var(--pt-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}
.pt-avatar--sm { width: 26px; height: 26px; font-size: .65rem; }

.pt-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}
.pt-pagination__info { font-size: .85rem; color: var(--pt-text-l); }

/* ────────────────────────────────────────────────────────────
   AUTH / LOGIN
──────────────────────────────────────────────────────────── */
.pt-auth-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pt-bg);
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

.pt-auth-body::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--pt-primary) 0%, var(--pt-primary-d) 100%);
  clip-path: polygon(0 0, 55% 0, 40% 100%, 0 100%);
}

.pt-login {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.pt-login__card {
  background: var(--pt-white);
  border-radius: var(--pt-radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--pt-shadow-lg);
}

.pt-login__logo {
  text-align: center;
  margin-bottom: 2rem;
}

.pt-login__logo-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: .5rem;
}

.pt-login__icon { font-size: 2.5rem; margin-bottom: .4rem; }

.pt-login__logo h1 {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--pt-primary);
  letter-spacing: -.5px;
}

.pt-login__logo p { color: var(--pt-text-l); font-size: .9rem; margin-top: .25rem; }

.pt-login__form { display: flex; flex-direction: column; gap: 1.2rem; }
.pt-login__footer { text-align: center; margin-top: 1.5rem; color: var(--pt-text-l); font-size: .8rem; }

/* ────────────────────────────────────────────────────────────
   ERROR PAGES
──────────────────────────────────────────────────────────── */
.pt-error-page { text-align: center; padding: 3rem; }
.pt-error-page__code { font-size: 6rem; font-weight: 900; opacity: .15; line-height: 1; color: var(--pt-primary); }
.pt-error-page__title { font-size: 1.5rem; font-weight: 900; margin-bottom: 1rem; }
.pt-error-page p { margin-bottom: 2rem; color: var(--pt-text-l); }

/* ────────────────────────────────────────────────────────────
   SCROLLBAR
──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--pt-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--pt-text-l); }

/* ────────────────────────────────────────────────────────────
   RESPONSIVE
──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .pt-sidebar { position: fixed; top: var(--pt-topbar-h); left: 0; height: calc(100vh - var(--pt-topbar-h)); transform: translateX(-100%); z-index: 150; box-shadow: var(--pt-shadow-lg); }
  .pt-sidebar.is-open { transform: translateX(0); }
  .pt-topbar__toggle { display: flex; }
  .pt-detail-grid { grid-template-columns: 1fr; }
  .pt-stats-grid, .pt-kpi-row { grid-template-columns: repeat(3, 1fr); }
  .pt-phases-grid { grid-template-columns: 1fr; }
  .pt-form-row { grid-template-columns: 1fr; }
  .pt-two-col  { grid-template-columns: 1fr; }
  .pt-three-col{ grid-template-columns: 1fr; }
  .pt-dash-row2, .pt-dash-row3 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .pt-content { padding: 1rem; }
  .pt-photo-grid { grid-template-columns: repeat(2, 1fr); }
  .pt-page-header { flex-direction: column; }
  .pt-modal__box { max-width: 95vw; }
  .pt-stats-grid, .pt-kpi-row { grid-template-columns: 1fr 1fr; }
  .pt-dash-row2, .pt-dash-row3 { grid-template-columns: 1fr; }

  /* ── Login mobile fix ── */
  .pt-auth-body {
    min-height: 100dvh;          /* dynamic viewport height (barre nav mobile) */
    min-height: -webkit-fill-available;
    align-items: flex-start;
    overflow-y: auto;
    padding: 1rem 0;
  }
  .pt-auth-body::before {
    clip-path: none;             /* supprime le décor diagonal sur petit écran */
    opacity: .08;
  }
  .pt-login {
    padding: 1rem;
    align-items: flex-start;
    min-height: unset;
  }
  .pt-login__card {
    padding: 1.5rem 1.25rem;
    box-shadow: var(--pt-shadow);
  }
}

/* ────────────────────────────────────────────────────────────
   PARAMÈTRES PLATEFORME
──────────────────────────────────────────────────────────── */
.pt-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 900px) { .pt-settings-grid { grid-template-columns: 1fr; } }

.pt-settings-col { display: flex; flex-direction: column; gap: 1.25rem; }

.pt-card__header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .875rem 1.25rem;
  border-bottom: 1px solid var(--pt-border);
  font-size: .875rem;
  font-weight: 700;
  color: var(--pt-text);
  fill: var(--pt-text-l);
}

/* Logo upload */
.pt-logo-preview {
  width: 100%;
  min-height: 90px;
  background: var(--pt-bg);
  border-radius: 8px;
  border: 1px solid var(--pt-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .75rem;
  overflow: hidden;
  padding: .5rem;
}
.pt-logo-preview img { max-height: 80px; max-width: 100%; object-fit: contain; }

.pt-logo-preview__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  color: var(--pt-text-l);
  font-size: .8rem;
}
.pt-logo-preview__empty svg { width: 32px; height: 32px; fill: var(--pt-border); }

.pt-logo-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: .9rem;
  border: 2px dashed var(--pt-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  text-align: center;
  color: var(--pt-text-l);
  font-size: .85rem;
}
.pt-logo-upload:hover { border-color: var(--pt-primary); background: rgba(108,75,160,.04); color: var(--pt-primary); }
.pt-logo-upload svg { width: 22px; height: 22px; fill: currentColor; }
.pt-logo-upload small { font-size: .75rem; opacity: .7; }

.pt-settings-delete-logo {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .6rem;
  font-size: .8rem;
  color: var(--pt-danger, #e53e3e);
  cursor: pointer;
}
.pt-settings-delete-logo input { accent-color: var(--pt-danger, #e53e3e); }

/* Aperçu rapport miniature */
.pt-rapport-preview {
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  font-size: .78rem;
}
.pt-rapport-preview__header {
  background: #1e4d8c;
  color: #fff;
  padding: .875rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.pt-rapport-preview__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.pt-rapport-preview__logo {
  height: 32px;
  max-width: 80px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}
.pt-rapport-preview__logo-placeholder {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,.15);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pt-rapport-preview__logo-placeholder svg { width: 18px; height: 18px; fill: rgba(255,255,255,.5); }
.pt-rapport-preview__nom { font-weight: 700; font-size: .85rem; }
.pt-rapport-preview__slogan { font-size: .72rem; opacity: .7; }
.pt-rapport-preview__title { font-weight: 700; font-size: .95rem; }
.pt-rapport-preview__meta { font-size: .72rem; opacity: .65; }
.pt-rapport-preview__footer {
  background: #f8f9fc;
  border-top: 1px solid #e0e0e0;
  padding: .5rem 1rem;
  font-size: .72rem;
  color: #888;
}

/* Topbar logo société */
.pt-topbar__company-logo {
  height: 32px;
  max-width: 120px;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(255,255,255,0.92);
  padding: 2px 5px;
}

/* ────────────────────────────────────────────────────────────
   DRAG & DROP — RÉORDONNANCEMENT DES PHASES
──────────────────────────────────────────────────────────── */
.pt-phase-item--draggable { cursor: default; }

.pt-phase-item__drag {
    cursor: grab;
    color: var(--pt-text-l);
    opacity: .35;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 .25rem;
    transition: opacity .15s;
    touch-action: none;
}
.pt-phase-item__drag:hover,
.pt-phase-item--draggable:hover .pt-phase-item__drag { opacity: .75; }
.pt-phase-item__drag:active { cursor: grabbing; opacity: 1; }

.pt-phase-item.is-dragging {
    opacity: .35;
    background: var(--pt-bg);
    box-shadow: none;
}
.pt-phase-item.is-drag-over {
    border-top: 2px solid var(--pt-primary);
}

/* ══════════════════════════════════════════════════════════════════════════
   ONGLETS (tabs) — page projet show
   ══════════════════════════════════════════════════════════════════════════ */
.pt-tabs {
  display: flex;
  align-items: center;
  gap: .25rem;
  background: var(--pt-bg, #fff);
  border-bottom: 2px solid var(--pt-border, #e5e7eb);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pt-tabs::-webkit-scrollbar { display: none; }

.pt-tab {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .65rem 1rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--pt-text-m, #6b7280);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  border-radius: 4px 4px 0 0;
  flex-shrink: 0;
}
.pt-tab__icon { flex-shrink: 0; }
@media (max-width: 640px) {
  .pt-tab { padding: .65rem .6rem; gap: .2rem; }
  .pt-tab__label { display: none; }
}
.pt-tab:hover {
  color: var(--pt-primary, #2563eb);
  background: var(--pt-bg-muted, #f3f4f6);
}
.pt-tab--active {
  color: var(--pt-primary, #2563eb);
  border-bottom-color: var(--pt-primary, #2563eb);
  font-weight: 600;
}

/* Badge compteur dans l'onglet */
.pt-tab__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--pt-bg-muted, #e5e7eb);
  color: var(--pt-text-m, #6b7280);
  border-radius: 9px;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1;
}
.pt-tab--active .pt-tab__badge {
  background: var(--pt-primary-light, #dbeafe);
  color: var(--pt-primary, #2563eb);
}

/* Panneaux */
.pt-tab-panel { animation: ptFadeIn .18s ease; }
@keyframes ptFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Matériels & Consommables ─────────────────────────────────────────────── */
.pt-mat-form {
  background: var(--pt-bg, #f9fafb);
  border: 1px solid var(--pt-border, #e5e7eb);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.pt-mat-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: flex-end;
}
.pt-mat-form__field { display: flex; flex-direction: column; }
.pt-mat-form__field--nom   { flex: 2 1 200px; }
.pt-mat-form__field--qte   { flex: 0 1 90px; }
.pt-mat-form__field--unite { flex: 0 1 100px; }
.pt-mat-form__field--phase { flex: 1 1 160px; }
.pt-mat-form__field--cout  { flex: 0 1 140px; }
.pt-mat-form__field--notes { flex: 2 1 180px; }
.pt-mat-form__submit       { flex: 0 0 auto; }

.pt-mat-table-wrap { overflow-x: auto; }
.pt-mat-table .pt-mat-col--num { text-align: right; white-space: nowrap; }
.pt-mat-table .pt-mat-nom      { font-weight: 600; }
.pt-mat-table tfoot tr         { background: var(--pt-bg); }
.pt-mat-table tfoot td         { padding: 8px 12px; border-top: 2px solid var(--pt-border); }

/* Inline coût */
.pt-mat-cout-cell { cursor: pointer; user-select: none; }
.pt-mat-cout-cell:hover .pt-mat-cout-val { text-decoration: underline dotted var(--pt-accent); color: var(--pt-accent); }

/* Stats coût */
.pt-mat-stats { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.pt-mat-stat  { background: var(--pt-white); border: 1px solid var(--pt-border); border-radius: 8px; padding: .7rem 1.1rem; min-width: 130px; }
.pt-mat-stat--wide { min-width: 220px; }
.pt-mat-stat__val { font-size: 1.25rem; font-weight: 800; color: var(--pt-primary); line-height: 1.1; }
.pt-mat-stat__lbl { font-size: .72rem; color: var(--pt-text-muted); margin-top: .2rem; }

/* Répartition coût par phase */
.pt-mat-phase-recap { padding: 1rem 1.25rem 1.25rem; border-top: 1px solid var(--pt-border); }
.pt-mat-phase-recap__title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--pt-text-muted); margin-bottom: .75rem; }
.pt-mat-phase-recap__row { display: flex; align-items: center; gap: .6rem; margin-bottom: .45rem; font-size: .82rem; }
.pt-mat-phase-recap__name { width: 180px; min-width: 120px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pt-text-m); }
.pt-mat-phase-recap__bar-wrap { flex: 1; background: var(--pt-border); border-radius: 3px; height: 6px; }
.pt-mat-phase-recap__bar { height: 100%; background: var(--pt-primary); border-radius: 3px; min-width: 2px; }
.pt-mat-phase-recap__val { width: 100px; text-align: right; font-weight: 600; color: var(--pt-text-m); flex-shrink: 0; }
.pt-mat-phase-recap__pct { width: 38px; text-align: right; color: var(--pt-text-muted); flex-shrink: 0; }

/* Édition quantité inline */
.pt-mat-qte-cell {
  cursor: pointer;
  user-select: none;
  position: relative;
}
.pt-mat-qte-cell:hover .pt-mat-qte-val {
  text-decoration: underline dotted var(--pt-accent);
  color: var(--pt-accent);
}
.pt-mat-qte-input {
  width: 72px;
  padding: 2px 5px;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  border: 2px solid var(--pt-accent);
  border-radius: 4px;
  outline: none;
  background: #fff;
}
.pt-mat-qte-cell.pt-mat-qte-saved .pt-mat-qte-val {
  color: var(--pt-success);
  font-weight: 700;
  transition: color .6s;
}
.pt-text-muted { color: var(--pt-text-muted, #9ca3af); }

/* ────────────────────────────────────────────────────────────
   STATS VUE D'ENSEMBLE PROJET
──────────────────────────────────────────────────────────── */
.pt-proj-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.pt-proj-stat {
  background: var(--pt-white);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--pt-shadow-sm);
  transition: box-shadow .15s, transform .1s;
}
.pt-proj-stat:hover { box-shadow: var(--pt-shadow); transform: translateY(-1px); }

.pt-proj-stat--avancement {
  justify-content: center;
  padding: 10px;
}
.pt-proj-stat__gauge     { width: 72px; height: 72px; flex-shrink: 0; }
.pt-proj-stat__gauge-svg { width: 100%; height: 100%; display: block; }

.pt-proj-stat__icon {
  width: 40px; height: 40px;
  border-radius: var(--pt-radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pt-proj-stat__icon svg  { width: 20px; height: 20px; fill: currentColor; }
.pt-proj-stat__body      { display: flex; flex-direction: column; min-width: 0; }
.pt-proj-stat__val       { font-size: 20px; font-weight: 900; line-height: 1.1; color: var(--pt-text); }
.pt-proj-stat__lbl       { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--pt-text-l); margin-top: 3px; }
.pt-proj-stat__sub       { font-size: 11px; color: var(--pt-accent); font-weight: 600; margin-top: 2px; }

@media (max-width: 900px) { .pt-proj-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .pt-proj-stats { grid-template-columns: repeat(2, 1fr); } }

/* ────────────────────────────────────────────────────────────
   PERSONNEL & MOYENS HUMAINS
──────────────────────────────────────────────────────────── */
/* ── Stats bar personnel ────────────────────────────────────────────────── */
.pt-pers-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1rem;
}
.pt-pers-stat {
  background: var(--pt-white);
  border: 1px solid var(--pt-border);
  border-radius: 8px;
  padding: .7rem 1.1rem;
  min-width: 110px;
}
.pt-pers-stat--wide { min-width: 200px; }
.pt-pers-stat__val  { font-size: 1.35rem; font-weight: 800; color: var(--pt-primary); line-height: 1.1; }
.pt-pers-stat__lbl  { font-size: .72rem; color: var(--pt-text-muted); margin-top: .2rem; }

/* ── Filtres ─────────────────────────────────────────────────────────────── */
.pt-pers-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.pt-input--sm { padding: .3rem .55rem; font-size: .82rem; height: 30px; }

/* ── Table groupée par personne ─────────────────────────────────────────── */
.pt-pers-person-row { cursor: pointer; background: var(--pt-bg); transition: background .12s; }
.pt-pers-person-row:hover { background: var(--pt-primary-l); }
.pt-pers-chevron { font-size: .75rem; color: var(--pt-text-muted); text-align: center; }
.pt-pers-sortable { cursor: pointer; user-select: none; }
.pt-pers-sortable:hover { color: var(--pt-primary); }
.pt-sort-icon { color: var(--pt-text-muted); font-size: .75rem; }
.pt-pers-detail-row { background: #fafbfc; }
.pt-pers-detail-row td { border-top: none !important; }

/* ── Barre proportionnelle par personne ─────────────────────────────────── */
.pt-pers-bar-wrap {
  position: relative;
  background: var(--pt-border);
  border-radius: 3px;
  height: 8px;
  min-width: 60px;
  display: flex;
  align-items: center;
}
.pt-pers-bar { height: 100%; background: var(--pt-primary); border-radius: 3px; min-width: 2px; transition: width .3s; }
.pt-pers-bar-pct { position: absolute; right: 0; top: -14px; font-size: .65rem; color: var(--pt-text-muted); white-space: nowrap; }

/* ── Récap heures par phase ──────────────────────────────────────────────── */
.pt-pers-phase-recap { padding: 1rem 1.25rem 1.25rem; border-top: 1px solid var(--pt-border); }
.pt-pers-phase-recap__title {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--pt-text-muted); margin-bottom: .75rem;
}
.pt-pers-phase-recap__row { display: flex; align-items: center; gap: .6rem; margin-bottom: .45rem; font-size: .82rem; }
.pt-pers-phase-recap__name {
  width: 180px; min-width: 120px; flex-shrink: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pt-text-m);
}
.pt-pers-phase-recap__bar-wrap { flex: 1; background: var(--pt-border); border-radius: 3px; height: 6px; }
.pt-pers-phase-recap__bar { height: 100%; background: var(--pt-accent); border-radius: 3px; min-width: 2px; }
.pt-pers-phase-recap__val { width: 60px; text-align: right; font-weight: 600; color: var(--pt-text-m); flex-shrink: 0; }
.pt-pers-phase-recap__pct { width: 38px; text-align: right; color: var(--pt-text-muted); flex-shrink: 0; }

.pt-pers-form { margin-bottom: 1.25rem; }
.pt-pers-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: flex-end;
}
.pt-pers-form__field { display: flex; flex-direction: column; }
.pt-pers-form__field--prenom  { flex: 1 1 130px; }
.pt-pers-form__field--nom     { flex: 1 1 130px; }
.pt-pers-form__field--phase   { flex: 1 1 160px; }
.pt-pers-form__field--heures  { flex: 0 1 110px; }
.pt-pers-form__submit         { flex: 0 0 auto; }

.pt-pers-table-wrap { overflow-x: auto; margin-top: .75rem; }
.pt-pers-table .pt-pers-col--num { text-align: right; width: 130px; }
.pt-pers-table .pt-pers-prenom   { color: var(--pt-text-m); }
.pt-pers-table tfoot tr          { background: var(--pt-bg); }
.pt-pers-table tfoot td          { padding: 8px 12px; border-top: 2px solid var(--pt-border); }

/* Unité "h" en muted */
.pt-pers-unit { color: var(--pt-text-l); font-size: .85em; margin-left: 2px; }

/* Édition heures inline */
.pt-pers-heures-cell {
  cursor: pointer;
  user-select: none;
}
.pt-pers-heures-cell:hover .pt-pers-heures-val {
  text-decoration: underline dotted var(--pt-accent);
  color: var(--pt-accent);
}
.pt-pers-heures-input {
  width: 76px;
  padding: 2px 5px;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  border: 2px solid var(--pt-accent);
  border-radius: 4px;
  outline: none;
  background: #fff;
}
.pt-pers-heures-cell.pt-pers-heures-saved .pt-pers-heures-val {
  color: var(--pt-success);
  font-weight: 700;
  transition: color .6s;
}

.pt-btn-icon--danger {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: .2rem .35rem;
  border-radius: 4px;
  opacity: .7;
  transition: opacity .15s, background .15s;
}
.pt-btn-icon--danger:hover { opacity: 1; background: var(--pt-danger-light, #fee2e2); }

/* ── Suivi budgétaire ────────────────────────────────────────────────────── */
.pt-budget-card { margin-top: 1rem; }
.pt-budget-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  margin-bottom: .5rem;
}
.pt-budget-kpi { min-width: 120px; }
.pt-budget-kpi__val { font-size: 1.15rem; font-weight: 800; color: var(--pt-text); line-height: 1.2; }
.pt-budget-kpi__lbl { font-size: .72rem; color: var(--pt-text-muted); margin-top: .1rem; text-transform: uppercase; letter-spacing: .04em; }
.pt-budget-gauge__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .35rem; }
.pt-budget-gauge__track {
  height: 18px;
  background: #e2e8f0;
  border-radius: 9px;
  overflow: hidden;
  display: flex;
}
.pt-budget-gauge__mat,
.pt-budget-gauge__mo  { height: 100%; transition: width .4s; }
.pt-budget-gauge__over { background: repeating-linear-gradient(45deg,#dc2626,#dc2626 4px,#fca5a5 4px,#fca5a5 8px); }
.pt-budget-gauge__legend { display: flex; gap: 1rem; align-items: center; margin-top: .4rem; font-size: .75rem; color: var(--pt-text-muted); flex-wrap: wrap; }
.pt-budget-gauge__dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .3rem; vertical-align: middle; }

/* ── Colonne taux/coût personnel ─────────────────────────────────────────── */
.pt-pers-taux-cell  { cursor: pointer; min-width: 90px; text-align: right; }
.pt-pers-taux-cell:hover { background: var(--pt-primary-l); }
.pt-pers-cout-cell  { text-align: right; font-size: .83rem; }

/* ── KPI sub-label ──────────────────────────────────────────────────────── */
.pt-kpi__sub { font-size:.68rem; color: var(--pt-text-muted); margin-top:.1rem; }

/* ── Password strength bar ──────────────────────────────────────────────── */
.pwd-strength { margin-top:.4rem; }
.pwd-strength__track {
    height: 5px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}
.pwd-strength__bar {
    height: 100%;
    width: 0%;
    border-radius: 9999px;
    transition: width .3s ease, background .3s ease;
}
.pwd-strength__bar--1 { background: #ef4444; }
.pwd-strength__bar--2 { background: #f97316; }
.pwd-strength__bar--3 { background: #eab308; }
.pwd-strength__bar--4 { background: #22c55e; }
.pwd-strength__label {
    font-size: .72rem;
    margin-top: .25rem;
    font-weight: 600;
}
.pwd-criteria { list-style:none; padding:0; margin:.4rem 0 0; display:flex; flex-wrap:wrap; gap:.2rem .75rem; }

/* Belzona skin overrides (style only, no layout change) */
:root {
  --pt-primary: #003c71;
  --pt-primary-d: #002f58;
  --pt-primary-l: #edf4fb;
  --pt-accent: #ff6a14;
  --pt-accent-l: #fff2ea;
  --pt-success: #16a34a;
  --pt-success-l: #e9f8ef;
  --pt-warning: #f59e0b;
  --pt-warning-l: #fff4e5;
  --pt-danger: #dc2626;
  --pt-danger-l: #ffecee;
  --pt-info: #1565c0;
  --pt-info-l: #eaf2fd;
  --pt-bg: #f8f9fa;
  --pt-white: #ffffff;
  --pt-topbar-bg: #003c71;
  --pt-text: #1a1a2e;
  --pt-text-m: #3a4a5f;
  --pt-text-l: #6b7a8d;
  --pt-border: #e2e8f0;
  --pt-border-l: #edf2fa;
  --pt-radius: 8px;
  --pt-radius-sm: 6px;
  --pt-radius-lg: 12px;
  --pt-font: "Outfit", "Segoe UI", system-ui, sans-serif;
}

html, body { background: var(--pt-bg); color: var(--pt-text); }
.pt-topbar { box-shadow: 0 2px 8px rgba(0, 26, 51, 0.2); }
.pt-sidebar { background: #fff; }
.pt-nav-item { border-radius: 8px; font-weight: 500; }
.pt-nav-item.is-active, .pt-nav-item:hover { background: var(--pt-primary-l); color: var(--pt-primary); }
.pt-nav-badge { background: var(--pt-accent); color: #2a1507; }
.pt-card, .pt-table-wrap, .pt-modal__dialog, .pt-auth-card {
  border: 1px solid var(--pt-border);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(13, 27, 42, 0.08);
}
.pt-table th { background: #f5f9ff; color: #466280; }
.pt-table tr:hover td { background: #fcfdff; }
.pt-btn--primary, .pt-btn-primary, button.pt-btn--primary {
  background: var(--pt-accent);
  border-color: var(--pt-accent);
  color: #26180d;
  font-weight: 700;
}
.pt-btn--primary:hover, .pt-btn-primary:hover, button.pt-btn--primary:hover {
  background: #f25f09;
  border-color: #f25f09;
}
.pt-btn--secondary, .pt-btn-secondary { background: #fff; border-color: #c8d8ea; color: #0d3b66; }
.pt-input, .pt-select, input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="date"], input[type="tel"], select, textarea {
  border-color: #cfdaea;
  border-radius: 8px;
}
.pt-input:focus, .pt-select:focus, input:focus, select:focus, textarea:focus {
  border-color: var(--pt-primary);
  box-shadow: 0 0 0 3px rgba(0, 60, 113, 0.12);
  outline: none;
}
.pt-badge--success, .pt-status--success { background: var(--pt-success-l); color: var(--pt-success); }
.pt-badge--warning, .pt-status--warning { background: var(--pt-warning-l); color: #a16207; }
.pt-badge--danger, .pt-status--danger { background: var(--pt-danger-l); color: var(--pt-danger); }
.pt-progress, .pt-progress-bar-bg { background: #e7eef8; }
.pt-progress-bar, .pt-progress > div { background: linear-gradient(90deg, #003c71, #1565c0); }
.pt-auth-body {
  background:
    radial-gradient(780px 280px at 105% -12%, rgba(0, 60, 113, 0.08), transparent 70%),
    radial-gradient(680px 260px at -12% -8%, rgba(255, 106, 20, 0.09), transparent 72%),
    #f8f9fa;
}
.pt-auth-logo { filter: brightness(0) invert(1) contrast(1.05); }
.pt-topbar__company-logo, .pt-topbar__logo img { filter: none; }
.pwd-criteria__item { font-size:.72rem; color:#9ca3af; display:flex; align-items:center; gap:.25rem; transition:color .2s; }
.pwd-criteria__item::before { content:'○'; font-size:.65rem; }
.pwd-criteria__item--ok { color:#22c55e; }
.pwd-criteria__item--ok::before { content:'✓'; }
