/* ==========================================================================
   MODULE 4 : SUIVI OUTILLAGE & MÉTROLOGIE (Thème Teal #0d9488)
   ========================================================================== */

body[data-module="outillage"] header.app-header {
  border-bottom: 3px solid #0d9488;
}

/* Barre latérale du module Métrologie : le fond porte la couleur d'accentuation, les boutons sont blancs */
body[data-module="outillage"] nav.app-nav {
  background-color: #0f766e;
}

body[data-module="outillage"] .nav-item {
  color: #ffffff;
}

body[data-module="outillage"] .nav-item .material-icons,
body[data-module="outillage"] .nav-item em {
  color: #ffffff !important;
}

body[data-module="outillage"] .nav-item span {
  color: #ffffff !important;
}

body[data-module="outillage"] .nav-item:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

body[data-module="outillage"] .nav-item:hover .material-icons,
body[data-module="outillage"] .nav-item:hover em {
  color: #ffffff !important;
}

body[data-module="outillage"] .nav-item.active,
body[data-module="outillage"] .nav-item:active {
  background: rgba(0, 0, 0, 0.22);
  border-left: 4px solid #ffffff;
  box-shadow: inset 4px 0 14px rgba(0, 0, 0, 0.25);
}

body[data-module="outillage"] .nav-item.active::after {
  background-color: #ffffff;
}

body[data-module="outillage"] .nav-item.active .material-icons,
body[data-module="outillage"] .nav-item.active em {
  color: #ffffff !important;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

body[data-module="outillage"] .nav-item.active span {
  color: #ffffff !important;
  font-weight: 700;
}

#sidebar-nav #nav-outillage.active,
#sidebar-nav #nav-dotation.active {
  background: rgba(0, 0, 0, 0.22) !important;
  border-left: 4px solid #ffffff !important;
}

#sidebar-nav #nav-dotation em,
#sidebar-nav #nav-outillage em {
  color: #ffffff !important;
}


/* Structure générale de la vue */
.outillage-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 24px 60px;
}

/* Bandeau supérieur officiel */
.outillage-header-banner {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  margin-bottom: 22px;
}

.banner-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.btn-outillage-back {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  flex-shrink: 0;
  margin-top: 4px;
}

.btn-outillage-back:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.banner-title-wrap h2 {
  margin: 6px 0 4px;
  font-size: 1.45rem;
  color: #0f172a;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.banner-subtitle {
  margin: 0;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.45;
}

.banner-badges-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.banner-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.banner-tag-teal {
  background: #f0fdfa;
  color: #0d9488;
  border-color: #99f6e4;
}

.banner-tag .material-icons {
  font-size: 14px;
}

.banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.btn-outillage-action {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  border: none;
}

.btn-outillage-export {
  background: #f8fafc;
  color: #334155;
  border: 1.5px solid #cbd5e1;
}

.btn-outillage-export:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-outillage-add {
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.35);
}

.btn-outillage-add:hover {
  background: linear-gradient(135deg, #0f766e, #115e59);
  box-shadow: 0 6px 14px rgba(13, 148, 136, 0.45);
  transform: translateY(-1px);
}

/* Grille KPI Métrologie */
.outillage-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

@media (max-width: 1100px) {
  .outillage-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .outillage-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.outillage-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
}

.outillage-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}

.outillage-kpi-card.kpi-active {
  border-color: #0d9488;
  background: #f0fdfa;
  box-shadow: 0 0 0 2px #0d9488;
}

.kpi-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-icon-wrap .material-icons {
  font-size: 22px;
}

