/* DFM-IT — Style global */

/* Bouton Retour — fixe hors manager ; dans le topbar sticky pour le manager */
:root {
  --dfm-sticky-back-top: 0.75rem;
  --dfm-sticky-back-left: 1rem;
}
body:has(.tech-topbar),
body:has(#tech-topbar) {
  --dfm-sticky-back-top: 4.75rem;
}
body:has(.maint-topbar),
body:has(.rt-topbar) {
  --dfm-sticky-back-top: 4.75rem;
}
.dfm-back-sticky {
  position: relative;
  z-index: 1;
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 0.85rem 0;
  padding: 0;
  background: none;
  height: auto;
  min-height: 0;
  pointer-events: none;
}
.dfm-back-sticky__btn,
a.dfm-back-sticky {
  position: fixed;
  top: var(--dfm-sticky-back-top);
  left: var(--dfm-sticky-back-left);
  z-index: 290;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.55rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
  pointer-events: auto;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.dfm-back-sticky__btn:hover,
a.dfm-back-sticky:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #1e293b;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

/* Manager : logo + badge ; Retour à côté du CA (actions) */
.manager-topbar__brand-group {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}
.dfm-back-sticky--topbar .dfm-back-sticky__btn {
  position: static !important;
  top: auto !important;
  left: auto !important;
  z-index: auto;
}
.manager-topbar .dfm-back-sticky {
  position: static;
  margin: 0;
  height: auto;
  pointer-events: auto;
  flex-shrink: 0;
}
.manager-topbar .dfm-back-sticky__btn {
  position: static;
  top: auto;
  left: auto;
  z-index: 1;
  padding: 0.28rem 0.6rem;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  color: #1e3a8a;
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 2px 8px rgba(0, 26, 77, 0.2);
}
.manager-topbar .dfm-back-sticky__btn:hover {
  background: #fff;
  color: #1e40af;
  border-color: #fff;
}

/* Hero : pas de pseudo-élément / voile blanc */
.dash-hero::before,
.dash-hero::after {
  content: none !important;
  display: none !important;
}
.dfmit-app .card-dfmit {
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.dfmit-app a[href]:not(.btn) {
  transition: color 0.15s ease;
}
.nav-dfmit {
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-link-dfmit {
  white-space: nowrap;
}

/* Menu manager — colonne flex, pas de calque invisible */
.manager-shell {
  display: flex;
  width: 100%;
  min-height: 100vh;
}
.manager-sidebar {
  flex-shrink: 0;
  pointer-events: auto;
  z-index: 200;
}
.manager-sidebar-link {
  pointer-events: auto;
  text-decoration: none !important;
  cursor: pointer;
  color: inherit;
}
.manager-main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.manager-main-content {
  position: relative;
  z-index: 0;
  flex: 1;
  min-width: 0;
}
.manager-topbar {
  position: sticky;
  top: 0;
  z-index: 300;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem 0.65rem;
  color: #fff;
  font-size: 0.875rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 48%),
    linear-gradient(90deg, #001a4d 0%, #0047ab 55%, #1d4ed8 100%);
  border-bottom: 1px solid rgba(0, 26, 77, 0.85);
  box-shadow: 0 8px 24px rgba(0, 26, 77, 0.2);
  backdrop-filter: blur(8px);
}
.manager-topbar__row--utility {
  order: 1;
  flex: 0 0 auto;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  overflow-x: auto;
  scrollbar-width: none;
}
.manager-topbar__row--utility::-webkit-scrollbar {
  display: none;
}
.manager-topbar__row--utility,
.manager-topbar__row--main {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  width: 100%;
  min-height: 2.35rem;
}
.manager-topbar__row--nav {
  order: 2;
  flex: 0 0 auto;
  display: flex;
  width: 100%;
}
.manager-topbar__row--nav .manager-topbar-nav {
  flex: 1 1 100%;
  width: 100%;
  justify-content: flex-start;
}
.manager-topbar-actions .dfm-global-search--manager {
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: 18rem;
  margin: 0;
}
.manager-topbar-nav {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15rem 0.2rem;
  min-width: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 0.85rem;
  background: rgba(0, 20, 60, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.manager-topbar-sep {
  display: none;
  flex-shrink: 0;
  align-self: center;
  width: 1px;
  height: 1.05rem;
  margin: 0 0.2rem;
  background: rgba(255, 255, 255, 0.22);
}
@media (min-width: 1024px) {
  .manager-topbar-nav .manager-topbar-sep {
    display: inline-block;
  }
}
.manager-topbar-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  padding-left: 0;
  border-left: none;
  flex-shrink: 0;
}
.manager-topbar__row--utility .manager-topbar-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
}
.manager-topbar__row--utility .manager-topbar-link {
  padding: 0.32rem 0.55rem;
  font-size: 0.75rem;
  white-space: nowrap;
}
.manager-ca-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fcd34d;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.manager-ca-badge__label {
  opacity: 0.9;
  font-weight: 800;
}
.manager-ca-badge__label sub {
  font-size: 0.65em;
  bottom: 0;
}
.manager-ca-badge__value {
  color: #fde68a;
  font-variant-numeric: tabular-nums;
}
.manager-ca-badge__icon {
  font-size: 0.7rem;
  opacity: 0.85;
}
@media (max-width: 1280px) {
  .manager-ca-badge__label {
    display: none;
  }
}
.manager-shell--topnav {
  display: block;
}
.manager-shell--topnav .manager-main-wrap {
  width: 100%;
}
@media (max-width: 1100px) {
  .manager-topbar-nav {
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 0.25rem 0.4rem 0.35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .manager-topbar-nav .manager-topbar-link {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .manager-topbar-actions {
    border-left: none;
    padding-left: 0;
  }
}
.manager-topbar a {
  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;
}
.manager-topbar-link {
  display: inline-flex;
  align-items: center;
  position: relative;
  padding: 0.42rem 0.7rem;
  border-radius: 0.55rem;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.manager-topbar-link::after {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.2rem;
  height: 2px;
  border-radius: 999px;
  background: #fff;
  opacity: 0;
  transform: scaleX(0.5);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.manager-topbar-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
}
.manager-topbar-link:hover::after {
  opacity: 0.9;
  transform: scaleX(1);
}
.manager-topbar-actions .manager-topbar-link {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}
.manager-topbar-actions .manager-topbar-link::after {
  display: none;
}
.manager-topbar-actions .manager-topbar-link:hover {
  background: rgba(255, 255, 255, 0.22);
}
.manager-topbar-logout {
  background: rgba(220, 38, 38, 0.2) !important;
  border-color: rgba(254, 202, 202, 0.45) !important;
}
.manager-topbar-logout:hover {
  background: #dc2626 !important;
  border-color: #fecaca !important;
  color: #fff !important;
}
.manager-topbar a span.text-slate-300,
.manager-topbar .text-slate-300 {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
#sidebar-overlay {
  display: none !important;
  pointer-events: none !important;
}

/* Dashboard manager — taille unique KPI (référence ligne de mire) */
.manager-ligne-mire,
.manager-kpi-strip {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  align-items: stretch;
}
.manager-ligne-mire__tile,
.manager-kpi,
a.manager-kpi,
.dash-kpi-tile {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  box-sizing: border-box;
  height: 3.25rem;
  min-height: 3.25rem;
  max-height: 3.25rem;
  padding: 0.35rem 0.5rem !important;
  border-radius: 0.5rem;
  color: #fff;
  text-align: center;
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  box-shadow: none;
  border: none !important;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.manager-ligne-mire__tile:hover,
.manager-kpi:hover,
a.manager-kpi:hover,
a.dash-kpi-tile:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: none;
}
.manager-ligne-mire__label,
.manager-kpi__label,
.dash-kpi-tile-label {
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin: 0 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  color: inherit !important;
}
.manager-ligne-mire__value,
.manager-kpi__value,
.dash-kpi-tile-value {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  margin: 0 !important;
  font-variant-numeric: tabular-nums;
  color: inherit !important;
}
.manager-ligne-mire__tile--teal,
.manager-kpi--teal { background: #0d9488 !important; color: #fff !important; }
.manager-ligne-mire__tile--sky,
.manager-kpi--sky { background: #0369a1 !important; color: #fff !important; }
.manager-ligne-mire__tile--red,
.manager-kpi--red { background: #dc2626 !important; color: #fff !important; }
.manager-ligne-mire__tile--emerald,
.manager-kpi--emerald { background: #059669 !important; color: #fff !important; }
.manager-ligne-mire__tile--slate,
.manager-kpi--slate { background: #475569 !important; color: #fff !important; }
.manager-ligne-mire__tile--dark,
.manager-kpi--dark { background: #1e293b !important; color: #fff !important; }
.manager-kpi--amber { background: #d97706 !important; color: #fff !important; }
.manager-kpi--violet { background: #7c3aed !important; color: #fff !important; }
.manager-kpi--rose { background: #e11d48 !important; color: #fff !important; }
.manager-kpi--cyan { background: #0891b2 !important; color: #fff !important; }
.manager-kpi--orange { background: #ea580c !important; color: #fff !important; }
.manager-kpi--indigo { background: #4f46e5 !important; color: #fff !important; }
.manager-kpi.is-active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(15, 23, 42, 0.45) !important;
}
.manager-kpi-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.manager-kpi-cell .manager-kpi-export {
  font-size: 0.7rem;
  font-weight: 600;
  color: #2563eb;
  text-align: center;
  text-decoration: underline;
}
.manager-kpi-cell .manager-kpi-export:hover {
  color: #1d4ed8;
}

.manager-quick-nav {
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.45rem 0.55rem 0.5rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.manager-quick-nav__title {
  margin: 0 0 0.35rem 0;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}
.manager-quick-nav__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 0.1rem;
}
.manager-quick-nav__item {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  padding: 0.3rem 0.55rem;
  border-radius: 0.45rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.manager-quick-nav__item span[aria-hidden="true"] {
  font-size: 0.8rem;
  line-height: 1;
}
.manager-quick-nav__item:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
@media (min-width: 1280px) {
  .manager-quick-nav__row {
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .manager-quick-nav__item {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
  }
}

:root {
  --primary: #0d47a1;
  --primary-dark: #002171;
  --primary-light: #5472d3;
  --accent: #ff6f00;
  --bg: #f5f7fa;
  --card: #fff;
  --text: #1a237e;
  --text-muted: #5c6bc0;
  --border: #c5cae9;
  --success: #2e7d32;
  --warning: #ed6c02;
  --error: #c62828;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(13, 71, 161, 0.08);
  --shadow-hover: 0 4px 16px rgba(13, 71, 161, 0.12);
}

* { box-sizing: border-box; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* Nav */
.navbar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 0.75rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
}
.navbar a {
  color: rgba(255,255,255,0.95);
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.95rem;
}
.navbar a:hover { background: rgba(255,255,255,0.15); color: #fff; }
.navbar .nav-right { margin-left: auto; }
.navbar .nav-right a { opacity: 0.9; }

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
  min-height: 60vh;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.card h2, .card h3 { margin-top: 0; color: var(--primary); font-size: 1.15rem; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.card-stat {
  text-align: center;
  padding: 1rem;
  border-left: 4px solid var(--primary);
}
.card-stat .number { font-size: 1.75rem; font-weight: 700; color: var(--primary); }
.card-stat .label { font-size: 0.85rem; color: var(--text-muted); }

/* Tables */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}
tr:hover { background: rgba(13, 71, 161, 0.04); }
table .actions { white-space: nowrap; }
table .actions a { margin-right: 0.5rem; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: #fff !important;
  text-decoration: none;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s;
}
.btn:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--text-muted); }
.btn-secondary:hover { background: var(--primary-light); }
.btn-success { background: var(--success); }
.btn-warning { background: var(--warning); }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.page-header { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.page-header h1 { margin: 0; font-size: 1.5rem; color: var(--primary-dark); }

/* Messages */
.messages { list-style: none; padding: 0; margin: 0 0 1rem 0; }
.messages li {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.messages .success { background: #e8f5e9; color: var(--success); border-left: 4px solid var(--success); }
.messages .info { background: #e3f2fd; color: #1565c0; border-left: 4px solid #1565c0; }
.messages .warning { background: #fff3e0; color: var(--warning); border-left: 4px solid var(--warning); }
.messages .error { background: #ffebee; color: var(--error); border-left: 4px solid var(--error); }

/* Forms */
form p { margin: 0.75rem 0; }
form label { display: block; font-weight: 500; margin-bottom: 0.25rem; color: var(--text); }
form input[type="text"], form input[type="email"], form input[type="password"],
form input[type="search"], form input[type="number"], form input[type="date"],
form input[type="month"], form input[type="file"],
form textarea, form select {
  width: 100%;
  max-width: 420px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
}
form textarea { min-height: 100px; resize: vertical; }
form .helptext { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }
.form-actions { margin-top: 1.25rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* Filters / toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.toolbar label { margin-right: 0.35rem; font-size: 0.9rem; }
.toolbar select { max-width: 140px; padding: 0.4rem; }

/* Pagination */
.pagination { margin-top: 1rem; font-size: 0.9rem; color: var(--text-muted); }

/* Suggestions / alerts */
.suggestion { padding: 1rem; border-radius: var(--radius); margin-bottom: 0.75rem; border-left: 4px solid; }
.suggestion.success { background: #e8f5e9; border-color: var(--success); }
.suggestion.warning { background: #fff3e0; border-color: var(--warning); }
.suggestion.info { background: #e3f2fd; border-color: #1565c0; }
.suggestion .titre { font-weight: 600; margin-bottom: 0.25rem; }

/* ========== Dashboard super admin — styles harmonisés ========== */
.dash-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
}
.dash-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.dash-card-header h2, .dash-card-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
}
.dash-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #2563eb;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.dash-btn-primary:hover { background: #1d4ed8; }
.dash-btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.2s;
}
.dash-btn-secondary:hover { background: #e2e8f0; color: #334155; }

/* Champs de formulaire dashboard (filtres, saisie) */
.dash-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.375rem;
}
.dash-input,
input.dash-input,
select.dash-input,
textarea.dash-input {
  display: block;
  width: 100%;
  max-width: none;
  padding: 0.5625rem 0.875rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: #334155;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dash-input:hover {
  border-color: #94a3b8;
}
.dash-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.dash-input::placeholder {
  color: #94a3b8;
}
select.dash-input {
  cursor: pointer;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 1rem;
  appearance: none;
}
.dash-filters-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.02em;
}
.dash-filters-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.125rem;
}
.dash-input-wrap {
  position: relative;
}
.dash-input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: #94a3b8;
  pointer-events: none;
}
.dash-input-with-icon {
  padding-left: 2.375rem;
}

.dash-table { width: 100%; font-size: 0.875rem; border-collapse: collapse; }
.dash-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  background: #f8fafc;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}
.dash-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}
.dash-table tbody tr:hover { background: #f8fafc; }
.dash-link { color: #2563eb; text-decoration: none; }
.dash-link:hover { text-decoration: underline; }
.dash-table .dash-link { color: #2563eb; text-decoration: none; }
.dash-table .dash-link:hover { text-decoration: underline; }

.dash-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 0.75rem 1rem;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  margin-bottom: 0;
}
.dash-filter-form form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 0.75rem 1rem;
  width: 100%;
}
.dash-filter-form .dash-filter-field,
.dash-filter-form > div,
.dash-filter-form > label {
  flex: 0 1 auto;
}
.dash-filter-form .flex-1 {
  flex: 0 1 12.5rem;
}
.dash-filter-form select,
.dash-filter-form input[type="text"],
.dash-filter-form input[type="search"],
.dash-filter-form input[type="date"] {
  padding: 0.5rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  font-size: 0.875rem;
  background: #fff;
  color: #334155;
}
.dash-filter-form button[type="submit"] {
  padding: 0.5rem 1rem;
  background: #334155;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.2s;
}
.dash-filter-form button[type="submit"]:hover { background: #1e293b; }
.dash-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.25rem 0;
}
.dash-page-subtitle { font-size: 0.875rem; color: #64748b; margin: 0; }
.dash-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.8rem;
  color: #64748b;
}
.dash-pagination a {
  padding: 0.35rem 0.75rem;
  background: #f1f5f9;
  color: #475569;
  border-radius: 0.375rem;
  text-decoration: none;
  font-size: 0.8rem;
}
.dash-pagination a:hover { background: #e2e8f0; }

/* Panneau responsable technique — listes & tableaux */
.rt-maint-page {
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
}
.rt-maint-page .rt-maint-table thead {
  background: #f1f5f9;
  color: #334155;
}
.rt-maint-page .rt-maint-table th {
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
}
.rt-maint-page .rt-maint-table td {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}
.rt-maint-page .rt-maint-table tbody tr:hover {
  background: #f8fafc;
}
.rt-dashboard-compact .dash-widget-card {
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  padding: 0.75rem;
}
.rt-dashboard-compact .dash-widget-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

/* Suivi projets manager */
#suivi-projets {
  border-radius: 0.75rem !important;
}
#suivi-projets > .overflow-x-auto,
#suivi-projets .overflow-x-auto {
  background: #fff;
}
#suivi-projets table {
  min-width: 1480px !important;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
#suivi-projets thead th {
  padding: 0.7rem 0.55rem !important;
  background: #174ea6 !important;
  color: #fff !important;
  font-size: 0.72rem;
  font-weight: 700 !important;
  line-height: 1.2;
  letter-spacing: 0;
  border-bottom: 0 !important;
  vertical-align: middle;
  overflow: hidden;
}
#suivi-projets thead th:nth-child(1) { width: 12%; }   /* Ref */
#suivi-projets thead th:nth-child(2) { width: 8%; }    /* Client */
#suivi-projets thead th:nth-child(3) { width: 10%; }   /* Apporté par */
#suivi-projets thead th:nth-child(4) { width: 16%; }   /* Projet */
#suivi-projets thead th:nth-child(5) { width: 7%; }    /* Type */
#suivi-projets thead th:nth-child(6) { width: 8%; }    /* Responsable */
#suivi-projets thead th:nth-child(7) { width: 6%; }    /* Statut */
#suivi-projets thead th:nth-child(8),
#suivi-projets thead th:nth-child(9),
#suivi-projets thead th:nth-child(10) { width: 4.5%; } /* Devis / BL / Facture */
#suivi-projets thead th:nth-child(11),
#suivi-projets thead th:nth-child(12),
#suivi-projets thead th:nth-child(13) {                /* RVT / PV / RIT */
  width: 4%;
  text-align: center;
  white-space: nowrap;
  padding-left: 0.3rem !important;
  padding-right: 0.3rem !important;
}
#suivi-projets thead th:nth-child(14) {                /* Paiement */
  width: 12%;
  min-width: 8.5rem;
  text-align: left;
  white-space: nowrap;
}
#suivi-projets tbody tr {
  background: #fff;
}
#suivi-projets tbody tr:hover {
  background: #f8fafc !important;
}
#suivi-projets a.suivi-cell-link {
  text-decoration: none;
  cursor: pointer;
}
#suivi-projets a.suivi-cell-link:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
  border-radius: 4px;
}
#suivi-projets tbody td {
  padding: 0.95rem 0.75rem !important;
  vertical-align: middle;
  border-bottom: 1px solid #e5e7eb !important;
  color: #475569;
  line-height: 1.35;
}
#suivi-projets tbody td:first-child a {
  display: inline-flex;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: #2563eb !important;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}
#suivi-projets tbody td:first-child a:hover {
  text-decoration: underline;
}
#suivi-projets tbody td:nth-child(2),
#suivi-projets tbody td:nth-child(3),
#suivi-projets tbody td:nth-child(5),
#suivi-projets tbody td:nth-child(6) {
  color: #475569;
  font-size: 0.82rem;
}
#suivi-projets tbody td:nth-child(4) > div:first-child {
  margin-bottom: 0.45rem;
  color: #1e293b;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: normal;
}
#suivi-projets tbody td:nth-child(4) > div + div {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  align-items: stretch;
}
#suivi-projets tbody td:nth-child(4) span:not(.suivi-doc-mark),
#suivi-projets .doc-popup-trigger,
#suivi-projets tbody td:nth-child(7) span:not(.suivi-doc-mark) {
  display: inline-flex;
  min-height: 1.55rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.35rem !important;
  padding: 0.25rem 0.45rem !important;
  font-size: 0.68rem !important;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
}
#suivi-projets tbody td:nth-child(7) {
  text-align: center;
}
#suivi-projets tbody td:nth-child(7) > span {
  min-width: 2.7rem;
  height: 1.55rem;
  border-radius: 999px !important;
}
#suivi-projets tbody td:nth-child(8),
#suivi-projets tbody td:nth-child(9),
#suivi-projets tbody td:nth-child(10),
#suivi-projets tbody td:nth-child(11),
#suivi-projets tbody td:nth-child(12),
#suivi-projets tbody td:nth-child(13) {
  text-align: center;
}
.suivi-doc-mark {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  vertical-align: middle;
  box-sizing: border-box;
  padding: 0 !important;
  min-height: 1.25rem !important;
  font-size: 0 !important;
  box-shadow: none;
}
.suivi-doc-mark--ok { background: #10b981; }
.suivi-doc-mark--ko { background: #ef4444; }
.suivi-doc-mark--ok::after {
  content: "";
  width: 0.28rem;
  height: 0.5rem;
  margin-top: -0.1rem;
  border: solid #fff;
  border-width: 0 0.12rem 0.12rem 0;
  transform: rotate(45deg);
}
.suivi-doc-mark--ko::before,
.suivi-doc-mark--ko::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.55rem;
  height: 0.12rem;
  margin: -0.06rem 0 0 -0.275rem;
  background: #fff;
  border-radius: 1px;
}
.suivi-doc-mark--ko::before { transform: rotate(45deg); }
.suivi-doc-mark--ko::after { transform: rotate(-45deg); }
#suivi-projets tbody td:nth-child(14) {
  font-size: 0.75rem !important;
}
#suivi-projets tbody td:nth-child(14) > div + div {
  margin-top: 0.35rem;
  color: #64748b !important;
  font-size: 0.68rem !important;
}

.dash-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}
@media (min-width: 768px) {
  .dash-kpi-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .dash-kpi-strip { grid-template-columns: repeat(9, minmax(0, 1fr)); }
}
/* .dash-kpi-tile size/colors alignés sur .manager-kpi (défini plus haut) */

/* Hero block reusable for premium headers */
.dash-hero {
  background: linear-gradient(90deg, #001a4d 0%, #0047ab 55%, #1d4ed8 100%);
  color: #fff;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(30, 64, 175, 0.35);
  isolation: isolate;
}
.dash-hero .dash-page-title {
  color: #fff;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: normal;
  font-family: inherit;
}
@media (min-width: 768px) {
  .dash-hero .dash-page-title {
    font-size: 1.125rem;
  }
}
.dash-hero .dash-page-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.45;
  margin: 0.125rem 0 0 0;
  max-width: 52rem;
}
.dash-hero .dash-hero-kicker {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.25rem 0;
}
.dash-hero-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.dash-hero .dash-btn-secondary {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
}
.dash-hero .dash-btn-secondary:hover { background: rgba(255, 255, 255, 0.28); color: #fff; }
.dash-hero .dash-btn-primary,
.dash-hero .dash-hero-btn {
  background: #fff;
  color: #1d4ed8 !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  position: relative;
  z-index: 1;
}
.dash-hero .dash-btn-primary:hover,
.dash-hero .dash-hero-btn:hover { background: #f8fafc; color: #1e40af !important; }
.dash-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ========== Pointage — style premium ========== */
.time-hero {
  background: linear-gradient(90deg, #001a4d 0%, #0047ab 55%, #1d4ed8 100%);
  color: #fff;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.time-hero .dash-page-title {
  color: #fff;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: normal;
  font-family: inherit;
}
@media (min-width: 768px) {
  .time-hero .dash-page-title {
    font-size: 1.125rem;
  }
}
.time-hero .dash-page-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.45;
  margin: 0.125rem 0 0 0;
}
.time-hero-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.time-hero .dash-btn-secondary {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
}
.time-hero .dash-btn-secondary:hover { background: rgba(255, 255, 255, 0.28); color: #fff; }
.time-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #e2e8f0;
  color: #1e293b;
}
.time-pill-live {
  background: #dcfce7;
  color: #166534;
}
.time-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.time-kpi {
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 0.75rem;
}
.time-kpi-label { color: #64748b; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.time-kpi-value { color: #0f172a; font-size: 1.15rem; font-weight: 700; margin-top: 0.2rem; }
@media (max-width: 900px) {
  .time-kpi-grid { grid-template-columns: 1fr; }
}

/* ========== Formulaires premium RT ========== */
.rt-premium-form .field-block {
  margin-bottom: 0.35rem;
}
.rt-premium-form label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.35rem;
}
.rt-premium-form input[type="text"],
.rt-premium-form input[type="email"],
.rt-premium-form input[type="number"],
.rt-premium-form input[type="date"],
.rt-premium-form input[type="datetime-local"],
.rt-premium-form input[type="time"],
.rt-premium-form input[type="file"],
.rt-premium-form input[type="search"],
.rt-premium-form select,
.rt-premium-form textarea {
  width: 100%;
  max-width: none;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 0.7rem 0.85rem;
  color: #0f172a;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.rt-premium-form textarea { min-height: 110px; }
.rt-premium-form .intervenants-picker {
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 0.75rem 0.9rem;
}
.rt-premium-form .intervenants-picker ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.45rem 0.8rem;
}
.rt-premium-form .intervenants-picker li label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: #334155;
}
.rt-premium-form input:focus,
.rt-premium-form select:focus,
.rt-premium-form textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  background: #fff;
}
.rt-premium-form .field-help {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #64748b;
}
.rt-premium-form .field-error {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: #dc2626;
  font-weight: 600;
}
.rt-premium-form .client-autocomplete {
  position: relative;
}
.rt-premium-form .client-suggestions {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
  max-height: 14rem;
  overflow-y: auto;
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 40;
}
.rt-premium-form .client-suggestions.open {
  display: block;
}
.rt-premium-form .client-suggestions li {
  padding: 0.55rem 0.75rem;
  font-size: 0.84rem;
  color: #1e293b;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
}
.rt-premium-form .client-suggestions li:last-child {
  border-bottom: none;
}
.rt-premium-form .client-suggestions li:hover,
.rt-premium-form .client-suggestions li.active {
  background: #eff6ff;
  color: #1d4ed8;
}
.rt-premium-form .client-suggestions__empty {
  padding: 0.55rem 0.75rem;
  font-size: 0.75rem;
  color: #94a3b8;
  font-style: italic;
  cursor: default;
}
.rt-premium-form .field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.rt-premium-form input[type="file"] {
  padding: 0.55rem 0.75rem;
  font-size: 0.8125rem;
}
.rt-premium-form .depenses-table th {
  background: #f8fafc !important;
  color: #475569 !important;
  font-weight: 600;
  border-bottom: 1px solid #e2e8f0;
}

/* Recherche en direct — suggestions */
.live-search-wrap {
  position: relative;
}
.live-search-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 80;
  max-height: 14rem;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}
.live-search-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: #334155;
  border: none;
  background: transparent;
  cursor: pointer;
}
.live-search-suggest-item:hover,
.live-search-suggest-item:focus {
  background: #f1f5f9;
  outline: none;
}
form.live-search-pending {
  opacity: 0.92;
}

/* Dashboard Responsable technique — widgets bas de page (grille compacte) */
.maint-dash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}
@media (min-width: 768px) {
  .maint-dash-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.maint-dash-card {
  display: flex;
  flex-direction: column;
  min-height: 11.5rem;
  max-height: 13.5rem;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}
.maint-dash-card--wide {
  grid-column: 1 / -1;
  max-height: 10rem;
  min-height: 8rem;
}
.maint-dash-card__head {
  flex-shrink: 0;
  padding: 0.35rem 0.6rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.maint-dash-card__title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
}
.maint-dash-card__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.25rem 0.35rem;
}
.maint-dash-card__body--charge {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  grid-template-rows: 1fr auto;
  gap: 0.25rem 0.5rem;
  align-items: center;
  padding: 0.35rem 0.5rem 0.4rem;
}
.maint-dash-chart {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.maint-dash-chart canvas {
  max-width: 5.5rem !important;
  max-height: 5.5rem !important;
}
.maint-dash-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.625rem;
  line-height: 1.35;
  color: #334155;
  overflow: auto;
  max-height: 4.5rem;
}
.maint-dash-legend li {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.1rem;
}
.maint-dash-legend__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 9999px;
  flex-shrink: 0;
}
.maint-dash-progress {
  height: 0.3rem;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  grid-column: 2;
}
.maint-dash-progress__bar {
  height: 100%;
  background: #0047ab;
  border-radius: 9999px;
  transition: width 0.3s ease;
}
.maint-dash-table thead.bg-teal-700 th,
.maint-dash-table thead.bg-blue-800 th {
  color: #fff !important;
  font-weight: 700;
  font-size: 0.625rem;
}
.maint-dash-table thead.bg-slate-100 th {
  color: #334155 !important;
  font-weight: 700;
}
.maint-dash-widgets table thead.bg-teal-700 th,
.maint-dash-widgets table thead.bg-blue-800 th {
  color: #fff !important;
  font-weight: 700;
}
.maint-dash-widgets table thead.bg-slate-100 th {
  color: #334155 !important;
  font-weight: 700;
}
#charge-tech-chart-root canvas {
  max-width: 5.5rem;
  max-height: 5.5rem;
}

