/* ─── Référentiel équipements (M13) — refonte charte CRM ─── */

.m13-filters {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: white; border-radius: 12px; padding: 12px 16px;
  box-shadow: 0 1px 3px rgba(15,23,42,0.06); border: 1px solid #e2e8f0;
}
.m13-cat-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.m13-cat-pill {
  padding: 6px 12px; border-radius: 99px; border: 1.5px solid #e2e8f0; background: white;
  font-size: 0.78rem; font-weight: 700; color: #475569; cursor: pointer; white-space: nowrap;
}
.m13-cat-pill.active { background: #1E3A8A; border-color: #1E3A8A; color: white; }

.m13-grid { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
@media (max-width: 800px) { .m13-grid { grid-template-columns: 1fr; } }

.m13-brands-col, .m13-models-col {
  background: white; border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(15,23,42,0.06); border: 1px solid #e2e8f0;
}
.m13-brands-col h3, .m13-models-col h3 { margin: 0 0 10px; font-size: 0.85rem; font-weight: 800; color: #0F172A; text-transform: uppercase; letter-spacing: 0.03em; }
.m13-models-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.m13-models-header h3 { margin: 0; }

.m13-brand-list { display: flex; flex-direction: column; gap: 6px; max-height: 65vh; overflow-y: auto; }
.m13-brand-card {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px;
  border: 1.5px solid #e2e8f0; cursor: pointer; transition: background 120ms, border-color 120ms;
}
.m13-brand-card:hover { background: #f8fafc; border-color: #cbd5e1; }
.m13-brand-card.selected { background: #eff6ff; border-color: #1E3A8A; }
.m13-brand-card.inactive { opacity: 0.55; }
.m13-brand-info { flex: 1; min-width: 0; }
.m13-brand-name { font-weight: 700; color: #0F172A; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m13-cat-badge {
  display: inline-block; font-size: 0.66rem; font-weight: 700; padding: 1px 8px; border-radius: 99px;
  background: #EFF6FF; color: #1E40AF; margin-top: 3px;
}
.m13-brand-edit {
  background: transparent; border: none; cursor: pointer; font-size: 0.9rem; padding: 4px; border-radius: 6px; flex-shrink: 0;
}
.m13-brand-edit:hover { background: #e2e8f0; }

.m13-empty { text-align: center; color: #94a3b8; font-size: 0.85rem; padding: 24px; }

/* Modales (marque / modèle) */
.m13-modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.5); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.m13-modal {
  background: white; border-radius: 14px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.m13-modal-header {
  background: #0F172A; color: white; padding: 14px 18px; border-radius: 14px 14px 0 0;
  display: flex; align-items: center; justify-content: space-between;
}
.m13-modal-header h2 { margin: 0; font-size: 1.05rem; font-family: 'Poppins', sans-serif; }
.m13-modal-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.m13-modal-footer { padding: 12px 18px; border-top: 1px solid #e2e8f0; display: flex; gap: 8px; background: #f8fafc; border-radius: 0 0 14px 14px; }
.m13-modal-footer button { flex: 1; }
.m13-modal-error { color: #dc2626; font-size: 0.8rem; display: none; }