.kpi-icon-slate { background: #f1f5f9; color: #475569; }
.kpi-icon-emerald { background: #ecfdf5; color: #059669; }
.kpi-icon-amber { background: #fffbeb; color: #d97706; }
.kpi-icon-rose { background: #fff1f2; color: #e11d48; }
.kpi-icon-cyan { background: #ecfeff; color: #0891b2; }
.kpi-icon-indigo { background: #e0e7ff; color: #4f46e5; }

.kpi-body {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  margin: 2px 0;
}

.kpi-hint {
  font-size: 11px;
  color: #94a3b8;
}

.text-emerald { color: #059669 !important; }
.text-amber { color: #d97706 !important; }
.text-rose { color: #e11d48 !important; }
.text-cyan { color: #0891b2 !important; }
.text-indigo { color: #4f46e5 !important; }

/* Barre de Contrôles & Recherche */
.outillage-control-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.control-search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
}

.control-search-box .material-icons {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  font-size: 20px;
  pointer-events: none;
}

.control-search-box input {
  width: 100%;
  height: 40px;
  padding: 0 36px 0 38px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  color: #0f172a;
  background: #f8fafc;
  transition: all 0.15s ease;
}

.control-search-box input:focus {
  background: #ffffff;
  border-color: #0d9488;
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.btn-clear-search {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
}

.btn-clear-search:hover { color: #475569; }

.control-filters-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.filter-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.filter-group label .material-icons {
  font-size: 16px;
  color: #64748b;
}

.outillage-select {
  height: 38px;
  padding: 0 10px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  cursor: pointer;
}

.outillage-select:focus {
  border-color: #0d9488;
  outline: none;
}

.view-mode-toggle {
  display: flex;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
}

.btn-view-toggle {
  background: #ffffff;
  border: none;
  padding: 7px 10px;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  transition: all 0.12s ease;
}

.btn-view-toggle.active {
  background: #0d9488;
  color: #ffffff;
}

.btn-view-toggle .material-icons {
  font-size: 19px;
}

/* Grille des Cartes Outillage */
.outillage-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

.outillage-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.18s ease;
  position: relative;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.outillage-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.1);
  border-color: #cbd5e1;
}

.outillage-card.card-sensible {
  border-top: 4px solid #f59e0b;
}

/* Header Photo de la Carte */
.outillage-card-media {
  position: relative;
  height: 160px;
  background: #0f172a;
  overflow: hidden;
  cursor: pointer;
}

.outillage-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.outillage-card-media:hover img {
  transform: scale(1.05);
}

.card-media-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.18s ease;
}

.outillage-card-media:hover .card-media-overlay {
  opacity: 1;
}

.media-zoom-badge {
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  backdrop-filter: blur(4px);
}

.media-zoom-badge .material-icons {
  font-size: 16px;
}

.card-status-pill {
  position: static;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  vertical-align: middle;
}

.outillage-card-media .card-status-pill {
  position: absolute;
  bottom: 10px;
  left: 10px;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.outillage-table .card-status-pill,
.outillage-table td .card-status-pill,
td .card-status-pill,
.table-status-pill {
  position: static !important;
  bottom: auto !important;
  left: auto !important;
  display: inline-flex !important;
  vertical-align: middle !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
}

.card-status-pill .material-icons,
.table-status-pill .material-icons {
  font-size: 14px;
}

.badge-metrologie-conforme {
  background: rgba(5, 150, 105, 0.9);
  color: #ffffff;
}

.badge-metrologie-urgent {
  background: rgba(217, 119, 6, 0.95);
  color: #ffffff;
  animation: pulseAmber 2s infinite;
}

.badge-metrologie-retard {
  background: rgba(225, 29, 72, 0.95);
  color: #ffffff;
  animation: pulseRed 1.8s infinite;
}

.badge-metrologie-en-cours {
  background: rgba(8, 145, 178, 0.9);
  color: #ffffff;
}

.badge-metrologie-hs {
  background: rgba(100, 116, 139, 0.9);
  color: #ffffff;
}

@keyframes pulseAmber {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes pulseRed {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.card-sensible-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(245, 158, 11, 0.92);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.card-sensible-tag .material-icons {
  font-size: 13px;
}

/* Corps de Carte */
.outillage-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-serial-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tool-serial-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  color: #0d9488;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  padding: 2px 8px;
  border-radius: 5px;
}

.tool-cat-badge {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 12px;
}

.tool-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: #0f172a;
  font-weight: 700;
  line-height: 1.35;
}

.tool-desc {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Bloc Localisation */
.tool-location-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.12s ease;
}

.tool-location-box:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.tool-location-box .material-icons {
  font-size: 18px;
  color: #0d9488;
  flex-shrink: 0;
  margin-top: 1px;
}

.location-text-wrap {
  display: flex;
  flex-direction: column;
}

.location-label {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.location-value {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}

.location-sub {
  font-size: 11px;
  color: #64748b;
  font-style: italic;
  margin-top: 2px;
}

/* Grille des Dates Métrologie */
.tool-dates-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: auto;
}

.tool-date-col {
  display: flex;
  flex-direction: column;
}

.date-col-label {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.date-col-val {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
}

.tool-date-arrow .material-icons {
  font-size: 16px;
  color: #cbd5e1;
}

/* Footer & Actions Carte */
.outillage-card-footer {
  border-top: 1px solid #f1f5f9;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fafafa;
}

.btn-card-action {
  flex: 1;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.12s ease;
  border: none;
}

.btn-action-send {
  background: #ecfeff;
  color: #0891b2;
  border: 1px solid #a5f3fc;
}

.btn-action-send:hover {
  background: #cffafe;
  color: #0e7490;
}

.btn-action-return {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.btn-action-return:hover {
  background: #d1fae5;
  color: #047857;
}

.btn-card-action-icon {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #64748b;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
  flex-shrink: 0;
}

.btn-card-action-icon:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.btn-action-delete:hover {
  background: #fff1f2;
  color: #e11d48;
  border-color: #fecdd3;
}

/* Tableau dense d'inventaire */
.outillage-table-wrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.outillage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

.outillage-table th {
  background: #f8fafc;
  padding: 12px 14px;
  font-weight: 700;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

.outillage-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.outillage-table tr:hover td {
  background: #f8fafc;
}

.table-thumbnail-wrap {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  background: #0f172a;
  cursor: pointer;
}

.table-thumbnail-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.table-name-wrap {
  display: flex;
  flex-direction: column;
}

.table-sub-desc {
  font-size: 11px;
  color: #64748b;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-loc-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: #334155;
}

.sensible-badge-inline {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #fef3c7;
  color: #b45309;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.table-actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.btn-table-action {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #64748b;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-table-action:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Modale d'Édition & Ajout Outillage - Design Épuré SNCF (0 surchauffe GPU/CPU) */
.outillage-modal-overlay,
.modal-overlay.outillage-modal-overlay,
.modal-overlay.outillage-modal-overlay.open,
.modal-overlay.outillage-modal-overlay.active {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.72) !important; /* Pas de backdrop blur pour préserver le PC */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 99999 !important;
  padding: 16px !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.outillage-edit-dialog,
.outillage-modal-overlay .outillage-edit-dialog,
.outillage-modal-overlay .modal-card,
.modal-overlay.outillage-modal-overlay .modal-card {
  background: #ffffff !important;
  border-radius: 14px !important;
  width: 100% !important;
  max-width: 820px !important;
  max-height: 92vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.3) !important;
  border: 1px solid #e2e8f0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: scale(1) !important;
  pointer-events: auto !important;
  contain: layout paint;
}

/* En-tête Modale */
.outillage-modal-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 22px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  background: #ffffff !important;
}

.outillage-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.outillage-badge-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.outillage-badge-icon.badge-add {
  background: #f0fdfa;
  color: #0d9488;
  border: 1px solid #ccfbf1;
}

.outillage-badge-icon.badge-edit {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
}

.outillage-badge-icon .material-icons {
  font-size: 24px;
}

.outillage-modal-title {
  margin: 0 !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  line-height: 1.25 !important;
}

.outillage-modal-subtitle {
  margin: 2px 0 0 !important;
  font-size: 0.8rem !important;
  color: #64748b !important;
}

.btn-modal-close {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  width: 34px !important;
  height: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #64748b !important;
  cursor: pointer !important;
  font-size: 20px !important;
  transition: all 0.12s ease !important;
  line-height: 1 !important;
  padding: 0 !important;
}

.btn-modal-close:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}

/* Corps du formulaire */
.outillage-form-body {
  padding: 18px 22px !important;
  overflow-y: auto !important;
  background: #f8fafc !important;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.outillage-form-body::-webkit-scrollbar {
  width: 6px;
}

.outillage-form-body::-webkit-scrollbar-track {
  background: transparent;
}

.outillage-form-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Boîte de section / Regroupement logique */
.outillage-section-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.outillage-section-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #0f766e;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.outillage-section-legend .material-icons {
  font-size: 16px;
  color: #0d9488;
}

/* Grilles */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}

.form-row-2col:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .form-row-2col {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Champs et labels */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-label .required {
  color: #e11d48;
  font-weight: 700;
}

.form-hint {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 3px;
}

.form-input {
  width: 100%;
  box-sizing: border-box;
  height: 38px;
  padding: 8px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.form-input:focus {
  border-color: #0d9488 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.14) !important;
}

.form-input.input-error {
  border-color: #e11d48 !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.14) !important;
}

select.form-input {
  cursor: pointer;
}

textarea.form-input,
.form-textarea {
  height: auto !important;
  min-height: 56px;
  padding: 8px 12px;
  line-height: 1.4;
  resize: vertical;
}

/* Toggle Équipement Sensible */
.outillage-sensible-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 12px;
  height: 38px;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  transition: all 0.12s ease;
}

.outillage-sensible-toggle:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.outillage-sensible-toggle input {
  display: none;
}

.sensible-switch-slider {
  width: 32px;
  height: 18px;
  background: #cbd5e1;
  border-radius: 20px;
  position: relative;
  transition: background-color 0.15s ease;
  flex-shrink: 0;
}

.sensible-switch-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.outillage-sensible-toggle input:checked + .sensible-switch-slider {
  background: #0d9488;
}

.outillage-sensible-toggle input:checked + .sensible-switch-slider::after {
  transform: translateX(14px);
}

.outillage-sensible-toggle:has(input:checked) {
  background: #f0fdf4;
  border-color: #86efac;
}

.sensible-label-block {
  display: flex;
  flex-direction: column;
}

.sensible-text-title {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sensible-lock-icon {
  font-size: 14px;
  color: #0d9488;
}

.sensible-text-sub {
  font-size: 10px;
  color: #64748b;
}

/* Raccourcis de calcul d'échéance */
.period-helpers-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.period-helper-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.btn-period-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-period-pill:hover {
  background: #0d9488;
  color: #ffffff;
  border-color: #0d9488;
}

.outillage-status-mini-pill {
  display: none;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  align-items: center;
  gap: 4px;
}

.outillage-status-mini-pill.pill-conforme {
  display: inline-flex;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.outillage-status-mini-pill.pill-urgent {
  display: inline-flex;
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.outillage-status-mini-pill.pill-retard {
  display: inline-flex;
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
}

/* Photo Uploader Box */
.photo-uploader-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  padding: 10px 14px;
}

.photo-preview-wrap {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  background: #0f172a;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
}

.photo-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #94a3b8;
  font-size: 9px;
  text-align: center;
  padding: 4px;
}

.no-photo-placeholder .material-icons {
  font-size: 22px;
  margin-bottom: 2px;
}

.btn-remove-photo {
  position: absolute;
  top: 3px;
  right: 3px;
  background: #e11d48;
  color: #ffffff;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.1s ease;
}

.btn-remove-photo:hover {
  transform: scale(1.1);
}

.photo-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-choose-file {
  background: #ffffff;
  border: 1.5px solid #0d9488;
  color: #0d9488;
  padding: 6px 13px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  transition: all 0.12s ease;
}

.btn-choose-file:hover {
  background: #0d9488;
  color: #ffffff;
}

.photo-opt-info {
  font-size: 11px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Pied de la Modale */
.outillage-modal-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  padding: 14px 22px !important;
  border-top: 1px solid #f1f5f9 !important;
  background: #ffffff !important;
}

.btn-outillage-cancel {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-outillage-cancel:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-outillage-save {
  background: linear-gradient(135deg, #0d9488, #0f766e) !important;
  color: #ffffff !important;
  border: none !important;
  padding: 8px 20px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.25) !important;
  transition: opacity 0.12s ease, transform 0.12s ease !important;
}

.btn-outillage-save:hover {
  opacity: 0.94 !important;
  transform: translateY(-1px) !important;
}

.btn-outillage-save:active {
  transform: translateY(0) !important;
}

/* Modale Photo Viewer */
.photo-viewer-dialog {
  background: #0f172a;
  border-radius: 16px;
  max-width: 680px;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.photo-viewer-header {
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
}

.btn-viewer-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
}

.btn-viewer-close:hover { color: #ffffff; }

.photo-viewer-image-container {
  position: relative;
  width: 100%;
  max-height: 380px;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.photo-viewer-image-container img {
  max-width: 100%;
  max-height: 380px;
  object-fit: contain;
}

.photo-viewer-floating-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
}

.photo-viewer-location-panel {
  background: #ffffff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-loc-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-loc-head .material-icons {
  font-size: 32px;
  color: #0d9488;
}

.loc-sub-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.panel-loc-desc {
  background: #f8fafc;
  border-left: 3px solid #0d9488;
  padding: 8px 12px;
  border-radius: 4px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #334155;
}

.panel-loc-desc .material-icons {
  font-size: 16px;
  color: #0d9488;
  margin-top: 1px;
}

.panel-loc-desc p { margin: 0; }

.panel-loc-footer {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
}

.loc-meta-pill {
  font-size: 12px;
  color: #475569;
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 6px;
}

/* Carte Accès Restreint */
.outillage-restricted-card {
  max-width: 620px;
  margin: 40px auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.restricted-icon-circle {
  width: 68px;
  height: 68px;
  background: #fff1f2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: #e11d48;
}

.restricted-icon-circle .material-icons {
  font-size: 34px;
}

.outillage-restricted-card h3 {
  font-size: 1.3rem;
  color: #0f172a;
  margin: 0 0 10px;
  font-weight: 800;
}

.restricted-lead {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 24px;
}

.restricted-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  text-align: left;
  margin-bottom: 24px;
}

.restricted-box-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: #334155;
  line-height: 1.45;
}

.restricted-box-row .material-icons {
  color: #0284c7;
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.restricted-box-row p { margin: 4px 0 0; color: #64748b; }

.restricted-user-info {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #475569;
}

.user-role-chip {
  background: #e2e8f0;
  color: #334155;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 11px;
}

.restricted-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.outillage-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.outillage-empty-state .material-icons {
  font-size: 48px;
  color: #94a3b8;
  margin-bottom: 12px;
}

.outillage-empty-state h4 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: #1e293b;
}

.outillage-empty-state p {
  margin: 0 0 18px;
  font-size: 0.88rem;
  color: #64748b;
}

/* ==========================================================================
   MODULE OUTILLAGE & MÉTROLOGIE - NAVIGATION PAR ONGLETS
   ========================================================================== */
.outillage-tabs-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 22px;
  padding: 0 6px;
}

.outillage-tab-btn {
  background: transparent;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s ease;
}

.outillage-tab-btn:hover {
  color: #0f172a;
  background: #f8fafc;
}

.outillage-tab-btn.active {
  color: #0d9488;
  border-bottom-color: #0d9488;
  background: #f0fdfa;
}

.outillage-tab-badge {
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.outillage-tab-btn.active .outillage-tab-badge {
  background: #ccfbf1;
  color: #0f766e;
}

.outillage-tab-badge-accent {
  background: #ccfbf1;
  color: #0f766e;
}

/* ==========================================================================
   ONGLET DOTATION OUTILLAGE - DISPOSITION PRINCIPALE
   ========================================================================== */
.dotation-main-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 22px;
  align-items: start;
}

/* Colonne gauche : Annuaire des Agents */
.dotation-agents-sidebar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 200px);
  position: sticky;
  top: 18px;
}

.dotation-sidebar-header {
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.dotation-sidebar-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.dotation-sidebar-title .material-icons {
  font-size: 18px;
  color: #0d9488;
}

.dotation-search-box {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.dotation-search-box .material-icons {
  position: absolute;
  left: 10px;
  font-size: 18px;
  color: #94a3b8;
  pointer-events: none;
}

.dotation-search-box input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 30px 8px 34px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  color: #0f172a;
  outline: none;
  transition: all 0.15s ease;
}

.dotation-search-box input:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.dotation-filter-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.dotation-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dotation-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.dotation-pill.active {
  background: #0d9488;
  color: #ffffff;
  border-color: #0d9488;
}

.dotation-agents-list {
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dotation-no-agent {
  text-align: center;
  padding: 30px 10px;
  color: #94a3b8;
}

.dotation-no-agent .material-icons {
  font-size: 32px;
  margin-bottom: 6px;
}

.dotation-agent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dotation-agent-item:hover {
  background: #f1f5f9;
}

.dotation-agent-item.active {
  background: #f0fdfa;
  border-color: #0d9488;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.12);
}

.agent-item-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12.5px;
  flex-shrink: 0;
}

.dotation-agent-item.active .agent-item-avatar {
  background: linear-gradient(135deg, #0d9488, #0f766e);
}

.agent-item-details {
  flex: 1;
  min-width: 0;
}

.agent-item-name {
  display: block;
  font-size: 12.5px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-item-cp {
  font-size: 11px;
  color: #64748b;
  margin: 1px 0 3px;
}

.agent-item-meter {
  height: 4px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.agent-meter-fill {
  height: 100%;
  background: #10b981;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.agent-item-counter {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}

.agent-item-counter.badge-full {
  background: #dcfce7;
  color: #15803d;
}

.agent-item-counter.badge-partial {
  background: #fef3c7;
  color: #b45309;
}

.agent-item-counter.badge-empty {
  background: #f1f5f9;
  color: #64748b;
}

/* Colonne droite : Fiche Dotation de l'Agent */
.dotation-agent-detail {
  min-width: 0;
}

.dotation-empty-detail {
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
}

.dotation-empty-detail .material-icons {
  font-size: 48px;
  color: #94a3b8;
  margin-bottom: 12px;
}

.dotation-empty-detail h3 {
  margin: 0 0 6px;
  color: #1e293b;
}

/* Bandeau Hero de l'Agent */
.dotation-agent-hero {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.agent-hero-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.agent-hero-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.agent-hero-info {
  flex: 1;
}

.agent-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #0d9488;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.agent-hero-tag .material-icons {
  font-size: 14px;
}

.agent-hero-info h3 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
}

.agent-hero-sub {
  font-size: 12.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.agent-hero-sub strong {
  color: #1e293b;
}

.agent-hero-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-progress-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
}

.hero-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #475569;
  margin-bottom: 8px;
}

.hero-progress-header strong {
  color: #0d9488;
  font-weight: 800;
}

.hero-progress-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}

.hero-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #0d9488, #10b981);
  border-radius: 6px;
  transition: width 0.35s ease;
}

.hero-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-hero-action {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

.btn-hero-action .material-icons {
  font-size: 16px;
}

.btn-hero-give-all {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.btn-hero-give-all:hover {
  background: #d1fae5;
  color: #047857;
}

.btn-hero-clear-all {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
}

.btn-hero-clear-all:hover {
  background: #ffe4e6;
  color: #be123c;
}

.btn-hero-add-tool {
  background: #f0fdfa;
  border-color: #99f6e4;
  color: #0f766e;
}

.btn-hero-add-tool:hover {
  background: #ccfbf1;
  color: #115e59;
}

.btn-hero-print {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

.btn-hero-print:hover {
  background: #e0f2fe;
  color: #0284c7;
}

/* Tableau / Liste des Outils */
.dotation-tools-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.05);
  overflow-x: auto;
  overflow-y: hidden;
}

.dotation-tools-header {
  display: grid;
  grid-template-columns: minmax(260px, 2.2fr) 140px 185px minmax(160px, 1.4fr) 125px;
  gap: 14px;
  padding: 12px 18px;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  align-items: center;
  min-width: 900px;
}

.dotation-tools-body {
  display: flex;
  flex-direction: column;
  min-width: 900px;
}

.dotation-tool-row {
  display: grid;
  grid-template-columns: minmax(260px, 2.2fr) 140px 185px minmax(160px, 1.4fr) 125px;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid #f1f5f9;
  align-items: center;
  transition: background 0.15s ease;
  min-width: 900px;
}

.dotation-tool-row:last-child {
  border-bottom: none;
}

.dotation-tool-row.row-given {
  background: #ffffff;
}

.dotation-tool-row.row-pending {
  background: #fafaf9;
}

.dotation-tool-row:hover {
  background: #f8fafc;
}

.cell-tool {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #f1f5f9;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.tool-icon-circle .material-icons {
  font-size: 19px;
}

.tool-icon-circle.icon-given {
  background: #dcfce7;
  color: #16a34a;
}

.tool-texts {
  min-width: 0;
}

.tool-name {
  display: block;
  font-size: 13.5px;
  color: #0f172a;
  line-height: 1.35;
}

.tool-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.tool-cat-pill {
  font-size: 11px;
  font-weight: 600;
  color: #0284c7;
  background: #e0f2fe;
  padding: 1px 6px;
  border-radius: 4px;
}

.tool-ref-tag {
  font-size: 10.5px;
  color: #64748b;
  font-family: monospace;
}

/* Bouton cliquable Donné / Non donné */
.btn-dot-toggle {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.btn-dot-toggle .material-icons {
  font-size: 16px;
}

.btn-dot-toggle.is-given {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: 1px solid #059669;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.btn-dot-toggle.is-given:hover {
  background: linear-gradient(135deg, #059669, #047857);
}

.btn-dot-toggle.is-not-given {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.btn-dot-toggle.is-not-given:hover {
  background: #e2e8f0;
  color: #334155;
  border-color: #94a3b8;
}

/* Champ Date modifiable */
.cell-date {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dot-date-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px;
  transition: all 0.15s ease;
}

.dot-date-input-group:focus-within {
  border-color: #0d9488;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
}

.dot-date-input-group .material-icons {
  font-size: 16px;
  color: #0d9488;
  flex-shrink: 0;
}

.dot-date-field {
  border: none;
  outline: none;
  font-size: 12.5px;
  font-family: inherit;
  color: #0f172a;
  width: 100%;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.dot-date-badge {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.dot-date-badge.badge-date-ok {
  color: #059669;
}

.dot-date-badge.badge-date-empty {
  color: #94a3b8;
  font-style: italic;
}

/* Notes / Observations */
.dot-notes-field {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  color: #334155;
  background: #ffffff;
  outline: none;
  transition: all 0.15s ease;
}

.dot-notes-field:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.12);
}

/* Cellule Actions et boutons */
.cell-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 5px !important;
  min-width: 115px !important;
}

/* Bouton Reset de ligne */
.btn-dot-row-reset {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 5px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-dot-row-reset .material-icons {
  font-size: 18px;
}

.btn-dot-row-reset:hover {
  color: #ef4444;
  background: #fee2e2;
  border-color: #fca5a5;
}

/* Bouton Doter à tous sur une ligne */
.btn-dot-row-bulk {
  background: #f0fdf4 !important;
  border: 1px solid #86efac !important;
  color: #166534 !important;
  cursor: pointer !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  transition: all 0.15s ease !important;
  flex-shrink: 0 !important;
}

.btn-dot-row-bulk .material-icons {
  font-size: 15px !important;
  color: #16a34a !important;
}

.btn-dot-row-bulk:hover {
  background: #dcfce7 !important;
  border-color: #4ade80 !important;
  color: #14532d !important;
}

/* Bouton Supprimer équipement personnalisé */
.btn-dot-row-delete {
  background: transparent !important;
  border: 1px solid transparent !important;
  color: #ef4444 !important;
  cursor: pointer !important;
  padding: 5px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
  flex-shrink: 0 !important;
}

.btn-dot-row-delete .material-icons {
  font-size: 18px !important;
}

.btn-dot-row-delete:hover {
  background: #fee2e2 !important;
}

/* Responsive Dotation : tableau préservé propre et lisible avec défilement horizontal si nécessaire */
@media (max-width: 960px) {
  .dotation-main-layout {
    grid-template-columns: 1fr;
  }
  .dotation-agents-sidebar {
    position: static;
    max-height: 340px;
  }
}



/* --- Prêts & Icônes Vectorielles Métrologie --- */
.badge-metrologie-prete {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #b45309 !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

.tool-serial-code,
.tool-cat-badge,
.card-status-pill,
.table-status-pill {
  white-space: nowrap !important;
}

.tool-vector-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.tool-vector-icon-wrap svg {
  width: 24px;
  height: 24px;
  display: block;
}

.table-row-status-prete {
  background-color: rgba(254, 243, 199, 0.25) !important;
}

.table-row-status-prete:hover {
  background-color: rgba(254, 243, 199, 0.45) !important;
}