/* Recherche globale (tous profils) */
.dfm-global-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-width: 10rem;
  max-width: 22rem;
}
.dfm-global-search__input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: none;
  box-sizing: border-box;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  line-height: 1.25;
  outline: none;
  text-align: left;
  text-indent: 0;
  letter-spacing: normal;
  -webkit-appearance: none;
  appearance: none;
}
.dfm-global-search__input::-webkit-search-decoration,
.dfm-global-search__input::-webkit-search-cancel-button,
.dfm-global-search__input::-webkit-search-results-button,
.dfm-global-search__input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.dfm-global-search__input::placeholder {
  color: rgba(255, 255, 255, 0.55);
  opacity: 1;
  text-indent: 0;
}
.dfm-global-search__input:focus {
  border-color: rgba(251, 191, 36, 0.7);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.25);
  background: rgba(255, 255, 255, 0.16);
}
.dfm-global-search__btn {
  flex-shrink: 0;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}
.dfm-global-search__btn:hover {
  background: rgba(255, 255, 255, 0.25);
}
@media (max-width: 640px) {
  .dfm-global-search { display: none; }
}

/* Espace RT — couleurs entreprise (bleu DFM-IT) */
.rt-shell {
  background: #f8fafc;
}
.rt-shell .manager-topbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 48%),
    linear-gradient(90deg, #001a4d 0%, #0047ab 55%, #1d4ed8 100%) !important;
  border-bottom-color: rgba(0, 26, 77, 0.85) !important;
  box-shadow: 0 8px 24px rgba(0, 26, 77, 0.2) !important;
}
.rt-shell .manager-topbar .text-slate-300 {
  color: #dbeafe;
}
.rt-topbar-status {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  white-space: nowrap;
}
.rt-shell .manager-topbar .dfm-back-sticky__btn {
  color: #1e3a8a;
}
.rt-shell .manager-topbar .dfm-back-sticky__btn:hover {
  color: #1e40af;
}
.rt-shell .dash-hero {
  background: linear-gradient(90deg, #001a4d 0%, #0047ab 55%, #1d4ed8 100%) !important;
  border-color: rgba(29, 78, 216, 0.4) !important;
  box-shadow: 0 10px 24px rgba(0, 26, 77, 0.22);
}
.rt-shell .dash-hero .dash-btn-primary,
.rt-shell .dash-hero .dash-hero-btn {
  color: #1d4ed8 !important;
}
.rt-shell .dash-hero .dash-btn-primary:hover,
.rt-shell .dash-hero .dash-hero-btn:hover {
  color: #1e40af !important;
}
.rt-shell .rt-maint-page .rt-maint-table thead {
  background: #0047ab;
  color: #fff;
}
.rt-shell .rt-maint-page .rt-maint-table tbody tr:hover {
  background: #eff6ff;
}
.rt-kpi {
  display: block;
  border-radius: 0.85rem;
  padding: 0.75rem 0.85rem;
  text-decoration: none;
  border: 1px solid #bfdbfe;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 71, 171, 0.08);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.rt-kpi:hover {
  border-color: #3b82f6;
  box-shadow: 0 6px 16px rgba(0, 71, 171, 0.12);
}
.rt-kpi__label {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0047ab;
}
.rt-kpi__value {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e3a8a;
  line-height: 1.15;
}
.rt-kpi__hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.62rem;
  color: #1d4ed8;
}
.rt-kpi--alert {
  border-color: #fcd34d;
  background: #fffbeb;
}
.rt-kpi--alert .rt-kpi__label,
.rt-kpi--alert .rt-kpi__value { color: #92400e; }
.rt-kpi--wait {
  border-color: #93c5fd;
  background: #eff6ff;
}
.rt-kpi--wait .rt-kpi__label { color: #1e40af; }
.rt-kpi--wait .rt-kpi__value { color: #1e3a8a; }
.rt-dashboard-compact .dash-widget-card {
  border-color: #dbeafe;
}

/* Pages formulaire RT : centrées, champs pleine largeur */
.rt-shell .rt-form-page,
.rt-shell #dfm-panel-content > .max-w-2xl,
.rt-shell #dfm-panel-content > .max-w-3xl,
.rt-shell #dfm-panel-content > .max-w-4xl,
.rt-shell #dfm-panel-content > .max-w-5xl,
.rt-shell #dfm-panel-content > [data-panel-body] > .max-w-4xl,
.rt-shell #dfm-panel-content > [data-panel-body] > .max-w-5xl,
.rt-shell #dfm-panel-content .rvt-form-page {
  margin-left: auto;
  margin-right: auto;
}
.rt-shell .rt-form-page,
.rt-shell #dfm-panel-content .rvt-form-page {
  max-width: 56rem;
  width: 100%;
}
.rt-shell .tech-dash:has(#hs-declaration-form) {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
.rt-shell .rt-premium-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.rt-shell .rt-premium-form select,
.rt-shell .rt-premium-form textarea {
  width: 100%;
  max-width: none;
}
.rt-shell .hs-input,
.rt-shell .hs-textarea,
.rt-shell .hs-file-input {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 0.7rem 0.85rem;
  color: #0f172a;
}
.rt-shell .hs-form-card {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  border-radius: 1rem;
  border: 1px solid #bfdbfe;
  box-shadow: 0 8px 24px rgba(0, 26, 77, 0.08);
}
.rt-shell .hs-form-header {
  background: linear-gradient(90deg, #001a4d 0%, #0047ab 55%, #1d4ed8 100%);
  border-bottom: none;
  padding: 1.25rem 1.5rem;
}
.rt-shell .hs-form-header h1 {
  color: #fff;
  text-transform: none;
  font-size: 1.05rem;
  letter-spacing: 0;
}
.rt-shell .hs-form-header p { color: rgba(255, 255, 255, 0.88); }

/* Filigrane traçabilité — technicien, RT, manager, RH, commercial */
.dfm-watermark,
.tech-watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4500;
  overflow: hidden;
}
.dfm-watermark__pattern,
.tech-watermark__pattern {
  position: absolute;
  width: 240%;
  height: 240%;
  top: -70%;
  left: -70%;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 2.25rem 3.75rem;
  transform: rotate(-22deg);
  opacity: 0.075;
}
.dfm-watermark__cell,
.tech-watermark__cell {
  font-size: 0.68rem;
  font-weight: 700;
  color: #1e3a5f;
  white-space: nowrap;
  user-select: none;
}
.dfm-watermark__badge,
.tech-watermark__badge {
  position: fixed;
  right: 0.65rem;
  bottom: 0.45rem;
  margin: 0;
  padding: 0.2rem 0.45rem;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.62rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.01em;
  user-select: none;
  max-width: calc(100vw - 1.5rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rt-shell .dfm-watermark__cell,
.rt-shell .dfm-watermark__badge {
  color: #1e40af;
}
.rh-portal-skin .dfm-watermark {
  z-index: 20;
}
.rh-portal-skin .dfm-watermark__pattern {
  width: 260%;
  height: 260%;
  top: -70%;
  left: -70%;
  gap: 2.6rem 3.8rem;
  opacity: 0.09;
  mix-blend-mode: multiply;
}
.rh-portal-skin .dfm-watermark__cell {
  color: #334155;
  font-weight: 700;
}
.rh-portal-skin .dfm-watermark__badge {
  z-index: 45;
  color: #334155;
  background: rgba(255, 255, 255, 0.8);
}
.ventes-theme .dfm-watermark {
  z-index: 20;
}
.ventes-theme .dfm-watermark__pattern {
  width: 260%;
  height: 260%;
  top: -70%;
  left: -70%;
  gap: 2.6rem 3.8rem;
  opacity: 0.09;
  mix-blend-mode: multiply;
}
.ventes-theme .dfm-watermark__cell {
  color: #334155;
  font-weight: 700;
}
.ventes-theme .dfm-watermark__badge {
  z-index: 45;
  color: #334155;
  background: rgba(255, 255, 255, 0.8);
}
@media (max-width: 640px) {
  .dfm-watermark__badge,
  .tech-watermark__badge {
    font-size: 0.55rem;
    right: 0.35rem;
    bottom: 0.35rem;
  }
}
